Jump to content

Can't upload images to a page


Miguel
 Share

Recommended Posts

Hi,

I've just started learning ProcessWire. Something seems plain but doesn't work as I expect, images e.g.

I checked out that home template has images field, then I edited a home page based on that template and tried to upload an image. I selected a file then clicked submit and the file name appeared in the image field. Only filename appeared, but not a thumbnail. When I pressed save button I got a success message but in the image field the filename disappeared and there was no image too. It goes same way if I grag and grop image file.

What should I fix to upload images to a image field?

ps

I run ProcessWire with Nginx, could it be the cause of broken image upload?

Link to comment
Share on other sites

Thanks, diogo.

I've read already that post when I've been installing pw.

I found a record in site/assets/logs/errors.txt

2012-10-03 12:45:27	admin http://processwire/processwire/page/edit/ Error	Call to undefined function imagecreatefrompng() (line 135 of /var/www/processwire/wire/core/ImageSizer.php)

Now I think that error relates to GD2 library. I remember I had installation issues when setting up wp.

How can I verify that GD2 is installed properly?

update

get phpinfo() on the page and didn't find GD Version and GD Support params in it. Guess that means that I compiled php with no GD support.

Link to comment
Share on other sites

... can you go to your assets folder and check if the images are on the folder with the same number as the page?

Yes! There are original image and generated(?) ones

2012-09-16-171852_889x1024_scrot.0x100.png
2012-09-16-171852_889x1024_scrot-1.0x100.png
2012-09-16-171852_889x1024_scrot-1.png
2012-09-16-171852_889x1024_scrot.png
Link to comment
Share on other sites

Tried to purge then to install back php5-gd package. Still have no GD Version, nor GD Support entries in phpinfo output.

I compiled PHP5 with only option --with-mysqli=/usr/bin/mysql_config as defautl package doesn't support mysqli

> php -i|grep -i configure
Configure Command => './configure' '--with-mysqli=/usr/bin/mysql_config'

Could you supply me with options to compile php right way?

ps

I'm new to php, I'm on ubuntu 10.04

pps

see phpinfo in the attached phpinfo.pdf

Link to comment
Share on other sites

You don't have to compile it! Apparentl. nginx needs php-fpm. Install it via apt-get. I'm on mobile, so i can't help you more than this. But search on Google for any tutorial on how to install nginx and php on ubuntu. It should be something like:

apt-get install php-fpm

  • Like 1
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

×
×
  • Create New...