Announcement

#1 2012-08-10 01:24:51

mandarin
Member
2012-01-12
20

Strange behaviour leading to non-display of images and thumbnails

Hello,

I believe many Piwigo users are affected by this problem and are mistakenly assuming its a gd display error. I just managed to fix it for the first time and it has been plaguing me for months.

From what I can gather, it is more likely to happen in a shared hosting environment that uses PHP safe mode. This problem is also likely related to group permissions (chgrp) and chmod and Piwigo's ability to write to the folders.

Suppose Piwigo is freshly installed or upgraded. A new folder called _data is created.

_data is given chmod 777 and Piwigo is run for the first time. Upon first run, Piwigo creates several sub folders within _data, namely, combined, i, templates_c and update.

These four folders are created by Piwigo using the "web" group as the owner of the folders, rather than the FTP account as the owner.

In order for Piwigo to work properly, all these folders need to be "repossessed" by the FTP account and then deleted (they can't be deleted through FTP without being reposssessed; and repossession can sometimes be a painful circle jerk requiring correspondence with the web host). After they are deleted, they have to be manually re-created within FTP by the FTP user account as opposed to the web group. The Piwigo team could save us this hassle by prepopulating the _data folder with all the required folders in the .zip file rather than having Piwigo create them at the first run.

Now here's where the real problem starts.

Inside the i folder is a folder called galleries, with sub-folders corresponding to the gallery architecture in the main gallery folder. Piwigo creates all of these on first run after upgrade using the "web" group as the owner of the folders, rather than the FTP account as the owner. In order for Piwigo to work properly, all these folders need to be "repossessed" by the FTP account and then deleted (they can't be deleted through FTP without being reposssessed; and repossession can sometimes be a painful circle jerk requiring correspondence with the web host). After they are deleted, they have to be manually re-created within FTP by the FTP user account as opposed to the web group. This also needs to be done to the folders representing the sub-albums.

Once this is done, Piwigo will work properly and display both images and thumbnails.

Therefore, those suffering from this problem must:

1. after uploading a new gallery to the main gallery folder, create an identical folder in i>galleries, and also create identical folders representing sub-galleries.
2. Make sure that _data is not deleted or overwritten during upgrades (Current Piwigo documentation needs to be updated)

I understand this is a temporary fix, but this is the only way to get things working for the time being.

Offline

 

#2 2012-08-10 06:23:06

rvelices
Piwigo Team
2005-12-29
1960

Re: Strange behaviour leading to non-display of images and thumbnails

mandarin wrote:

In order for Piwigo to work properly, all these folders need to be "repossessed" by the FTP account and then deleted (they can't be deleted through FTP without being reposssessed; and repossession can sometimes be a painful circle jerk requiring correspondence with the web host). ...

I don't get exactly what you are saying... If you take ownership of this dirs instead of the web server, just make sure you have 0777 chmod after any ftp operation

Offline

 

#3 2012-08-10 14:09:16

hurti
Member
2012-08-09
6

Re: Strange behaviour leading to non-display of images and thumbnails

Well, As far as I understand this is a workaround althought I haven't tested yet.

Is this 'officially' a bug?

Last edited by hurti (2012-08-10 14:10:10)

Offline

 

#4 2012-08-10 14:35:28

Graham
Guest

Re: Strange behaviour leading to non-display of images and thumbnails

That work around dont flow with me, within my _data  folder I only have a tmp and template folder nothing else.

Shame this is s this such a crucial part of Piwigo to see pictures and thumbnails. without this fixed it's as usfull as a chocolate teapot.

 

#5 2012-08-10 15:35:12

rvelices
Piwigo Team
2005-12-29
1960

Re: Strange behaviour leading to non-display of images and thumbnails

hurti wrote:

Well, As far as I understand this is a workaround althought I haven't tested yet.

Is this 'officially' a bug?

No. There is ABSOLUTELY nothing we can do (if not better warnings ...). This mainly due to your server setup (apache handler instead of cgi/fcgi). When you take ownership of the directories/files, there is no way for piwigo in php to get it back.

Offline

 

#6 2012-08-10 16:21:16

hurti
Member
2012-08-09
6

Re: Strange behaviour leading to non-display of images and thumbnails

rvelices wrote:

No. There is ABSOLUTELY nothing we can do (if not better warnings ...). This mainly due to your server setup (apache handler instead of cgi/fcgi). When you take ownership of the directories/files, there is no way for piwigo in php to get it back.

Do I miss anything?

As listed here the requirements are:

- a webserver supporting PHP
- MySQL 5
- PHP 5

Offline

 

#7 2012-08-10 19:39:16

rvelices
Piwigo Team
2005-12-29
1960

Re: Strange behaviour leading to non-display of images and thumbnails

hurti wrote:

Do I miss anything?

As listed here the requirements are:

- a webserver supporting PHP
- MySQL 5
- PHP 5

No, but if you do anything by ftp and change ownership and file rights is up to you to put it back in place. (Checkout any other php based app on your server which works with files). It's almost like "I deleted all my files. It does not work. Do I miss anything ? ...' (sorry for being harsh)

Basically if your php runs under another user than your ftp account, there is nothing piwigo can do about it. You must ensure that all directories/files to which piwigo must write as the web server are accessible to the web server (ie: if ftp account is the owner, they must have 0777 permissions)

Offline

 

#8 2012-08-10 19:50:19

hurti
Member
2012-08-09
6

Re: Strange behaviour leading to non-display of images and thumbnails

rvelices wrote:

No, but if you do anything by ftp and change ownership and file rights is up to you to put it back in place. (Checkout any other php based app on your server which works with files). It's almost like "I deleted all my files. It does not work. Do I miss anything ? ...' (sorry for being harsh)

Basically if your php runs under another user than your ftp account, there is nothing piwigo can do about it. You must ensure that all directories/files to which piwigo must write as the web server are accessible to the web server (ie: if ftp account is the owner, they must have 0777 permissions)

I haven't changed/deleted anything. I have followed the documented piwigo installation procedure.
I have started a thread but I didn't receive any helpful answer.

Offline

 

#9 2012-08-10 20:19:11

rvelices
Piwigo Team
2005-12-29
1960

Re: Strange behaviour leading to non-display of images and thumbnails

hurti wrote:

I haven't changed/deleted anything. I have followed the documented piwigo installation procedure.

but you said

Inside the i folder is a folder called galleries, with sub-folders corresponding to the gallery architecture in the main gallery folder. Piwigo creates all of these on first run after upgrade using the "web" group as the owner of the folders, rather than the FTP account as the owner. In order for Piwigo to work properly, all these folders need to be "repossessed" by the FTP account and then deleted (they can't be deleted through FTP without being reposssessed; and repossession can sometimes be a painful circle jerk requiring correspondence with the web host). After they are deleted, they have to be manually re-created within FTP by the FTP user account as opposed to the web group. This also needs to be done to the folders representing the sub-albums.

You must have touched somehow the _data directory created by piwigo with your ftp client. Right ?

Offline

 

#10 2012-08-10 21:09:13

mandarin
Member
2012-01-12
20

Re: Strange behaviour leading to non-display of images and thumbnails

rvelices wrote:

hurti wrote:

Do I miss anything?

As listed here the requirements are:

- a webserver supporting PHP
- MySQL 5
- PHP 5

No, but if you do anything by ftp and change ownership and file rights is up to you to put it back in place. (Checkout any other php based app on your server which works with files). It's almost like "I deleted all my files. It does not work. Do I miss anything ? ...' (sorry for being harsh)

Basically if your php runs under another user than your ftp account, there is nothing piwigo can do about it. You must ensure that all directories/files to which piwigo must write as the web server are accessible to the web server (ie: if ftp account is the owner, they must have 0777 permissions)

I think that is the crux of the problem (in my case). My php runs under another user (known as "web") than my FTP account. And this particular thread is for those such cases only.

Offline

 

#11 2012-08-10 21:11:39

mandarin
Member
2012-01-12
20

Re: Strange behaviour leading to non-display of images and thumbnails

mandarin wrote:

rvelices wrote:

hurti wrote:

Do I miss anything?

As listed here the requirements are:

- a webserver supporting PHP
- MySQL 5
- PHP 5

No, but if you do anything by ftp and change ownership and file rights is up to you to put it back in place. (Checkout any other php based app on your server which works with files). It's almost like "I deleted all my files. It does not work. Do I miss anything ? ...' (sorry for being harsh)

Basically if your php runs under another user than your ftp account, there is nothing piwigo can do about it. You must ensure that all directories/files to which piwigo must write as the web server are accessible to the web server (ie: if ftp account is the owner, they must have 0777 permissions)

I think that is the crux of the problem (in my case). My php runs under another user (known as "web") than my FTP account. And this particular thread is for those such cases only.

I think this has to be spelt out more explicitly in the requirements and documentation.

Offline

 

#12 2012-08-10 21:14:00

mandarin
Member
2012-01-12
20

Re: Strange behaviour leading to non-display of images and thumbnails

Graham wrote:

That work around dont flow with me, within my _data  folder I only have a tmp and template folder nothing else.

Shame this is s this such a crucial part of Piwigo to see pictures and thumbnails. without this fixed it's as usfull as a chocolate teapot.

Maybe you should manually create the i folder and galleries subfolder and subfolders representing your galleries....maybe your webserver cannot do it.

Offline

 

#13 2012-08-10 21:47:51

graham
Guest

Re: Strange behaviour leading to non-display of images and thumbnails

Tried that and still no images, anyone got links to earlier releases as this new one is bugged.

 

#14 2012-08-10 23:17:25

Graham
Guest

Re: Strange behaviour leading to non-display of images and thumbnails

Ok I have been through this with my hosting company and they say there is nothing stopping the install.

permissions are 0777 and this is a new install, it works on 2.2.1 as ive just tested it with my other site www.koikeepers.co.uk

So 2.4.3 is not doing as you guys say it is, im happy to be proved wrong but as it stands the install is not working.

I know im not the only one with an issue here so can we have some clear guidance and a path of fix please.

Not wishing to rock the boat here, it's a great gallery software and far better than copper and a few others so dont want to go second best route when there must be a solution to this.

Thanks Graham

 

#15 2012-08-12 22:02:45

ppat
Member
2009-08-25
74

Re: Strange behaviour leading to non-display of images and thumbnails

rvelices wrote:

hurti wrote:

Well, As far as I understand this is a workaround althought I haven't tested yet.

Is this 'officially' a bug?

No. There is ABSOLUTELY nothing we can do (if not better warnings ...). This mainly due to your server setup (apache handler instead of cgi/fcgi). When you take ownership of the directories/files, there is no way for piwigo in php to get it back.

How was it working before 2.4.3 ? I had no issues with the setup as it is with thumbnails before. Currently  with 2.4.3, any thumbnails which I manually created for videos don't display. See my question here : http://piwigo.org/forum/viewtopic.php?id=20144


piwigo - 2.4.5 | ploader - 1.6 (Windows Client) | Ubuntu Server 9.10

Offline

 

Board footer

Powered by FluxBB

github twitter facebook google+ newsletter Donate Piwigo.org © 2002-2019 · Contact