[support] druapl issue?

Cog Rusty cog.rusty at gmail.com
Sun Jul 13 05:37:34 UTC 2008


On Sun, Jul 13, 2008 at 6:55 AM, tom lee <freemail168 at gmail.com> wrote:
> On Sat, Jul 12, 2008 at 8:41 PM, Cog Rusty <cog.rusty at gmail.com> wrote:
>> I don't think there is anything wrong with function drupal_eval().
>
> right, I commented out the full function
>
> function drupal_eval($code) {
>  ob_start();
>  print eval('?>'. $code); // line 1352
>  $output = ob_get_contents();
>  ob_end_clean();
>  return $output;
> }
>
> I still get the same error. it looks th line 1352 in
> /var/www/html/includes/common.inc is incorrectly reported.


If you really have commented out the print eval() line and if there is
nothing wrong with the line which is now 1352, then I can't explain
it. Maybe some weird caching problem. But I don't believe that there
is anything wrong with the print eval() line. I would put it back. It
just chokes while trying to execute some bad php code which comes from
elsewhere,.


>>It
>> just tries to run some php code which you have written in a post or in
>> a block and fails. The error is in line 22 of your own code,
>> apparently a call to
>> file_get_contents(http://abc.mywebsite.com/?prt=test).
>
> for the following error.
> 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.
>
> which file does "line 22" refer to?


It does not necessarily refer to any file. It may refer to line 22 of
a file or of some php code in a page or in a block. Check for any code
of yours containing a
file_get_contents(http://abc.mywebsite.com/?prt=test) statement.

>>
>> What is your PHP version?
>>
>
>  apache version 2.2.8, php 5.2.6.
>
>> One thing you could try is to add allow_url_fopen = true and
>
> it is there already.
>
>> allow_url_include = true in php.ini,
>
> I tried to turn it on and reloaded httpd, but I get the same error.


Hmm... If you find where the
file_get_contents(http://abc.mywebsite.com/?prt=test) statement. is,
try to replace it with the URL of a real file to see what happens.


> Thanks.
>
> tom
> --
> [ Drupal support list | http://lists.drupal.org/ ]
>


More information about the support mailing list