Facebook Twitter
Noticing PHP crashes There's no absolute way to know that PHP is crashing, but there may be signs. Typically, if you access a page that is always supposed to generate output (has a leading HTML block, for example), and suddenly get "Document contains no data" from your browser, it may mean that PHP crashes somewhere along the execution of the script. Another way to tell that PHP is crashing is by looking at the Apache error logs, and looking for SEGV (Apache 1.2) or Segmentation Fault (Apache 1.3). Important! Generating a gdb backtrace Generating a gdb backtrace
PHP-FPM PHP-FPM What is PHP-FPM? PHP-FPM (FastCGI Process Manager) is an alternative PHP FastCGI implementation with some additional features useful for sites of any size, especially busier sites. These features include: Adaptive process spawning (NEW!) Basic statistics (ala Apache's mod_status) (NEW!)
PHP Accelerators PHP Accelerators This is a list of PHP accelerators. Alternative PHP Cache (APC)[edit] Alternative PHP Cache is a free, open source (PHP license) framework that caches the output of the PHP bytecode compiler in shared memory, thus reducing parsing and disk I/O overhead for later requests; and a shared memory cache for user data.
Spawning php-win.exe as a child process to handle scripting in Windows applications has a few quirks (all having to do with pipes between Windows apps and console apps). To do this in C++: // We will run php.exe as a child process after creating // two pipes and attaching them to stdin and stdout // of the child process // Define sa struct such that child inherits our handles SECURITY_ATTRIBUTES sa = { sizeof(SECURITY_ATTRIBUTES) }; sa.bInheritHandle = TRUE; sa.lpSecurityDescriptor = NULL; // Create the handles for our two pipes (two handles per pipe, one for each end) // We will have one pipe for stdin, and one for stdout, each with a READ and WRITE end HANDLE hStdoutRd, hStdoutWr, hStdinRd, hStdinWr; Command line usage Command line usage
PHP on the Command Line 1/2 PHP on the Command Line 1/2 We all know PHP is a great language for building Web applications with but we all also know there’s a lot more to running a serious Website than just the user interface. There are back ups to be performed, log files to be analysed, data to be pruned and all those essential but mundane tasks that happen in the background. Typically, such routine administration tasks are prime targets for automation and, if you’ve spent any time with UNIX-based systems, you’ve probably run into the notion of shell scripts and cron.
In Part 1 of this tutorial, we had a look at PHP’s command line SAPI (server API). In this article, we’ll take things a step further, and see how you can hook up a command line PHP script with existing command line tools provided by your operating system. In contrast to the last article, the focus of this article will be Unix-based systems — something which can’t be avoided. To steal a quote from’s CLI for Noobies series: PHP on the Command Line 2/2 PHP on the Command Line 2/2
NGinx sous Ubuntu NGinx sous Ubuntu NGinx est une des alternative au serveur Web Apache (il est actuellement utilisé par plus de 6% des serveurs Web). Il se targue d'être plus rapide, plus léger et facile à configurer. Nous allons vérifier tout cela dans ce billet en détaillant une installation de NGinx 0.8.54 (Stable) sur une machine GNU/Linux (Ubuntu Desktop 10.10) avec en bonus le support FastCGI de PHP et de Perl ! On commence par ajouter le dépôt officiel pour la version stable: sudo add-apt-repository ppa:nginx/stablesudo aptitude update
nginx + varnish + memcached Je viens de passer le cap et de m'abonner à un serveur dédié chez Mon choix s'est porté vers une Dedibox DC. J'ai longtemps hésité avec une OVH Kimsufi 16G mais le fait que la Dedibox propose en standard deux disques fonctionnant en RAID1 à fait la différence (avec l'âge ou privilégie la sécurité à la performance...). nginx + varnish + memcached
Nginx+PHP-FPM On Ubuntu 11.10 Version 1.0 Author: Falko Timme <ft [at] falkotimme [dot] com> Follow me on Twitter Last edited 10/20/2011 Nginx (pronounced "engine x") is a free, open-source, high-performance HTTP server. Nginx+PHP-FPM On Ubuntu 11.10