contao / contao-manager

Contao Manager
GNU Lesser General Public License v3.0
83 stars 33 forks source link

Use the tempdir from the web process #672

Closed ausi closed 2 years ago

ausi commented 2 years ago

Some hosters seem to have different TMPDIR settings on the CLI.

Could it be helpful to pass the correct directory manually to the php-process?

Like adding to https://github.com/contao/contao-manager/blob/d7d7e4102bfe1a83c4580c089414643f9ec1c688/api/Process/ConsoleProcessFactory.php#L238 the following line:

$defaultArgs[] = '-dsys_temp_dir='.@sys_get_temp_dir();

Just a wild guess ☺️

aschempp commented 2 years ago

what if the TMPDIR on CLI is intentionally set different and works correctly, but the CGI directory does not work on the CLI?

ausi commented 2 years ago

I think you’re right. We would have to use that “fix” only if the temp directory from CLI does not work actually.

This detection would probably be too much overhead only to fix some misconfigured hosts?

aschempp commented 2 years ago

I would think so too… also, if you really need to, you can create your own php.ini for the command line and correctly configure the temp-dir there 🤷