★ wanayoo — archive 1999 http://www.devshed.com/Talk/Forums/Forum5/HTML/000203.htmlNouvelle recherche | Portail wanayoo
DevShed Menu
* DevShed Home
* Developer News
* DevShed Brain Dump




UBBFriend: Email This Page to Someone!
  DevShed Discussion Forums
  PHP
  Setting up MySQL and php on NT box???

Post New Topic  Post A Reply
profile | register | preferences | faq | search

next newest topic | next oldest topic
Author Topic:   Setting up MySQL and php on NT box???
antfarm
Junior Member
posted October 03, 1999 08:51 PM     Click Here to See the Profile for antfarm   Click Here to Email antfarm     Edit/Delete Message Reply w/Quote
I'm new to the whole php/database server thing. I have a WinNT machine with Apache for NT running on it. The tut here shows how you do it for Unix/Linux boxes, I'd like to stick w/ NT for now. When I went to mysql.net, they had a ver. for windows but one that was only a demo. The Linux ver. is free of course. I don't want to have to pay so I can run a few php scripts. I mean Apache for Windows is free. Is there some other way? Also, the php downlaod that I saw for Windows is designed for the MS IIS server. I definitely don't want to run that, cuz Apache is far better, where can I get php for Apache on an NT machine? Maybe I'm misunderstanding something. Thanks for the info.

jpenix
Member
posted October 04, 1999 03:43 PM     Click Here to See the Profile for jpenix   Click Here to Email jpenix     Edit/Delete Message Reply w/Quote
PHP's own manual covers installation with Apache under Windows 95/NT.

See here: http://www.php.net/manual/install-windows95-nt.php3

You don't need MySQL for PHP scripts to use a database. You can connect it to an MSAccess database using ODBC, or you can connect it to SQL server (if you have BackOffice), or Sybase or Oracle, etc, etc. Check out PHP's list of supported DBs.

(On a side note - Be careful with the MySQL licensing - the current version isn't totally free, even under Linux. It's free for internal use, but if you sell it as part of a product or charge for installing and maintaining it, you gotta pay the license fee (which is very reasonable)).

antfarm
Junior Member
posted October 04, 1999 04:19 PM     Click Here to See the Profile for antfarm   Click Here to Email antfarm     Edit/Delete Message Reply w/Quote
Thanks. That helped, but now I don't seem to be able to run scripts. However there are no errors at all int he apache error log. When I insert this:<br>
"<? today = date("Y-m-d");<br>
PRINT "<CENTER>Today is:$today.</CENTER>";<br>
?><br>

into my index.htm file, nothing happens at all. It's as if nothing was there, but if you look at the source the php code is there. Could it be b/c I have apache under a long directory name? It's in
<br>"c:\program files\apache\htdocs" which is exactly how I pointed to the document root dir in my php3.ini file. I did not uncomment any modules in the php3.ini file, I think these modules are only for accessing databases and stuff. Is there another way to find out if php is set up on my server? What could be wrong? Thanks again...

vdschoor
Member
posted October 04, 1999 05:49 PM     Click Here to See the Profile for vdschoor   Click Here to Email vdschoor     Edit/Delete Message Reply w/Quote
You've got some errors in your PHP code,
What you did is, you put HTML tags within a server-side section, this is not allowed, only when you print them to the page.

You did this :
<? ... print".....";<BR>?>

What you want to do is this :
<? ... print".... <BR>"; ?>

Or :
<? print "...."; ?> <BR>

To see if PHP3 is setup on your server, there is a PHP command to do this.
Just put this line in your PHP file :

<? echo phpinfo() ?>

and put this one in there :

<? echo phpversion() ?>

antfarm
Junior Member
posted October 04, 1999 07:53 PM     Click Here to See the Profile for antfarm   Click Here to Email antfarm     Edit/Delete Message Reply w/Quote
Actually there was no <br> in there originally. I tried using that in this message box thinking it would format my message.Anyway, I tried inserting
code:
<? echo phpinfo() ?>

into my html document, but nothing happened again.
I also tried inserting
code:
<? print "....uhdfh <BR>" ?>

in there and nothing happened. Am I supposed to put the php code in another file and link to it in the html page or something. I thought I could write all the php code write in the html page if I wanted.
If you go to 24.8.96.139
you will see what I'm doing. You can see the php line in the source. Any ideas?

jpenix
Member
posted October 05, 1999 04:40 PM     Click Here to See the Profile for jpenix   Click Here to Email jpenix     Edit/Delete Message Reply w/Quote
I haven't done PHP on NT before, but there are a couple things I remember reading as common pitfalls:

1) You should rewrite the paths without long filenames (e.g "c:\progra~1\apache\htdocs")

2) Since you're putting the PHP code on your "index.htm" file, make sure Apache is configured to send all *.htm files through the PHP parser. Otherwise you'll get exactly what you're getting now (code printed instead of executed). Or rename the page to index.php3 (or whatever you configured as your PHP extension in Apache).

antfarm
Junior Member
posted October 05, 1999 06:48 PM     Click Here to See the Profile for antfarm   Click Here to Email antfarm     Edit/Delete Message Reply w/Quote
Thanks guys it worked!!
All I needed to do was add a line in Apache's
srm.conf file so that .htm files would go
through php. The default is only .php or .phtml
For my setup, I didn't have to change the long
filename to anything, it works fine; i guess it's
different for each machine sometimes.
Thanks a lot for your help guys.

Gianni
Member
posted October 11, 1999 01:01 PM     Click Here to See the Profile for Gianni   Click Here to Email Gianni     Edit/Delete Message Reply w/Quote
Could you tell me where you added that line ?? I get a file download window when i try to view a php3 document....maybe that will help me.

All times are MST (US)

next newest topic | next oldest topic

Administrative Options: Close Topic | Archive/Move | Delete Topic
Post New Topic  Post A Reply
Hop to:

Contact Us | DevShed.com

Copyright © 1997-2000 ngenuity. All rights reserved.

Powered by: Ultimate Bulletin Board, Version 5.41a
© Infopop Corporation (formerly Madrona Park, Inc.), 1998 - 1999.