Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 6 of 6
  1. #1
    Senior Coder doubledee's Avatar
    Join Date
    Mar 2011
    Location
    Arizona
    Posts
    1,057
    Thanks
    25
    Thanked 0 Times in 0 Posts

    Question about MAMP and php.ini

    This Summer I installed MAMP 2.1.4 on my new MacBook Pro when life got put on hold.

    Now that I am back to finishing building my new MBP, it appears that MAMP 2.0 is out.

    Does anyone know if I can just copy over my php.ini file to the corresponding folder in MAMP 2.0 and be ready to go??

    I know it was such a long and painful process for me to have to read every line in the php.ini file and tweak the settings to how I felt they should be.

    If I can avoid having to do that again, it would make my life much easier!!

    Thoughts?

    Sincerely,


    Debbie

  • #2
    God Emperor Fou-Lu's Avatar
    Join Date
    Sep 2002
    Location
    Saskatoon, Saskatchewan
    Posts
    16,987
    Thanks
    4
    Thanked 2,660 Times in 2,629 Posts
    So long as its the same PHP version, it will work flawlessly assuming that all required packages are available for the extensions if you have any (which you probably do since the basic PHP doesn't include even dbms extensions).
    All and all it will likely work for even an older version or a newer version. I recall trying this years and years ago, and I can't recall if it even triggers a warning in any log file for a directive it didn't understand (if it does, it'd probably be an E_CORE level error, but don't think it blocked).
    Directives doesn't actually get added / removed all that often, so you may want to simply glance at the change log for the php version to see if anything new is added or old removed between the versions in use. If so, remove them from the copy, and add anything missing.

    Oh, and there are a few filepath configurations as well. Chances are on an upgraded software package, those will mainly be the same since they'll be paths to sessions and temporary locations, but don't forget about those in case you did change the paths.
    PHP Code:
    header('HTTP/1.1 420 Enhance Your Calm'); 

  • #3
    Senior Coder doubledee's Avatar
    Join Date
    Mar 2011
    Location
    Arizona
    Posts
    1,057
    Thanks
    25
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by Fou-Lu View Post
    So long as its the same PHP version, it will work flawlessly assuming that all required packages are available for the extensions if you have any (which you probably do since the basic PHP doesn't include even dbms extensions).
    MAMP is somewhat trickier now, because it used to just have *one* php folder in the bin folder, but now it has like 4 versions.



    Quote Originally Posted by Fou-Lu View Post
    Oh, and there are a few filepath configurations as well. Chances are on an upgraded software package, those will mainly be the same since they'll be paths to sessions and temporary locations, but don't forget about those in case you did change the paths.
    I don't know what you mean by this.


    BTW, would there anything else I'd need to check up on or modify?


    As far as the MAMP folder goes, I think it is just this that I need to focus on...
    Code:
    MBP>Applications>MAMP>bin>php>newest_php_version_>conf>php.ini
    Sound right?


    What about my Virtual Hosts?

    Those should NOT be affected, right?

    Sincerely,


    Debbie

  • #4
    God Emperor Fou-Lu's Avatar
    Join Date
    Sep 2002
    Location
    Saskatoon, Saskatchewan
    Posts
    16,987
    Thanks
    4
    Thanked 2,660 Times in 2,629 Posts
    I can't really help with the MAMP directory paths, but if that's where the ini file is than that's what you'd modify. httpd.conf, or .htaccess also allow you to modify the PHP ini file location, so technically you could use a single ini for all so long as the versions are similarish.

    I also cannot say if the httpd confs are modified. MAMP would sound like it would introduce a new version of apache as well, but if the version is the same I'd assume it would just skip the installation. I just cannot say what it does for upgrade paths.
    This is part of why I simply install each component I need and configure as necessary. Since I do all that separately, I don't need to concern myself with a distribution and what it's doing.
    PHP Code:
    header('HTTP/1.1 420 Enhance Your Calm'); 

  • #5
    Senior Coder doubledee's Avatar
    Join Date
    Mar 2011
    Location
    Arizona
    Posts
    1,057
    Thanks
    25
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by Fou-Lu View Post
    I can't really help with the MAMP directory paths, but if that's where the ini file is than that's what you'd modify. httpd.conf, or .htaccess also allow you to modify the PHP ini file location, so technically you could use a single ini for all so long as the versions are similarish.

    I also cannot say if the httpd confs are modified. MAMP would sound like it would introduce a new version of apache as well, but if the version is the same I'd assume it would just skip the installation. I just cannot say what it does for upgrade paths.
    This is part of why I simply install each component I need and configure as necessary. Since I do all that separately, I don't need to concern myself with a distribution and what it's doing.
    I poked around and found that these files need to be carried over...
    Code:
    php.ini
    
    httpd.conf

    Being thorough like I am, what I did is created a folder in my "Notes to Configure Apps" folder called...
    Code:
    Backup_of_Directory_Structures

    And then I pasted in the entire bin and conf directories, and then deleted everything out except things leading up to the files mentioned above.

    Now I have a "map" of where everything is, AND I have copies of my original customized files should the production ones ever get screwed up!!




    Debbie

  • #6
    New Coder
    Join Date
    Nov 2011
    Location
    Ratio, Logic
    Posts
    59
    Thanks
    3
    Thanked 6 Times in 6 Posts
    Also would be nice to have older version of MAMP to get all backed up data work for sure in need to recover those like should 100% if something goes wrong with newer instalation
    Btw. what is the main reason of reinstallation MAMP version?


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •