I do Php and MySQL development on a small scale on my Mac. When first researching it all a few years back, I came across Marc Liyanage's Apache build (entropy.ch). Since that's all I knew, I installed it and have been using it ever since.
I hear a lot about XAMP and MAMP these days. Now I'm not a Linux guy really. I can get around the terminal, and use MySQL via the terminal, but I'm not too UNIX savy in general. I find that I'm stumped when I have to install packages for Apache / Php via the command line.
My question is: is the interface / installation / maintenance in XAMP / MAMP simpler or more intuitive, than the entropy.ch build? (As in, more interfaces and less UNIX code to build things)?
How about any other differences?
I can't say I've ever seen or used Marc Liyanage's Apache build, but can attest that both XAMPP and MAMP are extremely easy to install and use and neither require any command line commands to setup.
I use XAMPP daily, and tried MAMP for a while but saw nothing better or worse about it so just kept using XAMPP. If you find yourself needing to extend Apache and install additional modules then you might need the command line to do so, but I've never needed to.
The only frustration I've ever had with either is default location for site files being with the application folder. It's not too difficult to change or work around, but it's annoying if you're used to having them in the sites folder.
XAMPP and MAMP are pretty well self contained and neither should affect your existing setup if oyu give them a test drive.
I have found MAMP to be simpler and more intuitive. XAMPP is almost exactly the same, but it doesn't seem as "mac"-like.
I have never even heard of entropy.ch so I can not comment on the differences, but if you havent tried MAMP yet you should take a look. Its incredibly easy.
Related
I understand LAMP, MAMP and XAMP are solution stack. I also understand there are frameworks like Laravel and Symfony.
If I have to start PHP development in a proper manner, Is it required to have a solution stack installed first and then the framework to have a professional set up?
If the answer is yes, then I am assuming the versions of the software inside the package is quite important for compatibility with the framework. Is there a popular combination out there?
And In Live, I suppose, I just to need to have the solution stack installed for the package to run.
My dev machine is a MAC with OSX 10.9.5 and my Live is going to be in Linux. I need to make sure these fundamental knowledge is concrete before I start the work. Any help is much appreciated.
Laravel has a all-in one virtual box solution. It's called as Homestead. Homestead works on many platforms such as Linux, MAC, Windows and contains everything you needed:
Ubuntu 14.04
PHP 5.6
HHVM
Nginx
MySQL
Postgres
Node (With Bower, Grunt, and Gulp)
Redis
Memcached
Beanstalkd
Laravel Envoy
Blackfire Profiler
If you decide to go with other solutions you will probably face with many problems like enabling essential extensions and with changing some system settings.
Besides you can use this solution for pretty much every kind of php framework or code.
Just follow the steps in the guide and almost everything will be ready to use just in few minutes after download finishes.
Laravel is good choice as there is big community and Google trends show it is growing very fast.
As it is PHP then you need to have server which processes the PHP. Usually it is Apache2.
Many people like to use MAMP, XAMP to simplify their development. I prefer to use standard Apache2 myself and you can even just rely on Laravel/PHP builtin server that you can start with php artisan serve, It will be enough for defelopment purposes.
I'm new to RoR. I have a separate install of MySQL that I've been using the command line to access. I also have MAMP PRO on my machine for PHP development. I am having trouble finding out how to switch back to MAMP PRO installation when I'm
working with PHP. I am assuming the issue is related to them using the same sockets although as a newbie to this particular situation I am unsure. My research has failed to yield the answer to this exact situation. Most questions have related to using MAMP with RoR. Some advice on whether having 2 installs of MySQL on the same Mac is possible/a reasonable thing to do would be appreciated.
I tried MAMP but needed SNMP support so I moved to XAMPP. I also had two MySQL installs running at various times and it was always a problem to keep everything in sync. Then I realized that I should probably just be running everything natively on the Mac, which comes with Apache, PHP, and Ruby anyway. This site helped me get that all going - http://coolestguidesontheplanet.com/get-apache-mysql-php-phpmyadmin-working-osx-10-10-yosemite/. Everything - PHP/CakePHP and Ruby On Rails - works perfectly now.
It greatly depends on how you have MAMP setup, but does specifying the port at the end of your PHP environment help? (MAMP uses 8888 by default I believe)
http://yourdomain:8888
I have run into problems getting my local php and rails development environments to play nicely with each other on OSX 10.7.
Developing is a hobby, and I am a total noob. I use MAMP for developing in PHP. A few months a ago I decided to give RoR a whirl, and set up a dev environment using Passenger.
A couple of weeks ago I reinstalled MAMP when I noticed I could not access the MAMP sites.
Now I can't access the RoR sites. I've tried reinstalling Passenger. I still get the error "Oops! Google Chrome could not find app.local" when I type the local URL. If I navigate to localhost, I get an "It Works!" page, so something is being served.
I have experimented with Pow. The server seems to work if I navigate to localhost, but when I go to the app I get a rake not found error. Strange, as all the gems worked under Passenger. I've since uninstalled Pow.
So I have three questions.
1) How do I troubleshoot my setup to find out what is going wrong? I'm guessing it is an issue with the Apache server (though I could be very wrong). Where should I look for log files to help resolve this?
2) What is the best way to set up a local dev environment so that I can switch easily between RoR and PHP? (I know that virtualization is an option, but would prefer not to go down this route, unless there is a very good reason to).
3) Can anyone recommend a good guide or source of info for beginners on setting up dev environments? I have read a lot of different things online, but need to get a better grasp of the basics - i.e., understanding where gem files etc are being installed, proper use of bash files, macports vs homebrew, passenger vs pow etc.
Thanks for taking the time to help a frustrated beginner.
Andy
OK, I'm going to answer my own question. I have got the rails apps running locally, but I still don't feel confident that I fully understand what's happening.
This is what I did.
Uninstalled Passenger
gem uninstall passenger
Uninstalled Passenger PrefPane by right clicking in system preference.
Updated all system gems
gem update --system
cd'd to app directory and updated all app gems
bundle update
Reinstalled Passenger
gem install passenger
passenger-install-apache2-module
Recompiled Passenger Prefpane for OSX 10.7 using xcodebuild and installed.
Deleted and readded apps to passnger prefpane.
I'm not sure what fixed it, but the apps are now running. This is what I think happened. Somehow the configuration between Passenger and Apache had become corrupt, and reinstalling prefpane added the correct lines back into the Apache config file.
The problem is that I stil don't know which Apache install Passenger is using- mac default, macports, or MAMP. I think this is what confused me before, as the config file I was checking was not the correct one.
As a byproduct, I have learned that several of my gems were not up to date or missing dependencies. This may explain the difficulties I experienced with Pow. If so, the Pow seems to be a much easier alternative to Passenger.
So, things are up and running, but I still have a long way to go before I understand how all these configuration files a working. I still don;t think I'm using the Apache install that I would prefer to use!
EDIT
PS: MAMP is also still working for PHP development, and I can easily switch between the two by disabling web sharing in system preferences, and launching MAMP. So all issues resolved for now!
What are the benefits of installing mamp or another package vs enabling php in httpd.conf and manually installing mysql? I am really not sure of which option is better and would love some info.
Thanks,
MAMP and other packages are usually pre-configured and come with other tools like phpMyAdmin, SQLite Manager, SSL, code optimizers. If you think you're handy enough to do what others have done, go ahead. But it'll save you a lot of time and trouble by grabbing what's already available.
I've used MAMP for over two years now and I love it.
For me, I didn't want to configure PHP and MySQL with Apache. On my old computer I installed MySQL and then phpMyAdmin and had a lot of fun trying to get it all working. (But I'm not good with terminal and bash commands)
I installed MAMP on my new computer just because it does all the work for me. When I want to debug a php script, I just fire up my local server and make a few changes.
Imo, MAMP/WAMP = Easy get up and go in a development environment.
If you are running a business critical app, you may be better off with a LAMP stack
I want to develop a professional website using PHP and MySQL. Can i do it in Windows 7 (64-bit) or i need to install linux based OS. How to go for it.
You can run an AMP Stack (Apache, mySQL, PHP) on Windows no problem. I have been doing this for ten years now. Running on Windows 7 64-bit is also no problem.
There are several pre-packaged installers available. My favourite is XAMPP. They usually allow full customization where needed.
You can also download the stand-alone binaries of each product and install them manually. Makes for very, very good learning but is more work.
Yes, you can.
Though a platform is the least thing you will need...
As mentioned it is possible to develop Php and MySQL sites quite happily on Windows using something like XAMPP, even if they are later to be deployed on a Linux web server and I know a lot of people do this and it works great for them.
However I have found in the past you can run into problems later on this way. For example, a lot of people who have only used Windows in the past can get caught out by case-sensitivity in Linux. So your site runs great locally but then you start getting lots of 404 errors when you go live because for example, mypage.php is not the same as myPage.php any more.
At the other end of the development spectrum, you can achieve some really powerful functionality when you start to work the server a bit more - things like video encoding or audio conversion are possible using PHP (with a bit of help from some other apps) on both Windows and Linux but the ways that you would do it are different therefore your development environment becomes much less useful and again you run the risk of putting something live that doesn't work, even tho it runs fine when you test it locally.
Personally, I think it is always best to develop on as close an environment to the intended production server as you can to avoid any nasty surprises when you go live.
Develop on the same platform you are going to be deploying to (if possible). It'll make it extremely easy to deploy with less room for possible error.
Installing the 64-bit versions Apache/PHP/MySQL on Windows 7 is a bit of a pain, but you can easily install the 32-bit versions using XAMPP (as mentioned by Pekka) from apachefriends.org
For Windows you can use a light package, which content php, apache, mysql, pear. link text