error of "Could not open input file" from PHP CLI

error of "Could not open input file" from PHP CLI

am 13.10.2010 16:28:03 von Howard.Holcombe

HELP

I have just started to work with PHP.

When I attempt to execute a PHP script I always get the error msg
Could not open input file:

I did not find anything about this being a known problem in the archive
so presume I am doing something wrong.

How can I resolve this problem?

Howard Holcombe

- - - - - - - - - - - - -

DETAILS
I downloaded the Windows 5.3.3_VC6 version of PHP onto a XP system and
did a manual install as per the install.txt file. The install was
performed as a regular user rather than Administrator.

1.
When I use the PHP CLI program to execute a PHP function from the cmd
line as in
php -r "phpinfo();" > php_results
I get the expected data in the output file.

2.
I created a PHP script file named phpinfo.php (in the directory
X:\work\hholcomb\PHP\test) using Wordpad to execute the phpinfo()
function. The script file permissions are
Everyone - Modify, Read&Execute, Read, Write
The script file is NOT Read-only, Hidden or Archive

3.
When I use the PHP CLI program to execute a PHP script file from the cmd
line as in
php -f "X:\work\hholcomb\PHP\test\phpinfo.php"

I get the error
Could not open input file: X:\work\hholcomb\PHP\test\phpinfo.php

4.
There are no error log entries

5.
The changes I made to the php.ini file are
-----------------------------------
X:\work\hholcomb\PHP\extract_5.3.3_VC6>diff C:\windows\php.ini
php.ini-production
123d122
< log_errors =3D On
381d379
< open_basedir=3D"X:\work\hholcomb\PHP"
533c531
< display_errors =3D On
---
> display_errors =3D Off
641d638
< error_log =3D "X:\work\hholcomb\PHP\error_log\PHP_error_log.log"
813d809
< extension_dir =3D "X:\work\hholcomb\PHP\extract_5.3.3_VC6\ext"
827d822
< cgi.force_redirect =3D 0
848d842
< cgi.fix_pathinfo=3D1
857d850
< fastcgi.impersonate =3D 1
862d854
< fastcgi.logging =3D 0

X:\work\hholcomb\PHP\extract_5.3.3_VC6>
--------------------------------------

I have done the following to isolate/resolve the problem
1. validated that the script file does exist in the specified
directory and is
accessible using the DOS "type" command - file contents are
displayed
2. tried using UNIX slashes in the path to the script file - same
result
3. tried running from the directory containing the script file and
just=20
specifying the name of the file w/o the path - same result
4. added a -c to the cmd line - same result
5. added/removed the open_basedir specification from the php.ini file
- same result
6. attempted to execute other PHP script files in the same directory
- same result
7. removed the quote characters around the file path for the script
file - same result

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

Re: error of "Could not open input file" from PHP CLI

am 14.10.2010 12:15:58 von Richard Quadling

