how to run php script in linux if php install

November 2, 2010 at 01:38:05
Specs: Windows 7
I have a php script for backup of database now i have to schedule backup but i don't know how to run it from crontab or command prompt because my php is running under xampp server.

See More: how to run php script in linux if php install

Report •

#1
November 2, 2010 at 03:41:02
php /path_to/script/script_name

The original poster should always write the last response !!!
Let us know, if the problem is solved !!!


Report •

#2
November 2, 2010 at 04:06:16
Hi Paulsep Thanks for qucik response i tried this but its giving me the following error

the error was call to undefined function : mysql_connect () in
> /opt/lampp/tdocs/bckp/dbbackup.php on line 28

But When i m running my script through browser its working fine.


Report •

#3
November 2, 2010 at 05:08:46
I guess you php is not compiled for mysql.
Therefore, you need to compile php with the parameter --with-mysql.

The original poster should always write the last response !!!
Let us know, if the problem is solved !!!


Report •

Related Solutions

#4
November 2, 2010 at 05:32:10
But my script is working fine when i am running it from browser only problem when i am trying to run it from command prompt and as you are suggestion i have to compile php with the parameter --with-mysql. Can you please tell me wht do for that.it is a bit urgent as i have to schedule backup for my production server.

Report •

#5
November 2, 2010 at 16:59:09
Read this:
http://www.php.net/manual/en/mysql....

The original poster should always write the last response !!!
Let us know, if the problem is solved !!!


Report •

Ask Question