Login   Register  
PHP Classes
elePHPant
Icontem

Folder not writable

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us

      Watermark  >  All threads  >  Folder not writable  >  (Un) Subscribe thread alerts  
Subject:Folder not writable
Summary:errors say cache folder cannot be wrote to, chmoded to 777
Messages:4
Author:Thomas Deacey
Date:2007-05-10 04:13:58
Update:2009-12-23 16:02:03
 

  1. Folder not writable   Reply   Report abuse  
Picture of Thomas Deacey
Thomas Deacey
2007-05-10 04:13:58
Ive set my folder cache to chmod 777 and still recieve the error :

You do not have permission to write in this folder!

any idea what might be causing this?

also will this function allow the images to be printed within a page?
ive tried a few others and it seems to only work as a popup where no other code exist before the watermark function.

thx

  2. Re: Folder not writable   Reply   Report abuse  
Picture of Pollus
Pollus
2009-05-20 09:17:13 - In reply to message 1 from Thomas Deacey
On line 127 in the funtion save_photo() there a mistake has been made.

Change
header('Content-type: image/'.($this->ext == '.jpg' ? 'jpeg' : substr(1,$this->ext)));

to

header('Content-type: image/'.($this->ext == '.jpg' ? 'jpeg' : substr($this->ext,1)));

  3. Re: Folder not writable   Reply   Report abuse  
Picture of Pollus
Pollus
2009-05-20 10:15:34 - In reply to message 2 from Pollus
actually, change the whole funtion save_photo to:

function save_photo(){
imagesetthickness($this->photo,1);
if($this->browser) {
header('Content-type: image/'.($this->ext == '.jpg' ? 'jpeg' : substr($this->ext,1)));
header('Content-Transfer-Encoding: binary');
header('Content-Disposition: inline; filename='.basename($this->file));
header("Cache-control: private");
switch($this->ext){
case ".jpeg":
case ".jpg":
imagejpeg($this->photo, NULL , 85 ) or die ( 'no image' );
break;
case ".gif":
imagegif($this->photo) or die ( 'no image' );
break;
case ".png":
imagepng($this->photo) or die ( 'no image' );
break;
}
} else {
switch($this->ext){
case ".jpeg":
case ".jpg":
imagejpeg($this->photo, "$this->path$this->file", 85 ) or die ( 'You do not have permission to write in this folder!' );
break;
case ".gif":
imagegif($this->photo, "$this->path$this->file" ) or die ( 'You do not have permission to write in this folder!' );
break;
case ".png":
imagepng($this->photo, "$this->path$this->file" ) or die ( 'You do not have permission to write in this folder!' );
break;
}
}
$this->outfile=$this->path.$this->file;
$this->file=strrchr("/",$this->file);
}

  4. Re: Folder not writable   Reply   Report abuse  
Picture of ahmad tobroni
ahmad tobroni
2009-12-23 16:02:03 - In reply to message 3 from Pollus
Hy, i want to display image after mark with 100x100, how it?