-
-
Notifications
You must be signed in to change notification settings - Fork 5
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
Unnecessary double quotes added to PHP binary path #7
Comments
Hi @jamesBFS , Thank you for your feedback. If the path to the PHP binary contains a space, you need to use the double quote to preserve the path. Otherwise, you need to use the short folder name (MS-DOS format). If your path doesn't have any space, the double quote has no effect. Have you a side effect cased by the double quote? |
Thank you for the prompt response.
There are double quotes added somewhere else (maybe by Windows as the
service is created), so the quotes I referenced then create double double
quotes at each end of the path. The service is created without error, but
fails to start, because it looks like two empty attributes are set, with
the correct path in between these. ie (""C:\Progam Files\PHP\php-win.exe"")
My thought is that maybe different versions of Windows handle this service
creation differently, with some that add the double quotes automatically,
and others that expect you to handle it yourself, but I only have Windows
Server 2016 to test on.
James Cecil
*Billericay Fertiliser Services Ltd*
*More than 70 years of superior service*
*T* 01245 325849
*E* ***@***.***
*W* www.bfsfertiliserservices.uk <http://www.bfs.uk.com/>
Ilgars Fertiliser Works, Willow Grove, Woodham Ferrers, Essex CM3 8RD
Registered in England number 06911560
…On Tue, 25 Oct 2022 at 14:42, Jean-Baptiste Nahan ***@***.***> wrote:
Hi @jamesBFS <https://github.com/jamesBFS> ,
Thank you for your feedback.
If the path to the PHP binary contains a space, you need to use the double
quote to preserve the path. Otherwise, you need to use the short folder
name (MS-DOS format).
If your path doesn't have any space, the double quote has no effect.
Have you a side effect cased by the double quote?
—
Reply to this email directly, view it on GitHub
<#7 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/A3Z7FPPXCD3QWSVQIM2WR73WE7PTNANCNFSM6AAAAAARN62NRM>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Can you provide this information, please:
|
The php to register the service is dependent on level-2\dice dependency injection container version 4.0.3 downloaded using composer. It may be that the problem I am experiencing is created by this, but I can't see where if that is the case. From the command line, "php plugins.php PrintServiceInstall" is the installation command. Versions of plugins.php, DiceConfigure.php and config.php are attached (with irrelevant code removed) PHP Installation Path "C:\Program Files\PHP\v8.1.11" I did have a similar issue prior to upgrading PHP versions:- |
Hi, When I run your code, I have this error:
|
I can reproduce the problem. During the service registration, the path is automatically protected by a double quote if contains space. I write a fix quickly |
Thank you very much for both the fix and for the project as a whole. |
In lib\Model\ServiceInformations.php, line 48, I don't think that the surrounding double quotes to the php binary path are necessary.
When I have installed the service on Windows Server 2016, I have manually removed the quotes to leave line 48 as follows:-
$this->datas[WIN32_INFO_PATH] = dirname(PHP_BINARY).'\php-win.exe';
I suggest this change to the code, but this is my first exploration into contributing on github, so please let me know if I should have submitted this in a different way.
The text was updated successfully, but these errors were encountered: