SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Member
    Join Date
    Sep 2007
    Location
    England
    Posts
    7
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Apache "LoadModule" configuration problem

    Im trying to configure apache 2.2.4 so that it will work with PHP.

    This is what i typed at the very bottom of the configuration file.

    LoadModule php5_module c: /php/php5apache2.dll
    AddType application/x-httpd-php .php
    AddType application/x-httpd-php-source .phps

    This is the error message that was returned when I used the function that tests the configuration file (Line 486 is the line that starts "LoadModule...").

    httpd.exe: Syntax error on line 486 of C:/Program Files/Apache Software Foundation/Apache2.2/conf/httpd.conf: LoadModule takes two arguments, a module and the name of a shared object file to load from

    I'm pretty sure the solution is easy but i can't see it. Can anyone help please?

  2. #2
    SitePoint Enthusiast
    Join Date
    May 2006
    Location
    WWW
    Posts
    29
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I can clearly guess that you are using Windows OS. Can you please tell me which version of Windows you are using so that I can check it accordingly and help you out if I can.

    Thanks.

  3. #3
    SitePoint Enthusiast
    Join Date
    Jan 2007
    Location
    Ballarat, Vic. Australia
    Posts
    61
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by bastywebb View Post
    Im trying to configure apache 2.2.4 so that it will work with PHP.

    This is what i typed at the very bottom of the configuration file.

    LoadModule php5_module c: /php/php5apache2.dll
    AddType application/x-httpd-php .php
    AddType application/x-httpd-php-source .phps

    This is the error message that was returned when I used the function that tests the configuration file (Line 486 is the line that starts "LoadModule...").

    httpd.exe: Syntax error on line 486 of C:/Program Files/Apache Software Foundation/Apache2.2/conf/httpd.conf: LoadModule takes two arguments, a module and the name of a shared object file to load from

    I'm pretty sure the solution is easy but i can't see it. Can anyone help please?
    The error message is telling you the problem, though it isn't always obvious. The problem is most likely the space after c: on the first line. It's effectively splitting the path parameter into 2 parameters .. meaning that apache thinks you are trying to pass three parameters to the loadmodule command.

    Change this:

    LoadModule php5_module c: /php/php5apache2.dll

    ...to this:

    LoadModule php5_module c:/php/php5apache2.dll

    ...and it should fix the problem.

  4. #4
    SitePoint Member
    Join Date
    Sep 2007
    Location
    England
    Posts
    7
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Can I just say a massive 'big up' to both of you guys! I've never used a forum before and I'm stunned at how quickly and willing you were to answer my question.

    Teckyhead, you had it down with removing the extra space. Thank a million.

  5. #5
    SitePoint Member
    Join Date
    Sep 2007
    Location
    England
    Posts
    7
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Oh no! I spoke to soon. I accidently amended a back-up config file i made following teckyhead's solution and this made me think the problem was fixed. However, when I implemented the amendments on the actual config file i got the same error message.

    Hostabove, I'm using windows XP Home edition, version 2002, service pack two.

    Any other thoughts? :-)

  6. #6
    SitePoint Member
    Join Date
    Sep 2007
    Location
    England
    Posts
    7
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    I think I've sorted it

    pasting this line seemed to get apache working.

    LoadModule php5_module c:/PHP/php5apache2_2_filter.dll

    Thanks again teckyhead and hostabove.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •