homepage Welcome to WebmasterWorld Guest from 54.237.249.10
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Visit PubCon.com
Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
Forum Library, Charter, Moderators: coopster & jatar k

PHP Server Side Scripting Forum

    
php in html
can't make my linux dedicated server parse php code in html files
enotalone




msg:1312109
 6:00 pm on May 16, 2003 (gmt 0)

php in html
ok, i went with hostway's dedicated linux server. problem is i desperatly need to have php code executed inside my html files. me or hostway support just can't do this despite tring everything.

me php configuration can be viewed @
php is installed as cgi under linux, apache, php version number 4.3.1
Trying to solve the problem by adding

AddType application/x-httpd-php .php .html
AddHandler php-script html

or
AddType application/x-httpd-php .php .php3 .html

to my .htaccess or .httpd does not work

my old shared hosting at affinity is able to do this my putting simple .htaccess file. there i had php under solaris, unix, under apache, as cgi, php 4.0.6 i think, but the new server is just impossible.

I would really appreciate any help. thanks. arman

[edited by: jatar_k at 6:10 pm (utc) on May 16, 2003]
[edit reason] no urls thanks [/edit]

 

DrDoc




msg:1312110
 6:02 pm on May 16, 2003 (gmt 0)

php is installed as cgi

..which means that your PHP scripts must be named something like foo.cgi and have the PHP shebang in the script: #!/usr/bin/php4 (or whatever the path is on the server)

nell




msg:1312111
 8:02 pm on May 21, 2003 (gmt 0)

To make your .htm or .html pages process like they were .php, just add this line to your .htaccess file:

AddType application/x-httpd-php .html .php .htm

DrDoc




msg:1312112
 5:22 am on May 23, 2003 (gmt 0)

Well, nell... that doesn't help if PHP is installed as CGI. Then it has to be run as a CGI file. The Apache PHP module won't help (unless it's installed).

bardioc




msg:1312113
 11:35 am on May 23, 2003 (gmt 0)

use the cgi-bin folder for the scripts,
otherwise it won't do anything ...

DrDoc




msg:1312114
 4:30 pm on May 23, 2003 (gmt 0)

Welcome to Webmaster World, bardioc! :)

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved