How do I make people read my blog more frequently?
PHP5 and $_SERVER['DOCUMENT_ROOT']
Hello Guest
  
  • Login
• Register…
• Start blog
  • Who, Where, When
• What is interesting here?
• Duels
  • Polls
• Avatars
• Interests
  • Cities and Countries
• Random blog
• Users search
  • Search
• Games
• Tests
• QAIX
  • Сообщества
• Talxy Chat
• Horoscope
• Online
 
Register!

QAIX > PHP web-programming > PHP5 and $_SERVER['DOCUMENT_­ROOT'] 13 May 2009 15:29:56

  Top users: 
  Recent blog posts: 
  They have birthday today: 
  Forums:   
  Discuss: 
  Recent forum topics: 
  Recent forum comments:
  Модератор:

PHP5 and $_SERVER['DOCUMENT_­ROOT']

Jenifer 6 March 2006 05:01:21
 Well, I've found my first broken program when PHP 5 is installed. The program sets a path variable like this:

$HOMEPATH = $_SERVER['DOCUMENT_ROOT']."/appdir/"­;

Now, I get error messages like this at the top of these pages:

Notice: Undefined index: email in /usr/local/www/data­/appdir/blocks/login­_block.php on line 29

Notice: Undefined index: password in /usr/local/www/data­/appdir/blocks/login­_block.php on line 30


I saw a few posts about setting "register_long_arra­ys" on in php.ini, but that change didn't help. This file is included in many files from many different directories in the program. I even tried just hard coding the path, but then get these errors on pages that use functions like

file_get_contents($­HOMEPATH."theme/logi­n.htm");

(I had hard coded the HOMEPATH variable and still get these errors)

argh. Anyone have any ideas?

Jenifer




Add comment
Chris Johnson 6 March 2006 05:46:37 permanent link ]
 Jenifer wrote:> Well, I've found my first broken program when PHP 5 is installed. The program sets a path variable like this:>
$HOMEPATH = $_SERVER['DOCUMENT_ROOT']."/appdir/"­;>
Now, I get error messages like this at the top of these pages:>
Notice: Undefined index: email in /usr/local/www/data­/appdir/blocks/login­_block.php on line 29>
Notice: Undefined index: password in /usr/local/www/data­/appdir/blocks/login­_block.php on line 30

There's nothing wrong with setting $HOMEPATH above in PHP 5. That's perfectly
legal and should work fine. Something else is the cause of your problem.

..chris


-------------------­--------------------­--------------------­----------
To unsubscribe, e-mail: talk-unsubscribe-4z­cLI8jJc/rYtjvyW6yDsg­@public.gmane.org

Please read and follow the list guidelines:
http://www.tcphp.or­g/mailing_list/guide­lines

The tcphp.org mailing list is sponsored by pajunas interactive, inc.


Add comment
Jenifer 6 March 2006 06:07:51 permanent link ]
 hmm... I just built this on a PHP 4 server and, today, copied the files over
to the other server with PHP 5. I don't get those errors on the 4 server.
The rest of the page displays fine, I just get those errors at the top.
It's very bizarre,

Jenifer




----- Original Message -----
From: "Jenifer" <jenifer-+GwvjBt1dv­cswetKESUqMA@public.­gmane.org>
To: <talk-4zcLI8jJc/rYt­jvyW6yDsg@public.gma­ne.org>
Sent: Sunday, March 05, 2006 8:01 PM
Subject: [tcphp] PHP5 and $_SERVER['DOCUMENT_ROOT']


Well, I've found my first broken program when PHP 5 is installed. The
program sets a path variable like this:

$HOMEPATH = $_SERVER['DOCUMENT_ROOT']."/appdir/"­;

Now, I get error messages like this at the top of these pages:

Notice: Undefined index: email in
/usr/local/www/data­/appdir/blocks/login­_block.php on line 29

Notice: Undefined index: password in
/usr/local/www/data­/appdir/blocks/login­_block.php on line 30


I saw a few posts about setting "register_long_arra­ys" on in php.ini, but
that change didn't help. This file is included in many files from many
different directories in the program. I even tried just hard coding the
path, but then get these errors on pages that use functions like

file_get_contents($­HOMEPATH."theme/logi­n.htm");

(I had hard coded the HOMEPATH variable and still get these errors)

argh. Anyone have any ideas?

Jenifer






-------------------­--------------------­--------------------­----------
To unsubscribe, e-mail: talk-unsubscribe-4z­cLI8jJc/rYtjvyW6yDsg­@public.gmane.org

Please read and follow the list guidelines:
http://www.tcphp.or­g/mailing_list/guide­lines

