Jump to content

Cannot load SO file


virgo27

Recommended Posts

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?????

 

Link to comment
https://forums.phpfreaks.com/topic/258116-cannot-load-so-file/
Share on other sites

.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?

Link to comment
https://forums.phpfreaks.com/topic/258116-cannot-load-so-file/#findComment-1323141
Share on other sites

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.

Link to comment
https://forums.phpfreaks.com/topic/258116-cannot-load-so-file/#findComment-1323161
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.