Stop the Segregation with the Safe mode

namastebysc

Joined: 2006-06-16
Posts: 3
Posted: Fri, 2006-06-16 22:46

Hi

It's time to create a gallery version accepting a safe mode enable.
Since 3 years, i tried to install Gallery in website supported by the host: http://free.fr
This host, like several host, refuse to disable the safe mode.
I checked several forum without solutions, or just some answers like:" change of webhost" or "use coppermine".
I waited an evolution of gallery or maybe a revolution.
But noting...
Do you think create a new version accepting the safe mode enable?
Stop the segregation!

Best Regards

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Sat, 2006-06-17 01:53

You can choose your webhost and can change the webhost at any time. There are plenty of them with safe_mode off.
For further discussion, please refer to:
http://gallery.menalto.com/node/3017

 
namastebysc

Joined: 2006-06-16
Posts: 3
Posted: Sat, 2006-06-17 17:27

Wow
Wonderful answer to soluce this problem!
Again a negative answer for the people who write gallery2*safe mode*free in a search engine.
This host is a provider who give to his customers, a space of 1GB without advertising and free.
It's time to create a new version of gallery with a safe_mode on, or just a patch.
Why there are not this problem with a lot of module who have not quality of Gallery2?

B&W PhotoChallenge
http://namastebysc.free.fr/challenge/index.php

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Mon, 2006-06-19 02:51

All the discussion and explanations are in the existing thread at:
http://gallery.menalto.com/node/3017

Thanks for reading the existing discussion and getting up to speed.
It doesn't make sense to discuss this over and over again from zero.

 
tanhnhi

Joined: 2006-08-16
Posts: 2
Posted: Thu, 2006-08-17 15:45

I've installed Gallery 2 on free.fr (with safemode ON) and I'm using it now. A guide can be found here http://shawking.free.fr/blog/?p=12

 
namastebysc

Joined: 2006-06-16
Posts: 3
Posted: Thu, 2006-08-17 23:01

C’est un succès, je l’ai installé sur free en suivant vos indications.
Merci pour votre aide.
Une nouvelle étape a été franchie grâce à vous, M tanhnhi.

It is a success, I installed it on free in following your indications.
Thank you for your help.
A new step was reached thanks to you,Mr tanhnhi.

B&W PhotoChallenge
http://namastebysc.free.fr/challenge/index.php

 
anolae

Joined: 2006-08-31
Posts: 3
Posted: Thu, 2006-08-31 21:42
tanhnhi wrote:
I've installed Gallery 2 on free.fr (with safemode ON) and I'm using it now. A guide can be found here http://shawking.free.fr/blog/?p=12

This guide is great news and could prove to be useful for me! Yet I can't manage to access to it, I keep having an Internal Server Error (500)... Anyone could help me?

 
fryfrog

Joined: 2002-10-30
Posts: 3236
Posted: Thu, 2006-08-31 22:54

I don't get a 500 right now, you could try google's cache of it.

I copied and pasted the article so you can see it below...

Quote:
Gallery is no doubt the most popular free web-based photos management system. With powerful features, it’s naturally a good choice for amateurs (like me) who want to publish online galleries. The only thing that prevent me from using Gallery at the first time is that it does not support PHP hosts with safe-mode ON, and free.fr is one of them. A quick search on Google prouves that I’m not the only one who is concerned about the problem, there has been several serious discussions on the official forum of Gallery and globally the solutions are:

* Contact your host to turn off safe-mode
* Change your host

Personnally, I find those answers ignorant. Guys, it’s not that simple!! Like I’ve said, there are amateurs who want to use Gallery, and for them, finding a host which is suitable for their home page is challenging! Moreover, do you think they will migrate everything (files, blogs, forum) to a new host just to use Gallery, especially if their current host proposes a 10 GB space and totally free (free.fr does propose it)? Ask your host to turn off safe-mode is even more desperate!!

Here, I will explain what I’ve done to install and use Gallery 2 on free.fr. But before everything, please note that I’m a fresh beginner to PHP, I’m not sure what I’ve done is correct and whether it will work on other host than free.fr but it really works, you can visit my gallery here.

Step 1 : Download Gallery 2 from its official website http://gallery.menalto.com/. The version I’m using is the 2.1.1. Extract it.

Step2 : First of all, you have to make it installable. Normaly, the installation process will stop when it finds that safe-mode is ON at the System Checking Step. To pass this step, edit file gallery2/install/steps/SystemChecksStep.class and change the lines 108-120 from

/* Make sure that safe mode is not enabled */
if (GalleryUtilities::getPhpIniBool('safe_mode')) {
$templateData['check'][] =
array('title' => _('Safe mode disabled'),
'error' => true,
'notice' =>
_('Error: Your version of PHP is configured with safe mode enabled. ' .
'You must disable safe mode before Gallery will run.'));
$failCount++;
} else {
$templateData['check'][] =
array('title' => _('Safe Mode'), 'success' => true);
}

to

/* Make sure that safe mode is not enabled */
$templateData['check'][] = array('title' => _('Safe Mode'), 'success' => true);

freshStep 3 : With safe-mode ON, calls to PHP fucntion set_time_limit always generate errors. Usually, you can ignore those warnings (although they’ll ruin your pages with ugly messages), but in some scripts, those errors can stop the execution so we need to avoid those situations. If you have time, replace all calls to set_time_limit with @set_time_limit (use an editing tool or unix/linux scripts). If you don’t have time, at least replace set_time_limit with @set_time_limit in file gallery2/modules/core/classes/Gallery.class (I didn’t have time :p).

Step 4 : Create a directory for applications to store sessions on host, Gallery needs it. Use phpinfo() to know where to create it (session.save_path). On free.fr, the directory’s called sessions and it’s in your root directory. Create it if it’s not already there.

Step 5 : Up load our modified Gallery 2 and run the installation process as described in the documentation, on the System Checking Step, you’ll see a warnings about files’ intergrity. It’s normal as we’ve modified some files! Ignore warnings concerning set_time_limit.

Step 6 : Normally, you can easilly finish the installation process. There’re some modules which are not activated as they can not auto-configured (ImageMagick, Archive Upload …), but it’s another problem. Your gallery is now ready to be used.

Warning : The documentation says that Gallery could run without set_timeout_limit function, but data’s intergrity is no more warantied!! There are some errors when I try to delete an Album, but the album is effectively deleted.

Conclusion

I’m now using Gallery normally, but I need more time to test all of its features. This is just a work-around for those who desperately want to use gallery 2 on their current host and it’s not a serious solution. I really hope that there will be a version, or a patch that lets Gallery runs with safe-mode ON.

_________________________________
Support & Documentation || Donate to Gallery || My Website

 
anolae

Joined: 2006-08-31
Posts: 3
Posted: Fri, 2006-09-01 06:06

Thanks a lot fryfrog!!

It seems to work again for me too, no more 500. Now I can try to get Gallery working on my host!

 
fryfrog

Joined: 2002-10-30
Posts: 3236
Posted: Fri, 2006-09-01 13:28

Just FYI, I didn't know what putting the @ in front of that stuff did. Well, all it does is supress errors. Nothing more.
_________________________________
Support & Documentation || Donate to Gallery || My Website

 
anolae

Joined: 2006-08-31
Posts: 3
Posted: Sun, 2006-09-03 21:14

Yes, it just prevents them from being displayed in the page...

I managed to install it though, so that's good news. I just need to learn how to configure/use it now!

 
Barbrousse

Joined: 2007-05-22
Posts: 168
Posted: Tue, 2007-06-05 11:32

For free.fr, modifications are now stored here: http://gallery.menalto.com/node/64888

Barbrousse