Jump to content

IRC bot loses MySQL connection when SSH session terminates


GameQber

Recommended Posts

Hi,

 

I'm trying to get a PHP script to stay connected to a MySQL database after my SSH terminal disconnects from its session.

 

I have been using GNU Screen to start the script (with the command: "noahup php run.php"). I can then close out of Screen, and the bot continues to run and communicate with the MySQL database for hours on end.

 

BUT, the instant I completely disconnect from the SSH session, communication with the MySQL database terminates. The bot continues to stay connected on IRC, but will no longer talk to the database.

 

If I reconnect via SSH and go back into my Screen session, the connection to the MySQL database comes back to life.

 

 

How can I fix this? Thanks!

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.