andy's php projects
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
Script and site usage:
All of the scripts on this site are provided free for non-commerical, personal or non-profit use. If you find these scripts useful to you, appreciate the free support, or are just an all round nice person, then why not donate a little dosh? If you wish to use any of these in a commercial system, please refer to the payment plan.


Cache problems Fixed!!

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    php.amnuts.com Forum Index -> CafePress Box
View previous topic :: View next topic  
Author Message
maxx
Newbie


Joined: 25 Nov 2005
Posts: 2

PostPosted: Fri Nov 25, 2005 8:36 pm    Post subject: Cache problems Fixed!! Reply with quote

Before I explain my difficulties let me just say that your script is awesome!! It's exactly what I was looking for...

I was able to install and successfully test the class on windows (testing server: Apache, PHP, MySQL) no problem. Setup caching and everything worked just fine, both images and the cache.my_store_id file are there where they are supposed to be.

Uploaded everything to the production linux server (Apache, PHP, mySQL) and everything displayed correctly. Thing is I didn't get any cached images, just the cache.my_store_id file. I looked for the obvious culprits when moving things between windows and *nix (case sensitivity, directory locations, permissions, etc.) but nothing appears to be out of order. I even enabled logging on the production server in the hopes that I would catch some strange PHP error. Nothing appears to be out of order.

I'm not so much looking for a specific fix as much as I am ideas about what to try next. Versions of Apache , PHP and mySQL are similar (give or take a "dot" release) on each of the servers. I think the directory location specified in the template I'm using in production is correct since I get the designated cache file, just not the images (although the product listing within the cache file correctly lists the items and they do display correctly on the page).

I'm currently running on a linux developer package at 1and1.com (pretty much unrestricted access to most things server related) and haven't encountered a problem yet running PHP.

Any ideas about what I could run down in the next bout of troubleshooting?

Thanks!!

The host required that I provide a local php.ini file to change php properties on their server (access to the master was blocked). The property in question that concerned caching was
Code:
allow_url_fopen
. It was turned off by default, creating a php.ini file in the directory that contained the class file and setting that value to "On" was all that was required.

Last edited by maxx on Sat Nov 26, 2005 2:08 pm; edited 1 time in total
Back to top
View user's profile Send private message
maxx
Newbie


Joined: 25 Nov 2005
Posts: 2

PostPosted: Sat Nov 26, 2005 1:32 pm    Post subject: Update Reply with quote

I believe I've found my culprit (the following entry in my web site root level .htaccess file on the production server):
Code:
AddType x-mapp-php5 .php


This entry is required on my hosting server in order to use PHP5. The Apache default is PHP4. Removing the entry above correctly caches images as expected. Leaving the entry in the .htaccess file prevents images from caching. I don't necessarily know a good workaround but at least I know what is causing the problem.

Just thought I'd post an update in case anyone else experiences this along the way...

Again, great script... Thanks!!
Back to top
View user's profile Send private message
amnuts
Site Admin


Joined: 01 Sep 2002
Posts: 662
Location: East Sussex, England

PostPosted: Mon Nov 28, 2005 3:54 am    Post subject: Reply with quote

Great to know, thanks!

None of the scripts here have been tested with PHP5 at all, so I'm not surprised if there are some issues when trying to run them under version 5! One day (hopefully) I'll get around to installing PHP5.1 and test out all the scripts and make them as compatible as possible.

Andy
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    php.amnuts.com Forum Index -> CafePress Box All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group