CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Installing CiviCRM »
  • Joomla! Installations (Moderator: Deepak Srivastava) »
  • Solutions to PHP save mode and unwritable temp directory …
Pages: [1]

Author Topic: Solutions to PHP save mode and unwritable temp directory …  (Read 3846 times)

volmark

  • I post occasionally
  • **
  • Posts: 81
  • Karma: -6
Solutions to PHP save mode and unwritable temp directory …
December 22, 2007, 07:03:29 pm
As apology to my privies pessimistic article "Total crash!!!" I would like to public some solutions to the problems I have described in that article.  ::)
It was originally published by Dean Marshall on Joomla forum. I've shorted it little bit …
---------------------------------------------------------------------------
three solutions:

a) edit php.ini (a server configuration file) if you have access to, or control of, the server.
If you don't have access to the server - you could ask your host.

b) edit .htaccess file and add the following line:
This option is useful if php is being run as a server module (isapi) - but not if run through CGI.
If you don't know what that means - either suck it and see, or check out PHP system info.
Code:

   php_value session.save_path '/path/to/a/writeable/folder'

(change '/path/to/a/writeable/folder' to a folder that is actually writable)
create the folder first if you need to - ideally put it above your /public_html/ or /wwwroot/ folder

c) If PHP is being run as CGI on your server - or if trying the .htaccess method didn't work
You may be able to create a 'local' php.ini file in your folders. With this method you can override the main php.ini settings on a folder by folder basis. This is important FOLDER BY FOLDER. This means that each folder that contains an executable php script must have its own php.ini file. So your main Joomla folder, your /administrator/ folder and perhaps some of the sub-folders within /administrator/ too - as they contain utility scripts - such as file uploads - that may be called directly.

The format of the setting to place into your php.ini file is as follows:
session.save_path = w:/tmp

NOTE: even on windows systems the forward slash is the preferred directory separator.
Drive letters are optional and in most cases can be omitted - so the path would start with an initial forward slash /tmp
No quotes are required - unless the path contains spaces (which ideally it should NOT)

d) if .htaccess files are something that you are not comfortable with - or your host doesn't allow them to be used this way:
you could add the following line somewhere in Joomla's php code
Code:

session_save_path('/path/to/a/writeable/folder');


The easiest place to add it is within configuration.php - BUT - if you (or any component) changes any 'Global config' settings the edit will be lost and will need to be replaced.

Again point the path to a folder that you can make writeable
You could copy the value of $mosConfig_absolute_path and append '/sessions' (without the quotes)
Then make a folder called sessions and ensure it has permissions of 755.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Installing CiviCRM »
  • Joomla! Installations (Moderator: Deepak Srivastava) »
  • Solutions to PHP save mode and unwritable temp directory …

This forum was archived on 2017-11-26.