ID:               26308
 User updated by:  muhlig at us dot edu dot pl
 Reported By:      muhlig at us dot edu dot pl
-Status:           Bogus
+Status:           Open
 Bug Type:         CGI related
 Operating System: Solaris 8
 PHP Version:      4.3.4
 New Comment:

Thank you for your answer, but you didn't convince me it's not a bug.

The point is: php.ini "extension" directive is working differently in
Apache module than in cli binary. 

While Apache module is used, php.ini "extension" directive can specify
absolute location. The file is opened correctly.

While cli binary is run, "extension" directive with absolute location
is interpreted differently and incorrectly. Shortly speaking, the
effect of absolute path in "extension" php.ini directive is
".//whatever" system open call what leads to the error in open.

I couldn't find the description of this behaviour in PHP docs. Sorry.

And yes, mmcache extension is here only as an example. I don't want to
run mmcache in cli mode. Rather, I want to have the same php.ini for
Apache module and cli mode.


Previous Comments:
------------------------------------------------------------------------

[2003-11-18 17:24:34] [EMAIL PROTECTED]

Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

BTW mmcache won't work with CGI or CLI.

You should be using:
extension="mmcache.so"

------------------------------------------------------------------------

[2003-11-18 17:19:50] muhlig at us dot edu dot pl

Description:
------------
php extension is not loaded while running as cli binary. 

from php.ini:

  extension="/usr/local/lib/php/extensions/mmcache.so"

it can be seen "./" is prepended to "extension" path, ie. web module
wants absolute path while cli binary wants relative path, which is
inconsistent.

it is also possible extension should NOT be loaded at all while running
as cli binary.

Reproduce code:
---------------
N/A

Expected result:
----------------
# php -v
PHP 4.3.4 (cli) (built: Nov  5 2003 09:08:10)
Copyright (c) 1997-2003 The PHP Group
Zend Engine v1.3.0, Copyright (c) 1998-2003 Zend Technologies
# 


Actual result:
--------------
# php -v
PHP Warning:  Unknown(): Unable to load dynamic library
'.//usr/local/lib/php/extensions/mmcache.so' - ld.so.1: php: fatal:
.//usr/local/lib/php/extensions/mmcache.so: open failed: No such file
or directory in Unknown on line 0
PHP 4.3.4 (cli) (built: Nov  5 2003 09:08:10)
Copyright (c) 1997-2003 The PHP Group
Zend Engine v1.3.0, Copyright (c) 1998-2003 Zend Technologies
# 



------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=26308&edit=1

Reply via email to