Fixing Joomla 1.6 / 1.7 Phoca Download and Phoca Gallery Installation Issues

Be Sociable, Share!

I’ve been developing a Joomla 1.7 website offline (on my computer).  The client requires both downloads and gallery feature so I decided to use Phoca Download and Phoca Gallery components for this project.  After what seemed like a smooth problem-free install, I visited the categories page for Phoca Gallery and I was shocked and frustrated to have encountered the following list of errors:

Warning: mysqli_num_rows() expects parameter 1 to be mysqli_result, boolean given in C:\wamp\www\...\libraries\joomla\database\database\mysqli.php on line 345

Warning: mysqli_num_rows() expects parameter 1 to be mysqli_result, boolean given in C:\wamp\www\...\libraries\joomla\database\database\mysqli.php on line 345

As if that wasn’t enough, I ignored the above errors and tried adding a new category and was bombarded by an even longer list of errors:

Warning: Invalid argument supplied for foreach() in C:\wamp\www\...\libraries\joomla\database\database\mysqli.php on line 727

Warning: Invalid argument supplied for foreach() in C:\wamp\www\...\libraries\joomla\database\database\mysqli.php on line 727

Notice: Undefined property: JObject::$metadata in C:\wamp\www\...\administrator\components\com_phocagallery\models\phocagalleryc.php on line 81

Notice: Undefined property: JObject::$id in C:\wamp\www\...\administrator\components\com_phocagallery\views\phocagalleryc\view.html.php on line 64

Notice: Undefined property: JObject::$id in C:\wamp\www\...\administrator\components\com_phocagallery\views\phocagalleryc\view.html.php on line 89

Notice: Undefined property: JObject::$checked_out in C:\wamp\www\...\administrator\components\com_phocagallery\views\phocagalleryc\view.html.php on line 90

Notice: Undefined property: JObject::$id in C:\wamp\www\...\administrator\components\com_phocagallery\views\phocagalleryc\view.html.php on line 91

Warning: Invalid argument supplied for foreach() in C:\wamp\www\...\administrator\components\com_phocagallery\libraries\phocagallery\render\renderadmin.php on line 70

Notice: Undefined property: JObject::$id in C:\wamp\www\...\administrator\components\com_phocagallery\views\phocagalleryc\tmpl\edit.php on line 60

Visiting any other page of the component presented me with a “500 – An error has occurred” error and a paragraph of what seemed like MySQL codes.

Many people on different sites haven’t found a fix for this.  If you have encountered this problem then it really might be an installation problem.  Phoca Download and Phoca Gallery are large components and are sometimes troublesome when it comes to installation.  So you might want to read this page: Installation Problem Solving.

In my case, I had to reinstall my database tables for both components and this did the trick! The database tables can be found in the installation package under ‘install.bak.sql’ (this is an sql file).  All you have to do is copy the code and run it on phpmyadmin.

*Remember: Joomla’s default MySQL table prefix is ‘jos_’ so if you had actually changed that during the installation, you will need to change the prefix before you run the codes.

After that, check the component again and see if it works.  This fix worked for me! :)

Be Sociable, Share!
This entry was posted in Tutorials and tagged , , , , , , , , , , , , , , , , , , , , , , , , , , . Bookmark the permalink. Both comments and trackbacks are currently closed.
  • Support sabrinasabino.com!

11 Comments

  • At 2011.08.15 11:00, Jonathan said:

    Hey I tried this and it worked for me to, using Joomla 1.6.
    Thanks.

    • At 2011.08.15 13:42, Sabrina Sabino said:

      Hi Jonathan, thanks for letting me know. I’m really glad it worked for you! :)

      • At 2011.09.15 02:49, Elsie said:

        Hi there!

        Im NEW to Joomla. I have downloaded Phoca gallery and I am BATTLING to get it to work on Joomla. Im sure this is a great compnent, but not user-friendly for newbies! Not at all!

        • At 2011.09.15 22:52, Sabrina Sabino said:

          Hi, sorry to hear that. Please let me know if you need help with the installation? Or perhaps you can tell me the kind of error or issues you’ve been experiencing with Phoca gallery?

          • At 2011.11.10 20:07, Janet said:

            I have Phoca Gallery installed and working on a Joomla site, but I deleted old picture files from last year’s football category using FTP. I deleted all files, including the index file from the football folder as well as the index file from the thumbs folder inside of football–probably a bad idea :-( . After I had done this, I uploaded new pictures using the Multiple Add feature. The images are there in the back end, and the category is there and showing that it is published in the back end, but when I go to the photo gallery on the front end http://declohigh.net/index.php?option=com_phocagallery&view=categories&Itemid=8, the football category does not show. I tried reinstalling the backup index files to the /football/ folder and the /football/thumbs/ folder, but this did not help. I tried deleting the entire football category and adding it again, but I still cannot see the football category on the front end. Have I corrupted a database and is there a way to fix this? Thanks for any help you can give me!

            • At 2011.11.10 23:48, Sabrina Sabino said:

              Hi Janet, I noticed that you are on Joomla 1.5. I don’t really know if this is a bug for Joomla 1.5 but I’ll try to help you find a solution for this.

              • At 2011.11.11 00:45, Sabrina Sabino said:

                Hi Janet,

                I’ve created a test installation of Joomla 1.5 with Phoca Gallery and followed what you did (delete all contents of a category, and then uploaded the backups). Everything seemed to have worked out alright.

                I can see a football category here: http://declohigh.net/index.php?option=com_phocagallery&view=category&id=21:football&Itemid=8

                The category will not show on the front end if there are no images uploaded to that category. Upload the images in the football folder, without the ‘thumbs’ folder. Allow Phoca Gallery to re-generate thumbnails when you save the images to the football folder. Please let me know how it goes. Cheers.

                • At 2011.11.11 04:11, Janet said:

                  Hi Sabrina,
                  Thanks so much for your help! Thanks to you and a smart student helper, I was able to understand that I had only transferred the files to the server, but I had not actually gone into the Phoca Gallery category and saved the files so that the thumbnails would generate. I really appreciate your time!

                  • At 2011.11.11 04:45, Sabrina Sabino said:

                    Anytime, Janet! :)

                    • At 2012.02.28 16:37, Priscila said:

                      how can l remove a phoca download footnote

                      • At 2012.02.28 17:03, Sabrina Sabino said:

                        The nicest way to do it is to contact Phoca support URL: http://www.phoca.cz/support or email: info[at]phoca[dot]cz . I contacted them quite a while ago for the same reason. I had to send them a small donation and they sent me a plugin. After installing the plugin, the footer links just disappeared. That’s the most decent way to do it. :P

                        (Required)
                        (Required, will not be published)

                        • Stalk Me On Facebook

                        • Categories

                        More in Tutorials (64 of 84 articles)


                        Often times, you will find that the right-clicking then format option on Windows 7, like most other Windows operating system isn't as efficient as one would want it to be. ...