Logrotate defaults
When inspecting why nginx logs wasn't rotated, I did little strange discover
# uncomment this if you want your log files compressed # compress
so, by default rotated logs are not compressed. Perhaps there are admins which process rotated logs, but I am not one them. I use pre-rotate hook to process logs before rotate them. So, I really expected logrotate to compress by default. And yes, my bad - I didn't checked default configuration in /etc/logrotate.conf
Now I did change default to compress and wouldn't have to use in per service logrotate configuration.
PS: and don't forget
sudo /usr/sbin/logrotate -f /etc/logrotate.conf
after you apply changes to logrotate configurations
Warning: "Headers already sent" or "Cannot modify header information"
Lets see, you install new PHP app and get bunch of warnings. It is sad, commonly you need PHP knowledge to understand them and fix. Probably you can request help from you hosting support, but they reject such problems saying "We don't fix your php applications".
Ok, google.com found a lot answers and solutions for this problem. But non of them is simple, non of them are short.
Technically main problem called "output logic problem", your php script try to send header after body was sent. And it is wonderful, because I have solution.
So, I will share the magic I use to help my clients quickly:
- php CAN control output
- everyone can activate output buffering
SOLUTIONs
First
- create .htaccess and add next line:
php_value output_buffering 4096 - upload it
- visit page
Problem not solved?
Second
- remove .htaccess you uploaded
- create php.ini with line:
output_buffering = 4096 - upload it
- visit page
Problem gone you got your script up and working.
GPix with free and paid pixels at one grid
You want to grant free small regions for your customers and get money for bigger? it is simple with GPix.
- setup price for you regions
- set yes for "Allow free and paid regions" option
- define maxim free area"Maximum square for free region" - for example 300 (3 blocks with 10x10)
- review your get pixels page
Here you can see how administration settings need to look:

