Find the answer to your Linux question:
Results 1 to 9 of 9
So I threw in a lamp setup when I installed slackware a while back, and apache worked flawlessly. Mysql needed a little configuration, but I figured that out without too ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Linux Newbie rudie_rage's Avatar
    Join Date
    Jun 2007
    Location
    Canada
    Posts
    133

    php issues....


    So I threw in a lamp setup when I installed slackware a while back, and apache worked flawlessly. Mysql needed a little configuration, but I figured that out without too much hassle. Unfortunately php is giving me all 5 flavours of trouble.

    php4.4.4 came with the install, and no php scripts would work in the browser. I simply got the code echoed back onto the page. After a bit of fighting, I decided to take out 4.4.4 and install 5.2.3 myself from source. At least then I would know what settings and whatnot were selected. so after a slapt-get --remove on the 4.4.4 and a guide and an hour for the 5.2.3, the make + make install seemed to work perfectly.

    So I go to test phpinfo() in my htdocs, and again, nothing. in fact, when I try a php -v I still get 4.4.4 as a version number, even though i had removed it.

    So now im thinking I have 2 versions of php, both only half installed, and neither are fixable via slapt-get. I just want SOME version of php to work, and it would be nice to be able to purge the other from my system. (I'm a stickler for perfection of some degree, and having piles of stuff that dosnt work lingering really bothers me)

    Any ideas? I know I havent really given much solid system information, but again, I dont know where to start.

  2. #2
    Linux Engineer aliov's Avatar
    Join Date
    Dec 2006
    Location
    Geneva,Beirut
    Posts
    1,078
    have a look to the /var/log/packages and see if the version 4.4.4 still there remove it by removepkg php-4.4.4 after that to compile your own from the source code i thing it's better to apply the prefix
    ./configure --prefix=/usr --with-mysql (with the other needed options)
    make && make inst

    make sure that you have the /etc/rc.d/rc.httpd executable

    but do this after removing your own last package ,so if you still have the source go there and do: make uninstall
    Linux is not only an operating system, it's a philosophy.
    Archost.

  3. #3
    Linux Newbie rudie_rage's Avatar
    Join Date
    Jun 2007
    Location
    Canada
    Posts
    133
    Quote Originally Posted by aliov View Post
    have a look to the /var/log/packages and see if the version 4.4.4 still there remove it by removepkg php-4.4.4 after that to compile your own from the source code i thing it's better to apply the prefix
    ./configure --prefix=/usr --with-mysql (with the other needed options)
    make && make inst

    make sure that you have the /etc/rc.d/rc.httpd executable

    but do this after removing your own last package ,so if you still have the source go there and do: make uninstall
    ok, despite make uninstall not working, this has been a lot of help. I successfully removed 4.4.4 and installed 5.2.3. php -v confirms it.

    I still havent been able to see it in action, however, on my server despite following instructions found here: PHP: Installation on Unix systems - Manual

    apache is still just regurgitating the code plaintext.
    Living the digital dream....
    Disclaimer: I may be wrong since I was once before.
    Breathe out so I can breathe you in ~~Everlong

  4. #4
    Linux Engineer aliov's Avatar
    Join Date
    Dec 2006
    Location
    Geneva,Beirut
    Posts
    1,078
    I'm sorry ,i have no problem with php,and i did exactly what the link that you post everything works for me without problem
    Linux is not only an operating system, it's a philosophy.
    Archost.

  5. #5
    Linux Newbie rudie_rage's Avatar
    Join Date
    Jun 2007
    Location
    Canada
    Posts
    133
    hrm. well now that i got php4 out, I could try taking it all out and starting from scratch. I might have scewed up along the way...

    EDIT: OK, so following the instructions, everything except steps 14 and 15 work.
    adding:
    LoadModule php5_module libexec/libphp5.so
    and:
    AddModule mod_php5.c

    to the httpd.conf throws an error when i restart apache.

    apachectl configtest gives:

    Cannot load /usr/libexec/apache/libphp5.so into server: /usr/libexec/apache/libphp5.so: undefined symbol: sqlite3SelectDelete

    in fact, a slocate libphp* gives nothing but:

    /home/kage/php-5.2.3/sapi/apache/libphp5.module.in
    /home/kage/php-5.2.3/sapi/apache_hooks/libphp5.module.in

    so I'm completely lost as to what to do.
    Living the digital dream....
    Disclaimer: I may be wrong since I was once before.
    Breathe out so I can breathe you in ~~Everlong

  6. #6
    Just Joined!
    Join Date
    Jun 2007
    Location
    Lewisville, Texas
    Posts
    2
    I ran into this problem but found the file here:
    /usr/lib/httpd/modules/libphp5.so

    However now I'm getting another error when trying to start Apache:

    undefined symbol: apr_pool_cleanup_null

    Researching that one now.

  7. #7
    Just Joined!
    Join Date
    Jun 2007
    Location
    Lewisville, Texas
    Posts
    2
    I ended up updating to the latest package of Apache then I had to do a sym link because it couldn't find libexpat.so.1 but now it seems to be working fine.

  8. #8
    Just Joined!
    Join Date
    Jun 2007
    Posts
    2
    I encountered the same problem a while ago. The thing that surprised me was, I outlooked the commented line "#Include /etc/apache/mod_php.conf" in the httpd.conf. Apparently the whole configuration needed to parse PHP scripts are in the mod_php.conf file (the AddModule & LoadModule for example).

    Just uncomment the line and see if it solves the problem.

    CMIIW. Just want to help.

  9. #9
    Linux Newbie rudie_rage's Avatar
    Join Date
    Jun 2007
    Location
    Canada
    Posts
    133
    Quote Originally Posted by silhouette View Post
    I encountered the same problem a while ago. The thing that surprised me was, I outlooked the commented line "#Include /etc/apache/mod_php.conf" in the httpd.conf. Apparently the whole configuration needed to parse PHP scripts are in the mod_php.conf file (the AddModule & LoadModule for example).

    Just uncomment the line and see if it solves the problem.

    CMIIW. Just want to help.
    Thanks for the help, but between me asking about php and now I changed OS's lol. I'm now playing around with debian.

    When I get around to it, I'll see if I can get this to work on my new system.
    Living the digital dream....
    Disclaimer: I may be wrong since I was once before.
    Breathe out so I can breathe you in ~~Everlong

Posting Permissions

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