Question I'm getting an Error: SyntaxError: Unexpected token < in JSON at position 0

Status
Not open for further replies.

Cipher5

Customer
Hi, I keep on getting an Error: SyntaxError: Unexpected token < in JSON at position 0 When I'm Uploading jpg images almost all the time (90% of the time). 2 out of 3 images gives me this error. A lot of the time all the images will fail with this error. I'm stumped because I have been testing with the same 3 jpg images and it's never consistent results. I checked my apache logs and nothing. Where should I check next? any idea's why I'm getting the Error? This happens on a fresh install of vbulletin 4.2.5 with VBdownloads. This never happens with .png files. I was always using .png files now I started uploading jpg's and this error is happening. Thanks for reading.
 
If you inspect the AJAX request itself via your browser's dev tools, what's the response?
 
Not sure if I did it right, Under XHR/Response in the dev tools in Chrome, but this is what I get for one of them;

<br /><b>PHP Warning</b>: imagecreatefromjpeg(): gd-jpeg: JPEG library reports unrecoverable error: in <strong>....\dbtech\downloads\includes\class_core.php</strong> on line <strong>1146</strong><br /><br /><b>PHP Warning</b>: imagecreatefromjpeg(): 'X:/WebServer/downloads//1016-3.jpg' is not a valid JPEG file in <strong>....\dbtech\downloads\includes\class_core.php</strong> on line <strong>1146</strong><br /><br /><b>PHP Warning</b>: imagesx() expects parameter 1 to be resource, boolean given in <strong>....\dbtech\downloads\includes\class_core.php</strong> on line <strong>1178</strong><br /><br /><b>PHP Warning</b>: imagesy() expects parameter 1 to be resource, boolean given in <strong>....\dbtech\downloads\includes\class_core.php</strong> on line <strong>1178</strong><br /><br /><b>PHP Warning</b>: imagecopyresampled() expects parameter 2 to be resource, boolean given in <strong>....\dbtech\downloads\includes\class_core.php</strong> on line <strong>1178</strong><br />{"success":true}
 
That looks like a problem with your web server, I would strongly recommend using a Linux server like Debian or CentOS instead of a Windows server.

I don't have any further advice for you as there isn't actually an error message displayed, just a message saying your web server can't handle the image. There is nothing I can do on my end, sadly :(
 
Ok, I wanted to make sure it wasn't a bug in vBDownloads. I will try to track down the problem on my server. The server is running off my desktop pc for convenience so that is why I'm running Windows, vBDownloads is just holding a private repository of some of my files I need to share with one of my business partners for our projects. Thanks for the help.
 
Hello @Cipher5,

We hope your ticket regarding vBDownloads has been addressed to your satisfaction. This ticket has now been closed.

If your ticket has not been resolved, you can reply to this thread at any point in the next 7 days in order to reopen the ticket, afterwards this thread will be closed.

Please do not reply to this thread if your ticket has been resolved.

Thank you.


- DragonByte Technologies, Ltd.
 
Status
Not open for further replies.

Legacy vBDownloads

vBulletin 3.8.x vBulletin 4.x.x
Seller
DragonByte Technologies
Release date
Last update
Total downloads
1,713
Customer rating
0.00 star(s) 0 ratings
Back
Top