Check to see if you have a .htaccess file that’s added a PHP handler that points to PHP4. In the Shell, php4 is the default; php5 is also available in /usr/local. Don’t worry about what shell shows.
For other extensions, you’ll have to add something like this to .htaccess:
AddHandler php5 .bcmath .json
I’m not sure that’s correct, but hopefully someone will correct me.