Post by jonaskellens » Thu Feb 04, 2010 10:35 pm

This is the message that floods my homepage :
Warning: imagejpeg() [function.imagejpeg]: SAFE MODE Restriction in effect. The script whose uid is 10836 is not allowed to access /var/www/vhosts/domain.tld/subdomains/webstore/httpdocs/image/cache/data owned by uid 48 in /var/www/vhosts/domain.tld/subdomains/webstore/httpdocs/system/library/image.php on line 43
Warning: imagejpeg() [function.imagejpeg]: Invalid filename in /var/www/vhosts/domain.tld/subdomains/webstore/httpdocs/system/library/image.php on line 43
This is the function in image.php :

Code: Select all

    public function save($file, $quality = 100) {
        $info = pathinfo($file);
        $extension = $info['extension'];
   
        if ($extension == ('jpeg' || 'jpg')) {
            imagejpeg($this->image, $file, $quality);
        } elseif($extension == 'png') {
            imagepng($this->image, $file, 0);
        } elseif($extension == 'gif') {
            imagegif($this->image, $file);
        }
		   
	    imagedestroy($this->image);
    }	    
Why is imagejpeg() reporting this message ? Is this a bug ?

I would like to add that the directory image/cache/data is chmod with 777 but no change...

Newbie

Posts

Joined
Thu Feb 04, 2010 6:32 pm

Post by Xsecrets » Fri Feb 05, 2010 12:16 am

seems you have a very strange server setup. safemode is on in php (as if the provider cares about security), but it's not using suphp so that the server process is not running as the user. This is a host configuration issue.

OpenCart commercial mods and development http://spotonsolutions.net
Layered Navigation
Shipment Tracking
Vehicle Year/Make/Model Filter


Guru Member

Posts

Joined
Sun Oct 25, 2009 3:51 am
Location - FL US

Post by jonaskellens » Fri Feb 05, 2010 12:47 am

Hosting company has turned safe mode 'off'. Error has disappeared.

A second warning that I'm confronted with :
Content Encoding Error
The page you are trying to view cannot be shown because it uses an invalid or unsupported form of compression.
Using firefox 3.0.15 on Fedora 10.

Have cleared the cache of my browser and restarted, and everything went well for a couple of minutes.

Now I have the same notice again and can't get rid of it !

Any suggestion ?

Newbie

Posts

Joined
Thu Feb 04, 2010 6:32 pm

Post by Xsecrets » Fri Feb 05, 2010 2:04 am

look in your error log in the admin. That error comes up when there is a php error instead of displaying it for some reason in 1.4.0

OpenCart commercial mods and development http://spotonsolutions.net
Layered Navigation
Shipment Tracking
Vehicle Year/Make/Model Filter


Guru Member

Posts

Joined
Sun Oct 25, 2009 3:51 am
Location - FL US

Post by Qphoria » Fri Feb 05, 2010 3:14 am

To bypass the content error, you can set the compression level to 0 instead of 4 in the settings "server" tab. That will show the page with the real error as well. I think this started in 1.3.4

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by jonaskellens » Fri Feb 05, 2010 4:15 am

Don't know why the Firefox-error occured the first time, but now apparently it appeared because I had deleted all the standard images that come with a fresh installation.
I needed to delete all the product-specifications as well...

Newbie

Posts

Joined
Thu Feb 04, 2010 6:32 pm

Post by gaidin » Sat Feb 13, 2010 1:39 pm

Qphoria wrote:To bypass the content error, you can set the compression level to 0 instead of 4 in the settings "server" tab. That will show the page with the real error as well. I think this started in 1.3.4
Thanks that worked.

now all i need is a fix for image manager

Newbie

Posts

Joined
Sun Jul 26, 2009 5:44 pm
Who is online

Users browsing this forum: Baidu [Spider] and 31 guests