Welcome to WebmasterWorld Guest from 54.226.246.160

Forum Moderators: coopster & jatar k

Message Too Old, No Replies

php in html

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

     

enotalone

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

10+ Year Member



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

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

WebmasterWorld Senior Member drdoc is a WebmasterWorld Top Contributor of All Time 10+ Year Member



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

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

10+ Year Member



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

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

WebmasterWorld Senior Member drdoc is a WebmasterWorld Top Contributor of All Time 10+ Year Member



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

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



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

DrDoc

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

WebmasterWorld Senior Member drdoc is a WebmasterWorld Top Contributor of All Time 10+ Year Member



Welcome to Webmaster World, bardioc! :)
 

Featured Threads

Hot Threads This Week

Hot Threads This Month