#21649 [Opn-Fbk]: This this problem with fopen() function for windows

2003-02-19 Thread sniper
 ID:   21649
 Updated by:   [EMAIL PROTECTED]
 Reported By:  lipinski7722 at rogers dot com
-Status:   Open
+Status:   Feedback
 Bug Type: Filesystem function related
 Operating System: win2000 server
 PHP Version:  4.3.0
 New Comment:

Using this script:

?php
error_reporting(E_ALL);
ini_set('include_path','.;c:\\');
$fp=fopen('autoexec.bat','r', 1);
echo ini_get('include_path');
?

I can't reproduce this (with PHP 4.3.2-dev) under Windows 2000. Please
try it out.



Previous Comments:


[2003-01-18 11:52:39] lipinski7722 at rogers dot com

User is administrator this is on localhost
where PHP4 is configured as Apache 1.3 module
What else I have to do in hppdcon for apache ?

Best Regards
W.J.Lipinski



[2003-01-17 21:15:33] [EMAIL PROTECTED]

Are you sure the webserver user has rights to access that path even?




[2003-01-16 14:33:36] lipinski7722 at rogers dot com

Hi 

I just try your solution.It doesn't work.
This is my path from ?php phpinfo();?   

include_path c:\php4\pear;c:\ c:\php4\pear;c:\ 
Could You SEE IT!

This is a code I'm tring to run 
?php
ini_set('include_path', 'c:\php4\pear;c:\\');
echo ini_get('include_path'), 'br /';

if(!$fp = fopen(authenticate.txt,r,1))
{ die(Pcould not open password file); }
//$fp = fopen('C:\php4\pear\authenticate.txt','r',1);
$auth_file = fread ($fp, filesize($fp));
fclose($fp);

This is an error I'm getting

c:\php4\pear;c:\

Warning: fopen(authenticate.txt) [function.fopen]: failed to create
stream: No such file or directory in c:\program files\apache
group\apache\htdocs\authfile.php on line 5

could not open password file

Best Regards
W.J.Lipinski



[2003-01-16 13:25:44] cg at gordimer dot net

Your include_path is wrong:

include_path c:\php4\pear;c:\ c:\php4\pear;c:\
should read
include_path=c:\php4\pear;c:\

an then you should fopen c:\authenticate.txt like this:
$fp= fopen(autenticate.txt,r,1);
because c:\ is already in your include path and you use 1 as your 3rd
parameter.

Christoph

Christoph



[2003-01-16 10:44:02] lipinski7722 at rogers dot com

Hi
So anybody have idea what to do with fopen(windows env)
or should I go back to Unix which snapshots are more
stable

Best Regards
W.J.Lipinski



The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/21649

-- 
Edit this bug report at http://bugs.php.net/?id=21649edit=1




#21649 [Opn-Fbk]: This this problem with fopen() function for windows

2003-01-17 Thread sniper
 ID:   21649
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Open
+Status:   Feedback
 Bug Type: Filesystem function related
 Operating System: win2000 server
 PHP Version:  4.3.0
 New Comment:

Are you sure the webserver user has rights to access that path even?



Previous Comments:


[2003-01-16 14:33:36] [EMAIL PROTECTED]

Hi 

I just try your solution.It doesn't work.
This is my path from ?php phpinfo();?   

include_path c:\php4\pear;c:\ c:\php4\pear;c:\ 
Could You SEE IT!

This is a code I'm tring to run 
?php
ini_set('include_path', 'c:\php4\pear;c:\\');
echo ini_get('include_path'), 'br /';

if(!$fp = fopen(authenticate.txt,r,1))
{ die(Pcould not open password file); }
//$fp = fopen('C:\php4\pear\authenticate.txt','r',1);
$auth_file = fread ($fp, filesize($fp));
fclose($fp);

This is an error I'm getting

c:\php4\pear;c:\

Warning: fopen(authenticate.txt) [function.fopen]: failed to create
stream: No such file or directory in c:\program files\apache
group\apache\htdocs\authfile.php on line 5

could not open password file

Best Regards
W.J.Lipinski



[2003-01-16 13:25:44] [EMAIL PROTECTED]

