SitePoint Sponsor

User Tag List

Results 1 to 11 of 11

Hybrid View

  1. #1
    SitePoint Member
    Join Date
    May 2001
    Location
    NJ
    Posts
    6
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    MySql and PHP on Redhat Linux 7 problem restarting httpd

    Hi, y'all!

    I've used PHP and MySql on hosted servers before, but now I've set up my own Redhat Linux 7 server, and followed the well-written, detailed tutorial to install MySql and PHP on it. Everything appeared to go great, right up until the part where I restart the httpd daemon. Here's what it looks like:

    # /etc/rc.d/init.d/httpd restart
    Shutting down http: [OK]
    Starting httpd: Syntax error on line 321 of /etc/httpd/conf/httpd.conf: Cannot add module via name 'mod_php4.c': not in list of loaded modules
    [FAILED]

    I double-checked the httpd.conf file, everything was added/changed as indicated in the tutorial... same with the /usr/local/php/php.ini file ... I'm getting frustrated, mostly cause I don't know enough to know where to go next! Checked the forum, couldn't seem to find anything similar, so here's my post! Any and all advice and help greatly appreciated, and (of course and naturally) the sooner the better... hehehe...
    da'DAWG!
    ----
    "That's my story, and I'm stickin' to it!"

  2. #2
    Dumb PHP codin' cat
    Join Date
    Aug 2000
    Location
    San Diego, CA
    Posts
    5,460
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    First things first, did the libphp4.so file get copied into the apache/libexec folder?

    Also did you compile PHP with apxs? Can we see your configure line you used when compiling php?
    Please don't PM me with questions.
    Use the forums, that is what they are here for.

  3. #3
    SitePoint Member
    Join Date
    May 2001
    Location
    NJ
    Posts
    6
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The file 'libphp4.so' exists on my system in '/usr/local/php-4.0.5/.libs/', '/usr/local/php-4.0.5/libs/', and '/usr/lib/apache/', according to a file find. I used the exact compilation syntax from the tutorial... a quick check of the command issued shows (from the /usr/lib/php-4.0.5/ directory):

    ./configure --prefix=/usr/lib/php --with-config-file-path=/usr/local/php --with-apxs=/usr/sbin/apsx --enable-track-vars --enable-magic-quotes --enable-debugger

    Everything seemed to work properly, until I restartd httpd, and got the error.

    Thanks for your quick response, and your help!
    da'DAWG!
    ----
    "That's my story, and I'm stickin' to it!"

  4. #4
    Dumb PHP codin' cat
    Join Date
    Aug 2000
    Location
    San Diego, CA
    Posts
    5,460
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    If that is your exact syntax then

    --with-apxs=/usr/sbin/apsx

    is wrong and should be

    --with-apxs=/usr/sbin/apxs

    Also I see you are not compiling support for MySQL, you should compile MySQL and get it running before compiling pHP and then add

    --with-mysql=/pathtomysql

    But I am pretty sure if that was your exact syntax than the apxs line was what was screwing you up.
    Please don't PM me with questions.
    Use the forums, that is what they are here for.

  5. #5
    SitePoint Member
    Join Date
    May 2001
    Location
    NJ
    Posts
    6
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally posted by freddydoesphp
    If that is your exact syntax then

    --with-apxs=/usr/sbin/apsx

    is wrong and should be

    --with-apxs=/usr/sbin/apxs

    Also I see you are not compiling support for MySQL, you should compile MySQL and get it running before compiling pHP and then add

    --with-mysql=/pathtomysql

    But I am pretty sure if that was your exact syntax than the apxs line was what was screwing you up.
    Sorry, my transcription error! It was '--with-apxs=/usr/sbin/apxs' ... what do you want from a dyslexic, insomniac, agnostic who stays up all night wondering if there really is a dog! The tutorial said that with PHP4, I didn't need to include the '--with-mysql=/usr/local/mysql' directive (and the make response said as long as I was just using it with PHP, and not with other server stuff, I was OK without it).

    Any other thoughts?
    da'DAWG!
    ----
    "That's my story, and I'm stickin' to it!"

  6. #6
    Dumb PHP codin' cat
    Join Date
    Aug 2000
    Location
    San Diego, CA
    Posts
    5,460
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You may also want to specify the path to Apache' root level

    from the manual

    --with-apache[=DIR]
    PHP 3, PHP 4: Build Apache module. DIR is the top-level Apache build directory, defaults to /usr/local/etc/httpd.


    Sorry I am kinda working backwards I am just checking all th bases since I have never had this much trouble getting apache to start with PHP.


    Because I am pretty sure the libphp4.so must reside in the apache/libexec folder try copying the file from

    /usr/lib/apache/ to /usr/lib/apache/libexec.
    Please don't PM me with questions.
    Use the forums, that is what they are here for.

  7. #7
    SitePoint Member
    Join Date
    May 2001
    Location
    NJ
    Posts
    6
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally posted by freddydoesphp
    You may also want to specify the path to Apache' root level

    from the manual

    --with-apache[=DIR]
    PHP 3, PHP 4: Build Apache module. DIR is the top-level Apache build directory, defaults to /usr/local/etc/httpd.


    Sorry I am kinda working backwards I am just checking all th bases since I have never had this much trouble getting apache to start with PHP.


    Because I am pretty sure the libphp4.so must reside in the apache/libexec folder try copying the file from

    /usr/lib/apache/ to /usr/lib/apache/libexec.
    All of the '*.so' files (including libphp4.so) are apparently located in /etc/httpd/modules, which links to /usr/lib/apache ... and the httpd was working fine up until the addition of php4 and the subsequent restart... my httpd config file is in /etc/httpd, and virtual hosts were working fine, as well, so I assume that meant it was finding the .so files it needed for that, anyway... :: sigh ::

    I do appreciate your help, no need to apologize! I followed the excellent tutorial by Kevin Yank, and everything went so smoothly up to this point that I **KNEW** something hadda give... hehehe...
    da'DAWG!
    ----
    "That's my story, and I'm stickin' to it!"

  8. #8
    Dumb PHP codin' cat
    Join Date
    Aug 2000
    Location
    San Diego, CA
    Posts
    5,460
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Did you use the built in Apache that came with the distro of RedHAt 7. I only find I run into problems using that or using RPMs I like to build apache myself and putting it in /usr/local/apache/ It just makes it so much easier, you may want to consider starting over, just my two cents.
    Please don't PM me with questions.
    Use the forums, that is what they are here for.

  9. #9
    SitePoint Member
    Join Date
    May 2001
    Location
    NJ
    Posts
    6
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally posted by freddydoesphp
    Did you use the built in Apache that came with the distro of RedHAt 7. I only find I run into problems using that or using RPMs I like to build apache myself and putting it in /usr/local/apache/ It just makes it so much easier, you may want to consider starting over, just my two cents.
    :: bigger sigh :: Yup, the distro version with Redhat 7. I guess things that are supposed to make stuff easier don't always, eh? I guess I'll need to at least uninstall the PHP, since that will want the Apache information once I've rebuilt that... any suggestions or recommendations before I undertake the reinstall Apache route? How do I make sure everything is clean and set for a new install? And will I have to redo MySQL as well?

    Thanks for all the help, once again!
    da'DAWG!
    ----
    "That's my story, and I'm stickin' to it!"

  10. #10
    Dumb PHP codin' cat
    Join Date
    Aug 2000
    Location
    San Diego, CA
    Posts
    5,460
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I am no linux guru but I assume if you just delete the apache folder and delete any symlinks to it and any entries in the init.d folder you should be okay to just install a new version of apache, and just as long as you arent trying to run both of them at the same time on port 80 you should be fine.
    Please don't PM me with questions.
    Use the forums, that is what they are here for.

  11. #11
    SitePoint Member
    Join Date
    May 2001
    Location
    NJ
    Posts
    6
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    OK ... reinstalled everything ... :: ouch! :: ... now, when I go to restart httpd, I get:

    Syntax error on line 257 of /etc/httpd/conf/httpd.conf: Cannot load /etc/httpd/modules/libphp4.so into server: libmysqlclient.so.10: cannot open shared object file: No such file or directory [FAILED]

    libphp4.so IS in /etc/httpd/modules (which is a link to /usr/lib/apache/ ) ... libmysqlclient.so.10 is a symlink in the /usr/local/mysql/lib/mysql directory to libmysqlclient.so.10.0.0 ... I've tried copying it to the modules directory, linking it in there, all to no avail. Any suggestions? This is getting REALLY frustrating!
    da'DAWG!
    ----
    "That's my story, and I'm stickin' to it!"


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
  •