PDA

View Full Version : Cant upload images to existing listing via Admin Panel



PGGO
May 6, 2012, 03:43 AM
I was trying to add images to existing listing via Admin Panel; however, the image does not show up at all.
So, I looked in database, and found the image link is broken.
Please refer to the snapshot in attachment.

Chris Brown
May 6, 2012, 09:55 AM
i get similar things happen occasionally, i just havent got round to getting it sorted yet.

I have found that it will upload the images that are under the stated upload amount fine but the ones that dont show up on mine seem to be the larger images in pixels rather than mb size.

Mike
May 7, 2012, 07:37 AM
Hi all,

Most possible reason of the issue is that image is big - Chris is right resolution in pixels affects lot to it not size in mb.
So server doesn't have enough memory to handle it: there are some resize processes which require a lot of server memory.
Try to enlarge memory_limit option of the server, and it will work. Better to set it to 256Mb or 512.

If you still have the problem after this please submit a ticket we will look into the problem.

John
May 10, 2012, 03:29 AM
Hello Chris,
Mike explained the problem great but forgot to specify where you can change the memory_limit PHP option.
BTW I recommend changing a few options more to be sure that the upload function will work correctly:

memory_limit = 512 MB or higher
post_max_size = 32 MB or higher
upload_max_filesize = 4MB or higher

All options set in php.ini file which can be placed in different directories on your server, to get know where exactly
it locates you should go to your Flynax Admin Panel and click "System Info" button in header, PHP Info page
will appear, there you should search for 'Configuration File (php.ini) Path' option and save value*.
Now you know where the php.ini file locates, if you can access and edit this file then just change option values directly inside,
if you can't access it then copy* php.ini file to /FLYNAX_ROOT/libs/upload/ directory and change option values there.

* default value for this option is: /usr/local/lib/php.ini
* here the simple php script which will help you to copy php.ini file to proper directory mentioned above.
just unzip the copyini.php file to FLYNAX_ROOT directory and call from your browser.

John

PGGO
February 6, 2013, 04:30 PM
Hi all,

If you still have the problem after this please submit a ticket we will look into the problem.


Hi Mike,

I found the problem source, but have no idea on how to fix it.

The problem is in the image Extensions (.jpeg; .jpg; etc.) rather than server side configurations.
Flynax script does not recognize Upper case image extension.

Example:
Images use both Lower and Upper case extensions, such as .jpg and .JPG
So, every time you upload image ending with .JPG; it will not appear on listing page due to broken link in data base.


Any advice how to fix this issue?

autocy
February 7, 2013, 07:45 AM
Haven't checked it but as far as i know the script resizes and renames the upload images automatically so maybe this is not the problem. Except if you are talking about images uploaded through FTP in which case you can fix it by renaming them before upload :) It's ok to have images with upper case extensions in windows but not in linux..

PGGO
February 7, 2013, 08:09 AM
Hi autocy,

I’m using Linux server, but I still believe it’s a Flynax script bug rather than server type.


However, can you please run the test on Windows server, and tell us the results?

autocy
February 9, 2013, 02:00 PM
Hi PGGO,
I'm using Linux too but it works on my site. i just added a listing and uploaded a .JPG extension image and it works.. What's in the database? can you paste the broken listing here?

Chris Brown
February 9, 2013, 02:48 PM
I dont know if this helps but i had issues originally, but now its all fixed. I was getting broken links for really large images being uploaded. Image was uploading but not creating the thumbnails and large images. My site was showing 32M for image resizing but php info was showing 512m, i had an ini_set memory limit added.....i dont know where but flynax fixed it and i have had no issues since.

PGGO
February 9, 2013, 07:36 PM
I have 2 Flynax sites, and I just noticed that one of them is working just fine with no issues.

I set my server configurations higher than John suggests:
memory_limit = 1024 MB or higher
post_max_size = 256 MB or higher
upload_max_filesize = 8MB or higher


After the test, one of my sites still does not upload images ending with upper case extension (.JPG)
All thumbnails and large images links are broken and does not appear on listing details page.

The images size was only 105 KB