Quantcast
Viewing all articles
Browse latest Browse all 3

Answer by Mo. for Can't execute index.php in root folder when PHP is installed as CGI binary

You have a few options. If mod_rewrite is switched on, you can use that to rewrite requests to a path in your /cgi-bin/. $_SERVER[] will still contain the original request URI so that you can conditionally perform actions based on the requested path.

Alternatively, if you’re dead set on using .htaccess to enable PHP files to be executed anywhere (which might not even be possible—httpd.conf specifies, via the AllowOverride directive, what .htaccess files can and can't do), then create a PHP file containing

<?php
phpinfo();

and place it in your cgi-bin directory, it will tell you all of the relevant details about that installation of PHP, (which should include the location of the php-cgi executable).


Viewing all articles
Browse latest Browse all 3

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>