Please help with PHP
Results 1 to 7 of 7

Thread: Please help with PHP

  1. #1
    Member
    Join Date
    Oct 2002
    Posts
    32

    Please help with PHP

    First I want to say : Please dont tell me to search google because I have been for the past 3 hours and every site says something different and nothing works.

    I am using Red Hat 8.0 and trying to get php set up. I installed apache and php and mysql off of the CD.
    I cant seem to get PHP working though. Apache works, SQL connects just php is being a bitch. I have a idea that my problem lies in the httpd.conf file. I am not sure what I need to put in here to get PHP to work, Any help would be appreciated

    file:/usr/lib/httpd/modules/libphp4.so is where the phpmodule is. Can anyone tell me what to put in httpd.conf to get it to work. I have a veiw info page uploaded but its just blank wont execute the php

    Help Plz!!!

  2. #2
    Senior Member roswell1329's Avatar
    Join Date
    Jan 2002
    Posts
    670
    Here's a few lines that you may have overlooked:

    LoadModule php4_module libexec/libphp4.so #Loads the php module

    <IfModule mod_dir.c>
    DirectoryIndex index.html index.htm index.shtml index.cgi index.php3 index.php
    #Follows the previous search order for index pages
    </IfModule>


    AddType application/x-httpd-php .php .php3 #Allows .php and .php3 as valid extensions
    AddType application/x-httpd-php-source .phps #Allows .phps as a valid extension


    Your configuration may differ, but as far as I know you should have something similar to the above lines in order for PHP to work properly. Good luck!
    /* You are not expected to understand this. */

  3. #3
    Member
    Join Date
    Oct 2002
    Posts
    32
    Thanks but still not working. I dont get it

    I just checked log files and it says this [Fri Nov 08 22:20:51 2002] [warn] module php4_module is already loaded, skipping
    [Fri Nov 08 22:20:44 2002] [warn] child process 20691 still did not exit, sending a SIGTERM

  4. #4
    Just a Virtualized Geek MrLinus's Avatar
    Join Date
    Sep 2001
    Location
    Redondo Beach, CA
    Posts
    7,324
    What versions are off the CD?

    I'd almost recommend using the latest stable versions from the web rather than from the CD.

    And what order did you install things in? Did you compile or was it RPM?

    The other thing that might be helpful is a copy of your httpd.conf file posted. While I don't think that is the issue it might be helpful. (I have supicions that RH moved directories again)
    Goodbye, Mittens (1992-2008). My pillow will be cold without your purring beside my head
    Extra! Extra! Get your FREE copy of Insight Newsletter||MsMittens' HomePage

  5. #5
    Banned
    Join Date
    Sep 2001
    Posts
    853
    rh 8.0 comes with apache 2.x wich is a bitch to set up with php as of writing their are no mod_php for apache 2.0
    my suggestion rather than batteling with it for hours is uninstall your current apache and downgrade to apache 1.3.x i think 1.3.27 is the latest realese
    hope that helps
    rioter

  6. #6
    Junior Member
    Join Date
    Oct 2002
    Posts
    6

    Arrow

    Originally posted here by eddiemontose
    Thanks but still not working. I dont get it

    I just checked log files and it says this [Fri Nov 08 22:20:51 2002] [warn] module php4_module is already loaded, skipping
    [Fri Nov 08 22:20:44 2002] [warn] child process 20691 still did not exit, sending a SIGTERM
    As the logs are saying, you have the PHP module already loaded before Apache reaches "LoadModule php4_module libexec/libphp4.so" into the httpd.conf file at startup. Seems like your shellscript looks at the currently loaded modules and starts them for you, according to your requests at installation. (httpd start/stop does something more than starting isn't it ?)

    PHP can be installed as a dynamic module for apache (then U need LoadModule directive), as a static module is directly compiled in apache (then is no need for loading it being already compiled into and started by the shellscript together with the main application), or as a CGI application (command-line if you want) this being the best for using PHP without Apache. Three different configurations suited for different needs, and you cannot have two of them in the same time.

    My questions are :

    What errors have you there ?
    - PHP code can be read in the browser ?
    - The php file is served for download ?

    .. these two being the most common for a failed PHP setup.

    More info will be helpful. - Not working - cannot route anyone to the right solution.
    Wh .. oops! Let\'s start over!

  7. #7
    Member
    Join Date
    Oct 2002
    Posts
    32
    Thanks for all the help. Somehow I stumbled on to it and it is now working. I removed my LoadModule line and edited the command to recignises .html .php .php3 and then restarted the computer. I also deleted the phpinfo page and then copyied and pasted off of the php website and then went to the page and it was working.

    Thanks though

Posting Permissions

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