I just went from windows to mac and am now trying to import my local wordpress projects from xampp to mamp. I have some issues with my websites and I suspect it is because of the newer version of PHP that MAMP uses.
In the preferences MAMP offers "7.1.0" and "7.0.13" but when I change to the older version and click "save", MAMP restarts the servers and when I check the settings it is back to "7.1.0".
How can you fix this?
I was able to change the PHP Settings after changing the available PHP versions that MAMP offers. I did this by going to "/Applications/MAMP/bin/php" and renaming one of the folders, for example adding "_X" at the end. By renaming the folder of one of the 2 available PHP versions you remove it from the selection. Afterwards I was able to change and save the standard PHP version.
A bug was recently submitted on Mamp's Bugbase but it is unresolved at this moment. Meanwhile, the solution described by koedev, as well as the solutions found at the workaround cited by Arda Kazanci could be used.
Globally, two different solutions are available in the workaround cited by Kazanci: The koedev solution, that is, adding a _X in folder's name, and a second one that seems to be more professional, that is, adding an "extra" folder to httpd.conf and "selecting" inside which php versions should be used by mamp. Because some users didn't succeed in making work the extra configuration of httpd, it may be faster and simplest to follow the koedev solution.
Related
So I have been looking on the net for hours now and I can't solve my problem.
I have wamp installed (WampServer Version 3.1.7 64bit).
I want to open phpMyAdmin through wamp. (I have the phpMyAdmin5.0.2 installed and phpMyAdmin.conf is configured).
I have several php versions installed.(this was done through the process of trying to fix the solution alone).
When I try to open phpMyAdmin I get this error message: [1]: https://i.stack.imgur.com/ZEMaX.png .
I have tried configuring php.ini file (by de-commenting mysqli) it didn't change a thing.
Here's my php.ini file joined in the google drive link: https://drive.google.com/file/d/1fQuVoh5vhRX-MHhYL3zMQ4xNkstO-4Ch/view?usp=sharing .
I have configured extension_dir tp the php/ext folder.
I have similary configured my windows path to the php/ext.
Nothing I try works. Any help is welcome.
Thank you.
Since you're using WAMP, which should include all the pieces you need already working, but also have several PHP versions installed, it sounds like you're installing more than you need which is causing conflicts.
Assume you have no data in your database or web pages that you need to preserve, I suggest removing everything; get rid of WAMP and any extra Apache, PHP, or MySQL/MariaDB installations you have. Clean up (delete or move out of the way) any leftover configuration files, then reinstall WAMP. If you have trouble after installing only WAMP and no other PHP installation, then report back here details of the error. WAMP should come to you working and all ready to go, so if there is a problem, it will be helpful to start from a known base installation without extra configuration files or executable that will cause conflicts.
I'll also point out that the very top of the file you posted states that it's used only for the PHP Command Line Interface, so this is not the configuration file used by anything running through your webserver (like phpMyAdmin or your site). It's a little confusing that there are really two PHP instances (one for the command line and one that runs through the webserver), but in this case you would be looking for the file in wamp/bin/apache/apache2.x.y/bin/php.ini
We have an old legacy PHP website that won't run on PHP greater than 5.4. It's on a shared hosting server with GreenGeeks.com and we have a cPanel 11 to control all our hosted sites. We've had to keep the default PHP level at 5.4 purely to keep this one legacy site running (there are multiple errors with > 5.4), but that can't go on, we need to upgrade the default PHP to the latest version.
Rewriting the legacy site isn't really an option unfortunately. I thought that if we set PHP level up to latest and add a directive in the .htaccess then that would work, so I've tried adding this into the .htaccess for the legacy site at the top of the file:
AddHandler application/x-httpd-php54 .php
And a number of other variations (I don't know much about htaccess) and the site still runs okay with them added, but as soon as I change the default PHP level for the entire platform to something higher I get this:
So my question is, is it possible in such a setup to have one website running PHP 5.4 and all the others running, say 7.2? And if so, what am I doing wrong?
Edit
I contacted GreenGeeks support and they inform me that only one PHP version can run per cPanel account, so overrides in .htaccess simply don't work.
If anyone has any workarounds that would be great but I think this is simply not possible.
That setting is per account.
If you change to php 5.4 all website hosted on that account will use php 5.4.
My advice is to hire someone to update your code from that old website to be able to use php 7.0 or higher.
This is my issue and it has given me sleepless night.
I have been working on the wamp 2.1 server environment for the past 3 years and now i want to upgrade. I finally installed wamp 2.5 and would be willing to keep my previous wamp 2.1 version. everything looks good, because after installation, i did the following after:
Copied ?:\wamp_old\bin\apache to ?:\wamp\bin
Copied ?:\wamp_old\bin\mysql to ?:\wamp\bin
Copied ?:\wamp_old\bin\php to ?:\wamp\bin
Now, the issue is this:
Whenever i start the wamp server with the latest version, it works and the icon turns green. but whenever i try changing/switching back to the old version, all the services starts except the Apache. the icon stays orange and never turns green. whenever i click test port, it tells me your port 80 is not actually used. when i click on install service, i get this message: your port 80 is available, install will proceed. when i select remove service, it removes immediately. when i click start/resume service, nothing happens and it never starts.
What I want to achieve is this:
Some old joomla site were developed on the former wamp 2.1 and each time i tried accessing them via the new wamp 2.5, i see some deprecated functions and it display some chunks of codes. meanwhile, i have two projects that refuse to run on the old wamp 2.1, so i decided to run the 2.5. Presently, the system has wamp 2.5 running.
For 5 days now, i have been cracking my head and i have been stucked.. someone out there should please help me with a solution to run wamp 2.1 and wamp 2.5 together so i can switch version easily. or a probably solution will be appreciated.
Kind Regards !
You were on the right track copying the old Apache MySQL and PHP folders into the new 2.5 version.
Unfortunately switching to very old versions from the new ones is now a bit more hassle than it used to be because of the changes made in the version of compiler used to compile Apache and PHP.
Your old versions of Apache and PHP were compiled with MSVC6 and the new versions with MSVC11 and the 2 are not compatible i.e. an Apache compiled with VC11 wont run with a PHP compiled with VC6 etc.
So try this :-
Switch from Apache 2.4.9 to your old version, it wont start because the PHP version will still be 5.5.12.
Ignore the problem.
Now switch to an old version of PHP, thats compatible with the old Apache.
With luck it will now work.
Check you have the correct version by looking at phpinfo
If it does not come up re-do the switch to the old apache and then again to the old PHP by just re-clicking the version numbers on the relevant switch menu.
To be honest I don't know if it would be possible to restore everything to work fine. I had once similar problems - I had Wampserver and installed new PHP version for WAMP and switched to new PHP version and eveything stopped to work. I tried to change PHP version to the previous one but I had info it's not compatible with Apache and I couldn't change PHP version because of chosen PHP version.
Now I moved to easyPHP and it's much more easier, you can have many PHP versions, there's no problem with changing them.
Probably in your case the problem was not WAMP itself but PHP versions. That's why when you launched your older code you have many warnings. You should simple select older PHP version to do that or you simple have to turn off warning (maybe for other PHP version you had turned off displaying warnings by default?).
If I were you, I would move to easyPHP, dump your databases (if any) and move everything to easyPHP. Probably you won't make your installation of WAMPserver work so the other option is backup everything, dump your databases and reinstall WAMPserver but you can be almost sure similar problem occurs sooner or later when you will be switching between PHP versions.
After alot of brainstorming, I finally resolved the issue all by myself.
Though it may not look wise, but i believe it could go a long way to help others who are stucked in situations like this.
First, I started the wamp 2.5, changed all the versions to the latest ones, which is Apache, Mysql and Php... when the icon turned green, I decided to stop all services, uninstalled the services one after the other. (Apache and mysql) and exit the application by right clicking.
Secondly, I renamed the wamp which encapsulates the 2.5 version to wamp_2.5old and renamed the 2.1 folder back to wamp. i launched the wamp and installed the services back again..this time, it was a lower version. both php and apache had just one version while my sql had two. I made sure the right version of sql was selected and i installed it. I restarted all the services, the icon turned green and all my old website worked.
I tried the method vice-versa and all my latest projects worked. it might look challenging but thats my own way of discovering running multiple version of wamp.
Lastly, thanks to Özgür Eroğlu and Marcin Nabiałek.. they have been of helped.
Pleas help me flag this as useful for research..
vielen gluck.. good luck guys !
The usual mistake: I developed with the newest PHP version, while server has 5.3 ... and some errors appears.
Now I want to install Php 5.3 too, but Im affraid it would spoil the settings of 5.4, the registry entries, etc.... in other words, I want to be able to choose to start 5.3 or 5.4.... how to do it?
As far as I can recall php doesn't put anything of importance in the registry. The thing
that determines what version of php will be used is your server config (apache?).
I don't have a windows box nearby right now, but what I would investigate is if there are any
environment variables that are set, e.g. to pear directory. If you can't find
anything like that then you should be quite safe and the config of each php should reside
in files in the respective directory.
I am trying to get PHP working on my vista home machine but I am getting weird problems. First I had file permission problems for which I disabled Vista's UAC. Now I can't get the PHP interpreter working.
I have made all the necessary changes following some tutorial but I still can't get it working.
Tutorial was located here: http://www.tanguay.info/wamp/installPhp5.php5
Try XAMPP. I use that at home on a Vista machine and it worked nicely after the install.
WAMPServer is also a good option. You can easily enable/disable both PHP extensions and Apache 2 modules. Everything is set up somewhat securely (only local access to the serve), and you get phpMyAdmin already set up.
Only thing I've ever missed is Memcached, but that is fairly easy to set up on your own.
The only problem I have installing PHP and Apache on Vista is that you need to make sure that when you edit the httpd.conf that you are editing it as an admin, otherwise the file is saved in compatibility mode.
To overcome that problem just type notepad++ or whatever in your start menu, right click the item and run as administrator. Then open the file from the app.
You can use FastCGI for IIS 7. I'm using this also and it works perfectly!!
FastCGI
You can try Zend Core
It works on both IIS and Apache (it includes the installation of the Apache)
iis7 is one of the best web servers and especially for php, if you can't get it to work it means you need to google enough, because it isn't logical to blame Vista for php/apache issues