On 13 October 2010 15:28, wrote:
>
> HELP
>
> I have just started to work with PHP.
>
> When I attempt to execute a PHP script I always get the error msg
>       Could not open input file:
>
> I did not find anything about this being a known problem in the archive
> so presume I am doing something wrong.
>
> How can I resolve this problem?
>
> Howard Holcombe
>
> - - - - - - - - - - - - -
>
> DETAILS
> I downloaded the Windows 5.3.3_VC6 version of PHP onto a XP system and
> did a manual install as per the install.txt file.  The install was
> performed as a regular user rather than Administrator.
>
> 1.
> When I use the PHP CLI program to execute a PHP function from the cmd
> line as in
>        php -r "phpinfo();" > php_results
> I get the expected data in the output file.
>
> 2.
> I created a PHP script file named phpinfo.php (in the directory
> X:\work\hholcomb\PHP\test) using Wordpad to execute the phpinfo()
> function.  The script file permissions are
>          Everyone - Modify, Read&Execute, Read, =
Write
> The script file is NOT Read-only, Hidden or Archive
>
> 3.
> When I use the PHP CLI program to execute a PHP script file from the cmd
> line as in
>        php -f "X:\work\hholcomb\PHP\test\phpinfo.php"
>
> I get the error
>        Could not open input file: X:\work\hholcomb\PH=
P\test\phpinfo.php
>
> 4.
> There are no error log entries
>
> 5.
> The changes I made to the php.ini file are
> -----------------------------------
> X:\work\hholcomb\PHP\extract_5.3.3_VC6>diff C:\windows\php.ini
> php.ini-production
> 123d122
> < log_errors =3D On
> 381d379
> < open_basedir=3D"X:\work\hholcomb\PHP"
> 533c531
> < display_errors =3D On
> ---
>> display_errors =3D Off
> 641d638
> < error_log =3D "X:\work\hholcomb\PHP\error_log\PHP_error_log.log"
> 813d809
> < extension_dir =3D "X:\work\hholcomb\PHP\extract_5.3.3_VC6\ext"
> 827d822
> < cgi.force_redirect =3D 0
> 848d842
> < cgi.fix_pathinfo=3D1
> 857d850
> < fastcgi.impersonate =3D 1
> 862d854
> < fastcgi.logging =3D 0
>
> X:\work\hholcomb\PHP\extract_5.3.3_VC6>
> --------------------------------------
>
> I have done the following to isolate/resolve the problem
>   1. validated that the script file does exist in the specified
> directory and is
>         accessible using the DOS "type" command - fil=
e contents are
> displayed
>   2. tried using UNIX slashes in the path to the script file - same
> result
>   3. tried running from the directory containing the script file and
> just
>          specifying the name of the file w/o the=
path - same result
>   4. added a -c to the cmd line - same result
>   5. added/removed the open_basedir specification from the php.ini f=
ile
> - same result
>   6. attempted to execute other PHP script files in the same directo=
ry
> - same result
>   7. removed the quote characters around the file path for the scrip=
t
> file - same result
>

Can you load http://live.sysinternals.com/FileMon.exe and filter on
"php.exe" and highlight "phpinfo".

What happens when PHP goes looking for the phpinfo.php script?




--=20
Richard Quadling
Twitter : EE : Zend
@RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY

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

Re: error of "Could not open input file" from PHP CLI

am 14.10.2010 13:50:11 von nevvermind

--90e6ba6e8d8afde5140492924fc3
Content-Type: text/plain; charset=UTF-8

That link was broken. Use this instead:
http://live.sysinternals.com/Procmon.exe

--90e6ba6e8d8afde5140492924fc3--

Re: error of "Could not open input file" from PHP CLI

am 14.10.2010 14:16:29 von Richard Quadling

On 14 October 2010 12:50, nevvermind wrote:
> That link was broken. Use this instead:
> http://live.sysinternals.com/Procmon.exe
>

Oh yeah. FileMon and RegMon are now integrated into ProcMon.

I still use them separately.

So, sorry about the duff link. Didn't realise that FM and RM were dead.

--
Richard Quadling
Twitter : EE : Zend
@RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY

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

Re: error of "Could not open input file" from PHP CLI

am 14.10.2010 19:24:23 von Richard Quadling

On 14 October 2010 16:03, wrote:
> Richard
>
> I downloaded the executable but could not run it as I don't have admin pr=
ivs on the system.
>
> You ask
>        What happens when PHP goes looking for the php=
info.php script?
> Answer
> The only output in the cmd window is the msg
>        Could not open input file: phpinfo.php
> And there does not appear to be any error log entries generated.
>
> Any other things I can attempt?
>
> Howard Holcombe
>
> -----Original Message-----
> From: Richard Quadling [mailto:rquadling@gmail.com]
> Sent: Thursday, October 14, 2010 8:16 AM
> To: nevvermind
> Cc: Holcombe, Howard @ CSG - CSE; php-windows@lists.php.net
> Subject: Re: [PHP-WIN] error of "Could not open input file" from PHP CLI
>
> On 14 October 2010 12:50, nevvermind wrote:
>> That link was broken. Use this instead:
>> http://live.sysinternals.com/Procmon.exe
>>
>
> Oh yeah. FileMon and RegMon are now integrated into ProcMon.
>
> I still use them separately.
>
> So, sorry about the duff link. Didn't realise that FM and RM were dead.
>
> --
> Richard Quadling
> Twitter : EE : Zend
> @RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY
>

In the same command copy the following 3 lines ...

dir "X:\work\hholcomb\PHP\test\phpinfo.php"
cacls "X:\work\hholcomb\PHP\test\phpinfo.php"
type "X:\work\hholcomb\PHP\test\phpinfo.php"

--=20
Richard Quadling
Twitter : EE : Zend
@RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY

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

