If you have some issue while using Phoca extension, try to check this list of general advices for running Phoca extensions successfully. Error-free run of the Phoca application depends on many factors, e.g. : Joomla! settings, PHP settings, SQL settings, used template, loaded external extensions on the same site, etc. Mostly, error which prevents from successfully running of Phoca extension, is not produced by Phoca extension itself or not directly by Phoca extension. This is why the recognition of a problem is very difficult.

 

1. Error while saving Phoca Gallery (or other Phoca extension)

This error is mostly caused by missing Phoca Gallery tables in your database. Check if your database includes all Phoca Gallery (or other Phoca extension) tables. See Installation Problem Solving article. This article describes Phoca Gallery but it is similar to other Phoca extensions.

 

2. Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource

There is an error while running SQL query. To get more detailed information about such error, enable debug mode in your Joomla! (Joomla! Administration - Site - Global Configuration - System - Debug System - Yes). See:

 

3. Design or javascript issues - checking the site with standard template

If you ask in Phoca Forum about some design problem in Phoca Gallery (or other Phoca extension) displayed on your site, you get the following answer: "Check your site with standard template like rhuk_milkyway is". This answer does not mean, you should change your template and your problem will be ignored by administrator or moderators. It means, you should only test your site with standard template, so the problem can be detected. Mostly there is problem in template (e.g. float bug) or there is a conflict between Phoca Gallery (or other Phoca extension) and the template. If there is a conflict, it does not mean, the Phoca Gallery or the template includes some bug, it only means, there is some part of code (html, css, javascript) in both extensions which prevent from successfully running of both extensions together:

  • CSS problem - you can use e.g. Firefox browser and its addon Web Developer to disable/enable each loaded CSS on the site. Such way you can get information in which CSS file the problem part is loacated. Then you can customize or fix this part in the CSS file.
  • Javascript problem - if you are displaying e.g. Phoca Gallery on your site and a template framework, system plugins, modules, etc. are loaded together with Phoca Gallery, then it may be a conflict in different javascript libraries. There are many extensions in Joomla! world so it may become, two different extensions are loading the same javascript library but e.g. different version of such library. In such case the javascript library will not work correctly. Example: Phoca Gallery uses modal box to display detail of an image. Modal box is a part of Mootools javascript library which is a part of Joomla! framework. In case some extension (template, module) loads own mootools library (e.g. newer than is used in Joomla! framework) on the site where Phoca Gallery is loaded, thne modal box will be not correctly rendered. In such case you need to check the extension which loads external javascript library and customize it to be not in conflict with Joomla! framework.
If your images are not aligned in boxes (shadow boxes), try to check your template. Some templates define this rule:

vertical-align: baseline;
 
for basic tags. Removing this rule mostly helps to fix the problem.
 

 

4. Blank (white) page (or Error 500)

Blank page is mostly displayed in case, some PHP error (Fatal error) stopped the loading of the script (loading of the site). There is no other option how to detect what caused the problem than enabling PHP error reporting on your server or looking at errorlog file on your server. See:

 

5. Allowed memory size of ... bytes exhausted ...

This error is caused by not enough memory to run the PHP script on your server. Mostly there are two reasons to get such error in Phoca Gallery:

  • Creating thumbnails from images. Thumbnails are created by your server, by GD library. Server is not like your PC and mostly it does not have so much memory for running a script like you have on your PC (because there are many other tasks a server must run). If you get this error you need to:
    • increase memory on your server (mostly you need to ask your webhosting provider to enable this feature :-( )
    • or resize images before upload to your server. Common servers have problems e.g. with images larger than 2MB. Such size of image is normally not used in internet so resizing original images before uploading is recommended. You can resize the images on your PC or they can be resized while uploading (using Java upload method - the size can be set in Phoca Gallery parameters)
    • or create thumbnails on your PC (where you can get more memory as only one instace is running) and then copy these images/thumbnails to your server - to phoca gallery image folder: images/phocagallery.
If you are running a Joomla! on your localhost and on server where you get this error, just create thumbnails on your localhost and then upload the whole phocagallery image folder (images/phocagallery/) to your server. On your server the thumbnails will be not more created as they will exist there. Go to Multiple Add in Phoca Gallery administration and select the folder. Click on save and all the images will be added to the system without creating thumbnails.
  • Phoca Gallery automatically creates thumbnails from images which do not have any thumbnails yet. This is why Phoca Gallery must check every image step by step. It can be challenging in server performance if there are many images in your gallery. If so, you need to enable Pagination Thumbnail Creation parameter in Phoca Gallery parameters, see: Global Configuration (Parameters - component in menu item).

 

6. SEF, 404, Menu link

Phoca extensions are supporting SEF because their links are created by standard Joomla! JRoute class. See the following article to solve possible problems with SEF:

 If you are using external SEF component, you need to ask the developer of this component if it supports Phoca extension.

 

7. Using Suhosin extension

If you are using Phoca Gallery version 2.7.5 or later and on your server Suhosin PHP extension is installed, you can run into problems when saving menu link to Phoca Gallery in Menu Manager.

One of the Suhosin security parameter is called suhosin.post.max_vars. Its value is mostly set to 200. But while saving menu link to Phoca Gallery in Menu Manager, more than 200 POST variables are transferred (more than 200 parameters). Unfortunately Suhosin does not retun any error message (this is maybe because of security reasons), the site is redirecting back to main site of Menu Manager and the menu link will be not saved.

It means, if you are not able to save menu link to Phoca Gallery in Menu Manager (Menus - e.g. Main Menu - New - Phoca Gallery - e.g. Phoca Gallery Category List Layout - Save) because the site is redirecting to main site of Menu Manager, try to check your PHP settings:

Joomla! administration - Help - System Info - PHP Information. Try to find 'suhosin' string, try to find the value of suhosin.post.max_vars. If there is such parameter and its value is approximately set to 200, you need to change it in php settings (increase this value e.g. to 250). There are other Suhosin security settings, so if the changing of suhosin.post.max_vars will not help, try to check other Suhosin parameters too (e.g. suhosin.request.max_vars, etc.).

 

8. Image or Iframe Method

 Phoca Gallery uses two different methods to display images in detail window.

Image Method:

  • Modal Box (image only)
  • Shadowbox
  • Highslide JS (image only)
  • JAK lightbox
  • Slimbox

Iframe Method:

  • Standard Popop (not iframe but has the same behaviour like iframe)
  • Modal Box
  • Highslide JS
  • No Popup (not iframe but has the same behaviour like iframe)

Images displayed in detail window used image method are displayed with help of javascript. Because of the javascript effect, there are some limitations. E.g. images displayed in the slideshow are not all images from the category but only images listed on the site. This is because javascript can display only images listed on the site (of course there is possibility to load all the information about all images from the category to the javascript, but this can slow down the server or stop loading the site because of memory issues). You cannot add any statistics to javascript window, because it is not html (php) etc. Image method does not display Youtube code. If you want to display Youtube video in detail window, you need to use an iframe method.

Images displayed in detail window with help of iframe method are in fact displayed in html (php) - it means, you can add statistics code to this html (e.g. Google Analytics code), pagination can be used - in the iframe, information about current, previous and next images are loaded, so if you click on e.g. next arrow, the whole site is newly loaded. Next image becomes the current image, current image becomes the previous image and new information about next image is loaded. Such way you can display all images from the category in the iframe window and there is no problem with memory as everytime new site is loaded (which is different to javascript methods which do not load the whole site, only the image).