[Phpfreechat-svn] SF.net SVN: phpfreechat: [877] trunk/src
Status: Beta
Brought to you by:
kerphi
From: <ke...@us...> - 2006-11-23 15:40:41
|
Revision: 877 http://svn.sourceforge.net/phpfreechat/?rev=877&view=rev Author: kerphi Date: 2006-11-23 07:40:40 -0800 (Thu, 23 Nov 2006) Log Message: ----------- [en] Bug fix: some servers don't like 777 permissions and the chat was broken. I changed the proxy.php creation rights to 755. It should fix lot of "Error: the chat cannot be loaded!..." (thanks to Mirco D'Inc?\195?\160 - http://www.bellunodolomiti.it)[50min] [fr] Bug fix : certains serveurs n'acceptent pas les repertoires avec les droits 777 ce qui empechait de fonctionner le chat. J'ai donc change les droit de creation du fichier proxy.php et de ses repertoire a 755. Ceci devrait r?\195?\169soudre de nombreux probl?\195?\168mes "Error: the chat cannot be loaded!..." (merci ?\195?\160 Mirco D'Inc?\195?\160 - http://www.bellunodolomiti.it)[50min] Modified Paths: -------------- trunk/src/pfcglobalconfig.class.php trunk/src/pfctools.php Modified: trunk/src/pfcglobalconfig.class.php =================================================================== --- trunk/src/pfcglobalconfig.class.php 2006-11-21 18:12:57 UTC (rev 876) +++ trunk/src/pfcglobalconfig.class.php 2006-11-23 15:40:40 UTC (rev 877) @@ -412,12 +412,15 @@ $proxycontent = file_get_contents(dirname(__FILE__)."/client/proxy.php.tpl"); $proxycontent = str_replace("//%allowedpath%", $allowedpath_string, $proxycontent); if (!file_exists(dirname($proxyfile))) - @mkdir(dirname($proxyfile)); + mkdir_r(dirname($proxyfile)); if (file_exists($proxyfile) && !is_writable($proxyfile)) $this->errors[] = _pfc("'%s' must be writable", $proxyfile); else - @file_put_contents($proxyfile, $proxycontent); + { + file_put_contents($proxyfile, $proxycontent); + chmod( $proxyfile, 0755 ); // should fix problems on OVH mutualized servers + } } Modified: trunk/src/pfctools.php =================================================================== --- trunk/src/pfctools.php 2006-11-21 18:12:57 UTC (rev 876) +++ trunk/src/pfctools.php 2006-11-23 15:40:40 UTC (rev 877) @@ -112,7 +112,7 @@ } -function mkdir_r($path, $modedir = 0775) +function mkdir_r($path, $modedir = 0755) { // This function creates the specified directory using mkdir(). Note // that the recursive feature on mkdir() is broken with PHP 5.0.4 for @@ -146,7 +146,7 @@ * @param string $dest Destination path * @return bool Returns TRUE on success, FALSE on failure */ -function copy_r($source, $dest, $modedir = 0775, $modefile = 0664) +function copy_r($source, $dest, $modedir = 0755, $modefile = 0664) { // Simple copy for a file if (is_file($source)) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |