Zubrag.com
May 24, 2018, 01:57:37 AM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: password_protect.php does not fire up  (Read 5306 times)
Razor
Newbie
*
Posts: 4


« on: June 27, 2015, 01:49:17 AM »

Hello there,

before writing this I looked through the forum and found two similar problems reported years ago and without solution.

I have various working php files in /php/ folder on the web server (Localhost via UNIX socket) where MySQL v.5.5.43-0+deb7u1 - (Debian) is running under Apache with php extension mysqli, PHP version 5.4.41-0+deb7u1,  libmysql - 5.5.43.

I planned to protect these files with the p_p.php.
Here's what I did:

I changed the zubrag username in the settings part of the p_p.php. Saved the file. (with TextWrangler on MacOS)
Uploaded the p_p.php to the same /php/ folder where all the php files are located.
Run the p_p.php?help and copied the resulting line of code.
Pasted the code into nr. 1 line of one of the the local versions of the working php files. (these have the .php extension and have php codes in them)
Uploaded the modified file to the php folder.
Run the uploaded file by typing its address in Chrome browser.
The 'protected' php file runs smoothly, p_p.php does not show up.

I spent several hours trying to figure out what's wrong, with no success, read a lot of comments on various related internet pages.
So, this problem must be a very basic thing. :-)

Can you please assist.

Logged
zubrag
Administrator
Hero Member
*****
Posts: 785


WWW
« Reply #1 on: July 01, 2015, 05:13:59 AM »

Hope it is not too late.  Did you login at least once? If yes, it could reuse previous login session, until you logout.
Logged
Razor
Newbie
*
Posts: 4


« Reply #2 on: July 01, 2015, 05:24:34 AM »

Hey, yes, thanks, that might be a problem.

How can I logout manually? Can you help me in placing a php script that logs out the user when the link that performs the logout is clicked?

Razored
Logged
zubrag
Administrator
Hero Member
*****
Posts: 785


WWW
« Reply #3 on: July 01, 2015, 07:02:59 AM »

add "?logout=1" to script url
Like this: http://example.com/example/url/password_propect.php?logout=1

But it should also logout on browser close.
Logged
Razor
Newbie
*
Posts: 4


« Reply #4 on: July 01, 2015, 07:43:42 AM »

Thank you for the quick and kind help!
Logged
zubrag
Administrator
Hero Member
*****
Posts: 785


WWW
« Reply #5 on: July 01, 2015, 07:56:24 AM »

Szívesen Smiley
Logged
Razor
Newbie
*
Posts: 4


« Reply #6 on: July 01, 2015, 08:12:48 AM »

Nagyon jó a magyarod! :-)
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC