| :: |
| Author |
Message |
naza911
Joined: 21 Feb 2008 Posts: 6 Location: UK
|
Posted: Thu Feb 21, 2008 6:56 pm Post subject: Keep getting error message. |
|
|
After getting tired of try to get my setup forum into google's listings, decided to look for another one. I found this and it looked quite good so I downloaded it and decided to test it so I could then upgrade my forum with it somehow. I used a free host (freehostia.com) and managed to install it fine. New database and everything. I can access the ACP after install but when trying to get onto the main forum I get the following message:
| Code: | | Fatal error: Only variables can be passed by reference in /home/www/root/includes/functions.php on line 3659 |
I am using php5 with freehostia. I am still at testing it, I was expecting a problem in getting to post copied over but I cant even get the test one working.
Any Ideas on how to solve this problem? |
|
|
| Back to top |
|
 |
|
 |
HB phpBB SEO Team

Joined: 16 Oct 2006 Posts: 829
|
Posted: Thu Feb 21, 2008 7:33 pm Post subject: Re: Keep getting error message. |
|
|
| Er, would you paste the lines of code before and after 3659? |
_________________ Dan Kehn |
|
| Back to top |
|
 |
SeO Administrateur - Site Admin

Joined: 15 Mar 2006 Posts: 3987
|
|
| Back to top |
|
 |
