Warning: Parameter 2 to frontpage() expected to be a referen
Moderator: General Support Moderators
Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
-
- Joomla! Apprentice
- Posts: 5
- Joined: Fri Nov 20, 2009 7:07 pm
Warning: Parameter 2 to frontpage() expected to be a referen
Hi,
I have succesfully installed Joomla 1.0.15 locally, then I clicked the button "View site" and received this message:
Warning: Parameter 2 to frontpage() expected to be a reference, value given in C:\xampp\htdocs\mambo\includes\Cache\Lite\Function.php on line 100
What Should I do?
Any help dear joomla Masters!
I have succesfully installed Joomla 1.0.15 locally, then I clicked the button "View site" and received this message:
Warning: Parameter 2 to frontpage() expected to be a reference, value given in C:\xampp\htdocs\mambo\includes\Cache\Lite\Function.php on line 100
What Should I do?
Any help dear joomla Masters!
- Helvecio
- Joomla! Explorer
- Posts: 468
- Joined: Wed Oct 10, 2007 2:29 pm
- Location: Rio de Janeiro - Brazil
- Contact:
Re: Warning: Parameter 2 to frontpage() expected to be a referen
You probably have the same problem I have. I just found out one my client's site is down, due to an incompatibility between Joomla 1.x.x and current versions of PHP. My host company upgraded and I never thought this would happen. I'm SOOOOOOOO F******* MAAAD!!!gokan wrote:Hi,
I have succesfully installed Joomla 1.0.15 locally, then I clicked the button "View site" and received this message:
Warning: Parameter 2 to frontpage() expected to be a reference, value given in C:\xampp\htdocs\mambo\includes\Cache\Lite\Function.php on line 100
What Should I do?
Any help dear joomla Masters!
If this is the case, Install the latest version of Joomla and you'll be OK.
Helvecio "Elvis" da Silva
Graphic and Web Designer
Joomla Website Developer
http://hlvc.design
Graphic and Web Designer
Joomla Website Developer
http://hlvc.design
- thethepapapa
- Joomla! Intern
- Posts: 84
- Joined: Thu Aug 18, 2005 2:00 pm
- Location: Somewhere in the land between
Re: Warning: Parameter 2 to frontpage() expected to be a referen
There are certain features of the older version of Joomla our clients want to preserve and keep that are not compatible in the most recent version of Joomla. From my latest server upgrades, it appears that BOTH MySQL and PHP upgrades are causing this error. According to my records, the last stable server settings without issues were:
Apache version 2.2.14 (Unix)
PHP version 5.2.9
MySQL version 5.0.67-community
Moving to PHP 5.30 and MySQL 5.0.81-community blew out all my older Joomla sites.
Guess its either time to go dedicated server if I want to keep the sites as they were, or convince my shared server host to roll back on PHP and MySQL. Not fun, not fun at all!
Apache version 2.2.14 (Unix)
PHP version 5.2.9
MySQL version 5.0.67-community
Moving to PHP 5.30 and MySQL 5.0.81-community blew out all my older Joomla sites.
Guess its either time to go dedicated server if I want to keep the sites as they were, or convince my shared server host to roll back on PHP and MySQL. Not fun, not fun at all!
If the freedom of speech is taken away then dumb and silent we may be led, like sheep to the slaughter.
-- George Washington --
-- George Washington --
-
- Joomla! Apprentice
- Posts: 10
- Joined: Thu Jan 07, 2010 10:43 pm
- Location: Almere, The Netherlands
- Contact:
Re: Warning: Parameter 2 to frontpage() expected to be a referen
You sould replace two files by the ones in the attachment:
/includes/Cache/Lite/Function.php
(this solves the "Reference instead of value"-problem)
/includes/vcard.class.php
(to make the contact form work again)
If you rather add the changes by hand:
The changes to vcard.class.php are minor, look for:
Code: Select all
if(!function_exists('quoted_printable_encode'))
Code: Select all
$arguments = $this->fixCalls($arguments);
You do not have the required permissions to view the files attached to this post.
Kjell Hählen
KaliMera Webdesign en Solutions - http://www.kalimerawebdesign.nl
KaliMera Webdesign en Solutions - http://www.kalimerawebdesign.nl
- Helvecio
- Joomla! Explorer
- Posts: 468
- Joined: Wed Oct 10, 2007 2:29 pm
- Location: Rio de Janeiro - Brazil
- Contact:
Re: Warning: Parameter 2 to frontpage() expected to be a referen
IT WORKS!!!!!kjellhahlen wrote:I wrote a fix. My version is Joomla 1.0.13 but I suppose it will not be very different for later versions.
You sould replace two files by the ones in the attachment:
Man, I can't thank you enough!!!!
ALL THE BEST!!! Kjellhahlen, YOU ROCK!!!!!
Helvecio "Elvis" da Silva
Graphic and Web Designer
Joomla Website Developer
http://hlvc.design
Graphic and Web Designer
Joomla Website Developer
http://hlvc.design
-
- Joomla! Apprentice
- Posts: 38
- Joined: Wed Nov 28, 2007 8:46 pm
Re: Warning: Parameter 2 to frontpage() expected to be a referen
Really i Can't Think Of a Great Thanks...
Thank you kjellhahlen
Thank you kjellhahlen
-
- Joomla! Fledgling
- Posts: 1
- Joined: Sat Mar 15, 2008 7:02 pm
Re: Warning: Parameter 2 to frontpage() expected to be a referen
kjellhahlen, you ROCK. I was freaking out over this, and then I came across your fix! 5 minutes later and I'm up again.
Guess it's time to upgrade the site to the latest, greatest Joomla.
Guess it's time to upgrade the site to the latest, greatest Joomla.
-
- Joomla! Fledgling
- Posts: 2
- Joined: Sun Jan 10, 2010 7:14 pm
Re: Warning: Parameter 2 to frontpage() expected to be a referen
You really saved me a lot of time by supplying this fix. Then we don't need to hurry in the transition to Joomla 1.5
But I had to do the additions to Function.php manually because I could not get your supplied file to work on my joomla installation. Details below.
PHP built On: Linux srv150 2.6.26-2-vserver-amd64 #1 SMP Thu Nov 5 03:47:07 UTC 2009 x86_64
Database Version: 5.0.51a-24+lenny2-log
PHP Version: 5.3.1
Web Server: Apache
WebServer to PHP interface: cgi-fcgi
Joomla! Version: Joomla! 1.0.13 Stable [ Sunglow ] 21 July 2007 16:00 UTC
THANKS!!!
But I had to do the additions to Function.php manually because I could not get your supplied file to work on my joomla installation. Details below.
PHP built On: Linux srv150 2.6.26-2-vserver-amd64 #1 SMP Thu Nov 5 03:47:07 UTC 2009 x86_64
Database Version: 5.0.51a-24+lenny2-log
PHP Version: 5.3.1
Web Server: Apache
WebServer to PHP interface: cgi-fcgi
Joomla! Version: Joomla! 1.0.13 Stable [ Sunglow ] 21 July 2007 16:00 UTC
THANKS!!!
- Helvecio
- Joomla! Explorer
- Posts: 468
- Joined: Wed Oct 10, 2007 2:29 pm
- Location: Rio de Janeiro - Brazil
- Contact:
Re: Warning: Parameter 2 to frontpage() expected to be a referen
Did you put Function.php in the right place?henricloven wrote:You really saved me a lot of time by supplying this fix. Then we don't need to hurry in the transition to Joomla 1.5
But I had to do the additions to Function.php manually because I could not get your supplied file to work on my joomla installation. Details below.
THANKS!!!
I misplaced it the first time uploaded the file. Better double-check.
G'luck!
Helvecio "Elvis" da Silva
Graphic and Web Designer
Joomla Website Developer
http://hlvc.design
Graphic and Web Designer
Joomla Website Developer
http://hlvc.design
-
- Joomla! Explorer
- Posts: 459
- Joined: Mon Mar 09, 2009 9:54 am
- Location: Dallas, TX
- Contact:
Re: Warning: Parameter 2 to frontpage() expected to be a referen
Well I did not even new about this post until one of my clients using Joomla 1.0 went down as everyone in here. But I'm glad you guys came with this post. Now as everyone should do, upgrade is a must. Thanks again for sharing that fix php 3 for old Joomla.
http://cmsteachings.com - Joomla Tips & Tutorials
http://ubrainmedia.com - My Joomla Company
My Joomla Advice is my personal experience. It does not means I am right or wrong. It just means that I work with Joomla in my own way and it works for me.
http://ubrainmedia.com - My Joomla Company
My Joomla Advice is my personal experience. It does not means I am right or wrong. It just means that I work with Joomla in my own way and it works for me.
-
- Joomla! Fledgling
- Posts: 2
- Joined: Sun Jan 10, 2010 7:14 pm
Re: Warning: Parameter 2 to frontpage() expected to be a referen
File was placed as instructed in /includes/Cache/Lite/Function.phpHelvecio wrote:Did you put Function.php in the right place?henricloven wrote:You really saved me a lot of time by supplying this fix. Then we don't need to hurry in the transition to Joomla 1.5
But I had to do the additions to Function.php manually because I could not get your supplied file to work on my joomla installation. Details below.
THANKS!!!
I misplaced it the first time uploaded the file. Better double-check.
G'luck!
But it did not work for the frontPage. I haven't had time to fully compare the supplied file with my modified one yet so I can't say what caused it.
-
- Joomla! Fledgling
- Posts: 1
- Joined: Mon Jan 11, 2010 6:22 pm
Re: Warning: Parameter 2 to frontpage() expected to be a referen
Thanks kjellhahlen!!!
I had the problem today and searched for a solution, because i never had this before ...
I found this forum an it really works!!! I´m using Joomla 1.0.15 and as you wrote it works for this version too.
Thanks again and bye!
Greetings doschtinator
I had the problem today and searched for a solution, because i never had this before ...
I found this forum an it really works!!! I´m using Joomla 1.0.15 and as you wrote it works for this version too.
Thanks again and bye!
Greetings doschtinator
-
- Joomla! Fledgling
- Posts: 1
- Joined: Mon Jan 11, 2010 8:56 pm
Re: Warning: Parameter 2 to frontpage() expected to be a referen
Good one! Thanks it worked (so far)
.

