| Author |
Message |
Roy
Beginner


Joined: Apr 04, 2003 Posts: 1
|
Posted: Tue Apr 08, 2003 7:02 am Post subject: Random Pic Block. |
|
|
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.
Yankee in the South - sounds intriguing.
Roy |
|
| Back to top |
|
|
AdBot
|
| Post subject: Random Pic Block. |
|
|
|
|
|
| Back to top |
|
 |
sharlein
User


Joined: Apr 07, 2003 Posts: 30
|
Posted: Tue Apr 08, 2003 7:24 am Post subject: Random Pic block |
|
|
| 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 |
|
|
dari
Site Admin


Joined: Mar 03, 2003 Posts: 6284 Location: Washington Township, NJ, USA
|
Posted: Tue Apr 08, 2003 8:12 am Post subject: Re: Random Pic Block. |
|
|
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 |
|
|
dari
Site Admin


Joined: Mar 03, 2003 Posts: 6284 Location: Washington Township, NJ, USA
|
Posted: Tue Apr 08, 2003 8:18 am Post subject: Re: Random Pic block |
|
|
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 |
|
|
sharlein
User


Joined: Apr 07, 2003 Posts: 30
|
Posted: Tue Apr 08, 2003 9:35 am Post subject: |
|
|
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 codeCode: › // 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 |
|
|
dari
Site Admin


Joined: Mar 03, 2003 Posts: 6284 Location: Washington Township, NJ, USA
|
|
| Back to top |
|
|
sharlein
User


Joined: Apr 07, 2003 Posts: 30
|
Posted: Tue Apr 08, 2003 4:24 pm Post subject: |
|
|
| 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 |
|
|
dari
Site Admin


Joined: Mar 03, 2003 Posts: 6284 Location: Washington Township, NJ, USA
|
Posted: Tue Apr 08, 2003 4:30 pm Post subject: |
|
|
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 |
|
|
sharlein
User


Joined: Apr 07, 2003 Posts: 30
|
Posted: Tue Apr 08, 2003 4:48 pm Post subject: |
|
|
| 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 |
|
|
dari
Site Admin


Joined: Mar 03, 2003 Posts: 6284 Location: Washington Township, NJ, USA
|
Posted: Tue Apr 08, 2003 6:36 pm Post subject: |
|
|
| 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 |
|
|
dari
Site Admin


Joined: Mar 03, 2003 Posts: 6284 Location: Washington Township, NJ, USA
|
|
| Back to top |
|
|
sharlein
User


Joined: Apr 07, 2003 Posts: 30
|
Posted: Tue Apr 08, 2003 8:41 pm Post subject: |
|
|
Thank you very much for your help and time. I will keep keep you informed of my progress.  _________________ "War, what is it good for?" - Edwin Starr |
|
| Back to top |
|
|
dari
Site Admin


Joined: Mar 03, 2003 Posts: 6284 Location: Washington Township, NJ, USA
|
Posted: Tue Apr 08, 2003 8:42 pm Post subject: |
|
|
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 |
|
|
sharlein
User


Joined: Apr 07, 2003 Posts: 30
|
|
| Back to top |
|
|
dari
Site Admin


Joined: Mar 03, 2003 Posts: 6284 Location: Washington Township, NJ, USA
|
Posted: Wed Apr 09, 2003 4:42 pm Post subject: |
|
|
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 |
|
|
|
|
|
|
|