PhoenixCraft Posted May 9, 2012 Posted May 9, 2012 Hello everyone, I'm moving here from a previous host because I need a host that ALSO offers remote MySQL connections for my Minecraft servers, I moved ALL of my MySQL file, but the config.php, I generated a new one from this link http://www.phpbb.com/kb/article/rebuilding-your-configphp-file/ But I get this error when importing the file: Error There seems to be an error in your SQL query. The MySQL server error output below, if there is any, may also help you in diagnosing the problem ERROR: Unknown Punctuation String @ 1 STR: <? SQL: <?php // phpBB 3.0.x auto-generated configuration file // Do not change anything in this file! $dbms = 'mysql'; SQL query: <?php // phpBB 3.0.x auto-generated configuration file // Do not change anything in this file! $dbms = 'mysql'; MySQL said: #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 '<?php // phpBB 3.0.x auto-generated configuration file // Do not change anythi' at line 1 I noticed it said unknown puncuation at string 1 so I redid the config and made sure there was NOTHING infront of the PHP Starter and there wasn't, I'm not sure what's wrong, and my main PHP scripter is busy. I am very new to PHP I just learned it this morning, so try and dumb it down as best as possible if you could, thanks (:
windoves Posted May 10, 2012 Posted May 10, 2012 So what I see is wrong with the SQL string: Put the mysql_query() inside the PHP opening and closing tags (<?php and ?>) Do not put opening and closing tags inside the mysql string, use example: "user='$username'" and not "user='<?php echo $user; ?>'" Otherwise check that the versions are the same for the config file and the rest of the script that you moved. I am pretty sure that you can use the same config file as you did in your last host, just change the variables. Hope this helps.
2bigpigs Posted May 10, 2012 Posted May 10, 2012 I'm a bit new to managing websites so i don't really know much about importing stuff so can i ask you what you're trying to do? Are you running a PHPBB forum?The config.php that your link helps you make is for PHPBB forums.I don't think you need to 'import' the config.php file into mysql. Most systems use the config.php file to save the users configuration ( as the name would suggest ) and get that into their scripts using an include.The file just sits there and is included everytime a PHPBB forum script runs. As for remote mysql, You'll have to enable that in Cpanel if you haven't done that yet ( Not that it has anything to do with the problem at hand )
PhoenixCraft Posted May 10, 2012 Author Posted May 10, 2012 I'm a bit new to managing websites so i don't really know much about importing stuff so can i ask you what you're trying to do? Are you running a PHPBB forum?The config.php that your link helps you make is for PHPBB forums.I don't think you need to 'import' the config.php file into mysql. Most systems use the config.php file to save the users configuration ( as the name would suggest ) and get that into their scripts using an include.The file just sits there and is included everytime a PHPBB forum script runs. As for remote mysql, You'll have to enable that in Cpanel if you haven't done that yet ( Not that it has anything to do with the problem at hand ) Thank you for your help, yes I am running a PHPBB forum, I managed to get everything loaded into the public_html file, but I am still getting a mysql error this is it: SQL ERROR [ mysqli ] Access denied for user 'database'@'localhost' (using password: YES) [1045] An sql error occurred while fetching this page. Please contact an administrator if this problem persists. I censored my database. As for remote mysql, how does it work, I specify the IP to allow, but what port do I put into the config file for my plugin? I can list the things required for the config if necessary, So what I see is wrong with the SQL string:Put the mysql_query() inside the PHP opening and closing tags (<?php and ?>)Do not put opening and closing tags inside the mysql string, use example: "user='$username'" and not "user='<?php echo $user; ?>'" Otherwise check that the versions are the same for the config file and the rest of the script that you moved. I am pretty sure that you can use the same config file as you did in your last host, just change the variables. Hope this helps. Thank you, I think I solved this error, if you look below I am having a new error. UPDATE: I fixed the issue, but now I'm having ANOTHER issue, this is what it says NOW: General Error SQL ERROR [ mysqli ] Table 'database.phpbb_config' doesn't exist [1146] An sql error occurred while fetching this page. Please contact an administrator if this problem persists. There is no config in the MySQL database, but when I upload the config to the database I get the above error, so I gzipped everything in my Public HTML file, and tried to upload that to a new database, that failed also.
2bigpigs Posted May 11, 2012 Posted May 11, 2012 Well the second error is probably directly linked to the first since he can't find the table if he isn't connected.Remember to create the MySQL user in CPanel AND grant him all the necessary priveleges to the phpBB database.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now