Add MySQL to existing XAMPP installation - xampp

I installed XAMPP with only Apache and PHP and now I realized I also need MySQL. I downloaded a XAMPP installer and ran it, but it won't install in C:\xampp as it already exists.
How can I add MySQL to the existing Apache+PHP installation?

Here is how I did it:
Re-run the installer and install with MySQL into a different folder. (These instructions assume c:\xampp2)
After the installation finishes, move the mysql directory from the new install into the old install. (I moved c:\xampp2\mysql to c:\xampp\mysql) You can then delete the second installation folder.
Be sure xampp is not running and edit c:\xampp\xampp-control.ini, looking for the [EnableModules] section. Set MySQL=1.
Restart xampp. The MySQL buttons should be enabled. Click the Config button next to MySQL and edit the my.ini file. Do a search and replace, changing all instances of xampp2 to xampp.
Now you can hit start, and MySQL should start up. Note these instructions assume c:\xampp is your desired install location, adjust accordingly.

Related

XAMPP doesn't work after update to macOS Big Sur

Today I updated my mac to macOS Big Sur and I can't open XAMPP. When I click on app it doesn't give any response.
Do you know how solve this problem?
You can do a clean installation, but you will lose all your old files and databases. I suggest making a backup of this data.
Uninstall old versions of xampp.
Installation of Xampp by the brew
brew install --cask xampp
If you don't have the brew installed
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
HomeBrew
After Big Sur installation if XAMPP is not opening, get newest version of XAMPP (7.4.12) from their web site.
If you end up with error "Error starting “XAMPP” stack: cannot calculate MAC address: signal killed". After installing the latest version, do following:
Go to terminal ->
cd ~/.bitnami/stackman/helpers
Mv hyperkit hyperkit_backup
After that XAMPP opens and tells its the first time opening, but at least I found all the files etc as before Big Sur upgrade.
Install XAMPP 7.4.12, works perfectly in MacOS Big Sur
I had Xampp 7.4.9 and update Mac OS to Big Sur. Xampp didn't want to launch after that. I lost access to all my projects inside of /htdocs folder hidden somewhere in path structure of my virtual machine.
Kindly note I used version 7.4.9-VM (not 7.4.9-Installer) that is why all my files blocked inside of
/Users/'your_user_name'/.bitnami/stackman/machines/xampp/vm/machine.qcow2
Actually all files are important here:
/Users/'your_user_name'/.bitnami/stackman/machines/xampp
not only machine.qcow2
My solution is kind a mix of before mentioned solutions because they didn’t help in full.
First of all make a backup - copy old structure (with blocked files) to some directory - all this structure:
/Users/'your_user_name'/.bitnami/stackman/machines/xampp
(To see hidden files in MacOS use [Command]+[Shift]+[.])
You also can just rename
/Users/'your_user_name'/.bitnami/
to something like
/Users/'your_user_name'/.my_blocked_files_bitnami/
As programmers here advised to install 7.4.12-VM I installed this version. Very important to install "Virtual Machine" version (as you can see there are 2 installers for each version of Xampp)
Right after I launched 7.4.12-VM the new directory was created here:
/Users/'your_user_name'/.bitnami/
and Xampp will work properly but with no your old projects.
Do not do this step: As programmers here advised to change only one file
/Users/'your_user_name'/.bitnami/stackman/machines/xampp/vm/machine.qcow2
for me it was not enough - Xampp failed with an error:
ERROR: Error starting "XAMPP" stack: cannot start stack: ssh not accessible
My solution was put whole structure from folder xampp
/Users/'your_user_name'/.my_blocked_files_bitnami/stackman/machines/xampp
to here:
/Users/'your_user_name'/.bitnami/stackman/machines/xampp
You may before rename your current folder
/Users/'your_user_name'/.bitnami/stackman/machines/xampp
to something like
/Users/'your_user_name'/.bitnami/stackman/machines/new_xampp_without_my_projects
Then launch Xampp (Xampp should say something about incopatible versions but allows to continue), start all services, mount the disk. press "Expore" and you should see all your old projects.
Thank you.
You can solve this problem by updating xampp ver 7.2.34 .
https://www.apachefriends.org/download.html
Same thing happened to me but the version 7.4.12 seems to be working. I download it from the link I'll but below. I've been reading and the problem seems to be that Big Sur changes some paths that are set by default and so the apps won't launch. Same thing happened to Apache NetBeans.
XAMPP Download Link:
(https://sourceforge.net/projects/xampp/files/XAMPP%20Mac%20OS%20X/7.4.12/)
I had the same problem. This is how I solved it:
First, be sure that you back up your files in XAMPP VM. Your files are in
/Users/'your_user_name'/.bitnami/stackman/machines/xampp/vm/machine.qcow2
Then you can reinstall XAMPP again. I have installed 7.4.12 and it worked fine.
If you see stack error message, this is what you have to do:
Close XAMPP
Open a terminal and remove the stack folder with the following code:
rm -rf ~/.bitnami/stackman
Open XAMPP and check if a new stackman folder is created.
/Users/'your_user_name'/.bitnami/stackman/
If it does not, then start XAPP and stop again. When the stackman folder is created, override the file below with your backup file.
/Users/'your_user_name'/.bitnami/stackman/machines/xampp/vm/machine.qcow2
Close XAMPP again and restart again.
Voila! Here are your files...
I tried reinstalling XAMPP on MACos Big Sur, and it worked. However, my files are not recovered.
you can type this code in terminal
before this code you should close xampp
rm -rf ~/.bitnami/stackman
if you are getting error message saying:
Cannot calculate MAC Address: Using fd 10 for I/O notifications hv_vm_create HV_ERROR (unspecified error)
you need to download new hyperkit from bitnami and replace the current one
cd /tmp
curl -LJO "https://downloads.bitnami.com/files/hyperkit/hyperkit-testing-`20210430"`
mv /tmp/hyperkit-testing-20210430 ~/.bitnami/stackman/helpers/hyperkit
chmod +x ~/.bitnami/stackman/helpers/hyperkit
read tutorial here:
https://floyk.com/en/post/xampp-doesnt-work-after-update-to-macos-big-sur

How to install/enable GD in xampp windows [php 7.2]?

I Can't figure out how to install php-gd for PHP7.2. Is there any way to install/enable GD extension in xampp windows? I checked the php.ini file for php_gd2.dll but I can't find that line. It seems like GD is missing in PHP7.2. Any suggestions??
go to php.ini file
search this ;extension=gd
remove ;
then restart the server
Under xampp/php/php.ini look for "extension=gd2" and uncomment it, I presume this what you looking for
8 steps:
Open xampp control panel.
Start apache and mysql.
Click on config option of apache.
Click on php.ini and open it.
Press Ctrl+F and search "extension=" or "extension=fileinfo".
On the next line to "extension=fileinfo", add "extension=gd".
Save the file.
Stop apache and restart it.
You are done.
My PHP version is 8. if yours is 7 you may need to add extension=gd2 in php.ini file.
You can see your PHP version by searching for "localhost/dashboard" in the browser and then clicking on "PHPinfo" at the top right.
if ";extension=gd" is already there, remove the semicolon and save the file and restart Xampp.
open XAMPP control panel
click Apache config select PHP(php.ini)
ctrl + F , so search for gd
you should see a line like ;extension=gd
just remove ; and save it
stop apache and restart
Your XAMPP now has GD enable
I had to add the absolute path to the extension as well:
extension=gd
extension=C:\xampp\php\ext\php_gd.dll
open xampp
in apache server click config - php.ini
go to php.ini file
ctrl + f to search this ;extension=gd
remove ; then restart the server
Also for windows user if you have multiple xampp installed check which php ini is being used by composer by using command
php --ini
if its not the one you are using u can try uninstalling the undesired one and then trying again

Does reinstalling Macports remove/destroy contents of /opt/local/ directory structure?

I'm running a MacPro G5 w/ 10.5.8. I ran:
sudo port selfupdate and then ran:
sudo port upgrade outdated
When it was all finished, I rebooted and apache2 was broken and would not serve PHP file any longer. If I replace the httpd.conf file, it will serve html files.
I finally gave up and restored the backup and the machine is running again. The problem is I have a second machine that I did the same thing on and don't want to go through the same process. I've read several posts about uninstalling/reinstalling Macports like this one from Kirk Roybal How to do a clean reinstall with macports?, but it doesn't say if this process will destroy or reset the contents of the /opt/local/ directory. Especially the MySQL DBs and htdocs contents. Does anyone know if this process is linked or destructive? I'll make backups of everything, of course, before trying anything.
SOLUTION:
I got it to work by making the php53 install work instead of going backwards. Here's what I did:
sudo port select --set php php53 (set MacPorts to use php53 instead of php5)
sudo port installed (Check to make sure php53-apache2handler is installed)
sudo port install php53-apache2handler (It wasn't and yours probably isn't either)
once that's done installing
php -v (check the version of PHP that's running)
cd /opt/local/apache2/modules
sudo /opt/local/apache2/bin/apxs -a -e -n php mod_php53.so (activates php within apache)
this should append
LoadModule php5_module modules/mod_php53.so
to your /opt/local/apache2/conf/httpd.conf file (check it now)
There will also be a line like this
LoadModule php5_module modules/mod_php5.so
Comment it out or remove it so is doesn't interfere with new install
It should also move a copy of mod_php53.so to
/opt/local/apache2/modules
If it's not there, see php53-apache2handler install above.
Check your httpd.conf file for errors
/opt/local/apache2/bin/httpd -S
Finally, create/edit php.ini file to tell apache2 how to connect to MySQL database
cd /opt/local/etc/php53
sudo cp php.ini-production php.ini (for production machine use development for dev machine)
sudo cp php.ini php.ini.bak
Add the default socket paths to php.ini
pdo_mysql.default_socket=/opt/local/var/run/mysql5/mysqld.sock (may vary based on MySQL version. Check the /opt/local/var/run directory if not sure)
mysql.default_socket=/opt/local/var/run/mysql5/mysqld.sock
mysqli.default_socket=/opt/local/var/run/mysql5/mysqld.sock
If you are having problems connecting to MySQL, check for typos in the above paths FIRST. Trust me it will save you tons of time!
If all went according to plan, you should be able to restart the machine, test to make sure all ports started automatically and things should be working.
The files that you add (eg: MySQL DBs) are not destroyed by an update. If you modify files that are managed by MacPorts (eg: they are listed in 'port contents '), then those modifications will be clobbered by an update.
Some projects install config files as examples and have the user make the real config file so as to not clobber it with an update. It looks like the apache2 port follows this pattern. It installs /opt/local/apache2/conf/original/httpd.conf and then copies it to the real location of /opt/local/apache2/conf/httpd.conf at activation time only if the file does not exist.

MySQL in XAMPP v3.2.1 not starting

My MySQL in XAMPP v3.2.1 is not working. It is installed properly but this comes while running it
4:41:28 PM [mysql] Attempting to start MySQL service...
It never starts!!! Neither does any other error message come. All other services(Apache, FileZilla, etc.) are working but MySQL is not. How to make it work?? Can someone help me??
Thanks in advance
P.S. - I read Xampp MySQL not starting - "Attempting to start MySQL service..." but couldn't find anything useful there
You can easily start your mysql just follow these steps:
open cmd in admin mode
type "sc delete mysql" // without cots
uninstall xampp
delete xampp folder
delete all temporary files
restart your pc
intall a fresh copy of xampp
Its done. Enjoy!!

Problems copying CodeIgniter Installation

I am trying to copy a CodeIgniter installation using svn to a different, brand new server. I have it checked in (did sudo svn commit -m "Initial commit") on the old box. On the the new one, I ran
sudo yum install httpd
sudo yum install php
sudo yum install mysql
Started all the services, checked out exactly the same codeigniter installation, in the /var/www/html directory, and only the first index page loads and all the links are broken. I made sure that the .htaccess files in the web root are exactly the same. A 'svn status --verbose' command in the system/application/config directory returns exactly the same version numbers on both boxes. What could be the problem?
Just to clarify what happens, the 'home' pages loads (ex: myurl.com) but when I click on a link, like "About" it loads the correct URL 'myurl.com/about' in my browser, but the browser says the page doesn't exist 'Oops! This link appears to be broken.'.
I have checked the 'svn status' of the controllers folder and the views folder, all the same version numbers. Any advice would be a huge help!
UPDATE: I have found a "base_href" Constant defined in system/applications/config.php, I changed it, but it hasn't made any difference.
Thanks
This sounds like a mod_rewrite issue to me - enable mod_rewrite, restart httpd, and see what happens when you click on your link.

Resources