Mailing List Archive

Support open source code!


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: PHP/Apache/Mysql



Here's a cut and paste of a cookbook recipe I made for myself after putting
MySQL and PHP in Mandrake5.3 successfully.  See if it helps any, especially
the part at the end.

HTH,

Glenn

1. Download and install mysql from http://mysql.com. At the very least
install the latest server, client, and development rpms.
2. Try out MySQL by doing the following:
At the command prompt, type mysqladmin create databasename (enter)
mysql databasename (enter). If you get a welcome, you're OK. Get out with
ctrl-z.
3. Download, gunzip, and untar the PHP tarball from http://php.net.
4. CD into the PHP directory and build it with:

./configure --with-apxs=/usr/sbin/apxs --with-mysql --with-ldap (those are
double hyphens)
the ldap part errored out, so I had to delete it and try again. With Apache
1.3.9 or later you can add --with-xml 5.

5. Type: make (enter)
make install
After 'make install' you get:

/usr/sbin/apxs -i -n php3 libphp3.so
cp libphp3.so /usr/lib/apache/libphp3.so
chmod 755 /usr/lib/apache/libphp3.so

6. Go to /etc/httpd/conf/httpd.conf and uncomment these two lines:
LoadModule php3_module libexec/libphp3.so
AddModule mod_php3.c
7. Check to make sure that in /etc/httpd/conf/srm.conf the lines
Addtype application/x-httpd-php3 .php3
Addtype application/x-httpd-php3-source .phps
are not commented out.
8. Restart Apache with: /etc/rc.d/init.d/httpd restart
9. Test it. Put a file in your document root directory /home/httpd/html with
the single line:

<?phpinfo()?>

and name it info.php3. Then load it up in your browser:
http://your.machine/info.php3 You should see a nice summary page showing all
sorts of information about your setup.
The data base files go in /var/lib/mysql.
The executables are in /usr/bin.



----- Original Message -----

From: "Uva Coder" <uvacoder@example.com>
To: <tlug@example.com>
Sent: Sunday, July 08, 2001 12:47 PM
Subject: Re: PHP/Apache/Mysql


> On Sun, Jul 08, 2001 at 11:39:36AM +0900, Liton wrote:
> > Now I think I should be able to write php and open it with a browser.
> > Something like this:
> > <?
> > print "Hello Web";
> > ?>
> > By saving it as "test.php", not a single character
> > on my browser window when I open it. Any help please.
>
> Change the first line from "<?" to "<?php" and try to view
> it in a browser again.
>
> -- Uva
>
> -----------------------------------------------------------------------
> Next Technical Meeting:  Sat, July 14 13:30-
> Next Nomikai Meeting:    Fri, Aug  10 19:30-  Tengu Tokyo Eki-Mae
> -----------------------------------------------------------------------
> more info: http://www.tlug.gr.jp           Sponsor: Global Online Japan
>



Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links