Running PHP as CGI
October 26th, 2006
I’m new to PHP running in Safe Mode, but since I started using Media Temple for a client I have had to take some time to understand the common workarounds. For those of you unfamiliar with PHP Safe Mode, it locks script permissions down tightly and only allows a script to execute or modify a file it “owns”. This means that many of the tasks typically run from a browser that modify the file structure of a Web site are no longer possible.
Thankfully, PHP allows users to set up a PHP as CGI folder and run the scripts from that folder with full permissions to access the site’s directory structure. Exactly why this is more secure escapes me. Larry Ullman’s forum has an interesting thread discussing exactly how to set this up.
There’s also a useful article in Media Temple’s knowledge base.
Entry Filed under: PHP/MySQL Snippets






