|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Executing PHP/MySQL on Win XP
I am reading the book: Build Your Own Database Driven Website Using PHP & MySQL by Kevin Yank. I have a website that supports PHP & MySQL, which I have been using to test PHP scripts. As I have Apache server & MySQL installed on my PC, I would like to run my scripts there but where do I place the HTML/PHP files so they will execute properly?.
![]() System Specs: Windows XP Pro. AMD Athlon 1.6 256 MEG Ram PHP 4.3.7 MySQL (mysqld-max-nt) Apache Server 1.3 Mozilla Firefox Browser |
|
#2
|
|||
|
|||
|
Ajak,
You need to place your file in the directory that your server application serves from. Look for a subdirectory '../htdocs' in your apache installation directory tree. An example of this in a typical Apache2 installation would be something like... "D:\Program Files\Apache Group\Apache2\htdocs" You are using Apache 1.3 but this should be the same with Apache2 Hope it helps. daidalus13 |
|
#3
|
|||
|
|||
|
Thanks for replying. Yes I tried that folder first but the php file did not execute, so it must be a configuration problem. It is only a simple example which I have included below, when I run the html file, the php file which it calls, comes up blank. I haven't got a clue how to fix it, any ideas?.
[ welcome1.html ] <html> <head> <title> Query String Link Example </title> </head> <body> <a href="welcome1.php?name=Kevin"> Hi, I'm Kevin! </a> </body> </html> [ welcome1.php ] <html> <head> <title> Query String Link Example </title> </head> <body> <?php $name = $_GET['name']; echo( "Welcome to our Web site, $name!" ); ?> </body> </html> |
|
#4
|
|||
|
|||
|
The code is fine. It works on my pc. It can be a configuration problem. Are you able to run any other php sciprts on the same machine?
Generaly speaking, when something does not work, I try the command line interface, which gives back nice feedback. Trying to fix things by running them on the browser is a lot harder because, as you mentioned, you only got a blank screen to work with. Sorry about the terribly late reply... ! |
|
#5
|
|||
|
|||
|
Hi Ajak,
I've got similar problem when I installed Apache 1.3.33 and PHP4 ... They was runing, but Apache didn't know that there is PHP ... So I check out all my conf for Apache and for PhP ... and every thing was just perfect, exeptone thing : AddType application/x-http-php .php this line in httpd.conf should be : AddType application/x-httpd-php .php and ... the default folder where you should place your http\PhP files is /Appache/htdocs... ![]() |
![]() |
| Viewing: Dev Articles Community Forums > Web Design > Web Server Configuration > Executing PHP/MySQL on Win XP |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|