Fixing Fatal PHP PharException without disabling your accelerator

When you encounter Fatal error: PharException with message __HALT_COMPILER(); must be declared in a phar the easiest solution to keep your project environment the same is to convert the phar file into multiple PHP files and include them in the classic style !

Phar archive

Tags: , , ,

How to install eAccelerator in PHP 5.3 under CentOS 6

Current working system:

  • CentOS 6.4 final
  • PHP 5.3.3
  • Apache 2.2.15

Here is the issue: once you install eaccelerator (RPM from EPEL CentOS Repository with command: yum install php-eaccelerator) and phpMyAdmin (also from RPM), you notice a big issue.


Php will start crashing running phpMyAdmin and in apache error logs.
[notice] child pid NUMBER exit signal Segmentation fault (11)

Tags: , , ,

PHP Code for removing all “generator” content from wordpress 4.0 – HTML & Feed/Rss

Update your functions.php from your template theme to get rid of such “generator” content.
functions.php location

PHP code example how to remove generator content, like:
<meta name=”generator” content=”WordPress 4.0″ />
<generator> </generator>
<link rel=”stylesheet” href=”/style/wp4.css?v=4.0″ />
<script type=’text/javascript’ src’/resize.js?ver=4.0′></script>
<link rel=”EditURI” type=”application/rsd+xml” title=”RSD” href=”/xmlrpc.php?rsd” />
<link rel=”wlwmanifest” type=”application/wlwmanifest+xml” href=”/wlwmanifest.xml” />

Note: The code applied for Wordpress 4.0, written in PHP.

Tags: ,