Warning message. How to correct ?
Moderator: General Support Moderators
Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting.
Forum Post Assistant - If you are serious about wanting help, you should use this tool to help you post.
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting.
Forum Post Assistant - If you are serious about wanting help, you should use this tool to help you post.
- Viggo1
- Joomla! Apprentice
- Posts: 13
- Joined: Wed Mar 19, 2008 11:02 am
- Location: Vevey - Switzerland
- Contact:
Warning message. How to correct ?
Hello,
I am setting the sections and when hitting save I get the following warning message:
Warning: Memcache::addserver() expects parameter 2 to be long, string given in /usr/var/www/html/eco60/html/joomla/libraries/joomla/cache/storage/memcache.php on line 83
On line 83 I can find:
// Create the memcache connection
$this->_db = new Memcache;
for ($i=0, $n=count($this->_servers); $i < $n; $i++)
{
$server = $this->_servers[$i];
$this->_db->addServer($server['host'], $server['port'], $this->_persistent);
}
With this error I can't insert into the template the section titles.
Many thanks for your help.
Regards.
I am setting the sections and when hitting save I get the following warning message:
Warning: Memcache::addserver() expects parameter 2 to be long, string given in /usr/var/www/html/eco60/html/joomla/libraries/joomla/cache/storage/memcache.php on line 83
On line 83 I can find:
// Create the memcache connection
$this->_db = new Memcache;
for ($i=0, $n=count($this->_servers); $i < $n; $i++)
{
$server = $this->_servers[$i];
$this->_db->addServer($server['host'], $server['port'], $this->_persistent);
}
With this error I can't insert into the template the section titles.
Many thanks for your help.
Regards.
Viggo + Pieter
-
- Joomla! Fledgling
- Posts: 3
- Joined: Fri Mar 21, 2008 10:48 pm
Memcache Warning message. PLEASE HELP
Warning: Memcache::addserver() expects parameter 2 to be long, string given in /Library/WebServer/Documents/dgllimbo/libraries/joomla/cache/storage/memcache.php on line 83
I have exactly the same problem and was hoping to get an answer through your posting. But time passes and I decided to second your call for help.
There is a thread (http://forum.joomla.org/viewtopic.php?f ... &p=1227193) that proposes a way out but it did not work for me... the system complains even more.
My fresh installation worked fine for a few minutes until I defined the first section.. then the error message appeared!
I do hope that it can be fixed easily.
Cheers
I have exactly the same problem and was hoping to get an answer through your posting. But time passes and I decided to second your call for help.
There is a thread (http://forum.joomla.org/viewtopic.php?f ... &p=1227193) that proposes a way out but it did not work for me... the system complains even more.
My fresh installation worked fine for a few minutes until I defined the first section.. then the error message appeared!
I do hope that it can be fixed easily.
Cheers
-
- Joomla! Fledgling
- Posts: 3
- Joined: Fri Mar 21, 2008 10:48 pm
Re: Warning message. How to correct ?
Hello again,
I have edited out lines 79 to 84 of the file joomla/libraries/joomla/cache/storage/memcache.php, and the error has disappeared without, so far, any further errors.
Will keep posting if I do find an error or warning.
Cheers
I have edited out lines 79 to 84 of the file joomla/libraries/joomla/cache/storage/memcache.php, and the error has disappeared without, so far, any further errors.
Will keep posting if I do find an error or warning.
Cheers
- Viggo1
- Joomla! Apprentice
- Posts: 13
- Joined: Wed Mar 19, 2008 11:02 am
- Location: Vevey - Switzerland
- Contact:
Re: Warning message. How to correct ?
Many thanks for your answers
I have finally found how to correct this problem.
In the backend----> Configuration ----->System
On the right side there are settings for the cache.
In Port: I have put the value 0
....and it worked. No error message anymore.
Regards
I have finally found how to correct this problem.
In the backend----> Configuration ----->System
On the right side there are settings for the cache.
In Port: I have put the value 0
....and it worked. No error message anymore.
Regards
Viggo + Pieter
-
- Joomla! Fledgling
- Posts: 3
- Joined: Fri Mar 21, 2008 10:48 pm
Re: Warning message. How to correct ?
Thank you very much! It does work!
However, I tried other port numbers and it also seems to work...
Do you have any ideas as to the correct setting?
Cheers!
However, I tried other port numbers and it also seems to work...
Do you have any ideas as to the correct setting?
Cheers!
-
- Joomla! Apprentice
- Posts: 14
- Joined: Thu Mar 23, 2006 4:42 am
Re: Warning message. How to correct ?
Thank you very much for the tip on the port number fix. This is an odd quirk that happens. I suspect that the reason any port number works is due to the fact that you are not using a caching server. Since the feature is disabled, there is no error thrown.
-
- Joomla! Apprentice
- Posts: 5
- Joined: Tue Apr 01, 2008 7:33 pm
Thanks viggo1
Many thanks viggo1, it worked for me as well. I really appreciate that you found time to come back to your post and post your findings.
I used Drupal and it being less user-friendly than Joomla, I had to look onto forums often. Good thing was that there was a lot answers and fast answers. This is not the case here on Joomla forums. Lots of questions has no answers. I have 2 other posts, one has 0 answers, second I answered myself when I found out how to solve it.
IMHO Joomla is much more user-friendly than Drupal, however the forums are much less user-friendly than Drupal's forums.
I used Drupal and it being less user-friendly than Joomla, I had to look onto forums often. Good thing was that there was a lot answers and fast answers. This is not the case here on Joomla forums. Lots of questions has no answers. I have 2 other posts, one has 0 answers, second I answered myself when I found out how to solve it.
IMHO Joomla is much more user-friendly than Drupal, however the forums are much less user-friendly than Drupal's forums.
-
- Joomla! Fledgling
- Posts: 1
- Joined: Tue May 27, 2008 3:10 pm
Re: Warning message. How to correct ?
I haven't searched all the forums yet, and I'm NOT a php programmer, but this worked for me.
change the code on line 83 from :
to :
Hope it helps someone. Though, if/when I actually globally enable memcache,
the other stuff I've read here should help alot.
TTFN,
Tarkin000
change the code on line 83 from :
Code: Select all
$this->_db->addServer($server['host'], $server['port'], $this->_persistent);
Code: Select all
$this->_db->addServer($server['host'], (int)$server['port'], $this->_persistent);
^^^^ see the cast to int?
the other stuff I've read here should help alot.
TTFN,
Tarkin000
-
- Joomla! Apprentice
- Posts: 32
- Joined: Sat Mar 29, 2008 11:46 am
Re: Warning message. How to correct ?
Hey Guys,
I had the same issues. I fixed my problem by changing the cache handler in Config -> System to be "File". I believe this should be the default setting, and for whatever reason it changed to memcache.
Cheers,
Nica521
I had the same issues. I fixed my problem by changing the cache handler in Config -> System to be "File". I believe this should be the default setting, and for whatever reason it changed to memcache.
Cheers,
Nica521
-
- Joomla! Apprentice
- Posts: 18
- Joined: Thu Oct 16, 2008 5:52 am
Re: Warning message. How to correct ?
Many thanks viggo1, it worked for me as well. I really appreciate that you found time to come back to your post and post your findings.
-
- Joomla! Apprentice
- Posts: 5
- Joined: Fri Dec 19, 2008 12:10 pm
Re: Warning message. How to correct ?
The "File" option only appears if the folder /cache in the Joomla directory was "777 chmoded"
- ashain
- Joomla! Enthusiast
- Posts: 165
- Joined: Wed Apr 29, 2009 8:23 am
- Location: Dubai- U.A.E
- Contact:
Re: Warning message. How to correct ?
Tarkin000 wrote:I haven't searched all the forums yet, and I'm NOT a php programmer, but this worked for me.
change the code on line 83 from :to :Code: Select all
$this->_db->addServer($server['host'], $server['port'], $this->_persistent);
Hope it helps someone. Though, if/when I actually globally enable memcache,Code: Select all
$this->_db->addServer($server['host'], (int)$server['port'], $this->_persistent); ^^^^ see the cast to int?
the other stuff I've read here should help alot.
TTFN,
Tarkin000
Thanks A lot Its worked for me..zionhills.net
-
- Joomla! Fledgling
- Posts: 2
- Joined: Wed Dec 16, 2009 9:23 am
Re: Warning message. How to correct ?
i have same prob
but thats sovled
thxxxxxxxxxxxxxxx
but thats sovled
thxxxxxxxxxxxxxxx
-
- Joomla! Fledgling
- Posts: 1
- Joined: Wed Jul 07, 2010 5:13 am
Re: Warning message. How to correct ?
hey all,
This problem starts when you save the "Global Configuration" for the first time.
There are several solutions for this..
1
"In the backend----> Configuration ----->System
On the right side there are settings for the cache.
In Port: I have put the value 0"
(its on line 25 in my file.) Replace this line with
and then find the line and replace it with (its line 26 in my file)
save the file and its done.
I Prefer the first solution..
Regards
This problem starts when you save the "Global Configuration" for the first time.
There are several solutions for this..
1
"In the backend----> Configuration ----->System
On the right side there are settings for the cache.
In Port: I have put the value 0"
2 goto your joomla site folder. there you'll find the file "configuration.php" open it and goto the line similar to thisThankx Viggo1.. this solution is superb
Code: Select all
var $cache_handler = 'memcache';
Code: Select all
var $cache_handler = 'file';
Code: Select all
var $memcache_settings = array("persistent" => "0", "compression" => "0", "servers" => array("0" => array("host" => "", "port" => "")));
Code: Select all
var $memcache_settings = array();
save the file and its done.
I Prefer the first solution..
Regards
- RustyJoomla
- Joomla! Explorer
- Posts: 409
- Joined: Wed Aug 01, 2007 12:08 am
- Location: UK
- Contact:
Re: Warning message. How to correct ?
Thanks for the great post and the solution! Saved me some time!!
-
- Joomla! Fledgling
- Posts: 1
- Joined: Wed Mar 02, 2011 9:54 pm
Re: Warning message. How to correct ?
Hi everyone. Uneebe's second solution worked for me.
However, I'm just wondering and trying to understand why it worked so that if anything like this in the future happens I'll know what to look for... Thanks for your help!
-peter
2 goto your joomla site folder. there you'll find the file "configuration.php" open it and goto the line similar to this
Code:
var $cache_handler = 'memcache';
(its on line 25 in my file.) Replace this line with
Code:
var $cache_handler = 'file';
and then find the line
Code:
var $memcache_settings = array("persistent" => "0", "compression" => "0", "servers" => array("0" => array("host" => "", "port" => "")));
and replace it with
Code:
var $memcache_settings = array();
(its line 26 in my file)
save the file and its done.
However, I'm just wondering and trying to understand why it worked so that if anything like this in the future happens I'll know what to look for... Thanks for your help!
-peter