| Author |
Message |
Bongolonian
Beginner


Joined: Jun 20, 2003 Posts: 9
|
Posted: Mon Jul 14, 2003 9:34 am Post subject: Probably a simple problem |
|
|
I have PHP Nuke 6.5 with Gallery 1.34 working fine but have not been able to get this PHP Nuke Random Image block working.
All I get is
Warning: main(/home/httpd/htdocs/modules/gallery/init.php) [function.main]: failed to create stream: No such file or directory in /home/www/therdaGR/blocks/block-random.php on line 29
Fatal error: main() [function.main]: Failed opening required '/home/httpd/htdocs/modules/gallery/init.php' (include_path='.:/usr/local/lib/php') in /home/www/therdaGR/blocks/block-random.php on line 29
Thanks for any help |
|
| Back to top |
|
|
AdBot
|
| Post subject: Probably a simple problem |
|
|
|
|
|
| Back to top |
|
 |
dari
Site Admin


Joined: Mar 03, 2003 Posts: 6284 Location: Washington Township, NJ, USA
|
Posted: Mon Jul 14, 2003 2:05 pm Post subject: |
|
|
yup it is simple
you didn't properly configure the block and/or it's support file. you need to change the basedirectory of your website, which, i'm guessing is /home/www/therdaGR , though the error reports the default /home/httpd/htdocs. go into block-random.php and random-support.php and change the directories as needed. Read the article for complete directions. _________________
 |
|
| Back to top |
|
|
Bongolonian
Beginner


Joined: Jun 20, 2003 Posts: 9
|
Posted: Thu Jul 17, 2003 8:46 am Post subject: |
|
|
Thanks for the help
I have changed the details and i still get
Warning: Invalid argument supplied for foreach() in /home/www/therdaGR/gallery/session.php on line 55
Warning: main(/home/www/therdaGR/gallery/random_support.php) [function.main]: failed to create stream: No such file or directory in /home/www/therdaGR/blocks/block-random.php on line 30
Fatal error: main() [function.main]: Failed opening required '/home/www/therdaGR/gallery/random_support.php' (include_path='.:/usr/local/lib/php') in /home/www/therdaGR/blocks/block-random.php on line 30
any idea? |
|
| Back to top |
|
|
dari
Site Admin


Joined: Mar 03, 2003 Posts: 6284 Location: Washington Township, NJ, USA
|
Posted: Thu Jul 17, 2003 8:59 am Post subject: Re: Probably a simple problem |
|
|
go to that line and change:
$_HTTP_SESSION_VARS to $_SESSION
there will be two instances of this in that foreach section _________________
 |
|
| Back to top |
|
|
Bongolonian
Beginner


Joined: Jun 20, 2003 Posts: 9
|
Posted: Thu Jul 17, 2003 9:06 am Post subject: Re: Probably a simple problem |
|
|
Couldnt find anything that matches what you said, here is my block_random.php
----------
<?php
/*
* 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.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
if (!empty($HTTP_GET_VARS["GALLERY_BASEDIR"]) ||
!empty($HTTP_POST_VARS["GALLERY_BASEDIR"]) ||
!empty($HTTP_COOKIE_VARS["GALLERY_BASEDIR"])) {
print "Security violation\n";
exit;
}
$GALLERY_BASEDIR = "/home/www/therdaGR/gallery/";
define(ALBUM_BASEADDR, "http://www.therda.com/rda_gallery/");
define(SERVER_ADDR, "http://www.therda.com/");
require_once($GALLERY_BASEDIR . "init.php");
require_once($GALLERY_BASEDIR . "random_support.php");
define(CACHE_FILE, $gallery->app->albumDir . "/block-random.cache");
define(CACHE_EXPIRED, 86400);
/* VALID VALUES FOR $selector:
* "DAILY"
* "HOURLY"
* "RANDOM"
*/
$selector = "HOURLY";
if($selector=="DAILY"){
$content = daily_photo();
}
else if ($selector=="HOURLY"){
$content = hourly_photo();
}
else if ($selector=="RANDOM"){
list($album, $index) = get_random_photo_id();
$content = random_photo($album, $index,0);
}
?>
Aprreciate the quick response |
|
| Back to top |
|
|
dari
Site Admin


Joined: Mar 03, 2003 Posts: 6284 Location: Washington Township, NJ, USA
|
Posted: Thu Jul 17, 2003 9:06 am Post subject: |
|
|
sorry, go to line 55 in the session.php file and make that change in the foreach block. _________________
 |
|
| Back to top |
|
|
Bongolonian
Beginner


Joined: Jun 20, 2003 Posts: 9
|
Posted: Thu Jul 17, 2003 9:12 am Post subject: |
|
|
ok, changed what you said
still getting:
Why is it looking in the gallery directory for the php files?
Warning: main(/home/www/therdaGR/gallery/random_support.php) [function.main]: failed to create stream: No such file or directory in /home/www/therdaGR/blocks/block-random.php on line 30
Fatal error: main() [function.main]: Failed opening required '/home/www/therdaGR/gallery/random_support.php' (include_path='.:/usr/local/lib/php') in /home/www/therdaGR/blocks/block-random.php on line 30 |
|
| Back to top |
|
|
dari
Site Admin


Joined: Mar 03, 2003 Posts: 6284 Location: Washington Township, NJ, USA
|
Posted: Thu Jul 17, 2003 3:15 pm Post subject: Re: Probably a simple problem |
|
|
did you follow the instructions and put the random_support.php file in your gallery directory (not in your blocks directory)? _________________
 |
|
| Back to top |
|
|
|
|
|
|
|