PHP Classes

getting a fatal error

Recommend this page to a friend!

      Professional Login System  >  All threads  >  getting a fatal error  >  (Un) Subscribe thread alerts  
Subject:getting a fatal error
Summary:fatal error
Messages:7
Author:Najeeb Rashid
Date:2015-09-11 14:22:06
 

  1. getting a fatal error   Reply   Report abuse  
Picture of Najeeb Rashid Najeeb Rashid - 2015-09-11 14:22:06
Hi,

I am getting following error.

Fatal error: Call to undefined function USERS\locale_parse() in D:\wamp\www\pro_db\lib\class\class.users.php on line 194

  2. Re: getting a fatal error   Reply   Report abuse  
Picture of Ricky Scotti Ricky Scotti - 2015-09-11 14:45:18 - In reply to message 1 from Najeeb Rashid
Which PHP version do you have ?
php.net/manual/en/locale.parselocal ...

  3. Re: getting a fatal error   Reply   Report abuse  
Picture of sdhp Steffen Hocker sdhp Steffen Hocker - 2015-09-12 14:24:16 - In reply to message 2 from Ricky Scotti
Same error here...

PHP Version 5.6.8

Happens at least while testing locally on XAMMP

  4. Re: getting a fatal error   Reply   Report abuse  
Picture of Najeeb Rashid Najeeb Rashid - 2015-09-12 16:51:55 - In reply to message 2 from Ricky Scotti
Php version 5.5.12

using Wamp Server - 2.5

  5. Re: getting a fatal error   Reply   Report abuse  
Picture of Ricky Scotti Ricky Scotti - 2015-09-13 07:17:12 - In reply to message 4 from Najeeb Rashid
Ok,
The problem is that you don't have PECL module installed.

You can change in file /lib/class.users.php this code:
$this->setValue('_language',locale_parse($_SERVER['HTTP_ACCEPT_LANGUAGE'])['language']);

in this:
$this->setValue('_language',explode('-',explode(',',$_SERVER['HTTP_ACCEPT_LANGUAGE'])[0])[0]);


Or install PECL in your webserver.
pecl.php.net/package/pecl_http

  6. Re: getting a fatal error   Reply   Report abuse  
Picture of sdhp Steffen Hocker sdhp Steffen Hocker - 2015-09-13 20:01:27 - In reply to message 5 from Ricky Scotti
That helped, thanks a lot!

I suggest to make a note when some module that is not common to "normal" installations is needed, because people will more likely give up and not use your good work when something like this happens.

Using my Session-Monitor I see that you store

- UserName
- Password

as Session-Vars without any values.

Whild PW is for likely obvious reasons I think having the UserName stored might help in personalized fragments of the site.

Can you tell me why you decided to do so, Ricky?
Why are they there - and why is UserName empty?

  7. Re: getting a fatal error   Reply   Report abuse  
Picture of Brian Owuoche Brian Owuoche - 2015-09-19 20:15:05 - In reply to message 6 from sdhp Steffen Hocker
Hello Riccardo Scotti, I am getting the same error; apparently av just downloaded the PECL module and saved it somewhere in my server. How should I manage the connection?
Fatal error: Call to undefined function USERS\locale_parse() in C:\Xampp\htdocs\login\lib\class\class.users.php on line 194

 
For more information send a message to info at phpclasses dot org.