Announcement

#1 2022-07-10 10:37:48

Dingo001
Member
2022-07-08
17

Problem with new install

Greetings,
I am moving piwigo from one machine

http://dingo-den.com/piwigo/index.php?nav=piwigo

to another. 

I installed piwigo on the new machine and that worked fine as I now have a clean slate.

I downloaded the complete piwigo from the old machine minus the /local/config folder so it wouldn't overwrite the database config file.

Code:

 rsync -av -e ssh --exclude /local/config /home/www/html/piwigo/ root@162.19.21.218:/home/www/html/piwigo

I verified that the images were downloaded.

Code:

 cd /home/www/html/piwigo/_data/i/upload/2022/07/04
root@dingo5:/home/www/html/piwigo/_data/i/upload/2022/07/04# ls
20220704003056-1f3674fa-me.jpg  20220704003103-c5bb15f5-th.jpg
20220704003056-1f3674fa-sq.jpg  20220704003106-25a61024-me.jpg
20220704003056-1f3674fa-th.jpg  20220704003106-25a61024-sq.jpg
20220704003102-943c0099-me.jpg  20220704003106-25a61024-th.jpg
20220704003102-943c0099-sq.jpg  20220704003109-6acdd8f7-me.jpg
20220704003102-943c0099-th.jpg  20220704003109-6acdd8f7-sq.jpg
20220704003103-c5bb15f5-me.jpg  20220704003109-6acdd8f7-th.jpg
20220704003103-c5bb15f5-sq.jpg  index.htm

AND checked the upload file.
root@dingo5:/home/www/html/piwigo/upload/2022/07/04# ls
20220704003056-1f3674fa.jpg  20220704003106-25a61024.jpg
20220704003102-943c0099.jpg  20220704003109-6acdd8f7.jpg
20220704003103-c5bb15f5.jpg  index.htm

I then imported the database into the new machine.

Code:

   mysqldump --opt -u root -p piwigo < /home/www/localhost/piwigo-8-7-2022.sql;

Now when I try and open my web page

http://162.19.21.218

the piwigo installation screen comes up ??

http://162.19.21.218/install.php

When I fill in the information I get

Code:

This page isn’t working162.19.21.218 is currently unable to handle this request.
HTTP ERROR 500

I checked the /local/config/database.inc.php and it has the correct info

Code:

<?php
$conf['dblayer'] = 'mysqli';
$conf['db_base'] = 'piwigo';
$conf['db_user'] = 'piwigo';
$conf['db_password'] = 'The Password';
$conf['db_host'] = 'localhost';

$prefixeTable = 'piwigo_';

define('PHPWG_INSTALLED', true);
define('PWG_CHARSET', 'utf-8');
define('DB_CHARSET', 'utf8');
define('DB_COLLATE', '');

?>

Any help would be appreciated..

I cannot see my fenvironment details as I can't open the page

Piwigo URL:   http://162.19.21.218/index.php?nav=piwigo

Last edited by Dingo001 (2022-07-10 10:41:48)

Offline

 

#2 2022-07-10 11:31:52

erAck
Only trying to help
2015-09-06
2050

Re: Problem with new install

HTTP error 500 is a general server error nobody can answer but you (or the host owner) inspecting error logs and digging into things. However, there are quirks with your installation:

1.
Querying HEAD on your given IP gives
HTTP/1.1 302 Found
Location: install.php
an immediate temporary redirection to install.php

2.
If Piwigo is redirecting to install.php it means Piwigo can not evaluate the line
define('PHPWG_INSTALLED', true);
in local/config/database.inc.php, which in your case as the file seems to have it means Piwigo can not access local/config/database.inc.php.

Check the directory and file permissions of your installation and specifically local/config/ and local/config/database.inc.php


Running Piwigo at https://erack.net/gallery/

Offline

 

#3 2022-07-10 11:53:26

Dingo001
Member
2022-07-08
17

Re: Problem with new install

Hi

Thanks for the reply.   I kew that PHP was installed but I checked anyway.

Code:

 php --version
PHP 8.1.2 (cli) (built: Jun 13 2022 13:52:54) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.1.2, Copyright (c) Zend Technologies
    with Zend OPcache v8.1.2, Copyright (c), by Zend Technologies

I had a look in the /local/config folder and the file database.inc.php was not executable

Code:

 -rw-rw-rw- 1 www-data www-data 313 Jul  9 23:23 database.inc.php
-rwxr-xr-x 1 www-data www-data 610 Jun 30 07:47 index.php

I changed it with

Code:

  chmod +x  database.inc.php

and it now looks like this

Code:

 -rwxrwxr-x 1 www-data www-data 313 Jul  9 23:23 database.inc.php

I retried the web page but the install screen came up again.

I might reinstall again as I did have a blank piwigo when I installed.

What folders contain the images and the album info. 

I know of these hold the photos but do not know where the album information is ??

/piwigo/upload
/piwigo/_data


If I know that then instead of downloading the whole piwigo I will just import the folders with the images and albums ??

Last edited by Dingo001 (2022-07-10 11:58:26)

Offline

 

#4 2022-07-10 12:17:37

Dingo001
Member
2022-07-08
17

Re: Problem with new install

I have piwigo back up but it is blank.

I looked in my /www/html folder and the index.php got overwritten by the piwigo index.php.

I guess I copied it over to the wrong folder ??

But now I still do not have any photos or albums even though the photos are in the folders /local/upload and _data ?

I must be missing something ??

Offline

 

#5 2022-07-10 13:42:56

erAck
Only trying to help
2015-09-06
2050

Re: Problem with new install

PHP files don't need to be executable, they are interpreted by the web server's PHP module.
Piwigo won't work well with PHP 8.1, PHP 8.0 is already not completely supported, best is PHP 7.4 at the time being.

I don't know what you did to overwrite your /index.php with Piwigo's index.php, but
http://162.19.21.218/piwigo/
gives your running Piwigo installation (without images) (and now it seems you restored your old /index.php).

Note that whenever you write /local/config/ it looks suspicious to me, because it is an absolute path but should be local/config/ relative to the Piwigo directory, so in your case resulting in /home/www/html/piwigo/local/config/ but I think at the end you got that right because otherwise Piwigo wouldn't come up.

Make sure your database access is working and the database contains everything needed, i.e. the piwigo_images table has name entries and in column path actually has the entries for ./upload/...


Running Piwigo at https://erack.net/gallery/

Offline

 

#6 2022-07-11 04:54:24

Dingo001
Member
2022-07-08
17

Re: Problem with new install

Hello again,

I had a look at the table piwigo_images and it was empty.  I looked at the extract file and there were lots and lots  of entries in the table but they did not apply when I tried to import.  I created a new import file from the old server just in case there was a problem with the one I had but I got the same result, the table is still empty.

Code:

  mysqldump --opt -u root -p piwigo < /home/www/localhost/piwigo-9-7-2022.sql;

So I just extracted just the images table.

Code:

  mysqldump -u root -p  --databases piwigo --tables piwigo_images > export-to-new-server.sql;

The file was still big  3053917 Jul 10 22:19 export-to-new-server.sql

I sent it to the new server

Code:

 scp -r /root/export-to-new-server.sql root@162.19.21.218:/home/www/localhost/
export-to-new-server.sql 
 100% 2982KB   4.1MB/s   00:00

The file is on the nw server and is the same size 3053917 Jul 10 22:27 export-to-new-server.sql

I tried to import the new file into the new server.

Code:

 mysqldump --opt -u root -p piwigo < /home/www/localhost/export-to-new-server.sql

I had a look to see if the data was imported.

Code:

 
mysql -u root -p
 SELECT * FROM piwigo_images;
Empty set (0.000 sec)

The table is still empty ???

Is it possible there is a setting that is limiting the number of rows imported somewhere ???

I had a look in the php.ini file and post_max_size = 100M , memory_limit = 256M , upload_max_filesize = 95M

So there shouldn't be a problem there as the file is just over 3M


Is there a file that contains the data on the old server that I can copy across ???

So I had a look to see where the data was kept on the old server.

SELECT @@datadir;
+-----------------+
| @@datadir       |
+-----------------+
| /var/lib/mysql/ |
+-----------------+
1 row in set (0.00 sec)

I don't know what files to copy across so I don't mess up the new server ??

Last edited by Dingo001 (2022-07-11 05:13:09)

Offline

 

#7 2022-07-11 06:51:44

Dingo001
Member
2022-07-08
17

Re: Problem with new install

Hi

I found the solution.  I was using mysqldump to import the data to the new database and it wasn't working.  I used mysql and it imported all the files and data.

Code:

 mysql -u root -p piwigo < /home/www/localhost/piwigo-9-7-2022.sql;

I can ow see my photos on http://162.19.21.218/piwigo/?nav=piwigo

Well that was a day or so that kept my 72 year old mind active.

Thank you to erAck for all his help.

Cheers,

Offline

 

Board footer

Powered by FluxBB

github twitter newsletter Donate Piwigo.org © 2002-2024 · Contact