Hi, everyone!
I need your help!
I'm working on a project that needs to develop a php extension for our clients.
The php extension is written by C/C++ and we have complied and installed it to our linux server for testing by using phpize and etc.
So I got a .so file and now we should deliver our product it to our clients, but the problem is that we can't give the source code to them for installing on their php server.
I googled a lot, but all the articls are about phpize&./configure&make&make install things by which needs the source code.
Can I just give the .so file which is complied on our server to our clients and then tell them just copy the .so file to the php exetension modules folder ,setup the php.ini file and then restart apache?
Does it work? Or some ideas?
How to install a php extension by .so file?
Moderator: General Moderators
- flying_circus
- Forum Regular
- Posts: 732
- Joined: Wed Mar 05, 2008 10:23 pm
- Location: Sunriver, OR
Re: How to install a php extension by .so file?
This should work just fine.leekis wrote:Can I just give the .so file which is complied on our server to our clients and then tell them just copy the .so file to the php exetension modules folder ,setup the php.ini file and then restart apache?
Does it work? Or some ideas?
- AbraCadaver
- DevNet Master
- Posts: 2572
- Joined: Mon Feb 24, 2003 10:12 am
- Location: The Republic of Texas
- Contact:
Re: How to install a php extension by .so file?
Yes, so long as any libraries that your extension uses are also on the other server.flying_circus wrote:This should work just fine.leekis wrote:Can I just give the .so file which is complied on our server to our clients and then tell them just copy the .so file to the php exetension modules folder ,setup the php.ini file and then restart apache?
Does it work? Or some ideas?
mysql_function(): WARNING: This extension is deprecated as of PHP 5.5.0, and will be removed in the future. Instead, the MySQLi or PDO_MySQLextension should be used. See also MySQL: choosing an API guide and related FAQ for more information.
Re: How to install a php extension by .so file?
I see! Thank you very much!!
Re: How to install a php extension by .so file?
AbraCadaver wrote:Yes, so long as any libraries that your extension uses are also on the other server.flying_circus wrote:This should work just fine.leekis wrote:Can I just give the .so file which is complied on our server to our clients and then tell them just copy the .so file to the php exetension modules folder ,setup the php.ini file and then restart apache?
Does it work? Or some ideas?
Thanks for your replay!
I tried to copy the .so file to the php extension folder and use dl("abc.so") to load.
But it failed.
When I use "make" to compile the source on my machine, I found a file called "abc.la" created along with the "abc.so".
Do I have to do something with the "abc.la" file too???
Or do some "ldconfig" stuff after I copied the abc.so to the php extension folder???
By the way, the abc.so file needs a 3rd party library of linux program and that's installed at the same path on the client's server too.