How to distribute a PHP extension for use in a shared hosting environment

I have a library written in C, which is distributed as an extension of PHP, and my users have problems accessing the library when working in a shared hosting environment.

Previously ( in PHP versions less than this 5.2.5 ), our clients could simply use the dl () function and the full library path to access it.

Since PHP 5.2.5, the dl () function cannot contain path information, and therefore the library must be installed by the system administrator in the global directory of PHP extensions.

Starting with PHP 5.4, the dl () function is deprecated and completely removed from PHP 6.0. This will mean that all libraries must be installed by the system administrator, as well as downloaded via PHP.ini.

As far as I can tell, this is a new reality for PHP extensions in a shared hosting environment , and there are no โ€œworkaroundsโ€.

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

+4
source share
1 answer

Many shared hosts will disable the dl () function, even if it can be used in its specific version of PHP. In short, shared hosting is quickly becoming obsolete, except for those who just want to host a blog or some other vanity site.

It will be quite a while before most people will be โ€œin the clouds,โ€ but I see nothing wrong with the fact that you expect more serious users to have VPS .. and indicate the need for one as a system requirement.

I feel a burn on both sides. I have a small hosting company, as well as developing custom PHP extensions. Fortunately, for me, I can make my products available to customers who I post without hassle.

Do you consider that you simply create a shared server and offer hosting to those who need it?

+4
source

All Articles