473,385 Members | 1,740 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

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?
Jun 2 '08 #1
6 4200
to********@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.
js*******@attglobal.net
==================

Jun 2 '08 #2
On May 2, 2:28 am, Jerry Stuckle <jstuck...@attglobal.netwrote:
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?
Jun 2 '08 #3
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.
Jun 2 '08 #4
On 2 May, 09:14, Gordon <gordon.mc...@ntlworld.comwrote:
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 helped 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?
Jun 2 '08 #5
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 help 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
Jun 2 '08 #6
On May 2, 6:45*am, "C. (http://symcbean.blogspot.com/)"
<colin.mckin...@gmail.comwrote:
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 -
Jun 2 '08 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: berehneh | last post by:
i have a site and i need to gd library function for one of my page but my host doesn't run this module i know that i can run it by dl() function. but i dont no what is it syntax for linux and...
0
by: Robert Frunzke | last post by:
Hello, I'm developing a php extension as a communication layer for a proprietary database. Now, when I run two different versions of this extension on the same webserver (Apache 3, PHP 4.3.3,...
4
by: Lee Stewart | last post by:
I have a custom piece of code that I need to call from PHP5, so I'm going to write an extension that will handle things for me. This is becoming urgent - my original plan didn't work out and I'm...
2
by: Lee Stewart | last post by:
I've got an extension that I coded as a DLL in Windows and can use the dl() function to load it with no problem. This makes my test functions available and everything works fine. I'd like to...
4
by: Donald L. Dietmeyer | last post by:
I was given a libxx.so that was probably written in Delphi. I need to wrap it so that I can call the functions/procedures of the library from Python. I tried the usual extension technique...
3
by: Cafer ÅžimÅŸek | last post by:
Hi all, I want to use SQLite databases to my site. But the hosting company's server does not support SQLite extension. Is there any way to use SQLite DB's to my site? PS: safe mode is off,...
6
by: ImOk | last post by:
I am using Windows IIS with PHP5 CGI. When I want to use an extension in PHP5 under Windows I enable the extension line in PHP.INI. (e.g. extension=php_sqlite.dll). Does PHP load all the...
3
by: edfialk | last post by:
Hi, all I'm trying to do is load the php_mapscript.so library into php. Here's the php file: Code: dl("php_mapscriot.so") if (extension_loaded("MapScript")) echo "works!"; else echo...
3
by: Crazy Cat | last post by:
Hi all, I am developing an asp.net 2.0 application in Visual Studio 2005. On my page I have a simple datalist that is bound programmatically to a collection of simple objects. On this page I...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.