RE: [PHP] Failed to open stream
[snip] I have two *identical*l routines residing on two difference hosts -- one works and the other doesn't. [/snip] Is safe mode 'on' on one and not the other? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Failed to open stream
On 01/03/06, tedd [EMAIL PROTECTED] wrote: Hi gang: I have two *identical*l routines residing on two difference hosts -- one works and the other doesn't. Please review (this works): http://www.webbytedd.com/examples/rank.php However, this doesn't: http://www.xn--ovg.com/rank.php Any idea as to what is wrong? Yes. You're violating google's terms of service. From your script: Warning: fopen(http://www.google.com/search?client=navclient-autoch=61898169760features=Rankq=info:webbytedd.com): failed to open stream: HTTP request failed! HTTP/1.0 403 Forbidden in /home/tedd/public_html/rank.php on line 124 From the page that gave you the HTTP 403 Forbidden response (surely that was a a bit of a clue?): Forbidden Your client does not have permission to get URL /search?client=navclient-autoch=61898169760features=Rankq=info:webbytedd.com from this server. (Client IP address: xx.xx.xx.xx) Please see Google's Terms of Service posted at http://www.google.com/terms_of_service.html From google's terms of service: You may not send automated queries of any sort to Google's system without express permission in advance from Google. Note that sending automated queries includes, among other things: * using any software which sends queries to Google to determine how a website or webpage ranks on Google for various queries; -robin
Re: [PHP] Failed to open stream
Please review (this works): http://www.webbytedd.com/examples/rank.php However, this doesn't: http://www.xn--ovg.com/rank.php Any idea as to what is wrong? Yes. You're violating google's terms of service. Okay, so one is violating google's terms of service and failing while the other isn't? OR are they both violating, but one slipping through, or what? From the page that gave you the HTTP 403 Forbidden response (surely that was a a bit of a clue?): Yeah, that was a clue -- but not why one works and the other doesn't. Do you have a clue as to why? The point here was that I was trying to learn -- I'm sure that my code is NOT representative of Google's current PageRank system and I'm not using it for any purpose other than to learn. In any event, considering the Google Police here, I've removed the offending code. Question closed. tedd -- http://sperling.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Failed to open stream
On 01/03/06, tedd [EMAIL PROTECTED] wrote: In any event, considering the Google Police here, I've removed the offending code. Google Police? Aye, right! You asked why your script was failing. It's failing because they detected you were breaking their terms. Couldn't care less myself; it's not a php problem. -robin
Re: [PHP] Failed to open stream
tedd wrote: Please review (this works): http://www.webbytedd.com/examples/rank.php However, this doesn't: http://www.xn--ovg.com/rank.php Any idea as to what is wrong? Yes. You're violating google's terms of service. Okay, so one is violating google's terms of service and failing while the other isn't? OR are they both violating, but one slipping through, or what? From the page that gave you the HTTP 403 Forbidden response (surely that was a a bit of a clue?): Yeah, that was a clue -- but not why one works and the other doesn't. Do you have a clue as to why? The point here was that I was trying to learn -- I'm sure that my code is NOT representative of Google's current PageRank system and I'm not using it for any purpose other than to learn. In any event, considering the Google Police here, I've removed the offending code. Google Police??? Here??? Quick, somebody get me my tin-foil hat!!! -- John C. Nichel IV Programmer/System Admin (ÜberGeek) Dot Com Holdings of Buffalo 716.856.9675 [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] failed to open stream warning
On Jan 4, 2006, at 4:28 PM, zedleon wrote: $fp = fopen(home/path/temp w+); You only got 3 quotes in the above code... try this: $fp = fopen(home/path/temp, w+); -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] failed to open stream?!? - SOLVED!
The problem was that uploaded images already were there and didn't want to overwrite. -afan [EMAIL PROTECTED] wrote: Hi to all. I'm uploading file and use this copy($_FILES['NewImage']['tmp_name'], 'temp/'.$item_number.'.jpg') or die (mysql_error());* *I have this Warning:* Warning*: copy(temp/05V0115.jpg): failed to open stream: Permission denied in */var/www/html/afan/admin/add_image.php* on line *12 * chmods: admin 0755 temp 0777 admin/ |_temp/ |_add_image.php What could cause this Warning? Can't find a problem. thanks for any help -afan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] failed to open stream: No such file or directory in
Hello Mike, Monday, March 15, 2004, 5:43:14 PM, you wrote: MM But When I try to declare the library in /var/ww/html/account/ MM include('lib/account/lib_main.php'); lib_main.php = /var/www/html/lib/lib_main.php index.php= /var/www/html You are including files RELATIVE to the location of the script. At the point in which you try to include the lib_main file, you are currently in the account directory, so it's trying to look for: /var/www/html/account/lib/account/lib_main.php which, needless to say, doesn't exist. A good solution to save you some hassle will be to define a global variable/constant called something like $basedir and set that. $basedir = /var/www/html; Now just use this in all your include lines: include $basedir/lib/lib_main.php; This will work from *anywhere* and not fail. -- Best regards, Richard Davey http://www.phpcommunity.org/wiki/296.html -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] failed to open stream: No such file or directory in
thanks for explanation Is it possible in php.ini declare $basedir(for libraries)? From: Richard Davey [EMAIL PROTECTED] Reply-To: Richard Davey [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: Re: [PHP] failed to open stream: No such file or directory in Date: Mon, 15 Mar 2004 17:55:13 + Hello Mike, Monday, March 15, 2004, 5:43:14 PM, you wrote: MM But When I try to declare the library in /var/ww/html/account/ MM include('lib/account/lib_main.php'); lib_main.php = /var/www/html/lib/lib_main.php index.php= /var/www/html You are including files RELATIVE to the location of the script. At the point in which you try to include the lib_main file, you are currently in the account directory, so it's trying to look for: /var/www/html/account/lib/account/lib_main.php which, needless to say, doesn't exist. A good solution to save you some hassle will be to define a global variable/constant called something like $basedir and set that. $basedir = /var/www/html; Now just use this in all your include lines: include $basedir/lib/lib_main.php; This will work from *anywhere* and not fail. -- Best regards, Richard Davey http://www.phpcommunity.org/wiki/296.html -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php _ Get business advice and resources to improve your work life, from bCentral. http://special.msn.com/bcentral/loudclear.armx -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] failed to open stream: No such file or directory in
Il lun, 2004-03-15 alle 18:43, Mike Mapsnac ha scritto: Hello I know that problem is related how I include library file (lib_main.php). I just don't understand what I do wrong: lib_main.php is located at /var/www/html/lib/lib_main.php When I include in the index.phplocated at /var/www/html/ I do the following include ('lib/lib_main.php'); // this works fine But When I try to declare the library in /var/ww/html/account/ Is the index.php file here? include('lib/account/lib_main.php'); /var/ww/html/account/ + include('lib/account/lib_main.php'); = /var/ww/html/account/lib/account/lib_main.php. Is there the file lib_mail.php in this folder? Use include('../lib/lib_main.php'). It gives me the error message: Warning: main(lib/account/lib_main.php): failed to open stream: No such file or directory in /var/www/html/account/index.php on line 6 I have no idea what is wrong here _ FREE pop-up blocking with the new MSN Toolbar get it now! http://clk.atdmt.com/AVE/go/onm00200415ave/direct/01/ Seba -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php