Same as many others: Error 404 after install

Help with getting the CMS CORE package up and running. This does not include 3rd party modules, PHP scripts, anything downloaded via module manager or from any external source.
Locked
10010110

Same as many others: Error 404 after install

Post by 10010110 »

Hi there,

Although there are already some other threads about this issue I thought I'd create a new one and not just butt in somewhere else.
I've done my homeworks and searched for a possible solution on this forum and I even found some answers but they didn't help me so far or I have more questions about it.

OK, I followed the steps in the install guide thoroughly except of skipping step 6 (create new database) because I'm trying to switch over from another CMS and wanna keep the info stored in the current database.
I also made sure that the document root path and stuff is correct in the config.php (it was right from the beginning).

I think the problem is the access/login to/for the database. In some other thread I read that the DB host name might be something else than "localhost". But how can I get that info? All info I've got is the DB name, user name, and password.
I also read some other guys had problems with the /cgi-system/php.cg but I don't even have this directory/file.
Oh and I read that if the "create new table and delete all data" checkbox is unchecked when installing it may cause problems because the website encounters empty DB tables then (or something like this). But I can't delete all the data because it's a running website and my boss will kill me if I screw up anything. What could happen if I just check that checkbox? Will really all data be gone?

I'm really inexperienced when it comes to databases and I fear to screw up anything. I'd try it out myself but as I said: this is a running system and to mess around with it can lead to serious problems.

I can show you my phpinfo if that helps: http://exoticpublishing.com/phptest.php
And here is what it says when I try to access the login area directly:

Code: Select all

Warning: mysql_real_escape_string() [function.mysql-real-escape-string]: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) in /var/www/exoticpublishing.com/httpdocs/cmsmadesimple/lib/adodb_lite/adodbSQL_drivers/mysql/mysql_driver.inc on line 174

Warning: mysql_real_escape_string() [function.mysql-real-escape-string]: A link to the server could not be established in /var/www/exoticpublishing.com/httpdocs/cmsmadesimple/lib/adodb_lite/adodbSQL_drivers/mysql/mysql_driver.inc on line 174

Warning: Cannot modify header information - headers already sent by (output started at /var/www/exoticpublishing.com/httpdocs/cmsmadesimple/lib/adodb_lite/adodbSQL_drivers/mysql/mysql_driver.inc:174) in /var/www/exoticpublishing.com/httpdocs/cmsmadesimple/admin/login.php on line 155

Warning: Cannot modify header information - headers already sent by (output started at /var/www/exoticpublishing.com/httpdocs/cmsmadesimple/lib/adodb_lite/adodbSQL_drivers/mysql/mysql_driver.inc:174) in /var/www/exoticpublishing.com/httpdocs/cmsmadesimple/admin/login.php on line 156
I hope this is an easy to solve issue because I'm really sick of encountering problems (that's the reason why I'm switching to a new CMS).
I'm very, very grateful for any help. Thanks in advance,

Stephan.
Dee
Power Poster
Power Poster
Posts: 1197
Joined: Sun Mar 19, 2006 8:46 pm

Re: Same as many others: Error 404 after install

Post by Dee »

The errormessage (Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock') suggests there is no connection to the database. It uses the database info from the config file (which is the info entered during install). Normally you can use localhost for database host, otherwise it should be in the mysql info you get from your hosting provider.
10010110

Re: Same as many others: Error 404 after install

Post by 10010110 »

Dee wrote: The errormessage (Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock') suggests there is no connection to the database. It uses the database info from the config file (which is the info entered during install).
Yeah, I figured all that (even without any database knowledge) but why is this happening and how can this be fixed? What are the steps to make? Where do I have to look? What do I have to search for? ???
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: Same as many others: Error 404 after install

Post by Dr.CSS »

Have you tried to install it and use a new DB as in make one in the same mySQL with a new table prefix so it will live along side the existing one, the install shows it as cms_ ?
Dee
Power Poster
Power Poster
Posts: 1197
Joined: Sun Mar 19, 2006 8:46 pm

Re: Same as many others: Error 404 after install

Post by Dee »

10010110 wrote: Yeah, I figured all that (even without any database knowledge) but why is this happening and how can this be fixed? What are the steps to make? Where do I have to look? What do I have to search for? ???
It should only happen when you enter incorrect database info during install (or if you change config.php afterwards with wrong settings).
Check these settings in config.php:

Code: Select all

$config['dbms'] = 'mysql'; // don't change this
$config['db_hostname'] = 'localhost'; // normally no need to change this
$config['db_username'] = 'youruser'; // the MySQL username
$config['db_password'] = 'yourpass'; // the MySQL password
$config['db_name'] = 'cms'; // the name of the database
10010110 wrote: Oh and I read that if the "create new table and delete all data" checkbox is unchecked when installing it may cause problems because the website encounters empty DB tables then (or something like this). But I can't delete all the data because it's a running website and my boss will kill me if I screw up anything. What could happen if I just check that checkbox? Will really all data be gone?
If you check "Create Tables (Warning: Deletes existing data)" then all tables needed for the CMS are created (but if they exist already they are dropped, hence the warning - you'd loose any existing CMS data from a previous install). When the default table prefix (cms_) is used, this is usually harmless (then only tables like cms_users, cms_events, cms_version, etc are dropped before creation). Without using a prefix there's a chance you loose existing (non-CMS) data (for example if a table named users already exists, it will be dropped and a new users table for CMSMS would be created), so that's not advisable in your case.
Last edited by Anonymous on Fri Sep 01, 2006 8:10 pm, edited 1 time in total.
10010110

Re: Same as many others: Error 404 after install

Post by 10010110 »

Aaah, it was indeed the hostname that wasn't "localhost". After asking three times finally somebody told me that I have to change it. :)
However, although the connection error messages aren't occuring anymore it's not quite working yet. It still can't find the index page and doesn't recognize my password. Can I change the password afterwards in some file?

And mark, yes, I'm using the prefix.

I'm gonna browse the other posts with the same problem, maybe I find something that helps. But still, I'm very grateful for any input from you wise guys. :)
Dee
Power Poster
Power Poster
Posts: 1197
Joined: Sun Mar 19, 2006 8:46 pm

Re: Same as many others: Error 404 after install

Post by Dee »

You did do an install with "Create Tables (Warning: Deletes existing data)" checked? Otherwise the tables are not created/present and the CMS won't work then.
The password can be changed in the database (if you have access), it's the 'password' field in the 'cms_users' table (use the MD5 function to encrypt it). (see http://forum.cmsmadesimple.org/index.ph ... l#msg16270)
10010110

Re: Same as many others: Error 404 after install

Post by 10010110 »

Thanks a lot, guys. It's working now!  :D
I deleted everything and reinstalled it with the right host name and creating new tables (with prefix). It was so simple it almost hurts. :D

Thanks again, I owe you. :)
HighNoon

Re: Same as many others: Error 404 after install

Post by HighNoon »

10010110 wrote: Thanks a lot, guys. It's working now!  :D
I deleted everything and reinstalled it with the right host name and creating new tables (with prefix). It was so simple it almost hurts. :D

Thanks again, I owe you. :)
Appreciate if you coluld elobrate .. better still wrote of a step by step guide.

I have the problem, and am certain that I have done thing right.

HighNoon
Locked

Return to “[locked] Installation, Setup and Upgrade”