• [MOD] Hidden / Password protected categories v1.1 (2009-06-30) 5 0 5 1
Currently:  

Author Topic: [MOD] Hidden / Password protected categories v1.1 (2009-06-30)  (Read 130436 times)

0 Members and 1 Guest are viewing this topic.

Offline tutoko

  • Newbie
  • *
  • Posts: 11
    • View Profile
Re: [MOD] Hidden / Password protected categories v1.1 (2009-06-30)
« Reply #75 on: October 16, 2012, 06:32:56 AM »
files attached.
Also I just finished doing a complete clean install with default template and then went through the mod one more time with the clean files. Same outcome.
When entering the password I get redirected to the Host 404 page - not the "incorrect password" message as shown on your demo site.

Thanks very much for your assistance V@no.
« Last Edit: October 16, 2012, 09:27:31 AM by tutoko »

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: [MOD] Hidden / Password protected categories v1.1 (2009-06-30)
« Reply #76 on: October 17, 2012, 04:20:12 AM »
If you do access to server's error logs and php error logs, look if you see anything related to this.
If nothing there, I'd like to try it myself if it's possible (you can PM me if you don't want publish it)
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline tutoko

  • Newbie
  • *
  • Posts: 11
    • View Profile
Re: [MOD] Hidden / Password protected categories v1.1 (2009-06-30)
« Reply #77 on: October 17, 2012, 05:40:57 AM »
hi V@no,
I am not sure what you want me to send you.
the site address is http://harmony-radio.com/Harmony-Paints/

If you need access to the server system please let me know by email =>  vline44yahoo.com.au   and I can provide you codes etc for getting into look at the server system.

19.10.2012 - Update, Hi V@no, I found this on the host server FAQ's - does this relate to the issue I have ? :
---------------
PHP register_globals feature is set to OFF on our servers for security reasons. All modern scripts, these days do not use register_globals, and if you get any errors related to register_globals being disabled, you may want to check your coding or contact script developer for more details.

However, it is possible to enable register_globals by entering this line to your .htaccess file:

php_flag register_globals on

We do not recommend enabling this function as it may lead to possible security problems for your website.
--------------------


« Last Edit: October 19, 2012, 07:49:10 AM by tutoko »

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: [MOD] Hidden / Password protected categories v1.1 (2009-06-30)
« Reply #78 on: October 21, 2012, 11:32:39 PM »
Sorry for the delay. Can you setup a test password protected category so I can test it out?

Thanks.

P.S.
register globals is not an issue here.
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline tutoko

  • Newbie
  • *
  • Posts: 11
    • View Profile
Re: [MOD] Hidden / Password protected categories v1.1 (2009-06-30)
« Reply #79 on: October 22, 2012, 04:53:25 AM »
done: category is password... password is password.
Cheers V@no...


Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: [MOD] Hidden / Password protected categories v1.1 (2009-06-30)
« Reply #80 on: October 22, 2012, 09:20:44 AM »
It seems 4images incorrectly identifies the script filename ($PHP_SELF)

I'd need access to phpinfo() to investigate
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline tutoko

  • Newbie
  • *
  • Posts: 11
    • View Profile
Re: [MOD] Hidden / Password protected categories v1.1 (2009-06-30)
« Reply #81 on: October 22, 2012, 04:56:55 PM »
PM sent with info, please let me know if you did not receive it..
Notices from inspecting the PhpInfo that php include is set to off, guess thats why the code below does not work too?

  <?php
 include("http://harmony-radio.com/Harmony-Paints/random.php");
?>


thanks once again..

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: [MOD] Hidden / Password protected categories v1.1 (2009-06-30)
« Reply #82 on: October 23, 2012, 03:44:17 AM »
No, it's not it. You cannot include remote .php files, simply because when your server requests for a .php file it receives whatever that php script generates, not it's source.
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: [MOD] Hidden / Password protected categories v1.1 (2009-06-30)
« Reply #83 on: October 23, 2012, 03:19:33 PM »
Found it.

In includes/catpass.php find:
Code: [Select]
if (!function_exists("get_self"))
{
  function get_self()
  {
    $list = get_included_files();
    return $list[0];
  }
}
if (!function_exists("get_self_full"))
{
  function get_self_full()
  {
    global $HTTP_GET_VARS;
    $q = $HTTP_GET_VARS;
    $query = array();
    foreach($q as $key => $val)
    {
      $query[] = $key . "=" . $val;
    }
    return ROOT_PATH.basename(get_self()).(!empty($query) ? "?".implode("&", $query) : "");
  }
}

Replace it with:
Code: [Select]
if (!function_exists("get_self"))
{
  function get_self()
  {
global $self_url;
return $self_url;
  }
}
if (!function_exists("get_self_full"))
{
  function get_self_full()
  {
    global $script_url;
    return $script_url."/".get_self();
  }
}
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline tutoko

  • Newbie
  • *
  • Posts: 11
    • View Profile
Re: [MOD] Hidden / Password protected categories v1.1 (2009-06-30)
« Reply #84 on: October 23, 2012, 11:24:44 PM »
Perfect V@no,

THANK YOU !
I Truely appreciate your time and efforts to get this resolved. Much appreciated.

The phpInfo you looked at - does it prevent the use of the external file loading the random image by use of:

  <?php
 include("http://harmony-radio.com/Harmony-Paints/random2.php");
?>

That just doesnt work for me in an external html page calling to the php file ?

if it is the php configuration is that something I have to get the server host to change?

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: [MOD] Hidden / Password protected categories v1.1 (2009-06-30)
« Reply #85 on: October 24, 2012, 03:00:49 AM »
This is offtopic, but as I tried to explain earlier it's not your server's configuration. include() function uses to execute PHP code from a different file. When you access any .php files via remote address (http://) it executes that .php file on that remote server, so when your server tries include that .php file it gets the generated by that file output, which is usually HTML code, not PHP source code of that file.
Now, if you'd rename random2.php to random2.txt, then it might work, because remote server would simply output text inside that file, not execute it.
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline tutoko

  • Newbie
  • *
  • Posts: 11
    • View Profile
Re: [MOD] Hidden / Password protected categories v1.1 (2009-06-30)
« Reply #86 on: October 24, 2012, 04:02:33 AM »
thank you for that explaination V@no, will try your suggestion. Sorry for the off topic query, but again I really appreciate your input. The mods and the extensive assistance you have provided on this forum regarding 4images is invaluable. Many many thanks.

Offline Vizear

  • Pre-Newbie
  • Posts: 2
    • View Profile
Re: [MOD] Hidden / Password protected categories v1.1 (2009-06-30)
« Reply #87 on: June 09, 2013, 01:16:40 PM »
Hey, just a quick question. Is there a way for the search to find a hidden category? Eg: searching a keyword on the hidden image...

Thank you.