PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Autres forums > Forum Programmation & Conception > comp.lang.php > extension won't load in php.ini, but loads with dl()
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
extension won't load in php.ini, but loads with dl()

Réponse
 
LinkBack Outils de la discussion
Vieux 01/05/2008, 22h39   #1
tommybiegs@gmail.com
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut extension won't load in php.ini, but loads with dl()

I'm having a weird problem. I can't seem to force php to load an
extension using php.ini, but it loads perfectly if I use dl() 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 apache's error_log doesn't report anything either).

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 extension path).

The confusing thing is that the extension then loads fine with dl():

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

and phpinfo displays the extension info normally.

The problem seems to be with apache, but since there's nothing in the
error_log I'm unsure how to proceed.

system info:
freebsd 7 on x86_64 architecture
apache 1.3.41
php 5.2.5

Has anyone encountered this problem before?
  Réponse avec citation
Vieux 02/05/2008, 02h28   #2
Jerry Stuckle
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: extension won't load in php.ini, but loads with dl()

tommybiegs@gmail.com wrote:
> I'm having a weird problem. I can't seem to force php to load an
> extension using php.ini, but it loads perfectly if I use dl() 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 apache's error_log doesn't report anything either).
>
> 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 extension path).
>
> The confusing thing is that the extension then loads fine with dl():
>
> <?php
> dl("imagick.so")
> phpinfo();
> ?>
>
> and phpinfo displays the extension info normally.
>
> The problem seems to be with apache, but since there's nothing in the
> error_log I'm unsure how to proceed.
>
> system info:
> freebsd 7 on x86_64 architecture
> apache 1.3.41
> php 5.2.5
>
> Has anyone encountered this problem before?
>


You need to be asking in an Apache newsgroup. This doesn't have
anything to do with PHP. Try alt.apache.configuration.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

  Réponse avec citation
Vieux 02/05/2008, 10h14   #3
Gordon
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: extension won't load in php.ini, but loads with dl()

On May 2, 2:28 am, Jerry Stuckle <jstuck...@attglobal.net> wrote:
> tommybi...@gmail.com wrote:
> > I'm having a weird problem. I can't seem to force php to load an
> > extension using php.ini, but it loads perfectly if I use dl() 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 apache's error_log doesn't report anything either).

>
> > 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 extension path).

>
> > The confusing thing is that the extension then loads fine with dl():

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

>
> > and phpinfo displays the extension info normally.

>
> > The problem seems to be with apache, but since there's nothing in the
> > error_log I'm unsure how to proceed.

>
> > system info:
> > freebsd 7 on x86_64 architecture
> > apache 1.3.41
> > php 5.2.5

>
> > Has anyone encountered this problem before?

>
> You need to be asking in an Apache newsgroup. This doesn't have
> anything to do with PHP. Try alt.apache.configuration.
>
> --
> ==================
> Remove the "x" from my email address
> Jerry Stuckle
> JDS Computer Training Corp.
> jstuck...@attglobal.net
> ==================


He asked politely, and it was reasonable to think that it was an issue
in either PHP or Apache and that it wouldn't hurt to ask on a PHP
group. There's absolutely no need to be such a total jerk about it.
Other than the fact that you are a total jerk of course. Instead of
attacking posters for asking perfectly reasonable questions why don't
you just shut up instead and go back to your hug box?
  Réponse avec citation
Vieux 02/05/2008, 11h45   #4
C. (http://symcbean.blogspot.com/)
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: extension won't load in php.ini, but loads with dl()

On 1 May, 22:39, tommybi...@gmail.com wrote:
> I'm having a weird problem. I can't seem to force php to load an
> extension using php.ini, but it loads perfectly if I use dl() 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 apache's error_log doesn't report anything either).
>
> 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 extension path).
>


Are you running Apache in a chroot jail? If so it may be trying to
load the extension before the chroot()

What are the permissions on the extension?

Is this the only extension you load from this dir? Can you replicate
with any extension?

C.
  Réponse avec citation
Vieux 02/05/2008, 12h27   #5
Jerry Stuckle
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: extension won't load in php.ini, but loads with dl()

Gordon wrote:
> On May 2, 2:28 am, Jerry Stuckle <jstuck...@attglobal.net> wrote:
>> tommybi...@gmail.com wrote:
>>> I'm having a weird problem. I can't seem to force php to load an
>>> extension using php.ini, but it loads perfectly if I use dl() 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 apache's error_log doesn't report anything either).
>>> 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 extension path).
>>> The confusing thing is that the extension then loads fine with dl():
>>> <?php
>>> dl("imagick.so")
>>> phpinfo();
>>> ?>
>>> and phpinfo displays the extension info normally.
>>> The problem seems to be with apache, but since there's nothing in the
>>> error_log I'm unsure how to proceed.
>>> system info:
>>> freebsd 7 on x86_64 architecture
>>> apache 1.3.41
>>> php 5.2.5
>>> Has anyone encountered this problem before?

