It drives me crazy.
I reduced my problem to this: I have a simple test.php file that calls a php file (this is from a larger application, so in fact we need to execute a lot of php scripts from the main script):
<?php
exec("php /var/www/setActive.php 273 1 2>&1",$arO,$nO);
echo $nO.'|'.implode(',',$arO);
The source path for setActive.php is longer, I shortened it for this example.
Now if I try:
[root@stg]
I get:
0|
Great, that means the setActive.php script runs smoothly.
Now, if I try it from a browser or from curl:
[root@stg]
This is what I get:
1|Could not open input file: /var/www/setActive.php
I have already looked through all the permissions. The Apache user has access to all directories and files. This worked fine on another server. I looked at the php.ini files and there is no difference between them.
, , , apache. .
, !
.
Linux, Cent OS. PHP 5.3.23