Test the added PHP extension class Library
Everything works when you use your browser to test your methods.
However, the PHP xx.php under Linux is executed with an error.
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 when you use your browser to test your methods.
However, the PHP xx.php under Linux is executed with an error.
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 are not loading the same php.ini file, you just loaded your extension into CGI
That's what Chris Yue is talking about, and you can look at the specific differences in the following ways
Execute the $ php-m to see if there is no extension you have written, and from your point of view there is no.
Execute again under $ php-i | grep INI to see which php.ini file is loaded.
At the same time, the Web page performs a
I think it's your CGI PHP and CLI PHP is not the same PHP, it is recommended that you use Phpinfo (); and php-i to see if the extension was installed successfully.
Or check your CLI's PHP path.