How to load PHP extensions?

Forum for you who has PHP installation issues

Moderators: macek, egami, gesf

New php-forum User
New php-forum User
Posts: 1
Joined: Thu Jul 28, 2011 1:32 am

How to load PHP extensions?

Postby terence83 » Thu Jul 28, 2011 2:18 am

I did some coding in PHP before but I came across a problem I don't know how to solve it:
I have a Website which has PHP installed (5.1) but by default none of the PHP extensions are loaded. In the instructions it says I need to load any extension I need dynamically in my script using dl(). This of course leads to the situation that if I try to look at my uploaded PHP file I get an error message.
Sorry for my naiv question: But how do I know which extensions I need to load??
I tried some test code but it didn't work:

// Example loading an extension based on OS
if (!extension_loaded('sqlite')) {
if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') {
} else {

// Or, the PHP_SHLIB_SUFFIX constant is available as of PHP 4.3.0
if (!extension_loaded('sqlite')) {
$prefix = (PHP_SHLIB_SUFFIX === 'dll') ? 'php_' : '';
dl($prefix . 'sqlite.' . PHP_SHLIB_SUFFIX);

Can anyone help me with this? that would be great!

PS: I usually have php running on my laptop in the default installation - my files run without a problem...

Return to “PHP Installation”

Who is online

Users browsing this forum: Yahoo [Bot] and 2 guests