On 13 October 2010 15:28, <Howard.Holcombe@xxxxxxxxxx> 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: <file-path-name> > > 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 = On > 381d379 > < open_basedir="X:\work\hholcomb\PHP" > 533c531 > < display_errors = On > --- >> display_errors = Off > 641d638 > < error_log = "X:\work\hholcomb\PHP\error_log\PHP_error_log.log" > 813d809 > < extension_dir = "X:\work\hholcomb\PHP\extract_5.3.3_VC6\ext" > 827d822 > < cgi.force_redirect = 0 > 848d842 > < cgi.fix_pathinfo=1 > 857d850 > < fastcgi.impersonate = 1 > 862d854 > < fastcgi.logging = 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 > Â Â Â Â Âspecifying the name of the file w/o the path - same result > Â 4. added a -c <ini-path> 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 > 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? -- 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