Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Closed Thread
PHP in HTML and GoDaddy
Old 09-04-2007, 04:30 PM PHP in HTML and GoDaddy
Junior Talker

Posts: 1
Trades: 0
Hi,

I have a client who's site is hosted by GoDaddy. Ugh. I have successfully put php code into HTML pages and can get them to be parsed by modifying the .htacess file with a "AddHandler x-httpd-php .html .htm .cgi .php".

However, as soon as I add that to the .htaccess file, the stats interface that GoDaddy provides them does not work. I get this:

Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, support@supportwebsite.com and inform them of the time the error occurred, and anything you might have done that may have caused the error.
More information about this error may be available in the server error log.
Apache/1.3.33 Server at anokacountyonline.com Port 80

If I remove the .html from "AddHandler x-httpd-php .html .htm .cgi .php".
stats work again, but obviously my php does not. I have tried other AddHandler and AddType lines that do not work for the php side of it.

GoDaddy gives my client no access to error logs or any kind of access to the stats folder. I checked the .html pages in the stats folder and it's straight html. I am not sure why having .html parsed through php first would screw things up in the folder.

Any help appreciated!

Last edited by adobery; 09-04-2007 at 04:31 PM..
adobery is offline
View Public Profile
 
 
Register now for full access!
Old 09-04-2007, 05:11 PM Re: PHP in HTML and GoDaddy
joder's Avatar
Flipotron

Posts: 6,442
Name: James
Location: In the ocean.
Trades: 0
I use GoDaddy and had to add this line as well
AddType application/x-httpd-php .html .php .phtml
joder is offline
View Public Profile
 
Old 09-04-2007, 06:38 PM Re: PHP in HTML and GoDaddy
dansgalaxy's Avatar
Defies a Status

Posts: 6,521
Name: Dan
Location: Swindon
Trades: 0
Simple answer switch hosts (to me )

from what i seen on the net godaddy seems a very big but not a very fufilling host

i would suggest get some good cpanel hosting! then if you need to add this i think you can do it throught the panel

Also why cant you just use a .php extention?

Dan
__________________
Discounted Web Hosting With XDnet!
>> Get 25% of hosting~ Promo: Webmaster-talk <<

Please login or register to view this content. Registration is FREE
dansgalaxy is offline
View Public Profile Visit dansgalaxy's homepage!
 
Old 09-04-2007, 06:45 PM Re: PHP in HTML and GoDaddy
joder's Avatar
Flipotron

Posts: 6,442
Name: James
Location: In the ocean.
Trades: 0
Quote:
Originally Posted by dansgalaxy View Post
Simple answer switch hosts (to me )

from what i seen on the net godaddy seems a very big but not a very fufilling host

i would suggest get some good cpanel hosting! then if you need to add this i think you can do it throught the panel

Also why cant you just use a .php extention?

Dan
At least GoDaddy works and is a good price compared to a lot of the crappy ones out there.

Apache has to be configured. I don't know why they have it where you set it up. Maybe everyone that uses the service doesn't want it configured for php. If you set up php on a server, apache has to be configured for it. It's not done automatically.
joder is offline
View Public Profile
 
Old 09-04-2007, 06:49 PM Re: PHP in HTML and GoDaddy
dansgalaxy's Avatar
Defies a Status

Posts: 6,521
Name: Dan
Location: Swindon
Trades: 0
yes i know... but if they have PHP isntalled on the server wouldnt they have it configured? and if they dont want to use PHP then it simple dont have files with .php ext Lol
__________________
Discounted Web Hosting With XDnet!
>> Get 25% of hosting~ Promo: Webmaster-talk <<

Please login or register to view this content. Registration is FREE
dansgalaxy is offline
View Public Profile Visit dansgalaxy's homepage!
 
Old 09-04-2007, 07:32 PM Re: PHP in HTML and GoDaddy
joder's Avatar
Flipotron

Posts: 6,442
Name: James
Location: In the ocean.
Trades: 0
If you will notice one part of the
AddHandler x-httpd-php .html .htm .cgi .php
means I can use php in files named with .html I don't have to name my files with a .php extension
joder is offline
View Public Profile
 
Old 09-04-2007, 09:32 PM Re: PHP in HTML and GoDaddy
metho's Avatar
Ultra Talker

