PDA

View Full Version : Apache handlers: Screwed it up!


ReneH
04-15-2001, 02:04 PM
Hello! All

tried tinkering with the Apache handlers and screwed things up! I was attempting to all parsing of a php ssi within html document. Looked through knowledge base but nothing relevant to this. There is no where to be found, either in admin panel or KB, how to restore this. Getting server 500 errors. Wish I hadn;t tinkered with this area of the panel.

petesmc
04-15-2001, 02:28 PM
Hi,

What do you mean by a PHP SSI, there is no such thing.

-peter

ReneH
04-15-2001, 02:45 PM
Hello!

I was trying to allow SSI to be parsed in .html file. Somehow this action screwed thing up. I will be very happy if I can get the orginal Apache handlers config resotred. Gotta wait for my ticket request to be handled I guess.

Odium
04-15-2001, 02:55 PM
I think what ReneH is talking about is using PHP includes in HTML files.

It's pretty easy to set up, just go to Apache Handlers in the Control Panel, and add:

Extension(s): .html
Handler: application/x-httpd-php

Or to set it up so you can use SSI in .html files, just add:

Extension(s): .html
Handler: server-parsed

I'm not sure what you did to get 500 errors, but you might want to delete the user-defined handlers first just to start with a clean slate, before adding new ones.

ReneH
04-15-2001, 02:59 PM
IHowever, the php extension is .php3 and not .php.

Odium
04-15-2001, 03:01 PM
Err...you can use either extension.

petesmc
04-15-2001, 03:02 PM
BTW, Your ticket has been answered.

ReneH
04-15-2001, 03:09 PM
Thanks all for putting up with my lack of php knowledge. What I am trying to do is call up banners on a .php3 file but no dice yet. I am using the following code within an ".html" template:

<php>

<virtual("cgi-bin/webadverts/ads.pl");

</php>

Can't get it to work this way. Any suggestions? Perhaps wrong path?

petesmc
04-15-2001, 03:12 PM
<?php
include("cgi-bin/webadverts/ads.pl");
?>

ReneH
04-15-2001, 07:06 PM
Tried the code change and still not getting any banners. I am sure of the path, not sure what else could be the problem. Back to the drawing board.

petesmc
04-15-2001, 07:29 PM
Sorry, I don't think you can include cgi code in a php file.

mark_olson
04-15-2001, 08:51 PM
First try changing the path to:
/home/username/public_html/cgi-bin/webadverts/ads.pl

If that doesn't work this (http://php.resourceindex.com/Complete_Scripts/Advertisements/) is a good listing of PHP based banner rotators (I'm assuming webadverts is just that).

ReneH
04-16-2001, 05:41 PM
Hello! Mark

I am considering a php ad banner script instead but almost all of them have some tricky installs. I am considering installing either PhP WebAdsNew or Oasis. Oasis is my choice but the install seems rather challenging. The PHP WebAds seems a little easier to install. Anyone here experienced headacjes installing these packages? Any solid recommendations? Thnaks in advance.

eric418
04-26-2001, 09:08 PM
if you want to execute perl in php document, u have to use exec() or passthru().

You can not just include it. What you want is to execute the perl script but no load the content..

get to php.net and check out those functions, you'll see how to exec a perl script in php

dakno.com
03-12-2003, 10:28 PM
Ahhh Now I did the same thing. www.kendalltodd.com How do I reset? I am also getting a 500 error but only on .html files. What can I do to get things back to normal.

don5408
03-13-2003, 02:21 AM
"What can I do to get things back to normal"

Hi. When I just checked I didn't seem to get any 500 errors accessing *.html files at the site referenced in your link so you've likely already figured this out getting things back to normal on your own, however just in case if your problems are the result of a user defined Apache handler either go back into Apache Handlers in your HR Control Panel and delete the problematic handler or remove the AddHandler lines added to the .htaccess file in your public_html folder manually.

Don