kozart
11-30-2002, 04:54 PM
Quick question if you will. I have slack 8.1 and the php package is installed. When I setup php on the server if I go to the php file it just shows the source of it.. Any ideas why?
|
Click to See Complete Forum and Search --> : PHP on server kozart 11-30-2002, 04:54 PM Quick question if you will. I have slack 8.1 and the php package is installed. When I setup php on the server if I go to the php file it just shows the source of it.. Any ideas why? Thanatos 11-30-2002, 05:24 PM Don't know exactly, but I know in perl that your first line has to point to youer perl interpreter, such as: #!/usr/bin/perl or some such nonsense. one sec, lemme check the book on php.... Ah yes, from "PHP Essentials" by Julie C. Meloni, PrimaTech publishing (on sale for 10 bucks at Books-A-Million a few months ago) " Configuring Apache requires that you edit the httpd.conf file, located in in your apache configuration directory (usually /etc/httpd/conf/). The goal of the configuration is to tell Apache what to do with files ending with .php3, .phtml, .php, or anything else you use to indicate a php file. .. ...You'll be telling Apache to execute an application in order to do something with htose files--in this case, to run the php.exe program to parse the PHP code. Add the following lines to the file: ScriptAlias /php3/ "/path to php dir/" AddType application/x-httpd-php3 .php3 .phtml Action application/x-httpd-php3 "/php3/php.exe" basically, you're telling apache to run php.exe whenever you encounter a .php file. oh, and make sure your files start with <?php and end with ?> kozart 11-30-2002, 07:11 PM Fixed it :) It was just commented out in the httpd.conf justlinux.com
Copyright Internet.com Inc. All Rights Reserved. |