Sponsored Content
Top Forums Shell Programming and Scripting Crontab PHP scripts not ending Post 302353952 by Corona688 on Wednesday 16th of September 2009 03:30:59 PM
Old 09-16-2009
You might be able to use strace to see if they're waiting on a system call of some sort. And php has the function set-time-limit(). As for why it's doing this, I can't tell without seeing the code.

10 More Discussions You Might Find Interesting

1. UNIX Desktop Questions & Answers

audit to crontab scripts

hi, I have scripts which are running every 3 minutes. The scripts include connection to a database, using sqlplus. Sometimes, the connection fails (invalid username or password, locked user etc..) and the connection returns the error code, to the unix screen or to a file. I want whenever there's... (2 Replies)
Discussion started by: krem
2 Replies

2. Shell Programming and Scripting

Trigger a script by consequtive scripts in crontab

Hello Friends, I've been searching solutions for an exceptional backup case recently, I need someone to guide me, suggest a method pls. In a production system we have backup scripts, they are run by cron one after another, and monthly. There is 1 hour difference between each consecutive script... (1 Reply)
Discussion started by: EAGL€
1 Replies

3. Debian

Problems with Crontab not executing scripts after edit

Hi all I installed Debian and i have a few scripts that outputs what is happening. The wierd part...after fresh install all works ok but after i open or edit Crontab it stops executing the scripts...and scripts runs manually so its not a problem with scripts...what happens is that i usually... (3 Replies)
Discussion started by: ro0t3d
3 Replies

4. Shell Programming and Scripting

Scripts not nunning in CRONTAB

hi, i need to run one script in cron... in that script has connect antoher server and doing sftp for file transfer to another script. and going to be run another script in another server ssh ravikus\@server2 /export/home/ravikus/scripts/GetDetailsC2b.sh it is work fine when i run... (6 Replies)
Discussion started by: rsivasan
6 Replies

5. UNIX for Dummies Questions & Answers

Deleted the scripts in Crontab by mistake

hi, instead of typing crontab -e i gave crontab -r and hit enter. So i lost all my scripts. Is there any way to restore the deleted scripts? Please help me out Thanks Ajay (3 Replies)
Discussion started by: ajayakunuri
3 Replies

6. UNIX for Dummies Questions & Answers

Help with Crontab and Scripts

I'm trying to create a crontab that runs every hour and runs a script in my $HOME/bin directory. Everytime it goes to run it I get this mail. Message 14: From root@xx.xxxx.edu Thu Apr 12 14:03:01 2012 Return-Path: <root@xx.xxxx.edu> X-Original-To: bbowers Delivered-To:... (4 Replies)
Discussion started by: bbowers
4 Replies

7. Shell Programming and Scripting

How to get cron (scripts in crontab) started?

Hi, I have a query related to UNIX Crontab scripts - Issue: Server space on the db server got 100% full as a result of which the cron scripts did not run. The space utilization issue got resolved in the afternoon. The crons scheduled for a time post the resolution caught up. However the... (1 Reply)
Discussion started by: qwerty000
1 Replies

8. Shell Programming and Scripting

Take backup of scripts listed in crontab

Hi, I'm trying to take backups of script files listed in cron tab but,my cron entry has value like this 10 3 * * * /usr/sbin/logadm 15 3 * * 0 /usr/lib/fs/nfs/nfsfind 30 3 * * * && /usr/lib/gss/gsscred_clean #10 3 * * * /usr/lib/krb5/kprop_script ___slave_kdcs___ 00,15,30,45 * * * *... (1 Reply)
Discussion started by: Sivarajan N
1 Replies

9. Shell Programming and Scripting

Log file is not updating when I run shell scripts scheduled thru crontab

Hi Forum, Good Day! I have created an empty html file wtih permissoin 777 created shell script(with permission 777) , code is below. #=======================start============== . /data09/oracle/apps_st/appl/D_oraapp095.env rm -rf /home/mnp/Test_log.txt echo... (1 Reply)
Discussion started by: kartheekbk
1 Replies

10. Shell Programming and Scripting

Multiple scripts in one single script - crontab

