I need to pick up PHP, but haven't installed it yet. I'm following a tutorial for building something with the LAMP stack and they've recommended installing XAMPP. I have a windows laptop, and I run WSL2 on it. I'm curious whether it's possible to download and use XAMPP with WSL2 (using the linux download?) or whether WSL2 precludes me from using XAMPP and I should figure out how to manually install apache, mysql, and php?
I've googled a bunch and haven't gotten any clear answer to whether I can use the xampp ubuntu download or not. The answer probably involves some higher level IT conceptual knowledge that I don't understand. Any guidance on how to proceed would be appreciated!
Related
I'm quite new to Linux and still trying to adapt my self. I've setup my working environment all good, installed XAMPP, node, sublime, etc. But when I tried running a laravel app, the first thing that caught me was I couldn't run php.
I was confused because i had already installed XAMPP (which i thought would've done it all for me), but then I simply created a symlink in my /usr/bin to the /opt/lampp/bin/php and it all worked well (I'm not sure if that was all correct, but it worked).
Then when I tried opening the app in my browser, it couldn't find the sql driver, so I asked my self, what exactly am I doing wrong? XAMPP should have taken care of all those things (as its name suggests), but it didn't setup php and mysql as i thought it would.
Am I missing something here? Should I install MySQL driver and PHP apart from XAMPP? Because that makes no sense at all for me. I really need some basic guidance here about this whole thing, what makes it so different from Windows where I simply install XAMPP and start programming?
I need to understand that so I can have a better understanding of the system it self and fix these kind of problems my self in the future.
PS: I'm using Ubuntu 16.04 and instaled XAMPP with PHP 7.0, downloaded from official website.
Thanks everyone!
I never used xampp on linux myself so i dont know how does it work here but I can tell you what really got me good start at understanding of linux was installing whole LAMP stack myself. So i would recommend googling 'How To Install LAMP' and try to figure it out from countless tutorials.
Basically you install apache, then mysql and php, restart server and check if 'It works'.
try two things
In the folder /etc/php/php.ini
uncheck the line extension=pdo_mysql.so
or in the folder of lampp (/opt/lampp/etc/php.ini)
And to start Laravel you need start with ~/php artisan serve
in the browser localhost:8000
I recently bought a new mac... In the past I used MAMP and Bitnami for the setup of my dev environment, but I would like to find a more efficient way, if exists, to manage my apache & php installation...
So...
What is the best way to set up a PHP development environment on a Mac? On StackOverflow I found something on http://www.macports.org/ are they reliable and/or updated to latest versions of apache and php?
I am one of the BitNami developers. I wanted to mention we have released a version of MAMP stack that you can download and run from Mac OS X app store with one click. It is completely free: https://itunes.apple.com/app/mamp-stack/id571310406
I finally found my perfect setup thanks to this blog post: http://echodittolabs.org/blog/2011/09/os-x-107-lion-development-native-apache-php-homebrew-mysql-or-mariadb, which basically uses Lion's built-in Apache and PHP with a Homebrew installation of MySQL and a nice VirtualHosts setup.
You can try AMPPS new MAMP/WAMP Stack. I use it.
I've installed Apache/MySQL/PHP on linux servers several times, and it's usually a piece of cake because of good package managers.
However, I had a terrible experience with MacPorts. Why don't you look at Xampp if it has everything you need.
I think I'm going for an Ubuntu Virtual Machine, for several reasons...
Easy to mantain (all packages available)
Easy to shutdown
MacOS stays clean
I can easily switch env or similar...
For Windows users i recommend "Softaculous AMPPS" since it's easy to update it. For Mac users I recommend "Bitnami MAMPStack". However to test PHP mail function on my Mac, i use "MAMP Pro".
I've made a mess out of my MAMP setup. I used it all the time for WordPress and Drupal work, but now I want to try and learn Rails. After trying to get Rails installed, I now have 2 versions of MySQL competing with each other—and of course neither works anymore.
So: I'm wondering what the 'proper' way is to set this up so that they play nicely together.
Advice on setting up a 'proper' Mac OS development environment for PHP and Rails extremely welcome.
Thanks
Terry
Using Homebrew and RVM is the only way I recommend setting up a Rails environment on OS X these days. Homebrew gives you a really easy way to install and upgrade applications like MySQL, and RVM makes installing and working with Ruby a breeze. As far as working with PHP and Apache, you should be able to use the Homebrew MySQL install with the existing MAMP setup, as long as you turn off MAMP's MySQL server.
The only other thing you may need to do is install Apple's Xcode developer tools in order to compile the various packages.
Like someone wrote in the comments I will take the VM approach anytime. Just run a linux distribution in a virtual machine with all the modules you need. You can even run/ test different environments. Easy to setup/ upgrade/ replace and you don't have to fiddle around your working os.
I run osx (working environment) and a debian server installation in a virtual box as my webserver (running apache, php, mysql, rails). I switched over from a MAMP configuration and it saved me alot of stress and work (Think about upgrading different MAMP components, really is a pain sometimes)
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.
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