The tcphp.org mailing list is sponsored by pajunas interactive, inc.


Add comment
Jenifer 6 March 2006 06:12:43 permanent link ]
 Oops, just realized that my changes to php.ini weren't being saved. heh.
I'll contact my server guy and have him give me permissions and see if
setting the register_long_array­s helps or not.

Jenifer




----- Original Message -----
From: "Jenifer" <jenifer-+GwvjBt1dv­cswetKESUqMA@public.­gmane.org>
To: <talk-4zcLI8jJc/rYt­jvyW6yDsg@public.gma­ne.org>
Sent: Sunday, March 05, 2006 9:07 PM
Subject: Re: [tcphp] PHP5 and $_SERVER['DOCUMENT_ROOT']

hmm... I just built this on a PHP 4 server and, today, copied the files > over to the other server with PHP 5. I don't get those errors on the 4 > server. The rest of the page displays fine, I just get those errors at the > top. It's very bizarre,>
Jenifer>
----- Original Message ----- > From: "Jenifer" <jenifer-+GwvjBt1dv­cswetKESUqMA@public.­gmane.org>> To: <talk-4zcLI8jJc/rYt­jvyW6yDsg@public.gma­ne.org>> Sent: Sunday, March 05, 2006 8:01 PM> Subject: [tcphp] PHP5 and $_SERVER['DOCUMENT_ROOT']>
Well, I've found my first broken program when PHP 5 is installed. The > program sets a path variable like this:>
$HOMEPATH = $_SERVER['DOCUMENT_ROOT']."/appdir/"­;>
Now, I get error messages like this at the top of these pages:>
Notice: Undefined index: email in > /usr/local/www/data­/appdir/blocks/login­_block.php on line 29>
Notice: Undefined index: password in > /usr/local/www/data­/appdir/blocks/login­_block.php on line 30>
I saw a few posts about setting "register_long_arra­ys" on in php.ini, but > that change didn't help. This file is included in many files from many > different directories in the program. I even tried just hard coding the > path, but then get these errors on pages that use functions like>
file_get_contents($­HOMEPATH."theme/logi­n.htm");>
(I had hard coded the HOMEPATH variable and still get these errors)>
argh. Anyone have any ideas?>
Jenifer>
-------------------­--------------------­--------------------­----------> To unsubscribe, e-mail: talk-unsubscribe-4z­cLI8jJc/rYtjvyW6yDsg­@public.gmane.org>
Please read and follow the list guidelines:> http://www.tcphp.or­g/mailing_list/guide­lines>
The tcphp.org mailing list is sponsored by pajunas interactive, inc.>


-------------------­--------------------­--------------------­----------
To unsubscribe, e-mail: talk-unsubscribe-4z­cLI8jJc/rYtjvyW6yDsg­@public.gmane.org

Please read and follow the list guidelines:
http://www.tcphp.or­g/mailing_list/guide­lines

The tcphp.org mailing list is sponsored by pajunas interactive, inc.


Add comment
Guest 13 May 2009 15:29:56 permanent link ]
 define('PATH_BASE', dirname(__FILE__) );
define('DS', DIRECTORY_SEPARATOR­);

$parts = explode( DS, PATH_BASE );
array_pop( $parts );

define( 'PATH_HOME', implode( DS, $parts ) );
Add comment
 

Add new comment

As:
Login:  Password:  
 
 
  
 
Пожалуйста, относитесь к собеседникам уважительно, не используйте нецензурные слова, не злоупотребляйте заглавными буквами, не публикуйте рекламу и объявления о купле/продаже, а также материалы нарушающие сетевой этикет или законы РФ. Ваш ip-адрес записывается.


QAIX > PHP web-programming > PHP5 and $_SERVER['DOCUMENT_­ROOT'] 13 May 2009 15:29:56

see also:
Get Previous Day (ie Last Sunday)
swap/memory ratio
Why my Oracle Instance Fails..?
pass tests:
see also:
Super DVD ripper upgrade to free Rip…
BlackBerry Storm review (BlackBerry…

  Copyright © 2001—2010 QAIX
Идея: Монашёв Михаил.
Авторами текстов, изображений и видео, размещённых на этой странице, являются пользователи сайта.
See Help and FAQ in the community support.qaix.com.
Write in the community about the bugs you have noticedbugs.qaix.com.
Write your offers and comments in the communities suggest.qaix.com.
Information for parents.
Пишите нам на .
If you would like to report an abuse of our service, such as a spam message, please .
Если Вы хотите пожаловаться на содержимое этой страницы, пожалуйста .