Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error proc_open #17

Open
pmithrandir opened this issue Aug 22, 2014 · 3 comments
Open

error proc_open #17

pmithrandir opened this issue Aug 22, 2014 · 3 comments

Comments

@pmithrandir
Copy link

Hello,

I'm getting the following error when I try to read the file.
It seems that it cannot create a new process.
Do you have any idea why ?

Why to not use a simple exec call ? what's the gain of proc_open ?

Warning: proc_open(): CreateProcess failed, error code - 2 in C:\My Program Files\xampp\htdocs\exif\vendor\symfony\symfony\src\Symfony\Component\Process\Process.php line 280 

Best regards,
Thank you.

@pmithrandir
Copy link
Author

Hello.

I managed to correct this issue.
I'm working from windows.

I changed the ExifTool function this way :

public function executeCommand($command)
    {
        $command = "\"".self::getBinary() . '" ' . $command;
        $process = new Process($command);
        $options = $process->getOptions();
        $options['bypass_shell'] = false;
        $process->setOptions($options);
        $this->logger->addInfo(sprintf('Exiftool executes command %s', $process->getCommandLine()));

I resolved 2 bugs this way :

  • the directory containing spaces are now working. (thanks to the double quote in the $command var)
    • the proc_open works with the option bypass_shell false

There might be better way to solve it, and I don't know still how it will react on linux server, but that's the first feedback I have.

Best regards,
Pierre

@romainneutron
Copy link
Owner

Thanks for feedback. What version of windows are you using?

@pmithrandir
Copy link
Author

I'm on windows 7.
Using xampp

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants