Advanced PHP Protection - Password script

Any problems relating to the premium downloads should go in here
Post Reply
pbasu
Posts: 3
Joined: Wed Jun 01, 2011 3:41 pm

Advanced PHP Protection - Password script

Post by pbasu »

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!
User avatar
EcazS
Posts: 789
Joined: Fri May 06, 2011 5:29 pm

Re: Advanced PHP Protection - Password script

Post by EcazS »

It's hard to see where you made a mistake when you don't even post the code you're using.
pbasu
Posts: 3
Joined: Wed Jun 01, 2011 3:41 pm

Re: Advanced PHP Protection - Password script

Post by pbasu »

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

[syntax=php]<?php

include('secure/security.class.inc.php');

$pass = new secure;
$pass->set_credentials('admin', 'lemon');
$pass->custom_session_keys('name', 'pass');
$pass->brute_force_protect();
$pass->protect();

if (isset($_GET['logout'])){
$pass->logout();
header('Location: index.php');
die();
}

?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Advanced PHP Protect Example</title>
</head>
<body>
<a href="?logout=1">Logout</a> | <a href="readme.php">Documentation</a>
<br />
<hr />
<br />
<?php

highlight_file('index.php');

?>
</body>
</html>[/syntax]
User avatar
Kamal
Posts: 123
Joined: Fri May 06, 2011 10:45 am
Contact:

Re: Advanced PHP Protection - Password script

Post by Kamal »

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
jacek
Site Admin
Posts: 3262
Joined: Thu May 05, 2011 1:45 pm
Location: UK
Contact:

Re: Advanced PHP Protection - Password script

Post by jacek »

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=php]$pass = new secure();[/syntax]
with the (), but that should not be the problem.
Image
User avatar
Kamal
Posts: 123
Joined: Fri May 06, 2011 10:45 am
Contact:

Re: Advanced PHP Protection - Password script

Post by Kamal »

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 :)
pbasu
Posts: 3
Joined: Wed Jun 01, 2011 3:41 pm

Re: Advanced PHP Protection - Password script

Post by pbasu »

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!
User avatar
jacek
Site Admin
Posts: 3262
Joined: Thu May 05, 2011 1:45 pm
Location: UK
Contact:

Re: Advanced PHP Protection - Password script

Post by jacek »

strange, but that's good news, glad you got it working :D
Image
Post Reply