I have a query relating to chapter 13 (e-commerce site) and uploading files to a shared folder - and by passing safemode restrictions on my shared
domain hosting server (Media Temple) using an .htaccess file.
When running the php script to upload a shared file (add_print.php / script 13.2) - my browser generates the following error message:
Warning: move_uploaded_file(): SAFE MODE Restriction in effect. The script whose uid is 757 is not allowed to access /var/www/html owned by uid
0 in /abc/def/sitexyz/fst/var/www/html/website.com/administration/add_print.php on line 28
The advice from Media Temple is
"Unfortunately our alternate and sub domain features are not compatible with php power mode, instead an .htaccess file with the following contents
should be used:
Action php-script /interpreters/php-script
AddHandler php-script .php
and....
- Create a directory in which you'll place your php scripts that you want to have run in CGI mode. For this example, we'll use 'phpcgi'
In that directory, create a .htaccess file (KB article: What is an .htaccess file) with the following contents:
Action php-script /interpreters/php-script
AddHandler php-script .php
AddHandler php-script .php3
Any php scripts that you place in that directory will now be executed by cgi-mode php."
Ok, so I have placed a placed a file named '.htaccess.txt' in the administration folder where the add_print.php file also sits - with the required text.
My target - 'uploads' folder sits in the same root directory as the website folder (abc/def/sitexyz/fst/var/www/html/uploads)
-the paths appear to be correct.
But I'm still getting the error message. MT keep refering me to their FAQs - which aren't helping. Any suggestions on fixing this -
Many thanx!
d