tags:

views:

68

answers:

0

Hello and thanks to read me.

I've got a problem with the creation of a squidGuard.conf file.

I'm using php in order to create a conf file. This one is well created and his content is right. But when squid try to use it, it find an error.

The problem is the fact that there is no error. If i open the file with VI, delete an empty line and save the file, squid read it and lunch it well O_o

The script is the next one :

 $connection = ssh2_connect($ipVM, 22);

ssh2_auth_password($connection, $loginSSH, $mdpSSH);

ssh2_exec($connection, 'rm /etc/squid/squidGuard.conf');

ssh2_exec($connection, 'touch /etc/squid/squidGuard.conf');

ssh2_exec($connection, 'echo "'.$aclContent.'" > /etc/squid/squidGuard.conf');

ssh2_exec($connection, '/etc/init.d/squid3 restart');

Thank's for help