main.php - Errors on page

Dark Lightning

Joined: 2006-12-21
Posts: 6
Posted: Thu, 2006-12-21 05:19


Gallery version = 2.1.2 core 1.1.0.2
PHP version = 5.2.0 isapi
Webserver = Microsoft-IIS/6.0
Database = mysqlt 5.0.27-community-nt, lock.system=database
Toolkits = Gd
Acceleration = none, none
Operating system = Windows NT SERVER 5.2 build 3790
Default theme = matrix
Locale = en_US
Browser = Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.2; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.04506.30)

I searched the following issue rather heavily but if I missed an obvious answer then by all means flame on. I have two errors on main.php:

Error #1

Quote:
Line: 36
Char: 15
Error: Expected ';'
Code: 0
URL: http://127.0.0.1/gallery/main.php

which points at the following code:

34 if (GalleryUtilities::isEmbedded()) {
35     require_once(dirname(__FILE__) . '/init.inc');
36 } else {
37     /* If this is a request for a public data file, give it to the user immediately */
38     list ($view, $itemId) = GalleryUtilities::getRequestVariables('view', 'itemId');

Error #2

Quote:
Line: 115
Char: 1
Error: Object expected
Code: 0
URL: http://127.0.0.1/gallery/main.php

which points at the following code:

113	/* If we're in debug mode, show a redirect page */
114	print '<h1> Debug Redirect </h1> ' .
115	    'Not automatically redirecting you to the next page because we\'re in debug mode<br/>';
116	printf('<a href="%s">Continue to the next page</a>', $g2Data['redirectUrl']);
117	print '<hr/>';

This problem is only visible when viewed locally on the server (Win2003 with IE7). If this page is viewed by a client computer, no errors are presented in either IE7 or FireFox2. I recently installed .NET 3.0 followed by SharePoint 3.0; could this be the root of my problem?

Login or register to post comments
bharat
bharat's picture

Joined: 2002-05-21
Posts: 6096
Posted: Thu, 2006-12-21 08:16

Good forensic work! Unfortunately, you went down the wrong path :-/. The line numbers you're seeing, like this:

Line: 36
Char: 15
Error: Expected ';'
Code: 0
URL: http://127.0.0.1/gallery/main.php

Those actually refer to the lines in the HTML (or in the javascript context within the HTML, depending on your browser). They don't refer to the PHP code. So, we need to see you javascript to figure this out. Can you provide a url to your G2 so that we can see the error? Or, if that won't work can you save the HTML page and post a link to it here? Publish it on your site and link to it here or make it an attachment to your reply. That should help us to sort this out.

Login or register to post comments
Dark Lightning

Joined: 2006-12-21
Posts: 6
Posted: Thu, 2006-12-21 15:20

My G2 install is located at http://darklightning.kicks-ass.org/gallery. Here is the source code as viewed through IE7 & TextPad:

34 <table width="100%" cellspacing="0" cellpadding="0">
35 <tr valign="top">
36 <td id="gsSidebarCol">
37 <div id="gsSidebar" class="gcBorder1">
38 <div class="block-search-SearchBlock gbBlock">

<snip>

113 <script type="text/javascript">
114 // <![CDATA[
115 search_SearchBlock_init('Search the Gallery', 'Please enter a search term.');
116 // ]]>
117 </script>
Login or register to post comments
bharat
bharat's picture

Joined: 2002-05-21
Posts: 6096
Posted: Fri, 2006-12-22 00:20

Hrm. When I go to your gallery I don't see any errors (either with FF2 or IE7). Nor do I see any images. Do you have images that are protected by security? Ie, are you seeing a different page than your visitors see? Try logging out.. do you see the same error as a guest?

Login or register to post comments
Dark Lightning

Joined: 2006-12-21
Posts: 6
Posted: Fri, 2006-12-22 13:57
bharat wrote:
Hrm. When I go to your gallery I don't see any errors (either with FF2 or IE7). Nor do I see any images. Do you have images that are protected by security? Ie, are you seeing a different page than your visitors see? Try logging out.. do you see the same error as a guest?

This is the problem I'm running into; errors are only visible on the host machine (irregardless of if I'm logged in or not), never on the clients. But yes, the gallery is empty. Let me add a stack of stuff...

Login or register to post comments
Dark Lightning

Joined: 2006-12-21
Posts: 6
Posted: Fri, 2006-12-22 15:19

Multiple albums and pictures have been loaded. http://darklightning.kicks-ass.org/gallery/

Login or register to post comments
Dark Lightning

Joined: 2006-12-21
Posts: 6
Posted: Fri, 2006-12-22 15:17
Login or register to post comments
bharat
bharat's picture

Joined: 2002-05-21
Posts: 6096
Posted: Sun, 2006-12-24 20:07

Sorry for the delay; holidays are keeping me busy. Would you do me a favor and capture the HTML from one of the pages that generates the error? The HTML and the error should be enough for me to figure it out.

Login or register to post comments
Dark Lightning

Joined: 2006-12-21
Posts: 6
Posted: Mon, 2006-12-25 14:20

Ummm... Well... Merry Christmas and the problem is cured? I reinstalled the .NET 2.0 and now I see no errors. Maybe a bad installation of .NET was the root of my issues?

Login or register to post comments
bharat
bharat's picture

Joined: 2002-05-21
Posts: 6096
Posted: Mon, 2006-12-25 17:48

Weird! It's conceivable that when you were using IE from the host machine it was putting you into a different security model, and reinstalling .NET 2.0 reset it? The inner workings of IE are a mystery to me :-(. If you reproduce this problem ever again, save the HTML and the error message and post them here and I'll take a look. Happy holidays!

Login or register to post comments
sdavis8631

Joined: 2006-12-25
Posts: 1
Posted: Mon, 2006-12-25 22:39

I was just wondering if someone can help me with the issue I am
having access my Photo Gallery from my website, error message is

Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'sfd'@'jerky.dreamhost.com' (using password: YES) in /home/.hoagi/sdavis8631/shawnfdavis.com/pis/lib/adodb/drivers/adodb-mysql.inc.php on line 348

Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'sfd'@'jerky.dreamhost.com' (using password: YES) in /home/.hoagi/sdavis8631/shawnfdavis.com/pis/lib/adodb/drivers/adodb-mysql.inc.php on line 348

Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'sfd'@'jerky.dreamhost.com' (using password: YES) in /home/.hoagi/sdavis8631/shawnfdavis.com/pis/lib/adodb/drivers/adodb-mysql.inc.php on line 348

Login or register to post comments
valiant

Joined: 2003-01-04
Posts: 32397
Posted: Mon, 2006-12-25 22:57

sdavis8631

your problem is unrelated to this topic.
please create a new forum topic for your problem.
thanks.

and to give you a quick answer: either your database username / password / database name / database host is wrong, or it doesn't work anymore.
your webhost, dreamhost, will be able to assist you in fixing this.

Login or register to post comments