SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Member
    Join Date
    Apr 2003
    Location
    Sweden
    Posts
    5
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question Installing php 4 on winxp with apache

    I have some problem installing php 4.3.1 on winxp with an apache 1.3.27 web server. Apache seems to work fine (i installed it just now as well), i can see the default index.html file from htdocs by the url http://localhost. When i try accessing http://localhost/phpinfo.php (a file located in C:\Apache\htdocs containing only "<? phpinfo() ?>" i fail however. The apache error message is "Not Found. The requested URL /php4/php.exe/phpinfo.php was not found on this server."

    php.exe, php4ts.dll and php4apache.dll is located at C:\php4\php-4.3.1-Win32. The tutorial im following suggested moving php4ts.dll and a file named Msvcrt.dll to the windows\system directory. I couldn't find Msvcrt.dll and the install.txt file included in the php package did not mention it. It also suggested that i let php4ts.dll stay in the /PHP4/ directory and copied php4apache.dll there from the sapi directory, so i did.

    I renamed the php.ini-dist file to php.ini, moved it to c:\windows made these changes:
    extension_dir = "C:\php4\php-4.3.1-Win32"

    I have added these changes to the apache\conf\httpd.conf file:

    ScriptAlias /php4/ "C:/php4/php-4.3.1-Win32"

    AddType application/x-httpd-php .php .phtml
    AddType application/x-httpd-php-source .phps

    Action application/x-httpd-php /php4/php.exe

    All changes has been made acording to a tutorial i'm following. What might be wrong? The url submitted by apache in its error message looks a bit odd i think. /php4/php.exe/phpinfo.php is of course not a correct path or is it written like that to indicate that phpinfo.php is interpreted by php.exe?

    I'm thankfull for any help.

  2. #2
    My precious!!! astericks's Avatar
    Join Date
    Mar 2002
    Location
    Vancouver, BC
    Posts
    1,971
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Is your root folder set right in your httpd.conf file?

  3. #3
    SitePoint Member
    Join Date
    Apr 2003
    Location
    Sweden
    Posts
    5
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I think so. If any of these two are what you meen:
    ServerRoot "C:/Apache"
    DocumentRoot "C:/Apache/htdocs"

    C:/Apache is where apache.exe is located and C:/Apache/htdocs where phpinfo.php is.

    I remember reading of an error that may occur with winxp-apache if the SP1 is not installed. Could this maybe be that bug?

  4. #4
    SitePoint Wizard siteguru's Avatar
    Join Date
    Oct 2002
    Location
    Scotland
    Posts
    3,631
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    This is how I have httpd.conf set up ...
    Code:
        LoadModule php4_module c:/php/sapi/php4apache.dll
    
        AddType application/x-httpd-php .phtml .php .php3 .php4
        AddType application/x-httpd-php-source .phps
    where PHP is installed to C:\PHP. I also copied php.ini into the C:\WINDOWS folder, and copied the php4ts.dll and php4ts.lib files into C:\WINDOWS\SYSTEM(32?) folder.

    Note also, your extensions path in php.ini may be wrong - perhaps it should be ...

    extension_dir = "C:\php4\php-4.3.1-Win32\extensions"
    Ian Anderson
    www.siteguru.co.uk

  5. #5
    SitePoint Member
    Join Date
    Apr 2003
    Location
    Sweden
    Posts
    5
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks! It seems to work fine now.


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
  •