Hi
I want to install zenphoto 1.22 on my local computer for testing. I 've instaled apache 2.2.10, mysql 5.0.67 winx64, php 5.28 win32, phpmyadmin 3.1.1 all languages. Everything working on Windows Vista x64. Another php pages working without problems. On instalation screen of zenphoto there is only problem:
'PHP setlocale() failed
Locale functionality is not implemented on your platform or the specified locale does not exist. Language translation may not work.
See the troubleshooting guide on zenphoto.org for details.'
but the same I have on my webserwer and there is no problem with script.
Everything instaling ok, admin panel works ok, but on normal pages I have:
`
Zenphoto Error
MySQL Query ( SELECT DISTINCT zp_images.filename, zp_images.title, zp_albums.folder FROM zp_images INNER JOIN zp_albums ON zp_images.albumid = zp_albums.id GROUP BY zp_images.title ORDER BY RAND() LIMIT 1 ) failed. Error: Table 'galeria.zp_images' doesn't exist
or
MySQL Query ( INSERT INTO
zen_images
(
filename
,
albumid
) VALUES ('001_Panorama_wybrzeza_Libia.jpg', '3'); ) failed. Error: Field 'id' doesn't have a default value
`
and don't see any photos

Is that problem with mysql or php ? What can I change on my server ?
Best Regards
Comments
If a table does not exist, the setup-program did not run or run properly. Try to run setup again (zp-core/setup.php) or try a clean reinstall.
I am running Zenphoto locally on a MAMP environments on a Mac since ever without ever encountering these..
Please report if anything helps.
Zenphoto Error
MySQL Query ( UPDATE `zen_images` SET `width` = '1000', `height` = '350', `date` = '', `title` = '001_Panorama_wybrzeza_Libia', `mtime` = '1215095082' WHERE id=1; ) failed. Error: Incorrect datetime value: '' for column 'date' at row 1
In gallery:
Zenphoto Error
MySQL Query ( UPDATE `zen_images` SET `width` = '600', `height` = '800', `date` = '', `title` = '003_amfiteatr_ptolemais', `mtime` = '1215095091' WHERE id=3; ) failed. Error: Incorrect datetime value: '' for column 'date' at row 1
Maybe it's samething with access to files ? Could samone write my good configuration of phpini file for zenphoto ?
Actually you should not need a special phpini config, I basically run it with the standard settings (I set only one mbstring setting on my local install as our setup recommends) on my local and my site without any issues.
I am sure sbillard will have an better idea.
This will add some information to the error message which will help us find out what is going wrong.
Zenphoto Error
MySQL Query ( UPDATE `zen_images` SET `width` = '600', `height` = '466', `date` = '', `title` = '008_bazylika_zachodnia_ptolemais', `mtime` = '1215095101' WHERE id=8; ) failed. Error: Incorrect datetime value: '' for column 'date' at row 1
Backtrace:
in query (classes.php [331])
in PersistentObject->save (class-image.php [102])
in Image->Image (functions.php [1918])
in newImage (class-album.php [599])
in Album->sortImageArray (class-album.php [507])
in Album->getImages (class-album.php [687])
in Album->getAlbumThumbImage (class-album.php [751])
in Album->getAlbumThumb (template-functions.php [1060])
in getAlbumThumb (template-functions.php [1101])
in printAlbumThumbImage (index.php [26])
in include (index.php [98])
In Admin edit:
Zenphoto Error
MySQL Query ( UPDATE `zen_images` SET `width` = '600', `height` = '450', `date` = '', `title` = '010_odeon_ptolemais_libia', `mtime` = '1215095102' WHERE id=10; ) failed. Error: Incorrect datetime value: '' for column 'date' at row 1
Backtrace:
in query (classes.php [331])
in PersistentObject->save (class-image.php [102])
in Image->Image (functions.php [1918])
in newImage (class-album.php [599])
in Album->sortImageArray (class-album.php [507])
in Album->getImages (class-album.php [687])
in Album->getAlbumThumbImage (class-album.php [751])
in Album->getAlbumThumb (admin-functions.php [1339])
in printAlbumEditRow (admin.php [1053])
I hope this help. Maybe You want my phpini file ?
I have exactly the same problem.
I turned on debug information, like you suggested above and got almost same result:
Zenphoto Error
MySQL Query ( UPDATE `zp_images` SET `width` = '1024', `height` = '768', `date` = '', `title` = 'Space_1___Desktop_Wallpaper_by_Solloby', `mtime` = '1203089995' WHERE id=17; ) failed. Error: Incorrect datetime value: '' for column 'date' at row 1
Backtrace:
in query (classes.php [331])
in PersistentObject->save (class-image.php [102])
in Image->Image (functions.php [1918])
in newImage (class-album.php [599])
in Album->sortImageArray (class-album.php [507])
in Album->getImages (class-album.php [687])
in Album->getAlbumThumbImage (class-album.php [751])
in Album->getAlbumThumb (template-functions.php [1060])
in getAlbumThumb (template-functions.php [1101])
in printAlbumThumbImage (index.php [26])
in include (index.php [98])
I am using PHP 5.2.8 and Apache 2.2.8 in Windows Server 2008. I too get only warning for setlocale() when installing.
I didn't find ticket in Trac for this, should I set on?
By the way this seems to be Windows only problem. I tried everything on my linux box and it works ok. Same pictures, apache and php.
http://www.zenphoto.org/trac/ticket/915
Everything working with current nightly build
http://www.zenphoto.org/files/nightly/zenphoto-2008-12-19-trunk.zip
regards
I don't know if it's correlated but I had similar problems on my local installation (Apache 2.2.9; php 5.2.6 and MySQL 5.0.67).
I solved the problem by changing 1 line in the my.ini file (MySQL ini file):
sql-mode="STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"
to
sql-mode=""
best regards