password_protect.php does not fire up

Started by Razor, June 27, 2015, 10:49:17 AM

Razor

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.

zubrag

Hope it is not too late.  Did you login at least once? If yes, it could reuse previous login session, until you logout.

Razor

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

zubrag

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.

Razor

Thank you for the quick and kind help!

zubrag


Razor