GIDForums  

Go Back   GIDForums > Computer Programming Forums > MySQL / PHP Forum
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Search this Thread Rate Thread
  #1  
Old 12-Mar-2007, 10:14
godly.asian godly.asian is offline
New Member
 
Join Date: Mar 2007
Posts: 4
godly.asian is on a distinguished road

[SOLVED] Parse error: syntax error, unexpected T_STRING


I am getting an error in my config.inc.php script. I copied this script directly from a book. So I am not sure what is wrong. I have included the full script in the .zip
Attached Files
File Type: zip Member System.zip (7.5 KB, 8 views)
Last edited by godly.asian : 12-Mar-2007 at 10:43. Reason: solved
  #2  
Old 12-Mar-2007, 10:18
TurboPT's Avatar
TurboPT TurboPT is offline
Senior Member
 
Join Date: Feb 2006
Location: Atlanta, GA
Posts: 1,233
TurboPT is a jewel in the roughTurboPT is a jewel in the roughTurboPT is a jewel in the rough

Re: Parse error: syntax error, unexpected T_STRING


Just a quick-glance, the assignment to $email is missing the terminating semi-colon.
__________________
Use the force...read the source!!
WYCIWYG -- what you code is what you get!
  #3  
Old 12-Mar-2007, 10:22
godly.asian godly.asian is offline
New Member
 
Join Date: Mar 2007
Posts: 4
godly.asian is on a distinguished road

Re: Parse error: syntax error, unexpected T_STRING


can you like show me exactly

Here is the config.inc.php:
PHP Code:

<?php # cofig.inc.php

// This script determines how errors are handled
// Author: Evan Yeung @ chineseyoyo.canoop.com
// Date: 3.10.07

// FALSE will send detailed error message to the webpage
// TRUE will send detailed error message to $email
// Flag variable for site status
$live = FALSE;

// Error log e-mail address
$email = 'godly.asian@chineseyoyo.canoop.com'

// Create the error handler
fuction my_error_handler ($e_number, $e_message, $e_file, $e_line, $e_vars) {
    global $live, $email;
    
    //Build error message
    $message = "An error occured in script '$e_file' on line $e_line: \n<br />$e_message\n<br />";
    
    // Add the date and time
    $message .= "Date/Time: " .date('n-j-y H:i:s') ."\n<br />";
    
    if ($live) { // Don't show the specific error
        
        error_log ($message, 1, $email);
        // Send mail
        
        // Only print an error message if error isn't notice.
        if ($e_number !=E_NOTICE) {
            echo '<div id="Error">
            A system error occured. We apologize for the inconvience.</div><br />';
        }
        
    } else { // Development (prints the error)
        echo'<div id+"Error">'. $message . '</div><br />';
    }
    
}

// USe my error handler
set_error_handler ('my_error_handler');
?>

  #4  
Old 12-Mar-2007, 10:25
TurboPT's Avatar
TurboPT TurboPT is offline
Senior Member
 
Join Date: Feb 2006
Location: Atlanta, GA
Posts: 1,233
TurboPT is a jewel in the roughTurboPT is a jewel in the roughTurboPT is a jewel in the rough

Re: Parse error: syntax error, unexpected T_STRING


This entry:
PHP Code:

$email = 'godly.asian@chineseyoyo.canoop.com' 


should end like this:
PHP Code:

$email = 'godly.asian@chineseyoyo.canoop.com'; // <<- missed semi-colon. 


__________________
Use the force...read the source!!
WYCIWYG -- what you code is what you get!
  #5  
Old 12-Mar-2007, 10:31
godly.asian godly.asian is offline
New Member
 
Join Date: Mar 2007
Posts: 4
godly.asian is on a distinguished road

Re: Parse error: syntax error, unexpected T_STRING


o I c..let me check if it works.....
no..I'm sry it said the problem was on line 16 I forgot to mention dat/
  #6  
Old 12-Mar-2007, 10:37
TurboPT's Avatar
TurboPT TurboPT is offline
Senior Member
 
Join Date: Feb 2006
Location: Atlanta, GA
Posts: 1,233
TurboPT is a jewel in the roughTurboPT is a jewel in the roughTurboPT is a jewel in the rough

Re: Parse error: syntax error, unexpected T_STRING


Well, that was probably not the ONLY problem [that's why I said quick-glance], but surely was a part of it... so take a close look at line 16:

You have misspelled 'function', you have 'fuction'.
__________________
Use the force...read the source!!
WYCIWYG -- what you code is what you get!
  #7  
Old 12-Mar-2007, 10:43
godly.asian godly.asian is offline
New Member
 
Join Date: Mar 2007
Posts: 4
godly.asian is on a distinguished road

Re: Parse error: syntax error, unexpected T_STRING


thanks that did it...I really need to look at it more closely
 
 

Recent GIDBlogProblems with the Navy (Officers) by crystalattice

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Apologies In Advance Parse error: parse error, unexpected T_STRING, expecting T_VARI sph2005 MySQL / PHP Forum 11 17-Jul-2006 09:28
Parse Error vigilantweather MySQL / PHP Forum 3 21-Feb-2006 12:24
Parse Error vigilantweather MySQL / PHP Forum 6 04-Feb-2006 13:15

Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The

All times are GMT -6. The time now is 00:18.


vBulletin, Copyright © 2000 - 2010, Jelsoft Enterprises Ltd.