Jump to content

Php Error


Recommended Posts

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 (:

Link to comment
Share on other sites

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. :)

Link to comment
Share on other sites

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 )

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...