Here you can see what you can expect as visible result:
![]()
Drupal cacheroter and pear Cache_Lite conflict
Well, it is nice when your project to group and it mean not only more money, but more server resources. And if you didn't start to receive money it will be normal if you will start to search for options without increasing monthly payments.
In goal to lower server resource consummation, logic optimization and cache is primary goals.
Drupal offer file cache for anonymous and I already applied it, but to improve performance for registered users I use Cache_Lite in custom modules and theme. And now, this steps are not enough, client database go down every day and we agreed that best option is better server. One problem is that client need time to find better offer, because current hoster have not better offers.
Currently we have big troubles with MySQL - we already have "dedicated" container, and it isn't enough.
My goal was keep site running until client decide where to move it. And I start search in Drupal modules repository and forums. And found cacherouter - perfect solution for our case.
But, when I install it I get conflict with Cache_Lite - both have "Cache.php" and cacherouter include this one from PEAR directory, because of include_path setting. Change this setting isn't option - Cache_Lite will do errors. With little research I found next line:
require 'Cache.php';
Look like conflict can be easily changed
require drupal_get_path('module', 'cacherouter').'/Cache.php';
but because of cacherouter logic drupal_get_path isn't available
require getcwd().'/sites/all/modules/cacherouter/Cache.php';
solve problem and can not be submited as patch to cacherouter module. So, I have submit issue "Conflict with Cache_Lite" and if you know how it can be done in "Drupal way", please send me solution.
Zeitgeist is just mainstream or trend.
How you detect trends? how you follow mainstream? and do we need Zeitgeist?
May be you see news? may be you read opinions and conclusion from analytics? Well, every one have goal, my own goal is to be clear how I can get what I want and mainstream can help me in my goal.
So, as result I use many sources to monitor trends, but facts facts and my own analyzes is preferable. An nice post "http://www.phpclasses.org/blog/post/113-PHP-Zeitgeist-What-PHP-developers-have-been-looking-for-in-the-last-decade.html" by Manuel Lemos show as some PHP trends as well Manual refer to google "Year-End Zeitgeist"
Can rank, defined ranks and showed graphs be facts? Well, it is question about trust. I use many sources and when they confirm each other - I trust them, but I remember that there are possibility for errors and misses.
GPix advanced options
With version 1.4, GPix have "Advaced settings" which provide you control over advanced features. You can leave them as is and GPix will work, but you can research them and choose to change for your special case.
Since GPix 1.4.0 "Grids advanced settings" section via options "Allow region description?, Enable page per region?, Enable page per user?,
Disable region link on region page?" provide more control over links for regions:
Enable page per region? - will activate "page per region" and replace grid region links with links to region page.
Allow region description? - previous option allow you to enable region page, this setting activate extra field for content used in this page. As result users will be able to put more realable content over links and improve page rank.
Enable page per user? - well, you discover that region can have its own page, this option activate personal page for every user.
Disable region link on region page? - this options have sense when you have activated "page per region" and disable links on region page. Pay money for region and have not link? What is sense for this feature? - reasonable questions. But remember GPix is used by many peoples with many different goals. So, as example "Family walls", "Friend walls" or even "Gallery walls" don't need to have "back links". So, it is very specific, but still useful.
SimpleXML for PHP4
Do you like and use SimpleXML? it is nice library for development common tasks, but have one BIG limitation - SimpleXML extension requires PHP 5. And what you will do if client have PHP4? it will be big success if client can upgrade php to version 5, but if not? There are a lot php custom solution which require PHP4 and clients don't want to spent money for upgrades or just prefer to to leave it as it, because it work.
Don't worry there are solution! you can use SimpleXML class
For example to view structured PHP rss feed from kalexandr.com you can do something like this:
<?php $file = "http://www.kalexandr.com/taxonomy/term/4/0/feed"; $sxml = new simplexml; $data = $sxml->xml_load_file($file); print_r($data); ?>
IAF decoder coder - an PHP class for Outlook!
Outlook is Microsoft mail agent program. And it is popular, because is part of several Microsoft software packages.
When peoples work with Outlook long years. And it is normal for peoples to use this data in another application. In many cases when peoples choose program they can not images which requirement they will have in the feature. As result it is possible to have data in "unique" format. And when you need to change mail server you need to configure. But why man need to open dialog boxes and make mistake when hosting company are able to provide ready to use configuration file? or take outlook configuration file to fetch data from another mail server?
Outlook use IAF files and PHP can handle it. PHP IAF decoder coder class for Outlook configuration files is adopted PERL CPAN package and it can import/export data from iaf files. As result we can handle export/import via web forms! amazing.
So, we need to download IAF class file and start to use it.
As usually, to be more specific how we can use it, I provide example:
<?php require_once 'File_Format_Iaf.php'; $iaf = new File_Format_Iaf(); $iaf->AccountName = 'My Account big_user@example.com'; $iaf->MakeAvailableOffline = 1; // fill pop3 configuration options $iaf->POP3Server = 'pop3.example.com'; $iaf->POP3UserName = 'Big_User'; $iaf->POP3Password = '987321'; $iaf->POP3LeaveMailOnServer = 0; $iaf->POP3PasswordPrompt = 0; // and configure smtp $iaf->SMTPDisplayName = 'Big User'; $iaf->SMTPEmailAddress = 'big_user@example.com'; $iaf->SMTPServer = 'smtp.example.com'; $iaf->SMTPUserName = 'big_user'; // now we can generate file! and sure you can just put it for download $iaf->save('export.iaf'); ?>
As result users will be happy! because they will not waste time with Outlook configuration procedure and just use iaf file with few clicks. And it will normal if every mail hosting company will care more about users and many options as possibility must be part of company politic.
PS: And don't forget to send thanks for Przemek Czerkas(PERL class) and Ruslan Kononov(PHP class) they did amazing work.
TUFat 3.1.2
TUFaT 3.1.2 was released with next changes:
- "remember me" option for tree login
- improve portrait handler
- multiple fixes for magic_quotes_gpc problems
Now, this family tree script marked as stable and new features will be implemented.
GPix 1.4.1
Main goal for GPix versions 1.4.x is integration with third party systems. GPix 1.4.0 was release with integration API. Now, this API is improved and new integration modules added.
So, if you use vBulletin, Drupal, Mambo or Joomla. GPix can handle user authentication for this systems. As result you existing user don't need separate registration for GPix. More all existing users will be handled automatically.
This release contain next changes:
- integration with Mamba
- integration with vBulletin
- integration with Drupal 5/6
- fix for joomla integration admin interface
- RFC822 date generation fix
- fix grid export functionality
- add cache for grid export