Your include_path is wrong:

include_path c:\php4\pear;c:\ c:\php4\pear;c:\
should read
include_path=c:\php4\pear;c:\

an then you should fopen c:\authenticate.txt like this:
$fp= fopen(autenticate.txt,r,1);
because c:\ is already in your include path and you use 1 as your 3rd
parameter.

Christoph

Christoph



[2003-01-16 10:44:02] [EMAIL PROTECTED]

Hi
So anybody have idea what to do with fopen(windows env)
or should I go back to Unix which snapshots are more
stable

Best Regards
W.J.Lipinski



[2003-01-15 20:53:24] [EMAIL PROTECTED]

Hi
I just switch to Apache 1.3 old one from 2.43
this is what I got as well
when I try

ini_set('include_path', '.;c:\php4\pear c:\\');
echo ini_get('include_path'), 'br /';
$fp = fopen('C:\php4\pear\authenticate.txt','r',1);
$auth_file = fread ($fp, filesize($fp));
fclose($fp);


.;c:\php4\pear c:\

Warning: fopen(C:\php4\pear\authenticate.txt) [function.fopen]: failed
to create stream: No such file or directory in c:\program files\apache
group\apache\htdocs\authfile.php on line 4

Warning: fread(): supplied argument is not a valid stream resource in
c:\program files\apache group\apache\htdocs\authfile.php on line 5

Warning: fclose(): supplied argument is not a valid stream resource in
c:\program files\apache group\apache\htdocs\authfile.php on line 6

Well I this point I assume that this is not apache 
proble just binary windows dist 4.3 php is with
bugs .How I can install latest snapshot ,please I need
an anser not just maybe ,babe   :))  :))
or anybody out there has some simmilar story

Best Regards
W.J.Lipinski



[2003-01-15 19:17:59] [EMAIL PROTECTED]

Do I need a wininstaller to install snapshot if so
How to do it ?
Is ther Apache 1.3 win-32 with SSL ?
Honestly to God I have less problems with Oracle 9.2.0.2
on my suse linux than that

Best Regards
W.J.Lipinski



The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/21649

-- 
Edit this bug report at http://bugs.php.net/?id=21649edit=1




#21649 [Opn-Fbk]: This this problem with fopen() function for windows

2003-01-15 Thread sniper
 ID:   21649
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Open
+Status:   Feedback
 Bug Type: Filesystem function related
 Operating System: win2000 server
 PHP Version:  4.3.0
 New Comment:

What is the exact include_path line in your php.ini?



Previous Comments:


[2003-01-15 02:12:22] [EMAIL PROTECTED]

I just want to say that I included double \\ in path
as well no luck
$fp = fopen(C:\\authenticate.txt,r,1);



[2003-01-15 02:03:56] [EMAIL PROTECTED]

$fp = fopen(C:\authenticate.txt,r,1);
$auth_file = fread ($fp, filesize($fp));
fclose($fp);

in include_path I have 

include_path c:\php4\pear;c:\ c:\php4\pear;c:\ 

That what I got

Warning: fopen(C:\authenticate.txt) [function.fopen]: failed to create
stream: No such file or directory in C:\Program Files\Apache
Group\Apache2\htdocs\authfile.php on line 3

Warning: fread(): supplied argument is not a valid stream resource in
C:\Program Files\Apache Group\Apache2\htdocs\authfile.php on line 4

As You can see I have Apache2.
Since I'm more oracle guru than PHP I'd like to see
more consistent way You do bug reporting I will benefit
everbody.
Best Regards
W.J.Lipinski





-- 
Edit this bug report at http://bugs.php.net/?id=21649edit=1




#21649 [Opn-Fbk]: This this problem with fopen() function for windows

2003-01-15 Thread sniper
 ID:   21649
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Open
+Status:   Feedback
 Bug Type: Filesystem function related
 Operating System: win2000 server
 PHP Version:  4.3.0
 New Comment:

You're using the 3rd param for fopen(), which says to look in the
include path for the file, but you're still using the absolute path to
it..what if you change it to plain 'authenticate.txt' ??



Previous Comments:


[2003-01-15 10:58:22] [EMAIL PROTECTED]

