Bug #18462 Updated: php -c /path/to/different/php.ini doesn't work
| From: | ceo at l-i-e dot com | Date: | Mon, 22 Jul 2002 20:55:15 +0000 |
| Subject: | Bug #18462 Updated: php -c /path/to/different/php.ini doesn't work | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-14795@lists.php.net to get a copy of this message | ||
ID: 18462
Updated by: ceo@l-i-e.com
Reported By: ceo@l-i-e.com
-Status: Bogus
+Status: Open
Bug Type: PHP options/info functions
Operating System: RedHat 6.2
PHP Version: 4.2.1
New Comment:
#1. It *DID* work JUST FINE for months and months before
this upgrade.
#2. I'm willing to try it without the 'php.ini' in the path,
but I suspect a complete path is needed, since some users
may have desired to have them all in one directory, with
different names.
Either way -- It worked just fine before, and doesn't now,
and it's a documented feature:
php -h
clearly outputs what it's supposed to do.
There may not have been a space between -c and the path
previously... I dinked with that both ways after it b
Previous Comments:
------------------------------------------------------------------------
[2002-07-21 19:28:12] edink@php.net
Correction: since -c takes path to php.ini, the command should be:
/usr/bin/php -c /home/pocketguide -q /path/to/harvest.php
------------------------------------------------------------------------
[2002-07-21 19:25:34] edink@php.net
I doubt that this has ever worked on Linux due to its shebang line
limitations (#!/usr/bin/php). It's limited to only one argument.
To get around this problem run your cronjob as:
/usr/bin/php -c /home/pocketguide/php.ini -q /path/to/harvest.php
------------------------------------------------------------------------
[2002-07-21 15:34:42] ceo@l-i-e.com
The following weekly cron job worked fine until a recent
upgrade/install of PHP 4.2.1 using:
./configure \
--enable-calendar \
--enable-bcmath \
--with-jpeg-dir \
--with-png-dir=/usr/local \
--with-tiff-dir \
--enable-ftp \
--with-gd=/usr/local \
--enable-gd-imgstrttf \
--with-ttf \
--with-freetype-dir=/usr/local \
--with-t1lib \
--with-imap \
--with-ldap \
--with-pgsql \
--with-mysql=/usr/src/mysql \
--disable-debug \
--with-kerberos \
--with-imap-ssl \
--with-pdflib \
--with-swf=/usr/src/libswf \
--with-xmlrpc=/usr/local \
--with-expat-dir=/usr/local \
--with-dom \
--with-zlib \
--enable-sockets
./harvest.php
X-Powered-By: PHP/4.2.1^M
Content-type: text/html^M
^M
<br />
<b>Fatal error</b>: Failed opening required 'connect.inc'
(include_path='.:/usr/local/lib/php') in
<b>/home/www/pocketguide/cron/harvest.php</b> on line <b>6</b><br />
head ./harvest.php
#!/usr/bin/php -c /home/pocketguide/php.ini -q
<?php
/* harvest.php
Automatically harvest performers and dates from venue
web-sites
*/
require 'connect.inc';
require 'publication.inc';
grep include_path /home/pocketguide/php.ini
include_path = "./:/home/pocketguide/include/" ;
UNIX: "/path1:/path2" Windows: "\path1;\path2"
In essence, it would appear that the "-c" option is no longer working.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=18462&edit=1