Hi every one,
I am using win2K with IIS server.
I have installed php in the c:\php\php.exe and am using PHPmyAdmin and MySQL to develope a small website.
Using the the Internet Service Mananger i have mpped the scripts to c:\php\php.exe
I have created a folder test on the d drive and given it an Alias name of myphp using the PWS that runs with IIS.
The problem is that when i use http://localhost/myphp in the browser the php pages give me the follwing error
cgi error:
The specified CGI application misbehaved by not returning a complete set of
HTTP headers. The headers it did return are:
now when i used some asp pages in the same folder they work fine.
also the same php files works fine when copied to c:\inetpub\wwwroot folder
I guess its some maping roblem or some thing that is not letting the php files execute from the d dirve or a ny other place excvept for the c:\inetpub\wwroot
can some please help mw with this ?
what is the solution to this problem.
thank you for your time.
P.S.im a newbie to PHP and MySQL
thank you for your time every one
Help with PHP alias folder
Moderator: General Moderators
try running the script from a commandline window, e.g.See if errors raise.
Requests are handled with the permissions of the account ISUR_xyz (xyz beeing the name of your computer). Does this account have (read) access to both php and the script file?
In your php.ini there is a parameter doc_root. Does it point to the right directory?
In the internet services manager you may enable the check file exists option. If the script does not exist at all the IIS will return a 404 (but I thought this is default.?.)
Code: Select all
"c:\program files\php\php.exe" -i c:\inetpub\php\myScript.phpRequests are handled with the permissions of the account ISUR_xyz (xyz beeing the name of your computer). Does this account have (read) access to both php and the script file?
In your php.ini there is a parameter doc_root. Does it point to the right directory?
In the internet services manager you may enable the check file exists option. If the script does not exist at all the IIS will return a 404 (but I thought this is default.?.)
really depends on where your php scripts are located.
In my example I assumed the scripts are in c:\inetpub\php and the root-dir is c:\inetpub was meant as one commandto see wether there is a configuration problem that hinders php from loading e.g. an extension
In my example I assumed the scripts are in c:\inetpub\php and the root-dir is c:\inetpub
Code: Select all
"c:\program files\php\php.exe" -i c:\inetpub\php\myScript.phpCode: Select all
<path to php-exe> -i <path to script>hi
I dont know if this is the right way
In the PHP.ini file i did the following change
instead of
doc_root = C:\Inetpub\wwwroot
I put in this
doc_root = http://localhost/
so now nomatter where my alias folder is it works
if this is wrong please do let me know.
BUt i got it working tough
I dont know if this is the right way
In the PHP.ini file i did the following change
instead of
doc_root = C:\Inetpub\wwwroot
I put in this
doc_root = http://localhost/
so now nomatter where my alias folder is it works
if this is wrong please do let me know.
BUt i got it working tough
- KissMyBrain
- Forum Newbie
- Posts: 2
- Joined: Tue Jun 03, 2003 2:22 pm