cgeniusgo Posted August 31, 2009 Posted August 31, 2009 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?
Byron Posted August 31, 2009 Posted August 31, 2009 Did you try adding this to your .htaccess file? AddHandler application/x-httpd-php .pro
cgeniusgo Posted August 31, 2009 Author Posted August 31, 2009 yes, they were their already and i tried removing them, saving, then reimplementing them, saving, and nothing...
Byron Posted August 31, 2009 Posted August 31, 2009 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?
cgeniusgo Posted August 31, 2009 Author Posted August 31, 2009 hopefully i really would like to have this problem fixed..
Ashoat Posted September 1, 2009 Posted September 1, 2009 I'm looking at this right now. I'll let you know once I figure something out.
Ashoat Posted September 2, 2009 Posted September 2, 2009 Try this: AddHandler application/x-httpd-php5 .pro
Byron Posted September 2, 2009 Posted September 2, 2009 Try this: AddHandler application/x-httpd-php5 .pro Works for me: http://byrondallas.heliohost.org/hello_world.pro What about the .phps extension to show color coded php code? Did you find anything out about it?
Ashoat Posted September 2, 2009 Posted September 2, 2009 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).
Byron Posted September 2, 2009 Posted September 2, 2009 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.
Byron Posted September 2, 2009 Posted September 2, 2009 I just went back and looked at that hack again and they're using the same function too. highlight_file(); I might just add that to my site so I can use .phps
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now