The added PHP extension class library is normal when you use a browser for Method Testing. however, phpxx in Linux is used. an error is reported during php Execution. [root @ node234test] # phpsize. phpPHPFatalerror: Calltoundefinedfunctionsize () I... test the added PHP extension class library
Everything works normally when you use a browser for Method Testing.
However, an error is reported when php xx. php is executed in Linux.
As follows:
[Root @ node234 test] # php size. php
PHP Fatal error: Call to undefined function size () in/var/www/html/test/size. php on line 3
Reply content:
Test the added PHP extension class library
Everything works normally when you use a browser for Method Testing.
However, an error is reported when php xx. php is executed in Linux.
As follows:
[Root @ node234 test] # php size. php
PHP Fatal error: Call to undefined function size () in/var/www/html/test/size. php on line 3
Another possibility is that your cli and cgi php load are not the same php. ini file. You only load your extension to cgi.
It is what Chris Yue said. You can use the following method to see the specific difference:
Run $ php-m to see if there are any extensions you have written. From your perspective, there is no such extension.
Run $ php-I | grep ini to check which php. ini file is loaded.
Execute
I think your cgi php and cli php are not the same php. We suggest you use phpinfo (); and php-I to check whether all the extensions have been installed successfully.
Or check the php path of your cli.