I might be doing this wrong I followed my webhost's directions and I'm getting an error.
-I did a fresh install of wsnlinks 4.014 in debug mode, everything installed okay, to be sure I didn't miss anything I also ran servertest.php and there were no errors reported
-I then added 1 category and 1 link to my directory
-Now before doing a large amount of work on the site I wanted to make sure I knew how to do a proper backup and restore of the database
-So I tried using the backup/restore feature in the wsnlinks admin panel and it didn't work, the wsnlinks manual referred to possible problems because of mysql safemode, so I logged into my webhost to use PHPmyAdmin
-Once logged into PHPmyAdmin, I selected my database, clicked the export tab, clicked select all [structure and data], save as file, then clicked 'go', I now have a database.sql file on my local hard drive
-I opened up database.sql in notepad, then did a search for my added link to make sure the data had been exported, all looked okay (I didn't save or anything, but just closed the file)
-Next, I went back to my website, logged in and deleted the link, but left the category, I wanted to use the restore feature to restore the link
-After which, I went back to PHPmyAdmin, clicked on my database, went to SQL, run SQL query, selected the database.sql file and clicked 'go'
-The link wasn't restored and I received the following message:
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 '--------------------------------------------------------- -- --
If you're importing to a different server than you exported from it may have a different mysql version, which will require you to export with a "compatibility mode" in order to make it importable by the desired version. The most common case is MySQL 3 not supporting character sets as specified by MySQL 4.1 and 5. (Note I recommend MySQL 4.1+ for full functionality.)
Going back to the beginning I'm confused why the wsnlinks admin backup/restore isn't working.
I can create a backup in PHPmyAdmin successfully. I cannot restore in PHPmyAdmin it's giving syntax errors. (I'm unsure why.) So I thought I'd try to use the wsnlinks admin panel to restore the sql file created from PHPmyAdmin.
When I try to create/restore a backup in wsnlinks admin nothing happens. I've checked with my ftp program and no file is created in the admin folder.
-I've tried doing chmod 755 and 777 for the admin folder -Checking the PHP v4.3.10 settings (I've seen posts regarding safemode) -safe_mode = off -sql.safe_mode = off -I've seen posts about SSH -I found the SSH setting in my webhosting control panel and it's enabled
Is there a certain setting I would need to add to a custom php.ini file?
SSH is most likely the problem. I just tried using WinSCP + Putty to login to my webhosting account and then connect to mySQL database and it's giving some errors so that's probably why the backup/restore from the wsnlinks admin panel isn't working.
SSH is probably the way to go anyway for dbase backups once the files get large, but I just hated not knowing why I couldn't get a wsnlinks feature to work when I know it should be working.
0/5
1
2
3
4
5
This thread is closed, so you cannot post a reply.
Comments on Help with PHPmyAdmin
Member
Usergroup: Customer
Joined: Oct 11, 2003
Total Topics: 6
Total Comments: 13
I might be doing this wrong I followed my webhost's directions and I'm getting an error.
-I did a fresh install of wsnlinks 4.014 in debug mode, everything installed okay, to be sure I didn't miss anything I also ran servertest.php and there were no errors reported
-I then added 1 category and 1 link to my directory
-Now before doing a large amount of work on the site I wanted to make sure I knew how to do a proper backup and restore of the database
-So I tried using the backup/restore feature in the wsnlinks admin panel and it didn't work, the wsnlinks manual referred to possible problems because of mysql safemode, so I logged into my webhost to use PHPmyAdmin
-Once logged into PHPmyAdmin, I selected my database, clicked the export tab, clicked select all [structure and data], save as file, then clicked 'go', I now have a database.sql file on my local hard drive
-I opened up database.sql in notepad, then did a search for my added link to make sure the data had been exported, all looked okay (I didn't save or anything, but just closed the file)
-Next, I went back to my website, logged in and deleted the link, but left the category, I wanted to use the restore feature to restore the link
-After which, I went back to PHPmyAdmin, clicked on my database, went to SQL, run SQL query, selected the database.sql file and clicked 'go'
-The link wasn't restored and I received the following message:
SQL-query :
--
--
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * --
--
--
CREATE TABLE `wsnlinks_attachments` (
`id` int( 11 ) NOT NULL auto_increment,
`type` varchar( 255 ) NOT NULL ,
`objectid` int( 11 ) default '0',
`filename` varchar( 255 ) NOT NULL ,
`filetitle` varchar( 255 ) NOT NULL ,
`filesize` int( 11 ) default '0',
`width` int( 11 ) default '0',
`height` int( 11 ) default '0',
`memberid` int( 11 ) default '0',
`time` int( 11 ) default '0',
`deleted` tinyint( 1 ) default '0',
`field` varchar( 255 ) NOT NULL ,
`downloads` int( 11 ) default '0',
`validated` tinyint( 1 ) default '0',
`ownerip` varchar( 20 ) NOT NULL ,
UNIQUE KEY `id` ( `id` )
)ENGINE = MYISAM DEFAULTCHARSET = latin1
MySQL said:
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 '---------------------------------------------------------
--
--
I'm not sure if I'm doing something wrong.
_____
Derek
developer
Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California
Total Topics: 61
Total Comments: 7868
If you're importing to a different server than you exported from it may have a different mysql version, which will require you to export with a "compatibility mode" in order to make it importable by the desired version. The most common case is MySQL 3 not supporting character sets as specified by MySQL 4.1 and 5. (Note I recommend MySQL 4.1+ for full functionality.)
Member
Usergroup: Customer
Joined: Oct 11, 2003
Total Topics: 6
Total Comments: 13
PHPmyAdmin shows this info:
Welcome to phpMyAdmin 2.4.0
MySQL 5.0.24a-log running on MySQL Server Farm 2
developer
Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California
Total Topics: 61
Total Comments: 7868
Well I'm not a phpmyadmin expert.
Member
Usergroup: Customer
Joined: Oct 11, 2003
Total Topics: 6
Total Comments: 13
I understand Paul, just looking for some insight.
Going back to the beginning I'm confused why the wsnlinks admin backup/restore isn't working.
I can create a backup in PHPmyAdmin successfully.
I cannot restore in PHPmyAdmin it's giving syntax errors. (I'm unsure why.)
So I thought I'd try to use the wsnlinks admin panel to restore the sql file created from PHPmyAdmin.
When I try to create/restore a backup in wsnlinks admin nothing happens. I've checked with my ftp program and no file is created in the admin folder.
-I've tried doing chmod 755 and 777 for the admin folder
-Checking the PHP v4.3.10 settings (I've seen posts regarding safemode)
-safe_mode = off
-sql.safe_mode = off
-I've seen posts about SSH
-I found the SSH setting in my webhosting control panel and it's enabled
Is there a certain setting I would need to add to a custom php.ini file?
_____
Derek
developer
Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California
Total Topics: 61
Total Comments: 7868
Can you use mysqldump via SSH? Maybe it's just somehow not installed.
Member
Usergroup: Customer
Joined: Oct 11, 2003
Total Topics: 6
Total Comments: 13
Thanks Paul.
SSH is most likely the problem. I just tried using WinSCP + Putty to login to my webhosting account and then connect to mySQL database and it's giving some errors so that's probably why the backup/restore from the wsnlinks admin panel isn't working.
SSH is probably the way to go anyway for dbase backups once the files get large, but I just hated not knowing why I couldn't get a wsnlinks feature to work when I know it should be working.