View Full Version : adding with exif date
mgroleau
05-15-2007, 11:52 AM
Hello,
I updated my PP.1.6.beta to 1.6 final release.
The problem is that when I add a new picture using the exif date the picture is placed at the current date and time instead of the exif date and time of the image. This problem occurred also with 1.6 beta version, the 1.5 version was ok.
I add a line bellow my title line with the tag <EXIF_CAPTURE_DATE> to show that the picture date was correctly recorded by PP1.6. We can compare the two dates easily.
This is a sample picture (http://mgroleau.com/photoblog/images/20070515082306_doux_soleil_du_printemps.jpg)
My photoblog address (http://mgroleau.com/photoblog/index.php)
Thanks
Best regards
Dennis
05-15-2007, 02:50 PM
Uhm... we fixed that.. not sure if it was in the 1.6 final though.
Bug fixed:
"Post use exif date" didn't work anymore because of missing unescape of exif data
It was changed in rev 223. The 1.6 release is rev 241 so that fix should be in there.
Could you provide me with the settings for magic_quotes? You can find this info by uploading a php file with these lines:
<?PHP
phpinfo();
?>
and point your browser to that file.
This will give information about your server and the settings for magic_quotes are among them.
mgroleau
05-15-2007, 03:27 PM
When using the phpinfo statement I get these 3 lines with magic_quote
magic_quotes_gpc On On
magic_quotes_runtime Off Off
magic_quotes_sybase Off Off
Dennis
05-15-2007, 06:35 PM
This might be the problem. I have to check the code but magic_quotes on is likely the cause.
Most our test servers have that directive set to off and sometimes we are so happy we fix a bug we forget that it can be set to on. So I'll take a look later.
Dennis
05-15-2007, 06:50 PM
ok... let us try something:
open functions_exif.php, change around line 41
$exif_info = mysql_real_escape_string($exif_info);
to:
if(!get_magic_quotes_gpc()){
$exif_info = mysql_real_escape_string($exif_info);
}
Try uploading another picture to see if it works.
mgroleau
05-15-2007, 07:39 PM
Hi,
With this code
if(!get_magic_quotes_gpc()){
$exif_info = mysql_real_escape_string($exif_info);
}
I got this error:
Error: 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 'ACD Systems";s:12:"DateTimeIFD0";s:19:"2007:05:14 12:12:32";s:2
this is an error writing data to the database
If I use the line
$exif_info = mysql_real_escape_string($exif_info);
I got no errors but the function does not work.
mgroleau
05-15-2007, 08:17 PM
This is the new_image.php header:
// SVN file version:
// $Id: new_image.php 233 2007-04-08 07:20:51Z blinking8s $
I do not have a line 296 or around with:
$exif_info = stripslashes($exif_info_db);
In fact I do not find any line with the stripslashes function in that file.
My file come from the distribution kit pixelpost_v1.6.0.zip.
Dennis
05-15-2007, 08:27 PM
Funny thing... I have multiple branches at my harddrive and I was sure I took the one we use as 1.6.0. Guess I was wrong.. anyway:
Go to line 294 in the new_image.php located in the admin and replace:
$exif_result=unserialize_exif($exif_info_db);
with:
$exif_info = stripslashes($exif_info_db);
$exif_result=unserialize_exif($exif_info);
mgroleau
05-15-2007, 08:41 PM
Thank you very much, this time the correction works!
Have a good night!
vBulletin® v3.7.3, Copyright ©2000-2013, Jelsoft Enterprises Ltd.