Reputation: 35
i'm having some trouble about uploading image on Magento CMS in all page/product. I've enabled erro log and i'll report it to check. NOTE: Only for post now, I have sobstitute my address domain with "mydomain.com". Only for sample.
[Sun Feb 02 15:02:14 2014] [error] [client 146.105.28.41] client denied by server configuration: /var/www/vhosts/mydomain.com/httpdocs/app/etc/local.xml
[Sun Feb 02 15:02:18 2014] [error] [client 146.105.28.41] client denied by server configuration: /var/www/vhosts/mydomain.com/httpdocs/app/etc/local.xml
[Sun Feb 02 15:02:36 2014] [warn] [client 151.67.115.48] mod_fcgid: stderr: PHP Warning: Unknown: open_basedir restriction in effect. File(/tmp) is not within the allowed path(s): (/var/www/vhosts/mydomain.com:/usr/share/php:/usr/share/pear) in Unknown on line 0
[Sun Feb 02 15:02:36 2014] [warn] [client 151.67.115.48] mod_fcgid: stderr: PHP Warning: File upload error - unable to create a temporary file in Unknown on line 0
Upvotes: 1
Views: 6883
Reputation: 57
You will need to add an open_basedir exemption for /tmp, turn open_basedir off entirely, or change the php temp directory to something within /var/www/vhosts/mydomain.com.
You can do the 3rd from within the Apache config:
<Directory /var/www/vhosts/mydomain.com/>
php_admin_value upload_tmp_dir /var/www/vhosts/mydomain.com/temp
</Directory>
Upvotes: 2
Reputation: 3242
Answers here did not work for me:
For me, the magento installation worked after I set the php.ini value sys_temp_dir
to a value within the open_basedir directory.
To be safe, I checked all tmp paths displayed in phpinfo()
and changed them like this:
<Directory /var/www/myvirtualhost>
php_admin_value upload_tmp_dir /var/www/myvirtualhost/tmp
php_admin_value soap.wsdl_cache_dir /var/www/myvirtualhost/tmp
php_admin_value opcache.lockfile_path /var/www/myvirtualhost/tmp
php_admin_value sys_temp_dir /var/www/myvirtualhost/tmp
</Directory>
Upvotes: 0