glk Posted January 27, 2004 Share Posted January 27, 2004 Hi folks, Boy! I was so proud of myself yesterday after successfully installing a working package of the osCommerce shopping cart - not without a few glitches, but I did great for a first-timer. Retiring late and tired last night, I forgot to set admin restrictions to the public .. and lo and behold, this a:m I noticed a "John Doe" had somehow surfed on my site, and "played with some files. This red-flagged me, although it could have been perfectly innocent. My shopping cart was working fine but I immediately changed my sql database password. That was the last I saw of my working shopping cart. After changing the password, when I went to my catalog URL or catalog/admin, I no longer could get my catalog site nor my OSC control panel. Now I feel really stupid. I should have left well enough alone. All I get now is: "Warning: Unknown MySQL Server Host in /homepages/htdocs/catalog/admin/includes/functions/database.php on line 19" "Warning: MySQL Connection Failed: Unknown MySQL Server Host (2) in /homepages/htdocs/catalog/admin/includes/functions/database.php on line 19 Unable to connect to database server!" Thinking the problem was server side, I deleted my sql database from within my server's control panel and reinstalled it over the old one with a new password. But I still get these same WARNINGS. Could someone spell out where line 19 is in the database.php file - do I start counting lines from the very first <?php at the top, including empty lines? - And how exactly is it written - in really basic php - (like, duh) directions - ie; Syntax for Dummies"? Also, I tried locking out the online phpMyAdmin from the WISE-FTP and it won't take. It keeps denying. IS there a reason for that? And also, where can I pick up a tiny script to make a htaccess file to disallow access to some of my directories? I have no inkling what to write in it. I've been following the posts here for days now. I'm learning thanks to all of you expecially the experts here that give their time and knowledge. Thanks to the developers of OS COMMERCE, VERY VERY MUCH. Regards. GL Kyres Florida GLK Link to comment Share on other sites More sharing options...
McGinTech Posted January 27, 2004 Share Posted January 27, 2004 Hi GL, The first thing you need to know is that the osCommerce default install includes a user named "John Doe". So, most likely no one has done anything to your store, but it is possible that someone logged in as john doe and tooled around the site. No big deal really, but you might want to start from scratch anyway...its good practice. The reason you are getting the database errors over and over again is because you changed your password in the database (the first time) and then assigned a new password when you reinstalled (the second time) but you most likely did not update your configure.php file to reflect the password change. You must edit catalog/includes/configure.php and admin/includes/configure.php in order to get the database working again. Don't worry about editing database.php, you don't need to do this. The error is just reporting to you where the error happens to occur, but the problem is really your password settings in configure.php Get a good editor which will show you line numbers....you will go crazy trying to count lines of code. Here are some good ones: Windows ==> EditPlus Download at http://www.editplus.com Linux ==> VI or VIM or EMACS Look into these if you are on linux. Do yourself a favor and read the man pages for whichever one you choose. You said: "Also, I tried locking out the online phpMyAdmin from the WISE-FTP and it won't take. It keeps denying. IS there a reason for that?" I don't really know what you mean, but if you mean that you tried changing the file permissions on the directory which holds phpMyAdmin, then I would advise you to do it from the command line if possible. Also, you should protect this directory with a .htaccess file. Your host should be able to help you with this. I suggest you do a google search on how to make a .htaccess file and/or read the manual for your web server (I'm assuming its apache.) You can find the info you need here => http://httpd.apache.org/docs/howto/auth.html Hope that helps. McGinTech Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.