Setting upload_tmp_dir

Hello, a customer wants to implement a PHP script for their visitors to upload files.

They are telling us that we should define upload_tmp_dir in our Interworx server php.ini which is set to “no value” at this time.

What should we put there? Is it safe to enable this option?

Thanks for all your feedback on this issue.



If you have your web server running with suPHP (as SiteWorx user) then they can create their own php.ini file and set their own PHP temp directory. This way they can have their own private temp directory under their account.

Yes, I guess that is the optimal and more secure setup for InterWorx.
But everytime I change “PHP Mode” from “Run as Apache User” to “Run as SiteWorx User” some of the websites (Joomla, ioncube sites, etc.) stop working. Apache returns a “Internal server Error” message.

I know this would be a different topic but;
Is there a way to ‘gracefuly’ switch “PHP Mode” from “Run as Apache User” to “Run as SiteWorx User” without downtime of some of the websites?



Check the error logs, as you’ll quite likely find one of two things that’s causing it:

To run safely as the SiteWorx user

  1. Files in the users directories must all be owned by their user, not apache
  2. Permissions must not be 777. 755 or lower is ok.

They’ll likely be your culprits :slight_smile:

I’ve followed all recommendations as far as file permissions and ownership given above, but still, when I change PHP Mode to “Run as SiteWorxs User” PHP stops working completely.

Even a simple phpinfo() script returns “Internal Server Error”

We are running PHP 5.3 and it has been working fine, but I’m wondering if that has to do with PHP not working under “SiteWorxs User Mode”

Any help on this issue would be greatly appreciated.



Can you post up the error log entry for the internal server error?