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
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
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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.