virgo27 Posted March 2, 2012 Share Posted March 2, 2012 Hi all . . . . . . My client has given me an "SO" file. He also gave me the link http://devzone.zend.com/1435/wrapping-c-classes-in-a-php-extension/ as for reference on how to use the "SO" file. Based on this my developer created an "SO" file and loaded it in the php script and it worked. But when the client's "SO" file is loaded, it says "not a valid "SO" file. Now the client says that the file works fine on their end. My developer has never used "SO" file before. Kindly also elaborate "SO" files in simplest terms and are they only developed using c/c++ or any other language can also be used to develop "SO" files. Also can the same "SO" file be used via jsp and php????? And is there any possibility that an "SO" file is working with jsp and not working with php????? Quote Link to comment https://forums.phpfreaks.com/topic/258116-cannot-load-so-file/ Share on other sites More sharing options...
requinix Posted March 2, 2012 Share Posted March 2, 2012 .so files are compiled (like .dll files on Windows) which means they have to be compatible with your system and software. For instance, you can't mix 32-bit and 64-bit. They're generated by anything which can be compiled - predominantly C/C++ but that's not a requirement. Those files then get referenced by other things which support it. PHP code by itself does not; you'd have to write an extension (which is what that link talks about) to be able to use a .so file in your code. I don't know about Java but given its platform-independent nature I would guess not. What is this file your client is giving you about, and is s/he willing and able to give you the original source code? Quote Link to comment https://forums.phpfreaks.com/topic/258116-cannot-load-so-file/#findComment-1323141 Share on other sites More sharing options...
virgo27 Posted March 2, 2012 Author Share Posted March 2, 2012 Thanks Dude, at least I am clear about .so files now No the client is not willing to give the source and it has a class and it has four methods that we have to use Quote Link to comment https://forums.phpfreaks.com/topic/258116-cannot-load-so-file/#findComment-1323154 Share on other sites More sharing options...
requinix Posted March 2, 2012 Share Posted March 2, 2012 I figured. If they were giving you precompiled files then they probably didn't want you seeing the source. Use something like Unix's file command to find out the type of file they gave you. Then compare the information with your system and the PHP setup you have. If they don't match then the client will have to give you the .so compiled for a different architecture. Quote Link to comment https://forums.phpfreaks.com/topic/258116-cannot-load-so-file/#findComment-1323161 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.