Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 6 of 6
  1. #1
    Regular Coder
    Join Date
    Jun 2002
    Location
    Ontario, Canada
    Posts
    183
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Angry I can't find that darn DZip trick anymore...

    Anyone remember how to do it? Something to do with sticking a line into an .htaccess file and having it speed up PHP.

    Thanks a bunch to anyone who can direct me somewhere with this info
    Offtone.com - In the works...

  • #2
    Super Moderator
    Join Date
    May 2002
    Location
    Perth Australia
    Posts
    4,040
    Thanks
    10
    Thanked 92 Times in 90 Posts
    check out output buffering and the gzip functionality ...

    http://www.php.net/manual/en/function.ob-start.php

    and this article

    http://www.phpbuilder.com/columns/argerich20010125.php3
    resistance is...

    MVC is the current buzz in web application architectures. It comes from event-driven desktop application design and doesn't fit into web application design very well. But luckily nobody really knows what MVC means, so we can call our presentation layer separation mechanism MVC and move on. (Rasmus Lerdorf)

  • #3
    Regular Coder
    Join Date
    Jun 2002
    Location
    Ontario, Canada
    Posts
    183
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Errr... The one I was after was the one where you added a line to the .htaccess file and it did the compressing that way. If this way is better, how do I do it? I copied and pasted the script into the top of my page and my site turned into a 404

    Thanks for any more help on this
    Offtone.com - In the works...

  • #4
    Regular Coder Feyd's Avatar
    Join Date
    May 2002
    Location
    Los Angeles, CA Maxim: Subvert Society
    Posts
    403
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I'm assuming you have mod_gzip available?

    In an htaccess you can do:
    php_value output_handler ob_gzhandler

    or you can put this in your ini:
    output_handler = ob_gzhandler ;

    or you can call it direct in your code:
    ob_start("ob_gzhandler");

    (Of course, I've heard some nightmares about server load skyrocketing with gzhandler on)

    But if you are looking for just pure speed, have you tried the Zend Optimizer or other caching alternatives?
    Moderator, Perl/CGI Forum
    shadowstorm.net - subvert society

  • #5
    Regular Coder
    Join Date
    Jun 2002
    Location
    Ontario, Canada
    Posts
    183
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I'm not the server admin, but I'm pretty sure it's zend optimized and all that...

    ob_start("ob_gzhandler"); makes my site a 404... does that mean I don't have mod_gzip available?
    Offtone.com - In the works...

  • #6
    Regular Coder
    Join Date
    Jun 2002
    Location
    Ontario, Canada
    Posts
    183
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Ok, the .htaccess method worked, but after I inserted it, the server began to lag... I dunno if that's coincidence, but I highly doubt it. I'll wait and see if it speeds back up again, and if it does I'll try the .htaccess thing once more to see. The page took forever to load, despite it's size of 4065 bytes (from 38560 or something!) Does that make any sense?
    Offtone.com - In the works...


  •  

    Posting Permissions

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