Jun 192011
 

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:

Jun 112011
 

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-sqlite (and 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.

VN:F [1.9.22_1171]
Rating: 0.0/10 (0 votes cast)
Jan 142011
 

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):

Sep 232010
 

Mac OS X 10.6 ships with Apache as well as PHP5. This blog post describes how to activate it.

Apache

To run Apache: Enable Web Sharing in the System Preferences → Sharing. Websites are stored in /Library/WebServer/Documents/

PHP

To activate PHP: uncomment a line in /etc/apache2/httpd.conf:

LoadModule php5_module        libexec/apache2/libphp5.so

and restart Apache:

sudo apachectl restart

MySQL

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: