| ★ wanayoo — archive 1999 http://www.devshed.com/Talk/Forums/Forum5/HTML/000203.html | Nouvelle recherche | Portail wanayoo |
|
|
DevShed Discussion Forums
![]() PHP
![]() Setting up MySQL and php on NT box???
|
| next newest topic | next oldest topic |
| Author | Topic: Setting up MySQL and php on NT box??? |
|
antfarm Junior Member |
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 |
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 |
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 |
|
vdschoor Member |
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 : What you want to do is this : Or : To see if PHP3 is setup on your server, there is a PHP command to do this. <? echo phpinfo() ?> and put this one in there : <? echo phpversion() ?> |
|
antfarm Junior Member |
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 |
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 |
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 |
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 |
![]() |
|
Copyright © 1997-2000 ngenuity. All rights reserved.
Powered by: Ultimate Bulletin Board, Version 5.41a
© Infopop Corporation (formerly Madrona Park, Inc.), 1998 - 1999.