Welcome Guest. Please Login or Register  


You are here: Index > AMPPS > General Support > Topic : Restoring backup after manual upgrade



Threaded Mode | Print  

 Restoring backup after manual upgrade (14 Replies, Read 4660 times)
optimystery
Group: Member
Post Group: Newbie
Posts: 14
Status:
Hi,

I just upgraded to AMPPS 3.7, on OSX 10.11
I took a backup of:
ampps
conf
private
var
www

Probably I misunderstood the correct way to do this, and just copied those folders back into the new install. None of my sites load now.
What is the correct way to reinstate all the files, including MySQL db?

Many Thanks
IP: --   

Restoring backup after manual upgrade
optimystery
Group: Member
Post Group: Newbie
Posts: 14
Status:
I have now managed to make some progress by stopping mysql & apache before copying 'var' and 'www' entirely.

I also copied installations.php from private, my.conf and domains from data, httpd.conf in conf

I can see the dbs in phpmyadmin, but only the link structure for each site loads, with no styling, access to wp-admin or working links.

The url is showing sitename/sitename

IP: --   

Restoring backup after manual upgrade
optimystery
Group: Member
Post Group: Newbie
Posts: 14
Status:
Getting nearer.
Turns out I had forgotten to restart apache one more time :D
This is pretty amazing that everything could be restored from files this way!

Now localhost links still resolve to localhost/website.dev, rather than website.dev (which lead to 404)
But this is not major as I can just type in website.dev and everything works.

I will post here when I figure it out in case anyone needs to do the same steps
IP: --   

Restoring backup after manual upgrade
Rishi_P
Group: Member
Post Group: Elite Member
Posts: 317
Status:
Quote

Now localhost links still resolve to localhost/website.dev, rather than website.dev (which lead to 404)

But this is not major as I can just type in website.dev and everything works.



May be its because your virtual host entry is missing.

Open Apache Configuration and search for following line:

#Include conf/extra/httpd-vhosts.conf

remove only '#' and save the config.

Also check Applications/AMPPS/apache/conf/extra/httpd-vhosts.conf file is present or not.
IP: --   

Restoring backup after manual upgrade
optimystery
Group: Member
Post Group: Newbie
Posts: 14
Status:
Thanks.

apache/conf/httpd.conf

already had:
# Virtual hosts
Include conf/extra/httpd-vhosts.conf

/etc/httpd-vhosts.conf seems to have all the correct info, such as:

#### test1.dev VirtualHost ####
           
<VirtualHost 127.0.0.1:80>
<Directory "/Applications/AMPPS/www/test1.dev">
Options FollowSymLinks Indexes
AllowOverride All
Order deny,allow
allow from All
</Directory>
ServerName test1.dev
ServerAlias test1.dev
ScriptAlias /cgi-bin/ "/Applications/AMPPS/www/test1.dev/cgi-bin/"
DocumentRoot "/Applications/AMPPS/www/test1.dev"
ErrorLog "/Applications/AMPPS/apache/logs/test1.dev.err"
CustomLog "/Applications/AMPPS/apache/logs/test1.dev.log" combined
</VirtualHost>


IP: --   

Restoring backup after manual upgrade
optimystery
Group: Member
Post Group: Newbie
Posts: 14
Status:
My original reason for upgrading was to try and fix a problem where Wordpress was not creating multiple image sizes from an upload.

I think there is a problem with the php version.
My CLI tells me I have v5.5.38 whereas adding phpinfo() to functions.php shows v5.6.30

Also that GD library is not installed, which is what I believe wp uses for the image generation.

I am learning as I go, how to configure this, but any input or advice would be greatly appreciated!


IP: --   

Restoring backup after manual upgrade
Rishi_P
Group: Member
Post Group: Elite Member
Posts: 317
Status:
Hi,

GD is installed, to enable it do this:

AMPPS Panel --> PHP --> Extensions --> Select gd.so and click on apply button.
IP: --   

Restoring backup after manual upgrade
optimystery
Group: Member
Post Group: Newbie
Posts: 14
Status:
Thanks, I have enabled gd in panel now.

However, with the following code in functions:

if(extension_loaded('gd') && function_exists('gd_info')){
    echo 'GD is installed!';
}else{
    echo 'GD is NOT installed!';
}
exit();

it tells me GD is NOT installed

IP: --   

Restoring backup after manual upgrade
Rishi_P
Group: Member
Post Group: Elite Member
Posts: 317
Status:
What is the output of following command:

/Applications/AMPPS/php/bin/php -m | grep gd
IP: --   

Restoring backup after manual upgrade
optimystery
Group: Member
Post Group: Newbie
Posts: 14
Status:
it outputs "gd"
IP: --   

