SitePoint Sponsor

User Tag List

Results 1 to 10 of 10
  1. #1
    midnight coder
    Join Date
    Dec 2000
    Location
    The flat edge of the world
    Posts
    838
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I downloaded PHP 4.0.4 binaries from PHP.net, not a bundle or anything.

    And following Webmonkey's tutorial, I installed Apache and PHP, and during it, it told me to put php.ini in my Windows directory.

    However, at the end of it, when I did that phpinfo() script, the very top section, where it says Configuration File (php.ini) Path, it simply says php.ini, which I assume is the php.ini from the php directory.

    If that's the case, why do I need to put php.ini in my Windows directory?

    Also, if I add the line LoadModule php4_module modules/mod_php4/sapi/php4apache.dll to httpd.conf, does that mean my PHP will run as module, which is better? If running it as module is faster, how come not many tutorials mentions it?

    My PHP is installed at E:\Apache\modules\mod_php4\, running Win2000.

  2. #2
    SitePoint Wizard
    Join Date
    Apr 2000
    Posts
    1,483
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    When there is no path the system looks in a few special locations for the file, the Windows folder being one of them. So that just means it is in one of the default locations.

  3. #3
    Dumb PHP codin' cat
    Join Date
    Aug 2000
    Location
    San Diego, CA
    Posts
    5,460
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yes running it as a module is way better it is faster and it doesn't have to read in the php.ini file everytime it gets run. Keep in mind that you will have start and stop the apache to get directives in the php.ini file to show up.

    Add the these lines to the httpd.conf

    LoadModule php4_module modules/mod_php4/sapi/php4apache.dll
    AddType application/x-httpd-php .php4 .php .php3

    Make sure to right click on My Computer from the desktop and click Properties , then the advanced tab, then Environment Variables Select Path from system variables and add
    E:\Apache\modules\mod_php4;E:\Apache\modules to it.
    Please don't PM me with questions.
    Use the forums, that is what they are here for.

  4. #4
    midnight coder
    Join Date
    Dec 2000
    Location
    The flat edge of the world
    Posts
    838
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Cool, thanks, what exactly does the last thing do? About going to Environment variables? I didn't do it, and the server seems to work fine. Does it just let the server start at startup?

  5. #5
    Dumb PHP codin' cat
    Join Date
    Aug 2000
    Location
    San Diego, CA
    Posts
    5,460
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Have you tried running a php script on the server yet? Does it crash?
    Please don't PM me with questions.
    Use the forums, that is what they are here for.

  6. #6
    midnight coder
    Join Date
    Dec 2000
    Location
    The flat edge of the world
    Posts
    838
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Well I've ran the phpinfo() script, and installed phpMyAdmin, and they seem to work.

    Although I can't create a table with phpMyAdmin, it's probably just something wrong with my MySQL setup, but basically the PHP scripts mentioned seems to work.

  7. #7
    Dumb PHP codin' cat
    Join Date
    Aug 2000
    Location
    San Diego, CA
    Posts
    5,460
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Well you are lucky then usually until I add the the paths to my system environment using PHP as a server module breaks my system. Just keep an eye out for it, if you have a problem don't say I didn't tell you.
    Please don't PM me with questions.
    Use the forums, that is what they are here for.

  8. #8
    midnight coder
    Join Date
    Dec 2000
    Location
    The flat edge of the world
    Posts
    838
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Oh yeah, another thing, right now my server has a file call index.php at root, but it doesn't go to that automatically, it just shows the structure of the server.

    How do I do it so the server automatically opens index files?

  9. #9
    Dumb PHP codin' cat
    Join Date
    Aug 2000
    Location
    San Diego, CA
    Posts
    5,460
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    find the line

    DirectoryIndex in your httpd.conf file and add .php to the end of it and restart apache
    Please don't PM me with questions.
    Use the forums, that is what they are here for.

  10. #10
    midnight coder
    Join Date
    Dec 2000
    Location
    The flat edge of the world
    Posts
    838
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks again!


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
  •