View Full Version : Photopost error when uploading

April 11th, 2007, 02:43 PM
I get this error when trying to bulk upload almost 1800 images from the 1 folder:

"There was an error uploading this photo. Please report to System Administrator."

I'm not sure what the problem could be and this message doesn't really point me in any direction.

Any clue?

Thank you

April 12th, 2007, 10:05 AM
Still got it even with all limitations removed in the admin options :(

What could this error mean?

Chuck S
April 12th, 2007, 11:15 AM
It means the photo insert is not being written so without more info I cant say anything else

Did you recently upgrade and not run an upgrade?

$resulta = ppmysql_query($query, $link);
$lastphotoid = mysql_insert_id( $link );

if ( empty($lastphotoid) )
diewell( "There was an error uploading this photo. Please report to System Administrator." );

April 12th, 2007, 11:51 AM
The last upgrade I did went without problems. All files and tables are upgraded. Also I uploaded pictures before this batch without a problem, but not this high number (1800).

I'm not sure what more info I can give you.

Chuck S
April 12th, 2007, 11:54 AM
Do single file uploads work?

April 12th, 2007, 12:28 PM
Just tried one , yes it works for single upload. Some bulk uploads may work like yesterday I did one, but this one seems to cause some problem.

Chuck S
April 12th, 2007, 01:48 PM
Well then one needs to track down what is different about that one. Basically all the error you post tells me is that their is no lastphotoid so there was no insert. Try making sure in global options that debug option is set to display errors.

April 12th, 2007, 02:11 PM
Thanks. Results after debug on:

We're sorry, but the system experienced an unrecoverable error. Please try again later.


Query: INSERT INTO PPphotos (id,user,userid,cat,date,title,description,keywords,bigimage,width,height,filesize,medwidth,medheight,medsize,approved,lastpost, watermarked,allowprint,extra1,extra2,extra3,extra4,extra5,extra6,ipaddress,allowrate,allowcoms) values(NULL,'admin', 25260, 614, 1176401274, 'Fitness Foto's', 'Fitness Foto's', 'Fitness', '1211.jpg', 360, 600, 20438, 0, 0, 0, 1, 1176401274, 'no','yes','','','','','','','','1','1')

Result: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 's', 'Fitness Foto's', 'Fitness', '1211.jpg', 360, 600, 2043' at line 3

Database handle: Resource id #31

Chuck S
April 12th, 2007, 02:18 PM
well your server has been updated to a new mysql it seems or PHP

So why is the typecast function we do on $desc not working to addslashes on the description of a photo

Try editing your image-inc.php file and add this line in bold

$desc = addslashes($desc);

$query = "INSERT INTO {$Globals['pp_db_prefix']}photos (id,user,userid,cat,date,title,description,keywords,bigimage,width,height,filesize,medwidth,medheight,medsize,approved,lastpost,