Jump to content

apache handler/mime


cgeniusgo

Recommended Posts

I was attempting to add a file extension that runs through the php code parser that converts "<? echo("test"); ?>" into "test" i know php, php3, php4, php5, php6 all convert that code but i was attempting to add .pro to them. I found out that you should add it into the apache handlers i think. So i added application/x-httpd-php to the list with the extention i wanted .pro but i open the browser. the code pops up and is not converted by the php script builder and i was wondering why it wasn't i tried everything this article showed but it didnt work help please?

Link to comment
Share on other sites

I tried both the AddType and the AdHandler and neither one nor both together worked for me either.

 

AddType application/x-httpd-php .pro
AddHandler application/x-httpd-php .pro

 

I Also noticed awhile back that the .phps extention doesn't work either and the mime type is already there by default in the MIME Types.

 

http://byrondallas.heliohost.org/php/countdown.phps

 

Maybe djbob will look into this?

 

 

Link to comment
Share on other sites

When I add a x-httpd-php5-source handler and try to point .phps files to the that handler, I get a strange error that turns up nothing in Google ("Handler application/x-httpd-php5-source not found"). Except if I actually enter a Handler it doesn't know, Apache should (and does) just ignore it. Look like syntax-highlighting is poorly implementing in suPHP. I recommend trying this hack to get around the issue (the FAQ they source is outdated to show that suPHP can't handle syntax highlighting is outdated, though; suPHP claims it is supported as of version 0.7.0).

Link to comment
Share on other sites

Seems the syntax-highlighting is working just not with the .phps

 

<?php
highlight_file('analog-clock.php');
?>

 

http://byrondallas.heliohost.org/php/php-highlight_file.php

 

It's not that big of a deal (.phps) since I can use that function if I want to color code my php and there's also a function to highlight just a string of code.

 

highlight_string('');

 

It was just a little easier to add the s to the file name and resave it that way.

 

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...