{{parent page="WebServer" }} ===PHP=== php is a web scripting language from the last generation. It's fast to write but hard to maintain. Anyone who has studied software engineering will find this "language" a nightmare. ==Subtopics== ~ [[PHPI18n I18n using gettext]] ~ [[PHPSecurity PHP Security]] ~ [[PHPFastCGI Running php as fastcg on apache2]] ~ [[PHPMixedVersion Running multiple versions on the same web server]] ~ [[PHPUpload Upload]] ~ [[PHPOptimizers PHPOptimizers]] ~ [[PHPCode PhpCode]] ~ [[PHPBuildRpm Build RPM]] ~ [[PHPXcache Xcache]] ~ [[PHPEaccelerator eAccelerator]] ~ [[PHPsuPHP suPHP]] ===php security issues=== http://www.securephpwiki.com/index.php/Email_Injection ===php5 typical source configure options (64bit redhat)=== In any case, you will need libtool-ltdl-devel to the least %% ./configure --with-libdir=lib64 --libdir=/usr/lib64 --with-apxs2=/usr/local/apache2/bin/apxs \ --sysconfdir=/etc --with-config-file-path=/etc --with-config-file-scan-dir=/etc/php.d --with-bz2 \ --with-curl --with-freetype-dir=/usr --with-png-dir=/usr --with-gd=shared --enable-gd-native-ttf \ --without-gdbm --with-gettext --with-iconv --with-jpeg-dir=/usr \ --with-openssl --with-pspell --with-xmlrpc=shared --with-regex=php --with-zlib \ --with-layout=GNU --enable-bcmath --enable-exif --enable-ftp --enable-magic-quotes \ --enable-sockets --with-mysql=shared,/usr --with-mysqli --enable-shmop \ --enable-calendar --enable-mbstring=shared --enable-mbregex \ --enable-pcntl --enable-wddx --with-libxml-dir=/usr --with-mcrypt=/usr %% If you do not need so much crap, here is a minimal install %% ./configure --with-config-file-path=/etc --with-config-file-scan-dir=/etc/php.d \ --prefix=/usr --with-mysql=shared,/usr --with-mysqli=shared,/usr/bin/mysql_config \ --enable-mbstring --with-apxs2=/usr/sbin/apxs %% === Compiling PHP5 /w mysql5 & GD & Apache2 & Mysqli support === The following is tested on FreeBSD6.2. //Note: There seems to be a problem compiling the following plus MagickWand. If MagickWand is compiled at the same time, it will stop at mysql_error.// Install first from source ~zlib-1.2.3 ~gd-2.0.43 ~autoconf (ports) ~autoheader (ports) ~unixODBC (ports) ~"patch" php source with magickwand ~MySQL-5.0.37 binary in /usr/local/mysql %%(bash) ./configure \ --host=i386-FreeBSD-6.2 \ --build=i386-FreeBSD-6.2 \ --target=i386-FreeBSD-6.2 \ --with-apxs2=/usr/local/sbin/apxs \ --with-mysql=/usr/local/mysql \ --with-zlib=/usr/local \ --enable-ftp \ --enable-versioning \ --with-gd=/usr/local \ --with-unixODBC=/usr/local \ --with-mysqli=/path_to/mysql_config # seems not working --with-mysql=shared,/usr/local/mysql # will not compile with --with-magickwand=/usr/local %% To test php & mysql, write a simple php page to fetch records. First, create a table on the test database: %%(sql) create table first_table(name varchar(20), id integer); insert into first_table (name) values ('name1'); insert into first_table (name) values ('name2'); commit; %% Then retrieve these records from php: %%(php;sqltest.php) \n"; while ($line = mysql_fetch_array($result, MYSQL_ASSOC)) { echo "\t