Author Topic: Can't post any comment!  (Read 31477 times)

0 Members and 1 Guest are viewing this topic.

Offline romanticyao

  • Newbie
  • *
  • Posts: 12
    • View Profile
Can't post any comment!
« Reply #15 on: June 01, 2003, 11:48:27 PM »
Hey, please login to http://toonorg.com/test4images/admin/index.php

user id: admin

password: admin

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
Can't post any comment!
« Reply #16 on: June 01, 2003, 11:56:26 PM »
ok, try this:
open global.php
find:
Code: [Select]
if (empty($PHP_SELF)) {
  if (!empty($HTTP_SERVER_VARS['PATH_INFO'])) {
    $PHP_SELF = $HTTP_SERVER_VARS['PATH_INFO'];
  }
  elseif (!empty($HTTP_SERVER_VARS['PHP_SELF'])) {
    $PHP_SELF = $HTTP_SERVER_VARS["PHP_SELF"];
  }
  elseif (!empty($HTTP_ENV_VARS['PHP_SELF'])) {
    $PHP_SELF = $HTTP_ENV_VARS["PHP_SELF"];
  }
  else {
    $PHP_SELF = getenv("SCRIPT_NAME");
  }
}

$self_url = basename($PHP_SELF);
if (empty($self_url) || !preg_match("/\.php$/", $self_url)) {
  $self_url = "index.php";
}

add echo $self_url; after
$self_url = basename($PHP_SELF);
it should show on top-left corner of screen your current location.
dont worry about error messages, it's just a test.
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 www.girls-on-bikes.com

  • Full Member
  • ***
  • Posts: 145
    • View Profile
    • http://www.girls-on-bikes.com/
Can't post any comment!
« Reply #17 on: June 02, 2003, 07:17:55 AM »
OK, I've helped romanticyao diagnose what his problem is.
Apparently {self} is not getting set correctly (which is what I thought it was).

You can verify here (look under the yellow "Post Comment" text):
http://toonorg.com/test4images/details.php?image_id=1

This looks like a possible server side problem with not passing vars correctly?  Possibly because of global_registers.

Anybody have any ideas?

Offline romanticyao

  • Newbie
  • *
  • Posts: 12
    • View Profile
Can't post any comment!
« Reply #18 on: June 04, 2003, 06:06:48 PM »
Hey, I cotacted my host and i was told that:

Hi,

The variable php_self no longer works in PHP 4.3.1. Use an alternative.

If you do a phpinfo() you will see that global registrers are enabled.

Peter

______________________________________
Technical Support Department


and


Hello,

This might be helpful for you:

http://php.lamphost.net/manual/fi/tutorial.oldcode.php

As you can see, global registers are enabled for your account.  However,
the php_self was change during the new version of PHP.  

Regards,

Chris





can someone help me out :cry:  :cry:  :cry:

Offline grepfrue

  • Pre-Newbie
  • Posts: 5
    • View Profile
can't post comments too
« Reply #19 on: July 01, 2003, 10:55:00 AM »
hi!
has anyone an idea or maybe a running script without the
Code: [Select]
$PHP_SELF variable? because that seems to be the problem. my webhoster updates php to version 4.3.1.
thanks to all!
greets, grep

Offline Chris

  • 4images Moderator
  • 4images Guru
  • *****
  • Posts: 4.487
  • Did u ever stop to think and then forget to start?
    • View Profile
Can't post any comment!
« Reply #20 on: July 02, 2003, 04:39:48 PM »
If $PHP_SELF doesn't work, you're likely to find even bigger problems!  Your hosting provider simply must fix this issue.

Offline grepfrue

  • Pre-Newbie
  • Posts: 5
    • View Profile
Can't post any comment!
« Reply #21 on: July 02, 2003, 07:54:16 PM »
my webhoster turns register_globals ON. so, it should work with $PHP_SELF, but it doesn't.
Maybe it's because of $PHP_SELF is set as "no value"?!?

if you're interested, that's my page: http://tmp.natureis.ch
i've created a test user with username: test and password: test

thanks for your help!!
greets, grep