osCmax v2.5 User Manual
Results 1 to 3 of 3

clear_cache();

This is a discussion on clear_cache(); within the osCommerce 2.2 Modification Help forums, part of the osCommerce 2.2 Forums category; I am using a modified login page. if i login and go back and try to login again i get ...

      
  1. #1
    New Member
    Join Date
    Sep 2003
    Posts
    8
    Rep Power
    0


    Default clear_cache();

    I am using a modified login page. if i login and go back and try to login again i get a error

    Warning: Cannot modify header information - headers already sent by (output started at /home/ripitups/public_html/Dealer/includes/languages/english.php:324) in /home/ripitups/public_html/Dealer/loginDealer.php on line 43

    Warning: Cannot modify header information - headers already sent by (output started at /home/ripitups/public_html/Dealer/includes/languages/english.php:324) in /home/ripitups/public_html/Dealer/includes/functions/general.php on line 23

    i think i have to clear cache any help on the code or how?

  2. #2
    osCMax Developer

    michael_s's Avatar
    Join Date
    Jul 2002
    Location
    Phoenix, AZ
    Posts
    19,907
    Rep Power
    568


    Default

    delete the extra blank lines after the closing php tag here:

    /home/ripitups/public_html/Dealer/includes/languages/english.php:324
    Michael Sasek
    osCMax Developer


    osCmax Installation Service
    - Have our professionals install osCmax on your server - same day service!
    osCmax 2.5 User Manual - the must have beginners guide to osCmax v2.5

    Stay Up To Date with everything osCMax:
    Free osCmax Newsletters - Security notices, New Releases, osCMax News
    osCmax on Twitter - Up to the minute info as it happens. Know it first.

    osCmax Documentation

  3. #3
    Lurker
    Join Date
    Dec 2004
    Posts
    2
    Rep Power
    0


    Default

    Quote Originally Posted by msasek
    delete the extra blank lines after the closing php tag here:

    /home/ripitups/public_html/Dealer/includes/languages/english.php:324
    Hi,

    I know this is a little late, but I just saw this post. I have a short snippet of php code that may be helpful to you. It goes to your cache directory and deletes all the files stored there. I do this automatically everytime I update my products (nearly 400,000 products updated every day).

    function purge($dir)
    {
    $handle = opendir($dir);
    while (false !== ($file = readdir($handle)))
    {
    if($file != "." && $file != "..")
    {
    if(is_dir($dir.$file))
    {
    purge($dir.$file."/");
    rmdir($dir.$file);
    }
    else
    {
    unlink($dir.$file);
    }
    }
    }
    closedir($handle);
    }

    purge("../catalog/tmp/"); // clear cache set this to the relative path of your cache directory

    Bill G.

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
  •