Go Back   CodingForums.com > :: Server side development > PHP

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 04-10-2003, 09:24 AM   PM User | #1
stovio
New to the CF scene

 
Join Date: Apr 2003
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
stovio is an unknown quantity at this point
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.
stovio is offline   Reply With Quote
Old 04-10-2003, 12:30 PM   PM User | #2
duniyadnd
Regular Coder

 
Join Date: Jun 2002
Location: Depends on the time of year
Posts: 478
Thanks: 0
Thanked 0 Times in 0 Posts
duniyadnd is an unknown quantity at this point
try using nusphere to take care of the installation for you.

http://www.nusphere.com/

Duniyadnd
duniyadnd is offline   Reply With Quote
Old 04-10-2003, 01:20 PM   PM User | #3
firepages
Super Moderator


 
Join Date: May 2002
Location: Perth Australia
Posts: 3,911
Thanks: 5
Thanked 79 Times in 78 Posts
firepages will become famous soon enough
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)
firepages is offline   Reply With Quote
Old 04-10-2003, 02:05 PM   PM User | #4
stovio
New to the CF scene

 
Join Date: Apr 2003
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
stovio is an unknown quantity at this point
Thanks! It seems to work fine now.
stovio is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 05:56 AM.


Advertisement
Log in to turn off these ads.