Phoca Gallery Map Bug

Phoca Gallery - image gallery extension
Pippozzo
Phoca Member
Phoca Member
Posts: 26
Joined: 08 Sep 2008, 19:12

Phoca Gallery Map Bug

Post by Pippozzo »

Hi, I've an error on Map from a very old version of this component (blank page), but now with Phoca Gallery 2.5.8 (Joomla 1.5.14) I receive this message:

Code: Select all

Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, postmaster@MYSITE.it and inform them of the time the error occurred, and anything you might have done that may have caused the error.
More information about this error may be available in the server error log.
:x

The error is on 170° item of categories on line 86 of components\com_phocagallery\views\categories\view.html.php file
:roll:

Code: Select all

if (!empty($hideCatArray) && is_array($hideCatArray)) {
The values of variabiles are:
$display_empty_categories: 0
$items[$key]->numlinks: 8
isset($hideCatArray): 1
count($hideCatArray): 1
empty($hideCatArray):
!empty($hideCatArray): 1
is_array($hideCatArray): 1
category id: 166

With this information, can you help me, please?
Thanks in advance

PS: At the moment I haven't categories with geolocalization, but the query select all categories and it's so slow
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 49297
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Phoca Gallery Map Bug

Post by Jan »

Hi, sorry I don't understand this:
The error is on 170° item of categories on line 86 of components\com_phocagallery\views\categories\view.html.php file
:idea:
If you find Phoca extensions useful, please support the project
Pippozzo
Phoca Member
Phoca Member
Posts: 26
Joined: 08 Sep 2008, 19:12

Re: Phoca Gallery Map Bug

Post by Pippozzo »

I inserted a break in the code to find the breaking point in
/components/com_phocagallery/views/categories/tmpl/default_map.php
The script is Ok until one hundred seventieth item

Code: Select all

$numitem= 0;
foreach ($items as $key => $item) {
                        $numitem++;
			// Unset empty categories if it is set
			if ($display_empty_categories == 0) {
				if($items[$key]->numlinks < 1) {
					unset($items[$key]);
					$unSet 		= 1;
					continue;
				}
			}
if ($numitem== 170)
{
        echo '<br />isset: ' . isset($hideCatArray);
	echo '<br />id ' . $item->slug;
	exit;
}	

			// Unset hidden category
			if (isset($hideCatArray) && is_array($hideCatArray)) {
		
// Here I receive error
				$unSetHCA = 0;
..........
The record with id 166 is:

Code: Select all

166 	26 	Trekking: La Foresta del San Gerbone  	  	la-foresta-del-san-gerbone  	   	  	left  	<p><br /><strong>Trekking: La Foresta del San Gerb... 	0000-00-00 00:00:00 	1 	0 	0000-00-00 00:00:00  	NULL 	4 	0 	0 	25  	0  	-2  	-2  	NULL  	   	  	2  	   	 
Pippozzo
Phoca Member
Phoca Member
Posts: 26
Joined: 08 Sep 2008, 19:12

Re: Phoca Gallery Map Bug

Post by Pippozzo »

It isn't clear now?

The bug is circumscribed!

Thanks in advance
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 49297
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Phoca Gallery Map Bug

Post by Jan »

Still not understand what is the error there? :idea: :(
If you find Phoca extensions useful, please support the project
Pippozzo
Phoca Member
Phoca Member
Posts: 26
Joined: 08 Sep 2008, 19:12

Re: Phoca Gallery Map Bug

Post by Pippozzo »

Nobody has ever reported a similar error?
Can I send you an FTP account for testing?
I really need!!! :cry:

Thanks so much
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 49297
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Phoca Gallery Map Bug

Post by Jan »

More information about this error may be available in the server error log.
is there some more information in error log?
If you find Phoca extensions useful, please support the project
Pippozzo
Phoca Member
Phoca Member
Posts: 26
Joined: 08 Sep 2008, 19:12

Re: Phoca Gallery Map Bug

Post by Pippozzo »

My Configuration:
Error Reporting: Maximum

But in the page appear only:

Code: Select all

Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, postmaster@MYSITE.it and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.
and so I've debugged the code (previous post)

Now I've asked error log to the hosting services...

Thanks again
Last edited by Pippozzo on 27 Oct 2009, 19:01, edited 1 time in total.
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 49297
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Phoca Gallery Map Bug

Post by Jan »

But in the page appear only:
Yes, but it says: More information about this error may be available in the server error log.

So did you see the error log on your server?
If you find Phoca extensions useful, please support the project
Pippozzo
Phoca Member
Phoca Member
Posts: 26
Joined: 08 Sep 2008, 19:12

Re: Phoca Gallery Map Bug

Post by Pippozzo »

This is the replay of my hosting:
With regard to your note, we made extensive tests by identifying the cause of the error in the "getRandomImageRecursive ()" declared in the file "/ components / com_phocagallery / models / categories.php.

This function, as its name indicates it, shall randomly draw an image of all those present. As there are hundreds of photos will find all the photos using this method takes longer than the 120-second timeout configured on the server, so if there is an error "500 Internal Server Error".

Usually in Joomla you can disable recursion allowing you to decrease the time of the file, and making the application is running but the function in question does not provide that option, so please refer to the Mother of the application site explaining the problem and see if there are changes / patch code to bypass this problem.
Jan, can you help me, please?
Post Reply