php

Troubles with Drupal, File Uploads, and XAMPP

Ever tear your hair out for hours trying to track down why something is not working, only to find out that it is the simplest thing? Well, after losing a large chunk of my life that is never to return, I am happy to say that it is solved.

While doing some module development on my Mac using xampp, I was running into the problem that file uploads to nodes, either via upload.module or CCK filefield was not working at all. Not in D5, not in D6. Nothing I could do or think of would solve it. Nothing on Google or any other search engine despite my myriad of search terms.

After literally hours trying all I could think of, debugging PHP, JavaScript, etc, I finally found out that Irakli was having the same problem and swooped in to the rescue. Turns out that it was a configuration parameter that was left to “default” in php.ini. By default

; Temporary directory for HTTP uploaded files (will use system default if not specified).
;upload_tmp_dir =

Was not actually using a valid system default as best we can tell. Simply changing it to

; Temporary directory for HTTP uploaded files (will use system default if not specified).
upload_tmp_dir = /tmp

fixed all if our upload woes and we were back in business.

Now, can I have that last half a day of my life back?


Multipart HTML Emails With Drupal

Multi-part email format allows you to send both textual and HTML-formatted emails concurrently. These days, most web-systems should support this. In the following blog post, we discuss and show a quick example of how to send multi-part e-mails with Drupal


HOWTO: Install PECL APC Cache on CentOS (without XAMPP)

As Irakli already discussed, the Alternative PHP Cache (APC) is an op-code pre-compiler and a cache system that can boost the performance of a PHP application up to 10 times. Op-code caches are very effective for a Drupal website, since Drupal deals with large number of source files and time spent in parsing them significantly affects performance.

However, if you don’t have XAMPP and need to install it on CentOS, you can follow this guide to get around some of the problems that happen with the default server settings.


HOWTO: Install PECL APC Cache with XAMPP on Linux

Alternative PHP Cache (APC) is an op-code pre-compiler and a cache system that can boost the performance of a PHP application up to 10 times. Op-code caches are very effective for a Drupal website, since Drupal deals with large number of source files and time spent in parsing them significantly affects performance.

The following blog post explains how to install APC in a XAMPP environment.


Syndicate content