Jump to content
xisto Community
Sign in to follow this  
marijnnn

Exif Extension Missing From Asta Php ? Help

Recommended Posts

hm, apearently, the exif extension is not enabled by default on the Xisto server.i'd really like to use it so i tried to load it dynamicly. too bad, this didn't work too well. i tried these lines:dl ("exif.so");dl("php_exif.dll"); // just i case it was a windows server :)dl("exif");none of these worked. please help me out here. did anybody here did a dynamic include in one of his scripts? if so, how did you do it? extensions dir is "./" here, and i've read there've been problems with that but i haven't looked into it very well yet.me

Edited by microscopic^earthling (see edit history)

Share this post


Link to post
Share on other sites

The only suggestion is write it portable and test if it's loaded:if(!extension_loaded('exif')){ if(strtoupper(substr(PHP_OS, 0, 3) == 'WIN')) dl('php_exif.dll'); else dl('exif.so');}but this will use the default extension directory, however read the PHP manual on the dl() functions, there's a lot of User contributes that solve this problem.Cheers,MC

Share this post


Link to post
Share on other sites

hmz :) still not getting there :)heeeeelup.i tried to print the entire directory structure so i knew what the abspath was, but off course, i have no access to most of the foldersif somebody could tell me where the extensions really are on the server, like an absolute path, that would help a lot..../ just won't get me anywhere :P

Share this post


Link to post
Share on other sites

ok, got some things written out and concluded this:host is linux. has linux filesystem for sureso mastercomputers, your script won't help me any further.i got the contents of some folder written out (like /usr/lib/php, ...) and concluded that the exif.so file just isn't there.so my possibilities are:*get my own exif.so file, upload it, and try to include it, which will be a bit harder, but there's a script at php.net that might work...*hope that my pm to opaque will get result and the administration will install the rpm i sent them and enable exif.that would be cool.for now: waiting :)

Share this post


Link to post
Share on other sites

ok, got some things written out and concluded this:

 

host is linux. has linux filesystem for sure

so mastercomputers, your script won't help me any further.

i got the contents of some folder written out (like /usr/lib/php, ...) and concluded that the exif.so file just isn't there.

 

so my possibilities are:

*get my own exif.so file, upload it, and try to include it, which will be a bit harder, but there's a script at php.net that might work...

 

*hope that my pm to opaque will get result and the administration will install the rpm i sent them and enable exif.

that would be cool.

 

for now: waiting :)

<{POST_SNAPBACK}>


You can get exif.so yourself, using a Windows RPM extractor on the RPM.

 

You will find that it might not get installed, so you'll probably have to do it yourself.

 

Also, I knew this server was Unix/Linux based and I just suggested writing portable code, just incase you ever switched to Windows based using php_exif.dll.

 

 

Cheers,

 

 

MC

Share this post


Link to post
Share on other sites

stuck again.so i used a script from php.net to include a file in the same directory. it's trying to include the file alright, but i get this error:Warning: dl(): Unable to load dynamic library './/home/marijnnn/public_html/yourshadow/exif.so' - .//home/marijnnn/public_html/yourshadow/exif.so: cannot open shared object file: No such file or directory in /home/marijnnn/public_html/yourshadow/test.php on line 48i think this is out of my hands. however exif doesn't require any other module, it won't work. i'm clueless and hoping the admins will get exif installed. after all, it's a harmless module.

Share this post


Link to post
Share on other sites

stuck again.

so i used a script from php.net to include a file in the same directory.

it's trying to include the file alright, but i get this error:

 

Warning: dl(): Unable to load dynamic library './/home/marijnnn/public_html/yourshadow/exif.so' - .//home/marijnnn/public_html/yourshadow/exif.so: cannot open shared object file: No such file or directory in /home/marijnnn/public_html/yourshadow/test.php on line 48

 

i think this is out of my hands.  however exif doesn't require any other module, it won't work. i'm clueless and hoping the admins will get exif installed. after all, it's a harmless module.

<{POST_SNAPBACK}>


Hey marijnnn,

 

To get exif.so working, you need upload it to your current directory with the script that uses dl();

 

You can get exif.so from me here (right-click, save target as...), remember to set permissions of this file as 755.

 

The test script I used to verify if it worked

 

<?phpdl('exif.so');print_r(get_extension_funcs('exif'));?>

Just prints out the available functions with this extension.

 

 

Cheers,

 

 

MC

Share this post


Link to post
Share on other sites

ok, got some things written out and concluded this:

 

host is linux. has linux filesystem for sure

so mastercomputers, your script won't help me any further.

i got the contents of some folder written out (like /usr/lib/php, ...) and concluded that the exif.so file just isn't there.

 

so my possibilities are:

*get my own exif.so file, upload it, and try to include it, which will be a bit harder, but there's a script at php.net that might work...

 

*hope that my pm to opaque will get result and the administration will install the rpm i sent them and enable exif.

that would be cool.

 

for now: waiting :)

<{POST_SNAPBACK}>


Just explaining why /usr/lib/php or /usr/lib/php4 don't have the exif extension is PHP versions greater than 4.2.x, might be 4.3.x (sorry forgot) had to be added as an argument at compile time of PHP to have it built in. There's quite a few extensions that would require compile-time addition rather than just enabling it in php.ini php.d

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | 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.