Forbidden error comes when load increases, on core PHP based site
I get the forbidden (access denied ) error , whenever the load increases on my PHP website.
With few number of users, the site works fine.
Could anyone suggest me some solution to eliminate this error.
There is no .htaccess in the root folder.
The page makes an AJAX call to a PHP page after every 1 second so as to update the timer. Can that be a reason for this error.
Please if anyone having any idea about this, your replies/suggestions are welcome.
can u trouble shoot by removing the call to update timer and see if problem still exist?
Does your hosting plan have any limits on requests/data per unit of time?
"Please give us a simple answer, so that we don't have to think, because if we think, we might find answers that don't fit the way we want the world to be."
~ Terry Pratchett in Nation
Thanks for replying Nicholas.
I did try to run the script after removing that code(to update timer), and the error did'nt appear.
So, currently i am searching for some solution to get the timer using client side coding so as to remove the AJAX call after 1 second.
Do i have to check it from the server support or is there any way i can myself check it.
Thanks for replying.
It doesn't show the timer once the page is loaded but when i refresh it, it shows the timer good.
And if i put a refresh code line after fetching the AJAX response , then the refresh happens infinitely, because the AJAX call is on body onload.
Could anyone suggest some solution to this.
can you explain this timer a little better. is it literally like a clock? a count down> detailed description of what it does. pleae
Sure, its a count down timer . there is an end time which is stored in the session variable (which is fetched from the database first).
For the very first time it doesnt show the timer but when i refresh it, it works fine.
Thanks for following up.
so why dont you try not using java script? add start session to the top of the page and then make a timer.php file and include it in the page your viewing. see if that fixes it all
i did try to use it
Just want to thank you all who have helped me in reaching to the solution for this problem.
The forbidden error is resolved now.
The changes i made to the code are as below:
The sesison values which i was not getting on the same page, has been resolved by using an intermediate page in between to set the session variable first. And then on the second page simply get the value of that by using simple php. so no requirement for AJAX here.
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Tags for this Thread