Miriam Posted November 30, 2005 Share Posted November 30, 2005 I have configured the dbsender.php script with the top line of #! /usr/bin/php -q as per the instructions within the script. I have set up the cron job as: php -q /home/USERNAME/dbsender/dbsender.php >dev/null based on info from other threads. I'm requesting the file to be sent by email. I'm receiving an email that says: /bin/sh: dev/null: No such file or directory I have uploaded the script above html_public into a directory called dbsender. I have chmoded the dbsender directory to 770 and the dbsender.php file to 770. Any help will be appreciated. Thanks Quote Link to comment Share on other sites More sharing options...
TCH-Bruce Posted November 30, 2005 Share Posted November 30, 2005 I use dbsender and here's how I have mine configured. I did not add the #! /usr/bin/php -q to the top of the file as you did. My dbsender folder is 770, the script itself is 644 My cron command is: >/use/bin/php -q /home/USERNAME/dbsender/dbsender.php Quote Link to comment Share on other sites More sharing options...
Miriam Posted November 30, 2005 Author Share Posted November 30, 2005 I use dbsender and here's how I have mine configured. I did not add the #! /usr/bin/php -q to the top of the file as you did. My dbsender folder is 770, the script itself is 644 My cron command is: >/use/bin/php -q /home/USERNAME/dbsender/dbsender.php I'm now receiving two emails, one says the database file has been backed up and is attached, and the other contains this message: sh: /dbsender/fDATABASE_NAME-113005-0253pm.sql: No such file or directory tar: DATABASE_NAME-113005-0253pm.sql: Cannot stat: No such file or directory tar: Error exit delayed from previous errors sh: ncftpput: command not found The file attachment is actually empty. Any ideas what's wrong? Thanks Quote Link to comment Share on other sites More sharing options...
TCH-Bruce Posted November 30, 2005 Share Posted November 30, 2005 Are you trying to use FTP? I am sending via email. Check also to make sure you configure the following variables correctly. >// configure your database variables below: $dbhost = 'localhost'; // Server address of your MySQL Server $dbuser = 'cpanelname_user-for-db'; // Username to access MySQL database $dbpass = 'password-for-database-user'; // Password to access MySQL database $dbname = 'cpanelname_databasename'; // Database Name Quote Link to comment Share on other sites More sharing options...
Miriam Posted December 1, 2005 Author Share Posted December 1, 2005 Are you trying to use FTP? I am sending via email. Check also to make sure you configure the following variables correctly. >// configure your database variables below: $dbhost = 'localhost'; // Server address of your MySQL Server $dbuser = 'cpanelname_user-for-db'; // Username to access MySQL database $dbpass = 'password-for-database-user'; // Password to access MySQL database $dbname = 'cpanelname_databasename'; // Database Name I'm trying to send via email. I have checked the configuration, and I think I have it correct, as you have shown, with both the cpanelname as the prefix then an underscore, then the actual database/user name. Do you have any idea why it can't actually write anything to the file? Miriam Quote Link to comment Share on other sites More sharing options...
TCH-Bruce Posted December 1, 2005 Share Posted December 1, 2005 Fixed in PM. The problem was in the script you are required to enter a path to the script. That path is the full path to the script and not just /folder-name. So it should look like this. >/home/cpanelname/folder-name Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.