Page 1 of 1

Found my extension problem with a new problem...

Posted: Sun Oct 06, 2002 6:08 am
by Rider
I did the follow code and it failed to show on my machine:

Code: Select all

<html>
<head>
<title>Today's Date</title>
</head>
<body>
<p>Today's Date (according to this Web server) is
<?php  echo( date("l, F dS Y.") );?>
</p>
</body>
</html>
So, that means that PHP4 isn't working. Well, after going into my install.txt file I noticed:

You need to ensure that the dlls which php uses can be found. The precise
dlls involved depend on which web server you use and whether you want to
run php as a cgi or as a server module. php4ts.dll is always used. If you are
using a server module (e.g. isapi or apache) then you will need the relevent
dll from the sapi folder. If you are using any php extension dlls then you
will need those as well. To make sure that the dlls can be found, you can
either copy them to the system directory (e.g. winnt/system32 or
windows/system) or you can make sure that they live in the same directory
as the main php executable or dll your web server will use (e.g. php.exe,
php4apache.dll).


That confuses me a little. I do run Apache2. I took the .dlls out of the 'sapi' folder and put them with the php.exe and all. But, I think the problem is that when I try to run 'php.exe' it pops up ms-dos puts a new title called 'php' and does nothing.

I did the manual way. Put the php.ini in c:\windows\ and did the extensions_dir = c:\rider\php4\extensions

But, should I take all the .dlls out of 'extensions' and put them in php4 with the original .dlls and the .dlls from the 'sapi' folder?

Thanks for the help.

-Rider

Posted: Sun Oct 06, 2002 10:53 am
by Takuma
Have you configured Apache2? And also when you want to view PHP pages you're suppose to run Apache not PHP... :wink:

Posted: Sun Oct 06, 2002 9:47 pm
by Rider
Takuma wrote:Have you configured Apache2? And also when you want to view PHP pages you're suppose to run Apache not PHP... :wink:
Apache is running. When I meant 'run php' I meant the auto-install php.exe. So, how would I go about configuring Apache so I can get PHP up and running?

-Rider

Posted: Mon Oct 07, 2002 1:19 am
by Takuma
First of all get the very latest version of PHP from snaps.php.net and copy DLL files etc to %SYSTEMROOT%. Then add these lines to httpd.con (I assume that you've saved PHP in C:\PHP)

Code: Select all

LoadModule php4_module c:/php/sapi/php4apache2.dll
   AddType application/x-httpd-php .php

Posted: Mon Oct 07, 2002 1:54 am
by Rider
%systemroot% would be C:\Windows for WinME?

Also, all dlls are to be copied there?

-Rider

Posted: Mon Oct 07, 2002 2:07 am
by Rider
Even when I put the dlls in C:\Windows and add

Code: Select all

LoadModule php4_module c:/rider/php4/php4apache2.dll 
   AddType application/x-httpd-php .php
At the bottom for the httpd.conf file it still doesn't work. And yes, Apache is running when I view the site.

Is there something really dumb I'm doing? Maybe Apache1 would be better?

-Rider

Posted: Mon Oct 07, 2002 2:09 am
by twigletmac
Apache 1.3 should be easier to get running and getting PHP to work with it is fairly well documented.

Mac

Posted: Mon Oct 07, 2002 3:45 am
by mikeq
What file extension did you give to your file?

Posted: Mon Oct 07, 2002 4:30 am
by Rider
.inc

But, that isn't the problem. It's because PHP and Apache aren't playing nicely like they should.

-Rider

Posted: Mon Oct 07, 2002 4:59 am
by mikeq
Okay, so you have told apache to interpret .inc as a PHP file?