Sybase-PHP-Apache.pdf

(18 KB) Pobierz
Sybase-PHP-Apache mini-HOWTO
Sybase−PHP−Apache mini−HOWTO
Tyson Lloyd Thwaites
tyson.lloydthwaites@ite.com.au
Revision History
Revision 1.3
2001−07−11
Revised by: TLT
Fixed example PHP script.
Revision 1.2
2001−06−13
Revised by: TLT
Shane Gelven pointed out an error in the init script paths.
Revision 1.1
2001−05−29
Revised by: TLT
Updated environment configuration section, changed HOWTO name.
This HOWTO explains how to set up a Linux machine to run an Apache web server using PHP to access a
Sybase−ASE database.
Sybase−PHP−Apache mini−HOWTO
Table of Contents
1. Copyright and License. ...................................................................................................................................1
2. Install Linux. ...................................................................................................................................................2
3. Install Sybase. ..................................................................................................................................................3
4. Configure Environmen.. ................................................................................................................................4
4.1. Preconfigure Apache. ........................................................................................................................5
5. Install PHP. ......................................................................................................................................................6
6. Install Apache. .................................................................................................................................................7
7. Test the System. ...............................................................................................................................................8
8. Post Install Tasks. ...........................................................................................................................................9
i
184432115.001.png
1. Copyright and License
This document is copyright 2001 by Tyson Lloyd Thwaites, and is released under the terms of the GNU Free
Documentation License, which is hereby incorporated by reference. Send feedback to
1. Copyright and License
1
184432115.002.png
2. Install Linux
This howto assumes you have already installed a working Linux system. This howto is based on a Redhat 6.2
system. I would appreciate any feedback on setting this up on other distros.
The first thing you will have to do is uninstall the apache and mod_php rpms. Try the following:
# rpm −e apache
# rpm −e httpd
# rpm −e mod_php
# rpm −e php
That should get rid of them. Just to be sure, run this:
# rpm −qa | less
and check that there is nothing to do with Apache or PHP left on you system.
2. Install Linux
2
184432115.003.png
3. Install Sybase
Download the Sybase−ASE files from linux.sybase.com . Sybase−ASE 11.0.3.3 is free for production. This
howto refers to that version.
First, install the Sybase RPMS as root:
# rpm −ivh sybase−ase−11_0_3_3−6_i386.rpm
# rpm −ivh sybase−doc−11_0_3_3−6_i386.rpm
# rpm −ivh sybase−ocsd−10_0_4−6_i386.rpm
For information on how to configure Sybase, read the instructions in the file
/opt/sybase/doc/howto/howto−ase−quickstart.html . This document is very good, so we
shouldn't need any more information here.
Hint: After you have installed the sample database and run a select against it, you can stop
following the instructions. The rest of the howto goes on to uninstall the sample database, but
we want to keep it for testing later.
NOTE: Some people have reported problems with the way the Sybase init scripts try to
guess the Sybase directory. If you see the following error:
export: sybase−ase−11.0.3.3: not a legal variable name
when trying to run sybinstall.sh, then you need to edit the sybinstall.sh. Open the script and
find the following lines (around line 104):
# export SYBASE=/opt/sybase
export SYBASE=`rpm −q −−queryformat \
'%{installprefix}\n' sybase−ase−11.0.3.3`
Change these lines so they look like this:
export SYBASE=/opt/sybase
#export SYBASE=`rpm −q −−queryformat \
# '%{installprefix}\n' sybase−ase−11.0.3.3`
This hardcodes the SYBASE path to /opt/sybase. If you did install Sybase somewhere
non−standard and you get this error, you will have to change this path to point to your
Sybase directory.
3. Install Sybase
3
184432115.004.png
Zgłoś jeśli naruszono regulamin