Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.10.12

Bug #4623 Apache container breaks on sections with arguments
Submitted: 2005-06-18 04:15 UTC
From: matt at conundrum dot com Assigned: aashley
Status: Closed Package: Config
PHP Version: 4.3.11 OS: any
Roadmaps: (Not assigned)    

 [2005-06-18 04:15 UTC] matt at conundrum dot com
Description: ------------ the Apache container is unable to handle standard apache sections which contain arguments, such as <Virtualhost> or <Directory /path> for example, given the file "test_in.conf": <VirtualHost> ServerName </VirtualHost> <Directory /path/to/foo> Limit GET </Directory> Reproduce code: --------------- <?php require_once('Config.php'); $conf = new Config; $root =& $conf->parseConfig('./test_in.conf', 'Apache'); echo $root->toString('Apache' ); $conf->writeConfig('./test_out.conf', 'Apache' ); ?> Expected result: ---------------- <VirtualHost> ServerName </VirtualHost> <Directory /path/to/foo> Limit GET </Directory> test_out.conf should be identical to test_in.conf Actual result: -------------- <VirtualHost> ServerName </VirtualHost> <Directory /path/to/foo> Limit GET </Directory> test_out.conf is missing data: <VirtualHost> ServerName </VirtualHost> <Directory> Limit GET </Directory> Given that the toString output is correct, but the data saved to test_out.conf is not, I suspect the problem is in writeConfig


 [2005-12-19 08:03 UTC] aashley at php dot net
Problem is related to use of each in Config_Container_Apache::toString(). You would experience the same problem doing: echo $root->toString('Apache' ); echo $root->toString('Apache' ); Replaced it with a foreach to fix problem.
 [2005-12-24 02:34 UTC] aashley at php dot net
This bug has been fixed in CVS. If this was a documentation problem, the fix will appear on by the end of next Sunday (CET). If this was a problem with the website, the change should be live shortly. Otherwise, the fix will appear in the package's next release. Thank you for the report and for helping us make PEAR better.