New Ticket     Tickets     Wiki     Browse Source     Timeline     Roadmap     Ticket Reports     Search

Ticket #19526 (closed defect: fixed)

Opened 6 years ago

Last modified 4 years ago

php5's extension_dir INI variable is incorrect

Reported by: bjd@… Owned by: ryandesign@…
Priority: Normal Milestone:
Component: ports Version: 1.7.1
Keywords: Cc: stronk7@…
Port: php5

Description

APC won't load. This error appears in Apache's error log:

PHP Warning:  PHP Startup: Unable to load dynamic library './APC.so' - (null) in
 Unknown on line 0

In bash, if I run "php -m" I see the same error.

phpinfo() shows no evidence of APC running.

This doesn't actually cause PHP to fail. I can use PHP just fine.

Change History

comment:1 Changed 6 years ago by jmr@…

  • Owner changed from macports-tickets@… to nox@…

comment:2 Changed 6 years ago by nox@…

  • Owner changed from nox@… to ryandesign@…
  • Port changed from php5-apc to php5
  • Summary changed from php5-apc 3.1.2_1 PHP Startup: Unable to load dynamic library to php5's extension_dir INI variable is incorrect

The default value of extension_dir in php.ini is the current directory. It should be:

/opt/local/lib/php/extensions/no-debug-non-zts-20060613/

comment:3 Changed 6 years ago by ryandesign@…

In php 5.3.0, the sample php.ini files list the extension_dir directive commented out, and with that, php knows where to load the extensions from. I will test whether that is sufficient for php 5.2.9 and 4.4.9; if so, I can patch the sample php.ini files included with those versions to comment out the extension_dir directive. If not, I'll insert the current extensions dir path as Anthony showed above (though I'll get it by executing "php-config --extension-dir").

In any case, this will only affect the sample php.ini files; the user will still be responsible for correcting their own php.ini files.

comment:4 Changed 6 years ago by ryandesign@…

  • Status changed from new to assigned
  • Cc stronk7@… added

Has duplicate #19976.

comment:5 Changed 5 years ago by ryandesign@…

  • r53562: Added a notice to the php5extension portgroup that gets printed if the user's php.ini has an incorrect extension_dir directive. So although the user still needs to correct their own php.ini, they will be notified immediately upon installing any extension what they need to do to fix it. php5 will be updated to 5.3.0 shortly which includes sample php.ini files that don't have the problem, which should take care of things for new users.

comment:6 Changed 5 years ago by stronk7@…

Confirmed. Commenting out extension_dir in php.ini makes extension to be loaded properly (tested with php-yaz that was my dupe problem at #19976).

Thanks!

comment:7 Changed 4 years ago by jmr@…

  • Status changed from assigned to closed
  • Resolution set to fixed
Note: See TracTickets for help on using tickets.