ProjectPier Email and Upload Problems Solved

One of my subjects, “Enterprise Engineering”, requires us to form a group to work on a project. Since my group only really gets together once a week, I used this as an excuse to install something I’ve wanted to for ages - ProjectPier. After registering this domain, it was the first thing I set up. ProjectPier was really impressive - it is just as good as, if not better than 37 Sinals’ “Basecamp”, except it’s free! But I soon realised that ProjectPier wasn’t so great…

 

EEET Project in ProjectPier

ProjectPier after setting up, creating projects, adding tasks and changing the theme.
You really should change the theme, the default one’s a bit 90’s.

At first I didn’t notice any problems but once I started using it, there was definitely something wrong. After another day I noticed something else was wrong. The two problems:

  • ProjectPier wouldn’t allow file uploads to messages, tasks, comments, etc. (Though avatars uploaded properly)
  • No emails were being sent by ProjectPier. None at all.

Well, these two things were serious enough to warrant an … investigation ;) So I obviously did some snooping around and fiddling around. The problem with these issues is that there were mainly no explicit error messages - only the lack of results (ie. files not uploading, emails not arriving).

Anyway, after some time I found solutions to both issues on the ProjectPier website:

ProjectPier File Uploads Failing

The problem was that ProjectPier thought it wasn’t allowed to create a directory for file uploads - apparently it’s an OS-dependent error. Errors were only sometimes actually reported, but when they were it usually said somthing like “Failed to create folder“. Basically, you have to go in and change some code in one of the file routines to fix it. On the ProjectPier website, Martin came up with a working solution:

In /environment/functions/files.php , the function ‘force_mkdir' needs to be modified, because this is the function that is incorrectly deciding that it can’t create the directory. Here’s Martin’s code that solves the issue:

$real_path = str_replace(‘\\’, ‘/’, $path);
mkdir($real_path, $chmod, true);
return
is_dir($real_path);

The least disruptive way to make the change is to add leave the existing code within the function, but add this code above it, like so:

function force_mkdir($path, $chmod = null) {
$real_path = str_replace(‘\\’, ‘/’, $path);
mkdir($real_path, $chmod, true);
return
is_dir($real_path);

\
\existing code is down here

Once you’ve made this change, you’ll be sharing your project files in no time. Project files and funny pictures of cats.

Emails Not Being Sent by ProjectPier

This solution took a bit longer to find and also came from the ProjectPier website. Although nobody explicitly stated the solution, one of the posts mentioned an error about “PHP Safe Mode”. I realised that I had it enabled for the virual host.

I disabled PHP Safe Mode. Then there was email.

And that’s why, you never yell.

Tags: , , , , , ,

Leave a Reply