I am using some software built with php. Its for a car dealership website.
rpnmotorsinc.net
The problem is being able to upload images. If I upload most jpg or jpeg files, they usually upload with no problem. Since my client does not want to resize/resave images, he is wanting to take photos directly from his Canon camera to the computer to upload to website, again without having to resize or resave. These images range from 3 to 4 MB in size.
Here is the error message I receive while trying to upload these images:
Warning: exif_read_data(IMG_7B78AC-0BE18D-FEEBCB-6DED45-5C0BF2-780393.jpg): IFD data bad offset: 0xFFFFFD10 length 0x0ED42
The images seem to upload, but they throw errors and it seems to take a while to upload. I know they are large in file size, but what I am expecting is a little faster upload and to not show any errors.
Here is my php/server info https://rpnmotorsinc.net/phpinfo.php
How can I fix this?
I do have the same issue with a phpBB bulletin board.
I added a routine to rotate and resize pictures at upload. Works like a charm except with original canon photos.
I have to change the exif-data and save the picture - then it works.
I know, this isnĀ“t a solution, but maybe it helps finding one.
This seems to relate to a known bug of PHP. I found a solution using ExifTool before uploading a picture that generated this error:
exiftool -X photo.jpg > photo.xml
exiftool -tagsfromfile photo.xml -all:all photo.jpg
1 image files updated
The first command saves the EXIF metadata to a separate XML file, and the second reconstructs them from there. This is obviously not a good solution for the original question because it requires even more work from your customer than just resizing the picture. If you can install ExifTool on your server, however, you may be able to run it after any new upload.
Related
This is not a quick failure, I have spent a totally of 5 completely full days trying to figure this out. Initially I was limited by file size and then file type; in which I removed the Wordpress restrictions and am now "capable" of uploading my 177MB .glb file to Wordpress.
However when doing so, I receive the following error:
retriever.glb
Unexpected response from the server. The file may have been uploaded successfully. Check in the Media Library or reload the page.
I was on the phone with GoDaddy Specialists for 2.5 hours yesterday ensuring that this was not a Server issue or restriction on their side.. they confirmed that it was not. We pretty much ended the conversation that it is something I must figure out with me, myself, and I.
I went ahead and uploaded my .glb to the server through panel, everything worked fine. In fact I have a location for it here: https://www.tattiniboots.com/wp-content/uploads/2020/07/retriever.glb
However, this does not make the file discoverable to the 3D viewer plugins I have installed on the site through the media location.
I truly don't know where to go from here
I changed the name of the file to .png and attempted an upload and received the following error:
Post-processing of the image failed likely because the server is busy or does not have enough resources. Uploading a smaller image may help. Suggested maximum size is 2500 pixels.
I just tried to update a normal .mov file that is 150MB and received the following error; really making me think this is something to do with file size:
Unexpected response from the server. The file may have been uploaded successfully. Check in the Media Library or reload the page.
Yes, normal images are uploading just fine (2MB-ish)
I just attempted to deactivate all plugins with consideration that maybe "Smush" or another was imposing issues: I then received the issue that the file type is not supported (even with the allow all file types code in my wp-config)
Is this just the case that glb is not allowed at all?
This must be a server thing. probably a run time error
Whoever supported you just doesn't know it. GoGoDaddy. ;)
Nevertheless... you can Use a plugin that's called
media sync. Check it out and best of luck
I recently discovered iloveimg.com as a way to genuinely compress my png images before I upload them to my store. However, I have problems uploading the png image as-is:
For example I uploaded this file which has 17.125 Bytes to a CMS Page via the insert image feature. After the successful upload, this file on the server has now 32.287 Bytes. At this point I did not even insert the image to the page, I just uploaded it. To my surprise it almost doubled the filesize. I linked to each file so maybe this helps identifying the issue.
Can anyone explain why this does happen? I suppose it has something to do with the Gd2.php file which unfortunately I cannot fully understand nur handle. I am using magento 1.9.3.4.
I've been creating a website in the same way that I usually so, where I add an article + image using HTML & PHP. The difference is that when I upload the photo, even though it displays on the web page, my folder shows an Icon instead of the image (See Below):
As the photos show on the webpage I didn't think much of it, until I tried to upload the website, where I kept getting an FTP upload error on the images. Then when loading the website, I found that none of the images were there.
I'm not sure what the problem is, but when I tried to open one of the photos in Fireworks it says, "Could not open the file. File is locked".
Does anyone know what the probelm is? I'm using the same upload method used previously.
I am having the wierdest issues with timthumb.php it was working great i had it resizing all my images then suddenly it stop working for a certain set of image???
Can anyone shed some light on this i have been stuck for hours trying to figure this out???
ok here is a working image link.
http://gladtohelpyou.com/wp-content/themes/huddle/timthumb/timthumb.php?src=http://gladtohelpyou.com/users/5/images/Random%20Pics/Screenshot2012-01-24at16.35.04.png&a=t&h=65&w=65&q=100
As you can see that link works fine and it will resize for me great but if i try to load this image in the same folder i get this.
http://gladtohelpyou.com/wp-content/themes/huddle/timthumb/timthumb.php?src=http://gladtohelpyou.com/users/5/images/rings/b_IMG_5907%20Mission%20Photographic.jpg&a=t&h=65&w=65&q=100
ok where i am stuck is i can load the full image find.
http://gladtohelpyou.com/users/5/images/rings/b_IMG_5907%20Mission%20Photographic.jpg
it is doing that for all of those images but all the other images are working fine i have tried uploading large file sizes change the name, cant think of what else to try.
Has anyone had similar issues
Ok still working on this if i use wordpresses built in upload for those specific image types i get the following error.
Warning: imagecreatefromstring(): Passed data is not in 'JPEG' format in /home/justimages/public_html/wp-includes/media.php on line 258
can anyone let me know why this is happening are my images corrupted???
Make sure your webhost isn't banning that script at the server level. On Friday, Jan 27th, 2012 Westhost (www.westhost.com) disabled timthumb across all it's shared servers and now my WooThemes-based Child Theme is non-functional for external images (read: Youtube screenshots).
Make sure your webhost didn't ban the script outright.
Have you checked the permissions on the set of images that aren't working? Are they the same as the images that do work? They may be owned by a different user or group?
(I don't have permission to post comments yet, so posting this as an answer)
As we know the function getimagesize() works very good for images and swf files.
But it doesn't support shockwave file (.dcr).
SO, how can I get the width and the height of such file..
I am not Lingo/Director expert, but AFAIK you won't be able to do this from PHP.
.DCR file format is not open so you won't find file format specification for you to make your own parser and extract that info on your own.
However, there should be way to do this using director movie on client side.
Eg. You load external dcr file inside your own director movie (then you will be able to read width/height etc of loaded file). Your own director movie then updates some database with info on that specific loaded file so you can show width/height later on.
I've found this artice dating back to 2006 where this guy suggests the same thing:
http://director-online.com/forums/read.php?1,20621,20621,quote=1
Good luck mate! :)
If you have a windows server, you could install IrfanView (free) and use it from the command line (yes, it's free and has a command line) to convert the swf to dcr. (Surely there is a similar tool for Linux).
Convert images on the command line with IfranView
To call OS command line from php, use shell_exec().
Then you could read the swf image size with php normally.
Hope this helps