Php inclusion error

when I try to access some php pages, I get this error:

Warning: Failed opening 'E:\websites\cms\index.php\admin\user\login\' for inclusion (include_path='.;C:\php\includes;C:\php\pear') in Unknown on line 0

I am using Windows xp+iis+php

I installed php at c:\php; there are two folders, includes (no files) and pear (many files) under c:\php

My php.ini is at c:\windows\system32.

a fragement of php.ini is:

include_path = ".;C:\php\includes;C:\php\pear"

Where did I make mistakes? Thanks

Thanks
LVL 1
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Commented:
The php page you are trying to access is in turn calling additional files that it cant find. This is probably going to be less about how php is installed and specifically related to the scripts your running and getting the errors from. Without knowing whats scripts they are running or seeing some code it will be tough to point out the exact cause.

0
Senior Performance EngineerCommented:
Hi tiger, you haven't made a mistake when installing php or the path to your pear libraries.

When you include your files in your php file, make sure that they are relative to the script.  If you are using a slash before the directory and file name (e.g. include("/mydirectory/myfile.php"), sometimes php could interpret this slash as an actual disk path.  Be sure to use something like this instead include("mydirectory/myfile.php").  Failing that then you need to ensure that your files that you are including actually exist.
0
Senior Performance EngineerCommented:
Oh, I've also just noticed that you have e:\websites\cms\index.php\admin\user\login\ as your path to the file that was being included.  This is interesting because there is a file called index.php in the cms directory, so how can a file have directories after it as in \admin\user\login\?  This could mean that you are calling a function similar to:

include($_SERVER["DOCUMENT_ROOT"].$_SERVER["PHP_SELF"]."/admin/user/login/");

or

include($_SERVER["PATH_TRANSLATED"]."/admin/user/login"); Now, I'm also not sure why the directory login is being called in the include. There should actually be a file in the login directory that the include is trying to locate, however your error above doesn't state what the file should be called. This is very strange. I've tried these functions out and both have produced very similar results to the one you have provided above and I get the error firstly because the files don't exist and also because the include is calling a directory after the file name. If you can find out what the file is called, I would rewrite the include to something like: include("/admin/user/login/login.php"); or something along those lines and then your script will be able to resolve it's path and retrieve the contents of that file for inclusion. Furthermore, if the absolute path is required then you could simply remove the$_SERVER["PHP_SELF"] part from the first bit of code above, eg:

Additionally, it is possible that the CMS you are using is not fully supported by windows due to the differences in directory calling.  In this case I would contact the developers of the scripts you are using and state the above error message.  It's possible that they could provide a fix, or there may already be one published on their forums.

Hope this helps.
0
Author Commented:
Hi Lhotch & ingwa,

I just realized it is probably because of URL rewrite. My program, EZ publish, is supposed to run in Apache, which has built-in URL rewrite support. However, due to our IT personeel cannot install Apache for us, I have to use IIS and I built my local machine the same config our server is.

It is really a big problem.
0
Senior Performance EngineerCommented:
Tiger, I have previously managed to successfully run php on IIS using the api or dll that php provides for integration.  Whilst this process is complicated to get perfect, it can be done.  However I hope that the above examples have helped you narrow down the issues with your include that you first stated.  As far as I see, PHP is correctly running, however to confirm this, there are three commands that I would recommend that you try in a test.php file.

Firstly, setup a file called phpinfo.php and include the following line in it:

<? echo phpinfo(); ?>

This should give you a very nicely formatted webpage which gives you a very detailed explanation on your php system and what is included in the libraries such as pear, GD, curl, etc.

Secondly, open up test.php as a blank text document and type in <? echo "hello"; ?>.  If this prints hello into the page when you browse it then the basics of php are correctly setup.

Finally, setup a file called test2.php and have this statement in it:

<? include("test.php"); ?>

This should have the same results as what you got in test.php.  If this runs correctly then I certainly don't see a problem with your php setup.  What I would further recommend is having a look at the IIS server error logs to see what the php api is sending to it.  These can be pretty useful in diagnosing problems with your scripts, or php setup.

Hope this helps.

0

Experts Exchange Solution brought to you by

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Senior Performance EngineerCommented:
Tiger, I'm happy to hear that you found some of my suggestions above useful.  Would it be possible to know what the solution was?  It could be helpful for other people in your situation to know exactly what helped, and would help my curiosity :)  Thanks for the points and for the grade.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
PHP

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.