damohickey Posted August 15, 2007 Share Posted August 15, 2007 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 Quote Link to comment Share on other sites More sharing options...
keeB Posted August 15, 2007 Share Posted August 15, 2007 I only know how to check if they're available, but not how to use said function to link to externally available modules.. It begs the question, though, it would seem reasonable that if you have these dependencies, the 'mass market' would be aware of them and it's not your responsibility to (and I would be completely against a solution which tries to) configure a server. My 2c, for what it's worth. Quote Link to comment Share on other sites More sharing options...
damohickey Posted August 15, 2007 Author Share Posted August 15, 2007 Thanks for your help, To clarify, we don't want to change settings in php.ini on servers where dl() functions are not set to load. We just want to get PHP to look for them successfully. Cheers, Damian Quote Link to comment Share on other sites More sharing options...
Stopofeger Posted August 15, 2007 Share Posted August 15, 2007 Hi there, The php extensions are always at the ext directory or any directory specified in the php.ini through this flag:extension_dir=..... extensions can only be loaded from this directory and no other. In the dl() function you will only specify the filename of the library not the full path. such as dl('zlib.dll'); I hope that solves. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.