Page 1 of 1

Safe mode effecting mkdir()

Posted: Mon Jul 10, 2006 4:29 pm
by HiddenS3crets
I am trying to use the mkdir() function, but am getting safe mode restrictions.

I have tried changing the values for safe_mode and safe_mode_gid in the php.ini file, but I still get the same error:

Code: Select all

Warning: mkdir(): SAFE MODE Restriction in effect
Any ideas on how to get around this (besides making a directory the FTP way)?

Re: Safe mode effecting mkdir()

Posted: Mon Jul 10, 2006 4:31 pm
by Chris Corbyn
HiddenS3crets wrote:I am trying to use the mkdir() function, but am getting safe mode restrictions.

I have tried changing the values for safe_mode and safe_mode_gid in the php.ini file, but I still get the same error:

Code: Select all

Warning: mkdir(): SAFE MODE Restriction in effect
Any ideas on how to get around this (besides making a directory the FTP way)?
Did you restart the webserver after editting the ini? (Unless you're using CGI).

Posted: Mon Jul 10, 2006 4:32 pm
by HiddenS3crets
I can't restart the webserver, I don't host my own site.

Posted: Mon Jul 10, 2006 4:35 pm
by Chris Corbyn
HiddenS3crets wrote:I can't restart the webserver, I don't host my own site.
How did you edit the ini file? If you don't own the server and can't do things like restarting it then you shouldn't have access to write to this file. When I say restart the server I mean the daemon, not the hardware ;)

Posted: Mon Jul 10, 2006 4:38 pm
by HiddenS3crets
I have access to the files, but I don't have Apache running on my own computer or anything so I'm not running my own server. I don't have the capabilities to restart anything

Posted: Mon Jul 10, 2006 5:11 pm
by Chris Corbyn
HiddenS3crets wrote:I have access to the files, but I don't have Apache running on my own computer or anything so I'm not running my own server. I don't have the capabilities to restart anything
I'm not sure I'm following you :(

Apache runs on the server, it is only configured on the server. PHP runs on the server, and again is only configured on the server. Editting ini files on your own PC will make no difference to how PHP runs on the server. Did you edit the ini on the server or your PC? The only way you can edit the ini without restarting the server is if PHP is configured to run as CGI too... if PHP is running as a module then you're stuck if you can't restart the service.

You should probably speak to your host.

Posted: Mon Jul 10, 2006 5:49 pm
by HiddenS3crets
I don't run my own server. I get webhosting and the server is running somewhere in Connecticut, but I still have access to the php.ini file. Everything runs on my host's servers, I just access the files through a web browser by logging into the hosting panel 8O

Posted: Tue Jul 11, 2006 1:42 pm
by dull1554
there should certainly be a way to restart your server on your control panel if you have the ability to edit your conf files

Posted: Tue Jul 11, 2006 3:11 pm
by Chris Corbyn
dull1554 wrote:there should certainly be a way to restart your server on your control panel if you have the ability to edit your conf files
I'm not so sure, it sounds like a nifty CGI setup on a shared server with suexec and the php.ini dir specified under apache on a per-directory basis. If it's CGI the ini is parsed at runtime not load-time.

Best thing to do is to change something blatant and run phpinfo(). That's of course after contacting your host to check how it's supposed to work ;)