https://www.icyphoenix.com/viewtopic.php?f=35&t=4996&p=33708#p33708
-----------------------------------
gearhead
Thu 06 Nov, 2008 02:14

SOLVED - Php Error In Blocks_imp_random_quote.php
-----------------------------------
Hi everyone. I'm running IP 1.2.0.27c .

I've had IP for a long time, and love it. 

Right now, I'm having a php error. It happens when I try to use the random quote block on my home page.

Here's the error message: [spoiler]Warning: include_once(./language/lang_/lang_randomquote.php) [function.include-once]: failed to open stream: No such file or directory in /home/.foxie/gearmeister5/portal.thegtsaga.net/main/blocks/blocks_imp_random_quote.php on line 31

Warning: include_once() [function.include]: Failed opening './language/lang_/lang_randomquote.php' for inclusion (include_path='.:/usr/local/php5/lib/php:/usr/local/lib/php') in /home/.foxie/gearmeister5/portal.thegtsaga.net/main/blocks/blocks_imp_random_quote.php on line 31
[/spoiler]

here's the blocks_imp_random_quote.php:

[spoiler]<?php
/***************************************************************************
*                     blocks_imp_random_quote.php
*                        -------------------
*   begin                : 2007/02/06
*   copyright            : Mighty Gorgon
*   website              : http://www.mightygorgon.com
*   email                : mightygorgon@mightygorgon.com
*
***************************************************************************/

/***************************************************************************
*
*   This program is free software; you can redistribute it and/or modify
*   it under the terms of the GNU General Public License as published by
*   the Free Software Foundation; either version 2 of the License, or
*   (at your option) any later version.
*
***************************************************************************/

if ( !defined('IN_PHPBB') )
{
	die('Hacking attempt');
}

if(!function_exists(imp_random_quote_func))
{
	function imp_random_quote_func()
	{
		global $lang, $template, $phpbb_root_path, $phpEx;
		include_once($phpbb_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_randomquote.' . $phpEx);
		$randomquote_phrase = $randomquote[rand(0, count($randomquote) - 1)];
		$template->assign_vars(array(
			'RANDOM_QUOTE' => $randomquote_phrase,
			)
		);
	}
}

imp_random_quote_func();

?>[/spoiler]

There's an error in line 31? 

I'm getting pretty good at mysql, but need to study php more in depth, so I can solve more issues myself. Maybe a simple php syntax error?

Thanks in advance.


