Change php-cli version in Terminal

I'm one of the many people who appreciated the pre-install of PHP 5.3.x with my new mac but needed to use 5.2.x for my local development environment. I performed one of the prescribed rollback methods and when using PHP through apache it works great. A phpinfo() shows: PHP Version 5.2.10.
However, when using PHP through the command line (which also includes cron jobs I've set up, etc.) it still thinks it is 5.3.x. A php -v from the command line shows: PHP 5.3.2 (cli).
I need these to be in sync for a variety of reasons, including using pear (which automatically builds extensions for 5.3.x instead of 5.2.x) and cronjobs, etc.

jeremycellis wrote:
So I don't think I actually have a php 5.2.x binary. Is it possible to actually downgrade the php 5.3.x CLI install?
You don't want to change the system version. You can certainly download the PHP source, compile it, and install it into /usr/local and it should run fine. Even better, since you only need this for the command line client, you don't have to worry about having a matching Apache. Just make sure that your full 5.2 PHP completely matches your .so version in terms of build settings and libraries.
I wish macs came with apt-get or a similar package manager because I think this would be easier if so.
That is by design. Apple doesn't want to have to deal with a moving target OS when updating. There is no "Linux operating system" - singular. Each individual Linux machine is a unique OS.
If you want there are a number of 3rd party package managers for MacOS X. I think they are useful only in some very specific circumstances. If you jump to them without knowing all of the side effects, you could get burned. If you do the required research and have good knowledge of MacOS X and how the 3rd party package manager works, you can use it effectively. If you don't pay attention, you could wind up unable to build or run even the simplest open-source projects.

Similar Messages

  • Hide Apache Information & PHP software version

    I would like to Hide Apache Information & PHP software version like described at this URI:
    http://www.debianadmin.com/apache-tipshide-apache-information-php-software-versi on.html
    With the OS X Server what and where is the apache directives in Apache configuration file /etc/apache2/apache2.conf?
    I assume on OS X-Server this is the httpd.conf but isn't that file not to be edited and instead edit the virtual hosts within /private/etc/apache2/sites?
    A bit of advice here and instructions like the linked page would be greatly appreciated.

    I assume on OS X-Server this is the httpd.conf but isn't that file not to be edited and instead edit the virtual hosts within /private/etc/apache2/sites?
    The ServerSignature command can be added at many levels - if it's added to /etc/apache2/httpd.conf then it applies to all sites running on this server.
    If you add it to an individual site's configuration file then it only applies to that site (other sites on the same server would still publish the server data).
    Therefore it's entirely up to you as to where you make the change, depending on what your goals are.
    It should be safe to change the directive in /etc/apache2/httpd.conf - that should be persistent. Adding it to a site's config file runs a greater risk of getting overwritten if you change the site via Server Admin.

  • Installing PHP CLI

    I'm trying to develop a non-web based PHP script. I don't want to install a webserver, I just want the PHP CLI so that I can run what scripts I write. I installed the "php" package, but it doesn't seem to do anything.
    If I call php with either "php myfile.php" or "php -f myfile.php" it just echoes the file back to me. If I run the "php" command by itself it just sits there accepting input and doesn't do anything with it (no errors no execution no anything). Is "php" the right package here? If I type "man php" it describes itself as the PHP CLI...

    DWilliams wrote:If I run the "php" command by itself it just sits there accepting input and doesn't do anything with it (no errors no execution no anything). Is "php" the right package here? If I type "man php" it describes itself as the PHP CLI...
    Sorry, can't edit my post above, change of nick..
    If you run a command by hand from the CLI you would need to press ctl+d to have it interpreted. Of course, without the -r you would still need the php tags, even when writing your script by hand.
    Example
    # php
    <?php echo "foo\n"; ?>
    followed by a control+d will output "foo"

  • How can I permanently change a text color in Terminal.app?

    According to Terminal's help file:
    "To change the color of the Terminal window or text, drag a color from the Colors window to the Terminal window. If you drop the color on an empty part of the window, the window background changes to the color. If you drop it on text, the text changes to the new color."
    This works like a charm; I drag a lighter blue color onto the dark blue that some distributions of linux display by default when showing a directory in ls and the color changes for the rest of my terminal session in any ls.
    The question is how do I make this change permanent? I tried saving my terminal session into a .term file and opening it, but this change wasn't saved. Everything else was, of course, but not this one.
    Any ideas how to make this sort of change permanent?

    Sorry, but that doesn't address the actual question. I probably was unclear when I asked, so it's my own fault.
    I am not trying to change the color of the cursor, normal text, bold text, or selection. I am attempting to change which color blue shows up when an ansi code for blue is displayed. This can be done by opening the Show Colors interface from the Font menu then dragging the new color to the existing one (so if I have text displayed in Blue that reads "foobar" and I drag aqua onto that text, all Blue text now appears aqua in that Terminal session). The question is how do I make this change permanent?

  • Photoshop CS2 in 2006. for Macintosh. Now I changed the Maverick version 10.9.

    Hello  I purchased Photoshop CS2 in 2006. for Macintosh. Now I changed the Maverick version 10.9. But now I do not know where to download the same version, so I use bought in 2006 key. When pulled CS2 can not install it because my version is higher. Thank you in advance for your reply and help.

    CS2 was a PowerPC based application.
    MacOS 10.9 won't run on PowerPC systems, and no longer supports the Rosetta emulation of PowerPC processors.
    You will need an Intel native version of Photoshop to run on your current system.

  • How to retain the PDF's compression when changing the PDF version?

    Hi,
    I need to change the PDF version from "1.5" to "1.6" without changing the original PDF compression (i.e compressed object streams) using "Acrobat X pro".
    I had tried to change one sample PDF version from 1.5 to 1.6 using "PDF Optimizer" and found the following results.
    ================================
    Input PDF contains the following properties:
    Document Properties
    1. Total pages:256
    2. PDF version: 1.5
    3. Tagged PDF: No
    4. Fast Web View: No
    Available Compressions (Identified through "Preflight>Pages")
    1. Page description is compressed for all the pages (256)
    2. Pages has compressed object streams for "254" pages except "Front Cover" and "Back Cover"
    Output PDF contains the following properties:
    Document Properties
    1. Total pages:256
    2. PDF version: 1.6
    3. Tagged PDF: No
    4. Fast Web View: No
    Available Compressions (Identified through "Preflight>Pages")
    1. Page description is compressed for all the pages (256)
    2. Pages has compressed object streams for all the "256" pages including "Front Cover" and "Back Cover"
    ================================
    "Pages has compressed object streams" found  for all the "256" pages (but input PDF has only 254 pages) including "Front Cover" and "Back Cover".
    But I want to retain all the properties of input PDF with version change. This is my actual requirement.
    I hope that Acrobat expert will offer some useful suggestions for the above. Thanks in advance.
    Regards,
    Raja. S

    Thanks for the reply.
    I had tried everything under "Clean Up" option (PDF optimizer>Clean Up) but "Pages has compressed object streams" applied automatically.
    Note: If I check the option "Optimize the PDF for fast web view" under Clean Up, then output retain the required source PDF  compression. But I must not change the source PDF to "Fast web view".
    This is not testing purpose and this is one of our client requirement. Kindly advise with better solution to solve this issue.
    Thanks,
    Raja. S

  • How to change the jdk version of the sun one appserver 8.1

    hi
    i have installed appserver8.1 with a jdk 1.5 .
    i am facing some problem with the parsers (my application needs to use a crimson parsers which is not supported by jdk1.5 i guess)
    so i am trying to change the jdk version by changing the asenv.conf file
    but the appservers wont start up if i do so.
    help !! please

    This is strange. Setting AS_JAVA to the install location of your jdk instance should work. I have done it many times.
    What kind of errors are you getting in the server log file?

  • Hey,i forgot my login password,so i changed the password by using terminal command(reset password).now i have new user name with new password,but i can't find  my data which i have saved on mac.please help me out in this matter.

    hey,i forgot my login password,so i changed the password by using terminal command(reset password).now i have new user name with new password,
    but i can't find  my data which i have saved on mac.the storage is showing data used and free space on the disk
    please help me out in this matter.

    How did you change your user name?
    resetpassword wouldn't have done it. If you managed to create a new user, then your data is still in the old account.

  • HT4623 i have install the GM version for my iPod Touch,did i need to do anything to change to public version? restore or else?

    i have install the GM version for my iPod Touch,did i need to do anything to change to public version? restore or else?

    Please don't post here about beta software. There are confidential forums set aside for developers to use. Developer Forums. If you are a paid developer or seed tester then it's a violation of your NDA to post in these forums. If you aren't a developer or seed tester then you have an illegal copy.

  • Change the Product version from ECC to ERP 6.0

    Hello Experts
    I am planning to apply EHP4 on my Development ECC system. In line with the the suggestion from guide "How to install SAP Enhancement Package 4 for SAP ERP 6.0" system I am supposed to define my ECC system with leading product version ERP 6.0.
    My Ecc system is currently defined with Product version SAP ECC 6.0.
    As per the above guide and also suggestion from "Note 1344564 - Maintenance Optimizer: Check system landscape" which says-
    "In particular for a system of the product SAP ERP, assign the product version of SAP ERP, not SAP ECC."
    I am supposed to change the leading product version to ERP 6.0.
    Now with the current definition of system with product version SAP ECC 6.0, it is being used in a logical component. In order to change this I need to delete the associated logical component. The problem is -this logical component is being used in more than one Project definition that has huge documentation associated with them.
    My question -
    will the deletion of current logical component affect my documentation in any way?
    How can I change the product version from SAP ECC 6.0 to SAP ERP 6.0 without affecting the current setup?
    Regards
    Dhiraj

    Hello Warren,
    Thanks for the suggestion.
    I have already taken care of all the suggested notes in the master note that you suggested. I am able to generate the XML file for other solution defined in my system. In those I have my ECC system defined purely as ERP 6.0 system. I am not able to make out why its not generating the XML for this solution.
    Regards
    Dhiraj

  • Can I change how Weblogic versions the logfile

    Is it possible to change how WebLogic versions the logfil?
    I would like to append the date instead of just a number, is that possible.
    I would appreciate if you could mail me as well as posting a reply.
    Roger Kjernsrod

    Roger, this functionality is not supported.
    "Roger Kjærnsrød" <[email protected]> wrote in message
    news:[email protected]..
    Is it possible to change how WebLogic versions the logfil?
    I would like to append the date instead of just a number, is thatpossible.
    >
    I would appreciate if you could mail me as well as posting a reply.
    Roger Kjernsrod

  • Is it possible to change the Mac Version of Photoshop CS6 Extended to a Windows Version ?

    Is it possible to change the Mac Version of Photoshop CS6 Extended to a Windows Version ?

    Yes. It's called a Platform swap.
    Order product | Platform, language swap

  • I have a ipad3 already over 1 year, can I have a chance to change a latest version iPad?

    I have a iPad 3, just over one year, can I have a chance to change a new version iPad? By paying some additional money?

    This is something that you'd need to discuss with Apple, I've heard them doing this with iPhones in the US, but not here in the UK or anywhere else and not with iPads either, but as I say, check with Apple directly as a lot of these things are location dependent.
    Steve

  • I activated this week my Photoshop and Lightroom CC and noticed it is a dutch version but in the past I always worked with an english version. Can I change the dutch version for an english ? Thanks. Peter

    I activated this week my Photoshop and Lightroom CC and noticed it is a dutch version but in the past I always worked with an english version. Can I change the dutch version for an english ? Thanks. Peter

    Hi t Forograafken,
    You can check your Creative Cloud Application Preferences to see if 'Deutsch' is chosen.
    You can change the App language from here :
    Regards,
    Rave

  • Can I change my Mac version of Flash for a Windows version?

    Hey, I bought Flash Pro CS3 for Mac and was wondering if
    there was any way I could change my Mac version for a Windows
    version? Any help is appreciated.

    This is a good question for Adobe support, we are just users
    on this board.
    I really don't know. You could try downloading the trial for
    PC, installing it, then see if your Mac license key works to
    activate it. My guess is that it will not, but it's worth a try.
    But again, to really get this resolved you should contact
    Adobe support.
    Good luck.

Maybe you are looking for

  • Shift wise process order confirmation

    Hi Guru's My client is asking about shift wise confirmation of process order. wht r the step will I follow to maintian the desire requirement. Please explain with example upto order confirmation, wht r the field to be check & wht should be the input

  • Choice of  keyboard layout buying a refurbished Macbook Air or Pro?

    Do I have a choice of a certain keyboard layout when I buy a refurbished Macbook Air or Pro? I like to buy a Macbook Air or Pro in the Swiss Apple Online Store. There seems to be no information at all which kind of keyboard layout (e.g. US QWERTY or

  • Video play crashes on my iPhone 6 plus

    If I strat playing a video on my iPhone 6 plus in portrait mode it will play perfectly but when I rotate the phone to landscape mode the video crashes whatever app I am playing it in. Usually my safari or google browser.

  • Replacement for FormCalc Date2Num Date Field Calculations in Mobile Forms?

    I have a number of forms that use the FormCalc Date2Num function. According to the Adobe documentation this function is not supported in mobile forms. If I were doing pure html5 forms I would use a JavaScript library to use a similar function. What's

  • Not receiving student discount code

    A couple of weeks ago, I signed up for the student discount code with an edu email address and verified my information with the email that was sent from Best Buy afterwards.  I have not received the code yet.  Is there something else that I need to d