- atzounis
- Joomla! Apprentice
- Posts: 21
- Joined: Mon Oct 08, 2007 2:02 pm
- Location: Greece
- Contact:
Re: Warning: Parameter 2 to frontpage() expected to be a referen
Great job!!!
Thanks a lot
Thanks a lot
-
- Joomla! Apprentice
- Posts: 10
- Joined: Thu Jan 07, 2010 10:43 pm
- Location: Almere, The Netherlands
- Contact:
Re: Warning: Parameter 2 to frontpage() expected to be a referen
Glad I could help 

Kjell Hählen
KaliMera Webdesign en Solutions - http://www.kalimerawebdesign.nl
KaliMera Webdesign en Solutions - http://www.kalimerawebdesign.nl
- hhallii
- Joomla! Fledgling
- Posts: 4
- Joined: Fri Jan 15, 2010 12:38 am
Re: Warning: Parameter 2 to frontpage() expected to be a referen
Helvecio wrote:IT WORKS!!!!!kjellhahlen wrote:
Man, I can't thank you enough!!!!
ALL THE BEST!!! Kjellhahlen, YOU ROCK!!!!!
This fix just saved my A$$!
The problem had me and my host stumped... completely stumped.
My joomla is 1.012.
Big Thank you!!
"These go to eleven."
-
- Joomla! Apprentice
- Posts: 13
- Joined: Thu Jan 14, 2010 10:40 pm
Re: need fix with other related messages.
Thanks for your help kjellhahlen !kjellhahlen wrote:Glad I could help
but.. i still have this message after change with that fix.
my joomla says in frontpage
"Deprecated: Function eregi() is deprecated in /home/mart/public_html/includes/sef.php on line 533"
and
Deprecated: Function eregi() is deprecated in /home/mart/public_html/templates/rt_replicant
/rt_moomenu.php on line 149
and
Deprecated: Function eregi() is deprecated in /home/mart/public_html/includes/pathway.php on line 313
i check double where i replace the files and that part is ok.
Any help?
this happen too, when my host upgrade they php.

