Page 1 of 1

[Solved] Homepage flooded with WARNING-message

Posted: Thu Feb 04, 2010 10:35 pm
by jonaskellens
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...

Re: Homepage flooded with WARNING-message

Posted: Fri Feb 05, 2010 12:16 am
by Xsecrets
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.

Re: Homepage flooded with WARNING-message

Posted: Fri Feb 05, 2010 12:47 am
by jonaskellens
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 ?

Re: Homepage flooded with WARNING-message

Posted: Fri Feb 05, 2010 2:04 am
by Xsecrets
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

Re: Homepage flooded with WARNING-message

Posted: Fri Feb 05, 2010 3:14 am
by Qphoria
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

Re: Homepage flooded with WARNING-message

Posted: Fri Feb 05, 2010 4:15 am
by jonaskellens
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...

Re: Homepage flooded with WARNING-message

Posted: Sat Feb 13, 2010 1:39 pm
by gaidin
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