>> You need to be asking in an Apache newsgroup. This doesn't have
>> anything to do with PHP. Try alt.apache.configuration.
>>
>> --
>> ==================
>> Remove the "x" from my email address
>> Jerry Stuckle
>> JDS Computer Training Corp.
>> jstuck...@attglobal.net
>> ==================

>
> He asked politely, and it was reasonable to think that it was an issue
> in either PHP or Apache and that it wouldn't hurt to ask on a PHP
> group. There's absolutely no need to be such a total jerk about it.
> Other than the fact that you are a total jerk of course. Instead of
> attacking posters for asking perfectly reasonable questions why don't
> you just shut up instead and go back to your hug box?
>


You mean other than the fact your post was made by a total asshole? I
told him where to go. There was no attack - unlike you, I didn't call
him a jerk.

But you are a total asshole, as you just proved. Now I think you'd
better go running to your mommy - I hear her calling you.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

  Réponse avec citation
Vieux 02/05/2008, 13h08   #6
Captain Paralytic
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: extension won't load in php.ini, but loads with dl()

On 2 May, 09:14, Gordon <gordon.mc...@ntlworld.com> wrote:
> He asked politely, and it was reasonable to think that it was an issue
> in either PHP or Apache and that it wouldn't hurt to ask on a PHP
> group. There's absolutely no need to be such a total jerk about it.
> Other than the fact that you are a total jerk of course. Instead of
> attacking posters for asking perfectly reasonable questions why don't
> you just shut up instead and go back to your hug box?


What IS your problem. Did you actually read the post you're commenting
on? Someone asked a question. Someone ed by pointing out (quite
politely) where the answer might be best found.

Read your own post. Which one looks like it's been written by a jerk?
  Réponse avec citation
Vieux 02/05/2008, 13h17   #7
Peter H. Coffin
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: extension won't load in php.ini, but loads with dl()

On Fri, 2 May 2008 02:14:56 -0700 (PDT), Gordon wrote:
> He asked politely, and it was reasonable to think that it was an issue
> in either PHP or Apache and that it wouldn't hurt to ask on a PHP
> group. There's absolutely no need to be such a total jerk about it.
> Other than the fact that you are a total jerk of course. Instead of
> attacking posters for asking perfectly reasonable questions why don't
> you just shut up instead and go back to your hug box?


Your definition of "total jerk" differ greatly from mine. OP asked
question, was told that it was indeed an apache problem, not a php one,
and it was suggested that better would come from a particular
apache group. No aspersions were cast on the posters ancestors, nor were
threats made toward his pet.


--
27. I will never build only one of anything important. All important systems
will have redundant control panels and power supplies. For the same reason
I will always carry at least two fully loaded weapons at all times.
--Peter Anspach's list of things to do as an Evil Overlord
  Réponse avec citation
Vieux 02/05/2008, 19h06   #8
tommybiegs@gmail.com
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: extension won't load in php.ini, but loads with dl()

On May 2, 6:45am, "C. (http://symcbean.blogspot.com/)"
<colin.mckin...@gmail.com> wrote:
> On 1 May, 22:39, tommybi...@gmail.com wrote:
>
>
>
>
>
> > I'm having a weird problem. I can't seem to force php to load an
> > extension using php.ini, but it loads perfectly if I use dl() 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 apache's error_log doesn't report anything either).

>
> > 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 extension path).

>
> Are you running Apache in a chroot jail? If so it may be trying to
> load the extension before the chroot()
>


I have a pretty basic apache installation, so unless the default
behavior when compiling from the tarball is put the apache directory
tree into a chroot jail, the answer in no.

> What are the permissions on the extension?


644 root.wheel, though the entire tree from /usr/local/lib is all
root.wheel as well. php.ini accepts dynamically loaded libraries
using the extension_dir with those permissions no problem.

>
> Is this the only extension you load from this dir? Can you replicate
> with any extension?


I tried with the other extension I've got installed, but I get a php
error with that one: Invalid library (maybe not a PHP library)
'libssh2.so' in ... (I should note that I've had problems in the past
with the libssh2 extension, so it's not a reliable test... I'll
download and phpize another extension from pecl to see if it works)

Thanks for the tips (and sorry my post started a flame war...)

>
> C.- Hide quoted text -
>
> - Show quoted text -


  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 10h50.


Édité par : vBulletin® version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières ©2000-2008
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 1,25885 seconds with 16 queries