#1
  1. No Profile Picture
    antfarm
    Guest
    Devshed Newbie (0 - 499 posts)
    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.
  2. #2
  3. No Profile Picture
    jpenix
    Guest
    Devshed Newbie (0 - 499 posts)
    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)).
  4. #3
  5. No Profile Picture
    antfarm
    Guest
    Devshed Newbie (0 - 499 posts)
    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...
  6. #4
  7. No Profile Picture
    vdschoor
    Guest
    Devshed Newbie (0 - 499 posts)
    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() ?>

  8. #5
  9. No Profile Picture
    antfarm
    Guest
    Devshed Newbie (0 - 499 posts)
    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?
  10. #6
  11. No Profile Picture
    jpenix
    Guest
    Devshed Newbie (0 - 499 posts)
    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).
  12. #7
  13. No Profile Picture
    antfarm
    Guest
    Devshed Newbie (0 - 499 posts)
    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.
  14. #8
  15. No Profile Picture
    Gianni
    Guest
    Devshed Newbie (0 - 499 posts)
    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.

Similar Threads

  1. Check MySQL Version thru PHP
    By wolftrap1 in forum PHP Development
    Replies: 2
    Last Post: February 11th, 2004, 08:51 PM
  2. Replies: 5
    Last Post: February 11th, 2004, 02:18 AM
  3. Replies: 0
    Last Post: February 10th, 2004, 11:44 PM
  4. Replies: 0
    Last Post: January 30th, 2004, 01:22 PM
  5. Copying Mysql files from one box to another
    By 88guy in forum MySQL Help
    Replies: 1
    Last Post: January 25th, 2004, 12:33 AM

IMN logo majestic logo threadwatch logo seochat tools logo