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  

Cant Figure Out Random Block Errors

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

Beginner
Beginner


Joined: May 25, 2003
Posts: 15

PostPosted: Mon Jun 23, 2003 5:26 pm    Post subject: Cant Figure Out Random Block Errors Reply with quote

Code: › Warning: Invalid argument supplied for foreach() in /home/subfight/public_html/modules/gallery/session.php on line 55

Warning: main(/modules/gallery/init.php) [function.main]: failed to create stream: No such file or directory in /home/subfight/public_html/modules/gallery/random_support.php on line 26

Fatal error: main() [function.main]: Failed opening required '/modules/gallery/init.php' (include_path='') in /home/subfight


i changed this in my random_support.php

Code: › $GALLERY_BASEDIR = "/modules/gallery/";
require_once($GALLERY_BASEDIR . "init.php");



my random_block.php looks like this
Code: ›
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 = "/modules/gallery/";
define(ALBUM_BASEADDR, "http://www.subfighter.com/albums/");
define(SERVER_ADDR, "http://www.subfighter.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);
  }


using

Operating System Linux
PHP Version 4.3.1
Mysql Version 4.0.12
Back to top
Offline View user's profile Send private message Visit poster's website MSN Messenger
AdBot
   Post subject: Cant Figure Out Random Block Errors  

Back to top
dirtbag

Beginner
Beginner


Joined: May 25, 2003
Posts: 15

PostPosted: Mon Jun 23, 2003 6:17 pm    Post subject: Re: Cant Figure Out Random Block Errors Reply with quote

Code: › change $HTTP_SESSION_VARS to $_SESSION for both of those occurances in that section.


did the change above but also but still getting errors... when is

Quote: › /public_html/modules/gallery/


Code: › Warning: main(/public_html/modules/gallery/init.php) [function.main]: failed to create stream: No such file or directory in /home/subfight/public_html/modules/gallery/random_support.php on line 26

Fatal error: main() [function.main]: Failed opening required '/public_html/modules/gallery/init.php' (include_path='') in /home/subfight/public_html/modules/gallery/random_support.php on line 26



and when is use this path i get different errors

Quote: › /home/subfight/public_html/modules/gallery/


thre errors

Code: › Warning: fopen(/home/subfight/public_html/albums/block-random.cache) [function.fopen]: failed to create stream: No such file or directory in /home/subfight/public_html/modules/gallery/platform/fs_unix.php on line 53

Warning: Invalid argument supplied for foreach() in /home/subfight/public_html/modules/gallery/random_support.php on line 230

Warning: copy(/home/subfight/public_html/albums//.thumb.jpg) [function.copy]: failed to create stream: No such file or directory in /home/subfight/public_html/modules/gallery/platform/fs_unix.php on line 24


so what is the correct path??

Quote: › /public_html/modules/gallery/


Quote: › /home/subfight/public_html/modules/gallery/
Back to top
Offline View user's profile Send private message Visit poster's website MSN Messenger
dari

Site Admin
Site Admin


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

PostPosted: Mon Jun 23, 2003 8:46 pm    Post subject: Re: Cant Figure Out Random Block Errors Reply with quote

the one that starts with /home is the proper path.
try reading http://www.nukedgallery.net/modules.php ... ate+stream and see if it helps.
Back to top
Offline View user's profile Send private message Visit poster's website
dirtbag

Beginner
Beginner


Joined: May 25, 2003
Posts: 15

PostPosted: Mon Jun 23, 2003 11:00 pm    Post subject: Re: Cant Figure Out Random Block Errors Reply with quote

the error is

Quote: › Warning: fopen("/block-random.cache", "r") - No such file or directory in /home/*******/public_html/BlackNova/html/modules/gallery/platform/fs_unix.php on line 53

Warning: Invalid argument supplied for foreach() in /home/*******/public_html/BlackNova/html/modules/gallery/random_support.php on line 230



I had recived this same error all the time but I hand created a block-random.cach and changed the session_var to $session as was suggested in another post and it got rid of them..

but now I get another error msg

Quote: › Warning: fopen("/block-random.cache", "w") - Permission denied in /home/*******/public_html/BlackNova/html/modules/gallery/platform/fs_unix.php on line 53


I chmod'd 0777 the .cache file above and everything works now!!!!!!

Thanks for the help..

i just posted somethings from the link you gave me so if someone else has a problem they can find one place.... as they will probably have the same problems.... Surprised

i am using
phpnuke 6.5
galler 1.34

for anyones info...

regards,
rick
Back to top
Offline View user's profile Send private message Visit poster's website MSN Messenger
dari

Site Admin
Site Admin


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

PostPosted: Tue Jun 24, 2003 5:54 am    Post subject: Reply with quote

the .cache file is inside your albums directory, correct? make sure that directory is readable/writable by the webserver: chown -R apache.apache albums/ (replace apache.apache with whatever user the webserver runs as, ie: www.www)
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: Dedicated ServersDomain NamesWeb HostingDomain Name RegistrationDedicated Web HostingWeb Design New YorkCompare VoIPseo packagesSEO CompanyNew York Yellow PagesFind LocationsVOIP Phone ServiceNeckermannOnline internetSEORestaurant Locator • Get great HP coupons from CouponSnapshot • Search for great dell coupons at CouponSnapshot.com.au • Graduation DressesAndroid TabletSEO IndiaBuy Phen375fuel filterWorld Meds Direct

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