in httpd.conf
php_admin_value open_basedir none
in httpd.conf
php_admin_value open_basedir none
Use this to repair a corrupted Index File (.MYI). In this mode, MySQL re-creates the .MYI
file using information from the .frm
file
REPAIR TABLE tbl USE_FRM
./configure \
--with-charset=utf8 \
--with-extra-charsets=big5,gb2312 \
--prefix=/usr/local/mysql \
--enable-local-infile \
--enable-thread-safe-client
make
make install
choose correct config file
cp support-files/my-xxxxx.cnf /etc/my.cnf
./scripts/mysql_install_db
useradd -s /sbin/nologin mysql
chown -R mysql /usr/local/mysql/var
cp support-files/mysql.server /etc/rc.d/init.d/mysqld
chmod 755 /etc/rc.d/init.d/mysqld
chkconfig --add mysqld
chkconfig --level 3 mysqld on
change root password
/usr/local/mysql/bin/mysqladmin -u root password ‘new-password’
# To Strip mysqld yeilding up to 4% performance gain.
strip /usr/local/mysql/libexec/mysqld
edit /etc/rc.d/init.d/mysqld
add --skip-name-resolve to $bindir/mysqld_safe --datadir=$datadir --pid-file=$pid_file
Mount the file system with noatime
/dev/VolGroup00/LogVol04 /usr/local/mysql/var ext3 rw,noatime 1 2
Get Kernel http://www.kernel.org/
make menuconfig
make
make modules_install
make install
rm -f /boot/initrd-2.6.19.1.img
mkinitrd /boot/initrd-2.6.19.1.img 2.6.19.1
Installing FreeTDS
wget ftp://ftp.ibiblio.org/pub/Linux/ALPHA/freetds/stable/freetds-stable.tgz
./configure \
–prefix=/usr/local/freetds \
–enable-msdblib
make
make install
Configuring php
./configure \
–with-apxs2=/usr/local/apache/bin/apxs \
–with-openssl \
–enable-track-vars \
–with-mysql=/usr/local/mysql/ \
–with-mssql=/usr/local/freetds
Sample Code
$s = “server:1433”;
$u = “sa”;
$p = “password”;
$msconnect=mssql_connect ($s,$u,$p);
$msdb=mssql_select_db(“Northwind”,$msconnect);
$msquery = “select titleofcourtesy,firstname,lastname from employees”;
$msresults= mssql_query($msquery);
$msconnect=mssql_connect ($s,$u,$p);
$msdb=mssql_select_db(“Northwind”,$msconnect);
$msquery = “select titleofcourtesy,firstname,lastname from employees”;
$msresults= mssql_query($msquery);
while ($row = mssql_fetch_array($msresults)) {
echo $row[‘titleofcourtesy’] .” “. $row[‘firstname’] .” “. $row[‘lastname’] ;
}