How to migrate Phoca Gallery from Joomla! 1.5 to 3

There are some guides on how to migrate Phoca Gallery from Joomla! 1.5 to 2.5 and from 2.5 to 3 but in my case I had a really old 1.5 site that was going to be migrated from Joomla! from version 1.5 to 3. The process is very similar to migrating 1.5 to 2.5.

This is how I did it.

You will need access to both sites through:

  • FTP
  • MySQL using for example using phpMyAdmin

Files

Transfer images/phocagallery including subdirectories from the old 1.5-site to the new version 3-site

Database

  • Log in to the Joomla! 1.5 database using phpMyAdmin.
  • Go to export and select all tables beginning with the name jos_phocagallery
  • In Output select to Save output to a file
  • In Dump table select Data
  • In Syntax to use when inserting data select both

 

  • Using phpMyAdmin on your Joomla! 3-database, find out what database prefix is being used. If it is not jos_ (the default of Joomla! 1.5) open the SQL-file from the export above in a text editor
  • Do a Search and Replace, search for “jos_” and replace it with the “prefix_” of your Joomla! 3-database
  • Save the file

 

  • Using phpMyAdmin on the Joomla! 3-database, use Import to import the SQL-file
  • In phpMyAdmin, go to the SQL-tab and paste the below SQL-commands (if the database prefix is not “jos_” replace it with your “prefix_” before pasting:


UPDATE `jos_phocagallery` SET `language` = '*';
UPDATE `jos_phocagallery_categories` SET `language` = '*';
UPDATE `jos_phocagallery_comments` SET `language` = '*';
UPDATE `jos_phocagallery_fb_users` SET `language` = '*';
UPDATE `jos_phocagallery_img_comments` SET `language` = '*';
UPDATE `jos_phocagallery_img_votes` SET `language` = '*';
UPDATE `jos_phocagallery_img_votes_statistics` SET `language` = '*';
UPDATE `jos_phocagallery_tags` SET `language` = '*';

If access was not set in Phoca Gallery in Joomla! 1.5 and all categories are public, likely, you need to run the following query:

UPDATE `jos_phocagallery_categories` SET `access` = '1';

It is a good idea to go through and check all settings for Phoca Gallery.

How to disable iCloud sync on Mac while on mobile data

When you are connected to the Internet through a network with limited bandwidth or restricted data plan it is desirable to reduce the data consumption. In this case, disabling iCloud sync is something you want to do.

In Windows, you can easily mark a wifi network as limited by data plan and this will automatically inhibit Windows updates to download and it will also make cloud services not to sync.

In the world of Apple and Mac OSX, it seems like Apple assumes that when you are on a wireless or wired network, bandwidth is unlimited. Period. If this only was true, what a great world to live in! The news is that this is not how it works in the real world. Unfortunaly, because of this there is no function to disable or pause iCloud syncing at all. A simple feature present in all other cloud services like One-drive, Dropbox etc.

The solution, which works excellent is called TripMode. This piece of software gives you the control you want over any application using your Internet data.

 

Mega Menu doesn’t display down arrow for submenus

The WordPress plugin Mega Menu has the possibility to display a “down arrow” for a menu item where a submenu is available (i.e. the menu item has “children”). The problem was that the arrow was not displaying.

It turned out it was a collission with the theme, Cherry Framework 4. In the settings of the theme’s native menu, there is a possibility to enable “arrow markups”. When this is enabled in Cherry Framework 4, the arrows in Mega Menu is not displayed.

Solution: Go to Cherry -> Options -> Navigation -> Set Arrows Markup = off

Resize EFI partition but the 16 MB MSR partition is blocking

With Microsoft Windows 10 Fall Creators update many users have ran into problems updating becuase their computer was installed with a too small EFI partition (100 MB). I’d consider this a warranty issue with the computer supplier, becuase obviously the computer wasn’t Windows 10 ready. The problem is that the hardware supplier will happily take your machine in, erase it and factory install it with a new Windows 10 image with a bigger EFI, but you will lose all your data.

A solution would of cause to make a backup and let them erase the machine but some of my clients have computers that will take 1-2 work days to reinstall and configure all software. So resizing the EFI is preferred.

This guide shows a simple way to do it with EaseUS partition master (requires to buy a license, but 50-60 usd is worth it if I can save 1-2 days of work). The problem is that in my case it wasn’t so simple as the guide shows, because there were no unallocated space after the EFI partition and the 16 MB MSR partition following it wasn’t possible to move. The layout looked like this (simplified):

EFI-partition -> 16 MB MSR partition (file system type “Other”) -> circa 500 GB NTFS Windows partition (C:)

This is how I solved it using EaseUS partition master:

  • Backup, backup and backup all your data! If something goes wrong this is your life line.
  • Resize the 500 GB NTFS partion, shrinking it and creating 32 MB unused space after the NTFS partition (I first tried 16 MB but wasn’t able to clone the 16 MB MSR partition to it, displaying an error message saying it wasn’t enough space), apply changes and let the system reboot
  • Select the 16 MB MSR and clone it to the unsused 32 MB space
  • Resize the 500 GB NTFS partition, shrinking it creating 400 MB unused space before the NTFS partition, apply changes and let the system reboot
  • Now there is 400 MB unallocated space between the EFI and NTFS-partitions. Select the EFI partition and resize it to 500 MB, apply and reboot

 

Cherry Framework 4 header not using full page width when breadcrumbs are disabled

When you disable breadcrumbs in Cherry Framework 4, it still reserves space for it in the header/title section of the page. This is a bit annoying, because it makes the title wrap when there still is space on the right side.

A simple CSS solution can fix this. By applying this, the breadcrumbs will not be visible even if they are enabled again.

.cherry-breadcrumbs .col-md-5 { /* no breadcrumbs, title in full width */
width: 100%;
}
.cherry-breadcrumbs .col-md-7 { /* no breadcrumbs, hide the breadcrumb container */
display: none;
}

Ispconfig 3.0 to 3.1 update issue – PHP-FPM and SSL problems

After updating a multi server installation of Ispconfig3 problems occured when editing existing or adding new websites on one of the servers.

  • If the site had SSL enabled the apache2 vhosts file for the site (located in /etc/apache2/sites-availible) would get empty values for SSLCertificateFile, SSLCertificateKeyFile and SSLCertificateChainFile fields, causing it to revert to old configuration or not load the site at all. At some point apache2 wouldn’t reload at all so to get it upp the site had to be disabled by removing /etc/apache2/sites-enabled/100-sitename.vhost file.
  • If the site was running under PHP-FPM the site would report Internal server error 501 caused by the socket file /var/lib/php5-fpm/webXXX.sock was owned by root and not by the web user. This in turned was caused by the fields listen.owner and listen.group in webXXX.conf (for PHP-FPM) was empty.

Since this was a multi server installation and this problem only occured on one server they could be compared. It turned out that the problem was caused in the directory /usr/local/ispconfig/server/plugins-enabled. The files in this directory should be symbolic links to the corresponding files in /usr/local/ispconfig/server/plugins-available, but after a move of the Ispconfig3 installation from an older server, these links had become real files instead of symbolic links.

This meant that the files in /usr/local/ispconfig/server/plugins-enabled was still Ispconfig 3.0 files while the ones in /usr/local/ispconfig/server/plugins-available was Ispconfig 3.1. To resolve the problem, to be on the safe side, make a backup of /usr/local/ispconfig/server/plugins-enabled and then run:

cd /usr/local/ispconfig/server/plugins-enabled
ln -s -f /usr/local/ispconfig/server/plugins-available/apache2_plugin.inc.php apache2_plugin.inc.php
ln -s -f /usr/local/ispconfig/server/plugins-available/apps_vhost_plugin.inc.php apps_vhost_plugin.inc.php
ln -s -f /usr/local/ispconfig/server/plugins-available/aps_plugin.inc.php aps_plugin.inc.php
ln -s -f /usr/local/ispconfig/server/plugins-available/bind_plugin.inc.php bind_plugin.inc.php
ln -s -f /usr/local/ispconfig/server/plugins-available/cron_jailkit_plugin.inc.php cron_jailkit_plugin.inc.php
ln -s -f /usr/local/ispconfig/server/plugins-available/cron_plugin.inc.php cron_plugin.inc.php
ln -s -f /usr/local/ispconfig/server/plugins-available/firewall_plugin.inc.php firewall_plugin.inc.php
ln -s -f /usr/local/ispconfig/server/plugins-available/ftpuser_base_plugin.inc.php ftpuser_base_plugin.inc.php
ln -s -f /usr/local/ispconfig/server/plugins-available/getmail_plugin.inc.php getmail_plugin.inc.php
ln -s -f /usr/local/ispconfig/server/plugins-available/maildrop_plugin.inc.php maildrop_plugin.inc.php
ln -s -f /usr/local/ispconfig/server/plugins-available/mailman_plugin.inc.php mailman_plugin.inc.php
ln -s -f /usr/local/ispconfig/server/plugins-available/mail_plugin_dkim.inc.php mail_plugin_dkim.inc.php
ln -s -f /usr/local/ispconfig/server/plugins-available/mail_plugin.inc.php mail_plugin.inc.php
ln -s -f /usr/local/ispconfig/server/plugins-available/mysql_clientdb_plugin.inc.php mysql_clientdb_plugin.inc.php
ln -s -f /usr/local/ispconfig/server/plugins-available/network_settings_plugin.inc.php network_settings_plugin.inc.php
ln -s -f /usr/local/ispconfig/server/plugins-available/postfix_filter_plugin.inc.php postfix_filter_plugin.inc.php
ln -s -f /usr/local/ispconfig/server/plugins-available/postfix_server_plugin.inc.php postfix_server_plugin.inc.php
ln -s -f /usr/local/ispconfig/server/plugins-available/shelluser_base_plugin.inc.php shelluser_base_plugin.inc.php
ln -s -f /usr/local/ispconfig/server/plugins-available/shelluser_jailkit_plugin.inc.php shelluser_jailkit_plugin.inc.php
ln -s -f /usr/local/ispconfig/server/plugins-available/software_update_plugin.inc.php software_update_plugin.inc.php
ln -s -f /usr/local/ispconfig/server/plugins-available/webserver_plugin.inc.php webserver_plugin.inc.php

Verify with ls -l /usr/local/ispconfig/server/plugins-enabled that all your files are symbolic links.

 

Microsoft Office 365 SSL certificate error in Outlook [solved]

Clients moving over to Office 365 who had purchased a valid SSL certificate for their mail server still got SSL certificate errors in Outlook and mobile clients. This was despite the mail service was equipped with a valid SSL certificate (not self signed, but issued by a real CA).

It turns out here that Outlook seems to investigate https root domain (i.e. the customer’s web site) for auto configuration before trying autodiscover.customerdomain.com. And if there is no valid SSL certificate installed on the customers web site, an error is displayed. This was verified by examining the customer’s web site logs where we could se repetitive accesses to /autodiscover/autodiscover.xml.

If only Outlook just would have ignored the SSL error and continued to the next method….

A simple solution was just to add a valid SSL certificate to the customer’s web site, and the problem was solved. That way Outlook didn’t get SSL certificate error when trying to retrieve the non-existing autoconfiguration information from the customer’s web site.

Add custom favicon.ico to T3 bootstrap framework for Joomla!

When you are using the T3 bootstrap framwork for Joomla! to create a Joomla! responsive template, an easy way to use a custom favicon.ico is to just replace the file templates/t3_bs_blank/favicon.ico with your own.

This is fine – until you update the T3 framwork. Then your custom favicon.ico will be overwritten with the default file.

This is a solution:

  • Create an override of the file templates/t3_bs_blank/tpls/blocks/head.php and place it in templates/t3_bs_blank/local/tpls/blocks/head.php
  • Add the following code last in the file:
    <!-- LOCAL FAVICON.ICO -->
    <?php
    if (is_file(T3_TEMPLATE_PATH . '/local/favicon.ico')) {
    $this->addFavicon(T3_TEMPLATE_URL . '/local/favicon.ico');
    }
    ?>
    <!-- //LOCAL FAVICON.ICO -->
  • Now put your custom favicon.ico in templates/t3_bs_blank/local

Now your custom favicon.ico will survive updates of the T3 framework.

Where is WordPress links / blogroll?

In older WordPress installations there was a possibility to handle links. I recently installed a new WordPress 4.9 and I can’t find links (or blogroll). i.e. the Link Manager, anymore. Where is it?

From version 3.5 of WordPress, the Links section is not visible anymore if there were no links present or if it is a new installation.

If you want it back, you can download Link Manager here.