• Forum
  • Doc
  • Screenshots
  • Download
  • Donate
  • Contributors
  • Contact
  • Follow @phpfreechat
  • DEMO
  • Board index ‹ Version 1.x branch ‹ General Support (v1.x)
  • Change font size
  • FAQ
  • Register
  • Login

PFC 1.4 on IIS: /data/public and /data/private paths are wro

Moderators: OldWolf, re*s.t.a.r.s.*2

Post a reply
11 posts • Page 1 of 1

Postby trevg60 » Fri Jun 22, 2012 5:16 pm

I have installed version 1.4 PFC on an IIS server. It is installed as www.[domain].com/pfcFreeChat_1_4/, meaning the default index.php is located at www.[domain].com/pfcFreeChat_1_4/index.php.

I am using the default file configuration, such that themes and data should be in /data/private and data/public.

On first installation, I enabled read / write for the data folder. This seems to have allowed PFC to happily perform first initialisation into these directories when index.php is first run. Then, the chat application starts.

Once the application is started, no graphics are visible (images aren't loaded) and any messages I type don't appear. Therefore there's clearly some kind of access problem to the /data/private and /data/public folders.

On inspection with Firebug, I can see that the image paths to things like the smileys are like this:

datapublic/themes/default/smileys/emoticon_surprised.png

What's happening there is that 'data' and 'public' seem to be missing the '/' that should separate them. What I tried to do to get around this (while not solving the original cause) was to manually specify $data_public_url is pfcglobalconfig.class.php. This then enables the images to load, but the chat obviously functionally does not work (messages aren't shown).

I have previously used PFC on a Linux Apache server without this problem. Can anyone advise why this is happening please?

After doing some digging around in the PHP source, I am wondering if the issue originates from pfc_RelativePath() - but that's a bit of an educated guess.

Thanks,

Trev
Last edited by trevg60 on Fri Jun 22, 2012 5:18 pm, edited 1 time in total.
trevg60
New member
 
Posts: 7
Joined: Fri Jun 22, 2012 5:03 pm
Top

Postby trevg60 » Fri Jun 22, 2012 5:29 pm

A further thing perhaps worth mentioning is that if I look in the data/private/ directory, I can find the log of all the messages I typed. But, those messages never appeared in the chat area when I typed them.
trevg60
New member
 
Posts: 7
Joined: Fri Jun 22, 2012 5:03 pm
Top

Postby re*s.t.a.r.s.*2 » Fri Jun 22, 2012 5:30 pm

hi,

You could also fix the path using this parameter http://www.phpfreechat.net/parameters#data_public_path

using for which is different for unix systems.


I guess that will work..

regards.
Free Singles Chat Rooms No Registration Required
Text and Chat Singles no need to register or app required
Sala De Bate Papo Online Grátis E Sem Cadastro
re*s.t.a.r.s.*2
Support Team
 
Posts: 612
Joined: Wed Sep 24, 2008 4:04 pm
Location: los angeles CA
  • Website
Top

Postby trevg60 » Fri Jun 22, 2012 5:44 pm

Thanks for your suggestion. I have added the following path / URL specifications to index.php, as follows:


<?php

require_once dirname(__FILE__)."/src/phpfreechat.class.php";
$params = array();
$params["title"] = "Quick chat";
$params["nick"] = "guest".rand(1,1000); // setup the intitial nickname
$params['firstisadmin'] = true;
//$params["isadmin"] = true; // makes everybody admin: do not use it on production servers ;)
$params["serverid"] = md5(__FILE__); // calculate a unique id for this chat
$params["debug"] = false;


$params["data_public_path"] = "data/public";
$params["data_public_url"] = "data/public";
$params["data_private_path"] = "data/private";


$chat = new phpFreeChat( $params );


The images, etc. now all load just fine, but unfortunately messages are still not appearing. Any more ideas?

If I have more than one user in the room, I can see the multiple users listed on the right. If I do things like change the nickname, that obviously works, because the nick gets updated to the left of the message textfield. This, together with the fact that messages are going into the log file, suggests that the ajax stuff and private folder access all seems to be working. It's just that messages aren't appearing now.
Last edited by trevg60 on Fri Jun 22, 2012 5:48 pm, edited 1 time in total.
trevg60
New member
 
Posts: 7
Joined: Fri Jun 22, 2012 5:03 pm
Top

Postby re*s.t.a.r.s.*2 » Fri Jun 22, 2012 5:53 pm

hi,

play with that params till you get the correct path..

if not and you get all the above, means the path is fixed, look in firebug for the return specified when making the ajax call or ajax send when sending messages... probably u will get the answer right there..


regards.
Free Singles Chat Rooms No Registration Required
Text and Chat Singles no need to register or app required
Sala De Bate Papo Online Grátis E Sem Cadastro
re*s.t.a.r.s.*2
Support Team
 
Posts: 612
Joined: Wed Sep 24, 2008 4:04 pm
Location: los angeles CA
  • Website
Top

Postby trevg60 » Fri Jun 22, 2012 6:03 pm

Thanks again.

I've tried to inspect the periodic Ajax POST request. Each request looks like:

