0

I want to setup a web dev environment on my Windows 10 PC. On my 2nd hard drive (D:\WebDev) I have the following:

enter image description here

This is how my NginX is configured: http://pastebin.com/raw.php?i=JFSX6hfU

So, this is the contents of my start.bat file:

@ECHO OFF
set PATH=D:\WebDev\php-5.6.16;%PATH%

ECHO Starting...

RunHiddenConsole.exe D:\WebDev\php-5.6.16\php-cgi.exe -b 127.0.0.1:9000
RunHiddenConsole.exe D:\WebDev\php-5.6.16\php-cgi.exe -b 127.0.0.1:9001
RunHiddenConsole.exe D:\WebDev\php-5.6.16\php-cgi.exe -b 127.0.0.1:9002
RunHiddenConsole.exe D:\WebDev\php-5.6.16\php-cgi.exe -b 127.0.0.1:9003
RunHiddenConsole.exe D:\WebDev\php-5.6.16\php-cgi.exe -b 127.0.0.1:9004

RunHiddenConsole.exe D:\WebDev\mariadb-10.1.9\bin\mysqld --defaults-file=D:\WebDev\mariadb-10.1.9\my.ini --standalone --console

cd D:\WebDev\nginx-1.9.7 && START /B nginx.exe && cd ..

This was put together based on https://stackoverflow.com/questions/15819351/can-windows-php-fpm-serve-multiple-simultaneous-requests/33032959#=

When I run start.bat file, NginX and MariaDB is getting started (i've verified by visiting http://localhost and I can see the index.html being served) and I can connect to the MariaDB Server (mysql) with Navicat.

The only thing that isn't working is the PHP. Firstly, I cannot see any PHP processes in the task manager and when I visit phpinfo() page, I get the error:

No input file specified.

Any idea what might be wrong?

6
  • You're calling RunHiddenConsole.exe but is your start.bat script in the same directory as RunHiddenConsole.exe? Note, also, you've cd'd into your nginx folder at the very end of your start.bat, you may need to CD into wherever RunHiddenConsole.exe is
    – Kinnectus
    Commented Nov 27, 2015 at 18:04
  • Hi. See screenshot in the post. RunHiddenConsole.exe is in the same dir start.bat is in. It's working fine for mysqld. just not for php.
    – Latheesan
    Commented Nov 27, 2015 at 18:05
  • Yes, stupid me. My bad. Sorry!
    – Kinnectus
    Commented Nov 27, 2015 at 18:05
  • No problem. I even tried to launch the php-cgi manually in cmd (single instance on port 9000) and whilst it was running, I changed the nginx config and instead of using a upstream, explitly pointed to ip:port and started nginx to see if it works, it did not. Tested the same thing on windows 7 (works fine). I am running Avira antivirus, could this be blocking PHP somehow?
    – Latheesan
    Commented Nov 27, 2015 at 18:07
  • Try: stackoverflow.com/questions/48198/… - to find out if anything else is listening on the ports you've defined...
    – Kinnectus
    Commented Nov 27, 2015 at 18:10

1 Answer 1

1

After seeing you nginx.conf file in link above, I think the problem is that you do not define root under location ~ \.php$, Since you root directory is same in different locations you can define it once under server section.

So Edit nginx.conf move line:

root   D:/WebDev/projects/localhost;

under

server {
2
  • 2
    Please explain this. Do not respond in comments; edit your answer to make it clearer and more complete. Commented Nov 6, 2017 at 6:58
  • As you see the questioner put a link to his nginx.conf file above, I tell him to edit it
    – hubaishan
    Commented Nov 8, 2017 at 9:59

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .