Web based family history software

Question The server’s temporary folder cannot be accessed.

  • vasiliy4
  • Topic Author
  • Offline
  • New Member
  • New Member
More
4 months 5 days ago - 4 months 5 days ago #1 by vasiliy4
good afternoon. I can't overcome the problem with accessing the temporary directory in any way.
permissions for the tmp folder are 700
I'm quietly writing files in it.
folder bin-tmp permissions 777
folder mod-tmp permissions 777

below is the information from the section - information about the server.
Please tell me how to solve the problem? or maybe specify another directory for temporary files?


The server’s temporary folder cannot be accessed.
sys_get_temp_dir() = "/tmp/"
ini_get("open_basedir") = "/var/www/hostingname/data:."

upload_tmp_dir   /var/www/hostingname/data/mod-tmp

Environment
TEMP /tmp
TMP /tmp
TMPDIR /tmp

PHP Variables
$_SERVER /tmp
$_SERVER /tmp
$_SERVER /bin-tmp
 
Last edit: 4 months 5 days ago by vasiliy4.

Please Log in or Create an account to join the conversation.

More
4 months 5 days ago #2 by fisharebest
Replied by fisharebest on topic The server’s temporary folder cannot be accessed.
When you use "open_basedir", PHP can only access those folders.

Your system temporary file (/tmp) is not in the open_basedir setting.

Therefore PHP cannot access it.

How to fix depends on your server configuration and what control you have over it.

For example on my server, I put this into my php-fpm configuration
Code:
php_admin_value[open_basedir] = /home/fisharebest/ php_admin_value[upload_tmp_dir] = /home/fisharebest/tmp php_admin_value[session.save_path] = /home/fisharebest/tmp php_admin_value[sys_temp_dir] = /home/fisharebest/tmp

Greg Roach - greg@subaqua.co.uk - @fisharebest@phpc.social - fisharebest.webtrees.net

Please Log in or Create an account to join the conversation.

  • vasiliy4
  • Topic Author
  • Offline
  • New Member
  • New Member
More
4 months 5 days ago - 4 months 5 days ago #3 by vasiliy4
the screenshot shows the parameters that I can change.
The code that you wrote, where am I and how can I apply it?

Or maybe somewhere inside the webtrees files I can reassign access to the temporary folder?


Or should it be done by the support of my hoster?

I don't understand hosting well (((
Attachments:
Last edit: 4 months 5 days ago by vasiliy4.

Please Log in or Create an account to join the conversation.

More
4 months 5 days ago #4 by fisharebest
Replied by fisharebest on topic The server’s temporary folder cannot be accessed.
Your screenshot shows that you can change the PHP configuration.

Either

1) change "sys_temp_dir" to be a folder that you can access. e.g. "/var/www/hostingname/data/tmp"
2) add ":/tmp/" to the setting for open_basedir
3) leave open_basedir empty.

Greg Roach - greg@subaqua.co.uk - @fisharebest@phpc.social - fisharebest.webtrees.net

Please Log in or Create an account to join the conversation.

  • vasiliy4
  • Topic Author
  • Offline
  • New Member
  • New Member
More
4 months 5 days ago - 4 months 5 days ago #5 by vasiliy4
unfortunately, this does not help ((
I wrote additionally to the technical support of my hoster.

Is there any way to force the location of a temporary directory inside webtrees files?

I also tried to do this: I paid for hosting from another provider and the same problem arose there..
Last edit: 4 months 5 days ago by vasiliy4.

Please Log in or Create an account to join the conversation.

  • vasiliy4
  • Topic Author
  • Offline
  • New Member
  • New Member
More
4 months 3 days ago #6 by vasiliy4
as a result, the support of my hosting provider was turned off by open_basedir and everything worked immediately.

Please Log in or Create an account to join the conversation.

More
3 weeks 14 hours ago - 3 weeks 14 hours ago #7 by Leo2

Your screenshot shows that you can change the PHP configuration.

Either

1) change "sys_temp_dir" to be a folder that you can access. e.g. "/var/www/hostingname/data/tmp"
2) add ":/tmp/" to the setting for open_basedir
3) leave open_basedir empty.

 
I am moving the site to another server, and I have same errors. Hosting provider doesn't allow to change open_basedir setting. Please advise in which file should I make changes according case 1)
I made changes in php.ini, but with no effect
Last edit: 3 weeks 14 hours ago by Leo2.

Please Log in or Create an account to join the conversation.

More
3 weeks 14 hours ago #8 by fisharebest
Replied by fisharebest on topic The server’s temporary folder cannot be accessed.
These are PHP configuration settings.

If you cannot change open_basedir, then I guess you cannot change sys_temp_dir.

They can be changed in many places, depending on your server configuration.

There is no simple answer to your question!

On a single-user machine (e.g. a virtual host), you could change php.ini

On a shared machine, you could add configuration to your php-fpm configuration. This is the config I have in mine:

[/code]
php_admin_value[open_basedir] = /home/fisharebest/
php_admin_value[upload_tmp_dir] = /home/fisharebest/tmp
php_admin_value[session.save_path] = /home/fisharebest/tmp
php_admin_value[sys_temp_dir] = /home/fisharebest/tmp
[/code]

Or you might be able to set them using .htaccess.