- The initial request-line is: POST /phpfreechat_1_4/index.php HTTP/1.1
- The POST data is:
pfc_ajax = 1
f = 1
cmd = /send c4dfe1acaedb76134b5f730c2ce86256 1ddda23671eca3741943c437fda28047 asfdsdaf (<-- the asfdsdaf are characters I typed )

The response:

pfc.clearError(Array('pfc_words','pfc_handle'));
$('pfc_words').focus();
pfc.handleResponse('send', 'ok', '');
pfc.handleResponse('update', 'ok', '');


On another fully working installation I have (on Apache / Linux; not sure about PFC version) I know that the response in that POST usually contains the messages. But in this non-working installation, the messages are sent and logged, but aren't provided in the Ajax response.

I'm totally stumped now, really. I wonder if it's some configuration another admin has done on this IIS server to cause it, but I'm clueless what.
Last edited by trevg60 on Fri Jun 22, 2012 6:04 pm, edited 1 time in total.
trevg60
New member
 
Posts: 7
Joined: Fri Jun 22, 2012 5:03 pm
Top

Postby trevg60 » Fri Jun 22, 2012 6:44 pm

I also just tried switching to MySQL instead of the file storage method. I added the following:

$params["container_type"] = "Mysql";
$params["container_cfg_mysql_username"] = "phpfreechatuser";
$params["container_cfg_mysql_password"] = "phpfreechatroot";


... and I set up a new database and user as appropriate.

The chat loads okay after rehashing, and I can see in SqlYog that the database seems to have been populated with some data. But, all is still the same - I can still see no messages!
trevg60
New member
 
Posts: 7
Joined: Fri Jun 22, 2012 5:03 pm
Top

Postby re*s.t.a.r.s.*2 » Fri Jun 22, 2012 6:57 pm

ok,

Public URL?

thanks
Free Singles Chat Rooms No Registration Required
Text and Chat Singles no need to register or app required
Sala De Bate Papo Online Grátis E Sem Cadastro
re*s.t.a.r.s.*2
Support Team
 
Posts: 612
Joined: Wed Sep 24, 2008 4:04 pm
Location: los angeles CA
  • Website
Top

Postby trevg60 » Fri Jun 22, 2012 7:26 pm

OK - (I'll probably remove this public URL link a little later, once you've seen it):

(now removed)




Also, just to recap, my present configuration of the installation you're about to look at is as follows.

Start of index.php:

<?php
require_once dirname(__FILE__)."/src/phpfreechat.class.php";
$params = array();
$params["title"] = "Quick chat";
$params["nick"] = "guest".rand(1,1000); // setup the intitial nickname
$params['firstisadmin'] = true;
//$params["isadmin"] = true; // makes everybody admin: do not use it on production servers ;)
$params["serverid"] = md5(__FILE__); // calculate a unique id for this chat
$params["debug"] = true;
$params["data_public_path"] = "data/public";
$params["data_public_url"] = "data/public";
$params["data_private_path"] = "data/private";
$params["container_type"] = "Mysql";
$params["container_cfg_mysql_username"] = "phpfreechatuser";
$params["container_cfg_mysql_password"] = "phpfreechatroot";
$chat = new phpFreeChat( $params );


I can also see that all files (css, JavaScript, etc.) that are referenced by index.php on initial load are all loaded. There aren't any script files that are 404 due to path error. So all paths would seem to be correct now.
Last edited by trevg60 on Fri Jun 22, 2012 10:32 pm, edited 1 time in total.
trevg60
New member
 
Posts: 7
Joined: Fri Jun 22, 2012 5:03 pm
Top

Postby re*s.t.a.r.s.*2 » Fri Jun 22, 2012 7:49 pm

yeah,

correct, what hosting do you have?

is the "/data/private/chat" writable do you see any php error in your server?

is your hosting blacklisting your chat URL with some kind of mod protect or the like..

very strange issue you have, first time i see it.. what php version by the way..

regards.
Free Singles Chat Rooms No Registration Required
Text and Chat Singles no need to register or app required
Sala De Bate Papo Online Grátis E Sem Cadastro
re*s.t.a.r.s.*2
Support Team
 
Posts: 612
Joined: Wed Sep 24, 2008 4:04 pm
Location: los angeles CA
  • Website
Top

Postby trevg60 » Fri Jun 22, 2012 10:31 pm

Hmm, this is very bizarre. Thank you for trying to help so far, though - it's much appreciated.

It's PHP Version 5.2.5.

I don't know a great deal about the hosting, except it's IIS on a dedicated machine.

As well as this issue of chat text not apeparing, there's also the issue of me having to manually specify the data directory paths. So there's something screwy going on.
Last edited by trevg60 on Fri Jun 22, 2012 10:36 pm, edited 1 time in total.
trevg60
New member
 
Posts: 7
Joined: Fri Jun 22, 2012 5:03 pm
Top


Post a reply
11 posts • Page 1 of 1

Return to General Support (v1.x)

Who is online

Users browsing this forum: No registered users and 90 guests

  • Board index
  • The team • Delete all board cookies • All times are UTC + 1 hour
Powered by phpBB® Forum Software © phpBB Group
cron
Sign in
Wrong credentials
Sign up I forgot my password
.
jeu-gratuit.net | more partners
Fork me on GitHub