Facebook Twitter

Generating a gdb backtrace. Noticing PHP crashes There's no absolute way to know that PHP is crashing, but there may be signs.

Generating a gdb backtrace

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! Nginx. PHP-FPM. PHP Accelerators. This is a list of PHP accelerators.

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. APC. Command line usage. 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).

Command line usage

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; 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.

PHP on the Command Line 1/2

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. PHP on the Command Line 2/2. In Part 1 of this tutorial, we had a look at PHP’s command line SAPI (server API).

PHP on the Command Line 2/2

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: NGinx sous Ubuntu. 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