uworlds Posted February 3, 2009 Posted February 3, 2009 Hello Warning -- this is an Adult online store. When clicking on "Enter" from page http://www.mrbuzzie.com/ the following message comes up: Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'mrbuzzie_osc'@'localhost' (using password: YES) in /home/mrbuzzie/public_html/osc/catalog/includes/functions/database.php on line 19 Unable to connect to database server! Contents of .htaccess at the root level is: suPHP_ConfigPath /home/mrbuzzie/public_html/ Options +FollowSymLinks Contents of php.ini at root level is: register_globals = On I have also tried in php.ini: php_value register_globals 1 but then message comes up: Server Requirement Error: register_globals is disabled in your PHP configuration. This can be enabled in your php.ini configuration file or in the .htaccess file in your catalog directory. I have no clue what is wrong or why the site is not working. It was working before in this same Web hosting space but went offline for a while. Now it is being re-loaded but can not get it operational. Would be so grateful if anyone can get the site working even if I have to pay for someone to do it. Thanks for any help. Regards, Ted
FIMBLE Posted February 3, 2009 Posted February 3, 2009 for the php globals try this instead php_flag register_globals on The Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'mrbuzzie_osc'@'localhost' (using password: YES) in /home/mrbuzzie/public_html/osc/catalog/includes/functions/database.php on line 19 Unable to connect to database server! is a message to say that the user details are incorrect NIc Sometimes you're the dog and sometimes the lamp post [/url] My Contributions
uworlds Posted February 3, 2009 Author Posted February 3, 2009 Thanks very much Nic! Can I ask you, how do I create a username to link to the database? I had downloaded the entire Web site previously before the old hosting space expired and just trying to re-load. Do you know if the old database should have been included in the contents of the Web hosting space and would have just uploaded again fine? I would assume so, and then it is just a matter of creating a username/password to be able to connect to that database -- I'm just not sure how to go about it. Any light you could shed would be greatly appreciated. Thank you, Ted
FIMBLE Posted February 3, 2009 Posted February 3, 2009 Thanks very much Nic! Can I ask you, how do I create a username to link to the database? I had downloaded the entire Web site previously before the old hosting space expired and just trying to re-load. Do you know if the old database should have been included in the contents of the Web hosting space and would have just uploaded again fine? I would assume so, and then it is just a matter of creating a username/password to be able to connect to that database -- I'm just not sure how to go about it. Any light you could shed would be greatly appreciated. Thank you, Ted Hi Ted, You create the user names and link to the database from your wen host control panel. The database will not have downloaded with the store as it is kept seperate, the only way you will have a copy is if you created a database backup from your admin. in this case the database will be stored in your admin / backups folder Nic Sometimes you're the dog and sometimes the lamp post [/url] My Contributions
uworlds Posted February 4, 2009 Author Posted February 4, 2009 Thanks Nic, that makes sense. I have found the old databases and have uploaded them using phpMyAdmin and did some SQL queries and the data seems to be fine. I have also created usernames and passwords and linked to the databases however there seems to be some problem with the way they are linked to the database as the same message is still coming up i.e.: Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'mrbuzzie_osc'@'localhost' (using password: YES) in /home/mrbuzzie/public_html/osc/catalog/includes/functions/database.php on line 19 Unable to connect to database server! I'm not sure I understand the step between pressing Enter from http://www.mrbuzzie.com/ and how it connects to the databases using this username / password aside from using /home/mrbuzzie/public_html/osc/catalog/includes/functions/database.php The contents of the MySQL Account Maintenance of cPanel are: Current Databases: mrbuzzie_osc Users in osc mrbuzzie_osc (Privileges: ALL PRIVILEGES) Connection Strings Perl $dbh = DBI->connect("DBI:mysql:mrbuzzie_osc:localhost", "mrbuzzie_osc","<PASSWORD HERE>"); PHP $dbh=mysql_connect ("localhost", "mrbuzzie_osc", "<PASSWORD HERE>") or die('Cannot connect to the database because: ' . mysql_error()); mysql_select_db ("mrbuzzie_osc"); mrbuzzie_oscau Users in oscau mrbuzzie_oscau (Privileges: ALL PRIVILEGES) Connection Strings Perl $dbh = DBI->connect("DBI:mysql:mrbuzzie_oscau:localhost", "mrbuzzie_oscau","<PASSWORD HERE>"); PHP $dbh=mysql_connect ("localhost", "mrbuzzie_oscau", "<PASSWORD HERE>") or die('Cannot connect to the database because: ' . mysql_error()); mysql_select_db ("mrbuzzie_oscau"); The contents of /home/mrbuzzie/public_html/osc/catalog/includes/functions/database.php are (around and including line 19): function tep_db_connect($server = DB_SERVER, $username = DB_SERVER_USERNAME, $password = DB_SERVER_PASSWORD, $database = DB_DATABASE, $link = 'db_link') { global $$link; if (USE_PCONNECT == 'true') { $$link = mysql_pconnect($server, $username, $password); } else { $$link = mysql_connect($server, $username, $password); } if ($$link) mysql_select_db($database); return $$link; } Thanks again for your help. Must be only 1 step away from making this work. best regards, Ted
uworlds Posted February 5, 2009 Author Posted February 5, 2009 Hello, The above connection issues how seem to be fixed however the following message is now coming up after clicking on 'Enter' from www.mrbuzzie.com (Adult content Web site): Warning: I am able to write to the configuration file: /home/mrbuzzie/public_html/osc/catalog/includes/configure.php. This is a potential security risk - please set the right user permissions on this file. Do you know how this may be fixed? Many thanks, Kind regards, Ted
FIMBLE Posted February 5, 2009 Posted February 5, 2009 Hello, The above connection issues how seem to be fixed however the following message is now coming up after clicking on 'Enter' from www.mrbuzzie.com (Adult content Web site): Warning: I am able to write to the configuration file: /home/mrbuzzie/public_html/osc/catalog/includes/configure.php. This is a potential security risk - please set the right user permissions on this file. Do you know how this may be fixed? Many thanks, Kind regards, Ted You need to set the permissions of files includes / configure.php admin / includes / configure.php Download the file i have attached, upload to your root directory and then call it http://www.mrbuzzie.com/CHMOD.php It will change the permissions for you NOTE: This is set up to work on your store only Nic Sometimes you're the dog and sometimes the lamp post [/url] My Contributions
uworlds Posted February 6, 2009 Author Posted February 6, 2009 Ahh Nic, thanks mate you are a legend! That worked perfectly. I also duplicated the URLs for the /au/ section of the site and copied the CHMOD file and placed under that directory and then executed the URL and it worked just great. I also finally figured out why some URLs had /home/ and /home2/ and that appears to be because I have two oscommerce setups within the same hosting space for the au and non-au sites. Thank you so much for your help, truly - really great! Cheers, Ted
FIMBLE Posted February 6, 2009 Posted February 6, 2009 You're welcome, glad it worked for you :-) Nic Sometimes you're the dog and sometimes the lamp post [/url] My Contributions
Recommended Posts
Archived
This topic is now archived and is closed to further replies.