jay5009 Posted May 23, 2013 Share Posted May 23, 2013 I'm a newb. I uploaded and installed a script and inserted the correct info to direct it to my MySQL database. Then I deleted all of it but then later decided to upload and install that same script again. The installation file is an install.php file contained in an 'install' folder. After directing my browser to install.php again it came up with a bunch of MySQL errors and will not let me install again. I then deleted that MySQL database and created a new one and also once again deleted everything and again re-uploaded the script. Once again it comes up with a bunch of MySQL errors and will not let me install. The errors look like this: "Warning: SK_MySQL::connect() database connection failed in /home/content/...API/MySQL.class.php on line 17" and "Warning: mysql_real_escape_string() expects parameter 2 to be resource, boolean given in /home/content/...API/MySQL.class.php on line 35". It looks like it's trying to connect to that old database but how can it possibly be trying to do that if I deleted that old database and deleted everything on my site and re-uploaded a fresh script that has no connection or knowledge of that old database? I'm assuming there must be some file left on my site that I was not able to delete. I'm using Godaddy and I simply went into the FTP page and deleted everything on my site and even tried restoring the site to when I first obtained my hosting account. Quote Link to comment https://forums.phpfreaks.com/topic/278324-cant-install-script-because-of-connection-to-old-database/ Share on other sites More sharing options...
mac_gyver Posted May 23, 2013 Share Posted May 23, 2013 (edited) there's nothing in the errors that are specific to the database name. the SK_MySQL part is a class name. it may have been the same name as the database name, but that's not the reason for it appearing in the error message. the only thing that the error you posted tells is that the connection is failing. to find out specifically why it is failing, you would need to echo mysql_error(); Edited May 23, 2013 by mac_gyver Quote Link to comment https://forums.phpfreaks.com/topic/278324-cant-install-script-because-of-connection-to-old-database/#findComment-1431860 Share on other sites More sharing options...
Solution jay5009 Posted May 23, 2013 Author Solution Share Posted May 23, 2013 there's nothing in the errors that are specific to the database name. the SK_MySQL part is a class name. it may have been the same name as the database name, but that's not the reason for it appearing in the error message. the only thing that the error you posted tells is that the connection is failing. to find out specifically why it is failing, you would need to echo mysql_error(); Thanks. It's working now but I don't know why it wasn't working before. Quote Link to comment https://forums.phpfreaks.com/topic/278324-cant-install-script-because-of-connection-to-old-database/#findComment-1431905 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.