PhpStorm's localhost: "No input file specified"

I installed PHP via XAMPP, then I set the PHP CLI in PhpStorm.

I created a basic index.php file, clicked in the menu Run → Run... → Selected the local server, a new tab opens with the address to this file, and → A page with "No input file specified" opens.

Note that this problem is new and didn't occur before.

 

Thanks for helping!

0
9 comments

Can someone help me fix this, please?

0

What's in your index.php? Did you check some of SO replies, e.g. https://stackoverflow.com/questions/14555996/no-input-file-specified ?

0

Hey. Thanks for replying!

I didn't find this answer while Google searching.

But, this answer is irrelevant for me, as I try to set up a local server using PhpStorm, therefore I'm not depending on an external server.

In other words, I can edit the "php.ini" file, but this answer isn't about modifying this file - only the .htaccess file, so I don't really need the answer.

0

Is there a solution to the problem?

0

Well, the error message "No input file specified" is pretty vague and there's no known PhpStorm issue related to it: it looks like there's just some misconfiguration with your site.

Since that just a XAMPP installation - try to open that file/page from a browser e.g. localhost:<xampp_apache_port>/<some_path_if_needed>/index.php

0

I did try to use XAMPP. I ended up with a partial success - the PHP engine IS working, but only when it's in the directory (can be subdirectory) of C:\ xampp\ hctocs .

I want to automatically backup the project in OneDrive, but then I get 2 errors:

Warning: Unknown: failed to open stream: No such file or directory in Unknown on line 0

Fatal error: Unknown: Failed opening required 'C:/Users/avi12/OneDrive/Documents/PhpStorm/avi12/index.php' (include_path='C:\xampp\php\pear') in Unknown on line 

 

And yet, I have no single line of PHP code in the index.php.

0
Avatar
Permanently deleted user

C:\xampp\htdocs is the web root of the XAMPP, the whole bundle including Apache is configured to use it like that.

Not sure about OneDrive folder - you might try to configure XAMPP so it would see it as a virtual host location.

0

Is there a way to use PhpStorm's local PHP server without using XAMPP, while also not getting the error that's mentioned in the title?

0
Avatar
Permanently deleted user

In my case, there was a problem when the project path contained korean(or Chinese, Japanese).

0

Please sign in to leave a comment.