Re: error of "Could not open input file" from PHP CLI

am 15.10.2010 12:43:53 von Richard Quadling

On 14 October 2010 19:26, wrote:
> Richard
>
> As requested
> X:\work\hholcomb\PHP\extract_5.3.3_VC6> dir "X:\work\hholcomb\PHP\test\ph=
pinfo.php"
>  Volume in drive X has no label.
>  Volume Serial Number is 5457-BB00
>
>  Directory of X:\work\hholcomb\PHP\test
>
> 10/11/2010  02:20 PM             =C2=
=A0  23 phpinfo.php
>               1 File(s)     =
        23 bytes
>               0 Dir(s)  122,355,7=
73,440 bytes free
>
> X:\work\hholcomb\PHP\extract_5.3.3_VC6> cacls "X:\work\hholcomb\PHP\test\=
phpinfo.php"
> X:\work\hholcomb\PHP\test\phpinfo.php COMMSYS\Domain Admins:F
>                     =C2=
=A0                Everyone:C
>                     =C2=
=A0                NT AUTHORITY\SYS=
TEM:F
>
>
> X:\work\hholcomb\PHP\extract_5.3.3_VC6> type "X:\work\hholcomb\PHP\test\p=
hpinfo.php"
> > phpinfo();
> ?>
>
> X:\work\hholcomb\PHP\extract_5.3.3_VC6>
>
> -----Original Message-----
> From: Richard Quadling [mailto:rquadling@gmail.com]
> Sent: Thursday, October 14, 2010 1:24 PM
> To: Holcombe, Howard @ CSG - CSE; php-windows
> Subject: Re: [PHP-WIN] error of "Could not open input file" from PHP CLI
>
> On 14 October 2010 16:03,   wrote:
>> Richard
>>
>> I downloaded the executable but could not run it as I don't have admin p=
rivs on the system.
>>
>> You ask
>>        What happens when PHP goes looking for the ph=
pinfo.php script?
>> Answer
>> The only output in the cmd window is the msg
>>        Could not open input file: phpinfo.php
>> And there does not appear to be any error log entries generated.
>>
>> Any other things I can attempt?
>>
>> Howard Holcombe
>>
>> -----Original Message-----
>> From: Richard Quadling [mailto:rquadling@gmail.com]
>> Sent: Thursday, October 14, 2010 8:16 AM
>> To: nevvermind
>> Cc: Holcombe, Howard @ CSG - CSE; php-windows@lists.php.net
>> Subject: Re: [PHP-WIN] error of "Could not open input file" from PHP CLI
>>
>> On 14 October 2010 12:50, nevvermind wrote:
>>> That link was broken. Use this instead:
>>> http://live.sysinternals.com/Procmon.exe
>>>
>>
>> Oh yeah. FileMon and RegMon are now integrated into ProcMon.
>>
>> I still use them separately.
>>
>> So, sorry about the duff link. Didn't realise that FM and RM were dead.
>>
>
> In the same command copy the following 3 lines ...
>
> dir "X:\work\hholcomb\PHP\test\phpinfo.php"
> cacls "X:\work\hholcomb\PHP\test\phpinfo.php"
> type "X:\work\hholcomb\PHP\test\phpinfo.php"
>

Howard.

2 things.

1 - Please use reply to all as I'm NOT the only person on the list.
2 - Please bottom post as it makes it easier for readers to read the
message in order.

As your previous response
Can you now type the following commands ...

FOR %P IN (php.exe) do %~dpnx$PATH:P -v
..\php.exe -v
...\php.exe -v

I'm wondering if you have 2+ versions of PHP installed.

If the above does output multiple versions, try these lines ...

FOR %P IN (php.exe) do %~dpnx$PATH:P -n -f
"X:\work\hholcomb\PHP\test\phpinfo.php"
..\php.exe -n -f "X:\work\hholcomb\PHP\test\phpinfo.php"
...\php.exe -f "X:\work\hholcomb\PHP\test\phpinfo.php"

Regards,

Richard.

P.S. Put your response beneath this line.


--=20
Richard Quadling
Twitter : EE : Zend
@RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY

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

RE: error of "Could not open input file" from PHP CLI

am 18.10.2010 16:54:09 von Howard.Holcombe

