PHP Problems

3rd party extensions (phpDivingLog, dive computer downloader,...)
Post Reply
ianr
Posts: 47
Joined: Thu Sep 17, 2009 11:44

PHP Problems

Post by ianr »

Hi, I seem to be having problems with the php diving log extension.

If I export the log and then try to import the mysql file it crashes and reports the following error:

#1064 - 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 'DROP TABLE IF EXISTS Brevets' at line 1

I tried to manually drop the table as I usually have to do and that often works, however, it didn't this time.

The only way I could get this to work was to open the mysql file and manually remove all of the 'DROP TABLE IF EXISTS' commands. this would then manually overwrite the existing tables i suspect (i'm not very fluent with mysql) and this solution worked if I simply executed it as a mysql query.

It's a workaround for now but I thought i'd flag it up for the mysql gurus to investigate.

i'm using Mysql 5.0 and phpMyAdmin 2.6.4-pl3 if that's relevant.

Cheers

Ian

divinglog
Site Admin
Posts: 5164
Joined: Sat Feb 08, 2003 21:02
Location: Coburg
Contact:

Re: PHP Problems

Post by divinglog »

Hi Ian

When you click the "Settings" button in the MySQL export dialog, you can disable the "DROP TABLE" command, so you don't have to delete it manually.

Kind regards,
Sven

lloyd_borrett
Posts: 228
Joined: Sun Jun 11, 2006 09:24
Location: Frankston South, Victoria, Australia
Contact:

Re: PHP Problems

Post by lloyd_borrett »

G'day Ian,

Which version of phpDivingLog are you using?

As Sven says, there is a workaround where you have the option in DivingLog to create a MySQL output file without the DROP TABLE commands in it. Then using phpMyAdmin, manually drop the tables before importing the new MySQL dump file.

If possible, upgrade to the latest versions of PHP and MySQL and see if that fixes the problem. The problem you're having is most likely something to do with your MySQL setup.

Best Regards, Lloyd Borrett.

ianr
Posts: 47
Joined: Thu Sep 17, 2009 11:44

Re: PHP Problems

Post by ianr »

Thanks for the advice guys.

Lloyd, I'm not sure which version I am using to be honest. I think I may have updated to v2.2 beta 8 as I have those files archived along with older versions in case I needed to roll back at any time. I've been pretty slack with my version control of the actual files on my webspace though and have given myself a damn good talking to about that for the future.

The PHP and MySQL versions are tied into my web host (1&1) and haven't changed in quite a while as far as I am aware.

Is there a later stable version of phpDivingLog available than I have installed? I have been waiting for the development of v3 to be rolled out in a stable version so I can play with that and I still have a bundle of things that I think need to be fixed but have kept reasonably quiet on that lately whilst the major development takes place. Things such as the dive statistics don't accurately match my dive types in dive log so it looks like I have done more cave dives that I really have for example.

I'll use the manual work around for now until the newer versions are available and I can test those.

Cheers

Ian

lloyd_borrett
Posts: 228
Joined: Sun Jun 11, 2006 09:24
Location: Frankston South, Victoria, Australia
Contact:

Re: PHP Problems

Post by lloyd_borrett »

G'day Ian,

Progress on phpDivingLog v3 has slowed up over the last few months. My focus has been on changing jobs, settling in at the new job, getting my dive boat up-to-speed for the summer, taking on the role of editor of my dive club's magazine, plus a heap of family issues.

Hopefully in the new year I'll get back onto it again.

But that might not help you much because I think there are some dependencies in phpDivingLog v3 on more recent versions of PHP and MySQL than you might be running. I'll need to check on that however to be certain.

Best Regards, Lloyd Borrett.

ianr
Posts: 47
Joined: Thu Sep 17, 2009 11:44

Re: PHP Problems

Post by ianr »

Thanks Lloyd,

I'd be interested to hear about the requirements for phpDivingLog v3 and may look into changing my hosting if required.

Cheers

Ian

Post Reply