icon Get the most out of Surmunity, read our tips here! Need an interesting blog to read? You've got to read the Surpass Blog! | Welcome! Please register to access all of our features.
Old May 13th, 2004, 11:28 AM   #1 (permalink)
Registered User
Fresh Surpasser
 
Joined in May 2004
2 posts
Gave thanks: 0
Thanked 0 times
phpCGIwrap

Hi there, i'm interested in you shared hosting plan, i would to know if you can setup phpCGIwrap by default on my account; i must run some php scripts with write permissions on file system.

Thanks
blank is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old May 13th, 2004, 10:42 PM   #2 (permalink)
the one who was
Super #1
 
patrickb's Avatar
 
Joined in Jul 2003
Lives in Memphis
1,967 posts
Gave thanks: 0
Thanked 3 times
You can actually do this yourself. PHP runs under the user nobody by default, so you would have to chmod all of your directories you need to write to 777 if you wanted to use the default.

The method to make PHP run under your username is as follows:

In your public_html folder, place a .htaccess file with the following...

Quote:
Options All -Indexes
AddType application/x-httpd-phpz .php
Action application/x-httpd-phpz /home/username/public_html/cgi-bin/php
Then, in your /public_html/cgi-bin/ directory, make a file called php and place the following in it...

Quote:
#!/usr/bin/perl -w
print `/usr/bin/php`;
Make sure that the /cgi-bin/php is chmodded 755. This essentially creates a CGI wrapper for php that will allow it to execute in your username. Just be careful with your coding. One little exploit would give someone complete access to your entire site, which is the same with CGI.
__________________
Patrick

Warnings: The program(s) might crash unexpectedly or behave otherwise strangely. (But of course, so do many commercial programs on Windows.) --www.gimp.org
patrickb is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules
You may post new threads
You may not post replies
You may post attachments
You may edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On