Gracias.
-
- Joomla! Apprentice
- Posts: 10
- Joined: Thu Jan 07, 2010 10:43 pm
- Location: Almere, The Netherlands
- Contact:
Re: need fix with other related messages.
That is actually another problem, but indeed also related to PHP 5.3. It might belong in a seperate thread.marckpy2 wrote: my joomla says in frontpage
"Deprecated: Function eregi() is deprecated in /home/mart/public_html/includes/sef.php on line 533"
and
Deprecated: Function eregi() is deprecated in /home/mart/public_html/templates/rt_replicant
/rt_moomenu.php on line 149
and
Deprecated: Function eregi() is deprecated in /home/mart/public_html/includes/pathway.php on line 313
The fix I provided does fix the errors on your site the original poster mentioned. To fix the "eregi"-error you can do two things:
- The error you are getting is not really an error, it is a warning to programmers to do not use this function anymore. Although erigi is deprecated your website will function. Most webhosts provide a setting on the control panel to disable error reporting, which should stop warnings like this. Of course this is not really a fix

- The better way: fixing the code. You should edit the files you mentioned, and scroll to the line number the error appears. The keyword eregi should be replaced by preg_match and the syntax should change a bit:
Code: Select all
eregi('SOMESTRING', something, somethingelse);
Code: Select all
preg_match('/SOMESTRING/i', something, somethingelse);

