GIDForums  

Go Back   GIDForums > Web Hosting Forums > Apache Web Server Forum
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Search this Thread Rate Thread
  #1  
Old 17-Dec-2003, 01:46
SloppyGoat SloppyGoat is offline
New Member
 
Join Date: Dec 2003
Posts: 4
SloppyGoat is on a distinguished road

zlib and/or gzip


Hi. I'm currently trying to switch to Win/Apache 1.3.29 in order to run vB3 Gamma, just like you have here. The problem is, I'm a IIS guy, so I know little about Apache. I managed to get everything up and running on my test board, but I simply cannot get either zlib or mod_gzip to work! :-x
Anyway, I noticed you seem to have a few knowledgeable people in Apache and PHP, so I figured I'd see if anyone can help me out here. I've tried getting both to work, and failed miserably. I'd love to get either to work now, although I've heard that mod_gzip is supposed to be better? Can anyone give me a little bit of newbie instruction?

Config now is:
XP Pro/Apache1.3.29/PHP4.3.4/MySQL4.0.16

Apache is running as API and GD2 is working just fine. Let me know if you want to see my PHP info. Any help will be greatly appreciated.

Thanks
  #2  
Old 17-Dec-2003, 08:27
JdS's Avatar
JdS JdS is offline
Senior Member
 
Join Date: Aug 2001
Location: KUL, Malaysia
Posts: 3,371
JdS will become famous soon enough
Hello Sloppygoat,

I am no Apache expert but I think using the included 'zlib' extension in the regular PHP download is the way to go...

My logic for deciding which module / extension to set up on my development environment is usually: which is easier to set up and how easy it is for me to upgrade the module/extension when I install an upgrade for either Apache or PHP?

The clear winner, at least for me, is simply using the PHP included zlib.dll extension. Which is found inside C:\PHP_FOLDER\extensions\zlib.dll after your PHP install / upgrade.

This is what I have been doing ever since I got into this hobby of building websites and using compression to work for me.

Once your phpinfo file reports a ZLIB table & values, running vb3 and turning ON gzip compression should work (via the admincp vb options).

I cannot recall the details now, since I don't install Apache and PHP everyday, but if you want to troubleshoot enabling the zlib extensions, it will have almost nothing to do with your Apache setup. Try copying the zlib.dll file to C:\\windows when all else fails... restart Windows and test...

When I re-install PHP one day in the future, I will update this thread if I remember details about enabling the ZLIB extension in PHP but I don't remember it being complicated. All I remember is copying the zlib.dll different places inside my windows folder, that's all ( that explains why my search for the file on Cdrive returned 6 results! )
  #3  
Old 17-Dec-2003, 11:52
SloppyGoat SloppyGoat is offline
New Member
 
Join Date: Dec 2003
Posts: 4
SloppyGoat is on a distinguished road
Well, I tried both of those once again. First, the zlib1.dll that came with PHP. That just gives me an invalid library error. (See attach #1)
And php_zlib gives me about 50 errors like attach #2. It goes through a bunch of file names. So, neither of these is doing anything for me. Although, even without using either of these, my PHPinfo says zlib is enabled. I can also turn output_compression on and off, and adjust the level. Hell, maybe it is working, but those gzip check services just can't check anything but the default port 80? Is there any way to tell besides those gzip check sites?
Attached Images
File Type: gif invalid.gif (4.0 KB, 14 views)
File Type: gif php_zlib.gif (3.7 KB, 19 views)
  #4  
Old 17-Dec-2003, 14:03
JdS's Avatar
JdS JdS is offline
Senior Member
 
Join Date: Aug 2001
Location: KUL, Malaysia
Posts: 3,371
JdS will become famous soon enough
About testing if your gzip setup is actually working you can maybe try this:

Set the GZIP setting ON in the vbulletin admincp. Then open up config.php and add the following line to the top of that file.

PHP Code:

<?php

// to be erased after tests
ob_start( 'ob_gzhandler' );

// the rest of the file
?>


Now if you get a bunch of illegible characters when you view the forums, you know that zlib is installed and working!

On second thoughts that may not work since I remember noticing that vb checks to see if gzip is already on and if so to disable gzip via the script... but never mind try it on another php script that you can quickly cook up and try to double compress the page.
  #5  
Old 17-Dec-2003, 14:22
SloppyGoat SloppyGoat is offline
New Member
 
Join Date: Dec 2003
Posts: 4
SloppyGoat is on a distinguished road
I tried it in index.php, and it just said this. It doesn't mean much to me, though.

Unable to add cookies, header already sent.
File: g:\test\index.php
Line: 1

Should I have zlib.output_handler=ob_gzhandler in my php.ini? I have it commented out right now. Although, if I enable it, PHPinfo shows it to be enabled. One thing I've noticed, there a small file in my gzip temp folder now, so it must've done something at one time?

What do you make of this?
Attached Files
File Type: txt _2932_2164_12.wrk.txt (10.2 KB, 10 views)
 

Recent GIDBlogFirst week of IA training by crystalattice

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Misleading Zlib Configuration Options info JdS MySQL / PHP Forum 12 02-Sep-2006 12:32

Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The

All times are GMT -6. The time now is 06:37.


vBulletin, Copyright © 2000 - 2008, Jelsoft Enterprises Ltd.