nasa / sitepod

A Sitemap Generator written in PHP
GNU General Public License v3.0
24 stars 16 forks source link

ISSUE-29 - Use fatfree templates #30

Closed sigee closed 7 years ago

sigee commented 7 years ago

29

lewismc commented 7 years ago

This looks MUCH cleaner. I've not tested it out yet, but once I do I'll provide feedback. Thanks @sigee .

lewismc commented 7 years ago

@sigee when attempting to run this PR I get the following. I checked for permissions and also grep for mkdir but can't see anything I am doing wrong. Can you please check? Thank you

screen shot 2017-06-27 at 4 06 59 pm

sigee commented 7 years ago

@lewismc, Before I run the script: image After the first run: image So the templating system needs write acces to create a tmp directory with some php files. It is not my changes It is how the templating works. So apache should have write access in your root folder to be able to make the tmp directory I guess.

lewismc commented 7 years ago

OK great yes you are correct. I have checked out the code and it works very well :+1:

Is it worth us including a new ./tmp directory with some permissive permissions? I am concerned about making anything executable however writable may be permitted... what do you think?

sigee commented 7 years ago

@lewismc, I understand what you mean, but this ./tmp directory isn't contains any user imput inside the files (Only trough variables). It is generated only from the templates/.html files. This is as risky as the settings/.php files, not more.

lewismc commented 7 years ago

So do you suggest that we add a ./tmp directory with a .gitignore or something there such that it is included within the source, we then make the directory writable?

sigee commented 7 years ago

@lewismc, Yes. That is a generated directory with generated files. Shouldn't add it to the git (I added it to .gitignore). BTW: Write access needed. Here is a huge templating library called Twig and installed by 34 032 519 projects, where you can set the cache directory. This is the same here, but I haven't found any similar settings in fatfree yet.

lewismc commented 7 years ago

Hi @sigee we should augment the installation instructions if it is required to manually create the ./tmp subdirectory in local sitepod directory.

sigee commented 7 years ago

@lewismc, The script creates the tmp directory when it has rights. You dont't need to create the directory maually.

lewismc commented 7 years ago

Can you please edit the installation instructions then to accommodate that? Thanks

sigee commented 7 years ago

@lewismc, I've updated the wiki page.