First of all, your code seems working fine but I am quite unsure because of the long content from the URL given is being retrieved and it is taking too much time. You have commented the following line:
Yes, that page is quite lengthy. I took a look at it’s view-source and it took a long time for the page to load in on my slow dial-up cnx. So it could be the script is timing out or maybe you gave up waiting before it finished.
Yeah I thought that to be the reason because from that line down it didn’t load even if there are things not associated with this. But the previous one th was no problem. BUt Firefox is asking me what program to use to open that page. When I choose firefox it repeats, asking me what program to use to open that page. I’ll get back to you later.
I was thinking maybe I can do chunk by chunk by putting a page like this: .php?page=1 and then use $_Get[‘page’]…
(or whatever charset you’re using). The main thing is there can be no output whatsoever before the header(), not even whitespace. If there is output of any kind, the default content-type header will be sent and you will get a “headers already sent” error.
As for breaking the page up, IMHO that’s a good idea. Either by topic or “pagination” should work better than one long page.
The PHP header() sends an HTTP header (Hyper Text Transfer Protocol) and tells the browser what kind of file to expect. So if it thinks it’s a PHP file it won’t see the meta http-equiv as being part of an HTML file to begin with.
I forgot that if your PHP is configured with safe mode on, the time limit won’t work. Similary memory limit won’t either. But you could try.
The size of this web page (7911433 bytes) has exceeded the maximum size of 3000000 bytes.
I agree that having the entire Bible on one page might be handy for doing “search”. And it may not cause a problem for you on your computer if it isn’t fetching the info over the internet. But IMHO an 8MB page is a bit much. And your memory error message suggests it’s even larger than that. I can’t see that many visitors with slow connections would wait around for it to load.
So I would suggest at least breaking that page down into books.
Anyway, you can find out your PHP configuration by creating a very simple file
uploading it to your site and then going to it.
Or you could just add this to your existing file and try it straight away
if ( !ini_get('safe_mode') )
set_time_limit(300);//300 secs = 5 mins
ini_set('memory_limit', '64M');//hopefully be more than enough
echo '<h4>in safe mode</h4>';
If you keep getting time or memory errors bump up the numbers until it works.