General > Support

Problem with global variables (!?!?)

(1/2) > >>

Arjarn:
Hi all,

I attempt to install last Mibew 1.6 with Drupal site.

All files copied, Mysql DB done and install script OK (table created).

When I modify params with application (logo or options), there 's no update in database.

I write cookies with PHP instruction "setcookie" for variables in Config.php ($mysqlhost... etc...) and cookie haven't values !

If I modify Config.php and write :

global $mysqlhost;
$mysqlhost = 'xxxxxxxxxxx';

All seems ok...

If anybody have idea about this strange problem. I wonder me if problem is Drupal, PHP config or another thing  ???  :o

faf:
To begin with, what's in your error log? Enable verbose errors reporting and provide the output.

Arjarn:
OK, I've only error message like :

Could not connect: Access denied for user 'xxxxxxxxxxxxxx'@'localhost' (using password: NO)

So I trace variables used for connexion :

  - making setcookie on config.PHP with PHP variables (user, pass and server), it's OK. Cookie writen with good values.
  - making setcookie on other PHP page : values are NULL (!?!?)

I've proc on my page to know if op is online, if I insert setcookie after las require_once, valeu are NULL too :


require_once('./mibew/libs/common.php');
require_once('./mibew/libs/chat.php');
require_once('./mibew/libs/operator.php');
require_once('./mibew/libs/groups.php');

function util_has_online_operators($util_groupid = "")
{

   $groupid = verifyparam( $util_groupid, "/^\d{1,10}$/", "");

   if($groupid)
   {
      loadsettings();
      if($settings['enablegroups'] == '1')
      {
         $group = group_by_id($groupid);
         if(!$group) { $groupid = ""; }
      }
      else { $groupid = ""; }
   }
   
   $le_retour = has_online_operators($groupid) ? "1" : "0";
   
   return $le_retour;
}

faf:
I don't get it at all.  :-\

Are you trying to make some custom solution with Mibew?

Arjarn:
I attempt to install Mibew with DRUPAL site.

I made custom function to activate custom popup if operator is available :

   - use PHPLIVEX to call every X seconds function
   - this function call util_has_online_operators() and if operator is ok then return javascript code to show popup (with noty framework)

All custom are OUT of Mibew, I can see with cookies than problem appears too in Mibew page. So I'm supposing problem is about install, Drupal or PHP option  :o

I read people install Mibew with Drupal 6 site but don't know if it can't be bad params or someone else...

Navigation

[0] Message Index

[#] Next page

Go to full version