0

So I have downloaded mongoose-5.0.exe on my Win7.

I followed the How to setup PHP from here and copied php-cgi.exe and php5.dll to my root directory and set the config files:

mongoose.conf

cgi_interpreter C:\Projects\Netio\php-cgi.exe
cgi_pattern **.cgi$|**.lp$|**.php$
document_root C:\Projects\Netio
listening_port 80
error_log_file errors.log

php.ini

short_open_tag = On
max_execution_time = 30
max_input_time = 10
memory_limit = 16M
display_errors = On
display_startup_errors = On
log_errors = Off
html_errors = Off
magic_quotes_gpc = Off
doc_root = "C:\Projects\Netio"
extension_dir = "C:\Projects\Netio"

index.php

<?php echo "Hello";?>

However, the browser tells me that there is no response from index.php. Static html is displayed correctly and 127.0.0.1 pings well. Have I missed anything?

1 Answer 1

0

enclose your PHP code with HTML tags and try again

<html> <?php.... ?> </html>

Also, make sure your PHP extension dir is correctly specified. Usually when you extract PHP, it contains "ext" dir, and i can see you are pointing to the main PHP folder in your extension parameter in php.ini

Side note: I am using the free version of Mangoose 6.5, and for me it wont open any PHP file, except file named index.php.

1
  • It could be that doc_root can't be the same as cgi_interpreter dir. I ended up using mongoose 4 package where the doc_root was a subdir of cgi_interpreter. It worked and php.ini was absent there, so it is irrelevant for cgi I guess. I made no further investigations, since the mongoose 4 works for me "as is".
    – Jan Turoň
    Dec 20, 2016 at 12:19

You must log in to answer this question.

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