Date: Sun, 23 Apr 2000 21:06:17 -0600 From: "Duke Normandin" <dnormandin@freewwweb.com> To: "Marc Wandschneider" <marcw@lanfear.com>, <freebsd-questions@freebsd.org> Subject: Re: Am I just being dumb (apache/php) Message-ID: <000a01bfad9a$61af23e0$99dba7d1@webserver>
next in thread | raw e-mail | index | archive | help
On Sunday, April 23, 2000 Mitch Vincent <mitch@venux.net> wrote: >Try > ><?php > >phpinfo(); > >?> > >in a file named <something>.php3 > >See what that gets you. > >After that, check out www.php.net and read up :-) > >----- Original Message ----- >From: Marc Wandschneider <marcw@lanfear.com> >To: <freebsd-questions@freebsd.org> >Sent: Sunday, April 23, 2000 7:13 PM >Subject: Am I just being dumb (apache/php) > > >> >> >> whasssuuuppp? >> >> so, I have apache 1.3.9 running on my FreeBSD 3.3 server. I also compiled >> in PHP 3.0.12 support, and added in mysql support as well. >> >> next, I added the following to httpd.conf >> >> AddType application/x-httpd-php3 .php3 >> AddType application/x-httpd-php3-source .phps >> >> and did the demanded copy of php3.ini-dist to /usr/local/lib/php3.ini. >> stopped & started apache, and it prints out the following: >> >> [Sun Apr 23 15:10:28 2000] [notice] Apache/1.3.9 (Unix) PHP/3.0.12 >> configured -- resuming normal operations >> >> Now, the problem is, I can't get any script to actually DO anything. I'm >> assuming that this stuff is basically just server side script that can be >> embedded in HTML, and the server executes right before downloading the >HTML. >> that being the case, I can't get any code to run at all, like <script >> language="php"> \n echo "mooo cow"; \n </script> or any of the other tags >> suggested ... >> >> Am I just way off on my understanding of what I'm supposed to be doing >> here?? >> >> Any suggestions would be appreciated. Do what Mitch suggested.....then cut-n-paste the following into a file called test.php3 <?php print "Goodbye cruel world...."; ?> Called it up with the following: http://localhost/test.php3 If you want to mix PHP code with HTML, you can do: <html> <head><title>My First PHP Page</title></head> <body> <h2 align="center">Marc's HomePage</h2> <?php print "Goodbye cruel world....<br>\n"; ?> <hr> </body> </html> Save this bugger as test.phtml (You'll have to add AddType application/x-httpd-php3 .phtml to your Apache config. When PHP will be doing its thing AND the HTML, I use the .php3 extension. When I break in and out of PHP within an HTML file, I use the .phtml extension. Let me know off-list how you make out! -duke To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?000a01bfad9a$61af23e0$99dba7d1>