| |
64bitguy Noogle

Joined: 14 Jul 2005
225.55 GC$
Items
|
Posted: Thu Jul 14, 2005 7:28 pm Post subject: Google Page Rank Program Problems |
|
|
|
Hi
When using the Google Page Rank Program from http://www.googlecommunity.com/scripts/google-pagerank.php I end up getting the following error:
| Quote: |
Warning: file(http://www.google.com/search?client=navclient-auto&ch=6-2147469517&features=Rank&q=info:http://www.yahoo.com/): failed to open stream: HTTP request failed! HTTP/1.0 403 Forbidden in MYDOMAIN/pagerank.php(71) : eval()'d code on line 98
PageRank:
provided by Google Community.com |
Any idea what is wrong?
Thanks |
|
| Back to top |
|
|
ultrasuk.co.uk Noogle


Joined: 13 Jul 2005 Location: Aberdonia 0.00 GC$
Items
|
Posted: Fri Jul 15, 2005 1:00 am Post subject: |
|
|
|
Works fine with me.  _________________ My Site |
|
| Back to top |
|
|
64bitguy Noogle

Joined: 14 Jul 2005
225.55 GC$
Items
|
Posted: Fri Jul 15, 2005 6:50 am Post subject: |
|
|
|
Oh that's really helpful. I realize this works for many people but I'm getting an error.
Please don't reply with rediculuous posts like "it works for me" as doing so makes it look like the issue was addressed by someone and there is resolution.
Instead leave the task of answering to other people that might actually this or another problem similar to this or to those that have a solution. |
|
| Back to top |
|
|
64bitguy Noogle

Joined: 14 Jul 2005
225.55 GC$
Items
|
Posted: Sat Sep 24, 2005 9:17 am Post subject: |
|
|
|
Does anyone have any idea what could be causing this problem?
Thanks |
|
| Back to top |
|
|
cef Noogle


Joined: 17 Aug 2005 Location: New York City 916.70 GC$
Items
|
Posted: Mon Sep 26, 2005 10:48 pm Post subject: |
|
|
|
the flag "allow_url_fopen" must be set to "1" (both without the quotes) in php.ini
Note that you cannot set this in .htaccess (as you can do for many php settings), so if you're on a shared/reseller hosting account, you must ask your host to set it for you (which they may not be willing to do for security reasons).
If you have your own dedicated server or VPS account, you can set this yourself in your php.ini
You can check the value of the setting by running phpinfo() and searching for the value in the returned data:
put that in a file named phpinfo.php, load the page in your browser, and go to town. |
|
| Back to top |
|
|
64bitguy Noogle

Joined: 14 Jul 2005
225.55 GC$
Items
|
Posted: Mon Sep 26, 2005 10:53 pm Post subject: |
|
|
|
It is (and has been) on.
Any other ideas? |
|
| Back to top |
|
|
kkkram Googler

Joined: 26 Sep 2005 Location: Universal Psychic Guild 1595.10 GC$
Items
|
|
| Back to top |
|
|
Lupine1647 The One with Wolves


Joined: 14 Nov 2004 Location: Kansas City, Missouri 22324.60 GC$
Items
|
Posted: Tue Sep 27, 2005 12:51 pm Post subject: |
|
|
|
Lets try an experiment shall we?
Copy the URL it spat out in the error message, paste it to your Address bar in the browser, click go. And oh, what's this, a 403 error, just like what it says in the error message. _________________ Info Sharkz
R^J - The Life Behind the Insane Wolf Leader! |
|
| Back to top |
|
|
cef Noogle


Joined: 17 Aug 2005 Location: New York City 916.70 GC$
Items
|
Posted: Tue Sep 27, 2005 5:45 pm Post subject: |
|
|
|
| Lupine1647 wrote: | Lets try an experiment shall we?
Copy the URL it spat out in the error message, paste it to your Address bar in the browser, click go. And oh, what's this, a 403 error, just like what it says in the error message. |
Heh, sometimes it's the simple things. I remember an old saying they used to teach med students: when you hear hoofbeats, don't think zebras. In other words, think horses first -- look for the obvious before looking for the exotic.
 |
|
| Back to top |
|
|
Bitlord Noogle

Joined: 11 Oct 2005
179.20 GC$
Items
|
Posted: Wed Oct 12, 2005 12:05 am Post subject: |
|
|
|
The problem is due to different versions of PHP and the way PHP handles bitwise operations.
I've had a few different issues on different machines. I've successfully ported the php script to a machine running FC4-64bit, and PHP 5.x. It required making custom shl and shr functions. For some reason, SHRs were adding a 1 to the LSB. Yeah, sounds weird, but it was.. anyhow it's fixed.
However, I'm having one hell of a time attempting to port it to a i386 machine running FC3 and PHP 4.3.11.
The problem occurs when PHP attempts to "sliently" convert integers into floating point numbers when the integer becomes to large to be held in an integer placeholder. That's all fine, but what happens when you attempt to perform an XOR on the floating point number? Well, all hell breaks lose in certain versions of PHP it seems.
I'm not sure if there is a setting somewhere, or if it's just due to the different versions of PHP and the way they handle the convertions between integer and float, but I intend to put a finger on it.
Anyone else have anything to add?
Bitlord |
|
| Back to top |
|
|
cef Noogle


Joined: 17 Aug 2005 Location: New York City 916.70 GC$
Items
|
Posted: Wed Oct 12, 2005 12:28 am Post subject: |
|
|
|
Bitlord's 100% right. Major php problems with that, and there's no fix or patch. Go trawl the Zend/PHP developer forum (staffed by the guys who wrote the dang thing), and you'll see plenty of discussion and no solution. The bug shows up when I run everything localhost on my OS X powerbook, but the code's fine on my webhost.
The sign carry problem (as Bitlord said) goes beyond shl and shr. I too wrote my own shifters (it's just a loop and a mult or div by 2), which indeed solved some of the inconsistencies, but before writing the rest of the bitwise operators (unfortunatlely I would have needed to do them all), I decided to take the high road:
There's a Perl module on CPAN that also calculates the checksum and retrieves pagerank, so I simply created a php script which calls it as a CGI script.
I then modified the perl module to detect whether it's being called from the command line or via cgi and to adapt its output accordingly.
It's a little hackish but it's plenty fast and it works everywhere.
If anyone wants the code (which I have clearly commented as to these modifications and its use), let me know. _________________ IWDN Forums |
|
| Back to top |
|
|
Bitlord Noogle

Joined: 11 Oct 2005
179.20 GC$
Items
|
Posted: Wed Oct 12, 2005 12:17 pm Post subject: |
|
|
|
Thank you for the reply.
Actually I may have fixed it and ported it so that it works across all machines. I'm using the gmp package as it allows for manipulation of integers as they were strings. Yes, it is very cpu consuming, but it probably will work just fine. If anyone is interested in the code I have engineered to be PHP and platform independant, please let me know.
I would definately be interested in having a look at the perl script too.
Bitlord |
|
| Back to top |
|
|
surveysgate Noogle

Joined: 17 Oct 2005
142.30 GC$
Items
|
Posted: Mon Oct 17, 2005 1:06 am Post subject: Re: Google Page Rank Program Problems |
|
|
|
| 64bitguy wrote: | Hi
When using the Google Page Rank Program from http://www.googlecommunity.com/scripts/google-pagerank.php I end up getting the following error:
| Quote: |
Warning: file(http://www.google.com/search?client=navclient-auto&ch=6-2147469517&features=Rank&q=info:http://www.yahoo.com/): failed to open stream: HTTP request failed! HTTP/1.0 403 Forbidden in MYDOMAIN/pagerank.php(71) : eval()'d code on line 98
PageRank:
provided by Google Community.com |
Any idea what is wrong?
Thanks |
You have to double check the ability to execute your script at your host. For instance, your host is under Apache and common security policy does not allow to run PHP script. Check .htaccess at the running direcotry too. _________________ Paid Surveys Online Directory Paid survey guidelines, FAQs and useful tips on boosting your online revenue. Rresource you need to start making money by taking online paid surveys! All is free. |
|
| Back to top |
|
|
config.sys Noogle

Joined: 05 Nov 2005
42.60 GC$
Items
|
Posted: Sat Nov 05, 2005 5:59 am Post subject: Re: Google Page Rank Program Problems |
|
|
|
| 64bitguy wrote: | Hi
When using the Google Page Rank Program from http://www.googlecommunity.com/scripts/google-pagerank.php I end up getting the following error:
| Quote: |
Warning: file(http://www.google.com/search?client=navclient-auto&ch=6-2147469517&features=Rank&q=info:http://www.yahoo.com/): failed to open stream: HTTP request failed! HTTP/1.0 403 Forbidden in MYDOMAIN/pagerank.php(71) : eval()'d code on line 98
PageRank:
provided by Google Community.com |
Any idea what is wrong?
Thanks |
I have the similar problem, the reason was in PHP that was builded with gcc 3.4. When arithmetic overflow occurs PHP sets number value in 2^32 instead cutting highest bit...we build php with gcc 3.3 and all works fine  |
|
| Back to top |
|
|
graziano68 Noogle

Joined: 02 Dec 2005
68.25 GC$
Items
|
Posted: Fri Dec 02, 2005 9:51 am Post subject: |
|
|
|
is there any way to bypass this gcc problem with php without downgrading gcc to 3.3 ?
Thank you |
|
| Back to top |
|
|
Sponsored Links
|
Posted: 5 Dec 2008 11:20 am Post subject: Advertisements |
|
|
|
|
|
|
| Back to top |
|
|