<?xml version="1.0" encoding="UTF-8"?> 
<?xml-stylesheet href="https://dev.horde.org/themes/horde//default/feed-rss.xsl" type="text/xsl"?> 
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"> 
 <channel> 
  <title>Horde_Config should validate generated PHP</title> 
  <pubDate>Fri, 10 Apr 2026 08:50:53 +0000</pubDate> 
  <link>https://bugs.horde.org/ticket/3037</link> 
  <atom:link rel="self" type="application/rss+xml" title="Horde_Config should validate generated PHP" href="https://bugs.horde.org/ticket/3037/rss" /> 
  <description>Horde_Config should validate generated PHP</description> 
 
   
   
  <item> 
   <title>We can&#039;t catch _everything_, but the validate() method on Co</title> 
   <description>We can&#039;t catch _everything_, but the validate() method on ConfigForm should make sure the config file we&#039;re going to generate parses before considering the form valid.



Also, to help achieve more specific error messages, we should add a new type for PHP code that also validates the individual snippets so that you can&#039;t enter something that&#039;s not valid on the right side of an = expression in one of those fields.</description> 
   <pubDate>Thu, 24 Nov 2005 16:44:01 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/3037#t14054</link> 
  </item> 
   
  <item> 
   <title>&gt; We can&#039;t catch _everything_, but the validate() method on </title> 
   <description>&gt; We can&#039;t catch _everything_, but the validate() method on ConfigForm 

&gt; should make sure the config file we&#039;re going to generate parses 

&gt; before considering the form valid.



I already thought about that a few times, but this would only be possible with calling a PHP cli with the -l flag, but how to handle this gracefully with the lots of different places where it can be installed - if it is installed at all?



&gt; Also, to help achieve more specific error messages, we should add a 

&gt; new type for PHP code that also validates the individual snippets so 

&gt; that you can&#039;t enter something that&#039;s not valid on the right side of 

&gt; an = expression in one of those fields.



Wouldn&#039;t this be covered by the above?</description> 
   <pubDate>Thu, 24 Nov 2005 17:14:12 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/3037#t14055</link> 
  </item> 
   
  <item> 
   <title>&gt; I already thought about that a few times, but this would o</title> 
   <description>&gt; I already thought about that a few times, but this would only be possible with 

&gt; calling a PHP cli with the -l flag, but how to handle this gracefully with the lots of 

&gt; different places where it can be installed - if it is installed at all?



Well, if we assume that the worst that can happen is a parse error - as opposed to a fatal error - we could eval() it. Since we require admin access this might not be as bad a security risk as otherwise.



&gt;&gt; Also, to help achieve more specific error messages, we should add a

&gt;&gt; new type for PHP code that also validates the individual snippets so

&gt;&gt; that you can&#039;t enter something that&#039;s not valid on the right side of

&gt;&gt; an = expression in one of those fields.

&gt;

&gt; Wouldn&#039;t this be covered by the above?



Other way around, really - if we lint the whole file we can&#039;t tell the user which field the error was in, if we lint each field we can.</description> 
   <pubDate>Thu, 24 Nov 2005 22:41:40 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/3037#t14073</link> 
  </item> 
   
   
 
 </channel> 
</rss> 
