Support Forums | Demo Gallery [1.x] [2.x] | Downloads | News | Site Map ]
Nuked Gallery
  Create a FREE account or Login   As a guest, you don't have access to our FULL navigation system.
 Forum FAQForum FAQ   StatisticsStatistics   SearchSearch   UsergroupsUsergroups   FavoritesFavorites  

Probably a simple problem

 
Post new topic   Reply to topic    NukedGallery.net Forum Index » PHP-Nuke Integration » Blocks View previous topicPrinter friendly versionView next topic
Author Message
Bongolonian

Beginner
Beginner


Joined: Jun 20, 2003
Posts: 9

PostPosted: Mon Jul 14, 2003 9:34 am    Post subject: Probably a simple problem Reply with quote

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
Offline View user's profile Send private message
AdBot
   Post subject: Probably a simple problem  

Back to top
dari

Site Admin
Site Admin


Joined: Mar 03, 2003
Posts: 6284
Location: Washington Township, NJ, USA

PostPosted: Mon Jul 14, 2003 2:05 pm    Post subject: Reply with quote

yup it is simple Smile

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
Offline View user's profile Send private message Visit poster's website
Bongolonian

Beginner
Beginner


Joined: Jun 20, 2003
Posts: 9

PostPosted: Thu Jul 17, 2003 8:46 am    Post subject: Reply with quote

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
Offline View user's profile Send private message
dari

Site Admin
Site Admin


Joined: Mar 03, 2003
Posts: 6284
Location: Washington Township, NJ, USA

PostPosted: Thu Jul 17, 2003 8:59 am    Post subject: Re: Probably a simple problem Reply with quote

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
Offline View user's profile Send private message Visit poster's website
Bongolonian

Beginner
Beginner


Joined: Jun 20, 2003
Posts: 9

PostPosted: Thu Jul 17, 2003 9:06 am    Post subject: Re: Probably a simple problem Reply with quote

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
Offline View user's profile Send private message
dari

Site Admin
Site Admin


Joined: Mar 03, 2003
Posts: 6284
Location: Washington Township, NJ, USA

PostPosted: Thu Jul 17, 2003 9:06 am    Post subject: Reply with quote

sorry, go to line 55 in the session.php file and make that change in the foreach block.
_________________
Back to top
Offline View user's profile Send private message Visit poster's website
Bongolonian

Beginner
Beginner


Joined: Jun 20, 2003
Posts: 9

PostPosted: Thu Jul 17, 2003 9:12 am    Post subject: Reply with quote

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
Offline View user's profile Send private message
dari

Site Admin
Site Admin


Joined: Mar 03, 2003
Posts: 6284
Location: Washington Township, NJ, USA

PostPosted: Thu Jul 17, 2003 3:15 pm    Post subject: Re: Probably a simple problem Reply with quote

did you follow the instructions and put the random_support.php file in your gallery directory (not in your blocks directory)?
_________________
Back to top
Offline View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    NukedGallery.net Forum Index » PHP-Nuke Integration » Blocks View previous topicPrinter friendly versionView next topic

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT - 5 Hours

Powered by phpBB © phpBB Group



Sponsors: Web HostingDedicated ServersDomain NamesDomain Name RegistrationDedicated Web HostingSEO Search Engine OptimisationSEOWeb Design New YorkSEO Web DesignWeb hosting AustraliaCheap Web Design

6th year online! 2003-2009
Legal • Use of this site consitutes agreement to the Acceptable Use Policy
Hosted by Implosion WorksSourceForge.net Logo • Theme by TonicMedia