PDA

View Full Version : php restrictions


ndruk
11-08-2002, 01:00 AM
Thx to bcar for answering my other post, but I found something that, with some custom changes, looks suitable for what I need: phpCommander (http://sourceforge.net/projects/phpcommander/), a full web-based file management system.

The problem is I keep bumping into php restriction: open_basedir when trying to upload files, mkdir when trying to create directories.

Is there a way to override these restriction?

(Security is not an issue here, as it is intended for a small intranet.)

bcarl314
11-08-2002, 01:14 AM
Check the file permissions. You may need to chmod to 755 or 777.

firepages
11-08-2002, 06:44 AM
its not a PHP issue its a hosting issue, you need a host that supports full php functionality, PHP functionality is otherwise only restricted when running on IIS etc

ndruk
11-09-2002, 12:10 PM
Well the open_basedir 'error' is rather well documented on the net, and it seems to relate to the safe_mode php setting, which can only be disabled by editing the httpd.conf file. (And we don't have access to that in our current mutualized hosting account.)

I guess the same applies to mkdir: php safe mode is, I gathered, about restricting all writing operations outside... the directory containing write.php (or anything like a "php interpreter" -- I'm an absolute beginner in php) or the actual script?
It is not clear, but it must be the former answer, as my php script only attempts to write in subdirs of its own directory...

In all probability, the solution is upgrading our hosting package to a "private server" offer with access to server configuration files.

(I'd like to get authoritative confirmation of this, if possible, but thanks anyway for answering so far.)

firepages
11-10-2002, 03:34 AM
Hi, yes sorry I should have been more specific, 'safe-mode' is a ball&chain which restricts a lot of the functionality of PHP, though even on some paid hosts you may find that certain functions are disabled.. usually chown() is not available.

But most paid hosts will not have safe-mode turned on, if they do then don't bother with them !

To be fair to the free hosts safe-mode makes sense especially when you consider they will have a lot of less-experienced users and its possible with PHP to do a fair bit of damage without trying :) , but it also reflects somewhat on thier server configuration , it should be possible to permit full PHP functionality without major risk, but I can understand thier concerns (having made a couple of embarrasing `DOH's` myself ;))