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  

Random Pic Block.
Goto page 1, 2  Next
 
Post new topic   Reply to topic    NukedGallery.net Forum Index » PHP-Nuke Integration » Blocks View previous topicPrinter friendly versionView next topic
Author Message
Roy

Beginner
Beginner


Joined: Apr 04, 2003
Posts: 1

PostPosted: Tue Apr 08, 2003 7:02 am    Post subject: Random Pic Block. Reply with quote

Hi Dari,
Greetings from South Australia.

I'm trying to set up the Random pic block and I get the following error:

Parse error: parse error, unexpected T_CHARACTER, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/lroy/public_html/family/modules/gallery/session.php on line 56


53./* emulate register_globals for sessions */
54.if (!$gallery->register_globals) {
55. foreach($_SESSION as $key => $value) {
56. eval("$$key = & $_SESSION[\"$key\"];");
57. }


By the way this is the closest I've ever got to getting the Random Pic block for Gallery to actually work. You have been a great help. Cool

Yankee in the South - sounds intriguing.

Roy
Back to top
Offline View user's profile Send private message
AdBot
   Post subject: Random Pic Block.  

Back to top
sharlein

User
User


Joined: Apr 07, 2003
Posts: 30

PostPosted: Tue Apr 08, 2003 7:24 am    Post subject: Random Pic block Reply with quote

I too, am having a problem:
Code: › Fatal error: Call to undefined function: fs_file_exists() in /home/sharlein/public_html/Nuke/html/modules/gallery/block-random.php on line 56
What am I doing wrong? Thanx, Steve
_________________
"War, what is it good for?" - Edwin Starr
Back to top
Offline View user's profile Send private message Visit poster's website
dari

Site Admin
Site Admin


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

PostPosted: Tue Apr 08, 2003 8:12 am    Post subject: Re: Random Pic Block. Reply with quote

Roy wrote: › Hi Dari,
53./* emulate register_globals for sessions */
54.if (!$gallery->register_globals) {
55. foreach($_SESSION as $key => $value) {
56. eval("$$key = & $_SESSION[\"$key\"];");
57. }


it looks like you're missing a backslash before the $_SESSION on line 56. here's mine:
Code: › /* emulate register_globals for sessions */
if (!$gallery->register_globals) {
    foreach($_SESSION as $key => $value) {
        eval("\$$key = & \$_SESSION[\"$key\"];");
    }
}

_________________
Back to top
Offline View user's profile Send private message Visit poster's website
dari

Site Admin
Site Admin


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

PostPosted: Tue Apr 08, 2003 8:18 am    Post subject: Re: Random Pic block Reply with quote

sharlein wrote: › I too, am having a problem:
Code: › Fatal error: Call to undefined function: fs_file_exists() in /home/sharlein/public_html/Nuke/html/modules/gallery/block-random.php on line 56
What am I doing wrong? Thanx, Steve


hmmm....that function is defined in the gallery/platform/ directory (under either fs_unix.php or fs_windows.php). what OS are you using? do you have the corresponding fs*.php file in that directory?
Make sure that you have the propery $GALLERY_BASEDIR in your gallery/block-random.php file. That points to your init.php file, which in turn points to the fs*.php platform file.
_________________
Back to top
Offline View user's profile Send private message Visit poster's website
sharlein

User
User


Joined: Apr 07, 2003
Posts: 30

PostPosted: Tue Apr 08, 2003 9:35 am    Post subject: Reply with quote

I checked everything that you suggested, and I did have to make a change to BASEDIR path. I am running Linux on my site. I do have the corresponding fs*.php file in gallery/platforms.
Now I get this one again:
Code: › Fatal error: Call to undefined function: fs_file_exists() in /home/sharlein/public_html/Nuke/html/modules/gallery/block-random.php on line 56
I looked up the code
Code: › // Check the cache file to see if it's up to date
$rebuild = 1;
(line 56) if (fs_file_exists(CACHE_FILE)) {    $stat = fs_stat(CACHE_FILE);
I am still lost. I would like to run this block for a very personal reason. My fifteen yeat old son died 4 years ago (April 4). We have lots of pictures of him, but to see them the guest must enter the gallery. Not many do, so I would like to have these random pix on my mainpage. I know that you are busy, but any help you can give would be welcomed. Thanx, Steve
_________________
"War, what is it good for?" - Edwin Starr
Back to top
Offline View user's profile Send private message Visit poster's website
dari

Site Admin
Site Admin


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

PostPosted: Tue Apr 08, 2003 9:47 am    Post subject: Reply with quote

here's the $GALLERY_BASEDIR section of my file:
Code: › $GALLERY_BASEDIR = "/home/httpd/htdocs/modules/gallery/";
require($GALLERY_BASEDIR . "init.php");

Make sure you have the trailing slash included there at the end.

Also, make sure that your permissions are set properly. The owner of my gallery directory is root (group root), with read permissions for all. make sure that your init.php is readable by all (and that the file can be read by the webserver, though if you can open the gallery on it's own, then you don't have this problem). You may also want to check that your gallery is not in the configuration mode (run sh secure.sh from the gallery dir).
_________________
Back to top
Offline View user's profile Send private message Visit poster's website
sharlein

User
User


Joined: Apr 07, 2003
Posts: 30

PostPosted: Tue Apr 08, 2003 4:24 pm    Post subject: Reply with quote

Hi, I set CHMOD on init.php to 777 and changed my BASEDIR. I got past line 42, but got hung up on this:
Code: › Fatal error: Call to undefined function: fs_file_exists() in /home/sharlein/public_html/Nuke/html/modules/gallery/block-random.php on line 57
Where is this function called? Thanx, Steve
_________________
"War, what is it good for?" - Edwin Starr
Back to top
Offline View user's profile Send private message Visit poster's website
dari

Site Admin
Site Admin


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

PostPosted: Tue Apr 08, 2003 4:30 pm    Post subject: Reply with quote

you don't want init.php to be 777, just chmod uog+r init.php will suffice.

are you able to add photos, etc via logging into the gallery?
_________________
Back to top
Offline View user's profile Send private message Visit poster's website
sharlein

User
User


Joined: Apr 07, 2003
Posts: 30

PostPosted: Tue Apr 08, 2003 4:48 pm    Post subject: Reply with quote

Yes, my gallery is functioning properly. I am very much the newbie, what is meant by
Quote: › chmod uog+r init.php
? Again, many thanks - Steve

P.S. Do you have a payPal account? I would like to donate.
_________________
"War, what is it good for?" - Edwin Starr
Back to top
Offline View user's profile Send private message Visit poster's website
dari

Site Admin
Site Admin


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

PostPosted: Tue Apr 08, 2003 6:36 pm    Post subject: Reply with quote

in linux, chmod mean "change permissions mode". the u means users (the person who "owns" the file), the g means that people belonging to the same group as the owner, and the o means others (ie, the rest of the world). after the plus sign (or minus if you want to remove the permission) the r means read, the w means write and the x means execute. you can view permissions for files by typing ls -l in any directory, and your output will look like this:
Code: ›
root@yankeesinthesouth:/home/httpd/htdocs/modules/gallery # ls -l
total 592
-rw-r--r--    1 root     root         1088 Mar 26 19:25 AUTHORS
drwxr-xr-x    2 root     root         4096 Mar 26 19:25 CVS
-rw-r--r--    1 root     root        88817 Mar 26 19:25 ChangeLog
-rw-r--r--    1 root     root        18007 Mar 26 19:25 LICENSE.txt
-rw-r--r--    1 root     root         9808 Mar 26 19:25 README
-rw-r--r--    1 root     root         7088 Mar 26 19:25 UPGRADING
-rw-r--r--    1 root     root         2144 Mar 26 19:25 Version.php
-rw-r--r--    1 root     root         2741 Mar 26 19:25 add_comment.php
-rw-r--r--    1 root     root         4442 Mar 26 19:25 add_photos.php
-rw-r--r--    1 root     root         7608 Mar 26 19:25 album_permissions.php
-rw-r--r--    1 root     root        11128 Mar 26 19:25 albums.php
-rw-r--r--    1 root     root         5514 Mar 26 19:31 block-random.php
-rw-r--r--    1 root     root         8037 Mar 26 19:25 captionator.php
drwxr-xr-x   11 root     root         4096 Apr  8 13:38 classes


if there is a 'd' as the leading character, it signifies a directory.

anyway...i'm not quite sure what could be causing this error. does it happen on the main website page, or only after you click the random photo thumbnail and get taken into the gallery?

you may also want to check to make sure that you have your paths correctly specified. since you don't have your nuke installation directly inside your public_html directory, you might want to double check paths in your init and config files (run sh configure.sh and then the web-based configuration utility for gallery and double check it). it shouldn't be a problem for you to move your nuke install right into your public_html directory, and out of the nuke/html/ subdirectory structure.
_________________


Last edited by dari on Tue Apr 08, 2003 6:56 pm; edited 1 time in total
Back to top
Offline View user's profile Send private message Visit poster's website
dari

Site Admin
Site Admin


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

PostPosted: Tue Apr 08, 2003 6:49 pm    Post subject: Reply with quote

ah ha...according to the headers sent by your website:
Code: › Server: Apache/1.3.27 (Unix) mod_log_bytes/1.0 mod_bwlimited/1.0 PHP/4.2.3 FrontPage/5.0.2.2510 mod_ssl/2.8.11 OpenSSL/0.9
.6h

you're running a pretty old version of PHP. if you have the capability to (ie, you're running your own server), try to upgrade to the latest version, 4.3.1 and see if that helps.
_________________
Back to top
Offline View user's profile Send private message Visit poster's website
sharlein

User
User


Joined: Apr 07, 2003
Posts: 30

PostPosted: Tue Apr 08, 2003 8:41 pm    Post subject: Reply with quote

Thank you very much for your help and time. I will keep keep you informed of my progress. Very Happy
_________________
"War, what is it good for?" - Edwin Starr
Back to top
Offline View user's profile Send private message Visit poster's website
dari

Site Admin
Site Admin


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

PostPosted: Tue Apr 08, 2003 8:42 pm    Post subject: Reply with quote

no problem....i'll keep digging and see if i can figure it out (it seems to be a common gallery problem). if i find anything, i'll post here, and drop you a line.
_________________
Back to top
Offline View user's profile Send private message Visit poster's website
sharlein

User
User


Joined: Apr 07, 2003
Posts: 30

PostPosted: Wed Apr 09, 2003 4:34 pm    Post subject: Reply with quote

Hi, I installed the update pack -> gallery 6.5. Thought it might help, But now is lost my gallery
Code: › Fatal error: Call to undefined function: checkifonlineoroffline() in /home/sharlein/public_html/Nuke/html/modules/gallery/init.php on line 101
Where is this function defined? Very Happy
_________________
"War, what is it good for?" - Edwin Starr
Back to top
Offline View user's profile Send private message Visit poster's website
dari

Site Admin
Site Admin


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

PostPosted: Wed Apr 09, 2003 4:42 pm    Post subject: Reply with quote

i hope you made backup copies of those 4 files as i suggested. revert back to those, and i think that it's more than likely a PHP issue. try asking your host to upgrade to 4.3.1. if that fails, i might be able to host the site for you.
_________________
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
Goto page 1, 2  Next

 
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