Solved

Adaptive Image Issue

Posted on 2013-05-24
2
516 Views
Last Modified: 2013-05-26
I'm testing an adaptive image solution which redirects image requests to a PHP file, and serves an image size which is appropriate to the user's browser width.  I'm testing this with Wampserver, and having some challenges.  If the system is working correctly, a folder in the server root directory, called ai-cache, should accumulate some images as server requests are made.  The contents of that folder remain empty.  If you can assist in troubleshooting this, please do.

Wampserver uses Apache 2.2.21 and PHP 5.3.8 with the extension GD2 enabled.
The web page with images, which I am loading in my virtual server, has the following code in the <HEAD> section:
<script type="text/javascript">document.cookie='resolution='+Math.max(screen.width,screen.height)+("devicePixelRatio" in window ? ","+devicePixelRatio : ",1")+'; path=/';</script>

I'm attaching the php file and a text file with contents of the .htaccess, which both reside in the server root directory, along with a writeable folder called ai-cache.

adaptive-images.phphtaccess-text.txt
0
Comment
Question by:ddantes
2 Comments
 
LVL 15

Accepted Solution

by:
Jagadishwor Dulal earned 500 total points
ID: 39196248
0
 

Author Comment

by:ddantes
ID: 39196739
Thank you.
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Build an array called $myWeek which will hold the array elements Today, Yesterday and then builds up the rest of the week by the name of the day going back 1 week.   (CODE) (CODE) Then you just need to pass your date to the function. If i…
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)

867 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now