EXEC Problem in Compiled App

The following code works fine while not compiled but when compiled it doesn’t work. No error.
exec(’“C:\Users\pc\Documents\Image Folder\convert.exe” -strip “C:\Users\pc\Documents\Image Folder\image.jpg” -resize 600 “C:\Users\pc\Documents\Image Folder\image-resized.jpg”’);

It seems to be because of the spaces in the path for convert.exe as the following works fine when compiled.
exec(’“C:\Users\pc\Documents\ImageFolder\convert.exe” -strip “C:\Users\pc\Documents\ImageFolder\image.jpg” -resize 600 “C:\Users\pc\Documents\ImageFolder\image-resized.jpg”’);

Can you tell me please if you have any fix for this ?

I am not able to access my records (on trip), but seems I ran into this year or so ago. Seems I solved with double “”. Maybe try:

exec('""C:\Users\pc\Documents\Image Folder\convert.exe"" -strip ""C:\Users\pc\Documents\Image Folder\image.jpg"" -resize 600 ""C:\Users\pc\Documents\Image Folder\image-resized.jpg""');

Thanks but it doesn’t seem to work for me.

Try this solution:

Thanks but I already had seen that thread. Seems to ignore the file convert.exe when in quotes.

We’ll try to find out why spaces don’t work for you. Which version of PHP are you using in your project?

Using PHP version 7.2.

Could you test with a lower PHP version?