"Could not open input file" error on "php -f

Whether you are using Linux on the desktop or as a server, it's still good that you're using Linux. Linux related questions go here.

Moderator: General Moderators

"Could not open input file" error on "php -f

Postby php_ghost » Mon Oct 29, 2007 10:50 am

Hi everyone,

I'm having problems running this command.

whenever I open a url using "php -f" in the command line it always shows the message "Could not open input file."

ex.
php -f "http://www.yahoo.com"

Could not open input file : http//www.yahoo.com

What could be the problem? :cry:

TIA
Last edited by php_ghost on Mon Oct 29, 2007 11:13 am, edited 2 times in total.
php_ghost
Forum Commoner
 
Posts: 55
Joined: Thu Jan 11, 2007 4:29 am

Postby feyd » Mon Oct 29, 2007 11:03 am

It's not a LOCAL file.
User avatar
feyd
Neighborhood Spidermoddy
 
Posts: 31559
Joined: Mon Mar 29, 2004 4:24 pm
Location: Bothell, Washington, USA

Postby php_ghost » Mon Oct 29, 2007 11:11 am

but it works fine before
php_ghost
Forum Commoner
 
Posts: 55
Joined: Thu Jan 11, 2007 4:29 am

Postby php_ghost » Mon Oct 29, 2007 11:16 am

another thing is the "file" function

Syntax: [ Download ] [ Hide ]

file("url");

 


from one of my php scripts also stopped working.
php_ghost
Forum Commoner
 
Posts: 55
Joined: Thu Jan 11, 2007 4:29 am

Postby feyd » Mon Oct 29, 2007 11:45 am

You probably have allow_url_fopen off or allow_include_url off (if you're running a more recent version of PHP 5)
User avatar
feyd
Neighborhood Spidermoddy
 
Posts: 31559
Joined: Mon Mar 29, 2004 4:24 pm
Location: Bothell, Washington, USA

Re: "Could not open input file" error on "php -f

Postby drunkinmastaray » Wed Oct 29, 2008 11:18 am

I had the same problem.... If you do a copy and paste of the command "php –f" for some odd reason the "-" character will not be seen as a dash in the Cron Daemon, instead it is seen as "â€". I had to type it out and VIOLA... it works. At least it worked for me. :drunk:
drunkinmastaray
Forum Newbie
 
Posts: 1
Joined: Wed Oct 29, 2008 11:12 am


Return to Linux

Who is online

Users browsing this forum: No registered users and 1 guest