- This topic has 5 replies, 2 voices, and was last updated 5 years, 10 months ago by support-swapna.
-
AuthorPosts
-
raphiParticipantHi,
if I try to format PHP files I am always getting the error in the screenshot
“phpfmt: run phpfmt failed”In the Workspace settings I have the php.executablePath configured as followed:
D:/xampp/php/php.exeSometimes formatting works but mostly I get the error.
Can you help me with this problem?
Thanks!
RaphiAttachments:
You must be logged in to view attached files.
support-swapnaModeratorraphi,
Sorry that you are seeing this problem.
Can you please try adding this setting to the settings.json and see it if helps fix the problem with formatting? :
"phpfmt.php_bin": "D:/xampp/php/php.exe"
// it should point to the PHP executable.To open the settings.json, go to Window > Preferences > CodeMix > Settings > Workspace Settings and click on the link to open it in the editor. Add the above line to the settings section, just below the “php.suggest.basic” line, save it and see how it works.
Please let us know how you get on with it.
–Swapna
Genuitec Support
raphiParticipantHi Swapna,
I already have configured this setting in the codemix.code-workspace file.
It doesn’t work till now. I only have these two settings (in the picture attached) in the file. Do I have to configure something else there? I also tried to add the php.suggest.basic true but that did not help.
Attachments:
You must be logged in to view attached files.
support-swapnaModeratorraphi,
Sorry that you are still seeing problems.
1. Can you please clarify if you are working with PHP version > 5.6 ? Please share with us your PHP version details.
2. Do you see the formatting problem with all the PHP files or only specific files? Does your PHP files have HTML code in them as well?
3. Can you please check how the formatting works for a simple PHP file? I used the below sample code to check the PHP formatting at my end.
<?php namespace DoingThings; class ThingDoer { private $secret; public function doThings($somevar='') { if($somevar==''){ $somevar='not the other var'; } return $somevar; } }
–Swapna
Genuitec Support- This reply was modified 5 years, 10 months ago by support-swapna.
- This reply was modified 5 years, 10 months ago by support-swapna.
- This reply was modified 5 years, 10 months ago by support-swapna.
raphiParticipantHi Swapna,
I did a fresh reinstall with newest Eclipse IDE 2018-12 and reinstalled CodeMix also. Now it’s working. So you can close this thread.
Thanks!
support-swapnaModeratorraphi,
Glad that it works. Thank you for getting back to us.
Let us know if you see any other issues with CodeMix.–Swapna
Genuitec Support -
AuthorPosts