SilverCart Forum

We moderate this Forum and we're here to help. Have you already run a forum search to check if your problem has already been solved?

You can help us helping you by providing detailed error messages, screenshots and logfile entries.

SebastianRamon

Page: 1 , 2
Topic installation trouble: Warning: mkdir() [function.mkdir]: Permission denied in /silverstripe/silvercart/_config.php on line 367 11514 Views

installation trouble: Warning: mkdir() [function.mkdir]: Permission denied in /silverstripe/silvercart/_config.php on line 367

3 April 2013 at 10:12pm

I keep getting this frustrating error even though I have chmodded the files and directories to all sorts of settings. I have it currently set to 777 but still it nags on:

Warning: mkdir() [function.mkdir]: Permission denied in /silverstripe/silvercart/_config.php on line 367

Warning: mkdir() [function.mkdir]: Permission denied in /silverstripe/silvercart/_config.php on line 367

php is v5.3.

Re: installation trouble: Warning: mkdir() [function.mkdir]: Permission denied in /silverstripe/silvercart/_config.php on line 367

4 April 2013 at 9:22am Last edited: 4 April 2013 9:23am

Hi Draecko,

SilverCart tries to create some folders for the cache in line 367 of _config.php. Simple PHP stuff, nothing fancy.

The warnings mean that either the directory "silverstripe-cache" (should be located in the web-root, i.e. same level as the silvercart folders) is missing or that subdirectories cannot be created due to file permissions.

Can you please verify that the directory "silverstripe-cache" is present in the webroot and that it has the proper rights?

Cheers
Ramon

Re: installation trouble: Warning: mkdir() [function.mkdir]: Permission denied in /silverstripe/silvercart/_config.php on line 367

5 April 2013 at 9:53am

Yeah, that's what I thought, it shouldn't be anything fancy. I'm using the complete silverstripe+silvercart package to install, which already includes the silverstripe-cache folder. I already had chmodded that folder fully recursive to 777, but it didn't help...

Re: installation trouble: Warning: mkdir() [function.mkdir]: Permission denied in /silverstripe/silvercart/_config.php on line 367

5 April 2013 at 11:26am

Hello Draecko,

could you try the following please:

In "silvercart/_config.php" change line 367 from

mkdir($cacheDirectory);

to

mkdir($cacheDirectory, 0, true);

This call will try to create the folders recursively.

If that fails you could try (just for testing purposes) to set the permissions of your "/silverstripe" folder to 777.

Let's hope one of the proposals works :)

Greetings,
Sascha

Re: installation trouble: Warning: mkdir() [function.mkdir]: Permission denied in /silverstripe/silvercart/_config.php on line 367

5 April 2013 at 1:21pm Last edited: 5 April 2013 1:27pm

Ok, I've tried editting the php code, but it didn't solve it. So I've chmodded /silverstripe to 777 to try out, but now some other error shows up unfortunately...

Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request

Server log:

[Fri Apr 05 13:18:04 2013] [error] [client xx.xx.xxx.x] SoftException in Application.cpp:564: Directory "/silverstripe" is writeable by group
[Fri Apr 05 13:18:04 2013] [error] [client xx.xx.xxx.x] Premature end of script headers: main.php

I'll try messing with the chmod of some directories, I'll be back later.

Thanks for the help so far guys!

Cheers,
Joeri

Re: installation trouble: Warning: mkdir() [function.mkdir]: Permission denied in /silverstripe/silvercart/_config.php on line 367

5 April 2013 at 1:25pm

Ok, chmodding just the /silverstripe folder to 755 (not fully recursive) results in the same php warnings as the original post.

Re: installation trouble: Warning: mkdir() [function.mkdir]: Permission denied in /silverstripe/silvercart/_config.php on line 367

5 April 2013 at 3:17pm

Hi Draecko,

that sounds like a webserver configuration problem. What Webserver do you run your installation on?

Greetings,
Sascha

Re: installation trouble: Warning: mkdir() [function.mkdir]: Permission denied in /silverstripe/silvercart/_config.php on line 367

17 April 2013 at 3:00pm Last edited: 17 April 2013 3:27pm

I'm running it on a remote host. Not sure what the configuration is, does the following picture help?

https://www.dropbox.com/s/zmcx4yumw48a13s/system.jpg

It says it runs on php 5.2, but php 5.3 is enabled on the silverstripe folder using a .htaccess with

<FilesMatch "\.php$">
AddHandler x-httpd-php53 .php
</FilesMatch>

as directed by the host.

edit: I tried silvercart 1.3.7, the line of the error shifted to 424.

Warning: mkdir() [function.mkdir]: Permission denied in /silverstripe/silvercart/_config.php on line 424