Find the answer to your Linux question:
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 13
I'm using Slackware 9, with the included Apache and PHP packages. I performed the configurations on the httpd.conf file, based on the PHP install docs. I verified that the following ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Dec 2003
    Posts
    41

    PHP not working - Won't parse code?


    I'm using Slackware 9, with the included Apache and PHP packages. I performed the configurations on the httpd.conf file, based on the PHP install docs.

    I verified that the following exist in the file:
    LoadModule php4_module libexec/libphp4.so
    AddModule mod_php4.c

    and added this:
    AddType application/x-httpd-php .php

    After restarting the apache server, I am asked to save the file, rather than being able to view the page.

    Can anyone help?

  2. #2
    Linux Engineer Giro's Avatar
    Join Date
    Jul 2003
    Location
    England
    Posts
    1,219
    reboot the machine and see what happens.

  3. #3
    Just Joined!
    Join Date
    Dec 2003
    Posts
    41
    Funny you mentioned that ... that's exactly what I did. And it worked! Can you explain why?

  4. $spacer_open
    $spacer_close
  5. #4
    Linux Engineer Giro's Avatar
    Join Date
    Jul 2003
    Location
    England
    Posts
    1,219
    Not sure why you should not have to reboot, But it happens with Debian as well i banged my head against the wall trying to figure out why my changes hadnt worked

  6. #5
    Linux Engineer big_k105's Avatar
    Join Date
    May 2003
    Location
    Fargo, ND
    Posts
    901
    actually i think all you would have had to do is restart apache so that it would use the updated config file. and when you reboot the system it restarts apache
    BIG K aka Kyle
    Programming Forums
    www.kylekonline.com
    Please don\'t PM me for help-- ask in the forums instead!

  7. #6
    Linux Engineer Giro's Avatar
    Join Date
    Jul 2003
    Location
    England
    Posts
    1,219
    It doesnt work restarting apache he tried that maybe a stop/start would make it parse the conf?

  8. #7
    Linux Engineer big_k105's Avatar
    Join Date
    May 2003
    Location
    Fargo, ND
    Posts
    901
    that mite be it but im not 100%
    BIG K aka Kyle
    Programming Forums
    www.kylekonline.com
    Please don\'t PM me for help-- ask in the forums instead!

  9. #8
    Linux Enthusiast scientica's Avatar
    Join Date
    Sep 2003
    Location
    South- or "Mid-" Sweden
    Posts
    742
    Quote Originally Posted by Giro
    It doesnt work restarting apache he tried that maybe a stop/start would make it parse the conf?
    It does, every time I add/remove/modify my apache config I restart apache (btw, the '/rc.d/init.d/httpd restart' command shold be the same as "/rc.d/init.d/httpd stop" && '/rc.d/init.d/httpd start'), via the rc script, it reloads the config file(s).

  10. #9
    Just Joined!
    Join Date
    Nov 2003
    Posts
    34

    Re: PHP not working - Won't parse code?

    Quote Originally Posted by SlowCoder
    I'm using Slackware 9, with the included Apache and PHP packages. I performed the configurations on the httpd.conf file, based on the PHP install docs.

    I verified that the following exist in the file:
    LoadModule php4_module libexec/libphp4.so
    AddModule mod_php4.c

    and added this:
    AddType application/x-httpd-php .php

    After restarting the apache server, I am asked to save the file, rather than being able to view the page.

    Can anyone help?
    The same happened to me. I suggest you recompile your php again. Somewhere in your compilation might went wrong. It's easier to recompile than to figure out what went wrong especially if youre a newbie -it's a fresh install of apache and php anyway.

    YOu see, After I recompiling the service all went fine while following the same procedure I did the first time around.

    You may also parse on this site my post regarding this question.

    cheers!

  11. #10
    Just Joined!
    Join Date
    Dec 2006
    Posts
    5

    Unhappy Apache won't parse PHP (LAMP FC5)

    I'm using Fedora Core 5.
    If I enter the following line into /etc/httpd/conf/httpd.conf

    AddModule mod_php5.c

    I get the error message:

    Syntax error on line 202 of /etc/httpd/conf/httpd.conf:
    Invalid command 'AddModule', perhaps misspelled or defined by a module not included in the server configuration
    httpd not running, trying to start

    When I enter

    LoadModule php5_module modules/libphp5.so

    I get:

    # httpd -k restart
    [Sun Dec 10 15:11:39 2006] [warn] module php5_module is already loaded, skipping
    httpd not running, trying to start

    I'm trying to install mambo to my webserver and need PHP of course. I set the .php files to apache,apache and 'executable'.

    Why won't it parse php code??

Page 1 of 2 1 2 LastLast

Posting Permissions

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