Jump to content
Larry Ullman's Book Forums

Where To Store Php Files?


Recommended Posts

I am using PHP for the first time, and will be teaching it soon.
I am confused about where to store the PHP files.
 

Our I.T. dept set up Ubuntu 16, with Apache 2.4, and PHP 7.0

I can run the existing info.php from the var/www/html folder and see results using

  URL    http:// IPaddress /info.php

I can make html files and store them in ~username/public_html and see results using

  URL     http:// IPaddress /~username/whatever.html

But where do I (and eventually my students) store our PHP files?

They show as not found if I put them in the public_html folder.

And copying new files to the var/www/html folder gives a denied access error.

Do I need to get permissions changed so that I (and students) can store to var/www/html?

If so, how do I set it up so student A can't see (copy) student B's files?

Thanks, Steve

 

 

 

Link to comment
Share on other sites

The short answer is you'll probably want to talk to your IT dept to have them set something up. If it were me teaching, I'd create an account for each student with permissions on a specific subdirectory: /var/www/html/username. Then students would be set up to only FTP to their folder. Your IT dept should be able to help with the permissions, too. 

 

Good luck with the class!

Link to comment
Share on other sites

 Share

×
×
  • Create New...