I'm tiring to install the photo gallery that is featured on this site (#64 Building a Photo Gallery). I have all my folders and directories setup, my imgbrowz0r.php is in the inc folder, but when I try to view the page I get this message.
------------------------------------ Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /home/shepa0/public_html/chris/imgbrowz0r/inc/imgbrowz0r.php on line 37
Fatal error: Cannot instantiate non-existent class: imgbrowz0r in /home/shepa0/public_html/chris/imgbrowz0r/index.php on line 65
-----------------------------------
First off there is nothing on line 37. Second this is what is on like 65: $gallery = new imgbrowz0r($config);
// Include class require 'http://shepardsuperteam.com/chris/imgbrowz0r/inc/imgbrowz0r.php';
// These are all settings (set to default). The settings are not validated since you have to configure everything. // There is a chance that ImgBrowz0r stops working if you enter the wrong values. $config = array( // Directory settings. These are required. Without trailing slash. (required) 'images_dir' => 'http://shepardsuperteam.com/chris/imgbrowz0r/gallery', 'cache_dir' => 'http://shepardsuperteam.com/chris/imgbrowz0r/cache',
// Thumbnail settings (optional) 'thumbs_per_page' => 12, // Amount of thumbnails per page 'max_thumb_row' => 4, // Amount of thumbnails on a row 'max_thumb_width' => 200, // Maximum width of thumbnail 'max_thumb_height' => 200, // Maximum height of thumbnail
// Time settings (optional) 'time_format' => 'F jS, Y', // Date formatting. Look at the PHP date() for help: http://nl3.php.net/manual/en/function.date.php 'time_zone' => 0, // Timezone. Example: 1 'enable_dst' => false, // Daylight saving time (DST). Set this to true to enable it.
// Misc settings (optional) 'ignore_port' => false, // Ignore port in url. Set this to true to ignore the port. 'dir_thumbs' => true, // Show a thumbnail in a category box. Default is false. 'random_thumbs' => false, // Use random thumbnails for categories. Default is false. 'read_thumb_limit' => 0 // See README for information about this setting. );
// Start the class $gallery = new imgbrowz0r($config);
// XHTML stuff ?><!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\"> <html xmlns=\"http://www.w3.org/1999/xhtml\"> <head> <meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />
/* This is some example CSS. You can change this to your own liking. */ .imgbrowz0r-navigation, #imgbrowz0r { margin: 0 auto;width: 970px;text-align: left } .imgbrowz0r-navigation { padding: 1.5em 0 0.5em } .imgbrowz0r-navigation .img-statistics { margin-top: 1.5em }
Sorry, I'm still not seeing the problem. I forgot to mention this is my first time messing with anything PHP.
I looked back on the video (#64 Building a Photo Gallery) and noticed that he had a ?q=%PATH% on the back end of his link to the main_url. I remember having that in there before but I deleted it because I thought it was junk added on from Dreamweaver, but I put it back on (that's) on line 38, so now it reads like this.
Yes, I know what it is and where it's at. I just don't understand what it's saying about the file. It's in the right directory. It wasn't mirrored on my hard drive, but I fixed that with no change.
I just fond this message in my live log on the server.
[24-Aug-2009 06:59:52] PHP Fatal error: Cannot instantiate non-existent class: imgbrowz0r in /home/shepa0/public_html/chris/imgbrowz0r/index.php on line 65
Now I know what imgbrowz0r is I'm guessing that you haven't altered that file in any way? I can only surmise that suPHP is the problem. Have you tried the gallery locally using Manp or Xampp or whatever?
Hello Friends,I have some problem regarding parsing. I am getting Parse error: parse error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING error, here are the lines: for($i=0; $i<12; $i++){ $aquery = "INSERT INTO uaq_scbatsmen VALUES('$row2['id']', 'a', '$a_player[$i]', '$a_out[$i]', '$a_balls[$i]', '$a_4s[$i]', '$a_6s[$i]', '$a_runs[$i]')"; mysql_query($aquery); } The problem line is the middle one ($aquery). Most probably problem is that I am missing some " or ; or something else but after hours of head banging I still can't find the problem. Regards Jenifer Support executive
------------------------------------
Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /home/shepa0/public_html/chris/imgbrowz0r/inc/imgbrowz0r.php on line 37
Fatal error: Cannot instantiate non-existent class: imgbrowz0r in /home/shepa0/public_html/chris/imgbrowz0r/index.php on line 65
-----------------------------------
First off there is nothing on line 37.
Second this is what is on like 65: $gallery = new imgbrowz0r($config);
Here is a link to the live page:
http://shepardsuperteam.com/chris/imgbrowz0r/index.php
And hers my code. Please let me know If I have anything out of place.
----------------------------------
The problem is on line 37 (or before) of imgbrowz0r.php, which is why the class can't be called on line 65 of index.php.
I looked back on the video (#64 Building a Photo Gallery) and noticed that he had a ?q=%PATH% on the back end of his link to the main_url. I remember having that in there before but I deleted it because I thought it was junk added on from Dreamweaver, but I put it back on (that's) on line 38, so now it reads like this.
38| 'main_url' => 'http://shepardsuperteam.com/chris/imgbrowz0r/index.php?q=%PATH%',
line 65 still reads like this
65|$gallery = new imgbrowz0r($config);
Do you see anything wrong between these two codes?
The problem is on line 37 (or before) of imgbrowz0r.php
Ok. So what do I do with this information. "imgbrowz0r.php" only shows up on line 28. Is it written wrong, directing wrong, wrong file name?
p.s. Thanks for the help so far.
I just fond this message in my live log on the server.
[24-Aug-2009 06:59:52] PHP Fatal error: Cannot instantiate non-existent class: imgbrowz0r in /home/shepa0/public_html/chris/imgbrowz0r/index.php on line 65
EDIT.
Are you sure your server is running PHP5 and not PHP4?
I am getting Parse error: parse error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING error, here are the lines:
for($i=0; $i<12; $i++){
$aquery = "INSERT INTO uaq_scbatsmen VALUES('$row2['id']', 'a', '$a_player[$i]', '$a_out[$i]', '$a_balls[$i]', '$a_4s[$i]', '$a_6s[$i]', '$a_runs[$i]')";
mysql_query($aquery);
}
The problem line is the middle one ($aquery). Most probably problem is that I am missing some " or ; or something else but after hours of head banging I still can't find the problem.
Regards
Jenifer
Support executive