php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #26308 php extension not loaded
Submitted: 2003-11-18 17:19 UTC Modified: 2003-11-21 21:50 UTC
From: muhlig at us dot edu dot pl Assigned:
Status: Not a bug Package: CGI/CLI related
PHP Version: 4.3.4 OS: Solaris 8
Private report: No CVE-ID: None
 [2003-11-18 17:19 UTC] 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
# 


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-11-18 17:24 UTC] iliaa@php.net
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-21 07:00 UTC] muhlig at us dot edu dot pl
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.
 [2003-11-21 21:50 UTC] sniper@php.net
You need to set "extension_dir" to point to the correct place.
No bug here, please ask further support questions elsewhere as this is not a support forum..

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 26 17:01:30 2024 UTC