Zubrag.com :: Forum

zubrag.com => Password Protect => Topic started by: Razor on June 27, 2015, 01:49:17 AM



Title: password_protect.php does not fire up
Post by: Razor 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.


Title: Re: password_protect.php does not fire up
Post by: zubrag 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.


Title: Re: password_protect.php does not fire up
Post by: Razor 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


Title: Re: password_protect.php does not fire up
Post by: zubrag 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.


Title: Re: password_protect.php does not fire up
Post by: Razor on July 01, 2015, 07:43:42 AM
Thank you for the quick and kind help!


Title: Re: password_protect.php does not fire up
Post by: zubrag on July 01, 2015, 07:56:24 AM
Szívesen :)


Title: Re: password_protect.php does not fire up
Post by: Razor on July 01, 2015, 08:12:48 AM
Nagyon jó a magyarod! :-)