Jump to content

problem with image upload


diogo
 Share

Recommended Posts

I'm having a strange problem when uploading images. when they are bigger then 10kB (some even under it) the upload hangs in 100% and nothing else happens. The Files are present on that page directory but not added to the database. What can be happening?

edit: this is solved now.

Edited by diogo
Link to comment
Share on other sites

The error I got from the server is undefined function imagecreatefromjpeg() || imagecreatefrompng() || imagecreatefromgif(), on the file ImageSizer.php

edit: ok, here a strange thing. I disabled JS on the browser, uploaded the image, saved the page, and got the exact same error. then I enebled javascript again, and the image was there on the page...

edit2: I disabled the "Display thumbnails in page editor?" option on the images field, and the uploads and was able to upload images with js enabled. Then I enabled the thumbnails option again, and had the same error, but now just by opening the page editing page. Clearly there is an error everytime imagecreatefromjpeg() and the others are called.

edit3: I was expecting already, but tried it anyway just to be sure, and this also shows the same error:

foreach($page->images as $i){
echo $i->width(300)->url;
}

edit4: one more edit. Everytime I visit the page one image is resized and an error is shown. So, is I keep refreshing the page, one more url is echoed, until all the files were created. So, the resizing works before the error stops the script.

edit5: Solved! I installed the PHP GD Library, and everything works now. Strange thing is that this problem started suddenly, things used to work before and I didn't make any change to the server... well, how do I mark this as solved?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...