Click to See Complete Forum and Search --> : PHP4.1 and Win98/PWS


Anon
07-03-2000, 08:07 PM
Hi,Folks

I need an expert help!!! I have been trying to install PHP4.1 on Win98/PWS. After a number of attempts finally I have got the following message:

Warning: Failed opening 'C:\Inetpub\wwwroot\myfirst.php' for inclusion (include_path='') in Unknown on line 0

What should I do? Any comments much appreciated!!!

Anon
07-03-2000, 10:09 PM
You should edit file "php.ini" and modify:
include_path = "."
Or if you have some other path for include:
include_path= ".;c:\inetpub\wwwroot"
Good luck!

Anon
07-04-2000, 02:06 AM
Hi, Dallas

Thank you for your help, but no success! First, I added the "." to include_path like include_path="." or include_path=".;c\inetpub\wwwroot"
neither did work!?

Anon
07-04-2000, 02:13 AM
Do you use "include" directive or not? If use, try to remove it from php file and try just <? phpinfo(); ?> to see what happened.
And, please show me the content of the php file.

Anon
07-04-2000, 03:44 AM
Hi,

I didn't use "include" directive in the first test program. Anyway, this is the second test program(mytest.php):


<BODY>
<?php
phpinfo();
?>
</BODY


Warning: Failed opening 'C:\Inetpub\wwwroot\mytest.php' for inclusion (include_path='') in Unknown on line 0

Anon
07-04-2000, 05:26 PM
Is the mytest.php file located at 'C:\Inetpub\wwwroot\mytest.php'?

Anon
07-04-2000, 11:29 PM
Hi,

Yes. I saved it there.

Anon
07-04-2000, 11:49 PM
Hi,

This is an extension to the last one. When I deleted the php.ini file from "Windows" directory,I got the same massage:
Warning: Failed opening 'C:\Inetpub\wwwroot\mytest.php' for inclusion (include_path='') in Unknown on line 0
Very bizarre!? Any comment?

Anon
07-05-2000, 04:00 AM
I think you didn't config your PHP correctly in PWS. Please read the "README.txt" shipped with PHP4 carefully and start over again.

Anon
07-05-2000, 11:02 AM
Seems like you forgot the %s %s in the registry. When you installed PHP did you add the registry entry for PHP in the Script Map? If you did, were you sure to include %s %s at the end of the path?

Anon
07-06-2000, 02:23 AM
Hi,

I did. The file PWS-php.reg comes with the bundle anyway and there I changed the path like ... ".php"="C:\\Php\\php4isapi.dll" and saved it in the same folder(Php) as said in the Readme file.

The other strange thing is when I tried the call a non-existing file with the extention .php(say ,my.php) on the IE ,I got the same message:

Warning: Failed opening 'C:\Inetpub\wwwroot\my.php' for inclusion (include_path='') in Unknown on line 0

Anon
07-06-2000, 05:49 AM
Did you add %s %s in the script map key in registry?

Anon
07-06-2000, 01:49 PM
Hi,

I didn't. I didn't see such an instruction
in the Read file. If you tell me exactly what I need to do I'd be more than happy!
cheers...

Anon
07-06-2000, 09:18 PM
In registry, you should add a key in:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\w3svc\parameters\Script Map
as this way:
".php"="c:\\Program files\\php4\\php.exe" %s %s

lvondyl
05-28-2001, 06:53 PM
Greetings,
You added the path to php.ini in reply #2, yes?

You may need to put your *.php files in your cgi-bin to execute. That's the way I got my setup to work on PWS on Win98. [--it's simpler on Linux--]

Do the ol' <?php phpinfo(); ?> and test; you should get the goods then.
The browser address would be http://localhost/cgi-bin/phptest.php
[--assuming a file name of phptest.php--]

...hope this helps,
~lance