From: Daevid Vincent
Date: November 19 2002 6:33am
Subject: How I Got PHP4.2.2, Apache 2.0, mySQL and RedHat 8.0 to work
List-Archive: http://lists.mysql.com/mysql/125274
Message-Id: <004301c28f95$941a0ef0$0500a8c0@telecom>
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Well, it seems there are some glitches with and snags and other fun
stuff to deal with when doing a straight RedHat 8.0 install. It turns
out you have to edit your /etc/php.ini and uncomment out the
"extension=3Dmysql.so" line for starters. It also helps to set
"short_open_tag =3D On".
Another fun thing to contend with is the fact that "register_globals" is
now off by default, soooo, read this page:
http://www.zend.com/zend/art/art-sweat4.php to see how to get around
this (without turning RG on of course).
I have some sites that use .php and some that use .phtml and you'd think
it would be as simple as modifying /etc/httpd/conf.d/php.conf, dupe the
entry and change the extension. Wrong. What I did was change it to:
=20
SetOutputFilter PHP
SetInputFilter PHP
LimitRequestBody 524288
DirectoryIndex index.php index.phtml
I use virtual hosts but none use SSL currently, and haven't figured that
part out with the SSL.conf so I just renamed it to ssl.conf.disabled and
created a virtual-hosts.conf that looks like this:
DocumentRoot /home/foo/public_html
ServerName foo.com
ServerAlias ww.foo.com *.foo.*
ErrorLog logs/foo-error_log
CustomLog logs/foo-access_log common
And at the end of the httpd.conf file you have to turn VH on by
uncommenting "NameVirtualHost *" And I also added this at the bottom to
catch all that don't match with an entry in my virtual-hosts.conf file
above:
ServerAdmin webmaster@localhost
DocumentRoot /var/www/html
ServerName localhost
ErrorLog /etc/httpd/logs/error_log
CustomLog /etc/httpd/logs/access_log common
I also went ahead and installed mySQL-MAX, so you need to create a
/etc/my.cnf file and put something like:
[mysqld]
# You can write your other MySQL server options here
# ...
innodb_data_home_dir=3D
# Data file(s) must be able to
# hold your data and indexes.
# Make sure you have enough
# free disk space.
innodb_data_file_path =3D ibdata1:10M:autoextend
# Set buffer pool size to
# 50 - 80 % of your computer's
# memory
set-variable =3D innodb_buffer_pool_size=3D70M
set-variable =3D innodb_additional_mem_pool_size=3D10M
# Set the log file size to about
# 25 % of the buffer pool size
set-variable =3D innodb_log_file_size=3D20M
set-variable =3D innodb_log_buffer_size=3D8M
# Set ..flush_log_at_trx_commit
# to 0 if you can afford losing
# some last transactions=20
innodb_flush_log_at_trx_commit=3D1
set-variable =3D innodb_lock_wait_timeout=3D50
#innodb_flush_method=3Dfdatasync #set-variable =3D
innodb_thread_concurrency=3D5
skip-locking
set-variable =3D max_connections=3D200
#set-variable =3D read_buffer_size=3D1M
set-variable =3D sort_buffer=3D1M
# Set key_buffer to 5 - 50%
# of your RAM depending on how
# much you use MyISAM tables, but
# keep key_buffer + InnoDB
# buffer pool size < 80% of
# your RAM
set-variable =3D key_buffer=3D10M
Somehow the pretty "/etc/rc.d/init.d/mysql" script has changed (probably
due to mysqlMax) I like the old one with the green [ OK ] messages like
everything else there and I'm not sure how to get it back :( but it
works for now and I have innoDB tables, so I can't complain too much.
Hope this helps someone and saves them the nearly 7 hours I've spent
today getting it all working. Most of that is sifting through a million
web pages and trying to find the magic incantation on Google to get the
solutions.
D=C6VID.
http://daevid.com