View Single Post

  #1 (permalink)  
Old 05-05-2008
tommybiegs@gmail.com
 
Posts: n/a
Default php extension won't load in php.ini, but loads dynamically

I'm having a weird problem. I can't seem to force php to load an
extension in php.ini, but it loads perfectly if I load it dynamically
at the beginning of a test script.

In php.ini I've got:

extension_dir = "/correct/verified/path/to/extension/dir/"
extension=imagick.so

apache will not restart if both those lines are present in php.ini,
and the error_log is blank (it reports httpd starting, but nothing
after that)

If I remove the extension load line, e.g.:

extension_dir = "/correct/verified/path/to/extension/dir/"
; extension=imagick.so

apache will restart normally without the extension loaded, but with
the correct verified extension path set in php (confirmed by checking
phpinfo on a test page).

The confusing thing is that the extension then loads fine dynamically:

<?php
dl("imagick.so")
phpinfo();
?>

and phpinfo displays the extension info normally.

I assume the problem is with apache, but I do not know how to proceed
since the logs are blank.

system/installation info:
freebsd 7 on x86_64 architecture
apache 1.3.41
php 5.2.5 running as a static module

Any thoughts?