PHP Developers Network

A community of PHP developers offering assistance, advice, discussion, and friendship.
 
Loading
It is currently Mon Oct 14, 2019 8:57 pm

All times are UTC - 5 hours




Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: Thu Mar 11, 2010 3:57 am 
Offline
Forum Regular
User avatar

Joined: Wed Jan 16, 2008 10:04 am
Posts: 633
Location: Myrtle Beach, South Carolina, USA
Aaaah!!! I give up!!!

After hours of working at this and not getting very far, I need to use Squid3 on Ubuntu (I'm on 8.04.4) such that requests to example.com from PHP (and Curl) get routed through a transparent Squid proxy in caching mode to cache requests for 1 day, but all other requests pass right on through.

I managed to get my iptables such that it routes into Squid3, but then it goes into pass-through mode and doesn't cache anything. I know this because I tried to cache volomike.com domain requests, and then tested with:

$ squid3client -t http://volomike.com/

If caching is setup properly, then you'll get one MISS on the first attempt, and then HIT responses on every time after that. But instead, all I received were MISS responses.

And why do I need to do this? Well, I'm mired down in another project, but a separate project that uses Curl requests against example.com is having trouble. The programmer that built that code was fired, and it's spaghetti code. Instead of me fixing the Curl in the PHP to do caching, I simply want a quick-fix solution with Squid3 where we route requests through it.


Top
 Profile  
 
PostPosted: Thu Mar 11, 2010 8:50 am 
Offline
DevNet Master
User avatar

Joined: Wed Jun 27, 2007 9:44 am
Posts: 4313
Location: Sofia, Bulgaria
Can you describe your setup and network configuration/topology in more details?

Also post your squid config files and iptables rules.

_________________
There are 10 types of people in this world, those who understand binary and those who don't


Top
 Profile  
 
PostPosted: Sat Mar 13, 2010 9:45 pm 
Offline
Forum Regular
User avatar

Joined: Wed Jan 16, 2008 10:04 am
Posts: 633
Location: Myrtle Beach, South Carolina, USA
Sorry, but I was told by the client (because of time issues) to park it on this and let the sysop try some options out for now, and got redirected to another "fire" for now (another project). But that fire will be out soon and I'll be back to see what the sysop has figured out. More than likely he will be just as stuck as I was and then I can get that info to you. So, for about a week, the Squid project is on hold.

I'll touch base again then.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 3 guests


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 post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group