UmVxdWVzdGVkIHRlc3QgcmVzdWx0cyBhdCBib3R0b20NCkguSC4NCg0KLS0t LS1PcmlnaW5hbCBN
ZXNzYWdlLS0tLS0NCkZyb206IFJpY2hhcmQgUXVhZGxpbmcgW21haWx0bzpy cXVhZGxpbmdAZ21h
aWwuY29tXSANClNlbnQ6IEZyaWRheSwgT2N0b2JlciAxNSwgMjAxMCA2OjQ0 IEFNDQpUbzogSG9s
Y29tYmUsIEhvd2FyZCBAIENTRyAtIENTRTsgcGhwLXdpbmRvd3MNClN1Ympl Y3Q6IFJlOiBbUEhQ
LVdJTl0gZXJyb3Igb2YgIkNvdWxkIG5vdCBvcGVuIGlucHV0IGZpbGUiIGZy b20gUEhQIENMSQ0K
DQpPbiAxNCBPY3RvYmVyIDIwMTAgMTk6MjYsICA8SG93YXJkLkhvbGNvbWJl QGwtM2NvbS5jb20+
IHdyb3RlOg0KPiBSaWNoYXJkDQo+DQo+IEFzIHJlcXVlc3RlZA0KPiBYOlx3 b3JrXGhob2xjb21i
XFBIUFxleHRyYWN0XzUuMy4zX1ZDNj4gZGlyICJYOlx3b3JrXGhob2xjb21i XFBIUFx0ZXN0XHBo
cGluZm8ucGhwIg0KPiDCoFZvbHVtZSBpbiBkcml2ZSBYI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:07 von Richard Quadling

On 18 October 2010 15:54, wrote:
> Requested test results at bottom
> H.H.
>
> -----Original Message-----
> From: Richard Quadling [mailto:rquadling@gmail.com]
> Sent: Friday, October 15, 2010 6:44 AM
> To: Holcombe, Howard @ CSG - CSE; php-windows
> Subject: Re: [PHP-WIN] error of "Could not open input file" from PHP CLI
>
> On 14 October 2010 19:26,   wrote:
>> Richard
>>
>> As requested
>> X:\work\hholcomb\PHP\extract_5.3.3_VC6> dir "X:\work\hholcomb\PHP\test\p=
hpinfo.php"
>>  Volume in drive X has no label.
>>  Volume Serial Number is 5457-BB00
>>
>>  Directory of X:\work\hholcomb\PHP\test
>>
>> 10/11/2010  02:20 PM             =C2=
=A0  23 phpinfo.php
>>               1 File(s)    =
        23 bytes
>>               0 Dir(s)  122,355,=
773,440 bytes free
>>
>> X:\work\hholcomb\PHP\extract_5.3.3_VC6> cacls "X:\work\hholcomb\PHP\test=
\phpinfo.php"
>> X:\work\hholcomb\PHP\test\phpinfo.php COMMSYS\Domain Admins:F
>>                     =
                 Everyone:C
>>                     =
                 NT AUTHORITY\=
