Part of the "php -i" output includes system and build date information. To compare all the PHP's installed on your Mac type in "locate php | grep bin/php" in Terminal to see where all the CLI php's are including path, the compare each as you did before (-i) but using the path for each. BTW, "which php" reveals the path of the one you used when you typed in "php -i" without specifying the path the first time. That's the one found in the system path.
The CLI versions of each may have been built differently.
Last edited by SrWebDeveloper; 12-16-2009 at 02:06 PM.
Uncommenting the line in the correct php.ini to enable the soap extension in MAMP should be the fix, it sounds like. I wrote earlier, "Did you restart Apache in MAMP so changes to php.ini are picked up?" and you never responded to that.
Yes i did try that and still the same problem. Also, mamp is showing that soap is enabled when i run phpinfo() from it's interface. It is when executing code from the terminal which is when I'm having the problems.
Last edited by coldscooter; 12-16-2009 at 02:34 PM.
On *nix systems PHP is both installed as an Apache module for HTTP, and also as a separate CLI version used only for shell scripting. Both use the same php.ini. I don't know enough under the hood regarding how MAMP works. Maybe a MAMP guru can join in and confirm it is setup like *nix as I noted.
If they confirm that...
I doubt your web based script is using the CLI version so any weirdness doesn't matter. If it was, you'd use an exec or system call which seems silly, calling PHP CLI from within PHP! So I know you found weirdness with the CLI version, but simply forget about it. Let's refocus on the real issue at hand, the HTTP version of PHP which shows the extension loaded. If all this is true, at this point you're down to two likely causes:
1) MAMP bug loading SOAP extension
2) Your code
If MAMP is installed differently and a MAMP guru can't help you here, time to visit the MAMP support forum or contact their tech support.
Last edited by SrWebDeveloper; 12-16-2009 at 02:47 PM.
But I can run php files from the terminal without mamp even running. Just don't have any mysql then...
For the record, I've offered my suggestion for the problem in your OP, what follows is in response to your latest query which is a side issue. If you need to access your database via PHP5 CLI the support can be added during compilation via:
You can also use php -m to list compiled in versions to double check what's in your CLI or not.
I wish to emphasize this has nothing to do with MAMP which handles the installation for you, nor does it have anything to do with the advice I offered earlier to resolve MAMP. With that disclaimer noted, to manually compile any Linux source distribution, i.e. PHP source downloaded from php.net, a beginner's guide can be found here:
Step 2 deals with your specific question and the two mysql compile options I listed in the earlier reply are passed as arguments to ./configure if that version of PHP doesn't enable it by default. If you have no idea what I just said you should not be doing this. So I close with...
Warning: This is a good way to mess up your Mac if you don't know what you're doing. This is not for novices, Linux experience is a must as most guides like this one assume no errors occur during the many steps involved and offer limited to zero help if they do occur.