Keep Server Online
If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.
or
A donation makes a contribution towards the costs, the time and effort that's going in this site and building.
Thank You! Steffen
Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
| |
|
Topic: Newbie ask: How to make MySQL dB available to Apache ? |
|
Author |
|
Mel_3
Joined: 20 Sep 2008 Posts: 7
|
Posted: Sun 28 Sep '08 22:05 Post subject: Newbie ask: How to make MySQL dB available to Apache ? |
|
|
- I've installed Apache, MySQL, and PHP into c:\webdev\ on my XP PC.
- I've started mysql from the windows command line and created a table and put some data in it.
- After installing Apache I created a PHP page in c:\webdev\wwwroot\ and it works !!
- Now I want to create PHP files to create records in a MySQL database & execute queries... etc
My Questions:
1 - My MySQL database was created by launching MySQL from the Windows command line... can Apache access it via the PHP files I put in the c:\webdev\www.root\ folder ?
2 - Once Apache is running... can it access any file and/or folder on the machine it is running on or must they be in the c\webdev\wwwroot folder or subfolder?
3 - Must I "tell" Apache that MySQL is installed, where it is installed, and where the MySQL data files are located? If so how?
Thanks for any help. |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7373 Location: Germany, Next to Hamburg
|
Posted: Mon 29 Sep '08 16:57 Post subject: |
|
|
There is a PHP script that tests your mysql installation
mysqlinfo.zip
to 1) You can access MySQL via PHP in your wwwroot
to 2) apache "access" only files which are in your wwwroot or in a subfolder.
to 3) You don't have to tell apache that MySQL is installed and where. You can access it with PHP and the interface which offers. |
|
Back to top |
|
Mel_3
Joined: 20 Sep 2008 Posts: 7
|
Posted: Mon 29 Sep '08 19:32 Post subject: |
|
|
Thanks James. That was the info I was looking for.
I ended up with not having installed the php extension php_mysqli.dll when I did the php install.
I went back and did it... then edited the php.ini file so php could access the extension... then things started working.
Thanks again for the help. |
|
Back to top |
|
|
|
|
|
|