Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Compile PHP 5 objects?

Status
Not open for further replies.

thenewa2x

Programmer
Dec 10, 2002
349
US
I know this can be done but I don't know how. How do you compile a .so for PHP 5? I need to create a binary for GD2 and a few other libraries.

---------------------------------------
TINSTAAFL, which is why I contribute.
 
You download the source archive of the library in question and compile it.

A lot of libraries that PHP uses are compiled using the standard "configure, make, make install" method, which is nearly always described in a file in the archive called either README or INSTALL. If the library has a website, that website will often have detailed compilation instructions available.

PHP comes with a version of GD already available, though. If you compile PHP with image functions turned on (described in the PHP manual here), either the archive has a .so file in it, or one is created by the makefile.



Want the best answers? Ask the best questions! TANSTAAFL!
 
I did the configure, make, make install and it was still not available in PHP.

I did not compile PHP 5 with GD enabled and I don't have permission to go back and recompile PHP with it. Do you know of where I can get binaries for extension for PHP 5.0.4?

---------------------------------------
TINSTAAFL, which is why I contribute.
 
I did the configure, make, make install and it was still not available in PHP.

I did not compile PHP 5 with GD enabled
You compiled PHP without GD support and GD support wan't there. This sounds like expected behavior to me.


I don't have permission to go back and recompile PHP with it. Do you know of where I can get binaries for extension for PHP 5.0.4?
Even if you do find it, if you don't have permission to recompile PHP, you're going to have a very hard time getting PHP to use the library. PHP is designed this way so that hosting providers don't have to worry about users turning on unwanted (by the HSP) extensions.

Let me see if I understand. You had permission to compile PHP and now no longer do? I recommend that you contact whoever now has permission to compile PHP and ask him/her to do it.



Want the best answers? Ask the best questions! TANSTAAFL!
 
Ok thanks.

This server is owned by my father and doesn't trust any one with root. Also the [tt]dl()[/tt] function is enabled and was expecting to use that to load GD. I did do that with Zlib.

---------------------------------------
TINSTAAFL, which is why I contribute.
 
You might be able to.

Download the source tarball (the link is in the PHP online manual), compile it and use dl().

The better way, however, is to recompile PHP.



Want the best answers? Ask the best questions! TANSTAAFL!
 
Thanks again.

---------------------------------------
TINSTAAFL, which is why I contribute.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top