Hello all, Hope all's well. i'm not sure if this is possible but i have some scripts running in a crontab with different intervals, 1min, 5 min, etc. As for a "cleaner" and better control of these scripts (as by time we will have hundred's of scripts used for the same purpose, i.e for Nagios... (4 Replies)
Discussion started by: nms
4 Replies
Apache::TestRunPHP(3)					User Contributed Perl Documentation				     Apache::TestRunPHP(3)

Apache::TestRunPHP - configure and run a PHP-based test suite SYNOPSIS
use Apache::TestRunPHP; Apache::TestRunPHP->new->run(@ARGV); DESCRIPTION
The "Apache::TestRunPHP" package controls the configuration and running of the test suite for PHP-based tests. It's a subclass of "Apache::TestRun" and similar in function to "Apache::TestRunPerl". Refer to the "Apache::TestRun" manpage for information on the available API. EXAMPLE
"TestRunPHP" works almost identially to "TestRunPerl", but in case you are new to "Apache-Test" here is a quick getting started guide. be sure to see the links at the end of this document for places to find additional details. because "Apache-Test" is a Perl-based testing framework we start from a "Makefile.PL", which should have the following lines (in addition to the standard "Makefile.PL" parts): use Apache::TestMM qw(test clean); use Apache::TestRunPHP (); Apache::TestMM::filter_args(); Apache::TestRunPHP->generate_script(); "generate_script()" will create a script named "t/TEST", the gateway to the Perl testing harness and what is invoked when you call "make test". "filter_args()" accepts some "Apache::Test"-specific arguments and passes them along. for example, to point to a specific "httpd" installation you would invoke "Makefile.PL" as follows $ perl Makefile.PL -httpd /my/local/apache/bin/httpd and "/my/local/apache/bin/httpd" will be propagated throughout the rest of the process. note that PHP needs to be active within Apache prior to configuring the test framework as shown above, either by virtue of PHP being compiled into the "httpd" binary statically or through an active "LoadModule" statement within the configuration located in "/my/local/apache/conf/httpd.conf". Other required modules are the (very common) mod_alias and mod_env. now, like with "Apache::TestRun" and "Apache::TestRunPerl", you can place client-side Perl test scripts under "t/", such as "t/01basic.t", and "Apache-Test" will run these scripts when you call "make test". however, what makes "Apache::TestRunPHP" unique is some added magic specifically tailored to a PHP environment. here are the mechanics. "Apache::TestRunPHP" will look for PHP test scripts in that match the following pattern t/response/TestFoo/bar.php where "Foo" and "bar" can be anything you like, and "t/response/Test*" is case sensitive. when this format is adhered to, "Apache::TestRunPHP" will create an associated Perl test script called "t/foo/bar.t", which will be executed when you call "make test". all "bar.t" does is issue a simple GET to "bar.php", leaving the actual testing to "bar.php". in essence, you can forget that "bar.t" even exists. what does "bar.php" look like? here is an example: <?php print "1..1 "; print "ok 1 " ?> if it looks odd, that's ok because it is. I could explain to you exactly what this means, but it isn't important to understand the gory details. instead, it is sufficient to understand that when "Apache::Test" calls "bar.php" it feeds the results directly to "Test::Harness", a module that comes with every Perl installation, and "Test::Harness" expects what it receives to be formated in a very specific way. by itself, all of this is pretty useless, so "Apache::Test" provides PHP testers with something much better. here is a much better example: <?php # import the Test::More emulation layer # see # http://search.cpan.org/dist/Test-Simple/lib/Test/More.pm # for Perl's documentation - these functions should behave # in the same way require 'test-more.php'; # plan() the number of tests plan(6); # call ok() for each test you plan ok ('foo' == 'foo', 'foo is equal to foo'); ok ('foo' != 'foo', 'foo is not equal to foo'); # ok() can be other things as well is ('bar', 'bar', 'bar is bar'); is ('baz', 'bar', 'baz is baz'); isnt ('bar', 'beer', 'bar is not beer'); like ('bar', '/ar$/', 'bar matches ar$'); diag("printing some debugging information"); # whoops! one too many tests. I wonder what will happen... is ('biff', 'biff', 'baz is a baz'); ?> the include library "test-more.php" is automatically generated by "Apache::TestConfigPHP" and configurations tweaked in such a a way that your PHP scripts can find it without issue. the functions provided by "test-more.php" are equivalent in name and function to those in "Test::More", a standard Perl testing library, so you can see that manpage for details on the syntax and functionality of each. at this point, we have enough in place to run some tests from PHP-land - a "Makefile.PL" to configure Apache for us, and a PHP script in "t/response/TestFoo/bar.php" to send some results out to the testing engine. issuing "make test" would start Apache, issue the request to "bar.php", generate a report, and shut down Apache. the report would look like something like this after running the tests in verbose mode (eg "make test TEST_VERBOSE=1"): t/php/bar....1..6 ok 1 - foo is equal to foo not ok 2 - foo is not equal to foo # Failed test (/src/devel/perl-php-test/t/response/TestFoo/bar.php at line 13) ok 3 - bar is bar not ok 4 - baz is baz # Failed test (/src/devel/perl-php-test/t/response/TestFoo/bar.php at line 17) # got: 'baz' # expected: 'bar' ok 5 - bar is not beer ok 6 - bar matches ar$ # printing some debugging information ok 7 - baz is a baz FAILED tests 2, 4, 7 Failed 3/6 tests, 50.00% okay Failed Test Stat Wstat Total Fail Failed List of Failed ------------------------------------------------------------------------------- t/php/bar.t 6 3 50.00% 2 4 7 Failed 1/1 test scripts, 0.00% okay. 1/6 subtests failed, 83.33% okay. note that the actual test file that was run was "t/php/bar.t". this file is autogenerated based on the "t/response/TestFoo/bar.php" pattern of your PHP script. "t/php/bar.t" happens to be written in Perl, but you really don't need to worry about it too much. as an interesting aside, if you are using perl-5.8.3 or later you can actually create your own "t/foo.php" client-side scripts and they will be run via php (using our "php.ini"). but more on that later... SEE ALSO
the best source of information about using Apache-Test with PHP (at this time) is probably the talk given at ApacheCon 2004 (<http://xrl.us/phpperl>), as well as the code from the talk (<http://xrl.us/phpperlcode>). there is also the online tutorial <http://perl.apache.org/docs/general/testing/testing.html> which has all of the mod_perl-specific syntax and features have been ported to PHP with this class. AUTHOR
"Apache-Test" is a community effort, maintained by a group of dedicated volunteers. Questions can be asked at the test-dev <at> httpd.apache.org list For more information see: http://httpd.apache.org/test/. perl v5.12.1 2007-12-31 Apache::TestRunPHP(3)

Featured Tech Videos

All times are GMT -4. The time now is 03:22 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy