Page 1 of 1

Processwire CMS variables are not being recognized

PostPosted: June 14th, 2018, 9:31 am
by Javon
Hello

I'm developing a website using the CMS Processwire (https://processwire.com/). PHP Tools is propely installed an configurated, I can add hold-points in simple php sites.

But it does not recognize any of the processwire own variables.
I imported all website files into my PHP-Project, there is nothing missing. I'm not sure if I have to do some additional configuration.

Can anybody help me?

The Notices/Errors:
- Notice: Undefined variable: page in C:\xampp\htdocs\gs-neu01\site\templates\home.php on line 26

- ( ! ) Fatal error: Uncaught Error: Call to a member function get() on null in C:\xampp\htdocs\gs-neu01\site\templates\home.php on line 40

Re: Processwire CMS variables are not being recognized

PostPosted: June 21st, 2018, 8:47 am
by Miloslav Beno
Hello,

That just seems the project is incorrectly configured. I imagine if you have all the files included in the project you can see all the intellisense, but when you run it PHP throws exceptions you've provided.

I don't know the processwire, but I would check their guide how to configure it https://webdesign.tutsplus.com/tutorials/how-to-install-and-setup-processwire-cms--cms-25509. The best bet will be to use Apache as they do in the tutorial.

Then when everything is setup on the server side, you would go to php tools, Project properties ( right click on the project node in Solution explorer), Server tab and select Custom. You will need to fill the url of the project - that should work.

By default php tools tries to run it with just php build-in server and just by looking at the beggining of the tutorial processwire requires mod_rewrite which is not present in php build-in server.

Please let me know how if that helped.

Thanks!

Re: Processwire CMS variables are not being recognized

PostPosted: June 25th, 2018, 9:10 am
by Javon
Hello Miroslav

Thank your for your reply, it is working now. I switched the Web Server to "custom" instead of "IIS Express" which I used before.

Re: Processwire CMS variables are not being recognized

PostPosted: June 26th, 2018, 7:55 am
by Miloslav Beno
Great! I'm glad it's working!