[php] Installing addtional modules separately

Please refer to README.SELF-CONTAINED-EXTENSIONS from the original source distribution

—-from the readme file—-

Just to show you how easy it is to create a self-contained
extension, we will convert an embedded extension into a
self-contained one. Install PHP and execute the following
commands.

$ mkdir /tmp/newext
$ cd /tmp/newext

You now have an empty directory. We will copy the files from
the mysql extension:

$ cp -rp php-4.0.X/ext/mysql/* .

It is time to finish the module. Run:

$ phpize

You can now ship the contents of the directory – the extension
can live completely on its own.

The user instructions boil down to

$ ./configure \
[--with-php-config=/path/to/php-config] \
[--with-mysql=MYSQL-DIR]
$ make install

The MySQL module will either use the embedded MySQL client
library or the MySQL installation in MYSQL-DIR.

Read More

[php] Good things to know about global variable in PHP

From 4.1.0 (or 4.2.0)

Default register_globals in php.ini is off
This disables automatic forms input name to PHP vars function
(Eg.<input name=simpletext > => in php the input value is available as $simpletext with register_globals on )
Therefore, you need to access below Globals to access them

Also, short_open_tags is off
This disables <? ?> php tag. so you need to use <?php ?>.
(more…)

Read More