geekpie Posted March 25, 2008 Share Posted March 25, 2008 Why do you compile php shared object extensions? Let's say I want to add "extname": the normal process is: cd extname $ phpize $ ./configure && make which creates a .so file (extname.so) Why don't I just download a .so file, put it in place and enable it in php.ini ? Quote Link to comment https://forums.phpfreaks.com/topic/97775-why-do-you-have-to-compile-php-shared-object-extensions/ Share on other sites More sharing options...
trq Posted March 25, 2008 Share Posted March 25, 2008 Good question, I'm no expert but have compiled a few shared objects in my time. I believe the reason these need to be compiled on the actual machine is to enable them to link into the underlying libraries that they use as well as php itself. Quote Link to comment https://forums.phpfreaks.com/topic/97775-why-do-you-have-to-compile-php-shared-object-extensions/#findComment-500285 Share on other sites More sharing options...
geekpie Posted March 26, 2008 Author Share Posted March 26, 2008 could be right: but you (in my experience) never seem to have tell the configure command anything (such as the location of local libraries). Quote Link to comment https://forums.phpfreaks.com/topic/97775-why-do-you-have-to-compile-php-shared-object-extensions/#findComment-501538 Share on other sites More sharing options...
rhodesa Posted March 26, 2008 Share Posted March 26, 2008 to my knowledge it's because every version of linux is different in one form or another. so, it needs the original source code to compile a version for itself. you could distribute the so, but it would only be good for that particular version of linux. since there are so many linux variations out there, it's easier to just supply the source, and have the user compile it. Quote Link to comment https://forums.phpfreaks.com/topic/97775-why-do-you-have-to-compile-php-shared-object-extensions/#findComment-501540 Share on other sites More sharing options...
trq Posted March 27, 2008 Share Posted March 27, 2008 could be right: but you (in my experience) never seem to have tell the configure command anything (such as the location of local libraries). Default locations are searched and the libraries usually found. Most libs have a .configure option enabling you to point php to a specific location if need be. Quote Link to comment https://forums.phpfreaks.com/topic/97775-why-do-you-have-to-compile-php-shared-object-extensions/#findComment-502099 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.