Results 1 to 3 of 3

Thread: php: cache files on a remote server ?

  1. #1
    Registered tomek's Avatar
    Join Date
    Jun 2004
    Posts
    102

    Unhappy php: cache files on a remote server ?

    Hi!

    If I have 2 servers (A and B) - is it possible to run a script on server A which reads/writes cache files from/to server B?

    so server B would be my "cache-server"...

    does anyone know a class that can do this?

    up until now I used cacheLite and had the cache on the same server as the script...

    It would be perfect if I could make cacheLite work the way I want. Actually I think it should be possible. Cache Lite uses the "opendir" function.

    the documentation says:

    As of PHP 4.3.0 path can also be any URL which supports directory listing, however only the file:// URL wrapper supports this in PHP 4.3.

    do I specifiy the path like that?
    $cachDir = 'file://www.domain.com/dircetory';

    my tests don't work...

    any Input would be great!

  2. #2
    You can't write files to another server. You would have to do this another way. I would suggest an FTP method. PHP has FTP functionality built in.

  3. #3
    Administrator Chris's Avatar
    Join Date
    Feb 2003
    Location
    East Lansing, MI USA
    Posts
    7,048
    You can write to a remote MySQL server as well, that'd be another method.

    Although really, the speed benefits from caching will likely be erased by moving the cache to another server.
    Chris Beasley - My Guide to Building a Successful Website[size=1]
    Content Sites: ABCDFGHIJKLMNOP|Forums: ABCD EF|Ecommerce: Swords Knives

Similar Threads

  1. Review: Professional PHP Programming
    By Chris in forum Books
    Replies: 6
    Last Post: 07-17-2013, 05:26 AM
  2. PHP: Rotating files - no duplicates
    By mobilebadboy in forum Website Programming & Databases
    Replies: 3
    Last Post: 07-05-2004, 12:38 PM
  3. Replies: 2
    Last Post: 02-06-2004, 10:47 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •