Fatal error on website built in PHP/MySQL
One of my friends had problems with his former host and ask me if I could help with his site PHP/MYSQL. I give it everything he could retrieve the ftp root but could not retrieve the database
So I start by copying everything, but I get this error message
Warning: mysql_pconnect() [function.mysql-pconnect]: Can't connect to local MySQL server through socket '/tmp/mysqld.sock' (2) in /homepages/27/d285131543/htdocs/THESITE/www/Connections/dbconnect.php on line 9
Fatal error: Can't connect to local MySQL server through socket '/tmp/mysqld.sock' (2) in /homepages/27/d285131543/htdocs/THESITE/www/Connections/dbconnect.php on line 9
So I create an empty mysql database and change the dbconnect.php
But what I get this error message
Fatal error: Cannot redeclare __autoload() (previously declared in /homepages/27/d285131543/htdocs/THESITE/www/includes/tng/tNG.inc.php:87) in /homepages/27/d285131543/htdocs/THESITE/www/includes/tng/tNG.inc.php on line 303
Can someone please help me? Is this problem of PHP or MySQL?
Re: Fatal error on website built in PHP/MySQL
'/tmp/mysqld.sock' -> I think that is the directory /tmp that does not exist or you do not have the correct rights
Cannot redeclare __autoload() -> method has been reported 2 times, you must remove it from one place.
Re: Fatal error on website built in PHP/MySQL
- Backup the database - which had to be done regularly
- Documentation Program
Otherwise, if a CMS, you should be able to leave this in installing and export/import of database.
And if the "home" program is undocumented, without backup. Good for him!
Ultimately, if the BDD has been built correctly, it will peel all the code to get information on the database (tables => fields, logical links between tables, etc..) And try to rebuild the database from there ...
But in this case, it might be altogether easier to redo the program, by documenting and including regular automated backups.
Re: Fatal error on website built in PHP/MySQL
Well for the first message "Can not connect to local MySQL server ..." it's just that you have provided wrong logins to the database, check it once again.
For the second problem, go to line 303 in your file /includes/tng/tNG.inc.php and put it around your function __autoload:
Quote:
if(!function_exists(__autoload)) {
}
It should at least avoid you having fatal error and allow you to move a little