This topic is locked
[SOLVED]

 Problem when uploading Images

1/29/2017 6:08:58 PM
PHPRunner General questions
H
hernanccs author

Hello Guys
I'm having a problem when i try to upload an image (.JPG file) to my server.
My project is set to upload the image to a folder in the server and create a thumbnail on the fly.
When i create/edit a record and add an image (i see a thumbnail, file name and file size in the applet) then hit the save button the image field remains empty on the browser; but if i check the server the file is actually uploaded to the right folder and a th file is created with the image name, although the file size is 0 bytes. If i check the database using Navicat i can see that the image field in the database is empty.
If i try to create/edit a record and add an image, but instead of hitting the save button i hit the "Upload" link that is in the applet to add the file i get the following error SyntaxError: JSON.parse: unexpected end of data at line 1 column 1 of the JSON data; thje file is uploaded to the server and an empty th file is created.
Any idea how to solve this problem?
Thanks

Sergey Kornilov admin 1/30/2017

There are a few things you need to check:

  1. Write permissions are set on upload folder so files can be uploaded
  2. GD extension is enabled in PHP settings
  3. If you are trying to upload a large file make sure web server and PHP are configured to allow large files upload.
    Other ways to check your setup - test it locally using a built-in web server or on Demo Account.

H
hernanccs author 1/30/2017

Oh Yeah, i knew it was something stupid i was missing in the configuration of PHP...
i just edited php.ini and located ;extension=php_gd2.dll, removed the semi-colon, saved the file, restarted the apache service and done! the thumbnail creation started working again
Now i have to start troubleshooting why the project stop working on IIS 8.5 on server 2012 R2, i think after some Windows update installation
THANKS