Results 1 to 11 of 11

Thread: Forbidden error comes when load increases, on core PHP based site

  1. #1
    Join Date
    Jun 2013

    Forbidden error comes when load increases, on core PHP based site

    Hello Everyone,

    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.


  2. #2
    Join Date
    Aug 2012
    can u trouble shoot by removing the call to update timer and see if problem still exist?

  3. #3
    Join Date
    Aug 2004
    Does your hosting plan have any limits on requests/data per unit of time?
    "Well done....Consciousness to sarcasm in five seconds!" ~ Terry Pratchett, Night Watch

    How to Ask Questions the Smart Way (not affiliated with this site, but well worth reading)

    My Blog
    cwrBlog: simple, no-database PHP blogging framework

  4. #4
    Join Date
    Jun 2013
    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.


  5. #5
    Join Date
    Jun 2013
    Hello NogDog,

    Do i have to check it from the server support or is there any way i can myself check it.

    Thanks for replying.

  6. #6
    Join Date
    Jun 2013

    trying to use session value through AJAX call along with javascript timer

    Hello everyone,

    In order to remove the AJAX call to update timer after every one second. i tried to replace the code with onload AJAX call to fetch the session value once. and then using that time value in javascript code to show/update the timer.

    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.


  7. #7
    Join Date
    Aug 2012
    can you explain this timer a little better. is it literally like a clock? a count down> detailed description of what it does. pleae

  8. #8
    Join Date
    Jun 2013
    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).

    so i need to fetch this value from the session once and after that i wish to use javascript to show the timer and update it.

    For the very first time it doesnt show the timer but when i refresh it, it works fine.

    The problem is, the javascript code doesnt get the value of session variable during the first time even when i try to fetch it using an AJAX call.

    Thanks for following up.

  9. #9
    Join Date
    Aug 2012
    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

  10. #10
    Join Date
    Jun 2013

    i did try to use it

    "The problem is, the javascript code doesnt get the value of session variable during the first time when i try to fetch it using an AJAX call or directly "


  11. #11
    Join Date
    Jun 2013
    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:

    I reduced the calls to the server and the database to minimum. I used a javascript timer instead of using AJAX call for every second.

    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.

    Thanks Again

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center



X vBulletin 4.2.2 Debug Information

  • Page Generation 0.10464 seconds
  • Memory Usage 2,942KB
  • Queries Executed 13 (?)
More Information
Template Usage (32):
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_global_above_footer
  • (1)ad_global_below_navbar
  • (1)ad_global_header1
  • (1)ad_global_header2
  • (1)ad_navbar_below
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)ad_thread_first_post_content
  • (1)ad_thread_last_post_content
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)headinclude_bottom
  • (11)memberaction_dropdown
  • (1)navbar
  • (4)navbar_link
  • (1)navbar_moderation
  • (1)navbar_noticebit
  • (1)navbar_tabs
  • (2)option
  • (11)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available (6):
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files (26):
  • ./showthread.php
  • ./global.php
  • ./includes/class_bootstrap.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/functions_navigation.php
  • ./includes/class_friendly_url.php
  • ./includes/class_hook.php
  • ./includes/class_bootstrap_framework.php
  • ./vb/vb.php
  • ./vb/phrase.php
  • ./includes/functions_facebook.php
  • ./includes/functions_calendar.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_notice.php
  • ./packages/vbattach/attach.php
  • ./vb/types.php
  • ./vb/cache.php
  • ./vb/cache/db.php
  • ./vb/cache/observer/db.php
  • ./vb/cache/observer.php 

Hooks Called (71):
  • init_startup
  • friendlyurl_resolve_class
  • init_startup_session_setup_start
  • database_pre_fetch_array
  • database_post_fetch_array
  • init_startup_session_setup_complete
  • global_bootstrap_init_start
  • global_bootstrap_init_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • load_show_variables
  • load_forum_show_variables
  • global_state_check
  • global_bootstrap_complete
  • global_start
  • style_fetch
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • strip_bbcode
  • friendlyurl_clean_fragment
  • friendlyurl_geturl
  • forumjump
  • cache_templates
  • cache_templates_process
  • template_register_var
  • template_render_output
  • fetch_template_start
  • fetch_template_complete
  • parse_templates
  • fetch_musername
  • notices_check_start
  • notices_noticebit
  • process_templates_complete
  • friendlyurl_redirect_canonical
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • memberaction_dropdown
  • tag_fetchbit
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • build_navigation_data
  • build_navigation_array
  • check_navigation_permission
  • process_navigation_links_start
  • process_navigation_links_complete
  • set_navigation_menu_element
  • build_navigation_menudata
  • build_navigation_listdata
  • build_navigation_list
  • set_navigation_tab_main
  • set_navigation_tab_fallback
  • navigation_tab_complete
  • fb_like_button
  • showthread_complete
  • page_templates