Maybe raise a ticket with your host?

Explain that in the PHP configuration, the setting for `sys_temp_dir` (and possibly also `upload_tmp_dir` and `session.save_path`) is incompatible with the setting for `open_basedir`

Greg Roach - greg@subaqua.co.uk - @fisharebest@phpc.social - fisharebest.webtrees.net

Please Log in or Create an account to join the conversation.

More
3 weeks 11 hours ago #9 by Leo2
Strange, because in the system info the parameter is correct. The provider doesn't understand what he should change.

 
Attachments:

Please Log in or Create an account to join the conversation.

More
3 weeks 11 hours ago #10 by fisharebest
Replied by fisharebest on topic The server’s temporary folder cannot be accessed.
And what value do you have for `sys_temp_dir`

Greg Roach - greg@subaqua.co.uk - @fisharebest@phpc.social - fisharebest.webtrees.net

Please Log in or Create an account to join the conversation.

More
2 weeks 5 days ago - 2 weeks 5 days ago #11 by Leo2

And what value do you have for `sys_temp_dir`



 
I have exacly same warning as topicstarter had
Code:
sys_get_temp_dir() = "/tmp/" ini_get("open_basedir") = "/var/www/user627063/data:."

I asked host provider to switch off open_basedir setting, but they refuse. They also refuse to make any changes in PHP  settings for my virtual hosting. 

My old provider had open_basedir off, and webtrees worked fine. 

What will not work if the temp directory is not accessible by PHP? Can I check that?
For file uploads they have special mod-tmp directory in my root folder (I guess it is  /var/www/user627063/data)

upload_tmp_dir        /var/www/user627063/data/mod-tmp
Attachments:
Last edit: 2 weeks 5 days ago by Leo2.

Please Log in or Create an account to join the conversation.

More
2 weeks 5 days ago #12 by fisharebest
Replied by fisharebest on topic The server’s temporary folder cannot be accessed.
> What will not work if the temp directory is not accessible by PHP? Can I check that?

Creating ZIP files or large GEDCOM files.

Greg Roach - greg@subaqua.co.uk - @fisharebest@phpc.social - fisharebest.webtrees.net

Please Log in or Create an account to join the conversation.

More
2 weeks 4 days ago #13 by Leo2
What webtrees operations can require zip creation? How can I check if it doesn't work?

Please Log in or Create an account to join the conversation.

More
2 weeks 4 days ago #14 by fisharebest
Replied by fisharebest on topic The server’s temporary folder cannot be accessed.

What webtrees operations can require zip creation? How can I check if it doesn't work?
 
Export/download a GEDCOM file.  Include media files.

Greg Roach - greg@subaqua.co.uk - @fisharebest@phpc.social - fisharebest.webtrees.net

Please Log in or Create an account to join the conversation.

More
2 weeks 4 days ago #15 by Leo2
Greg, is it possible to point PHP to certain temp directory at script level? 

For example, for WP they made the following settings in wp-config.php

define('WP_TEMP_DIR', dirname(__FILE__) . '/wp-content/temp/');
 

Please Log in or Create an account to join the conversation.

More
2 weeks 4 days ago #16 by Sir Peter
Make yourself familiar with www.php.net/manual/en/configuration.changes.modes.php and www.php.net/manual/en/ini.core.php and search for the 4 parameters Greg mentioned. You can probably set (some of) them in php.ini or .user.ini yourself where these files may have to be created in webtrees' root folder. Check the result of your settings in webtrees Control Panel > Server Information

Peter

Please Log in or Create an account to join the conversation.

More
2 weeks 4 days ago - 2 weeks 4 days ago #17 by Leo2
The problem is that they don't allow to change php.ini or httpd.conf
All settings to php are made through control panel (ISP Manager). The allowed settings are listed in screenshots attached
 
Attachments:
Last edit: 2 weeks 4 days ago by Leo2.

Please Log in or Create an account to join the conversation.

More
2 weeks 4 days ago #18 by Sir Peter
I didn't mention httpd.conf. There can be more than one php.ini file. You should create one in webtrees' root folder and see what happens. Some parameters can be overwritten, some not. If that doesn't work you should try to create a .user.ini file in webtrees' root folder and see what happens.

Peter

Please Log in or Create an account to join the conversation.

More
2 weeks 4 days ago - 2 weeks 4 days ago #19 by Leo2
I created .ini file with
Code:
php_admin_value[sys_temp_dir] = /var/www/user627063/data/tmp sys_temp_dir = "/var/www/user627063/data/tmp"
and named it php.ini, then .user.ini

But with no effect.
How to know that this file is applied by my PHP?

UPD. The hoster said that 'php configuration by a file is not supported. all settings must be made through control panel'.  Dead end...((
Last edit: 2 weeks 4 days ago by Leo2.

Please Log in or Create an account to join the conversation.

More
2 weeks 4 days ago #20 by fisharebest
Replied by fisharebest on topic The server’s temporary folder cannot be accessed.
> How to know that this file is applied by my PHP?

Control panel -> Server information

Greg Roach - greg@subaqua.co.uk - @fisharebest@phpc.social - fisharebest.webtrees.net

Please Log in or Create an account to join the conversation.

Powered by Kunena Forum
}