using non-safe mode (having read FAQ)

rightee

Joined: 2002-09-10
Posts: 1
Posted: Tue, 2002-09-10 16:33

Hi,

I know there is a post in faq about this, but my requirements are different and I can't see how to do it.

My site manager quotes this in their faq:

-The PHP engine is compiled as a safe mode enabled Apache module. This makes
-it execute PHP scripts extremely quickly and safely. If the safe mode is too restrictive
-for your requirements, eg: you want to create a file upload script, then the php cgi
-engine can be used instead. To run the slower cgi version of PHP your php file should
-end in .cgi and include at the top of the file the line:
#!/usr/bin/php

Now, I have no access to root directory to change anything but I have created
a php-cgi directory containing gallery. In the php-cgi gallery I have put a .htaccess
file :

AddType application/cgi-php php
Action application/cgi-php /usr/bin/php

But now I this doesn't allow gallery to work at all.... (forbidden)
(or it just loads up the index.html file located at root)
Is there any way I can get gallery to work?
(Perhaps I can rename everything cgi and add that reference to files??!)

Thanks

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Wed, 2002-09-11 02:30

It will be prohibitively difficult for you to attempt to modify all your .php files.

Using the .htaccess trick is the right way to go. Try copying the php binary into your cgi-bin directory and changing the path in the .htaccess file so that it searches for it there.