GIDForums  

Go Back   GIDForums > Computer Programming Forums > MySQL / PHP 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 26-Jun-2006, 10:43
Longa Longa is offline
New Member
 
Join Date: Jun 2006
Posts: 2
Longa is on a distinguished road
Lightbulb

PHP compression & php.ini file


My Blog from Wordpress as well as my website run like a snail on an apache server. ( I have a lot of pictures there, which are already compressed as fas as it goes)

For the Wordpress blog all of it is in php including AJAX, I wanted to know if it is better to change the compression in in the php.ini on and or add following to my htaccess file

php_flag zlib.output_compression on
php_value zlib.output_compression_level 9

As I'm a newcomer to php as well as the apache server my knowledge is quite like zero -

Hosting technology is in VDS which gives me some freedom, which of course can be dangerous too

I hope some of the experts can advice me what to do.
My hosting companies support is none existend in this case. They just don't like to get involved.
  #2  
Old 27-Jun-2006, 05:44
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

Re: PHP compression & php.ini file


Some popular scripts already include options to compress the web pages or not. I will assume a popular script like wordpress may already offer such an option. I am not certain, because the only 3rd party scripts I have ever used is phpBB, phpadsnew and vbulletin (and all 3 have this option!).

It's much better for you to enable the option from within the script than to do it server-wide, in other words, modifying php.ini.

Setting this in .htaccess is however something you can consider (maybe for scripts you write on your own).

php_value zlib.output_compression_level 9

Don't set that at 9, 1 is perfect! i.e.
php_value zlib.output_compression_level 1
  #3  
Old 27-Jun-2006, 08:15
Longa Longa is offline
New Member
 
Join Date: Jun 2006
Posts: 2
Longa is on a distinguished road

Re: PHP compression & php.ini file


Thank you JDS
I experimented with that particular script in .htaccess and it looks like it works fine.

Lowered the compression level as you suggested, I heard that there is not much to gain if it set at a higher level, except a higher load on the server.

Yes there are some 3rd party scripts out which include caching for wordpress, but they all have some issues. Thats why I stayed away from them.

At present time I'm experimenting with another way to speed up php. It includes also all html pages with a very smart and small php script. Looks very promising at the moment. I prefer this one as it takes care of both issues the php side as well the html side.
 
 

Recent GIDBlogLast 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 Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Airport Log program using 3D linked List : problem reading from file batrsau C Programming Language 11 29-Feb-2008 07:44
Download files in c for windows operating system oozsakarya C Programming Language 5 20-Jun-2006 03:33
php.ini file not being read ian111 Apache Web Server Forum 1 29-Jun-2005 11:35
CD burner wont burn!! robertli55 Computer Hardware Forum 1 18-Jun-2004 10:53
Yet another CD burner problem: Lite-On LSC-24082K Erwin Computer Hardware Forum 1 22-May-2004 11:28

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

All times are GMT -6. The time now is 08:47.


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