07-09-2008
You should write a shell script that execute your php code...
And remember to set all the variables you need in that script including whole PATH to php...
10 More Discussions You Might Find Interesting
1. Programming
i have shell script. when i run in normail mode..it run ok but when i use crontab command to set that program run in certain time it give an error.
error 'SQLPLUS cannot execute'
what the problem.i already set all the correct path and use both root and normal id but still cannot execute properly. (1 Reply)
Discussion started by: zikronz
1 Replies
2. UNIX for Dummies Questions & Answers
hello. we are porting over from HPUX Shell to Linux.
my default shell is bash so i can no longer schedule to execute a sh script in crontab.
can anyone pls help me out? I searched the site but didnt find any details.
thanks! (1 Reply)
Discussion started by: jigarlakhani
1 Replies
3. UNIX for Advanced & Expert Users
Hi,
on AIX 6.1, I put in crontab ,execution of myscript. But it sends back the following error :
myscript.sh: rman: not found
And in myscript I have :
rman catalog rman/**@rep target / LOG=file.log << EOF
run
{
allocate channel t1 type disk;
.........
}
exit
EOF... (1 Reply)
Discussion started by: big123456
1 Replies
4. Shell Programming and Scripting
Hello All,
This is driving me nuts. Wrote a very simple script (it's in csh so sorry about that). Just something very simple though. Here is the catch. Works great from command line sometimes. Other times it runs no errors or anything but I never receive an email. Never runs from crontab... (6 Replies)
Discussion started by: jacktay
6 Replies
5. Red Hat
Dear!
I've 2 scripts backup Oracle database in crontab environment, however, I found they did not execute. The cron is here
$ crontab -l
30 2 * * 0 sh /cloudbck/level0/level0.sh
19 3 * * * sh /cloudbck/level1/level1.sh
Then, I tried to find how did they not run by looking up... (8 Replies)
Discussion started by: trantuananh24hg
8 Replies
6. Programming
Dear community,
I'm driving crazy with a strange issue.
I have a simple script to transfer a file to a remote system:#!/bin/bash
echo "put /tmp/server.log" > /tmp/server1_transfer.sftp
sftp -b /tmp/server1_transfer.sftp user@10.99.1.2:Between client and server there is a SSH KEY, so if I run... (15 Replies)
Discussion started by: Lord Spectre
15 Replies
7. Red Hat
Greetings/
I have a script listed in my roots crontab
07 9 * * * /opt/HLRSDATA_2010_OCT/HLRS_Scheduler_sp.sh > /opt/HLRSDATA_2010_OCT/logs/HLRTKJob.log
This script contains the following
#!/bin/bash
echo HLRSData Scheduler
cd /opt/HLRSDATA_2010_OCT
/usr/bin/java -Xms32m -Xmx1024m -cp... (6 Replies)
Discussion started by: RedSpyder
6 Replies
8. Shell Programming and Scripting
Hello All,
I have a crontab schedule and its executing a script that is calling another script and does not execute.
Crontab : ***** /test.sh
and in test.sh
/usr/local/file.sh
and in file.sh
webproxy -l 192.168.1.151
But when I run the script (test.sh) directly it works. But using... (1 Reply)
Discussion started by: Shaan_Shaan
1 Replies
9. Shell Programming and Scripting
cat /home/lyang001/update.sh
#!/bin/sh
#shopt -s expand_aliases
HOME_DIR=/home/lyang001/updates
UPDATE_MAIL=${HOME_DIR}/updates.mail
rm $UPDATE_MAIL -rf
cd $HOME_DIR/wr-kernel
git log --no-merges --since="20 day ago" --name-status --pretty=format:"%an %h %s %cd" origin/WRLINUX_5_0_1_HEAD >>... (2 Replies)
Discussion started by: yanglei_fage
2 Replies
10. Shell Programming and Scripting
Can someone please help me on how to schedule script to run every 45 days in crontab ?
Thanks,
Prince (5 Replies)
Discussion started by: prince1987
5 Replies
LEARN ABOUT PHP
php_check_syntax
PHP_CHECK_SYNTAX(3) 1 PHP_CHECK_SYNTAX(3)
php_check_syntax - Check the PHP syntax of (and execute) the specified file
SYNOPSIS
bool php_check_syntax (string $filename, [string &$error_message])
DESCRIPTION
Performs a syntax (lint) check on the specified $filename testing for scripting errors.
This is similar to using php -l from the commandline except that this function will execute (but not output) the checked $filename.
For example, if a function is defined in $filename, this defined function will be available to the file that executed php_check_syntax(3),
but output from $filename will be suppressed.
Note
For technical reasons, this function is deprecated and removed from PHP. Instead, use php -l somefile.php from the commandline.
PARAMETERS
o $filename
- The name of the file being checked.
o $error_message
- If the $error_message parameter is used, it will contain the error message generated by the syntax check. $error_message is
passed by reference.
RETURN VALUES
Returns TRUE if the lint check passed, and FALSE if the link check failed or if $filename cannot be opened.
CHANGELOG
+--------+---------------------------------------------------+
|Version | |
| | |
| | Description |
| | |
+--------+---------------------------------------------------+
| 5.0.5 | |
| | |
| | This function was removed from PHP. |
| | |
| 5.0.3 | |
| | |
| | Calling exit(3) after php_check_syntax(3) |
| | resulted in a Segfault. |
| | |
| 5.0.1 | |
| | |
| | $error_message is passed by reference. |
| | |
+--------+---------------------------------------------------+
EXAMPLES
php -l somefile.php
The above example will output something similar to:
PHP Parse error: unexpected T_STRING in /tmp/somefile.php on line 81
SEE ALSO
include(3), is_readable(3).
PHP Documentation Group PHP_CHECK_SYNTAX(3)