Link to home
Create AccountLog in
PHP

PHP

--

Questions

--

Followers

Top Experts

Avatar of PeterJanssens
PeterJanssens

PHP Windows - "no input file specified error" - virtual directory
I install PHP on Windows Server 2003.
Everything works fine with pages under the root dir (d:\inetpub).
But I get the error "non input file specified error" when trying to execute PHP in a virtual directory.
Somebody made the remark to change from CGI to ISAPI version? Is this the solution? ISAPI is still considered as risky, as mentionned in the install instructions.

Thx in advance, Peter.

Zero AI Policy

We believe in human intelligence. Our moderation policy strictly prohibits the use of LLM content in our Q&A threads.


Avatar of Richard QuadlingRichard QuadlingπŸ‡¬πŸ‡§

The ISAPI version allows persistent database connections which is a good thing if your app has a LOT of DB scripts.

The CGI version does have the constant loading/unloading overhead to deal with, but is a separate thread.

Personally, IIS is the issue. Drop IIS and use Apache or Sambar Server. Both are free. I use Sambar (and have done for MANY years). The only stability issue is with poorly written PHP code. And only during testing. Once testing is complete, I use PHP and Delphi based ISAPI dlls quite happily.

Our customer support team can install Sambar Server, PHP and our webapp in about 10 minutes. Getting IIS up and going is a real pain, especially when they have someone on site who has played with it and not sure what they've done.

To answer your question though, I suspect that the virtual directory needs to be told that php files are to be handled by the PHP executable or ISAPI filter.

Richard.

Avatar of PeterJanssensPeterJanssens

ASKER

I changed CGI version to ISAPI version, and the problem was solved, although I do not know why.

ASKER CERTIFIED SOLUTION
Avatar of Richard QuadlingRichard QuadlingπŸ‡¬πŸ‡§

Link to home
membership
Log in or create a free account to see answer.
Signing up is free and takes 30 seconds. No credit card required.
Create Account

It is the setting for doc_root php.ini that causes it.

If you set it to be doc_root php.ini = "[Drive-Letter]:\YourWebPath\" or comment it ;doc_root php.ini = it solves the problem..
(Yes and ofcourse restartt IIS - that are easiest done with cmd line -> iisreset /RESTART Β )

Br
Β  -JD

Reward 1Reward 2Reward 3Reward 4Reward 5Reward 6

EARN REWARDS FOR ASKING, ANSWERING, AND MORE.

Earn free swag for participating on the platform.


Hmm,.. sorry - slip of the pen:

Β  doc_root IN THE php.ini file and set it to be doc_root = ... IN THE php.ini file works a bit better..

:P

And also: read documentation regarding security..

Br
Β -JD

Avatar of PromethylPromethylπŸ‡ΊπŸ‡Έ

This solution helped me as well. (Removing the line, not fixing the pathing. Do you have to escale the backslashes?)

Commenting out the doc_root worked for me! Thanks!

Free T-shirt

Get a FREE t-shirt when you ask your first question.

We believe in human intelligence. Our moderation policy strictly prohibits the use of LLM content in our Q&A threads.


I am running w2k8 R2 and am having the same issue tried commenting out the php.ini doc_root no lock any pointers ???

Avatar of Richard QuadlingRichard QuadlingπŸ‡¬πŸ‡§

Wow. What a long time ago and how things have changed.

Now, IIS7+FastCGI+PHP using FastCGI is the way to go.

Very reliable. Officially supported by Microsoft (for those that must have that).

All in all, a much better setup than ISAPI or standard CGI.

And with Microsoft's Web Platform Installer being able to install FastCGI _AND_ PHP all from IIS, it really couldn't be easier for Windows users.

PHP

PHP

--

Questions

--

Followers

Top Experts

PHP is a widely-used server-side scripting language especially suited for web development, powering tens of millions of sites from Facebook to personal WordPress blogs. PHP is often paired with the MySQL relational database, but includes support for most other mainstream databases. By utilizing different Server APIs, PHP can work on many different web servers as a server-side scripting language.