Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:51927 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 82948 invoked from network); 18 Apr 2011 15:04:44 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 18 Apr 2011 15:04:44 -0000 Authentication-Results: pb1.pair.com header.from=tyra3l@gmail.com; sender-id=pass; domainkeys=bad Authentication-Results: pb1.pair.com smtp.mail=tyra3l@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.214.170 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: tyra3l@gmail.com X-Host-Fingerprint: 209.85.214.170 mail-iw0-f170.google.com Received: from [209.85.214.170] ([209.85.214.170:48563] helo=mail-iw0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 67/62-01409-B035CAD4 for ; Mon, 18 Apr 2011 11:04:44 -0400 Received: by iwn3 with SMTP id 3so5094039iwn.29 for ; Mon, 18 Apr 2011 08:04:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:date:message-id:subject:from:to :content-type; bh=MeBKLLApArLFLfMS8yJcZctVE9sy8x6FpPzaVoNv/qI=; b=bku/hjTQCd6MTm/rYHk3pY6QnixlF6BzxqLZUSCCmvL/vLZa2NA6UFDd6MXAkhOusX WrIkwZjG7VMvmmGQvQJXGmjH5JJ9PXvOJy74nh3fA/u7v4OZ855NLl8WRNoSyVhyG8uz kryVsZoi80E/6eayvWhJ+m7tzoA0V4ptXDG50= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=n47K3gT1tr0UeZW7GgQzGduOBrccrKMbKkKfLdIX862oNXqwY/Ec/LRa66E3LDFAjX j/tF7eL6CpYYiaUVavpj2yFI9HaJo1Nq+UFAelrLO0uxNYo3Z6EdIXHnzBh1g2A3jafk kzVmEBx8Wgm7KR0fG+owN/2KCUqYOti+0arSc= MIME-Version: 1.0 Received: by 10.42.130.200 with SMTP id w8mr795198ics.219.1303139080719; Mon, 18 Apr 2011 08:04:40 -0700 (PDT) Received: by 10.231.199.197 with HTTP; Mon, 18 Apr 2011 08:04:40 -0700 (PDT) Date: Mon, 18 Apr 2011 17:04:40 +0200 Message-ID: To: PHP Internals Content-Type: multipart/alternative; boundary=90e6ba2124f5ffccef04a132b545 Subject: extension_path not used for zend_extension From: tyra3l@gmail.com (Ferenc Kovacs) --90e6ba2124f5ffccef04a132b545 Content-Type: text/plain; charset=UTF-8 Hi. I've just noticed that in spite of the documentation, one can (try to) load a zend_extension via a relative path. http://www.php.net/manual/en/ini.core.php#ini.zend-extension the only thing preventing that from working is that the extension_dir isn't used searching for the lib. you can see that extension uses the extension_dir correctly: tyrael@devel-tyrael:~$ strace php -n -d extension=xdebug.so -v 2>&1|grep xdebug execve("/usr/bin/php", ["php", "-n", "-d", "extension=xdebug.so", "-v"], [/* 16 vars */]) = 0 open("/usr/lib/php5/20090626/xdebug.so", O_RDONLY) = 3 and zend_extension not, hence it cannot load the lib. tyrael@devel-tyrael:~$ strace php -n -d zend_extension=xdebug.so -v 2>&1|grep xdebug execve("/usr/bin/php", ["php", "-n", "-d", "zend_extension=xdebug.so", "-v"], [/* 16 vars */]) = 0 open("/lib/tls/x86_64/xdebug.so", O_RDONLY) = -1 ENOENT (No such file or directory) open("/lib/tls/xdebug.so", O_RDONLY) = -1 ENOENT (No such file or directory) open("/lib/x86_64/xdebug.so", O_RDONLY) = -1 ENOENT (No such file or directory) open("/lib/xdebug.so", O_RDONLY) = -1 ENOENT (No such file or directory) open("/usr/lib/tls/x86_64/xdebug.so", O_RDONLY) = -1 ENOENT (No such file or directory) open("/usr/lib/tls/xdebug.so", O_RDONLY) = -1 ENOENT (No such file or directory) open("/usr/lib/x86_64/xdebug.so", O_RDONLY) = -1 ENOENT (No such file or directory) open("/usr/lib/xdebug.so", O_RDONLY) = -1 ENOENT (No such file or directory) open("/lib/x86_64-linux-gnu/tls/x86_64/xdebug.so", O_RDONLY) = -1 ENOENT (No such file or directory) open("/lib/x86_64-linux-gnu/tls/xdebug.so", O_RDONLY) = -1 ENOENT (No such file or directory) open("/lib/x86_64-linux-gnu/x86_64/xdebug.so", O_RDONLY) = -1 ENOENT (No such file or directory) open("/lib/x86_64-linux-gnu/xdebug.so", O_RDONLY) = -1 ENOENT (No such file or directory) open("/usr/lib/x86_64-linux-gnu/tls/x86_64/xdebug.so", O_RDONLY) = -1 ENOENT (No such file or directory) open("/usr/lib/x86_64-linux-gnu/tls/xdebug.so", O_RDONLY) = -1 ENOENT (No such file or directory) open("/usr/lib/x86_64-linux-gnu/x86_64/xdebug.so", O_RDONLY) = -1 ENOENT (No such file or directory) open("/usr/lib/x86_64-linux-gnu/xdebug.so", O_RDONLY) = -1 ENOENT (No such file or directory) write(2, "Failed loading xdebug.so: xdebug"..., 96Failed loading xdebug.so: xdebug.so: cannot open shared object file: No such file or directory if you have the lib in you LD path, or you set the LD_LIBRARY_PATH, it will obviously load the lib from the relative path. tyrael@devel-tyrael:~$ LD_LIBRARY_PATH=/usr/lib/php5/20090626/ strace php -n -d zend_extension=xdebug.so -v 2>&1|grep xdebug execve("/usr/bin/php", ["php", "-n", "-d", "zend_extension=xdebug.so", "-v"], [/* 17 vars */]) = 0 open("/usr/lib/php5/20090626/xdebug.so", O_RDONLY) = 3 so I think we should either make sure that the zend_extension is an absolute path, or we should use the extension_path and allow loading zend extensions without the need to screw around with the LD path. what do you think? Tyrael --90e6ba2124f5ffccef04a132b545--