i have as single php page that have about 36 magicparser functions
when it was about 20 it was working grate
but now it seems to parse everything but not reaching the last line in the script !
here is my full code
There's no limit to the number of parses you can make, but it sounds like you may be reaching a PHP / web server imposed maximum execution time.
The first thing to try would be to add the following code to the top of your script:
Hope this helps!
thanks for fast replay
i tried your suggestion
but it did not worked, still having the same results ?
any other ideas ?
PS: i thought that when timeout occurs it will print that in the script right ?
Not necessarily as it depends on the PHP configuration. Try also adding at the top of your script:
...and that might indicate if timeout is the issue...
i tried your suggestion
i got this:
Notice: Undefined index: LINK in /home/hlemxmti/public_html/API/engine.php on line 1225
that is wired because the error happened in a function that is very similar to other functions , plus that line in specific is exactly the same in all other functions.
i know that this problem is not related to your product, i appreciate your help a lot.
thanks in advanced
That's actually a notice rather than an error so probably doesn't affect operation of your code at all - to display errors only, you would use:
still until now the code does not reach the end of the script
it must echo "end"
and print the execution time
i was printing those when i had about only 15 functions
now i have about 35 when this problem occurred
as i mentioned earlier
it seems to parse all the functions correctly (judging from the results)
should i worry about the last 2 lines not being excited ?
PS: if you need the code i could send it not problem
If it's just a case of not seeing the final output, there is the possibility that it is a rendering issue - in other words, the browser is not completing the output because it is expecting the HTML to be closed cleanly - and if this is not the case due to an issue with the output that may be what is causing you to miss the closure.
One test, would not be to output the description field of any of your feeds "as is", because basically, you have to trust that their HTML is complete / valid - if it is not, the invalidity of the RSS content results in your own page becoming invalid.
One way to check this, would be that wherever you are outputting content from your feeds that contains its own HTML markup, would be to output it using strip tags, for example, in place of:
That way, you can rule out broken HTML in your feeds being the reason for not seeing the closure of your own page content...
it did not solved the problem
so i ended up to devide the script to smaller scripts
i thing the problem was that the script is taking too long
thanks anyway, for the great support and product
No problem - thanks for your comments!
One thing you might want to consider perhaps is not having your website script fetch the pages in real time, but instead having a CRON process that runs, say, every 30 minutes and fetches all the RSS feeds to a local directory.
Then, your website script just parses the local files for each page view (which is also better for the websites serving the RSS feeds has they don't get a hit every time there is a hit to one of your pages) and would be much faster!