php extension won't load in php.ini, but loads dynamically

This is a discussion on php extension won't load in php.ini, but loads dynamically within the Apache Web Server forums, part of the Web Server and Related Forums category; I'm having a weird problem. I can't seem to force php to load an extension in php.ini, ...


Go Back   Usenet Forums > Web Server and Related Forums > Apache Web Server

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #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?
  #2 (permalink)  
Old 05-06-2008
phantom
 
Posts: n/a
Default Re: php extension won't load in php.ini, but loads dynamically

<tommybiegs@gmail.com> wrote in message
news:27c0f589-9a64-4e40-b382-3f9abc4b02cd@m36g2000hse.googlegroups.com...
> 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?


Try running php from the command line:

php -v

it should process the ini file and give you back any warnings/errors.


 


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 07:39 AM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0