HTTP 500 when processing .phtml files

Status
Not open for further replies.

deadimp

New Member
Messages
249
Reaction score
0
Points
0
This is the same issue as I had posted in the server announcement, but I moved it here because the thread is closed.
The server still seems to be unable to handle those files...
I've tried overloading the .htaccess application extension, but that didn't work.

File: http://deadimp.org/thacsite/main.css.phtml
 
Last edited:

Corey

I Break Things
Staff member
Messages
34,553
Reaction score
204
Points
63
I'll leave this open until I have time to look into it.
 

Pingy

New Member
Messages
46
Reaction score
0
Points
0
I hope I might be able to shed some light on this issue. Corey, I believe the problem is in the SYSTEMMIME (/home/#USER#/.cpanel/datastore/SYSTEMMIME) file. For the accepted extensions for PHP documents (application/x-httpd-php), you've listed .phtml but not phtml. For all of the other extensions, this is not the case.

With that in mind, perhaps adding phtml (without the prepended period) would alleviate the problem. This, however, is only a naive suggestion, as I'm not sure how you're processing the SYSTEMMIME file. In the case of mass-modifying the file not being a problem, though, I think this may be a viable solution.
 
Last edited:

Corey

I Break Things
Staff member
Messages
34,553
Reaction score
204
Points
63
Didn't even think of that. I believe there is a MIME TYPE option in the cPanel that gives you access to changing these things. Could you see if you can make this change in there Deadimp?

Thanks Pingy.

-Corey
 

Pingy

New Member
Messages
46
Reaction score
0
Points
0
Tried that method a while ago, Corey, and it came to no avail unfortunately. I was hoping that user-defined MIME types would be reflected in the SYSTEMMIME file, but that's not the case...
 

Corey

I Break Things
Staff member
Messages
34,553
Reaction score
204
Points
63
Hmm, I'm not sure where I can edit it globally at. I'll have to look around for it.
 

Pingy

New Member
Messages
46
Reaction score
0
Points
0
Well, I'm sure those that would like to use the .phtml extension would have no problem with doing it manually, but another problem arises in that case: the SYSTEMMIME file is not editable; modifications to it are ignored upon saving. If you could concoct a way to make that file editable, we may've come up with a solution...
 

deadimp

New Member
Messages
249
Reaction score
0
Points
0
I was able to change the SYSTEMMIME file like Pingy suggested by downloading it, editing it with what I'm guessing is a binary-safe editor (PNotepad), and replacing the server file with my local copy. It didn't really seem to do anything, though. I downloaded it again to make sure it retained my changes, and also viewed it through the CPanel manager.
I'm still getting the 500 Internal Server Error.

Another thing that's a little odd: When I added a mime type via CPanel, all it did was directly append the 'AddType' statement to the end of the .htaccess file, which made every file on my site return a 500 Internal Server Error. It screwed up because there wasn't a new line between that and the previous statement, but that might have been my fault. I've fixed it, though.

EDIT: It doesn't look like the SYSTEMMIME has any purpose other than caching the system MIME handlers, kinda like mysql-db-count (I had to test it, I was curious). On line 51 of the file, where the php extensions are defined, I changed "php" to "pht", and my site still shows up normally. I logged into CPanel, when to the MIME page, and showed pht as one of the extensions.
 
Last edited:

deadimp

New Member
Messages
249
Reaction score
0
Points
0
Corey, I know you've been busy with the massive amount of account changes, but were you able to find something out about this on the side, whether it's possible to fix or not?
If it's not, I'll try to make a small feature request for this on PNotepad just to make this easier on everyone.
 
Last edited:

Bryon

I Fix Things
Messages
8,149
Reaction score
101
Points
48
I believe I fixed the issue. I had to add a line to your virtualhost block/section in Apache's httpd.conf.

I'm not sure what was causing the issue with it in the first place. It possibly may be caused by the way we have PHP set up with Apache with the new 'system' that we have implemented.
 
Last edited:

deadimp

New Member
Messages
249
Reaction score
0
Points
0
Thanks! It's working now. Just had to clear out my cache, so it's all good.
 

Brandon

Former Senior Account Rep
Community Support
Messages
19,181
Reaction score
28
Points
48
Closed, users problem fixed.
 
Status
Not open for further replies.
Top