views:

110

answers:

1

I have a library written in C that gets distributed as a PHP extension, and my users are having problems accessing the library when running in a Shared Hosting environment.

Previously (In PHP versions less that 5.2.5) our customers could simply use the dl() function and the full path to the library to access it.

Since PHP 5.2.5 the dl() function can not contain any path information and so the library must be installed by a System administrator in the global PHP extensions directory.

As of PHP 5.4 the dl() function has been deprecated and has been removed completely from PHP 6.0. This will mean that all libraries must be installed by a System Administrator and also loaded via the PHP.ini.

As far as I can tell this is the new reality for PHP extensions in a shared hosting environment and there are no 'work arounds'.

What are the key things I need to do with my distribution to maximise the likelihood that a Shared Host Administrator will install it on behalf of my customers?

+2  A: 

A lot of shared hosts are going to disable the dl() function, even if its usable in their particular version of PHP. In short, shared hosting is rapidly becoming antiquated except for those who just want to host a blog or some other kind of vanity site.

Its going to be quite some time before most people are 'in the clouds', however I don't see anything wrong with you expecting more serious users to have a VPS .. and specify the need for one as a system requirement.

I feel the same burn on both sides. I own a small hosting company and also develop custom PHP extensions. Fortunately, for me, I can make my products available to clients that I host without hassle.

Have you thought of just bringing up a shared server and offering hosting to those who need it?

Tim Post
Good call tinkertim. On your suggestion I've had a chat with the 'business' folks and they seem relatively happy at this point with the expectation that the users they actually make money out of will indeed be running a VPS. I'll push this forward as a system requirement. Meanwhile I'll keep my eye on PHP version 6.0 to see if something else pops up to fill this void.