SMF Development > Bug Reports
Syntax errors from SMF database backup.
Compuart:
After doing some research, I'm pretty sure your problem might have been caused by the NO_BACKSLASH_ESCAPES MySQL mode. There's probably no way to support all MySQL modes possible. 2.0 should do it right, as it uses the official escaping method supplied by MySQL and based on the current database connection. If it doesn't support the specific MySQL mode, it's basically a bug in PHP (or mysqllib, not sure). It's pretty much impossible to meddle with the mysql_real_escape_string function as it takes character set support into account.
Compuart:
Possibly we might be able to change the MySQL mode, but it would probably require specific database permissions, which a user might not have :-\
Antechinus:
--- Quote from: TE on June 04, 2009, 01:15:09 PM ---maybe your php.ini is configured wrong, check values for magic_quotes_runtime and magic_quotes_gpc
http://de3.php.net/manual/en/security.magicquotes.disabling.php
--- End quote ---
Been there, done that. ;) From the OP:
--- Quote from: Antechinus on April 14, 2009, 06:13:29 PM ---The phpinfo.php for the server is located here.
All magic_quotes variables are turned off.
--- End quote ---
--- Quote from: Compuart on June 04, 2009, 04:54:54 PM ---After doing some research, I'm pretty sure your problem might have been caused by the NO_BACKSLASH_ESCAPES MySQL mode. There's probably no way to support all MySQL modes possible. 2.0 should do it right, as it uses the official escaping method supplied by MySQL and based on the current database connection. If it doesn't support the specific MySQL mode, it's basically a bug in PHP (or mysqllib, not sure). It's pretty much impossible to meddle with the mysql_real_escape_string function as it takes character set support into account.
--- End quote ---
Ok cool. This looks promising. Note that I have tried this with an RC1 test site and I get the same result, so it's looking like 2.0 has the same problem. I can do some more testing and if necessary ask my host about MySQL modes.
If it isn't possible to mess around with mysql_real_escape_string function would changing character sets help? The native format for the db connection is utf-8 but the forum itself runs latin_swedish for the tables. Is it possible that using utf-8 for everything would make a difference?
--- Quote from: Compuart on June 04, 2009, 04:58:59 PM ---Possibly we might be able to change the MySQL mode, but it would probably require specific database permissions, which a user might not have :-\
--- End quote ---
I can probably either arrange permissions or get the host to sort it. Their support is very good.
If we can nail this one down it would be great, because from what I've seen this is the only thing stopping the SMF admin backup tool from turning out flawless 20meg gzips on demand. I haven't tried to push it higher than that yet but I will soon. Anyway, if it can be made totally reliable up to 20 meg that would help a lot of people out, and if doing this is known to require a specific MySQL mode then a note could be made in the requirements section of the docs.
If there is anything specific that you would like me to test let me know.
Antechinus:
The backup timing out in phpMyAdmin isn't the problem. It's the syntax of backups that are generated by scripts that don't time out. ;)
I'm still doing some more testing.
zavag:
Except all the errors from a Database backup there is another one missing but VERY USEFUL function:
The RESTORE option from a previous backup on Admin's Control Panel
(PhpMyAdmin is a tool .... SMF is an integrated forum management environment)
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version