I am working with the voip.ms php api I wish to run a php script from the cli it works fine on my mac in terminal but on the ubuntu server it fails...
$voipms = new VoIPms();
PHP Fatal error: Class 'VoIPms' not found in /root/voipreg/check.php on line 3
PHP short tags (just
<? vs the full tag
<?php) are likely disabled on the Ubuntu system. I would suggest not using short tags as they are not enabled everywhere like the full tag is. If not enabled, you will get exactly what you are describing. PHP doesn't recognize the file as code and just spits it out as text.
While you can enable the short tags in php.ini, I would suggest just not using it. You can't rely on it being enable everywhere and it's not like it is that hard to just type out the full thing. You can also still use the short echo tag
<?=, even with short tags disabled, for a while now.