Posts tagged ‘PHP’

WordPress upgrade error (Allowed memory size of 33554432 bytes exhausted)

The problem
Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 2516315 bytes) in /home/mydomain/public_html/blog/wp-includes/http.php on line 1370
This can happen at any line and with any file, not only http.php at line 1370!
Explanation
Don’t worry if you get this error, there is nothing wrong with your server or hosting plan etc. Whenever a new [...]

A note on JavaScript arrays creation & initialization

I use PHP a lot in my projects and it happens that sometimes I combine PHP with another language and write completely useless code.

PHP arrays can be created and initialized with like this:

<?php
$cities[] = “mecca”;
$cities[] = “medina”;
?>

I thought that the same would apply to javascript… Yes, it can work, but only [...]

Install PHP 5.2.6 on CentOs 5.x

Oddly enough, PHP 5.2.6 is still not available on default CentOS repositories ([base], [updates], [addons], and [extras]), latest PHP available in those repos is PHP 5.1.6!

In order to install PHP 5.2.6 you can add the CentOS testing repository and enable it then install or update PHP.

To add the CentOS testing directory, create a file /etc/yum.repos.d/centos-test.repo [...]