Look here for more information on the issue: http://devthought.com/tumble/2009/06/fi ... in-php-53/
If you run into trouble, post the lines of code your error messages mention and I will post back the updated code.
Good luck!
Kjell Hählen
KaliMera Webdesign en Solutions - http://www.kalimerawebdesign.nl
KaliMera Webdesign en Solutions - http://www.kalimerawebdesign.nl
-
- Joomla! Fledgling
- Posts: 4
- Joined: Sat Jan 16, 2010 7:55 pm
Re: Warning: Parameter 2 to frontpage() expected to be a referen
I had the same problem as I was using joomla 1.0. Thank You very much for the .zip files. It worked!!!!! You're gr8...
-
- Joomla! Apprentice
- Posts: 13
- Joined: Thu Jan 14, 2010 10:40 pm
Re: need fix with other related messages.
Man, i fix it !!!kjellhahlen wrote:That is actually another problem, but indeed also related to PHP 5.3. It might belong in a seperate thread.marckpy2 wrote: my joomla says in frontpage
"Deprecated: Function eregi() is deprecated in /home/mart/public_html/includes/sef.php on line 533"
and
Deprecated: Function eregi() is deprecated in /home/mart/public_html/templates/rt_replicant
/rt_moomenu.php on line 149
and
Deprecated: Function eregi() is deprecated in /home/mart/public_html/includes/pathway.php on line 313
The fix I provided does fix the errors on your site the original poster mentioned. To fix the "eregi"-error you can do two things:
- The error you are getting is not really an error, it is a warning to programmers to do not use this function anymore. Although erigi is deprecated your website will function. Most webhosts provide a setting on the control panel to disable error reporting, which should stop warnings like this. Of course this is not really a fix, and there a better ways! But if you keep getting this message in all kind of places on your website, or you are reluctant to edit php code, it might be a simple way to keep things going.
- The better way: fixing the code. You should edit the files you mentioned, and scroll to the line number the error appears. The keyword eregi should be replaced by preg_match and the syntax should change a bit:
should becomeCode: Select all
eregi('SOMESTRING', something, somethingelse);
As you can see it is not a big change. Notice that SOMESTRING is beween "/" and "/i" now. All the parameters after that stay the same. I don't know how your php isCode: Select all
preg_match('/SOMESTRING/i', something, somethingelse);
, but this of course is the best way by far to fix things.
Look here for more information on the issue: http://devthought.com/tumble/2009/06/fi ... in-php-53/
If you run into trouble, post the lines of code your error messages mention and I will post back the updated code.
Good luck!
i can't believe that i don't need to make the upgrade process to 1.5.
THANKS MAN !!!
but, that fix have a partial solution because, i have others problem with functions like ereg and split that have changed too and replaced with preg_match and explode respectively.
ON THE OTHER HAND, i have a ONE PROBLEM MORE, that i can't find answers on the forum,
this is it:
Deprecated: Assigning the return value of new by reference is deprecated in /home/martastr/public_html/includes/PEAR/PEAR.php on line 563
i look on that code line and appear this:
Code: Select all
if (is_a($data, 'PEAR_Error')) {
if (is_null($code)) {
return true;
} elseif (is_string($code)) {
return $data->getMessage() == $code;
} else {
return $data->getCode() == $code;
}
}
return false;
can you help me ? AGAIN ?!!!!!!!!!

