Giter VIP home page Giter VIP logo

Comments (1)

MattWilcox avatar MattWilcox commented on June 3, 2024

OK, the firs thing to check is that your .htaccess is working correctly. Make sure you've got a test.jpg file in the same folder that your .htaccess file is. Open up the .htaccess file and replace

RewriteRule .(?:jpe?g|gif|png)$ adaptive-images.php

with

RewriteRule .(?:jpe?g|gif|png)$ test.jpg

If your htaccess is working then every single image on your site will become the test.jpg image. If not, then there's something wrong with your htaccess file or Apache configuration.

Assuming that it works, change it back and then go into the PHP. At the top of the PHP file (but inside the PHP tags) write the line:

sendErrorImage("there is a problem");

Reload your page - all images should now be replaced with a black image that contains the error message "there is a problem". If that doesn't happen, then either you've not got the files in the right place and so the htaccess file is pointing at a non-existent file, or PHP isn't working properly.

If that did work and you got a black error image, then it's a case of using that to debug your server and find out where in the code things are breaking.

from adaptive-images.

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.