Cannot use .PHP extensions

Cannot use .PHP extensions

by T H -
Number of replies: 2

Our university server does not allow the use of .PHP extensions (though it DOES run PHP).  I have used moodle for some time on my own server, though our department now wants to feed workshops using the web.  Considering this limitation of the server, can I still use MOODLE?  Is there a way to 'parse' so that the .PHP renames/runs as .CGI?

From the documentation @ the University:

"Perl scripts must have a .cgi or a .pl extension. PHP scripts must have a .cgi extension. Because you will be running PHP scripts in cgi mode, you cannot use a .php extension for PHP files.

For example, you might name your file myfile.cgi. If it is a Perl script, you could also name it myfile.pl . Don't name it myfile.html or the system will assume it is a standard HTML file and the code will not be interpreted. If it is a PHP script, the name myfile.php will not work properly either."

Any advice, suggestions are appreciated.

Thom Hanford

Average of ratings: -
In reply to T H

Re: Cannot use .PHP extensions

by Cory B -
This may/may-not work, but it's worth a try. You could put
"AddHandler cgi-script .php" in a .htaccess file and see if that works.
In reply to T H

Re: Cannot use .PHP extensions

by Chris Valentine -
> Because you will be running PHP scripts in cgi mode, you cannot use a .php extension for PHP files.

I wonder if that's a mis-interpretation on their behalf. Just because PHP is being run as a CGI instead of an Apache plugin, it doesn't mean PHP scripts can't be called .PHP.

Chris.