# phpWebSite Permission errors

## DrWilken

Hi... I've installed phpWebSite and I have a problem with the "Installation Utility"...

I get these errors:

```

Warning: session_start(): open(/tmp/sess_b4933363485b0bea6b2216dfa7f52ba1, O_RDWR) failed: Permission denied (13) in /var/www/localhost/htdocs/setup/setup.php on line 55

Warning: session_start(): Cannot send session cookie - headers already sent by (output started at /var/www/localhost/htdocs/setup/setup.php:55) in /var/www/localhost/htdocs/setup/setup.php on line 55

Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /var/www/localhost/htdocs/setup/setup.php:55) in /var/www/localhost/htdocs/setup/setup.php on line 55

Warning: Unknown(): open(/tmp/sess_b4933363485b0bea6b2216dfa7f52ba1, O_RDWR) failed: Permission denied (13) in Unknown on line 0

Warning: Unknown(): Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/tmp) in Unknown on line 0

```

Do I have to change the .session_save_path in php.ini?? If yes... into what?

----------

## Hypexr

To get the setup utility to run try changing the permissions in your /var/www/localhost/htdocs/setup folder

chmod -R a+rwx /var/www/localhost/htdocs/setup

Im guessing these files are only needed for the setup so I recomend deleting the setup folder when you are done

----------

## Chris W

Read the INSTALL.txt file in /var/www/localhost/htdoc/phpwebsite/docs.  It tells you how to set the correct permissions before attempting to access the setup page, and how to tighten them afterward.

----------

## DrWilken

If you look at the code this has nothing to do with htdocs. Looks like phpWebSite is trying to save session data to /tmp

```

Warning: Unknown(): open(/tmp/sess_d92d5f6357d9616cec9031b761ae5683, O_RDWR) failed: Permission denied (13) in Unknown on line 0

```

----------

## DrWilken

Should I

1) change permissions on /tmp or 

2) use another .session_save_path?

If 1, what permissions should i give it?

If 2, which path?

----------

## Hypexr

What does INSTALL.txt say?

I've had similar problems before and it involved changing the correct permissions in the html directory even though part of the output is /tmp.

----------

## DrWilken

INSTALL.txt says:

 *Quote:*   

> 
> 
> 1Installation of phpWebSite
> 
> --------------------------
> ...

 

----------

## DrWilken

This is my /tmp permissions:

```

d---------   16 root     root          496 Dec 21 13:08 tmp

```

----------

## DrWilken

in php.ini there is a line saying:

```

session.save_path = /tmp

```

I think this is where the problem lies as.. when phpWebSite tries to save session data it doesn't have permissions to do so.

----------

## DrWilken

Maybe I haven't been specific enough... I have allready written the ./setup/config.php file. (via the web interface)

But after this is done there is this "Installation Utility" which asks for the installation password specified at the first page.

```

Warning: session_start(): open(/tmp/sess_7371c8e25e7b1bd885ae83cea6ddcef9, O_RDWR) failed: Permission denied (13) in /var/www/localhost/htdocs/setup/setup.php on line 55

Warning: session_start(): Cannot send session cookie - headers already sent by (output started at /var/www/localhost/htdocs/setup/setup.php:55) in /var/www/localhost/htdocs/setup/setup.php on line 55

Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /var/www/localhost/htdocs/setup/setup.php:55) in /var/www/localhost/htdocs/setup/setup.php on line 55

phpWebSite Version 0.9.3-2 - Installation Utility

   Welcome to the phpWebSite installation utility!

Please enter your installation password to continue.

<here is the password box and submit button>

  

Warning: Unknown(): open(/tmp/sess_7371c8e25e7b1bd885ae83cea6ddcef9, O_RDWR) failed: Permission denied (13) in Unknown on line 0

Warning: Unknown(): Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/tmp) in Unknown on line 0

```

and when the "installation password" is entered this is the output i get:

```

Warning: session_start(): open(/tmp/sess_6d9d0d24c8638871de6ee0da9d3d014d, O_RDWR) failed: Permission denied (13) in /var/www/localhost/htdocs/setup/setup.php on line 55

Warning: session_start(): Cannot send session cookie - headers already sent by (output started at /var/www/localhost/htdocs/setup/setup.php:55) in /var/www/localhost/htdocs/setup/setup.php on line 55

Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /var/www/localhost/htdocs/setup/setup.php:55) in /var/www/localhost/htdocs/setup/setup.php on line 55

phpWebSite Version 0.9.3-2 - Installation Utility

phpWebSite failed a session test. If your PHP installation is not configured to allow sessions, you will not be able to run phpWebSite.

Please check your session path in your php.ini file and make sure your version of php supports superglobals(greater than version 4.1.2)

Warning: Unknown(): open(/tmp/sess_6d9d0d24c8638871de6ee0da9d3d014d, O_RDWR) failed: Permission denied (13) in Unknown on line 0

Warning: Unknown(): Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/tmp) in Unknown on line 0

```

----------

## rizzo

 *DrWilken wrote:*   

> This is my /tmp permissions:
> 
> ```
> 
> d---------   16 root     root          496 Dec 21 13:08 tmp
> ...

 

Uhh that is insane.  Here is mine:

```
drwxrwxrwt   23 root     root         2400 Dec 21 09:55 tmp

```

So yes either change your tmp permissions or change the session save path to somewhere apache can read/write.

----------

## DrWilken

 *rizzo wrote:*   

>  *DrWilken wrote:*   This is my /tmp permissions:
> 
> ```
> 
> d---------   16 root     root          496 Dec 21 13:08 tmp
> ...

 

So this would be chmod 777 /tmp?

----------

## DrWilken

Yeaaaaaaaaaassssss!!!!   :Very Happy: 

It works!  :Wink:  Wonder how I got those strange permission on /tmp??

----------

## rizzo

The "t" is sticky so the permissions are actually 1777.

No idea how your tmp got that way but it was definitely evil.

----------

