[PHP] invalid path when a page calls itself again

2003-02-19 Thread enediel
Hi everyone:
Suppose please this example:

/var/www/html/system/index.php
/var/www/html/system/subd1/page1.php

The users should call index.php to see the other pages into the
/var/www/html/system/ directory

the index.php calls itself using a form to authenticate the user

Inside page1.php I wrote:
if(!$nu_user){
  require (../index.php);
  exit;
};

It works correctly, but calling index.php through page1.php produces the
following error when index.php calls itself

the request URL /system/subd1/index.php was not found on this server.

index.php exists on /system/, not in /system/subd1/
What should I declare inside of index.php to avoid this error ?

thanks in advance
Enediel









Greetings
Enediel
Linux user 300141

Happy who can penetrate the secret causes of the things
¡Use Linux!


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] invalid path when a page calls itself again

2003-02-19 Thread Kevin Stone
I don't know for sure but I believe commands like (../)  may not work in the
require() or include() functions.  Just code the exact path from the home
directory and you should be good to go..
require(/var/www/html/system/index.php);

By the way I'd think twice about the way in which you're authenticating the
user.  If register_globals is ON then I could simply type
http://www.yourdomain/system/subd1/page1.php?nu_user=true
and gain access without logging in.

- Kevin

- Original Message -
From: enediel [EMAIL PROTECTED]
To: php [EMAIL PROTECTED]
Sent: Wednesday, February 19, 2003 2:59 PM
Subject: [PHP] invalid path when a page calls itself again


 Hi everyone:
 Suppose please this example:

 /var/www/html/system/index.php
 /var/www/html/system/subd1/page1.php

 The users should call index.php to see the other pages into the
 /var/www/html/system/ directory

 the index.php calls itself using a form to authenticate the user

 Inside page1.php I wrote:
 if(!$nu_user){
   require (../index.php);
   exit;
 };

 It works correctly, but calling index.php through page1.php produces the
 following error when index.php calls itself

 the request URL /system/subd1/index.php was not found on this server.

 index.php exists on /system/, not in /system/subd1/
 What should I declare inside of index.php to avoid this error ?

 thanks in advance
 Enediel









 Greetings
 Enediel
 Linux user 300141

 Happy who can penetrate the secret causes of the things
 ¡Use Linux!


 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Fw: [PHP] invalid path when a page calls itself again

2003-02-19 Thread enediel
Thanks Kevin for your answer:

I emphasize that require (../index.php) works because I see the page
index.php finally in the browser, the problem is when this page calls itself
to authenticate the user, It's seems like the page tries to find itself into
the /system/subd1/ directory.

When I called page1.php directly and it redirected to index.php the browser
shows the location 'http://localhost/system/subd1/page1.php', even when the
browser shows the index.php content.

On the other hand,
http://www.yourdomain/system/subd1/page1.php?nu_user=true
won't work in this case.  :)


- Original Message -
From: Kevin Stone [EMAIL PROTECTED]
To: enediel [EMAIL PROTECTED]; php [EMAIL PROTECTED]
Sent: Wednesday, February 19, 2003 12:04 PM
Subject: Re: [PHP] invalid path when a page calls itself again


 I don't know for sure but I believe commands like (../)  may not work in
the
 require() or include() functions.  Just code the exact path from the home
 directory and you should be good to go..
 require(/var/www/html/system/index.php);

 By the way I'd think twice about the way in which you're authenticating
