Yet another file upload bug report

Tagged:  

If there is one thing I could pick in the forums about bug reports it is file upload problems.

I have file upload problems as well.

I happen to own this hosting server so that's the only reason I could get away with changing server settings to fit ProjectPier. The vast majority of the users will not be able to do so (and I would not have modified the system config files I did upon request of a client, BTW).

Anyway, if I tell ProjectPier to save files to the file system (which I much prefer to the alternative of having a database bloated by file uploads), I get the following error:

Failed to create folder '/home2/gobae/public_html/pier/upload/93239/1ffc7/07b5d'

Now, I have debug set to on, and at the top of the p[age I get these errors:

Warning: is_dir() [function.is-dir]: open_basedir restriction in effect. File(/) is not within the allowed path(s): (/home2/gobae:/usr/lib/php:/usr/local/lib/php:/tmp) in /home2/gobae/public_html/pier/environment/functions/files.php on line 249

Warning: mkdir() [function.mkdir]: open_basedir restriction in effect. File(/) is not within the allowed path(s): (/home2/gobae:/usr/lib/php:/usr/local/lib/php:/tmp) in /home2/gobae/public_html/pier/environment/functions/files.php on line 251

It is ceraintly a security issue, and a bug in the code of ProjectPier. Which hosting company will allow you to look at the root directory?

I realize workarounds to this have been posted to this forum, but the post is from.. last year? Does it still apply? I don't want to change ProjectPier's source to see if it works... Too much risk.

So, withough doing some code change, my other option is to use (grrr!) database file storage.

This opened up another bunch of problems. After updating my PHP config to allow file uploads up to 64MB, I kept consistently getting an error on files over 1MB. Buried somewhere in a post I saw a reference to the MySQL setting max_allowed_packet, which was indeed set to 1MB, hence that limited the uploaded file size.

Now, which hosting provider will modify this setting to fot a user? Not one.

The setting was really hard to find, and I am hoping that I don't screw up my server (which was working fine) by upping this setting to the max file size I want ot upload into ProectPier.

This could be compensated by if the files were stored into the server in chunks, rather than having a single record for each file.

But anyway, my point is that this is seriously screwed up. Sharing files on ProjectPier is a MAJOR, MAJOR feature. ProjectPier would do well to handle it better, and it would be a good thing to document this whole issue, even if it's not fixed.

To be honest, I stayed on this because ProjectPier is exactly what we need. There are many, many alternative collab/proj management tools out there, and someone who is not sold on ProjectPier will just go on to the next eval if problems like these are neither documented nor solved.

I hope I don't come across as a big whiner, I posted specific problems and the solutions that worked for me with the intention of helping the project, not trash-canning it.

Now that these problems are solved (for me anyway), we will probably use this product.

Thanks.

Hey gmagana,
I'm afraid I don't know that much about open_basedir restrictions, but I agree this is a big problem.
I found this issue - http://projectpier.org/node/294 which apparently solves the problem.
The current version of PP hasn't changed that much since last year, so it should be ok to use most of the code suggestions that you see on this forum.