PHP

TwitterFacebook
Get flash to fully experience Pearltrees
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! http://bugs.php.net/bugs-generating-backtrace.php

Generating a gdb backtrace

In ubuntu make sure you installed php5-dbg by nicolas Mar 26

PHP Accelerators

http://en.wikipedia.org/wiki/List_of_PHP_accelerators This is a list of PHP accelerators . [ edit ] Alternative PHP Cache (APC) Alternative PHP Cache is a free, open source ( PHP license ) framework that heavily optimizes and tunes the output of the PHP bytecode compiler and stores the final, compiled result in shared memory .
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

http://php.net/manual/en/features.commandline.php

PHP on the Command Line 1/2

http://www.sitepoint.com/php-command-line-1/ 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 Linux.com’s CLI for Noobies series: http://www.sitepoint.com/php-command-line-2/

PHP on the Command Line 2/2

http://blog.nicolargo.com/2011/01/installation-et-test-de-nginx-sous-ubuntu.html

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/stable sudo aptitude update
http://blog.nicolargo.com/2011/08/installation-pas-a-pas-dun-serveur-de-blog-wordpress-sur-debian-squeeze.html Je viens de passer le cap et de m'abonner à un serveur dédié chez Online.net. 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

http://www.howtoforge.com/installing-nginx-with-php5-and-php-fpm-and-mysql-support-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