the
 user.  If register_globals is ON then I could simply type
 http://www.yourdomain/system/subd1/page1.php?nu_user=true
 and gain access without logging in.

 - Kevin

 - Original Message -
 From: enediel [EMAIL PROTECTED]
 To: php [EMAIL PROTECTED]
 Sent: Wednesday, February 19, 2003 2:59 PM
 Subject: [PHP] invalid path when a page calls itself again


  Hi everyone:
  Suppose please this example:
 
  /var/www/html/system/index.php
  /var/www/html/system/subd1/page1.php
 
  The users should call index.php to see the other pages into the
  /var/www/html/system/ directory
 
  the index.php calls itself using a form to authenticate the user
 
  Inside page1.php I wrote:
  if(!$nu_user){
require (../index.php);
exit;
  };
 
  It works correctly, but calling index.php through page1.php produces the
  following error when index.php calls itself
 
  the request URL /system/subd1/index.php was not found on this server.
 
  index.php exists on /system/, not in /system/subd1/
  What should I declare inside of index.php to avoid this error ?
 
  thanks in advance
  Enediel
 
 
 
 
 
 
 
 
 
  Greetings
  Enediel
  Linux user 300141
 
  Happy who can penetrate the secret causes of the things
  ¡Use Linux!
 
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php
 
 



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Fw: [PHP] invalid path when a page calls itself again SOLUTION

2003-02-19 Thread enediel
Thanks Kevin for your advice:

The form included into the index.php had declared the 'action' parameter
this way:
action=index.php , and the error ocurred.

I took your advice and changed this value by
action = http://?echo $HTTP_SERVER_VARS['HTTP_HOST']?/system/index.php.

In asp, action=index.php  works normally, but the philosophy changes a
little here.



 - Original Message -
 From: Kevin Stone [EMAIL PROTECTED]
 To: enediel [EMAIL PROTECTED]; php [EMAIL PROTECTED]
 Sent: Wednesday, February 19, 2003 12:04 PM
 Subject: Re: [PHP] invalid path when a page calls itself again


  I don't know for sure but I believe commands like (../)  may not work in
 the
  require() or include() functions.  Just code the exact path from the
home
  directory and you should be good to go..
  require(/var/www/html/system/index.php);
 
  By the way I'd think twice about the way in which you're authenticating
 the
  user.  If register_globals is ON then I could simply type
  http://www.yourdomain/system/subd1/page1.php?nu_user=true
  and gain access without logging in.
 
  - Kevin
 
  - Original Message -
  From: enediel [EMAIL PROTECTED]
  To: php [EMAIL PROTECTED]
  Sent: Wednesday, February 19, 2003 2:59 PM
  Subject: [PHP] invalid path when a page calls itself again
 
 
   Hi everyone:
   Suppose please this example:
  
   /var/www/html/system/index.php
   /var/www/html/system/subd1/page1.php
  
   The users should call index.php to see the other pages into the
   /var/www/html/system/ directory
  
   the index.php calls itself using a form to authenticate the user
  
   Inside page1.php I wrote:
   if(!$nu_user){
 require (../index.php);
 exit;
   };
  
   It works correctly, but calling index.php through page1.php produces
the
   following error when index.php calls itself
  
   the request URL /system/subd1/index.php was not found on this server.
  
   index.php exists on /system/, not in /system/subd1/
   What should I declare inside of index.php to avoid this error ?
  
   thanks in advance
   Enediel
  
  
  
  
  
  
  
  
  
   Greetings
   Enediel
   Linux user 300141
  
   Happy who can penetrate the secret causes of the things
   ¡Use Linux!
  
  
   --
   PHP General Mailing List (http://www.php.net/)
   To unsubscribe, visit: http://www.php.net/unsub.php
  
  
 


 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] invalid path

2002-06-08 Thread Webmaster

My OS is XP Pro.

I installed my web folders in c:\web instead of c:\apache\htdocs

My php folder is:  c:/php

In the httpd.conf:
DocumentRoot /web/myweb
ScriptAlias /php/ c:/php/
   AddType application/x-httpd-php .php
   Action application/x-httpd-php /php/php.exe

In my Php.ini:
include_path = c:/web/myweb/ezp/

My ez Publish folder is  c:/web/myweb/ezp


Error text in browser is:

Warning: fopen(c:/web/myweb/php/php.exe/ezp/error.log,a) - No such file
or directory in classes/ezfile.php on line 282
Log file could not be opened.

Error:
/php/php.exe is inserted unexpectly..

What's wrong with my php?