Re: [PHP] problem with shared object file
On Sat, April 28, 2007 6:15 pm, Tijnema ! wrote: You have exactly the same problem as i have. My shared hosting has safe_mode off en dl on, so i could load them :) But i don't have access to write to the php.ini file. Maybe we should create such workaround as you provided? Some script that uses PHP CLI to load dynamic objects. That would be useful for people that use shared hosting, like you and me :) If you have PHP CLI (or CGI) on your server in the first place, it already has a flag to let you choose a custom php.ini, so there's nothing for us to do it's already done This assumes your webhost didn't get rid of 'exec' and friends, and has a proper CLI or CGI installed that you can execute as the php user... A lot of variables, there, in terms of what a host will and won't allow. If you can't do what you want with your host, switch hosts. :-) -- Some people have a gift link here. Know what I want? I want you to buy a CD from some indie artist. http://cdbaby.com/browse/from/lynch Yeah, I get a buck. So? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] problem with shared object file
On 5/3/07, Richard Lynch [EMAIL PROTECTED] wrote: On Sat, April 28, 2007 6:15 pm, Tijnema ! wrote: You have exactly the same problem as i have. My shared hosting has safe_mode off en dl on, so i could load them :) But i don't have access to write to the php.ini file. Maybe we should create such workaround as you provided? Some script that uses PHP CLI to load dynamic objects. That would be useful for people that use shared hosting, like you and me :) If you have PHP CLI (or CGI) on your server in the first place, it already has a flag to let you choose a custom php.ini, so there's nothing for us to do it's already done This assumes your webhost didn't get rid of 'exec' and friends, and has a proper CLI or CGI installed that you can execute as the php user... A lot of variables, there, in terms of what a host will and won't allow. If you can't do what you want with your host, switch hosts. :-) Yes, then you should go for www.dapx.com, it has nearly no security :) Tijnema -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] problem with shared object file
On Wed, May 2, 2007 5:10 pm, Tijnema ! wrote: On 5/3/07, Richard Lynch [EMAIL PROTECTED] wrote: On Sat, April 28, 2007 6:15 pm, Tijnema ! wrote: You have exactly the same problem as i have. My shared hosting has safe_mode off en dl on, so i could load them :) But i don't have access to write to the php.ini file. Maybe we should create such workaround as you provided? Some script that uses PHP CLI to load dynamic objects. That would be useful for people that use shared hosting, like you and me :) If you have PHP CLI (or CGI) on your server in the first place, it already has a flag to let you choose a custom php.ini, so there's nothing for us to do it's already done This assumes your webhost didn't get rid of 'exec' and friends, and has a proper CLI or CGI installed that you can execute as the php user... A lot of variables, there, in terms of what a host will and won't allow. If you can't do what you want with your host, switch hosts. :-) Yes, then you should go for www.dapx.com, it has nearly no security :) Hopefully that is exactly what their clients need. :-v I know some experts think my webhost is daft to let me do a 'dl' and pull in whatever .so file I want to an Apache 1.x mod_php setup... [shrug] I figure if the person buying the webhosting and the person selling the webhosting are both happy, and if neither is doing something egregious to the rest of us (e.g., spam) then let them work it out between themselves, eh? There are enough hosts around with enough different ways of doing things that you just have to try several of them until you find an environment you like. Or, in my case, 3 different environments for differing needs of diverse projects, actually... I've never understood why somebody would stick around with a host that is clearly not suited to their needs, though... I guess your first move can be so traumatic that you never realize that it's not that big a deal with a little prep and planning, so you stick with your second host no matter what... But I had several forced moves early on, and enough different clients with hosts I hated, that I figured out what I wanted and went and found it over the years... -- Some people have a gift link here. Know what I want? I want you to buy a CD from some indie artist. http://cdbaby.com/browse/from/lynch Yeah, I get a buck. So? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] problem with shared object file
On Fri, April 27, 2007 5:49 pm, Tijnema ! wrote: Also, I think dl() is going away in PHP 6, so you may want to re-think this from the get-go... Yes, if seen it is deprecated, but how could somebody include dynamic library without editing php.ini? I was a little bit shocked when i read i should use php.ini variable instead. I never used it, but when i wanted to, i would only to have it loaded in that script, and not all scripts. I also will miss 'dl' big-time, as I sometimes load in obscure libraries that my webhost does not provide, with their permission to do so, and with the understanding that if the libs cause problems, I have to be ready to live without them. There was a thread recently on Internals about possibly not killing this feature, but I don't think it had much support. The guys making the decisions don't use shared hosts, for the most part, and so few people need 'dl, so they don't feel any pressing need for 'dl' :-( Alas, it's something that has no user-land work-around, really... Though I guess you could use PHP to exec CLI PHP with a custom php.ini to then do whatever it is you wanted to do, passing all the data back and forth from web php to cli php... Ugh. -- Some people have a gift link here. Know what I want? I want you to buy a CD from some indie artist. http://cdbaby.com/browse/from/lynch Yeah, I get a buck. So? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] problem with shared object file
On 4/28/07, Richard Lynch [EMAIL PROTECTED] wrote: On Fri, April 27, 2007 5:49 pm, Tijnema ! wrote: Also, I think dl() is going away in PHP 6, so you may want to re-think this from the get-go... Yes, if seen it is deprecated, but how could somebody include dynamic library without editing php.ini? I was a little bit shocked when i read i should use php.ini variable instead. I never used it, but when i wanted to, i would only to have it loaded in that script, and not all scripts. I also will miss 'dl' big-time, as I sometimes load in obscure libraries that my webhost does not provide, with their permission to do so, and with the understanding that if the libs cause problems, I have to be ready to live without them. There was a thread recently on Internals about possibly not killing this feature, but I don't think it had much support. The guys making the decisions don't use shared hosts, for the most part, and so few people need 'dl, so they don't feel any pressing need for 'dl' :-( Alas, it's something that has no user-land work-around, really... Though I guess you could use PHP to exec CLI PHP with a custom php.ini to then do whatever it is you wanted to do, passing all the data back and forth from web php to cli php... Ugh. You have exactly the same problem as i have. My shared hosting has safe_mode off en dl on, so i could load them :) But i don't have access to write to the php.ini file. Maybe we should create such workaround as you provided? Some script that uses PHP CLI to load dynamic objects. That would be useful for people that use shared hosting, like you and me :) Tijnema -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] problem with shared object file
On Thu, April 26, 2007 5:48 am, Marten Lehmann wrote: Hello, I'm trying to include a shared object file with the function dl(). But I always get: Warning: dl() [function.dl]: Unable to load dynamic library '/homepages/xyz/util.so' - /homepages/xyz/util.so: cannot open shared object file: No such file or directory in /homepages/xyz/test.php on line 5 But it is definetely there and readable (also executable)! I tried to include('/homepages/xyz/util.so') which gives same parsing errors since this is not php-code, but including works, so it's actually readable. What is the real error behind it? How can I find out why dynamic loading fails? Is it possibly due to different glibc versions? It's possible that util.so itself is fine, but util.so needs *ANOTHER* .so file that *it* cannot find... You may want to check the Apache error log and /var/log/messages to see if they have anything in them. Also, I think dl() is going away in PHP 6, so you may want to re-think this from the get-go... -- Some people have a gift link here. Know what I want? I want you to buy a CD from some indie artist. http://cdbaby.com/browse/from/lynch Yeah, I get a buck. So? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] problem with shared object file
On 4/27/07, Richard Lynch [EMAIL PROTECTED] wrote: On Thu, April 26, 2007 5:48 am, Marten Lehmann wrote: Hello, I'm trying to include a shared object file with the function dl(). But I always get: Warning: dl() [function.dl]: Unable to load dynamic library '/homepages/xyz/util.so' - /homepages/xyz/util.so: cannot open shared object file: No such file or directory in /homepages/xyz/test.php on line 5 But it is definetely there and readable (also executable)! I tried to include('/homepages/xyz/util.so') which gives same parsing errors since this is not php-code, but including works, so it's actually readable. What is the real error behind it? How can I find out why dynamic loading fails? Is it possibly due to different glibc versions? It's possible that util.so itself is fine, but util.so needs *ANOTHER* .so file that *it* cannot find... You may want to check the Apache error log and /var/log/messages to see if they have anything in them. Also, I think dl() is going away in PHP 6, so you may want to re-think this from the get-go... Yes, if seen it is deprecated, but how could somebody include dynamic library without editing php.ini? I was a little bit shocked when i read i should use php.ini variable instead. I never used it, but when i wanted to, i would only to have it loaded in that script, and not all scripts. Tijnema -- Some people have a gift link here. Know what I want? I want you to buy a CD from some indie artist. http://cdbaby.com/browse/from/lynch Yeah, I get a buck. So? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] problem with shared object file
Hello, I'm trying to include a shared object file with the function dl(). But I always get: Warning: dl() [function.dl]: Unable to load dynamic library '/homepages/xyz/util.so' - /homepages/xyz/util.so: cannot open shared object file: No such file or directory in /homepages/xyz/test.php on line 5 But it is definetely there and readable (also executable)! I tried to include('/homepages/xyz/util.so') which gives same parsing errors since this is not php-code, but including works, so it's actually readable. What is the real error behind it? How can I find out why dynamic loading fails? Is it possibly due to different glibc versions? Regards Marten -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] problem with shared object file
Marten Lehmann wrote: I'm trying to include a shared object file with the function dl(). But I always get: Warning: dl() [function.dl]: Unable to load dynamic library '/homepages/xyz/util.so' - /homepages/xyz/util.so: cannot open shared object file: No such file or directory in /homepages/xyz/test.php on line 5 But it is definetely there and readable (also executable)! I tried to include('/homepages/xyz/util.so') which gives same parsing errors since this is not php-code, but including works, so it's actually readable. What is the real error behind it? How can I find out why dynamic loading fails? Is it possibly due to different glibc versions? Does the lib reference other libs? I believe that if referenced libs can't be found it'll report that error. -Stut -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] problem with shared object file
On 4/26/07, Marten Lehmann [EMAIL PROTECTED] wrote: Hello, I'm trying to include a shared object file with the function dl(). But I always get: Warning: dl() [function.dl]: Unable to load dynamic library '/homepages/xyz/util.so' - /homepages/xyz/util.so: cannot open shared object file: No such file or directory in /homepages/xyz/test.php on line 5 But it is definetely there and readable (also executable)! I tried to include('/homepages/xyz/util.so') which gives same parsing errors since this is not php-code, but including works, so it's actually readable. What is the real error behind it? How can I find out why dynamic loading fails? Is it possibly due to different glibc versions? Regards Marten Yes, a different glibc version could be the problem. try ldd /homepages/xyz/util.so Tijnema -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php