Hi Sniper
As You wish :))
This is what I got when I change a include_path as
You suggested
include_path .c:\php4\pear;c:\ .c:\php4\pear;c:\ 
look at 
1.source 
?php

$fp = fopen(C:\\authenticate.txt,r,1);
$auth_file = fread ($fp, filesize($fp));
fclose($fp);


?

2.errors
a) fopen()
Warning: fopen(C:\authenticate.txt) [function.fopen]: failed to create
stream: No such file or directory in C:\Program Files\Apache
Group\Apache2\htdocs\authfile.php on line 3

Warning: fread(): supplied argument is not a valid stream resource in
C:\Program Files\Apache Group\Apache2\htdocs\authfile.php on line 4

Warning: fclose(): supplied argument is not a valid stream resource in
C:\Program Files\Apache Group\Apache2\htdocs\authfile.php on line 5

b) Pear db

Warning: main(DB.php) [function.main]: failed to create stream: No such
file or directory in C:\Program Files\Apache
Group\Apache2\htdocs\login_db.php on line 2

Fatal error: main() [function.main]: Failed opening required 'DB.php'
(include_path='.c:\php4\pear;c:\') in C:\Program Files\Apache
Group\Apache2\htdocs\login_db.php on line 2




be more systematic :))  :))


I say changing the path in php.ini doesn't do the trick

I change it back to 
include_path=c:\php4\pear;c:\php4\php-4.3.0-Win32
and put my authenticate.txt
afert kicking Apache I got 
from phpinfo()

include_path c:\php4\pear;c:\php4\php-4.3.0-Win32
c:\php4\pear;c:\php4\php-4.3.0-Win32 

read this portion and I need an anser please no more 
guess

$fp = fopen(C:\\php4\\php-4.3.0-Win32\\authenticate.txt,r,1);
$auth_file = fread ($fp, filesize($fp));
fclose($fp);



Now I got Pear DB working and same error with fopen()
this is a print out 

Warning: fopen(C:\php4\php-4.3.0-Win32\authenticate.txt)
[function.fopen]: failed to create stream: No such file or directory in
C:\Program Files\Apache Group\Apache2\htdocs\authfile.php on line 3

Warning: fread(): supplied argument is not a valid stream resource in
C:\Program Files\Apache Group\Apache2\htdocs\authfile.php on line 4

Warning: fclose(): supplied argument 

I hope this will help You
Best Regards
W.J.Lipinski



[2003-01-15 09:30:54] [EMAIL PROTECTED]

Please use the 'Edit Submission' page when you edit your own bug
reports.

And does your example work with the .;c:\php4\pear;c:\
as include_path ? And what error does the PEAR Db give then?




[2003-01-15 08:36:00] [EMAIL PROTECTED]

Hi 

I just change a line in php.ini
 include_path=c:\php4\pear;c:

when I run after I restarted Apache 2 
?php phpinfo();?   

it shows
include_path c:\php4\pear;c: c:\php4\pear;c: 

Warning: fopen(C:\authenticate.txt) [function.fopen]: failed to create
stream: No such file or directory in C:\Program Files\Apache
Group\Apache2\htdocs\authfile.php on line 3

Warning: fread(): supplied argument is not a valid stream resource in
C:\Program Files\Apache Group\Apache2\htdocs\authfile.php on line 4

Same error ???

Best Regards
W.J.Lipinski



[2003-01-15 07:33:58] [EMAIL PROTECTED]

Hi Sniper
; Windows: \path1;\path2
; include_path = .;c:\php4\includes
; include_path=.;c:\php4\pear
  include_path=c:\php4\pear;c:\

Please notice when I change path to .;c:\php4\pear;c:\
Pear DB is complaining that cannot find what needed.
Onother story is that when You comment these line 
So You shoudn't see any lines.Isn't that strange

.;c:\php4\pear this is being shown  from ?php phpinfo();?   
How include_path could be hardcoded

Best Regards
W.J.Lipinski



[2003-01-15 03:10:40] [EMAIL PROTECTED]

What is the exact include_path line in your php.ini?




The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/21649

-- 
Edit this bug report at http://bugs.php.net/?id=21649edit=1