Say Goodbye to apache-, php, and php-pecl-* packages in Amazon Linux 2023: Here's What to Do Next!

Why the Removal?

Amazon is always striving to improve its products, and that includes keeping software packages up-to-date and secure. The apache-, php, and php-pecl- packages were removed from Amazon Linux 2023 due to outdated software and compatibility issues. As technology advances, it's essential to stay on top of these changes to ensure the best possible experience.

A New Era: PHP 8.1 and HTTPD Packages

While saying goodbye to the old packages might feel like a bitter pill to swallow, there's a silver lining: the fantastic alternative packages waiting for you. The php8.1 and httpd packages are here to save the day, offering better performance, security, and compatibility with the latest web technologies.

To install PHP 8.1, you can use the following command:

sudo yum install php8.1

For HTTPD (the Apache HTTP Server), use this command:

sudo yum install httpd

Check out the AL2023 Release notes for more information and guidance on how to work with these packages.

Update Your Dependencies, Especially UserData Scripts
As the older packages are no longer available, it's essential to update your dependencies accordingly. This is particularly

Links:

Un-expected OVH gift

For me, new year started with one discovery.

As you know, holidays do traffic and server load peaks. So, my common job is to watch for problems. And be ready to solve them. (Yes, I do work at holidays.)

So, I noticed that "traffic" graph was disappear from my OVH dashboard. Hm, it was strange. So, I asked support "WTF?". My server monitoring tools show increased traffic and it was very nervous situation. I would expect OVH traffic counter to disable my server or limit channel capacity. And it is in best Rush Hour in the season!

But, in few hours I received answer from OVH.

My dedicated was upgraded with "UNLIMITED" amount of transferred data!!!

What a relive and surprise!!!

THANK YOU OVH!!!. Looking forward to work with you in new year.

Links:

Securty policy - blah (linode.com fall)

When you do security there are no such term as "low risk".

Example - Linode.com. Somebody install phpBB and Linode just got two step attack.

Get out everyone by falser report
Attack old forum - got it.

So, questions are:

  • Linode employes doesn't have notebooks?
  • remote administration in 2014 is something they don't know?
  • Linode don't have any remote administration?
  • Linode operate from ONE office?
  • how about different datacenters? are they affected?

So, again decentralization is good as never!

Tags:
Links:

AWStats and MaxMind

Just be notice, before you un-comment line:

geoip GEOIP_STANDARD /usr/share/GeoIP/GeoIP.dat

you should install Geo::IP perl module and for debian it is best to be done via package manager:

sudo aptitude install libgeo-ip-perl

Thanks for perl GeoIP library package interface Debian Perl Group.

Tags:
Links:

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

Tags:
Links:

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.

Tags:
Links:

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:
Free Payed configuration

Here you can see what you can expect as visible result:
Free Payed pixels

Tags:
Links:

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.

Links:

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.

Tags:
Links:

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.

Tags:
Links: