Home | Support Forums | Your Account | Gallery [2] | 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  

How can I fix it? (IIS USERS READ THIS)
Goto page 1, 2  Next
 
Post new topic   Reply to topic    NukedGallery.net Forum Index » PHP-Nuke Issues » Blocks View previous topicPrinter friendly versionView next topic
Author Message
xgate32

Beginner
Beginner


Joined: May 26, 2003
Posts: 16
Location: Korea, South

PostPosted: Tue Sep 09, 2003 6:43 am    Post subject: How can I fix it? (IIS USERS READ THIS) Reply with quote

I insert block-NG random in my webpage.
The error message is
Parse error: parse error, unexpected T_STRING in d:\apache group\apache\htdocs\blocks\block-NG-random.php on line 31
How can fix it?
----
Give us your Gallery/webserver information to get a faster answer.
Get this information from the PHP diagnostic (in the configuration wizard).
Gallery URL (optional but very useful): http://21tos.codns.com/modules/gallery
Gallery version: 1.4 RC3
Apache version: 1.3.28
PHP version (don't just say PHP 4, please): 4.3.2
Graphics Toolkit:
Operating system: Windows XP Professional
Web browser/version (if applicable): IE6.0
The CONFIG lines from the top of your block file(s):
$GALLERY_BASEDIR = "d:\Apache Group\Apache\htdocs\modules\gallery\";
define(ALBUM_BASEADDR, "http://21tos.codns.com/albums/");
define(SERVER_ADDR, "http://21tos.codns.com/");
Back to top
Offline View user's profile Send private message Visit poster's website
AdBot
   Post subject: How can I fix it? (IIS USERS READ THIS)  

Back to top
slackbladder

Moderator
Moderator


Joined: Mar 29, 2003
Posts: 1038
Location: Cambs,UK

PostPosted: Tue Sep 09, 2003 6:58 am    Post subject: Reply with quote

Have you just cut and pasted the CONFIG lines above from your block or re-typed them for this post? I would check for any INVALID characters in line 31.
_________________
"The only difference between me and a madman is that I'm not mad."
Back to top
Offline View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger
slackbladder

Moderator
Moderator


Joined: Mar 29, 2003
Posts: 1038
Location: Cambs,UK

PostPosted: Tue Sep 09, 2003 7:11 am    Post subject: Reply with quote

Is it the SPACE in you apache path:

d:\Apache Group\Apache\htdocs\modules\gallery\

(Apache Group)?
_________________
"The only difference between me and a madman is that I'm not mad."
Back to top
Offline View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger
xgate32

Beginner
Beginner


Joined: May 26, 2003
Posts: 16
Location: Korea, South

PostPosted: Tue Sep 09, 2003 8:58 am    Post subject: Reply with quote

Yes. I cut & paste config lines.
I install apache in Windows XP, default path is below
d:\Apache Group\Apache\
Back to top
Offline View user's profile Send private message Visit poster's website
xgate32

Beginner
Beginner


Joined: May 26, 2003
Posts: 16
Location: Korea, South

PostPosted: Tue Sep 09, 2003 9:20 am    Post subject: Reply with quote

I reinstall Apache d:\Apache
But, result is same..
Problem is not space.
Back to top
Offline View user's profile Send private message Visit poster's website
slackbladder

Moderator
Moderator


Joined: Mar 29, 2003
Posts: 1038
Location: Cambs,UK

PostPosted: Tue Sep 09, 2003 9:24 am    Post subject: Reply with quote

I don't know that much about WinXP/Apache installs - but I'm guess that the problem lays with the SPACE in the server path:

d:\Apache Group\Apache\htdocs\modules\gallery\

That's a 'friendly' filename/path for WINDOWS - but it's a problem for the BLOCK.

Have a look at:

Installing Apache
Q7

here:
http://www.johnturner.com/howto/winxp-howto.html
_________________
"The only difference between me and a madman is that I'm not mad."
Back to top
Offline View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger
slackbladder

Moderator
Moderator


Joined: Mar 29, 2003
Posts: 1038
Location: Cambs,UK

PostPosted: Tue Sep 09, 2003 9:26 am    Post subject: Reply with quote

Is it still giving the same error?

Parse error: parse error, unexpected T_STRING in d:\apache group\apache\htdocs\blocks\block-NG-random.php on line 31
_________________
"The only difference between me and a madman is that I'm not mad."
Back to top
Offline View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger
slackbladder

Moderator
Moderator


Joined: Mar 29, 2003
Posts: 1038
Location: Cambs,UK

PostPosted: Tue Sep 09, 2003 9:50 am    Post subject: Reply with quote

Have you tried:

$GALLERY_BASEDIR = "d:/apache/htdocs/modules/gallery/";

instead?
_________________
"The only difference between me and a madman is that I'm not mad."
Back to top
Offline View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger
xgate32

Beginner
Beginner


Joined: May 26, 2003
Posts: 16
Location: Korea, South

PostPosted: Tue Sep 09, 2003 10:52 am    Post subject: Reply with quote

I follow your advise.
but result is
Warning: Invalid argument supplied for foreach() in d:\apache\htdocs\modules\gallery\session.php on line 63

Warning: main(errors/configure_instructions.php): failed to open stream: No such file or directory in d:\apache\htdocs\modules\gallery\errors\reconfigure.php on line 13

Fatal error: main(): Failed opening required 'errors/configure_instructions.php' (include_path='.;d:\php\includes;d:\php\pear') in d:\apache\htdocs\modules\gallery\errors\reconfigure.php on line 13
Back to top
Offline View user's profile Send private message Visit poster's website
slackbladder

Moderator
Moderator


Joined: Mar 29, 2003
Posts: 1038
Location: Cambs,UK

PostPosted: Tue Sep 09, 2003 11:00 am    Post subject: Reply with quote

For the error:
Warning: Invalid argument supplied for foreach() in d:\apache\htdocs\modules\gallery\session.php on line 63

Do a search here for 'foreach' - this has been answered before.

For the error:
Warning: main(errors/configure_instructions.php):

At the top of the BLOCK file after the:

Code: ›
<?


ADD:

Code: ›
global $gallery;

_________________
"The only difference between me and a madman is that I'm not mad."
Back to top
Offline View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger
xgate32

Beginner
Beginner


Joined: May 26, 2003
Posts: 16
Location: Korea, South

PostPosted: Tue Sep 09, 2003 7:56 pm    Post subject: Reply with quote

The Source still remains error.
Plz test in Windows environment.
Back to top
Offline View user's profile Send private message Visit poster's website
slackbladder

Moderator
Moderator


Joined: Mar 29, 2003
Posts: 1038
Location: Cambs,UK

PostPosted: Wed Sep 10, 2003 1:22 am    Post subject: Reply with quote

DARI will have to help you with this one - sry. He's on vaction at the moment - back in a few days. Smile
_________________
"The only difference between me and a madman is that I'm not mad."
Back to top
Offline View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger
Klinduni

Beginner
Beginner


Joined: Oct 29, 2003
Posts: 17

PostPosted: Wed Oct 29, 2003 11:47 pm    Post subject: Re: How can I fix it? Reply with quote

Hello. I am receiving the same error as the original poster on this thread [nukedgallery.net] and was wondering if a solution has been presented.
Quote: › Parse error: parse error, unexpected T_STRING in D:\Websites\induni\blocks\block-NG-random.php on line 32

My server runs the following:
  • Windows 2000 Advanced Server with IIS 5
  • PHP Version 4.3.3
  • MySQL 3.23.49
  • Php-Nuke Version 6.9
  • Gallery Version 1.4-pl2

After reading the forums here, I have learned that I need to add global $gallery; after <?php so I have. The following is my code that generates the error.
Code: › <?php
global $gallery;

/*
* 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.
*
* Developed by Dariush Molavi at NukedGallery.net
* Version 1.0
* 8 August 2003
*/

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 = "d:\Websites\induni\modules\Gallery\";
define(ALBUM_BASEADDR, "http://www.induni.com/albums/";);
define(SERVER_ADDR, "http://www.induni.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);
 }
?>

Originally was receing the same errors as everyone else until I added my full path to the gallery directory. This is hopefully the only error remaining to be resolved. I've done many searches and read the forums here, if I have overlooked a solution I apologize. Any help you can provide would be appreciated.

Thanks,
Kristin
Induni.com [induni.com]
Back to top
Offline View user's profile Send private message
slackbladder

Moderator
Moderator


Joined: Mar 29, 2003
Posts: 1038
Location: Cambs,UK

PostPosted: Thu Oct 30, 2003 5:56 am    Post subject: Reply with quote

Hi,

this:
Code: ›
define(ALBUM_BASEADDR, "http://www.induni.com/albums/";);


needs to be this:
Code: ›
define(ALBUM_BASEADDR, "http://www.induni.com/albums/");


Also this:
Code: ›
define(SERVER_ADDR, "http://www.induni.com/";);


needs to be this:
Code: ›
define(SERVER_ADDR, "http://www.induni.com/");

_________________
"The only difference between me and a madman is that I'm not mad."
Back to top
Offline View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger
dari

Site Admin
Site Admin


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

PostPosted: Thu Oct 30, 2003 7:55 am    Post subject: Reply with quote

you may also have to escape out the backslashes in your path, ie:
Code: ›
$GALLERY_BASEDIR = "d:\\Websites\\induni\\modules\\Gallery\\";


try slackbladder's suggestion first, then this one (ie, not both at the same time) so that we can further assist.
_________________
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 Issues » 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 HostingSearch Engine OptimisationSEOWeb Design New YorkSEO Web DesignWeb hosting AustraliaSEO

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