Getting "Forbidden" error!

Discussion in 'PHP' started by adwaitk007, May 10, 2011.

  1. #1
    Hello PHP gurus,
    I am the owner of a simple music search engine site listenmymp3.com
    I have brought this script from websitescripts.org and I am facing some issues! These issues are with some sources like 4shared,lyrics . I am getting this message if I try to play the music:

    You don't have permission to access /play.php on this server.
    
    Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
    Apache mod_fcgid/2.3.6 mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635 Server at www.listenmymp3.com Port 80
    Code (markup):
    Also getting error when anyone tries to register. It always says "registration failed". I am not having any knowledge of this!

    Can anybody fix this?

    Regards,
    Adwait
     
    adwaitk007, May 10, 2011 IP
  2. riteshsanap

    riteshsanap Well-Known Member

    Messages:
    217
    Likes Received:
    2
    Best Answers:
    3
    Trophy Points:
    168
    #2
    I would suggest you first to check the servers error log, if you are using CPanel then Login to CPanel and search for error logs. it will show you the problem. if you are unable to understand it then just post it here.
     
    riteshsanap, May 10, 2011 IP
  3. Bohra

    Bohra Prominent Member

    Messages:
    12,573
    Likes Received:
    537
    Best Answers:
    0
    Trophy Points:
    310
    #3
    i think its because php wont allow a url name as get variable
     
    Bohra, May 10, 2011 IP
  4. adwaitk007

    adwaitk007 Well-Known Member

    Messages:
    1,205
    Likes Received:
    20
    Best Answers:
    0
    Trophy Points:
    175
    #4
    oky! thanks guys! I got it fixed by host! But having an issue! maybe it's with script!

    whenever anyone tries to register the system shows "Registration failed" error! If he refresh the page then automatically registration form comeup! then if anyone fills the form and press "join now" it gives some forehech() error!

    Can anybody help me?
    here is the source:
    http://listenmymp3.com/register.php
     
    adwaitk007, May 12, 2011 IP
  5. serena85

    serena85 Peon

    Messages:
    892
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Try searching a log in script on google (because there are all the same) and compare the php code with your and I think you will find the source of your problem try comparing the 220 line to the one that works
     
    serena85, May 12, 2011 IP
  6. adwaitk007

    adwaitk007 Well-Known Member

    Messages:
    1,205
    Likes Received:
    20
    Best Answers:
    0
    Trophy Points:
    175
    #6
    means? I am noob at these!! please tell me what do you mean exactly?

    okay I found the error. it says:
    Warning: Invalid argument supplied for foreach() in /.............../register.php on line 187
    Warning: Invalid argument supplied for foreach() in /.............../register.php on line 229
    Code (markup):
    From line 183 to 194 the code is:
    <?
    if($form->num_errors > 0){
      // echo " <font size=\"2\" color=\"#ff0000\">".$form->num_errors." error(s) found</font> ";
      $i=0;
      foreach($form->errors as $cur){
      if($cur==""){}else{$i++;
      echo"";}
      }  
    }
    
       unset($HTTP_SESSION_VARS['regsuccess']);
    ?>
    Code (markup):
    And from line 225 to 234 the code is:
    <?
    if($form->num_errors > 0){
      
      $i=0;
      foreach($form->errors as $cur){
      if($cur==""){}else{$i++;
      echo"<font size=\"2\" color=\"#ff0000\">".$cur."</font><br> ";}
      } echo "<br> <font size=\"2\" color=\"#ff0000\">".$i." error(s) found</font></center> ";
      //print_r($form->errors[$field]);
    }
    ?>
    Code (markup):
    So can anyone tell me what's wrong with it??
    On
     
    Last edited: May 12, 2011
    adwaitk007, May 12, 2011 IP