Doesn't work on my linux !

See all posts See thread Reply

Re: Doesn't work on my linux ! new!
by lovighi, 12 years, 4 months ago
I try again with this sample, it don't work...

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>

Reply
Re: Doesn't work on my linux ! new!
by colin, 12 years, 4 months ago
What does the complete log say? Do you have errors in Apache (or your webserver)?Reply
Re: Doesn't work on my linux ! new!
by lovighi, 12 years, 4 months ago
Apache didnt say anything about this, nothing happen, no errors in apache, no errors in my browser.

All my other php errors are displayed...really dont know what happenReply
Re: Doesn't work on my linux ! new!
by colin, 12 years, 4 months ago
Copy here the complete log produced by the class. ry with a small image file, to be sure that the memory is not an issue.

I develop the class on Debian, so it must work.Reply
Re: Doesn't work on my linux ! new!
by lovighi, 12 years, 4 months ago
yes, the class worked on my other deb install...

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
Re: Doesn't work on my linux ! new!
by lovighi, 12 years, 4 months ago
generated by $foo->log;Reply
Re: Doesn't work on my linux ! new!
by colin, 12 years, 4 months ago
Do you have anything in $foo->error?Reply
Re: Doesn't work on my linux ! new!
by lovighi, 12 years, 4 months ago
nothing, i didn't have any return.

$foo->error seems to be not interpretedReply
Re: Doesn't work on my linux ! new!
by lovighi, 12 years, 4 months ago
Missing apache or php module ?Reply