-
- Joomla! Apprentice
- Posts: 10
- Joined: Thu Jan 07, 2010 10:43 pm
- Location: Almere, The Netherlands
- Contact:
Re: Warning: Parameter 2 to frontpage() expected to be a referen
That error doesn't make much sense with the line of code you posted. Are you sure you looked at the right place? If I open that file (with Joomla 1.0.13), line 563 shows:
Before the word "new" there is a reference sign (&), exactly what PHP is complaining about. Change "&new" into "new" and you will be fine (I suppose, I didn't test it, so backup). Make sure you do it for the whole file, there a more occurences.
Code: Select all
$a = &new $ec($code, $mode, $options, $userinfo);
Kjell Hählen
KaliMera Webdesign en Solutions - http://www.kalimerawebdesign.nl
KaliMera Webdesign en Solutions - http://www.kalimerawebdesign.nl
-
- Joomla! Fledgling
- Posts: 1
- Joined: Mon Jan 18, 2010 10:46 pm
Re: Warning: Parameter 2 to frontpage() expected to be a referen
kjellhahlen wrote:I wrote a fix. My version is Joomla 1.0.13 but I suppose it will not be very different for later versions.
You sould replace two files by the ones in the attachment:
/includes/Cache/Lite/Function.php
(this solves the "Reference instead of value"-problem)
/includes/vcard.class.php
(to make the contact form work again)
If you rather add the changes by hand:
The changes to vcard.class.php are minor, look for:In Function.php I added a this line twice:Code: Select all
if(!function_exists('quoted_printable_encode'))
The new function (fixCalls) is added at the end of the file.Code: Select all
$arguments = $this->fixCalls($arguments);
kjellhahlen, you really saved the day.
I use Mambo 4.6.5, and my admin page got screwed up with the release and update of php 5.3 on my server.
Your vcard.class.php fix works also great with me...!!
To a big THANK YOU.
-
- Joomla! Apprentice
- Posts: 13
- Joined: Thu Jan 14, 2010 10:40 pm
Re: Warning: Parameter 2 to frontpage() expected to be a referen
Hi man, thanks for your reply.kjellhahlen wrote:That error doesn't make much sense with the line of code you posted. Are you sure you looked at the right place? If I open that file (with Joomla 1.0.13), line 563 shows:Before the word "new" there is a reference sign (&), exactly what PHP is complaining about. Change "&new" into "new" and you will be fine (I suppose, I didn't test it, so backup). Make sure you do it for the whole file, there a more occurences.Code: Select all
$a = &new $ec($code, $mode, $options, $userinfo);
My line on 563 is that i wrote. (one part of them, i pasted all the codes between 560 and 570)
i have joomla 1.0.15. No matters. Your info looks useful because i will look for "&new" and i will replace with "new"
is only that function that i need to change?
the ampersand is just removed. i will look for the entire page and i will everything replace like you say.
thank you. again.
-
- Joomla! Apprentice
- Posts: 10
- Joined: Thu Jan 07, 2010 10:43 pm
- Location: Almere, The Netherlands
- Contact:
Re: Warning: Parameter 2 to frontpage() expected to be a referen
For now that's the only thing you need to replace. If you get other errors we'll see about those later. Does it solve the issue?
Kjell Hählen
KaliMera Webdesign en Solutions - http://www.kalimerawebdesign.nl
KaliMera Webdesign en Solutions - http://www.kalimerawebdesign.nl
-
- Joomla! Fledgling
- Posts: 1
- Joined: Mon Jan 25, 2010 12:03 pm
Re: Warning: Parameter 2 to frontpage() expected to be a referen
Hello all and many thanks kjellhahlen.
The fix posted above by kjellhahlen works also for mambo users with the same problem. I spent a few days trying to solve this until I found this post. It may help others to know.
Thank again
The fix posted above by kjellhahlen works also for mambo users with the same problem. I spent a few days trying to solve this until I found this post. It may help others to know.
Thank again
-
- Joomla! Fledgling
- Posts: 1
- Joined: Wed Jan 27, 2010 8:49 pm
Re: Warning: Parameter 2 to frontpage() expected to be a referen
Thanx kjellhahlen,
U saved me for a very long night after I found out that my host did the upgrade.
Roy
U saved me for a very long night after I found out that my host did the upgrade.
Roy
-
- Joomla! Fledgling
- Posts: 3
- Joined: Thu Jan 28, 2010 8:41 am
Re: Warning: Parameter 2 to frontpage() expected to be a referen
Dahm you good! Thank you sooo muuuuuuuch!!!
-
- Joomla! Apprentice
- Posts: 10
- Joined: Mon Jun 16, 2008 9:11 pm
Re: Warning: Parameter 2 to frontpage() expected to be a referen
kjellhalen,
thank you so much (!). Your fix worked nicely with our Joomla 1.0.15 site after one.com's unannounced upgrade to php 5.3 yesterday.
(I did the manual patch as you suggested..)
You saved me weeks worth not yet having to upgrade our heavily modded site to 1.5.15. I would buy you a beer, even two, if i could
THANK YOU!
thank you so much (!). Your fix worked nicely with our Joomla 1.0.15 site after one.com's unannounced upgrade to php 5.3 yesterday.
(I did the manual patch as you suggested..)
You saved me weeks worth not yet having to upgrade our heavily modded site to 1.5.15. I would buy you a beer, even two, if i could
THANK YOU!
-
- Joomla! Apprentice
- Posts: 6
- Joined: Wed Jan 13, 2010 12:08 pm
Re: Warning: Parameter 2 to frontpage() expected to be a referen
@kjellhahlen
I could not thank you enough for that patch. I'm very very greatfull. Like others you really saved me a lot time.
And with stianhaugli i would buy you a couple of beers.
Thank you very much for sharing this with us.

And with stianhaugli i would buy you a couple of beers.
Thank you very much for sharing this with us.
-
- Joomla! Apprentice
- Posts: 10
- Joined: Thu Jan 07, 2010 10:43 pm
- Location: Almere, The Netherlands
- Contact:
Re: Warning: Parameter 2 to frontpage() expected to be a referen
Great! More beer! 
Again, glad to have helped. Nice to hear the fix is useful to some people!
Best of luck,
Kjell Hählen

Again, glad to have helped. Nice to hear the fix is useful to some people!
Best of luck,
Kjell Hählen
Kjell Hählen
KaliMera Webdesign en Solutions - http://www.kalimerawebdesign.nl
KaliMera Webdesign en Solutions - http://www.kalimerawebdesign.nl