ajk0519 Posted December 30, 2008 Share Posted December 30, 2008 Everything was working fine, until when I tried installing a SSL Certificate for my store and had to alter the configure.php files in /admin/includes/ and /includes/ After uploading those files using my FTP I got this error when trying to access my store: "Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'user_my_db'@'localhost' (using password: NO) in /home5/secondwa/public_html/store/admin/includes/functions/database.php on line 19 Unable to connect to database server!" I tried to revert the settings back to default in both configure.php files and re-uploading them but the error is still occuring. I'm sort of new to this so not sure what to do from here. Thanks for any help!! and here's a link to my store if that helps... www.secondwaveclothing.com/store/ Link to comment Share on other sites More sharing options...
Jan Zonjee Posted December 30, 2008 Share Posted December 30, 2008 (using password: NO) Looks like you removed the password of the database from the configure.php file. Link to comment Share on other sites More sharing options...
Mushfique Posted December 31, 2008 Share Posted December 31, 2008 I am new in OSC. I am trying to install osCommerce but facing a serious trouble. I like to install osc in my root directory. That why I transferred all the files into catalog folder to my host root directory and then change the file attributes (or permission ) to 777 of all directory. Also to catalog->include->configure.php and admin->include->configure.php. After that I started to install. At the 4th step of installation it shows me some warnings. Those are: "Warning: fopen() [function.fopen]: Unable to access /includes/configure.php in /www/uuuq.com/n/o/n/nonamenoname/htdocs/install/templates/pages/install_4.php on line 116 Warning: fopen(/includes/configure.php) [function.fopen]: failed to open stream: No such file or directory in /www/uuuq.com/n/o/n/nonamenoname/htdocs/install/templates/pages/install_4.php on line 116 Warning: fputs(): supplied argument is not a valid stream resource in /www/uuuq.com/n/o/n/nonamenoname/htdocs/install/templates/pages/install_4.php on line 117 Warning: fclose(): supplied argument is not a valid stream resource in /www/uuuq.com/n/o/n/nonamenoname/htdocs/install/templates/pages/install_4.php on line 118 Warning: fopen() [function.fopen]: Unable to access /admin/includes/configure.php in /www/uuuq.com/n/o/n/nonamenoname/htdocs/install/templates/pages/install_4.php on line 152 Warning: fopen(/admin/includes/configure.php) [function.fopen]: failed to open stream: No such file or directory in /www/uuuq.com/n/o/n/nonamenoname/htdocs/install/templates/pages/install_4.php on line 152 Warning: fputs(): supplied argument is not a valid stream resource in /www/uuuq.com/n/o/n/nonamenoname/htdocs/install/templates/pages/install_4.php on line 153 Warning: fclose(): supplied argument is not a valid stream resource in /www/uuuq.com/n/o/n/nonamenoname/htdocs/install/templates/pages/install_4.php on line 154 The installation and configuration was successful! " After that when I visit my site its show me this message: "Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'don't_publish_this_information_on_the_internet'@'localhost' (using password: NO) in /www/uuuq.com/n/o/n/nonamenoname/htdocs/includes/functions/database.php on line 19 Unable to connect to database server!" I have tried a lot but failed. Somebody please help me. Its killing my lot of time.. :angry: Link to comment Share on other sites More sharing options...
atelierbeads Posted January 1, 2009 Share Posted January 1, 2009 Looks like you removed the password of the database from the configure.php file. Actually, that is not the case for this error message. I've just transferred an OSC site from an old to a new server. The new server has stricter security requirements and "prefers" that the configure.php file have permissions set at 444. This does not work, apparently, for some versions of OSC 2.2ms2. The error message is: Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'keep_this_secret'@'localhost' (using password: YES) in /home/nobodiesbusiness/public_html/includes/functions/database.php on line 19 Unable to connect to database server! The new-install page for OSC will put up the warning message "I am able to write to configure.php" and will advise the user to chmod that file to 444. Do that, and you break your site. The only fix I can recommend is to leave those permissions set to 644 and ignore the warning. You may want to get some Maalox for the anxiety that this produces, but I don't see any other way. Oddly enough, the error doesn't come up if you navigate to catalog/admin. I hate to think of the number of people who've re-installed their databases a hundred times or just plain given up on a workable installation, but there you go. Anybody got a better suggestion? Thanks, Anne Link to comment Share on other sites More sharing options...
atelierbeads Posted January 1, 2009 Share Posted January 1, 2009 Actually, that is not the case for this error message. I've just transferred an OSC site from an old to a new server. The new server has stricter security requirements and "prefers" that the configure.php file have permissions set at 444. This does not work, apparently, for some versions of OSC 2.2ms2. The error message is: Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'keep_this_secret'@'localhost' (using password: YES) in /home/nobodiesbusiness/public_html/includes/functions/database.php on line 19 Unable to connect to database server! OK, so now I'm answering my own answer. CHMOD the file and the pink error msg (I am able to write to...) disappears from the main page but persists on all interior pages. I am now officially both exhausted and infuriated. I just changed the permissions back to 444, and all is functioning--for now. Who knows what will happen when the first visitor arrives. Link to comment Share on other sites More sharing options...
♥geoffreywalton Posted January 1, 2009 Share Posted January 1, 2009 Actually it means you have sorted out your first problem, now you need to change your 2 configuration files to point to the the new db location and also to have the correct user name and password in them. Need help installing add ons/contributions, cleaning a hacked site or a bespoke development, check my profile Virus Threat Scanner My Contributions Basic install answers. Click here for Contributions / Add Ons. UK your site. Site Move. Basic design info. For links mentioned in old answers that are no longer here follow this link Useful Threads. If this post was useful, click the Like This button over there ======>>>>>. Link to comment Share on other sites More sharing options...
atelierbeads Posted January 2, 2009 Share Posted January 2, 2009 Actually it means you have sorted out your first problem, now you need to change your 2 configuration files to point to the the new db location and also to have the correct user name and password in them. How I wish that were the case. Of course I'm pretty well tuckered-out by the long hours involved in the migration, but here's how I see it, and there's an unanswered question: 1) The OSC accounts (and a whole bunch of others including some Wordpress and some plain-generic HTML) were moved one at a time from the old to the new server by means of a utility that handles this type of migration. It works exceptionally well in environments where you own both servers. Everything gets moved and restored from files to passwords to rights to email. 2) The OSC accounts on 2.2MS2 required the "register globals" fix. That, too, works just beautifully. Simple edits to four files and you're done. 3) All the OSC sites but one (my own as it happens) came right up and are now happily in service. 4) My own, the one I wrote about here, came up, allowed me to do some test orders, allowed me to go into Admin, and otherwise appeared normal. Time passed. The error appeared. 5) I stopped by here in search of answers and posted my original message. Then I went back and had a look at the configure file and realized it was set to 444. I set it to 644 and the problem appeared to go away. However, when making a test order, I found the dreaded pink "I can write to ..." message. 6) I chmoded the file to 444, fully expecting the "Unable to connect to database" error to show up. It didn't. The site is now happily ticking and purring along, accepting orders and allowing me to administer it. Repeat all of the above for the configure.php in Admin, and you have a pretty good snapshot of the problem (and of how I spent my New Year's Eve :) ) So from where I sit, it looks like a glitch or intermittent problem or something that may or may not be solved. But in general, resetting the permissions to 644 seems to be the way to go to fix it--even though I had to reset them later. Huh. I'm going to babysit all of the sites this weekend, and if I have no further problems, I'm going to call it fixed and credit the guardian angels of tired server admins. Thanks, BTW, to the person who edited my original post. I have no excuse other than fatigue for not changing that information. Happy 2009, everyone! Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.