Login     Sign up
function.imagecreatefrompng failing to resize
JLinux (@geyids)
Join date: Oct 17th 2010
Community posts: 6
View Profile
Send Message

somebody help me with this error pleeaaaase. It happens when I upload any image png, jpg, gif....! you can find the error on www.eadating.com after creating an account. Please help

Warning: imagecreatefrompng() [function.imagecreatefrompng]: open_basedir restriction in effect. File(C:\php\temp\upload_data\php5CDA.tmp) is not within the allowed path(s): (C:\Domains) in path\includes\libs\resizeimage.inc.php on line 129

Warning: imagecreatefrompng(C:\php\temp\upload_data\php5CDA.tmp) [function.imagecreatefrompng]: failed to open stream: Operation not permitted in path\includes\libs\resizeimage.inc.php on line 129
This is not a pic:C:\php\temp\upload_data\php5CDA.tmp

172 months ago
Jcow Master (@falcone)
Join date: Sep 2nd 2010
Community posts: 917
View Profile
Send Message

here read this one.

[url]http://www.kavoir.com/2009/06/php-open_basedir-in-phpini-to-limit-php-file-accesses-to-a-certain-directory.html[/url]

your problem is that the script cannot acces the tmp dir.

172 months ago
JLinux (@geyids)
Join date: Oct 17th 2010
Community posts: 6
View Profile
Send Message

Thanks falcone for the link. Is there a way I can overight that using ini_set?? something like

<?php ini_set('open_basedir', 'different_path\tmp'); ?>

172 months ago
Jcow Master (@falcone)
Join date: Sep 2nd 2010
Community posts: 917
View Profile
Send Message

i think it depends on you host. Maybe you can contact the support (of your host) and ask them how to solve this issue.

172 months ago
JLinux (@geyids)
Join date: Oct 17th 2010
Community posts: 6
View Profile
Send Message

thanks man let me do that

172 months ago