View Full Version : application/x-httpd-php-source support dropped?
It appears I can't get that MIME type to work properly. Is it because you dropped it for security reasons?
Sirbular
09-02-2005, 06:05 PM
Yes I believe it has been dropped for security reasons.
BihiraJonathan
09-02-2005, 06:51 PM
The drop was a side effect, as it wasn't intentional. There is however always a workaround. What is the code you are using to add the MIME type?
ns1987
09-04-2005, 05:13 PM
I'm assumig he's using header('stuff');
BihiraJonathan
09-05-2005, 11:47 PM
No, he was trying to use the php source application instead of the php application on the server. However it isn't possible to use php-source, only php. There is currently no workaround, which is sad. Every side effect of the new security has a workaround except this.
I was messing with this today; and I got a workaround for it. In /public_html folder; you should find a file called ".htaccess". If it isnt there; create it; and add this to it:
RewriteEngine On
RewriteRule (.*)\.phps phps.php
Then; in the same folder; create the file "phps.php" and add this code to it:
<?
$uri=substr($_SERVER['REQUEST_URI'],1);
if (file_exists($uri)) highlight_file($uri); else echo "Not Found";
?>
Now you can name files to .phps and it will show the PHP SOURCE of the document. Not exactly mime type fix.. but it works for me. :D
~Sean
specialk
09-11-2005, 10:21 PM
Hey. For some reason, I can't get (in my mime types) .png to be parsed by the PHP application.
I made a .htaccess in the directory and put this in it:
AddType application/x-httpd-php .png
and uploaded it into the directory with the file that needs to be parsed is located.
When I try to access it, it gives me a 500 Internal Server Error:
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, webmaster@involvingducks.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.
Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
What is wrong?
I even tried going into cPanel and adding the mime type but that produced the same error.
-specialk
BihiraJonathan
09-12-2005, 02:05 AM
Hey. For some reason, I can't get (in my mime types) .png to be parsed by the PHP application.
I made a .htaccess in the directory and put this in it:
AddType application/x-httpd-php .png
and uploaded it into the directory with the file that needs to be parsed is located.
When I try to access it, it gives me a 500 Internal Server Error:
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, webmaster@involvingducks.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.
Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
What is wrong?
I even tried going into cPanel and adding the mime type but that produced the same error.
-specialk
Use AddHandler instead of AddType in your case.
Use AddHandler instead of AddType in your case.
>_> yep. BihiraJonathan got to it first. lol.