Question

PHP require not working

I have installed my droplet (ubuntu 18.04) both manually but also tried the one-click apps. Both times the PHP variables are “undefined” but they are defined in another file. I used the following code to include them: require ‘/var/www/developer/steamauth/userInfo.php’;

This works on my other server (Linus @ ExtraVM) so I don’t understand why this doesn’t work. Am I missing any PHP packages?

PLEASE HELP!


Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

This comment has been deleted

Hi @PixelBoii,

I’ll recommend checking the following article - Ubuntu PHP - How to

It will help you properly install PHP and every packages needed on an Ubuntu.

I’m unsure what you mean by PHP variables not working with require though. Can you please give a little bit more information on the matter?