Linux Help
guides forums blogs
Home Desktops Distributions ISO Images Logos Newbies Reviews Software Support & Resources Linuxhelp Wiki

Welcome Guest ( Log In | Register )



Advanced DNS Management
New ZoneEdit. New Managment.

FREE DNS Is Back

Sign Up Now
 
Reply to this topicStart new topic
> Backups with php and cron, Finding the path
4907
post May 6 2006, 01:10 AM
Post #1


Whats this Lie-nix Thing?
*

Group: Members
Posts: 1
Joined: 6-May 06
Member No.: 6,333



I am trying to set up an automatic db and files backup system and since all I know of Linux is rather scarce I can't figure out what I'm doing wrong with the relative or absolute paths to have a php script run through cron. The script itself doesn't seem to be a problem; manual backups work allright.
**********************************************
Linux server (dns hostname) 2.4.21-40.EL #1 (all I could find in phpinfo)
Php 5.05 as Apache module (1.3.31)
Access to cron through Cpanel GUI
No shell access
Host emergency 24X7 support ... dead
File permissions for script directory set to 755
***********************************************
Here is the script to be executed, bckpp.php:
CODE
<?php
// This code was created by phpMyBackupPro v.1.8
$_POST['db']=array("db_bcal", "db_cbr", "db_frm",  );
$_POST['tables']="on";
$_POST['data']="on";
$_POST['drop']="on";
$_POST['zip']="gzip";
$period=(3600*24)*0;
$security_key="e9bb66605399852f9d91327e8b230977";
// This is the relative path to the phpMyBackupPro v.1.8 directory
@chdir("../bckp/");
(- and I tried this also
@chdir("/home/myusername/public_html/bckp/");)
@include("backup.php");
?>

"backup.php" being in hxxp://wxw.domain.tld/bckp/

Now the cron command through Cpanel's GUI (frequency for test purpose only):
CODE
* * * * * curl -s -o /dev/null hxxp://wxw.domain.tld/tmp/bckpp.php


And the cron daemon's reply:
CODE
/bin/sh: line 1: backups: command not found


Anyone ? Thanks.
Go to the top of the page
 
+Quote Post
Termina
post May 14 2006, 12:14 PM
Post #2


RMS is my Hero
******

Group: Support Specialist
Posts: 862
Joined: 18-February 04
From: Wisconsin
Member No.: 2,404



No shell access? That blows. >:( You might want to consider dreamhost.com

Nothing you've shown us would give the following error:

/bin/sh: line 1: backups: command not found

I have to assume that your 'backup.php' is at fault here. Since it's giving you the above error, you're probably not giving the correct path for 'backups' (if this is a script you use; if not, probably a typo or mistake in backup.php).

Make sure that the absolute path is given for 'backups'.


--------------------
*Points finger at the author above him* They're a witch! Burn them!
---
Vist my website!
Join me in IRC! Server: st0rage.org Channel: #UnhandledExceptions
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 18th December 2017 - 11:46 AM