How to Fix XAMPP 1.7.5-beta1 for Mac OS X

Problems with the Mac OS X version of XAMPP, questions, comments, and anything related.

How to Fix XAMPP 1.7.5-beta1 for Mac OS X

Postby Rodney » 29. April 2012 01:39

Hi All,
I've been searching a while for a solution to this beta build and haven't found a comprehensive guide on how to address all of the problems that came up. So, after doing a lot of research, here's my solution. I've been able to fix all of the problems I've found, but this doesn't change the status of the build from beta. It just makes it usable.

A lot was discovered when doing a comparison between the 1.7.3 and 1.7.5 builds. Also, using Terminal to view and adjust/change permissions on files and directories. And, of course, the research on the web revealed some tools and commands that are essential for solving all of the error messages that were produced from the various XAMPP components (control app, MySQL, PHP, phpMyAdmin).

I'll try to go through the steps as best as I can remember:

REPLACE EXISTING FILES
After copying XAMPP to your Applications folder, REPLACE the control app with one from a previous version; I've tried the 1.7.3 and 1.7.4-beta2 control apps and they both work. DO NOT START THE CONTROL APP. I've noticed that in 1.7.3, XAMPP (or more specifically MySQL and phpMyAdmin) would change the ownership and permissions on files and directories. Changes to the files and directories will be made later using Terminal.

REPLACE the lang.tmp file in /Applications/XAMPP/xamppfiles/htdocs/xampp/ with the lang.tmp file from the 1.7.3 build.

FIX MYSQL CONFIG FILE my.cnf
Under /XAMPP/xamppfiles/etc/ open the MySQL config file my.cnf in a text editor make the following changes:
- Line 29, change user = nobody to user = root
- Line 56, uncomment innodb_data_home_dir
- Line 58, uncomment innodb_log_group_home_dir

CORRECT FILE REFERENCE TO libmysqlclient FOR MYSQL
Move the libmysqlclient_r.18.dylib file and related aliases (with libmysqlclient in the name) from /XAMPP/xamppfiles/lib/ to the /mysql/ sub-directory within: /XAMPP/xamppfiles/lib/mysql/

Here's where Terminal and the tools I mentioned earlier are essential. In Terminal, navigate to the /XAMPP/xamppfiles/lib/php/php-5.3.6/extensions/no-debug-non-zts-20090626/ directory. There are several mysql shared object files that need to be fixed. Use the following command to see the file paths referenced in each:
Code: Select all
$ otool -L filename

For example, using the above command on mysql.so would show the following:
Code: Select all
mysql.so:
      libmysqlclient.18.dylib (compatibility version 18.0.0, current version 18.0.0)
      /usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 1.0.0)
      /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 88.3.9)

As you can see, the file path used to locate libmysqlclient.18.dylib is relative, and assumes that they are both in the same directory. To fix this, use the following command:
Code: Select all
$ sudo install_name_tool -change libmysqlclient.18.dylib \/Applications/XAMPP/xamppfiles/lib/mysql/libmysqlclient.18.dylib \mysql.so

Run the otool -L command again to confirm the change was made.
Code: Select all
mysql.so:
      /Applications/XAMPP/xamppfiles/lib/mysql/libmysqlclient.18.dylib (compatibility version 18.0.0, current version 18.0.0)
      /usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 1.0.0)
      /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 88.3.9)

Repeat the steps above for all of the mysql shared objects in this directory.

CORRECT FILE REFERENCE TO libmysqlclient FOR ProFTPd
In Terminal, navigate to the /Applications/XAMPP/xamppfiles/sbin/ directory. And same as above, use otool to fix the reference path of libmysqlclient.18.dylib in the proftpd file.

PERMISSIONS
Forewarning, THIS IS TEDIOUS. In the Finder, compare corresponding directories in both builds, and copy any files from 1.7.3 that ARE NOT in the 1.7.5. You may not have to do this for all files and directories, especially if version numbers are more recent. For example, php-5.3.1 and php-5.3.6, or perl-5.10.1 and perl-5.12.3, or libmysqlclient_r.16.dylib and libmysqlclient_r.18.dylib.

Now, use Terminal to compare the permissions on the files and directories of both the 1.7.3 and 1.7.5 builds. DO NOT USE "GET INFO". It will not give you the detail that Terminal will:
Code: Select all
$ ls -l

This command is more detailed than the basic ls command.
Permissions in the 1.7.3 are usually in the following (owner:group) format for directories under /xamppfiles/:
- root:admin
- root:wheel
- nobody:admin

As I've mentioned before, I've noticed that in 1.7.3, XAMPP (or more specifically MySQL and phpMyAdmin) would change the ownership and permissions on files and directories. Since the beta (1.7.5) isn't functioning quit the same as the 1.7.3 build, I thought it would be best to give as much, reasonable permission to everyone as possible. So, mirroring the accessibility, but not changing the owner:group rights of the files, I use the chmod command to give the directories and files that I thought would need to be accessible and/or modified by XAMPP, read, write, execute permissions to everyone. I did make changes to everything just those I thought were relevant:
- /htdocs/ all files and directories beneath
- /temp/
- /etc/
- /var/ all files and directories beneath
- /phpmyadmin/ all files and directories beneath

Here's the command:
Code: Select all
$ chmod 776 filename

or
Code: Select all
$ chmod 776 directory


There my be others but that seemed to be enough.

And that's it! Start up XAMPP Control App to confirm everything is ok. If I didn't forget anything (and there's a good chance I did since I didn't run through all the steps before posting this), then hopefully, some of you will find this useful.

And a lot of thanks to you guys at Apache Friends for creating such a great dev stack! I look forward to you getting another Mac Guru!

Rodney
Rodney
 
Posts: 1
Joined: 28. April 2012 20:49
Operating System: Mac OS X 10.5.8 PPC

Return to XAMPP for macOS

Who is online

Users browsing this forum: No registered users and 58 guests