Loading...
 
Architecture / Installation

Architecture / Installation


/tmp folder is not accessible, can't install

posts: 6 Russia

Here is the messages:

<blockquote>

Warning: tempnam() function.tempnam: open_basedir restriction in effect. File(/var/tmp) is not within the allowed path(s): (/home/(user_folder)/data:.) in /usr/home/(user_folder)/data/www/(website)/lib/init/initlib.php on line 96

Warning: session_start() function.session-start: Cannot send session cookie - headers already sent by (output started at /usr/home/(user_folder)/data/www/(website)/lib/init/initlib.php:96) in /usr/home/(user_folder)/data/www/(website)/tiki-setup_base.php on line 274

Warning: session_start() function.session-start: Cannot send session cache limiter - headers already sent (output started at /usr/home/(user_folder)/data/www/(website)/lib/init/initlib.php:96) in /usr/home/(user_folder)/data/www/(website)/tiki-setup_base.php on line 274

</blockquote>

What can I do? Help please.

Update: Tiki version is 1.9.7

posts: 1817 Catalan Countries

Welcome to Tikiwiki Community!

Try removing the slash from tiki-setup_base.php wherever it says to write to /tmp, so that it creates the temp files at installation under the tiki's own tmp folder...

HTH...



posts: 44 Canada

This problem is caused by the system temp directory configured being outside of the open_basedir limits. The way to solve this problem is (1) ask your system admin to change the open_basedir limits to include the system temp directory.

The other way is to hardcode a tmp directory that can be accessed into tiki-setup.php.

look for the text TikiInit::tempdir()
replace that text with "whatever_directory_with_open_basedir_setting/tmp"
e.g. "/home/(user_folder)/data/tmp" for the following example.

This server still has to be tested to check if file uploading is a problem, i.e. the setting of upload_tmp_dir could be problematic as well.


> Here is the messages:
>
> Warning: tempnam() function.tempnam: open_basedir restriction in effect. File(/var/tmp) is not within the allowed path(s): (/home/(user_folder)/data:.) in /usr/home/(user_folder)/data/www/(website)/lib/init/initlib.php on line 96
>
> Warning: session_start() function.session-start: Cannot send session cookie - headers already sent by (output started at /usr/home/(user_folder)/data/www/(website)/lib/init/initlib.php:96) in /usr/home/(user_folder)/data/www/(website)/tiki-setup_base.php on line 274
>
> Warning: session_start() function.session-start: Cannot send session cache limiter - headers already sent (output started at /usr/home/(user_folder)/data/www/(website)/lib/init/initlib.php:96) in /usr/home/(user_folder)/data/www/(website)/tiki-setup_base.php on line 274
>
> What can I do? Help please.
>
> Update: Tiki version is 1.9.7
>


posts: 1

I got a similar problem, I have a few ideas on what it could be, but dont know how to solve it, and even after having looked around for a solution for a few hours and tried some, it dosent seem to help me.. so now I post smile

Tiki Installer cannot proceed:

The directory '/tmp' does not exist or PHP is not allowed to access it (check open_basedir entry in php.ini).

You may either create missing directories and chmod directories manually to 777, or run one of the sets of commands below.
Execute the Tiki installer again after you run the commands below.

If you cannot become root, and are NOT part of the group nobody (or the group account the web server is running under):
$ bash
$ cd /customers/nuf.dk/nuf.dk/httpd.www/wic
$ chmod +x setup.sh
$ ./setup.sh yourlogin yourgroup 02777
Tip: You can find your group using the command 'id'.

If you cannot become root, but are a member of the group nobody (or the group account the web server is running under):
$ bash
$ cd /customers/nuf.dk/nuf.dk/httpd.www/wic
$ chmod +x setup.sh
$ ./setup.sh mylogin nobody (or the group account the web server is running under)

If you can become root:
$ bash
$ cd /customers/nuf.dk/nuf.dk/httpd.www/wic
$ chmod +x setup.sh
$ su -c './setup.sh nobody (or the user account the web server is running under)'

If you have problems accessing a directory, check the open_basedir entry in
/etc/php5/php.ini or httpd.conf.

Once you have executed these commands, this message will disappear!

Consult the tikiwiki.org installation guide if you need more help.

Execute the Tiki installer again if you have completed the steps above.


I have talked to my provider.. everything should be ok, except that it runs in php safe mode (Forgive me if im writing it wrong, but im not the biggest SQLphpApache warrior) Is there any trick to it when installing from a browser.. I have full ftp acces, I have access to my sql database. but cannot create a new one.. other than the one I already have

Thx for your time

posts: 957

> I got a similar problem, I have a few ideas on what it could be, but dont know how to solve it, and even after having looked around for a solution for a few hours and tried some, it dosent seem to help me.. so now I post smile
>

>
Tiki Installer cannot proceed:

> The directory '/tmp' does not exist or PHP is not allowed to access it (check open_basedir entry in php.ini).

> ...


We had a similar problem, and we solved with this:

Modified this file ./lib/init/initlib.php

Orginal bit of code at ./lib/init/initlib.php (towards the end of the file)

Line 9 to 13 (numbers from the example below) need to be commented), and added line 8, to that it results as :

Copy to clipboard
/** Return system defined temporary directory. * In Unix, this is usually /tmp * In Windows, this is usually c:\windows\temp or c:\winnt\temp * \static */ function tempdir() { static $tempdir; if (!$tempdir) { $tempfile = tempnam(false,''); $tempdir = dirname($tempfile); @unlink($tempfile); } return $tempdir; } }

Copy to clipboard
/** Return system defined temporary directory. * In Unix, this is usually /tmp * In Windows, this is usually c:\windows\temp or c:\winnt\temp * \static */ function tempdir() { static $tempdir; $tempdir = '../tmp'; /* if (!$tempdir) { $tempfile = tempnam(false,''); $tempdir = dirname($tempfile); @unlink($tempfile); } */ return $tempdir; } }


Upcoming Events

1)  18 Apr 2024 14:00 GMT-0000
Tiki Roundtable Meeting
2)  16 May 2024 14:00 GMT-0000
Tiki Roundtable Meeting
3)  20 Jun 2024 14:00 GMT-0000
Tiki Roundtable Meeting
4)  18 Jul 2024 14:00 GMT-0000
Tiki Roundtable Meeting
5)  15 Aug 2024 14:00 GMT-0000
Tiki Roundtable Meeting
6)  19 Sep 2024 14:00 GMT-0000
Tiki Roundtable Meeting
7) 
Tiki birthday
8)  17 Oct 2024 14:00 GMT-0000
Tiki Roundtable Meeting
9)  21 Nov 2024 14:00 GMT-0000
Tiki Roundtable Meeting
10)  19 Dec 2024 14:00 GMT-0000
Tiki Roundtable Meeting