Jump to content

Multiple issues uploading images


tc_855
 Share

Recommended Posts

I was just working on my project which had no issues at all before and when I saved a page I saw a small error box that said "destinationPath is not writable [images]"

So I change the permissions in my asses/files folder to 7-7-7 and that fixed it.

However when I went to create a new item I was not able to upload any images. In my console I noticed the error

Call to undefined function imagecreatefromjpeg() 

Can someone help me understand why that is?

Link to comment
Share on other sites

Thanks for the reply.

I have full control over the server. I checked and couldn't find anything related to GD or GD2 in the phpinfo dump. I'll try to install it myself.

But why would it have worked in the past and just stop working now?

Link to comment
Share on other sites

If it was working before, it sounds like some change occurred at the server where the file permissions got wiped out and the PHP version changed (to one with GD?). 

Link to comment
Share on other sites

  • 3 weeks later...

hmm. I'm going to jump in here to add that this seems to be intermittant on my custom from src setup. (PHP 5.5.1/ php-fpm / Nginx 1.4.2)

GD is compiled and working.  GD2 is not compiled. 

Uploaded files ARE present in the proper site/assets/files folder.. (actually 2 files for each pic.)

Permissions are 0777 recursively . 

Error.txt shows >  Call to undefined function imagecreatefromjpeg() (line 179 of /var/www/vhosts/001/wire/core/ImageSizer.php)

Image can't be found to insert into the page.  message says 'There are no images present on this page' 

Any suggestion as to further debugging ?

I'm new to processwire and perhaps I'm not grasping this process, however, I was able to get this to work once with an existing page, but not now.

jacksprat

Link to comment
Share on other sites

Hi jacksprat,
 

...
GD is compiled and working.  GD2 is not compiled. 
 
...
 

Error.txt shows >  Call to undefined function imagecreatefromjpeg() (line 179 of /var/www/vhosts/001/wire/core/ImageSizer.php)
 
...


GD is not working! because the GD-function imagecreatefromjpeg isn't defined / available in server setup.

Please check / enable GD-library for PHP.
 

  • Like 1
Link to comment
Share on other sites

Update:  fixed using  --with-jpeg-dir=/usr/lib64 \ as a directive for the compiler.

["JPEG Support"]=> bool(true)

------               ------               ------               ------               ------               ------               ------               ------               ------               

Hello Horst ,

php -v shows that it's compiled and enabled.  Since php was built from source, I made sure.  

I've done more testing and found there are no issues with gif's -  only jpg's.  

Doing a var_dump(gd_info)); shows that Jpg support is not enabled.   I'll recompile and try another setting I found.  Thanks !                                           

array(11) { ["GD Version"]=> string(26) "bundled (2.1.0 compatible)" ["FreeType Support"]=> bool(false) ["T1Lib Support"]=> bool(false) ["GIF Read Support"]=> bool(true) ["GIF Create Support"]=> bool(true) ["JPEG Support"]=> bool(false) ["PNG Support"]=> bool(true) ["WBMP Support"]=> bool(true) ["XPM Support"]=> bool(false) ["XBM Support"]=> bool(true) ["JIS-mapped Japanese Font Support"]=> bool(false) }
  • 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

  • Recently Browsing   0 members

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