Closed Rarst closed 10 years ago
i'd like to understand what env variables Windows + dot need to be forwarded rather than being less restrictive with security (for everyone...) and forwarding everything.
also, so we may take your code contributions, please sign the contributor agreement at https://code.facebook.com/cla
i'd like to understand what env variables Windows + dot need to be forwarded
This is (not too helpful) error I am getting verbatim, when emptying the passed context:
failed to execute cmd: " dot -Tpng". stderr: `"dot" �� ���� ����७��� ��� ���譥�
��������, �ᯮ��塞�� �ணࠬ��� ��� ������ 䠩���.
'
From some tinkering it seems providing PATH is sufficient, not sure however how it works for Linux side:
$process = proc_open( $cmd, $descriptorspec, $pipes, sys_get_temp_dir(), array( 'PATH' => getenv( 'PATH' ) ) );
please sign the contributor agreement
Done.
ok, the current value is no env vars and i don't see any harm in propagating PATH to dot.
please update your pull request to include PATH and i'll merge it.
thank you for your contribution
Not tested on Linux, just got it working on Windows with some trial and error.
/tmp
withsys_get_temp_dir()
, there is some usual lively discussion in PHP docs, might or might not be reliable func to use.array()
for environment argument is different from defaultnull
and makes it fail to recognizedot
command on Windows. I am not sure if passing it served some purpose or just unnecessary leftover.