[PHP] Re: problems with loaded extensions

2009-04-08 Thread Shawn McKenzie
Andres Gonzalez wrote:
 Hi,
 
 I have got an extension loaded in all three of my php config files (in
 cli, in cgi, and in apache2 directories).  The functions in the
 extension are all accessible when running test scripts from the command
 line, like:
 
 php init.php
 
 for example, in the init.php file I have calls to several of the
 functions in my loaded extension. I also can print out the functions
 like this:
 
 print_r(get_loaded_extensions());
 print_r(get_extension_funcs(vrad));
 
 However, when I run these thru apache, all calls to the functions in my
 loaded extension fail even though the extension is present. If I do
 
 print_r(get_loaded_extensions());
 
 I see my loaded extension vrad printed out as expected indicating it
 is loaded. If I run:
 
 if (extension_loaded(vrad))
 
 it comes back true which further indicates that the extension is indeed
 loaded.
 
 But if I call using apache any of the functions in the loaded extension,
 or if I call:
 print_r(get_extension_funcs(vrad));
 
 all I get is a blank white page with no errors.
 
 I would think that as long as the extension is loaded in both the cli
 php.ini and the apache2 php.ini, I would get the same results from the
 loaded extension. Any idea why it work thru the cli and not apache?
 
 Thanks,
 
 -Andres

Does the extension rely on any external libraries?  It may be that
apache/the extension can't find it/them or apache doesn't have
permission to it/them.

Execute a shell as the apache user and try it from cli.

-- 
Thanks!
-Shawn
http://www.spidean.com

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: problems with loaded extensions

2009-04-08 Thread Edgar da Silva (Fly2k)
Did you check the apache error log?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php