php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #29891 PHP attempts to load all extensions via relative path
Submitted: 2004-08-30 09:32 UTC Modified: 2004-08-30 10:21 UTC
From: jtyocum at publicmx dot com Assigned:
Status: Not a bug Package: Dynamic loading
PHP Version: 4.3.9RC1 OS: RH Linux 9.0/Virtuozzo 2.6
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: jtyocum at publicmx dot com
New email:
PHP Version: OS:

 

 [2004-08-30 09:32 UTC] jtyocum at publicmx dot com
Description:
------------
When running PHP via commandline, it'll complain the paths for the modules are invalid. It appears to be trying to load the modules via a relative path, e.g. prepending ./ to the path. However, the zend_extension seems to be fine, as it loads the module.

<snip php.ini>

;Enable MySQL
extension="/usr/lib/extensions/no-debug-non-zts-20020429/mysql.so"

;Enable SNMP
extension="/usr/lib/extensions/no-debug-non-zts-20020429/snmp.so"

;Turck MMCache
zend_extension="/usr/lib/extensions/no-debug-non-zts-20020429/mmcache.so"

</snip php.ini>


Expected result:
----------------
This what I would expect to get from PHP. In fact, if I am at the root of the file system /, it works fine.

[root@kangaroo /]# php -v
PHP 4.3.9RC1 (cli) (built: Aug 28 2004 11:05:56)
Copyright (c) 1997-2004 The PHP Group
Zend Engine v1.3.0, Copyright (c) 1998-2004 Zend Technologies
    with Turck MMCache v2.4.6, Copyright (c) 2002-2003 TurckSoft, St. Petersburg, by Dmitry Stogov


Actual result:
--------------
In this case, i'm in /usr and PHP generates the error. However, as you can see the zend_extension Turck MMCache doesn't have this problem.

[root@kangaroo usr]# php -v
PHP Warning:  Unknown(): Unable to load dynamic library './/usr/lib/extensions/no-debug-non-zts-20020429/mysql.so' - .//usr/lib/extensions/no-debug-non-zts-20020429/mysql.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning:  Unknown(): Unable to load dynamic library './/usr/lib/extensions/no-debug-non-zts-20020429/snmp.so' - .//usr/lib/extensions/no-debug-non-zts-20020429/snmp.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP 4.3.9RC1 (cli) (built: Aug 28 2004 11:05:56)
Copyright (c) 1997-2004 The PHP Group
Zend Engine v1.3.0, Copyright (c) 1998-2004 Zend Technologies
    with Turck MMCache v2.4.6, Copyright (c) 2002-2003 TurckSoft, St. Petersburg, by Dmitry Stogov


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-08-30 10:21 UTC] edink@php.net
You cannot specify path in extension= line in php.ini. Use extension_dir and try reading the instructions the next time.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu May 02 12:01:29 2024 UTC