The module is ignoring the defined Drupal "File system path" and instead insists on using files/phpfreechat/ which is causing the errors:

Please correct these errors:

    * files/phpfreechat/data/private can't be created
    * files/phpfreechat/data/private is not writeable
    * files/phpfreechat/data/private is not readable
    * files/phpfreechat/data/private/cache can't be created
    * files/phpfreechat/data/private/cache is not writeable
    * files/phpfreechat/data/private/cache is not readable
    * files/phpfreechat/data/public/js/cookie.js doesn't exist, data_public_path cannot be installed
    * files/phpfreechat/data/public/js/pfcgui.js doesn't exist, data_public_path cannot be installed
    * files/phpfreechat/data/public/js/mousepos.js doesn't exist, data_public_path cannot be installed
    * files/phpfreechat/data/public/js/md5.js doesn't exist, data_public_path cannot be installed
    * files/phpfreechat/data/public/js/xajax.js doesn't exist, data_public_path cannot be installed
    * files/phpfreechat/data/public/js/sprintf2.js doesn't exist, data_public_path cannot be installed
    * files/phpfreechat/data/public/js/pfcclient.js doesn't exist, data_public_path cannot be installed
    * files/phpfreechat/data/public/js/prototype.js doesn't exist, data_public_path cannot be installed
    * files/phpfreechat/data/public/js/compat.js doesn't exist, data_public_path cannot be installed
    * files/phpfreechat/data/public/js/utf8.js doesn't exist, data_public_path cannot be installed
    * files/phpfreechat/data/public/js/regex.js doesn't exist, data_public_path cannot be installed
    * files/phpfreechat/data/public/js/createstylerule.js doesn't exist, data_public_path cannot be installed
    * files/phpfreechat/data/public/js/pfcprompt.js doesn't exist, data_public_path cannot be installed
    * files/phpfreechat/data/public/js/myprototype.js doesn't exist, data_public_path cannot be installed
    * files/phpfreechat/data/public/js/pfcresource.js doesn't exist, data_public_path cannot be installed
    * files/phpfreechat/data/public/js/activity.js doesn't exist, data_public_path cannot be installed
    * files/phpfreechat/data/public/js/image_preloader.js doesn't exist, data_public_path cannot be installed
    * cannot create files/phpfreechat/data/public/themes/default
    * files/phpfreechat/data/private/chat can't be created
    * files/phpfreechat/data/private/chat is not writeable
    * files/phpfreechat/data/private/chat is not readable
    * files/phpfreechat/data/private/chat/s_29cafd767038193e213c33a91b469da0 can't be created
    * files/phpfreechat/data/private/chat/s_29cafd767038193e213c33a91b469da0 is not writeable
    * files/phpfreechat/data/private/chat/s_29cafd767038193e213c33a91b469da0 is not readable

Comments

budda’s picture

The following change to phpfreechat_load_params() function worked:

  // Configure file paths
  $filepath = variable_get('file_directory_path', 'files');
  $params['data_private_path'] = $filepath.'/phpfreechat/data/private';
  $params['data_public_url'] = $filepath.'/phpfreechat/data/public';
budda’s picture

It seems the ajax callback isn't using the corrected Drupal file path.

The ajax callback is: http://example.com/sites/example.com/modules/phpfreechat/handler.php?pfc...

Using FireBug I can see the same error as above is being returned in the ajax response:

<p>Please correct these errors:</p><ul><li>files/phpfreechat/data/private can't be created</li><li>files

/phpfreechat/data/private is not writeable</li><li>files/phpfreechat/data/private is not readable</li

><li>files/phpfreechat/data/private/cache can't be created</li><li>files/phpfreechat/data/private/cache

 is not writeable</li><li>files/phpfreechat/data/private/cache is not readable</li><li>files/phpfreechat
/data/public/js/cookie.js doesn't exist, data_public_path cannot be installed</li><li>files/phpfreechat
/data/public/js/pfcgui.js doesn't exist, data_public_path cannot be installed</li><li>files/phpfreechat
/data/public/js/mousepos.js doesn't exist, data_public_path cannot be installed</li><li>files/phpfreechat
/data/public/js/md5.js doesn't exist, data_public_path cannot be installed</li><li>files/phpfreechat
/data/public/js/xajax.js doesn't exist, data_public_path cannot be installed</li><li>files/phpfreechat
/data/public/js/sprintf2.js doesn't exist, data_public_path cannot be installed</li><li>files/phpfreechat
/data/public/js/pfcclient.js doesn't exist, data_public_path cannot be installed</li><li>files/phpfreechat
/data/public/js/prototype.js doesn't exist, data_public_path cannot be installed</li><li>files/phpfreechat
/data/public/js/compat.js doesn't exist, data_public_path cannot be installed</li><li>files/phpfreechat
/data/public/js/utf8.js doesn't exist, data_public_path cannot be installed</li><li>files/phpfreechat
/data/public/js/regex.js doesn't exist, data_public_path cannot be installed</li><li>files/phpfreechat
/data/public/js/createstylerule.js doesn't exist, data_public_path cannot be installed</li><li>files
/phpfreechat/data/public/js/pfcprompt.js doesn't exist, data_public_path cannot be installed</li><li
>files/phpfreechat/data/public/js/myprototype.js doesn't exist, data_public_path cannot be installed
</li><li>files/phpfreechat/data/public/js/pfcresource.js doesn't exist, data_public_path cannot be installed
</li><li>files/phpfreechat/data/public/js/activity.js doesn't exist, data_public_path cannot be installed
</li><li>files/phpfreechat/data/public/js/image_preloader.js doesn't exist, data_public_path cannot be
 installed</li><li>cannot create files/phpfreechat/data/public/themes/default</li><li>files/phpfreechat
/data/private/chat can't be created</li><li>files/phpfreechat/data/private/chat is not writeable</li
><li>files/phpfreechat/data/private/chat is not readable</li><li>files/phpfreechat/data/private/chat
/s_36c4536996ca5615dcf9911f068786dc can't be created</li><li>files/phpfreechat/data/private/chat/s_36c4536996ca5615dcf9911f068786dc
 is not writeable</li><li>files/phpfreechat/data/private/chat/s_36c4536996ca5615dcf9911f068786dc is not
 readable</li></ul>

After seeing this i am now wondering where the phpfreechat 1.0-final script should actually be installed to. It appears as if the code is looking for the JavaScritp files supplied with the phpfreechat 1.0-final inside the files/ data path. The INSTALL.txt doesn't say anything different.

owahab’s picture

budda, I found this bug couple days ago and fixed it in -dev.
Please download, test and give me your feedback.
Thanks.

budda’s picture

Version: 5.x-1.0-beta » 5.x-1.0-rc2

When I dump the $params in function phpfreechat_load_params() I am still getting incorrect paths via the auto detection.

The output of a dprint_r($params); is:

Array
(
    [data_private_path] => /
    [data_public_url] => http://scratch5.example.com/
    [data_public_path] => /public
    [theme_url] => http://scratch5.example.com/sites/scratch5.example.com/modules/phpfreechat/extras/themes
    [theme_path] => /var/www/html/drupal-5.0/sites/scratch5.example.com/modules/phpfreechat/extras/themes
    [theme] => drupal
    [serverid] => 69f08e8bed70291e4e3ab62fd32d49f2
    [server_script_url] => http://scratch5.example.com/sites/scratch5.example.com/modules/phpfreechat/handler.php
    [server_script_path] => /var/www/html/drupal-5.0/sites/scratch5.example.com/modules/phpfreechat/handler.php
)

Surely the private and public paths should be sub-directories of my sites files directory so that they are writable?
I would also assume the public data path should point to a sub-directory of my sites files dir?

For the record my sites files directory is located at the value returned from calling $filepath = variable_get('file_directory_path', 'files'); - sites/scratch5.example.com/files ?

budda’s picture

Category: bug » support
Priority: Critical » Normal

I manually created the directories phpfreechat/data/private & /public and the errors change. Now the file_check_location() works correctly.

I noticed that the file_check_location() function actually does the 'file_directory_path' prepend for you :)

Remaining errors are now:

    * /public/js/activity.js doesn't exist, data_public_path cannot be installed
    * /public/js/compat.js doesn't exist, data_public_path cannot be installed
    * /public/js/cookie.js doesn't exist, data_public_path cannot be installed
    * /public/js/createstylerule.js doesn't exist, data_public_path cannot be installed
    * /public/js/image_preloader.js doesn't exist, data_public_path cannot be installed
    * /public/js/md5.js doesn't exist, data_public_path cannot be installed
    * /public/js/mousepos.js doesn't exist, data_public_path cannot be installed
    * /public/js/myprototype.js doesn't exist, data_public_path cannot be installed
    * /public/js/pfcclient.js doesn't exist, data_public_path cannot be installed
    * /public/js/pfcgui.js doesn't exist, data_public_path cannot be installed
    * /public/js/pfcprompt.js doesn't exist, data_public_path cannot be installed
    * /public/js/pfcresource.js doesn't exist, data_public_path cannot be installed
    * /public/js/prototype.js doesn't exist, data_public_path cannot be installed
    * /public/js/regex.js doesn't exist, data_public_path cannot be installed
    * /public/js/sprintf2.js doesn't exist, data_public_path cannot be installed
    * /public/js/utf8.js doesn't exist, data_public_path cannot be installed
    * /public/js/xajax.js doesn't exist, data_public_path cannot be installed
    * cannot create /public/themes/default

