I had a nasty problem with Piwik today. I use it on a low traffic website until today (updated to 1.5) I did not mind that the sparklines were not displayed. But today I wanted to fix the problem and at first I didn’t come to the conclusion that GD2 was missing or defect as php5-gd was installed on the system. After some search on the net, I found out that it had to be a problem with GD2 and I even downloaded a fresh Piwik zip file to a different folder in order to see the checks on the second page of the installer. There it was indicated clearly that GD2 didn’t work properly:
If you want to use SQlite3 databases with PHP you should probably use PDO.
Install it like this:
su apt-get install php5 php5-sqlite echo -e "\nextension=pdo.so\n" >> ../conf/php.ini
Note: You don’t need any command like
pecl install pdo_sqlite or
pecl install pdo as PDO is now included in the package
php5-mysql). In my case this broke my PHP installation and I had to run the following to get it back working:
su pecl uninstall pdo pdo_mysql pdo_sqlite apt-get reinstall php5-common php5-sqlite
For examples see the invoices project.
If you get an error message like the following when changing the color scheme / color set of the Bartik theme in Drupal 7 you might have PHP Safe Mode enabled.
* The specified file themes/bartik/logo.png could not be copied, because the destination directory is not properly configured. This may be caused by a problem with file or directory permissions. More information is available in the system log. * The specified file temporary://file3DiL7Z could not be copied, because the destination directory is not properly configured. This may be caused by a problem with file or directory permissions. More information is available in the system log.
I could solve the problem by disabling php safe mode for the site (as
safe_mode off is a requirement of the Drupal installation):
Mac OS X 10.6 ships with Apache as well as PHP5. This blog post describes how to activate it.
To run Apache: Enable Web Sharing in the System Preferences → Sharing.
Websites are stored in
To activate PHP:
uncomment a line in
LoadModule php5_module libexec/apache2/libphp5.so
and restart Apache:
sudo apachectl restart
Go to http://dev.mysql.com/downloads/mysql/ and download the latest package of the x86, 64-bit DMG version of MySQL. Install mysql, the startup item and the preference pane. Then start MySQL in the preference pane and test it’s working: