Technical Blog by Tomasz Muras Technical Blog
  • Search
Navigation bar avatar
✕

    PHP

    • Compile PHP 8.4 with xdebug from source on Ubuntu 22.04

      Posted on April 19, 2025

      It is easier than you think! Here is what I did on my Ubuntu 22.04 installation [Read More]
      Tags:
      • PHP
    • .htaccess behind a load balancer

      Posted on November 13, 2014

      .htaccess: [Read More]
      Tags:
      • php
      • htaccess
    • Access private properties of different object of the same class

      Posted on September 26, 2013

      Have a look at the following code: [Read More]
      Tags:
      • php
    • How to detect user’s home directory from PHP on Linux & Windows

      Posted on October 22, 2012

      I needed to locate current user’s home directory, to find and parse a config file like ~/config.ini. The current user is a user that is currently running a PHP CLI script. I have found a neat solution in drush, ready to copy & paste into your function: [Read More]
      Tags:
      • php
      • linux
    • Moodle Global Search and Zend Lucene performance

      Posted on March 26, 2012

      I’ve been working for some time on rewriting Global Search feature for Moodle. This is basically a search functionality that would span different regions of Moodle. Ideally it should allow to search everywhere within Moodle: forums, physical documents attached as resources, etc. The implementation should work in PHP, so as… [Read More]
      Tags:
      • moodle
      • zend
      • php
    • Alfresco development environment with Tomcat and Eclipse

      Posted on January 17, 2012

      This post describes how to set up environment to be able to code and debug Alfresco on Tomcat in Eclipse. [Read More]
      Tags:
      • php
      • htaccess
    • Make star (*) to match hidden (dot) files

      Posted on January 6, 2012

      To make star character in bash to match hidden files, use dotglob option: [Read More]
      Tags:
      • php
      • htaccess
    • Enhancing Drupal performance with drupal_static

      Posted on June 25, 2011

      One of the easiest methods of optimizing the execution of PHP script is by using a static variable. Imagine a function that does some complex calculations, possibly executes several database queries. If the return value from the function does not change too often and the function may be called several… [Read More]
      Tags:
      • php
      • drupal
    • Get next auto_increment value in MySQL

      Posted on June 12, 2011

      I was recently working on some MySQL 5.5 performance testing. I had to generate a lot of SQL queries I would then use for my testing. To make my tests repeatable I needed to hardcode the values for IDs. That is, I couldn’t simply use: [Read More]
      Tags:
      • mysql
      • linux
      • php
    • Symfony 2 Dependency Injection as a standalone component

      Posted on June 9, 2011

      Below I will demonstrate how to use an excellent Dependency Injection component from Symfony 2, without using the whole Symfony framework. I will also use ClassLoader from Symfony and just for the sake of the demo I will integrate it with Zend Framework. The code requires PHP 5.3 (mostly for… [Read More]
      Tags:
      • php
      • symfony2
    • Using-shared-memory-in-PHP

      Posted on May 23, 2010

      PHP provides a handy support for System V IPC functions in the Semaphore module. Let’s have a look at the functions responsible for handling shared memory. They can be used to implement a simple way of exchanging information between the processes. To see if your PHP installation supports IPC, run: % php… [Read More]
      Tags:
      • php
      • ipc

      Tomasz Muras  •  2026

      Powered by Hugo, styled with Beautiful Jekyll