Where's all the php extension files?

Problems with the Linux version of XAMPP, questions, comments, and anything related.

Where's all the php extension files?

Postby dmphotography » 07. February 2009 13:47

Hey there,
I'm quite familiar with the Windows version of XAMPP and I'm now trying to learn the Linux version and I recently discovered something.

I tried to enable a couple of extensions in the php.ini file, which according to the Release notes, it says they're included, but I then got an error about the extension files are missing.

So I went to the extensions folder and sure enough, they're not there. So my question is where the heck did they go? Where can I get them from?

I know in the Window's version there's several already there, but that's definitely not the case with the Linux version.

Thanks for your help.
For great video and written tutorials and guides on creating your own web server and installing things such as forums, blogs, etc., visit http://myownhomeserver.com
dmphotography
 
Posts: 191
Joined: 15. December 2008 14:25
Location: Columbus, MS
Operating System: Windows 7

Re: Where's all the php extension files?

Postby Wiedmann » 07. February 2009 18:15

I tried to enable a couple of extensions in the php.ini file,

Which one?

which according to the Release notes, it says they're included,

In Linux, most extension are build in, and not available as shared extensions.
Wiedmann
AF Moderator
 
Posts: 17102
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Re: Where's all the php extension files?

Postby dmphotography » 09. February 2009 00:37

Hey Wiedmann,

I don't remember which ones, but I've learned how the php extensions work for Linux.

They are .so files, which means they're shared object files and are installed using the Synaptic Package Manager or whichever other method one uses to obtain them in Linux.

They way the .dll files work in Windows is different, as they are loaded by Apache and in Linux they're not.

I didn't fully understand shared objects before, but now I get it.

Thanks for the help.
For great video and written tutorials and guides on creating your own web server and installing things such as forums, blogs, etc., visit http://myownhomeserver.com
dmphotography
 
Posts: 191
Joined: 15. December 2008 14:25
Location: Columbus, MS
Operating System: Windows 7

Re: Where's all the php extension files?

Postby Wiedmann » 09. February 2009 01:05

They way the .dll files work in Windows is different,

A .dll and a .so is the same thing. Both are loaded from your main application like PHP or Apache at runtime. (e.g. in Apache/Win the modules are also named *.so. It's just a name.)

And in Linux and in Windows you /can/ compile all extensions as shared *.dll/*.so, or statically build in.

Well, you don't compile PHP/Apache yourself, so you must use what others give you...
Wiedmann
AF Moderator
 
Posts: 17102
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Re: Where's all the php extension files?

Postby dmphotography » 09. February 2009 14:27

Well I suppose the difference I was referring to was the fact you do a lot more compiling in Linux as to where you never do that in Windows unless you're a developer/programmer. It tends to be more of a common thing to compile in Linux, although I've also learned you can find many/most things already compiled.

Also, I'm guessing when you do install packages or Shared Objects in Linux, it's the same as adding the .dll files to your C:/Windows/system32 folder? If so, then you could add all of your php extensions to the system32 folder and not need to enable them in the php.ini file, correct?

I've noticed most php extensions in Linux are installed as shared objects and do not require you modifying the php.ini file for them to be enabled. My question is how would you disable one without uninstalling it?

For instance, I use Ubuntu 8.10 and I use the Synaptic Package Manager to install the extensions for php. Most of them are installed by installing the *-dev packages, right? How would you install it so it doesn't automatically load?
For great video and written tutorials and guides on creating your own web server and installing things such as forums, blogs, etc., visit http://myownhomeserver.com
dmphotography
 
Posts: 191
Joined: 15. December 2008 14:25
Location: Columbus, MS
Operating System: Windows 7

Re: Where's all the php extension files?

Postby Wiedmann » 09. February 2009 14:44

Also, I'm guessing when you do install packages or Shared Objects in Linux, it's the same as adding the .dll files to your C:/Windows/system32 folder?

Correct, .dll and .so are shared objects, they are doing the same and working in the same way on both OS.
(BTW: in Linux and Windows you have a special extension dir for those shared PHP extensions. (not e.g. windows\system32 on Windows)

Sometimes a PHP extension needs other shared objects. These shared objects (.dll or .so) must be in the correct dir for your os (Linux: $LIBRARY_PATH; Windows: $PATH).

If so, then you could add all of your php extensions to the system32 folder and not need to enable them in the php.ini file, correct?

You have to put them into the PHP extensions dir and you must enable them in "php.ini" (because it's a shared extension!).
Only a static build in extension must not be enabled in "php.ini".

I've noticed most php extensions in Linux are installed as shared objects and do not require you modifying the php.ini file for them to be enabled.

That's not possible. A shared extension must always be enabled in "php.ini". But maybe there is a separate ini (e.g. extensions.ini) just for the extensions.

My question is how would you disable one without uninstalling it?

Disable them, in what ever INI they are enabled.

Most of them are installed by installing the *-dev packages, right?

I don't know anything about Ubuntu.

How would you install it so it doesn't automatically load?

Just two rules for every OS:
- If you have static build-in extensions: Make a new PHP compilations without this extension
- If you have a shared extension: Disable this extension in "php.ini" (or an extra ini) .
Wiedmann
AF Moderator
 
Posts: 17102
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany


Return to XAMPP for Linux

Who is online

Users browsing this forum: No registered users and 13 guests