- Posts: 17
Question [SOLVED] 2.0.0-beta.3 - Server Warning
- JPS
- Topic Author
- Offline
- New Member
The server’s temporary folder cannot be accessed.
sys_get_temp_dir() = "/tmp"
ini_get("open_basedir") = "/var/www/vhosts/PATH/WEBTREESFOLDER/:/tmp/:/var/lib/php5/sessions:/var/www/vhosts/PATH/tmp"
However, it seems, that anything is doing well.
Is there anything what I can do in webtrees to avoid this warning? I have no direct access to the php.ini.
Please Log in or Create an account to join the conversation.
- fisharebest
- Offline
- Administrator
i am on holiday without my laptop so cannot help further until next week
Greg Roach - greg@subaqua.co.uk - @fisharebest@phpc.social - fisharebest.webtrees.net
Please Log in or Create an account to join the conversation.
- JPS
- Topic Author
- Offline
- New Member
- Posts: 17
Have a nice holiday!
Please Log in or Create an account to join the conversation.
- JPS
- Topic Author
- Offline
- New Member
- Posts: 17
JPS wrote: Thanks, that's a good approach. I'll give it a try and if I'm stuck, I'll get back to you.
Have a nice holiday!
Quick win!
This entry is working well...
Thanks for support and again, enjoy your vacation.
Please Log in or Create an account to join the conversation.
- JPS
- Topic Author
- Offline
- New Member
- Posts: 17
Please Log in or Create an account to join the conversation.
- jprause
- Offline
- Senior Member
The server’s temporary folder cannot be accessed.
sys_get_temp_dir() = "/tmp"
ini_get("open_basedir") = "/hosting/www/jprodina.cz/:/hosting/public/:/tmp/:/hosting/session/jprodina.cz/"
May I ask for more detailed way of solution, please?
Josef
webhosting:-- webtrees 2.1.18, PHP version 8.1.16, MySQL 8.0.22, test site webtrees 2.1.18
local desktop:-- webtrees 2.1.18, PHP version 8.2.12, MySQL 8.0.28, Apache2 2.4.41, Linux Ubuntu 22.04 64bit
Please Log in or Create an account to join the conversation.
- JPS
- Topic Author
- Offline
- New Member
- Posts: 17
jprause wrote: I have the same issue like JPS:
The server’s temporary folder cannot be accessed.
sys_get_temp_dir() = "/tmp"
ini_get("open_basedir") = "/hosting/www/jprodina.cz/:/hosting/public/:/tmp/:/hosting/session/jprodina.cz/"
May I ask for more detailed way of solution, please?
Hello Josef,
the problem is probably, that your temp-folder is write protected by your hoster.
My solution was to use the demo module "example-server-configuration.disable". I first renamed it to "server-configuration" and activated it. Then I added an individualual "webtreestemp" folder in the root directory which is writable and changed the module.php as shown above. Your entry has to be your individual direct path to the "webtreestemp" folder.
However, I recognized the following problems:
1. When I add this...
...I get this errorcode:
With this...
...the above error and the message "The server’s temporary folder cannot be accessed." are disappeared.
However, when I use the "Place hierarchy" and select a location with 635 individuals I get this error...
When I deactivate the "Server configuration" module, I get the message "The server’s temporary folder cannot be accessed." again but everything is working fine.
So I am not sure if I could really solve this problem. My present solution is to let the module deactivated.
Jens
Please Log in or Create an account to join the conversation.
- fisharebest
- Offline
- Administrator
Perhaps you specified a path with lots of subfolders?
The command mkdir('a/b/c') will only work if the folder 'a/b' already exists.
Perhaps you chose a folder where you do not have write permission?
The command mkdir('a/b/c') will only work if the folder 'a/b' has write permission.
> However, when I use the "Place hierarchy" and select a location with 635 individuals I get this error...
webtrees is asking PHP for some temporary storage.
When a small amount of storage is needed, PHP uses memory.
When a large amount of storage is needed, PHP uses a file - in the "sys_temp_dir" folder.
If you can set a temporary folder, then this error should disappear.
Greg Roach - greg@subaqua.co.uk - @fisharebest@phpc.social - fisharebest.webtrees.net
Please Log in or Create an account to join the conversation.
- JPS
- Topic Author
- Offline
- New Member
- Posts: 17
fisharebest wrote: > 1. When I add this...
Perhaps you specified a path with lots of subfolders?
The command mkdir('a/b/c') will only work if the folder 'a/b' already exists.
Perhaps you chose a folder where you do not have write permission?
The command mkdir('a/b/c') will only work if the folder 'a/b' has write permission.
Mmmh, I don't think so, this is my present tmp folder (in root)...
The permissions are set to 0777.
Please Log in or Create an account to join the conversation.
- JPS
- Topic Author
- Offline
- New Member
- Posts: 17
fisharebest wrote: >
> However, when I use the "Place hierarchy" and select a location with 635 individuals I get this error...
webtrees is asking PHP for some temporary storage.
When a small amount of storage is needed, PHP uses memory.
When a large amount of storage is needed, PHP uses a file - in the "sys_temp_dir" folder.
If you can set a temporary folder, then this error should disappear.
So I think I have no problems without the tmp folder because my hosting is quite powerfull:
Guaranteed usable RAM: 8192 MB
PHP Memory Limit: 1024 MB
PHP Upload Filesize: 256 MB
PHP Execution Time: 180 s
Please Log in or Create an account to join the conversation.
- fisharebest
- Offline
- Administrator
Instead of the root folder, try a subfolder inside the webtrees data folder?
Greg Roach - greg@subaqua.co.uk - @fisharebest@phpc.social - fisharebest.webtrees.net
Please Log in or Create an account to join the conversation.
- fisharebest
- Offline
- Administrator
This size/power of the server makes no difference.
The problem is the configuration.
Greg Roach - greg@subaqua.co.uk - @fisharebest@phpc.social - fisharebest.webtrees.net
Please Log in or Create an account to join the conversation.
- JPS
- Topic Author
- Offline
- New Member
- Posts: 17
fisharebest wrote: > Mmmh, I don't think so, this is my present tmp folder (in root)...
Instead of the root folder, try a subfolder inside the webtrees data folder?
exactly the same behavior
Please Log in or Create an account to join the conversation.
- fisharebest
- Offline
- Administrator
But your server did specify a folder (/tmp) in the php.ini.
Are you allowed to use .htaccess files to modify your server configuration?
If so, then you can use this to set the sys_temp_dir.
If not, then I can't think of a solution to fix this.
Perhaps you need to raise a support ticket with your webhost.
Say that the settings for sys_temp_dir and open_basedir are incompatible.
Greg Roach - greg@subaqua.co.uk - @fisharebest@phpc.social - fisharebest.webtrees.net
Please Log in or Create an account to join the conversation.
- JPS
- Topic Author
- Offline
- New Member
- Posts: 17
fisharebest wrote: Perhaps you need to raise a support ticket with your webhost.
Thanks so far, I will check this with my hoster and come back.
Good night
Jens
Please Log in or Create an account to join the conversation.
- jprause
- Offline
- Senior Member
At least the warning "The server’s temporary folder cannot be accessed..." at Control Panel disappeared.
Thank you Jens & Greg.
Josef
webhosting:-- webtrees 2.1.18, PHP version 8.1.16, MySQL 8.0.22, test site webtrees 2.1.18
local desktop:-- webtrees 2.1.18, PHP version 8.2.12, MySQL 8.0.28, Apache2 2.4.41, Linux Ubuntu 22.04 64bit
Please Log in or Create an account to join the conversation.
- jprause
- Offline
- Senior Member
Though as I said the mentioned system warning disappeared from Control Panel, but now all media are seen as red coloured box with 500 in it.
The website error log shows
"error Cannot create thumbnail tempnam(): file created in the system's temporary directory".
Any idea please?
Josef
webhosting:-- webtrees 2.1.18, PHP version 8.1.16, MySQL 8.0.22, test site webtrees 2.1.18
local desktop:-- webtrees 2.1.18, PHP version 8.2.12, MySQL 8.0.28, Apache2 2.4.41, Linux Ubuntu 22.04 64bit
Please Log in or Create an account to join the conversation.
- JPS
- Topic Author
- Offline
- New Member
- Posts: 17
JPS wrote: Thanks so far, I will check this with my hoster and come back.
So, this is, what my hoster says...
Please note that you only have the choice of 2 directories where you can apply open_basedir. These can be adjusted in your webhosting control panel under the -> PHP settings of the affected domain.
Please check the settings stored there and then try again.
What I can chose is this...
DOCROOT is my webtrees folder, WEBSPACEROOT my standard folder (root/httpdocs), which is unused...
I checked several setups with own temp-folders in the httpdocs-folder and the webtrees-folder. I also tryed to use the httpdocs-folder and the webtrees-folder without subfolders and again to use the root/tmp.
All setups show the same behavior als schown above.
Here are the other php-setup patameters...
Any further idea?
Please Log in or Create an account to join the conversation.
- JPS
- Topic Author
- Offline
- New Member
- Posts: 17
jprause wrote: but now all media are seen as red coloured box with 500 in it.
The website error log shows
"error Cannot create thumbnail tempnam(): file created in the system's temporary directory".
I think your problem has a similar cause as my problem..
Please Log in or Create an account to join the conversation.
- jprause
- Offline
- Senior Member
private function checkSystemTemporaryFolder(): string {
sys_get_temp_dir() = "/tmp"
open_basedir contains "/tmp/" among others
The following hotfix solves the issue:
Greg, can you comment?
Thanks, Josef
Josef
webhosting:-- webtrees 2.1.18, PHP version 8.1.16, MySQL 8.0.22, test site webtrees 2.1.18
local desktop:-- webtrees 2.1.18, PHP version 8.2.12, MySQL 8.0.28, Apache2 2.4.41, Linux Ubuntu 22.04 64bit
Please Log in or Create an account to join the conversation.