facebook

phpfmt: run phpfmt failed

  1. CodeMix & Angular IDE
  2.  > 
  3. Getting Help
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #608022 Reply

    raphi
    Participant

    Hi,

    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.exe

    Sometimes formatting works but mostly I get the error.

    Can you help me with this problem?

    Thanks!
    Raphi

    Attachments:
    You must be logged in to view attached files.
    #608032 Reply

    support-swapna
    Moderator

    raphi,

    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

    #608088 Reply

    raphi
    Participant

    Hi 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.
    #608092 Reply

    support-swapna
    Moderator

    raphi,

    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

    #608098 Reply

    raphi
    Participant

    Hi 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!

    #608103 Reply

    support-swapna
    Moderator

    raphi,

    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

Viewing 6 posts - 1 through 6 (of 6 total)
Reply To: phpfmt: run phpfmt failed

This topic is marked as closed to new replies, however your posting capabilities still allow you to do so.

You must be logged in to post in the forum log in