How do we upgrade to new version?

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

How do we upgrade to new version?

Postby caltuna » 20. August 2009 07:25

What is the process for upgrading to the new version?

Do we...

1. Make a SQL dump file of our MySQL databases
2. Save a copy of htdocs folder
3. Install the new version.
4. Replace the new htdocs with the old one
5. Import the SQL dump file to create our databases?

I'm assuming that by installing the new version we will totally wipe out whatever we have now?

Thanks,

Al
caltuna
 
Posts: 111
Joined: 05. May 2009 16:35

Re: How do we upgrade to new version?

Postby Adrian B » 20. August 2009 12:00

I was wondering this as well. I coudn't find anything in the FAQ (since there is no FAQ yet) or elsewhere on how to deal with upgrades.

I know it's convenient to store all files in the XAMPP applications folder, but at the same time it's very un-Mac-like to store settings and modifications there. A much more natural place would be the Application Support folder in the users library folder. But I guess that's been considered and rejected because of the nature of the XAMPP packaged, right?
Adrian B
 
Posts: 5
Joined: 20. August 2009 11:35

Re: How do we upgrade to new version?

Postby MegaChriz » 21. August 2009 09:34

@caltuna
I'm using a similar strategy to install a new XAMPP version.
Since a few weeks I place my website-docs into a different location (the root of my Macintosh HD), so the basepath of my website-docs is now /Websites/ instead of /Applications/XAMPP/xamppfiles/htdocs/. Only the XAMPP-pages will stay in the htdocs folder.
To access the websites on the new location I made a virtual host.

As for the SQL-dump of the MySQL-database, since I'm using XAMPP on different locations, I frequently make SQL-dumps for each website. I place these SQL-files in one of the folders of my websitefolder. I only need to make new SQL-files if I made some changes in the database and when I'm taking my files of the website to a different location.
This is how a website-folder of my usually looks like:

    - class/
    php-classes.
    - docs/
    documentation and thoughts.
    - includes/
    configuration and third-party classes.
    - log/
    - pages/

    a folder for Smarty, which includes a cache-folder, a config-folder, a templates-folder and a templates-compiled-folder.
    - public_html/
    this folder contains all files that may be accessed in the browser, it contains folders 'images', 'js', and 'css', a .htaccess-file and an index.php-file.
    sql/
    all sql-files to build up the database.
    tmp/
    temporary files, used for the webserver to store uploads temporary (this is done by my Uploader-class).

Making a virtual host
1. Edit the file '/Applications/XAMPP/xamppfiles/etc/extra/httpd-vhosts.conf' to add virtual hosts. I'm using an other port for each virtual host.
Code: Select all
Listen 1000
NameVirtualHost *:1000
<VirtualHost *:1000>
    DocumentRoot "/Websites"
   <Directory />
      Options Indexes FollowSymLinks ExecCGI Includes
      AllowOverride All
      Order allow,deny
      Allow from all
   </Directory>
</VirtualHost>

2. Edit '/Applications/XAMPP/xamppfiles/etc/httpd.conf' and uncomment this line:
Code: Select all
Include /Applications/XAMPP/xamppfiles/etc/extra/httpd-vhosts.conf
You can find this line near the end of the document.

3. If you are using XAMPP for Mac v1.0.1 or XAMPP for Mac v1.7.2a then you need to add the following line as well in order to work with multiple ports:
Code: Select all
AcceptMutex flock

Now the docs inside /Websites/ can be accessed in the browser this way:
http://127.0.0.1:1000/
MegaChriz
 
Posts: 158
Joined: 16. February 2009 15:04
Location: Amersfoort, The Netherlands
Operating System: Mac OS X

Re: How do we upgrade to new version?

Postby caltuna » 21. August 2009 14:49

This is a good solution. A few questions:

Is it necessary to use a different port for the v-host? What if I still want to use the default port 80?

Isn't there an easier way to use a different doc folder by just editing httpd.conf to look somewhere else? Is a v-host really necessary?

You know would would be the best... is if XAMPP would upgrade everything EXCEPT htdocs. Let us do that manually. Indeed, it could be configured to upgrade Apache, PHP, and MySQL but NOT touch htdocs OR the MySQL user tables. In other words, XAMPP needs an "upgrade" method. Right now what they call an "upgrade" is simply a re-install.

Al
caltuna
 
Posts: 111
Joined: 05. May 2009 16:35

Re: How do we upgrade to new version?

Postby Adrian B » 21. August 2009 15:13

caltuna wrote:Is it necessary to use a different port for the v-host? What if I still want to use the default port 80?


No, it's not necessary, you can use port 80.

The advantage with virtual hosts is that you can set up your own local domain main, like example.local in your /etc/hosts file. I use virtual hosts with local domain name with XAMPP and store my web roots in the ~/Sites folder. I used this guide as a starting point: XAMPP Virtual Hosts on a MAC

But even with the web roots outside of XAMPP folder, the settings are still there (like httpd.conf and httpd-vhosts.conf), and these settings will be overwritten with default files everytime XAMPP is uppgraded, unless you manually take care of it.
Adrian B
 
Posts: 5
Joined: 20. August 2009 11:35

Re: How do we upgrade to new version?

Postby sili » 28. August 2009 17:02

Recently I also wrote a how-to about setting up virtual hosts in XAMPP.
It is slightly different to your solutions, but it is working great for me:

Install and update XAMPP with virtual hosts on a Mac.

If you find any bugs or incomprehensible steps, please contact me.

Hopefully it helps someone :)
sili
 
Posts: 54
Joined: 15. March 2003 16:05
XAMPP version: dfg
Operating System: dfg

Re: How do we upgrade to new version?

Postby GrimSage » 07. September 2009 19:18

I find this most useful.
It allows me to use
sitename.mbp
then I just set my local dns to point everything back to my machine using dnsmasq
address=/.mbp/192.168.1.96

Code: Select all
UseCanonicalName Off

<VirtualHost *:80>
  VirtualDocumentRoot /Users/USERNAME/Sites/%-2+/www
  <Directory /Users/USERNAME/Sites>
  # ExecCGI is needed here because we can't force
  # CGI execution in the way that ScriptAlias does
  #Options FollowSymLinks ExecCGI
    Options Indexes FollowSymLinks ExecCGI Includes
    AllowOverride ALL
    Order allow,deny
    Allow from all
  </Directory>
 
</VirtualHost>
GrimSage
 
Posts: 4
Joined: 26. July 2009 19:44

Re: How do we upgrade to new version?

Postby GrimSage » 10. September 2009 23:46

As for the databases, which I think should be stored outside of the application directory but that is besides the point...

to backup I use the following

/Applications/XAMPP/xampfiles/bin/mysqldump -u root --all-databases | gzip -9 > databasebackup.sql.gz

this backups all my databases and compresses them into one file then after I do an upgrade of xampp I just run this to restore

gunzip < databasebackup.sql.gz | /Applications/XAMPP/xampfiles/bin/mysql -u root

still a bit of a cumbersome solution, but seems to work for my purposes.
GrimSage
 
Posts: 4
Joined: 26. July 2009 19:44


Return to XAMPP for macOS

Who is online

Users browsing this forum: No registered users and 17 guests