I used FormMail.pl from Matt’s Script Archive on one of my web sites and called this script from several other web sites. This way I only need to maintain one copy of the script regarding updates.
The script began complaining about “Bad referrer” when called from my other sites, even though I could positively verify that the other site’s domain name was present in the referrers of FormMail.pl.
Not finding the problem in the script itself I began to think over what I had recently changed on the site hosting the FormMail.pl and one thing was that I recently added a http redirect any incoming calls that didn’t go to the site url using https and I also redirected www.sitename to just sitename. For example, a call to http://www.sitename was redirected to https://sitename using Apache’s http rewrite module.
On my other sites using the FormMail.pl script from the main site, I was calling the FormMail.pl using a url beginning with http://www, i.e. the call was redirected by http redirect rules. When changing the url to call the FormMail.pl script to https://sitename (i.e. using SSL and no www), the call would not be touched by http redirect rules and voila – everything was working again.
Edit /etc/php5/cgi/conf.d/05-opcache.ini. Add:
I was working on a migration project on site running Joomla 2.5, moving it over to Joomla 3.4. On some pages I received an error screen with SQL errors saying, among other things, “Table jf_content doesn’t exist”.
I found out that the common factor for the pages with errors was that they used the include_content_item plugin. I tried downloading the latest version of the plugin, which was 3.0.12 released in June 2014 supporting up to Joomla 3.3. However I was now running Joomla 3.4 and this didn’t solve my problem.
So I had to start looking for an alternative and found the Articles Anywhere extension which gave me similar functionality. After the include_content_item plugin was uninstalled and replaced by Articles Anywhere my problem was solved.
After upgrading my Joomla 2.5 site to Joomla 3.4 the com_weblinks stopped working. I got error messages like these:
Notice: Trying to get property of non-object in /var/www/SOMESITE/components/com_weblinks/models/category.php on line 87 Warning: Creating default object from empty value in /var/www/SOMESITE/components/com_weblinks/models/category.php on line 88 Notice: Undefined property: stdClass::$url in /var/www/clients/client1/web2/web/webhotel24-2/modules/mod_weblinks/helper.php on line 92
Notice: Undefined property: stdClass::$title in /var/www/SOMESITE/modules/mod_weblinks/tmpl/default.php on line 21 Notice: Undefined property: stdClass::$description in /var/www/SOMESITE/modules/mod_weblinks/tmpl/default.php on line 38
As of Joomla 3.4 the com_weblinks is no longer a core part of the Joomla distribution. Instead it is found in the Joomla Extensions Directory (JED). To try to solve the problem I downloaded the latest com_weblinks from JED and tried to install it in my Joomla 3.4 site. This failed with an SQL error however
After trying to manually delete the weblinks package originating from Joomla 2.5 from the site (by deleting the folders com_weblinks folders and renaming the table ending with the name “_weblinks”) I ended up in a kind of deadlock situation where I wasn’t able to install the new weblinks from Joomla Extensions directory either. It didn’t install due to SQL errors.
The problem with upgrading a weblinks package that has been present during a Joomla 2.5.28 -> Joomla 3.4.0 problems are being adressed here. However, just downloading the suggested pkg_weblinks341 didn’t solve the problem for me either. Trying to install it in my Joomla 3.4 site gave SQL errors about columns images and version already existing in the table ending with the name “_weblinks”. Just deleting the table “_weblinks” gave another error about the table “_weblinks” not exisiting.
This is how I solved it.
Warning! 1) The below solution will have the drawback of deleting all your existing weblinks, but it will get the extension up and running with Joomla 3.4 and 2) make backup of your site and database before you begin!
So my solution was:
- Using phpMyAdmin I made a copy of the table with the name ending with “_weblinks” to a name ending with “_weblinks_OLDJ25” (just to have an easily accessible backup of the table)
- Using phpMyAdmin I deleted the columns images and version from the table “_weblinks”
- I downloaded pkg_weblinks341 and now it was possible to install it using the normal Joomla extension install
Upgrading a system running Ispconfig3 on Ubuntu 12.04 (LTS) to 14.04 is quite straight forward. However there are some issues to consider before doing so. It might affect some of the sites that are being hosted.
- Ubuntu 14.04 will move you from Apache 2.2 to 2.4
- php will be upgraded from 5.3 to 5.5. Most modern CMS:es like Joomla and WordPress will run on php 5.5 but clients can be using other software or third party extensions that are not ready for php 5.5
- Backup, backup and backup. And do some backup again.
- Prepare your users for some downtime. The upgrade can take up to several hours depending on your server.
- During the upgrade process you probably will be prompted several times about configuration files that have been locally modified. I usually examine the differences using D option and in most cases I select to install the new configuration file using Y option.
- After Ubuntu has been upgraded and the system has been rebooted you must reconfigure Ispconfig3. I did it by using the update procuedure even though I was running the latest Ispconfig before I upgraded Ubuntu:
tar xvzf ISPConfig-126.96.36.199p5.tar.gz
php -q update.php
- Allow Ispconfig3 to reconfigure your services
- In my case Apache2 wouldn’t start after the upgrade. It was caused by the ruby module and since I don’t use it my simple solution for the moment was just to disable it:
service apache2 restart
- php imap extension had been disabled, so to fix it:
service apache2 restart
- If you are hosting PrestaShop sites, you need to disable php opcache described here.
When setting up a website in Ispconfig3 I wanted to run a cron job (shell script) for the site (setup under Sites -> Cron jobs) but the job did not execute. When examining the /var/log/auth.log I found lines like these:
Mar 22 10:31:01 servername jk_chrootsh: abort, homedir ‘/var/www/clients/client6/web284’ for user web284 (5015) does not contain the jail separator <jail>/./<home>
Mar 22 10:31:01 servername jk_chrootsh: abort, homedir ‘/var/www/clients/client1/web283’ for user web283 (5014) does not contain the jail separator <jail>/./<home>
The solution was to just add a dummy ssh user (using Jailkit as Chroot shell) in Ispconfig3 for the website.
I haven’t verified but I suspect the issue could be caused by the fact that the system originally was set up under Ubuntu 12.04 (LTS) and recently I did a do-release-upgrade to Ubuntu 14.04.
I was developing a php script that should send emails to a receiver. It worked great with a number of email services, like gmail for example. But with Outlook.com, aka Hotmail.com or Live.com the emails I sent to an account was only visible when logging in to the account through the web. If the same account was configured in the Android app Outlook.com the emails never showed up.
After some headscratching I found the reason. The problem was that my php script sent the emails using only html (Content-type: text/html; charset=utf-8 in the email headers). When the script was changed to send it as a multipart message, both html and text, the message showed up in the Android Outlook.com application also. Even though the Android app had no problems displaying the html-version of the email, it was just ignored if it wasn’t a multipart message with both html and text.
An example on how to send multipart emails in php can be found here.
Some week ago FileZilla released a new version – 188.8.131.52. After installing this version some clients had problems connecting with their web hosting servers using FTP. One of the changes in FileZilla was that it now defaults to TLS encrypted connections if the server supports it, which many web hosting providers do.
However, if the FTP server is not properly configured together with it’s firewall the client will connect but fail to retrieve the directory listing (timeout).
A workaround on the client side is to connect with plain old FTP using no encryption. To do this in the later versions of FileZilla you must create a connection in the site manager and select plain FTP (unsecure) in the encryption field. (This option is not availible in the quick connect.)
A better solution is to solve the problem on the server side. To do this the FTP server must be configured to use a specific range of ports for passive mode and allowing traffic to them through the server firewall. The example below shows how to do this with pure-ftpd and iptables. In the example we setup pure-ftpd to use ports 50000-55000 for passive transfers and then we allow the same range in iptables.
echo “50000 55000” > /etc/pure-ftpd/conf/PassivePortRange
Then add the following to your iptables rules and reload them:
iptables -I INPUT -p tcp -m tcp –dport 50000:55000 -j ACCEPT
A client was going to stop using Microsoft Outlook and Exchange server and move their email to an ordinary web hosting company using IMAP. The client was downscaling and had no use of the benefits of Microsoft Exchange like shared contacts and calendars. They where just using it for email which could be obtained much cheaper by using the IMAP account at their web hosting provider.
So I was faced with the task of converting their old email contained in PST files. They had already shut down their Exchange server and I could not use the Outlook program. I just had the PST files that where exported before the server shutdown and needed them imported into the IMAP account without using Outlook as it was not availible for me.
This is how I solved it.
- Download and install Thunderbird. Set it up with the target email account both as an IMAP account and a POP3 account (it was a problem importing the converted eml files directly to the IMAP account so I had to import them to the POP3 account which is stored locally and then drag them over to the IMAP account, more about that later on). Make sure you setup the POP3 account to leave mail on server and not delete mail when deleted locally.
- Download the ImportExportTools extension for Thunderbird. Drag the downloaded file onto Thunderbird in the task bar to install it.
- Download the free trial of the SysTools PST converter and install it. The free version is limited to 25 emails per folder so if you have more emails you need to purchase it ($49 when writing this article). You can make a test run with the free version so you see everything works before you go on and buy it.
- Run the SysTools PST converter.
- Click the Add file button and select your PST file.
- Click the Export button and select EML format, and check the folders you wish to export (normally the top folder). Enter a target folder. Then click the Export button.
- In Thunderbird, right click the POP3 email account and select New folder and call it “From PST” for example.
- Select the “From PST” folder and go to the menu icon in Thunderbird and select Tools -> ImportExport-tools -> Import all EML from a folder -> and it’s subfolders. Select the top folder of your email export in step 6 and click Select folder.
- All subfolder and it’s email should now turn up in the “From PST” folder. Now drag the “From PST” folder from the POP3 account to the IMAP account in Thunderbird.
- Finally delete the POP3 account in Thunderbird.
I experienced this error when trying to run a backup on a site hosted at the One.com provider.
The solution is to manually adjust the JPA part size for split archives. Even if the configuration wizard had been used, it didn’t work.
- Go to Akeeba Backup -> Settings
- Scroll down to Archiver engine where JPA is selected.
- Click on the Configure button to the right of JPA.
- In my case the Part Size for split archives was set to over 2 GB. I lowered it until it worked, which for me was 100 MB.