Installing MyPHP

1 - Install MySQL

2 - Copy myphp.so in /usr/lib

3 - Register the new functions in MySQL with:

    mysql> CREATE FUNCTION myphp RETURNS STRING SONAME "myphp.so";
mysql> CREATE AGGREGATE FUNCTION myphp_ag RETURNS STRING SONAME "myphp.so";
mysql> CREATE FUNCTION loadfile RETURNS STRING SONAME "myphp.so";

Try your new functions!

    mysql> SELECT loadfile ("/etc/passwd");
    mysql> SELECT myphp("$RET=$PARAM[1];","first parameter");

What's happen I get "ERROR 1126: Can't open shared library 'myphp.so' (errno: 22 myphp.so: cannot open shared object file: Invalid argument) tring to register the new functions ?

Your mysqld is statically linked, you have to rebuild it in shared mode; see the mysql manual at "Adding a New User-definable Function"

DISCLAIMER

All trademarks are the property of their respective owners.