naza911
Joined: 21 Feb 2008 Posts: 6 Location: UK
|
Posted: Thu Feb 21, 2008 9:22 pm Post subject: Re: Keep getting error message. |
|
|
I am using version 3 of phpbb3.
From line 3620 to 3659:
| Code: | * Returns a word list separated by comas
* you can as well change the minimum word size here : if ( utf8_strlen($word) >2 ) {
* Possible Options :
* - $limit = 0 means no limit.
* By default, ' . and , are deleted.
*/
function make_keywords($text, $limit = 15) {
$keywords = '';
$num = 0;
$text = preg_replace(array('`&(amp;)?[a-z0-9]+;`i', "`[[:punct:]]+`", "`[\s]+`"), ' ', strip_tags($text) );
$text = explode(' ', $text);
// We take the most used words first
$text = array_count_values($text);
arsort($text);
foreach ($text as $word => $count) {
if ( utf8_strlen($word) > 2 ) {
$keywords .= ($keywords == '') ? $word : ', ' . $word;
$num++;
if ( $limit > 0 && $num >= $limit ) {
break;
}
}
}
return $keywords;
}
/**
* Filter php/html tags and white spaces and returns htmlspecialchared string with limit in words
*/
function meta_filter_txt($text, $bbcode = true) {
if ($bbcode) {
static $RegEx = array();
static $bbcode_strip = 'img|url|flash';
if (empty($RegEx)) {
$RegEx = array('`<[^>]*>(.*<[^>]*>)?`Usi', // HTML code
'`\[(' . $bbcode_strip . ')[^\[\]]+\].*\[/(' . $bbcode_strip . ')[^\[\]]+\]`Usi', // bbcode to strip
'`\[/?[^\[\]]+\]`mi', // Strip all bbcode tags
'`[\s]+`' // Multiple spaces
);
}
return $this->word_limit( utf8_htmlspecialchars( preg_replace($RegEx, ' ', $text ) ) ); |
|
|
|
| Back to top |
|
 |
SeO Administrateur - Site Admin

Joined: 15 Mar 2006 Posts: 3987
|
|
| Back to top |
|
 |
naza911
Joined: 21 Feb 2008 Posts: 6 Location: UK
|
Posted: Thu Feb 21, 2008 10:09 pm Post subject: Re: Keep getting error message. |
|
|
This is the output from the file. I have not modified it. Misread the post asking for the code. Anyway commenting that line does not work, gives the same error at line 3661.
Lines 3659 to 3690:
| Code: | * Returns a word list separated by comas
* you can as well change the minimum word size here : if ( utf8_strlen($word) >2 ) {
* Possible Options :
* - $limit = 0 means no limit.
* By default, ' . and , are deleted.
*/
function make_keywords($text, $limit = 15) {
$keywords = '';
$num = 0;
$text = preg_replace(array('`&(amp;)?[a-z0-9]+;`i', "`[[:punct:]]+`", "`[\s]+`"), ' ', strip_tags($text) );
$text = explode(' ', $text);
// We take the most used words first
$text = array_count_values($text);
arsort($text);
foreach ($text as $word => $count) {
if ( utf8_strlen($word) > 2 ) {
$keywords .= ($keywords == '') ? $word : ', ' . $word;
$num++;
if ( $limit > 0 && $num >= $limit ) {
break;
}
}
}
return $keywords;
}
/**
* Filter php/html tags and white spaces and returns htmlspecialchared string with limit in words
*/
function meta_filter_txt($text, $bbcode = true) {
if ($bbcode) {
static $RegEx = array();
static $bbcode_strip = 'img|url|flash';
if (empty($RegEx)) {
$RegEx = array('`<[^>]*>(.*<[^>]*>)?`Usi', // HTML code
'`\[(' . $bbcode_strip . ')[^\[\]]+\].*\[/(' . $bbcode_strip . ')[^\[\]]+\]`Usi', // bbcode to strip
'`\[/?[^\[\]]+\]`mi', // Strip all bbcode tags
'`[\s]+`' // Multiple spaces
);
}
return $this->word_limit( utf8_htmlspecialchars( preg_replace($RegEx, ' ', $text ) ) );
}
return $this->word_limit( utf8_htmlspecialchars( preg_replace('`<[^>]*>(.*<[^>]*>)?`mi', '`[\s]+`', ' ', $text ) ) );
}
/**
* Cut the text according to the number of words.
* Borrowed from www.php.net http://www.php.net/preg_replace
*/
function word_limit($string, $length = 25, $ellipsis = ' ...') {
return count($words = preg_split('/\s+/', ltrim($string), $length + 1)) > $length ? rtrim(utf8_substr($string, 0, utf8_strlen($string) - utf8_strlen(end($words)))) . $ellipsis : $string;
}
/**
* Initialize meta tags
*/
function seo_meta_tags() {
global $config;
$this->meta['meta_tpl'] = '<meta name="title" content="%s" />' . "\n" . '<meta name="description" lang="%s" content="%s" />' . "\n" . '<meta name="keywords" content="%s" />' . "\n" . '<meta name="category" content="%s" />' . "\n" . '<meta name="robots" content="%s" />'. "\n" . '<meta name="distribution" content="%s" />' . "\n" . '<meta name="resource-type" content="%s" />' . "\n" . '<meta name="copyright" content="%s" />';
// Here you can hard code a static default title, description and keywords
// As is, the mod will return information based on the phpbb config
$this->meta['meta_title_def'] = $config['sitename'];
$this->meta['meta_desc_def'] = $config['site_desc'];
$this->meta['meta_keywords_def'] = $config['site_desc'];
$this->meta['meta_lang'] = $config['default_lang'];
$this->meta['meta_cat'] = 'general';
$this->meta['meta_robots'] = 'index,follow';
$this->meta['meta_distrib'] = 'global';
$this->meta['meta_restype'] = 'document';
$this->meta['meta_copy'] = $config['sitename'];
return;
}
}
$seo_meta = new seo_meta(); |
|
|
|
| Back to top |
|
 |
SeO Administrateur - Site Admin

Joined: 15 Mar 2006 Posts: 3987
|
|
| Back to top |
|
 |
naza911
Joined: 21 Feb 2008 Posts: 6 Location: UK
|
Posted: Thu Feb 21, 2008 10:39 pm Post subject: Re: Keep getting error message. |
|
|
| I have tried that. The error message goes but it leaves a blank screen. Strange thing is that the normal version of phpbb3 works fine. |
|
|
| Back to top |
|
 |
SeO Administrateur - Site Admin

Joined: 15 Mar 2006 Posts: 3987
|
Posted: Thu Feb 21, 2008 10:46 pm Post subject: Re: Keep getting error message. |
|
|
Replace :
| Code: | | return $this->word_limit( utf8_htmlspecialchars( htmlspecialchars_decode( preg_replace($RegEx, $replace, $text ) ) ) ); |
with :
| Code: | $text = htmlspecialchars_decode( preg_replace($RegEx, $replace, $text ));
utf8_htmlspecialchars( $text );
return $this->word_limit( $text); |
 |
_________________ phpBB SEO || SEO Forum || Forum Référencement
GYM Sitemap & RSS for phpBB3 has been released ! || GYM Sitemap & RSS for phpBB3 est disponible ! |
|
| Back to top |
|
 |
naza911
Joined: 21 Feb 2008 Posts: 6 Location: UK
|
Posted: Fri Feb 22, 2008 3:59 pm Post subject: Re: Keep getting error message. |
|
|
| That sorted it out. Thanks for all you help. Hopefully this will get indexed b google so others find a quick solution for it. |
|
|
| Back to top |
|
 |
naza911
Joined: 21 Feb 2008 Posts: 6 Location: UK
|
Posted: Fri Feb 22, 2008 4:08 pm Post subject: Re: Keep getting error message. |
|
|
| Now onto what should have been the hard part. Transferring all the posts from my normal phpbb3 forum to the seo version. Tried putting the backup gzip file into the store file and trying to do a restore, but that does not work. Any ideas? |
|
|
| Back to top |
|
 |
dcz Administrateur - Site Admin

Joined: 28 Apr 2006 Posts: 15242
|
|
| Back to top |
|
 |
|
|