Jump to content


This topic is now archived and is closed to further replies.


PHP Coding Error / Problem

Recommended Posts

Hi Guys,

I have got this upload image script, But it has an error, I have Chmoded the folder to 777, The folder I have chmoded to 777 is "companylogos"

Here is the errors I get

Warning: move_uploaded_file(\directory\stores\images\companylogos\ae4a9edc1338bbf4fc12cbb 4dc6f5f2c.gif): failed to open stream: Permission denied in /var/www/vhosts/matthewscomputerguide.com/httpdocs/directory/CMSAdmin/StoreManagement_DD.php on line 219

Warning: move_uploaded_file(): Unable to move '/tmp/phpd679qA' to '\directory\stores\images\companylogos\ae4a9edc1338bbf4fc12cbb4dc6f5f2c.gif' in /var/www/vhosts/matthewscomputerguide.com/httpdocs/directory/CMSAdmin/StoreManagement_DD.php on line 219

Warning: rename(): open_basedir restriction in effect. File(/directory/stores/images/companylogos/ae4a9edc1338bbf4fc12cbb4dc6f5f2c.gif) is not within the allowed path(s): (/var/www/vhosts/matthewscomputerguide.com/httpdocs:/tmp) in /var/www/vhosts/matthewscomputerguide.com/httpdocs/directory/CMSAdmin/StoreManagement_DD.php on line 64

Warning: Cannot modify header information - headers already sent by (output started at /var/www/vhosts/matthewscomputerguide.com/httpdocs/directory/CMSAdmin/StoreManagement_DD.php:219) in /var/www/vhosts/matthewscomputerguide.com/httpdocs/directory/CMSAdmin/StoreManagement_DD.php on line 74


I now know its path problem as I can't use the absolute paths. I have tried a few different paths but they seem to not work.

Could some one give me a hand. Thanks


Share this post

Link to post
Share on other sites
By looks of things the folder that you are moving the uploaded file to doesnt have the correct permissions set, that is you are retrieving that error

Share this post

Link to post
Share on other sites


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.