Jump to content

PHP Tools for Visual Studio does not recognize processwire

Marcel Stäheli

Recommended Posts

We recently got the Visual Studio 2017 plugin PHP Tools for Visual Studio by Devense for php development.

Unfortunately the plugin does not recognize processwire. I imported all website files into the PHP-Project so there is no file missing. But files are not being prepended, variables like $page are undefined. The plugin works fine with regular PHP code.

I'm not sure where the error lies. Do I have to configure PW specifically or are the two simply incompatible?

Has anybody experience with this plugin?

Link to comment
Share on other sites

  • 2 weeks later...

I found a solution.

In case someone else has this problem in the future: One has to explicitly use an apache server for it to work. Processwire requires "mod_rewrite" which is not present in php build-in and it seems neither it is with IIS-express. So in the "project settings->server" choose "custom" as server and enter the project url.

I used xampp to run the apache server and mysql database. Make sure xdebug is installed in the php-installation of xampp.

Now php tools reads all PW variables and functions properly, no need for page() (still good to know that it exists).

  • Like 2
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...