Detecting Locations for Dynamically loading extensions

Need help installing PHP, configuring a script, or configuring a server? Then come on in and post your questions! We'll try to help the best we can!

Moderator: General Moderators

Post Reply
damohickey
Forum Newbie
Posts: 2
Joined: Tue Aug 14, 2007 11:08 pm

Detecting Locations for Dynamically loading extensions

Post by damohickey »

We have created an application that we want to run on shared hostings and install with our custom network installer but on those hostings it is not possible to change the php.ini file to include libraries like zlib and sqlite.

It is necessary to find the location of the .so files on the server so that the dl() function can find them. However, by default, dl() only looks in the location specified by extension_dir.

Unfortunately, in shared hostings, this is often set to './' making extensions such as zlib and sqlite difficult to locate and therefore inaccessible.

Is there any way to find these extensions on a shared hosting PHP installation?

We can install to dedicated servers and localhost WAMP servers fine but we want to get it right for a mass market.

Thanks in advance,

Damian
User avatar
hawleyjr
BeerMod
Posts: 2170
Joined: Tue Jan 13, 2004 4:58 pm
Location: Jax FL & Spokane WA USA

Post by hawleyjr »

Most shared hosting servers (Especially cheap ones) are setup to not allow access below the document root.
damohickey
Forum Newbie
Posts: 2
Joined: Tue Aug 14, 2007 11:08 pm

Never give up

Post by damohickey »

Hi,

We don't want to give up on this one. It is so tantilisingly close. We think someone has come up with an elegant solution in the past which does not involve strangling the hosting provider admin!

Cheers,

Damian
User avatar
Ollie Saunders
DevNet Master
Posts: 3179
Joined: Tue May 24, 2005 6:01 pm
Location: UK

Post by Ollie Saunders »

I doubt it. Shared hosting is pretty insecure in nature so most hosts will put on a lot of constraints on you to make up for that, they are designed to limit you, if you can break them you are exploiting a security vulnerability.
does not involve strangling the hosting provider admin!
I also doubt that's even possible. If your host is anything like I've experienced you won't be able to talk to anyone who really knows how the server is set up and certainly not anyone with the authority or ability to change anything. VPS is the way to go.
User avatar
superdezign
DevNet Master
Posts: 4135
Joined: Sat Jan 20, 2007 11:06 pm

Re: Never give up

Post by superdezign »

damohickey wrote:We think someone has come up with an elegant solution in the past
Aww! So hopeful. :P

Shared hosting is inexpensive for quite a few reasons.
Post Reply