• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 424
  • Last Modified:

Need help understanding a part of a link that explains how to upgrade native PHP on Mountain Lion!

So I'm following everything here step by step:

http://mac.tutsplus.com/tutorials/server/upgrading-the-native-php-installation-on-os-x-mountain-lion/

And the one part I don't understand is at the Installing header where it begins as:

First, while in PHP’s unarchived source folder, execute the following configure command:
Then it has 1-57 commands and then at the end it has

Once done, execute
1
$ make test

So how do I really execute the commands shown there 1-57?  Do I create a text file?  Do I have to copy and paste each individual command into Terminal and then press <ENTER>?  Not sure on how to accomplish one of these last tasks to complete my upgrade?

Thank you in advance!
0
stephenlecomptejr
Asked:
stephenlecomptejr
2 Solutions
 
Dave BaldwinFixer of ProblemsCommented:
I have never done any of that.  I am a fairly expert PHP user but I have never compiled a new version and installed it.  Can't help you with that.  I wouldn't install Homebrew either.

What is your end goal with all of this?  You're putting in a lot of work.  What's it for?
0
 
stephenlecomptejrAuthor Commented:
Just do not want to be limited by Mountain Lion's version of PHP.
Will eventually create web pages that talk to MySQL database.
0
 
Dave BaldwinFixer of ProblemsCommented:
PHP 5.4.5 is still very new, it will not be a limit.  I have only heard of one web hosting company that has upgraded to PHP 5.4 and it's causing quite a few problems.  PHP 5.5 is not ready for production use yet so you should not install it.

You should use the 'mysqli' extension http://us3.php.net/manual/en/book.mysqli.php instead of the older 'mysql' extension for you database operations.  'mysqli' has been available ever since PHP 5.0 and has not changed in any way that you would notice.  I am going to start using it on any new projects but all the old projects including ones started on PHP 4.4 still work fine with the old 'mysql' driver on PHP 5.3 and 5.4.  PHP and MySQL doesn't change that much or that fast.

To put it more simply and directly, installing the 'newest' version of PHP and Homebrew will gain you nothing and use up a lot time doing it.
0
 
Mark GilbertSenior Performance EngineerCommented:
if it says "$ make test" I think it's safe to assume that $ in this instance is their command prompt instead of say #, so at the terminal type in make test but do it within the folder you initially ran the setup from. 'make test' will then compile the test, and then you should be good to go. Perhaps test does more than just compile a test...but perhaps it tests for values and then on existence of those values it runs other installs.

The best way I've found to run php without battling with OS's like windows or mac is to start up a vm with everything you need to run php and if you ever need to start again it's a simple matter to start a new vm. Turnkey Linux has some very nice free vm's that have all you need to get started, along with Oracles VirtualBox, also free to load and run the vm. PHP was best designed for linux pure and simple. Mac is *nix based and php will work in it but I've had some sporadic issues with MAMP...although they have been far less frequent than wamp, and then porting to a live linux box just goes horribly wrong and causes even more work just to troubleshoot.

Develop naturally and easily and keep your work down, use a vm. It's almost the same (i would say identical...just semantics on what's different) as using a live server.

Hope this helps.
0
 
mcnuteCommented:
Just copy them out fo the tutorial, paste them into your terminal and press enter. The configure will tell the make command how to compile your php.
0

Featured Post

Become an Android App Developer

Ready to kick start your career in 2018? Learn how to build an Android app in January’s Course of the Month and open the door to new opportunities.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now