Error !

Phoca Gallery - image gallery extension
featherlight
Phoca Newbie
Phoca Newbie
Posts: 4
Joined: 13 Jul 2008, 07:46

Error !

Post by featherlight »

hi every one ... I have this error with phoca .. can someone tell me why ?? how can I solve the problem ??
Stop Thumbnails Creation

Warning: ini_set() has been disabled for security reasons in /home/web/clients/nour.hostarea.org/www/administrator/components/com_phocagallery/helpers/phocagallery.php on line 860

Fatal error: Allowed memory size of 10485760 bytes exhausted (tried to allocate 9216 bytes) in /home/web/clients/nour.hostarea.org/www/administrator/components/com_phocagallery/helpers/phocagallery.php on line 881

THANKS !
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 49279
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Error !

Post by Jan »

Hi,

Warning - Phoca Gallery tries to increase the memory for GD creating of thumbnail...
Error - The ini_set is disabled (warning), and you have not enough memory for creating the thumbnail (error) :(

Jan
If you find Phoca extensions useful, please support the project
featherlight
Phoca Newbie
Phoca Newbie
Posts: 4
Joined: 13 Jul 2008, 07:46

Re: Error !

Post by featherlight »

ok Jan .. thanks for explaining ... but what I have to do now ??? if I decrease the size of pics or change resolution , the problem will be solved ?? :idea:
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 49279
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Error !

Post by Jan »

You should enable the ini_set function (you or your webhosting provider)

Jan
If you find Phoca extensions useful, please support the project
featherlight
Phoca Newbie
Phoca Newbie
Posts: 4
Joined: 13 Jul 2008, 07:46

Re: Error !

Post by featherlight »

ok thanks Jan !
bers
Phoca Newbie
Phoca Newbie
Posts: 7
Joined: 22 Sep 2008, 03:47

Re: Error !

Post by bers »

Found a solution on the Joomla forums that solved both the Thumnail creation problem and the Fatal Error: Allowed memory size...exhausted...
The problem was the memory size settings in the index.php files in Joomla.

"Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to allocate 6144 bytes) in C:\AppServ\www\joomla-1.0.14\administrator\includes\menubar.html.php on line 463"

Solution:

Added the line: “ini_set('memory_limit','40M');” (make it the second line in the file (just below “<?php”))in the following files:

index.php and the index2.php file in the main Joomla root folder, AND,
to the index.php, index2.php, and the index3.php (if you have a 2 and 3) files under the Administrator folder which is under the root folder

Used FTP (FileZilla) Client: dragged file from rightside to “desktop” on left side; rt clk on desktop>open with Notepad; add line; save; then drag back to original file on rightside and overwrite. You may be able to just right click the file on the rightside (server) and edit. For some reason I have to open it from my local hard drive to edit in Notepad.

the "40M" in the new added line is the memory size limit listed in my php info under Joomla backend "help". You can make it a different number.

After these changes I could now access my "Images" (gallery), upload in frontend, and create thumbnails. :D
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 49279
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Error !

Post by Jan »

If it works, then it is great, but I don't know how this can work because in Phoca Gallery there is the following code:

Code: Select all

// Try to increase memory
	if ($memory < 50) {
	ini_set('memory_limit', '50M');
	$memoryLimitChanged = 1;
}
If you find Phoca extensions useful, please support the project
Post Reply