Page 1 of 1

Detecting Locations for Dynamically loading extensions

Posted: Tue Aug 14, 2007 11:14 pm
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

Posted: Tue Aug 14, 2007 11:17 pm
by hawleyjr
Most shared hosting servers (Especially cheap ones) are setup to not allow access below the document root.

Never give up

Posted: Tue Aug 14, 2007 11:32 pm
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

Posted: Fri Aug 17, 2007 6:28 pm
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.

Re: Never give up

Posted: Fri Aug 17, 2007 6:37 pm
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.