Code Monkey home page Code Monkey logo

Comments (3)

xenocrat avatar xenocrat commented on August 16, 2024

The .htaccess is not shipped because we need to set RewriteBase to the install location, which might not be the web root (so we can't just assume "/").

I think the nested conditionals are confusing PHP because the lack of closures makes the program structure ambiguous. On install the .htaccess is written because it doesn't yet exist, and because the write doesn't fail and trigger an error message, the code flows straight into the else append statement below. I'll add some closures to sort it out.

Thanks for the report.

from chyrp-lite.

 avatar commented on August 16, 2024

It covers more installation scenarios without user interaction, but clutters the installation code and makes it difficult to ship a hardened and/or cache-optimized .htaccess.

You could leave the RewriteBase line commented out with instructions in the file and here. For user convenience, there could be a placeholder in the shipped .htaccess (like {{%dir}}), which gets replaced during the installation, so that the RewriteBase part looks ~like

Shipped

# Uncomment the next line if chyrp-lite was not installed in the web root
# RewriteBase {{%dir}}

After installing

# Uncomment the next line if chyrp-lite was not installed in the web root
# RewriteBase /path/to/chyrp

Or just skip the commenting and simply replace the placeholder.

from chyrp-lite.

xenocrat avatar xenocrat commented on August 16, 2024

That's a fair point. I don't want to make the user take manual steps, but I can shift the rewrite stuff into an external file with a placeholder and write/append to .htaccess on install. That will allow for the external source to be modified for cache-optimization etc.

I need to give some thought to how this affects the repair function in upgrade.php, and if that even makes sense any more.

from chyrp-lite.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.