On Sat, Jul 12, 2008 at 4:06 PM, tom lee <[EMAIL PROTECTED]> wrote:

> Hello,
>
> I used apache with php and drupal.
>
> I got the following error in my web browser.
>
> warning: file_get_contents(http://abc.mywebsite.com/?prt=test)
> [function.file-get-contents]: failed to open stream: Connection
> refused in /var/www/html/includes/common.inc(1352) : eval()'d code on
> line 22.
>
> here is content in common.inc near the line 1352:
>
> function drupal_eval($code) {
>  ob_start();
>  print eval('?>'. $code); //line 1352 here
>  $output = ob_get_contents();
>  ob_end_clean();
>  return $output;
> }
>
> from my web server linux box, I cannot access
> http://abc.mywebsite.com/?prt=test, connection refused.
> I got it fixed, and wget http://abc.mywebsite.com/?prt=test can grab
> the web page.
> However, I still keep getting the same error.
>
> I tried to replace the line print eval('?>'. $code);
> with teh following code.
>  /* print eval('?>'. $code); */
> $code = str_replace('<'.'?php','<'.'?',$code);
>  eval('?'.'>'.trim($code).'<'.'?');
>
> and then restart apache web server, and I even tried to reboot computer.
> still the same error message generated, though the line 1352 is a
> comment line now.
>
> I wonder if there is cache or precomiled code  in apache/php/drupal
> causing this problem?
>
> I use apache version 2.2.8, php 5.2.6.
>
> Thanks.
>
> ---------------------------------------------------------------------


it's trying to open a file via a url and as I recall that may be switched
off by default in php 5.2.6.
afaik apache 2.2.8 works just fine with php 5.2.6
What does your
<? phpinfo(); ?>
 say about allow_url_fopen?

Reply via email to