PHP error in Atom editor

Asked

Viewed 147 times

0

I am trying the Atom editor for indications, I installed the essential packages but it is giving error when I type PHP code. What can I do to solve this problem?

inserir a descrição da imagem aqui

  • I never managed to use Atom, it was heavy and gave errors, now I use netbeans is heavy but it works

  • Install the package atom-autocomplete-php you probably installed the package autocomplete-php without the Atom in front

  • 1

    Another thing, you installed the php? Which one are you wearing?

1 answer

0

This means that the environment variables do not have the php path, to add first locate the folder where PHP is, assuming it is c:\php\php.exe copy only the c:\php, now do the following

  • Right-click the mouse/mouse on My Computer and Estates
  • In the left side menu click on Advanced system settings
  • Look for a button called Environment variables, click on it
  • Look for the variable PATH and double click, should return something similar to this:

    C: Users Inphinit Appdata Roaming Composer vendor binC: Users Inphinit Appdata Roaming npm;C: Users Inphinit Appdata Local Github Portablegit_f02737a78695063deace08e96d5042710d3e32db cmd;C: Program Files LLVM bin

Then at the end add ;C:\php;, thus:

C: Users Inphinit Appdata Roaming Composer vendor binC: Users Inphinit Appdata Roaming npm;C: Users Inphinit Appdata Local Github Portablegit_f02737a78695063deace08e96d5042710d3e32db cmd;C: Program Files LLVM bin;C: php;

Press OK on both windows until everything closes, then log out on Windows and then PHP will be available globally.

  • How I should do in Ubuntu?

  • Caro @Tiago depends on how you installed PHP, because if you installed via APT-GET should be available on the command line ($PATH) alone, the APT itself does this, now if installed Xampp or some other ai is different, could you tell what you use there? Do it like this, go to the terminal and just type php -v and tell me if he informed the PHP version, if he informed it is because PHP is ok

Browser other questions tagged

You are not signed in. Login or sign up in order to post.