PHP Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsProgramming LanguagesPHP Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old October 3rd, 1999, 09:51 PM
antfarm
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
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.

Reply With Quote
  #2  
Old October 4th, 1999, 04:43 PM
jpenix
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
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)).

Reply With Quote
  #3  
Old October 4th, 1999, 05:19 PM
antfarm
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
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>"crogram filesapachehtdocs" 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...

Reply With Quote
  #4  
Old October 4th, 1999, 06:49 PM
vdschoor
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
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() ?>


Reply With Quote
  #5  
Old October 4th, 1999, 08:53 PM
antfarm
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
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
<BLOCKQUOTE><font size="1" face="Verdana,Arial,Helvetica">code:</font><HR><pre><? echo phpinfo() ?>[/quote]
into my html document, but nothing happened again.
I also tried inserting
<BLOCKQUOTE><font size="1" face="Verdana,Arial,Helvetica">code:</font><HR><pre><? print "....uhdfh <BR>" ?>[/quote]
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?

Reply With Quote
  #6  
Old October 5th, 1999, 05:40 PM
jpenix
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
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 "crogra~1apachehtdocs")

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).

Reply With Quote
  #7  
Old October 5th, 1999, 07:48 PM
antfarm
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
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.

Reply With Quote
  #8  
Old October 11th, 1999, 02:01 PM
Gianni
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
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.

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesPHP Development > Setting up MySQL and php on NT box???

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap