Hi,

Firstly thanks for all your previous help.

I am having a rather odd problem with magic quotes arising from the cache
files.  On our test server when attempting to view any page it comes back
with the  error

Warning: Unexpected character in input: '\' (ASCII=92) state=1 in
/var/www/localhost/htdocs/midgard/cache/104-15.php on line 38
Parse error: parse error, unexpected $ in
/var/www/localhost/htdocs/midgard/cache/104-15.php on line 44

The file contents contain:

<?
   /* Uncomment the following line if you want to get dates   */
   /* localized (replace second parameter with correct locale)*/
   /* setlocale("LC_ALL","ru_RU.KOI8-R");                     */

   if(!function_exists("mgd_get_midgard")) {
      dl("midgard.so");
   }
   if ($midgard = mgd_get_midgard()) {
      $argc = $midgard->argc;
      $argv = $midgard->argv;
   }
   function mgd_execute_udf($variable, $selector)
   {
      $function = mgd_register_filter($selector);
      $function($variable);
   }
   function mgd_register_filter($selector, $function=NULL)
   {
      static $udf = array();

      if (is_null($function)) {
         return $udf[$selector];
      }

      if ($function == '') {
         unset($udf[$selector]);
      } else {
         $udf[$selector] = $function;
      }

      return 1;
   }
?>
<?
   if ($midgard && $midgard->style == 0) {

      ?><div class=\"header\">Welcome to Emberz</div>
<---offending line
<? $article = mgd_get_article_by_name($site_root_id,\'Introduction\'); ?>
<---offending line
<div class=\"bodytext\">&(article.content:h);</div><?
<---offending line
   } else {
      ?><[ROOT]><?
   }?>

Now my first thought would be to make sure that magic quotes have all been
turned off.  I have them disabled in the php.ini (of which I have only one)
and have added:

php_value magic_quotes_gpc off
php_value magic_quotes_runtime off

to my vhosts.conf file globally and for each individual entry (just to make
sure)

Do you have any ideas whats going on as I am just about stumped on this
issue.

I have enclosed a copy of the vhost entry in case that is helpful:

#Emberz staging server
<VirtualHost *:8080>
MidgardEngine on
ServerName www.emberz.co.uk
Port 8080
DocumentRoot /var/www/localhost/htdocs/emberz
MidgardBlobDir /var/www/localhost/htdocs/midgard/blobs
MidgardPageCacheDir /var/www/localhost/htdocs/midgard/cache
MidgardDefaultRealm "Midgard"
MidgardDatabase midgard midgard midgard
CustomLog /var/log/apache/www.emberz.co.uk-staging.log combined
php_value magic_quotes_gpc off
php_value magic_quotes_runtime off
</VirtualHost>

I am running this on:
Apache 1.3.31
PHP 4.3.8
Aegir 1.0.1
Midgard 1.5.0

Cheers

Mike.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to