class.upload.php is a powerful and mature PHP class to manage uploaded files, and manipulate images in many ways. The script is available under a GPL license.
I got a big problem on my debian server. class.upload doesn't work.
I got same code on my local windows and no problem, my code isnt wrong but when i push my sources on the server (on linux), i can't upload anything.
I've check : - php.ini (gd2 ok, memory_limit 128M,upload_max_filesize = 202M,post_max_size = 202M,max_execution_time = 60) - permissions on folders - tmp is writable - i got gd 2 activate,
I try to get some infomation with $foo->log and i have :
system information - class version : 0.31 - operating system : Linux - PHP version : 5.3.10-1ubuntu3.2 - GD version : 2.0 - supported image types : png jpg gif bmp - open_basedir : no restriction - upload_max_filesize : 202M (211812352 bytes) - language : en_GB source is an uploaded file
Told you, i gave all my logs, apache didnt say anything about it, just an error with my favicon.ico
I just have this :
system information - class version : 0.31 - operating system : Linux - PHP version : 5.3.10-1ubuntu3.2 - GD version : 2.0 - supported image types : png jpg gif bmp - open_basedir : no restriction - upload_max_filesize : 202M (211812352 bytes) - language : en_GB source is an uploaded fileReply
I got a big problem on my debian server. class.upload doesn't work.
I got same code on my local windows and no problem, my code isnt wrong but when i push my sources on the server (on linux), i can't upload anything.
I've check :
- php.ini (gd2 ok, memory_limit 128M,upload_max_filesize = 202M,post_max_size = 202M,max_execution_time = 60)
- permissions on folders
- tmp is writable
- i got gd 2 activate,
I try to get some infomation with $foo->log and i have :
system information
- class version : 0.31
- operating system : Linux
- PHP version : 5.3.10-1ubuntu3.2
- GD version : 2.0
- supported image types : png jpg gif bmp
- open_basedir : no restriction
- upload_max_filesize : 202M (211812352 bytes)
- language : en_GB
source is an uploaded file
source is an uploaded file is empty.
I dont know how to solve this problem...
include 'class.upload.php'; if (isset($_POST['ajouter_sponsor'])) { $foo = new Upload($_FILES['image_sponsor']); if ($foo->uploaded) { // save uploaded image with no changes $foo->Process('js'); if ($foo->processed) { echo 'original image copied'; } else { echo 'error : ' . $foo->error; } // save uploaded image with a new name $foo->file_new_name_body = 'foo'; $foo->Process('js'); if ($foo->processed) { echo 'image renamed "foo" copied'; } else { echo 'error : ' . $foo->error; } // save uploaded image with a new name, // resized to 100px wide $foo->file_new_name_body = 'image_resized'; $foo->image_resize = true; $foo->image_convert = gif; $foo->image_x = 100; $foo->image_ratio_y = true; $foo->Process('js'); if ($foo->processed) { echo 'image renamed, resized x=100 and converted to GIF'; $foo->Clean(); } else { echo 'error : ' . $foo->error; } } }<form action="" enctype="multipart/form-data" method="post" >
<label>Choisir une image</label>
<input type="file" name="image_sponsor">
<button type="submit" name="ajouter_sponsor">Ajouter</button>
</form>
All my other php errors are displayed...really dont know what happen
I develop the class on Debian, so it must work.
Told you, i gave all my logs, apache didnt say anything about it, just an error with my favicon.ico
I just have this :
system information
- class version : 0.31
- operating system : Linux
- PHP version : 5.3.10-1ubuntu3.2
- GD version : 2.0
- supported image types : png jpg gif bmp
- open_basedir : no restriction
- upload_max_filesize : 202M (211812352 bytes)
- language : en_GB
source is an uploaded file
$foo->error seems to be not interpreted