So far, everthing I have researched has not worked under windows xp or this version of php.
nr2bl()
\n
\n\r
or
/n
/n/r
Using these special characters appears in the conf file which would ultimately break apache.
Also note the title, I'm not formatting for web. So <pre> tags and storing this in a database are out of the question.
fwrite breaks under php 5.3.0. Can't close the file. I keep getting a resource error. Apprently more research has concluded this to be a bug under this version
// ip based virtual host $conf = '<VirtualHost '.$ip.'>'; $conf .= ' ServerAdmin '.$sadmin; $conf .= ' DocumentRoot '.$install_dir . $NewVhostDomain.'/www/'; $conf .= ' ServerName '.$NewVhostDomain; $conf .= ' ErrorLog '.$install_dir . $NewVhostDomain.'/errors/'; $conf .= ' TransferLog '.$install_dir . $NewVhostDomain.'/logs/'; $conf .= '</VirtualHost>'; $conf_file = $install_dir .'/vhostconf/'.$NewVhostDomain.'.conf'; file_put_contents($conf_file, $conf);
Everything works, it just appears in one line.
Conf Input:
<VirtualHost > ServerAdmin email@gmail.com DocumentRoot c:/wamp/domain.net/www/ ServerName tim1.net ErrorLog c:/wamp/domain.net/errors/ TransferLog c:/wamp/domain.net/logs/</VirtualHost>
Edited by timdav83, 11 September 2009 - 02:44 PM.
