500 Internal Server Error
SamRose - December 10, 2007 - 21:34
| Project: | Import HTML |
| Version: | 5.x-1.2 |
| Component: | Code |
| Category: | support request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Jump to:
Description
This script works amazing! Thank you so much for creating it. I've had 2 successes so far.
One issue that I am running into is that when I try to import a flat file .php site, that I am getting a "500 Internal server error". Not sure why. Also, the script *will* import directories with .html, .pdf, and images, but not the flat file php pages. Any advice would be greatly appreciated

#1
Not quite enough info to go on there.
'*.php' source files are treated as standard html pages for the purpose of importing, however I've never actually had the desire to try doing that. I certainly wouldn't expect any significant PHP code to transfer out-of-the-box without some rewrites.
Although the text gets previewed a few times, it doesn't get executed - that would reqire the input filter to be switched on. So I guess the error isn't coming from the imported code.
HOWEVER, depending on the code, it may be very difficult for tidy, or the DOM, to treat PHP-littered files as XHTML. Yeah, that would be a worry.
Should just trigger an input parsing error, but a php tag looks like a 'processing instruction' to XML so gods know.
Basically, transforming a dynamic ste is out-of-scope for this. It's asking too much. (Although I do have a 'wrapper' module I'll be adding to the package sometime that will help with this)
If you'd prefer to wget a snapshot of it, THAT can be imported safely. If you are planning to import actual code - you'll have to do it yourself.
#2
Yes, importing a wget snapshot is what I have been trying to do. The weird thing is that the site's pages have ".php" extensions on each page file, but the code is pretty much all html.
#3
Ah. Um. OK. I guess that's what you meant by "flat file php". ;-) I was wondering.
Hm.
So if there's no code, it looks like it's just to do with the extension?
There really should be no difference I can imagine.
The file gets loaded, analysed, given an alias, that happens to be xx.php.
No big deal.
You'll have to turn on debug. uncomment out the DEBUGLEVEL at the top of the module and see what it was doing when it died.
#4
I got that 500 server error until my hosting provider upgraded to Apache 2. It works fine now.
#5
Gods.
Your weren't on Apache before?
Y'know, little details like that can make a difference to debugging server errors ....
#6
Of course I had Apache, but 1.3 instead of 2. I spent some time sending tickets to my hosting provider (Hostmonster) but they couldn't help. One fine day, they upgraded the server, and I remembered that my home mirror site ran Apache 2 and import HTML worked correctly on it, so I tried again and voila!
Hope it helps debbuging your anyway great module, and thank you for your efforts
#7
I never had a chance to run DEBUGLEVEL and try it again, but I will soon, and report back here...