Advanced PHP Protection - Password script

Any problems relating to the premium downloads should go in here

Advanced PHP Protection - Password script

Postby pbasu » Wed Jun 01, 2011 4:01 pm

I bought this PHP script on Code Canyon :

http://codecanyon.net/item/advanced-php ... tion/99823

It works great on one of my websites, but on another site with a different server, I get the following error after I enter the login credentials:

Fatal error: Call to a member function brute_force_protect() on a non-object in /usr/local/pem/vhosts/263173/webspace/httpdocs/index.php on line 8

Does anyone have any suggestions?

Thanks a lot!
pbasu
 
Posts: 3
Joined: Wed Jun 01, 2011 3:41 pm

Re: Advanced PHP Protection - Password script

Postby EcazS » Wed Jun 01, 2011 4:06 pm

It's hard to see where you made a mistake when you don't even post the code you're using.
User avatar
EcazS
 
Posts: 761
Joined: Fri May 06, 2011 5:29 pm

Re: Advanced PHP Protection - Password script

Postby pbasu » Wed Jun 01, 2011 4:18 pm

Sorry about that! Meant to paste it at the bottom:

Syntax: [ Download ] [ Hide ]
Using PHP Syntax Highlighting
  1. <?php
  2.  
  3.         include('secure/security.class.inc.php');
  4.  
  5.         $pass = new secure;
  6.         $pass->set_credentials('admin', 'lemon');
  7.         $pass->custom_session_keys('name', 'pass');
  8.         $pass->brute_force_protect();
  9.         $pass->protect();
  10.        
  11.         if (isset($_GET['logout'])){
  12.                 $pass->logout();
  13.                 header('Location: index.php');
  14.                 die();
  15.         }
  16.  
  17. ?>
  18. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  19. <html xmlns="http://www.w3.org/1999/xhtml">
  20.         <head>
  21.                 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  22.                 <title>Advanced PHP Protect Example</title>
  23.         </head>
  24.         <body>
  25.                 <a href="?logout=1">Logout</a> | <a href="readme.php">Documentation</a>
  26.                 <br />
  27.                 <hr />
  28.                 <br />
  29.                 <?php
  30.  
  31.                 highlight_file('index.php');
  32.  
  33.                 ?>
  34.         </body>
  35. </html>
Parsed in 0.049 seconds, using GeSHi 1.0.8.10
pbasu
 
Posts: 3
Joined: Wed Jun 01, 2011 3:41 pm

Re: Advanced PHP Protection - Password script

Postby Kamal » Wed Jun 01, 2011 4:22 pm

thats weird o.O no typos or such thing.. make sure the function name is correct as i havent seen the source of seucrity.class.inc.php :)
User avatar
Kamal
 
Posts: 123
Joined: Fri May 06, 2011 10:45 am

Re: Advanced PHP Protection - Password script

Postby jacek » Wed Jun 01, 2011 4:25 pm

Kamal wrote:make sure the function name is correct as i havent seen the source of seucrity.class.inc.php :)

That would be call to undefined method I think. Either way it is correct ;) It does seem weird though :?

Well the code looks okay, in fact it looks like the example code that comes with the item ;)

What php version are you using ? And are you using the most recent version of the script ?

It may be worth trying

Syntax: [ Download ] [ Hide ]
Using PHP Syntax Highlighting
  1. $pass = new secure();
Parsed in 0.041 seconds, using GeSHi 1.0.8.10

with the (), but that should not be the problem.
Image
User avatar
jacek
Site Admin
 
Posts: 3200
Joined: Thu May 05, 2011 1:45 pm
Location: UK

Re: Advanced PHP Protection - Password script

Postby Kamal » Wed Jun 01, 2011 4:29 pm

I wasn't requesting that you post it, just don't do that again. I just said I wouldn't know the problem because I didn't buy it.
Btw jacek you may feel ok that I didn't save it or something :)
User avatar
Kamal
 
Posts: 123
Joined: Fri May 06, 2011 10:45 am

Re: Advanced PHP Protection - Password script

Postby pbasu » Wed Jun 01, 2011 4:46 pm

jacek, i figured i messed something up so i went back to the example :) But, I was able to get it working in single line mode, which is fine for my purposes.

thanks everyone for helping out with this!
pbasu
 
Posts: 3
Joined: Wed Jun 01, 2011 3:41 pm

Re: Advanced PHP Protection - Password script

Postby jacek » Wed Jun 01, 2011 4:52 pm

strange, but that's good news, glad you got it working :D
Image
User avatar
jacek
Site Admin
 
Posts: 3200
Joined: Thu May 05, 2011 1:45 pm
Location: UK


Return to Premium Items



Who is online

Users browsing this forum: No registered users and 1 guest