The above javascript files can be found in my installation modules\phpfreechat\phpfreechat\data\public\js. Is this supposed to be a writable public directory? I'm confused -- and the installation documentation doesn't mention any messing with files like this.

toma’s picture

I get the same problem i am trying to use
http://example.com//sites/all/modules/phpfreechat/phpfreechat/demo/demo1...

Please correct these errors:

    * cannot create /home/dwebmast/public_html/sites/all/modules/phpfreechat/phpfreechat/src/../data/public/themes/default
    * cannot create /home/dwebmast/public_html/sites/all/modules/phpfreechat/phpfreechat/src/../data/public/themes/default
toma’s picture

Anyone get the chat to work !! i try many times, nothing work, always the same path problem

TheFazz’s picture

Priority: Normal » Critical

i am using phpfreechat for drupal 5.x-1.0-rc2 with the phpfreechat 1.0 final. my drupal is 5.3.

i get these errors once i upgraded from the 1.x-dev (phpfreechat 0.9beta) version to 1.0-rc2 (with phpfreechat 1.0final). what went wrong?

Please correct these errors:

    * / is not writeable
    * //cache can't be created
    * //cache is not writeable
    * //cache is not readable
    * /public/js/regex.js doesn't exist, data_public_path cannot be installed
    * /public/js/pfcresource.js doesn't exist, data_public_path cannot be installed
    * /public/js/mousepos.js doesn't exist, data_public_path cannot be installed
    * /public/js/myprototype.js doesn't exist, data_public_path cannot be installed
    * /public/js/pfcclient.js doesn't exist, data_public_path cannot be installed
    * /public/js/xajax.js doesn't exist, data_public_path cannot be installed
    * /public/js/prototype.js doesn't exist, data_public_path cannot be installed
    * /public/js/md5.js doesn't exist, data_public_path cannot be installed
    * /public/js/createstylerule.js doesn't exist, data_public_path cannot be installed
    * /public/js/sprintf2.js doesn't exist, data_public_path cannot be installed
    * /public/js/activity.js doesn't exist, data_public_path cannot be installed
    * /public/js/cookie.js doesn't exist, data_public_path cannot be installed
    * /public/js/utf8.js doesn't exist, data_public_path cannot be installed
    * /public/js/pfcprompt.js doesn't exist, data_public_path cannot be installed
    * /public/js/compat.js doesn't exist, data_public_path cannot be installed
    * /public/js/pfcgui.js doesn't exist, data_public_path cannot be installed
    * /public/js/image_preloader.js doesn't exist, data_public_path cannot be installed
    * cannot create /public/themes/default
    * //chat can't be created
    * //chat is not writeable
    * //chat is not readable
    * //chat/s_ee25998c9a9f1580ffcb24229198e749 can't be created
    * //chat/s_ee25998c9a9f1580ffcb24229198e749 is not writeable
    * //chat/s_ee25998c9a9f1580ffcb24229198e749 is not readable
owahab’s picture

Assigned: Unassigned » owahab
Category: support » bug

Working on reproducing it, might take some time but I'm on it.

mikeuk2000’s picture

TheFazz , I'm getting the same errors.

Anyone have any luck getting this to work?

TheFazz’s picture

i tried against RC4 and i get this error message:

Please correct these errors:
Error: undefined or obsolete parameter 'theme_path', please correct or remove this parameter
swirt’s picture

Version: 5.x-1.0-rc2 » 5.x-1.0-rc4

I got the same error as TheFazz running 1. beta9

If I comment out the line that specifies 'theme_path' in the phpfreechat.module the error goes away but then the images don't show up.

Sistemas7G’s picture

Assigned: owahab » Sistemas7G

What I did to fix it (but not permanent) was to create manually the directory of the chat room (example: //chat/s_ee25998c9a9f1580ffcb24229198e749 can't be created, I create the directory "s_ee25998c9a9f1580ffcb24229198e749"), then I move into that directory one messages.data file (empty) and create an inside directory called "nicknames".

I change the permision to 777 to all de files/directoryes so they can be modified.

IM me if you want, and if you know why this happend please let us know.

See ya,

Visit my new own proyect, a newspaper with web 2.0 (but in spanish, later I'll traduce to english) http://www.gacetarosarina.com.ar.

permutations’s picture

Status: Active » Closed (fixed)

Not an issue with the current version (1.2).