Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New to the CF scene
    Join Date
    Apr 2003
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    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
    Regular Coder
    Join Date
    Jun 2002
    Location
    Depends on the time of year
    Posts
    478
    Thanks
    0
    Thanked 0 Times in 0 Posts
    try using nusphere to take care of the installation for you.

    http://www.nusphere.com/

    Duniyadnd

  • #3
    Super Moderator
    Join Date
    May 2002
    Location
    Perth Australia
    Posts
    4,095
    Thanks
    11
    Thanked 101 Times in 99 Posts
    php works best as an apache module, you are configuring as a CGI

    in your httpd.conf (at the end (& delete the the other stuff)) add these lines ...

    LoadModule php4_module C:/php4/php-4.3.1-Win32/sapi/php4apache.dll
    AddType application/x-httpd-php .php4 .php .htm .php3
    AddType application/x-httpd-php-source .phps

    make sure you have php4apache.dll and php4ts.dll in either
    C:/php4/php-4.3.1-Win32/sapi/

    or in (above is better)

    C:/windows(winnt?)/system32

    make sure php.ini is in c:\ (or whatever your system root is) and make sure the extension directory matches your path to php-4.3.1-Win32/extensions

    restart apache (if its apache2 you need php4apache2.dll) & you should be fine.

    Dont worry about Msvcrt.dll , you almost certainly have it somewhere and it will already be in your PATH.
    resistance is...

    MVC is the current buzz in web application architectures. It comes from event-driven desktop application design and doesn't fit into web application design very well. But luckily nobody really knows what MVC means, so we can call our presentation layer separation mechanism MVC and move on. (Rasmus Lerdorf)

  • #4
    New to the CF scene
    Join Date
    Apr 2003
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thanks! It seems to work fine now.


  •  

    Posting Permissions

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