| Author |
Message |
inSaNE_iRIsH
Wizard


Joined: Jun 19, 2003 Posts: 101
|
Posted: Sun Jun 22, 2003 10:06 am Post subject: Updated Gallery Block Problem/Question |
|
|
hey, a couple of things...
1) I was messing around with your updated gallery block, trying it out on my site and I get the following error
Quote: › Warning: Invalid argument supplied for foreach() in .../modules/gallery/session.php on line 55
You have an error in your SQL syntax near 'where album_name = ''' at line 1
which i find odd since i havent touched the session.php file...any ideas?
2)One of the reasons I was messing around with it is because i wanted to test to see if i could have multiple Updated Gallery Blocks. Why you ask? Because I am going to have multiple galleries and I would like to have an Updated Gallery Block for each of galleries.
thanks... |
|
| Back to top |
|
|
AdBot
|
| Post subject: Updated Gallery Block Problem/Question |
|
|
|
|
|
| Back to top |
|
 |
dari
Site Admin


Joined: Mar 03, 2003 Posts: 6287 Location: Washington Township, NJ, USA
|
|
| Back to top |
|
|
inSaNE_iRIsH
Wizard


Joined: Jun 19, 2003 Posts: 101
|
Posted: Mon Jun 23, 2003 7:06 am Post subject: Re: Updated Gallery Block Problem/Question |
|
|
| ok, I think i did that...that is i think i got all of the instances of those, but now i get this error Quote: › You have an error in your SQL syntax near 'where album_name = ''' at line 1
a couple of other things...you had "COOKIES", but mine were all "COOKIE"...and I dont recall there being any of the "ENV" ones... |
|
| Back to top |
|
|
dari
Site Admin


Joined: Mar 03, 2003 Posts: 6287 Location: Washington Township, NJ, USA
|
Posted: Mon Jun 23, 2003 7:37 am Post subject: Re: Updated Gallery Block Problem/Question |
|
|
| all you really need to do is change the section around line 55 to: Code: › /* emulate register_globals for sessions */
if (!$gallery->register_globals) {
foreach($_SESSION as $key => $value) {
eval("\$$key = & \$_SESSION[\"$key\"];");
}
} |
|
| Back to top |
|
|
inSaNE_iRIsH
Wizard


Joined: Jun 19, 2003 Posts: 101
|
Posted: Mon Jun 23, 2003 7:45 am Post subject: |
|
|
| already did that...still getting that error above |
|
| Back to top |
|
|
dari
Site Admin


Joined: Mar 03, 2003 Posts: 6287 Location: Washington Township, NJ, USA
|
Posted: Mon Jun 23, 2003 7:49 am Post subject: |
|
|
| what file is the error coming from? |
|
| Back to top |
|
|
inSaNE_iRIsH
Wizard


Joined: Jun 19, 2003 Posts: 101
|
Posted: Mon Jun 23, 2003 7:50 am Post subject: |
|
|
| dont know...i copied and pasted the error above...that is all it says |
|
| Back to top |
|
|
dari
Site Admin


Joined: Mar 03, 2003 Posts: 6287 Location: Washington Township, NJ, USA
|
Posted: Mon Jun 23, 2003 8:08 am Post subject: |
|
|
what's the site URL?
what version of PHP and what webserver are you using? |
|
| Back to top |
|
|
inSaNE_iRIsH
Wizard


Joined: Jun 19, 2003 Posts: 101
|
Posted: Mon Jun 23, 2003 8:35 am Post subject: Re: Updated Gallery Block Problem/Question |
|
|
i have it set up temporarily at this URL http://baby.rocks-hideout.com/html/index.php [rocks-hideout.com]
i am using php version 4 and Apache Webserver...ummm...whatever is right before 2.0 |
|
| Back to top |
|
|
dari
Site Admin


Joined: Mar 03, 2003 Posts: 6287 Location: Washington Township, NJ, USA
|
Posted: Mon Jun 23, 2003 8:49 am Post subject: |
|
|
| could you either post or PM me the top few lines of the block file (with the path info)? |
|
| Back to top |
|
|
inSaNE_iRIsH
Wizard


Joined: Jun 19, 2003 Posts: 101
|
Posted: Mon Jun 23, 2003 8:54 am Post subject: Re: Updated Gallery Block Problem/Question |
|
|
Code: › if (eregi("block-updatedGallery.php",$PHP_SELF)) {
Header("Location: index.php");
die();
}
// CHANGE EACH OF THESE TO REFLECT YOUR INSTALLATION
$WEB_ROOT = "";
$GALLERY_BASEDIR = $WEB_ROOT."modules/gallery/";
define(ALBUM_LIST,$WEB_ROOT."albums/albums.cache");
define(WEB_BASE_ADDR,"http://baby.rocks-hideout.com/html/index.php");
define(GALLERY_NAME,"gallery");
// DON"T CHANGE ANYTHING BELOW HERE
I know it might look wierd that there is nothing defined in WEB_ROOT, but that is what works |
|
| Back to top |
|
|
dari
Site Admin


Joined: Mar 03, 2003 Posts: 6287 Location: Washington Township, NJ, USA
|
Posted: Mon Jun 23, 2003 9:08 am Post subject: |
|
|
| hmm...that was my first question, why WEB_ROOT is not defined. is this a server you run yourself, or is it a shared server you sign up for? |
|
| Back to top |
|
|
inSaNE_iRIsH
Wizard


Joined: Jun 19, 2003 Posts: 101
|
Posted: Mon Jun 23, 2003 10:23 am Post subject: |
|
|
well...the box itself is in a data center...we rent the box and have complete control of it...we use it to rent out websites...so basically you could consider it as a shared server i sign up for, but i have complete access to the entire server
the reason i left WEB_ROOT blank is because that is what worked in order to access the add_fields.php with the website address |
|
| Back to top |
|
|
dari
Site Admin


Joined: Mar 03, 2003 Posts: 6287 Location: Washington Township, NJ, USA
|
Posted: Mon Jun 23, 2003 10:35 am Post subject: Re: Updated Gallery Block Problem/Question |
|
|
ok, first, try getting rid of the "index.php" from the base_addr variable.
second, add in the absolute directory path to the album_list and gallery paths, ie /home/foo/bar/modules/gallery, etc. |
|
| Back to top |
|
|
inSaNE_iRIsH
Wizard


Joined: Jun 19, 2003 Posts: 101
|
Posted: Mon Jun 23, 2003 11:09 am Post subject: Re: Updated Gallery Block Problem/Question |
|
|
dari wrote: › ok, first, try getting rid of the "index.php" from the base_addr variable.
second, add in the absolute directory path to the album_list and gallery paths, ie /home/foo/bar/modules/gallery, etc.
getting rid of the index.php didnt change anything
changing the path of the gallery created an error saying that it could find the error, which seems to indicate to me that the current path was correct
changing the album_list path didnt seem to change anything |
|
| Back to top |
|
|
|
|
|
|
|