Restoring backup after manual upgrade
optimystery
Group: Member
Post Group: Newbie
Posts: 14
Status:
Hi,

I am not sure what is broken with this installation but things arent working as they should.

There are a few problems:
domains not resolving from localhost
new domain added since upgrade not working
/gd library and wordpress image sizing not working
clicking on the toggle switch to stop apache prompts the password, but either simply restarts or is having no effect.

Since doing the manual upgrade a new site I added is not working (I ticked 'add an entry to the vhosts file' and using 'sudo nano /etc/hosts' I can see it is there.
The entry is also in apache/conf/extra/httpd-vhosts.conf.

So there is a problem with domains, and this site will not resolve to its domain.dev name. I see some basic link structure at domain.dev/sitefolder.

All my other sites work but only if I type in the domain. Links from the localhost start page resolve to localhost/site rather than site.

At this point I think a clean install with proper db backups to restore from might be best.
Could you advise please? This is starting to hurt my business..

Should I try to fix these issues individually or start from scratch?
If I do a clean install, what are the steps to restore safely?
A backup of /www and manual backups of each site db stored in /backups would be sufficient?




IP: --   

Restoring backup after manual upgrade
optimystery
Group: Member
Post Group: Newbie
Posts: 14
Status:
Still searching for solutions as after I edited httpd-vhosts apache wouldnt start at all.

I ran
sudo /Applications/AMPPS/apache/bin/httpd

and got
Syntax error on line 155 of /Applications/AMPPS/apache/conf/httpd.conf: Cannot load /usr/local/opt/php56/libexec/apache2/libphp5.so into server: dlopen(/usr/local/opt/php56/libexec/apache2/libphp5.so, 10): image not found

Searching around someone suggested switching the line to reference php7 and resetting the php version from panel.

That didnt work, and the output from above command was the same except now reading libphp7.so

I changed it back, set the php version back to 5.6.

Now apache starts and I can see my new site (including content from db).

But..
localhost/phpmyadmin shows
Cannot connect: invalid settings.


What is going on here?!
IP: --   

Restoring backup after manual upgrade
optimystery
Group: Member
Post Group: Newbie
Posts: 14
Status:
Can someone help with this please?

Error

MySQL said: Documentation
Cannot connect: invalid settings.
phpMyAdmin tried to connect to the MySQL server, and the server rejected the connection. You should check the host, username and password in your configuration and make sure that they correspond to the information given by the administrator of the MySQL server.
IP: --   

Restoring backup after manual upgrade
optimystery
Group: Member
Post Group: Newbie
Posts: 14
Status:
I would like to know how to proceed.

If I need to export everything and do a clean reinstall of AMPPS then I'm willing to do that.

I would need advice on the correct steps to do that.
I followed advice in your documentation about what to backup and am left with a bit of a mess.

I also cannot access phpmyadmin to correctly export my dbs
IP: --   

Restoring backup after manual upgrade
optimystery
Group: Member
Post Group: Newbie
Posts: 14
Status:
Ok, after a couple of hours searching and trial & error I changed
AMPPS/phpmyadmin/config.inc.php

PHP Code

<?php

/* Servers configuration */
$i 0;

/* Server: localhost [1] */
$i++;
$cfg['Servers'][$i]['verbose'] = '';
$cfg['Servers'][$i]['host'] = '127.0.0.1';
$cfg['Servers'][$i]['port'] = '';
$cfg['Servers'][$i]['socket'] = '';
$cfg['Servers'][$i]['connect_type'] = 'tcp';
$cfg['Servers'][$i]['extension'] = 'mysqli';
$cfg['Servers'][$i]['auth_type'] = 'cookie';
$cfg['Servers'][$i]['user'] = 'root';
/* $cfg['Servers'][$i]['password'] = file_get_contents('/Applications/AMPPS/ampps/data/my.conf'); */

$cfg['Servers'][$i]['AllowNoPassword'] = true;

$cfg['Servers'][$i]['password'] = ' ';
$cfg['Servers'][$i]['hide_db'] = '(information_schema|performance_schema)';

/* End of servers configuration */

$cfg['DefaultLang'] = 'en-utf-8';
$cfg['blowfish_secret'] = '';
$cfg['ServerDefault'] = 1;
$cfg['UploadDir'] = '';
$cfg['SaveDir'] = '';

?>

IP: --   

« Previous    Next »

Threaded Mode | Print  



Jump To :


Users viewing this topic
1 guests, 0 users.


All times are GMT. The time now is March 28, 2024, 5:14 pm.

  Powered By AEF 1.0.8 © 2007-2008 Electron Inc.Queries: 11  |  Page Created In:0.235