Date: 11/20/00
- Next message: hholzgra <email protected>: "[PHP-DEV] PHP 4.0 Bug #6423 Updated: mod_python & PHP don't compile both static with apache"
- Previous message: Bug Database: "[PHP-DEV] Bug #7614 Updated: functions/recode.c fails to compile as extension module"
- Next in thread: colin <email protected>: "[PHP-DEV] PHP 4.0 Bug #7503 Updated: scripts run from CGI output "#!/usr/local/bin/php -q" line"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
ID: 7503
Updated by: jason
Reported By: colin <email protected>
Status: Open
Bug Type: Performance problem
Assigned To:
Comments:
The way you are using this should not have any problems.
I have not been able to reproduce this. What is your compile string?
Also, can you try running the standalone as follows? :
/path/to/php /path/to/test-file.php
By the way, a temporary work around for your cron job, until we solve your problem would be
grep -v '#!' /path/to/my/script.phx | /path/to/php
Previous Comments:
---------------------------------------------------------------------------
[2000-11-20 16:00:55] colin <email protected>
I'm not running them through STDIN.
I'm running them right from the command line:
./script.phx
...or from cron:
15 1,13 * * * /path/to/my/script.phx
Or am I misunderstanding you?
(the script files start with "#!/path/to/php -q")
- Colin
---------------------------------------------------------------------------
[2000-11-20 15:35:00] jason <email protected>
You must be running them through stdin ex "php < file".
If so, this is not a bug
If you are using shebang, you should just execute the script ./script. If you have to run php manualy then you will need to pass files in as args, not as stdin
ex. php file1.php
---------------------------------------------------------------------------
[2000-11-16 15:15:55] colin <email protected>
Just to follow up ...
I get the hash-bang line output even when running the script from the shell (i.e. not from cron).
Help!
---------------------------------------------------------------------------
[2000-10-28 01:52:59] colin <email protected>
I run several PHP scripts from cron. Since updating to PHP 4.0.3pl1, these scripts (which did not, and do not, output anything to STDOUT) have started to output the "hash-bang" line.
A sample email I receive:
--8<----------------------------
Return-Path: <root>
Received: (from root <email protected>)
by xxx.easydns.com (8.11.0/8.11.0) id e9R3j4K17414
for root; Thu, 26 Oct 2000 23:45:04 -0400
Date: Thu, 26 Oct 2000 23:45:04 -0400
Message-Id: <200010270345.e9R3j4K17414 <email protected>>
From: root (Cron Daemon)
To: root
Subject: Cron <root <email protected>> /usr/local/scripts/bin/daily_acc.phx
X-Cron-Env: <SHELL=/bin/sh>
X-Cron-Env: <HOME=/root>
X-Cron-Env: <PATH=/usr/bin:/bin>
X-Cron-Env: <LOGNAME=root>
#!/usr/local/bin/php -q
--8<----------------------------
I've triple checked for extraneous whitespace in the scripts, and found none. Even if there were, that shouldn't be the problem.
Ideas?
- Colin
---------------------------------------------------------------------------
Full Bug description available at: http://bugs.php.net/?id=7503
-- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: php-dev-unsubscribe <email protected> For additional commands, e-mail: php-dev-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: hholzgra <email protected>: "[PHP-DEV] PHP 4.0 Bug #6423 Updated: mod_python & PHP don't compile both static with apache"
- Previous message: Bug Database: "[PHP-DEV] Bug #7614 Updated: functions/recode.c fails to compile as extension module"
- Next in thread: colin <email protected>: "[PHP-DEV] PHP 4.0 Bug #7503 Updated: scripts run from CGI output "#!/usr/local/bin/php -q" line"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