Posts: 481
Location: Gold Coast - Brisbane QLD, Australia
Trades: 0
Your stats package probably doesn't like php attempting to parse its cgi files. If your stats apps uses perl/cgi to output it's html pages, there's going to be a conflict.

How does this work?

"AddHandler x-httpd-php .html .htm .php"
__________________
I do
Please login or register to view this content. Registration is FREE
based.
Spend a lot of time in
Please login or register to view this content. Registration is FREE
.
And
Please login or register to view this content. Registration is FREE
chews up the rest.
metho is offline
View Public Profile Visit metho's homepage!
 
Old 09-04-2007, 11:18 PM Re: PHP in HTML and GoDaddy
joder's Avatar
Flipotron

Posts: 6,442
Name: James
Location: In the ocean.
Trades: 0
It means that .php .html and .htm files are run through the php parser. Otherwise the html files are treated by Apache as html with no php.
joder is offline
View Public Profile
 
Old 09-05-2007, 12:46 PM Re: PHP in HTML and GoDaddy
dansgalaxy's Avatar
Defies a Status

Posts: 6,521
Name: Dan
Location: Swindon
Trades: 0
so basically your just lazy
__________________
Discounted Web Hosting With XDnet!
>> Get 25% of hosting~ Promo: Webmaster-talk <<

Please login or register to view this content. Registration is FREE
dansgalaxy is offline
View Public Profile Visit dansgalaxy's homepage!
 
Old 09-05-2007, 12:49 PM Re: PHP in HTML and GoDaddy
joder's Avatar
Flipotron

Posts: 6,442
Name: James
Location: In the ocean.
Trades: 0
Quote:
Originally Posted by dansgalaxy View Post
so basically your just lazy
I would say I don't want to waste my time copying and pasting the exact same thing over and over and over. The same theory is behind OOP.
joder is offline
View Public Profile
 
Old 09-05-2007, 01:00 PM Re: PHP in HTML and GoDaddy
dansgalaxy's Avatar
Defies a Status

Posts: 6,521
Name: Dan
Location: Swindon
Trades: 0
all you have to do is name the files .php instead
__________________
Discounted Web Hosting With XDnet!
>> Get 25% of hosting~ Promo: Webmaster-talk <<

Please login or register to view this content. Registration is FREE
dansgalaxy is offline
View Public Profile Visit dansgalaxy's homepage!
 
Old 09-05-2007, 04:01 PM Re: PHP in HTML and GoDaddy
metho's Avatar
Ultra Talker

Posts: 481
Location: Gold Coast - Brisbane QLD, Australia
Trades: 0
There are other reasons to have php parse html files. In well established sites (read old), many external site links may be pointing to the files. Adding php functionality by renaming all these files will send the 404 stats through the roof and bust a lot of links. You could add html to the x-httpd-php handler, or add a bunch of 301 redirects; the former is easier.
__________________
I do
Please login or register to view this content. Registration is FREE
based.
Spend a lot of time in
Please login or register to view this content. Registration is FREE
.
And
Please login or register to view this content. Registration is FREE
chews up the rest.
metho is offline
View Public Profile Visit metho's homepage!
 
Old 09-05-2007, 11:04 PM Re: PHP in HTML and GoDaddy
joder's Avatar
Flipotron

Posts: 6,442
Name: James
Location: In the ocean.
Trades: 0
Quote:
Originally Posted by dansgalaxy View Post
all you have to do is name the files .php instead
I guess I could name them .elmerfudd if I wanted to
joder is offline
View Public Profile
 
Old 09-06-2007, 02:05 PM Re: PHP in HTML and GoDaddy
dansgalaxy's Avatar
Defies a Status

Posts: 6,521
Name: Dan
Location: Swindon
Trades: 0
yea, one of my clients (possible soon to be EX-client) has a site (now suspended) where its a games site thing and the ext is .war - how friendly

that would be quite funny to have .somethingreallylongandstupidforaextension be parsed

imaging writing the links!
__________________
Discounted Web Hosting With XDnet!
>> Get 25% of hosting~ Promo: Webmaster-talk <<

Please login or register to view this content. Registration is FREE
dansgalaxy is offline
View Public Profile Visit dansgalaxy's homepage!
 
Closed Thread     « Reply to PHP in HTML and GoDaddy
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 1.26948 seconds with 12 queries