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=mysql.so" line for starters. It also helps to set
"short_open_tag = 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:
<FilesMatch "\.(php|phtml|phps|php4|php3)$">
SetOutputFilter PHP
SetInputFilter PHP
LimitRequestBody 524288
</FilesMatch>
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:
<VirtualHost *>
DocumentRoot /home/foo/public_html
ServerName foo.com
ServerAlias ww.foo.com *.foo.*
ErrorLog logs/foo-error_log
CustomLog logs/foo-access_log common
</VirtualHost>
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:
<VirtualHost *>
ServerAdmin webmaster@localhost
DocumentRoot /var/www/html
ServerName localhost
ErrorLog /etc/httpd/logs/error_log
CustomLog /etc/httpd/logs/access_log common
</VirtualHost>
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=
# Data file(s) must be able to
# hold your data and indexes.
# Make sure you have enough
# free disk space.
innodb_data_file_path = ibdata1:10M:autoextend
# Set buffer pool size to
# 50 - 80 % of your computer's
# memory
set-variable = innodb_buffer_pool_size=70M
set-variable = innodb_additional_mem_pool_size=10M
# Set the log file size to about
# 25 % of the buffer pool size
set-variable = innodb_log_file_size=20M
set-variable = innodb_log_buffer_size=8M
# Set ..flush_log_at_trx_commit
# to 0 if you can afford losing
# some last transactions
innodb_flush_log_at_trx_commit=1
set-variable = innodb_lock_wait_timeout=50
#innodb_flush_method=fdatasync #set-variable =
innodb_thread_concurrency=5
skip-locking
set-variable = max_connections=200
#set-variable = read_buffer_size=1M
set-variable = sort_buffer=1M
# 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 = key_buffer=10M
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ÆVID.
http://daevid.com
| Thread |
|---|
| • How I Got PHP4.2.2, Apache 2.0, mySQL and RedHat 8.0 to work | Daevid Vincent | 19 Nov |