Thanks, this works even better. But you have to make sure that the line endings are unix. Otherwise you will get the 'bad interpreter' error:
http://stackoverflow.com/questions/2...ad-interpreter
cod2_lnxded (without extension)
PHP Code:
#!/bin/bash
export LD_LIBRARY_PATH="/path/to/cod2/libs/:/path/to/cod2/libs/mysql"
export LD_PRELOAD="/path/to/cod2/libs/libcod2_1_3.so"
./cod2_lnxded_1_3_nodelay_va_loc $@