Web

Howto fix Drupal's update.php when $_REQUEST is denied by a paranoid sysadmin

I dont know how much people get to this problem, but one thing is sure: when you have a paranoid sysadmin, you might encounter some surprises with PHP and globals.

The annoying case is here when you restrict PHP to the maximum you can, you can't access to the $_REQUEST superglobal.

Do not use <Bad PHP applications> !

<?php
   
foreach ($_POST as $key => $value) $$key = $value;
    foreach (
$_GET as $key => $value) $$key = $value;
?>

No comment..

Some basic things about Apache VirtualHosts

Apache

For people who thinks that setup an Apache is easy (and of course, with some experience behind me, I agree), I say, beware of some details.
For those who need real technical documentation on Apache, this is not for you, this article intends to help people who only tries to setup small development or personal web servers (this do not applies on complex environments or needs).

Yesterday, I had to setup a development environment for a colleague, and it took some hours just because of theses:

Méfiez vous surtout des URL absolues ! :) (bis, ter, et fini après)

Après avoir fait un patch très moche, m'être fait incendier par le mainteneur du module, j'ai décidé de réfléchir plus et d'introspecter plus loin pour voir d'où venait mes problèmes. Et j'ai trouvé, voici l'explication en couleurs !:

file_create_url() à tout cassé, parce que:

function file_create_url($path) {
// Strip file_directory_path from $path. We only include relative paths in urls.
if (strpos($path, file_directory_path() . '/') === 0) {
$path = trim(substr($path, strlen(file_directory_path())), '\\/');
}