Go Back   TechArena Community > Software > Software Development
Become a Member!
Forgot your username/password?
Tags Active Topics RSS Search Mark Forums Read

Reply
 
Thread Tools Search this Thread
  #1  
Old 14-10-2009
Member
 
Join Date: Jun 2009
Posts: 83
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?
Reply With Quote
  #2  
Old 14-10-2009
Member
 
Join Date: Nov 2008
Posts: 1,192
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.
Reply With Quote
  #3  
Old 14-10-2009
Member
 
Join Date: Nov 2005
Posts: 1,323
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.
Reply With Quote
  #4  
Old 14-10-2009
Member
 
Join Date: May 2008
Posts: 685
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
Reply With Quote
Reply

  TechArena Community > Software > Software Development
Tags: , ,



Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "Fatal error on website built in PHP/MySQL"
Thread Thread Starter Forum Replies Last Post
Getting error "ERROR #1 (0x13370001) Fatal ExceptionERROR #1 (0x13370001) Fatal Exception" while installing Diablo III eDDy.Gueraro Video Games 5 19-03-2012 09:48 AM
?Fatal Error Missing File NeroPatentActivation.exe? error message appearing in nero 11 Mounil Windows Software 5 08-03-2012 09:44 AM
Mysql Error : Can't connect to local mysql server through socket ' var lib mysql mysql.sock' 2 roshan45 Software Development 3 07-11-2009 09:36 PM
How to Connect to MySQL database on my website? Zombi Software Development 3 24-09-2009 01:23 PM
Error 1603: A fatal error while installing hp officejet 7410xi in Windows Vista RIMON Hardware Peripherals 4 25-05-2009 11:35 PM


All times are GMT +5.5. The time now is 04:42 AM.