Member
Member
saigo   09-02-2014, 05:46
#1

In the process of moving my zenphoto install from one VPS VM to another.

Ran the backup on the old host, and have got to the point of running setup on the new host.

When I select my backup and attempt to restore, I get this error :

Quote:Fatal error: MySQLi Error: ( SHOW INDEX FROM [DB][prefix][prefix]admin_to_object ) failed. MySQLi returned the 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 '.admin_to_object' at line 1 in /var/www/zenphoto/zp-core/functions-db-MySQLi.php on line 78
both old and new zenphoto is version 1.4.5.5

These are my mysql rpm version :

Quote:# rpm -qa | grep mysql
mysql-connector-odbc-5.1.5r1144-7.el6.x86_64
mysql-libs-5.5.35-1.el6.remi.x86_64
php-mysql-5.4.24-1.el6.remi.x86_64
mysql-devel-5.5.35-1.el6.remi.x86_64
compat-mysql51-5.1.54-1.el6.remi.x86_64
mysql-5.5.35-1.el6.remi.x86_64
mysql-server-5.5.35-1.el6.remi.x86_64
Alas, I don't now have the original host to check what versions were on there before.

I'm really just posting this as a long-shot to see if anyone has seen this problem before, and/or can put their finger on the fix. I couldn't find anything from searching..hence the long-shot.

Member
Member
sbillard   09-02-2014, 19:10
#2

There was a a bug in handling database prefixes which were simple underscores. So probably you should change your prefix. Otherwise use the 1.4.5.9 release for the new install.

Member
Member
saigo   10-02-2014, 11:56
#3

Thanks for your reply.

Looking at the tables in my new DB, and if I understand correctly, I don't see any prefix with underscores

Quote:+--------------------+
| Tables_in_zenphoto |
+--------------------+
| .admin_to_object |
| .administrators |
| .albums |
| .captcha |
| .comments |
| .images |
| .menu |
| .news |
| .news2cat |
| .news_categories |
| .obj_to_tag |
| .options |
| .pages |
| .plugin_storage |
| .search_cache |
| .tags |
+--------------------+
Where you mention 'change your prefix', are you referring to something elsewhere ?

Regarding your second point, and restoring my backup from a 1.4.5.5 version to a 1.4.5.9 version.

Do I simply put 1.4.5.9 in place on my new host, and copy something from my 1.4.5.5 version zenphoto directory ( saved from the old host ) into the new 1.4.5.9 zenphoto directory, and then run setup, so I see the "restore from backup" option ?

If so, could you please point out what I have to copy from the old to the new ?

Administrator
Administrator
acrylian   10-02-2014, 13:13
#4

BY default Zenphoto uses a database prefix zp_. But it is not required.

Actually all is written here how to upgrade:
http://www.zenphoto.org/news/installation-and-upgrading
As you hopefully noted there is a folder /backup which contains the Zenphoto backup (of course only if you used our database backup plugin).

Member
Member
sbillard   10-02-2014, 18:04
#5

The DB prefix is defined in your zenphoto configuration file. The actual default of this will depend upon the folder where zenphoto is installed. If it is installed in the root the it may default to a simple underscore.

Member
Member
saigo   08-03-2014, 11:58
#6

Thanks for replies - just finally got around to playing with this again.

copied the backup file and albums directory from the old zenphoto directory into latest version directory.

In zenphoto.cfg.php file, I changed

$conf['mysql_prefix'] = ".";

to

$conf['mysql_prefix'] = "zp";

Re-ran setup, and restored from backup.. all worked like a charm.

  
Powered By MyBB, © 2002-2026 MyBB Group.
Made with by Curves UI.