SYSTEM:F
>>
>>
>> X:\work\hholcomb\PHP\extract_5.3.3_VC6> type "X:\work\hholcomb\PHP\test\=
phpinfo.php"
>> >> phpinfo();
>> ?>
>>
>> X:\work\hholcomb\PHP\extract_5.3.3_VC6>
>>
>> -----Original Message-----
>> From: Richard Quadling [mailto:rquadling@gmail.com]
>> Sent: Thursday, October 14, 2010 1:24 PM
>> To: Holcombe, Howard @ CSG - CSE; php-windows
>> Subject: Re: [PHP-WIN] error of "Could not open input file" from PHP CLI
>>
>> On 14 October 2010 16:03,   wrote:
>>> Richard
>>>
>>> I downloaded the executable but could not run it as I don't have admin =
privs on the system.
>>>
>>> You ask
>>>        What happens when PHP goes looking for the p=
hpinfo.php script?
>>> Answer
>>> The only output in the cmd window is the msg
>>>        Could not open input file: phpinfo.php
>>> And there does not appear to be any error log entries generated.
>>>
>>> Any other things I can attempt?
>>>
>>> Howard Holcombe
>>>
>>> -----Original Message-----
>>> From: Richard Quadling [mailto:rquadling@gmail.com]
>>> Sent: Thursday, October 14, 2010 8:16 AM
>>> To: nevvermind
>>> Cc: Holcombe, Howard @ CSG - CSE; php-windows@lists.php.net
>>> Subject: Re: [PHP-WIN] error of "Could not open input file" from PHP CL=
I
>>>
>>> On 14 October 2010 12:50, nevvermind wrote:
>>>> That link was broken. Use this instead:
>>>> http://live.sysinternals.com/Procmon.exe
>>>>
>>>
>>> Oh yeah. FileMon and RegMon are now integrated into ProcMon.
>>>
>>> I still use them separately.
>>>
>>> So, sorry about the duff link. Didn't realise that FM and RM were dead.
>>>
>>
>> In the same command copy the following 3 lines ...
>>
>> dir "X:\work\hholcomb\PHP\test\phpinfo.php"
>> cacls "X:\work\hholcomb\PHP\test\phpinfo.php"
>> type "X:\work\hholcomb\PHP\test\phpinfo.php"
>>
>
> Howard.
>
> 2 things.
>
> 1 - Please use reply to all as I'm NOT the only person on the list.
> 2 - Please bottom post as it makes it easier for readers to read the
> message in order.
>
> As your previous response
> Can you now type the following commands ...
>
> FOR %P IN (php.exe) do %~dpnx$PATH:P -v
> .\php.exe -v
> ..\php.exe -v
>
> I'm wondering if you have 2+ versions of PHP installed.
>
> If the above does output multiple versions, try these lines ...
>
> FOR %P IN (php.exe) do %~dpnx$PATH:P -n -f
> "X:\work\hholcomb\PHP\test\phpinfo.php"
> .\php.exe -n -f "X:\work\hholcomb\PHP\test\phpinfo.php"
> ..\php.exe -f "X:\work\hholcomb\PHP\test\phpinfo.php"
>
> Regards,
>
> Richard.
>
> P.S. Put your response beneath this line.
> - - - - - - - - - -
>
> Results are
> C:\Documents and Settings\hholcomb>FOR %P in (php.exe) do %~dpnx$PATH:P -=
v
>
> C:\Documents and Settings\hholcomb>X:\work\hholcomb\PHP\extract_5.3.3_VC6=
\php.exe       -v
> PHP 5.3.3 (cli) (built: Jul 21 2010 20:03:25)
> Copyright (c) 1997-2010 The PHP Group
> Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies
>
> X:\work\hholcomb>FOR %P in (php.exe) do %~dpnx$PATH:P   -v
>
> X:\work\hholcomb>X:\work\hholcomb\PHP\extract_5.3.3_VC6\php. exe   =
      -v
> PHP 5.3.3 (cli) (built: Jul 21 2010 20:03:25)
> Copyright (c) 1997-2010 The PHP Group
> Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies
>
> X:\work\hholcomb>
>
> Note - under X:\work\hholcomb\PHP, I have
>        1. the directory named "extracted-5.3.3_VC9" w=
hich contains php.exe
>        2. the directory named "extract_5.3.3_VC6" whi=
ch contains php.exe
> But as you can see only the extract_5.3.3_VC6 version is found via the PA=
TH environment variable.
>
> I run the 2nd shell cmd even though there was only 1 php.exe found. =C2=
=A0The results were
>
> X:\work\hholcomb\PHP\extract_5.3.3_VC6>FOR %P in (php.exe) do %~dpnx$PATH=
:P
> -n -f "X:\work\hholcomb\PHP\test\phpinfo.php"
>
> X:\work\hholcomb\PHP\extract_5.3.3_VC6>X:\work\hholcomb\PHP\ extract_5.3.3=
_VC6\ph
> p.exe   -n -f "X:\work\hholcomb\PHP\test\phpinfo.php"
> Could not open input file: X:\work\hholcomb\PHP\test\phpinfo.php
>
> X:\work\hholcomb\PHP\extract_5.3.3_VC6>type "X:\work\hholcomb\PHP\test\ph=
pinfo.p
> hp"
> > phpinfo();
> ?>
>
> Howard Holcombe
>
>

At this stage, I'd like to see what FileMon or ProcMon is reporting
when you run ...

X:\work\hholcomb\PHP\extract_5.3.3_VC6\php.exe -n -f
"X:\work\hholcomb\PHP\test\phpinfo.php"


--=20
Richard Quadling
Twitter : EE : Zend
@RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY

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