hi
i have try to upgrade my version of SMF script to last version 1.1.9
when i go in upgrade process it give me this error
Parse error: syntax error, unexpected '?' in Settings.php on line 2

but the line 2 is just comment line

<?php
/**********************************************************************************
* Settings.php                                                                    *
***********************************************************************************
* SMF: Simple Machines Forum                                                      *
* Open-Source Project Inspired by Zef Hemel (zef@zefhemel.com)                    *
* =============================================================================== *
* Software Version:           SMF 1.1                                             *
* Software by:                Simple Machines (http://www.simplemachines.org)     *
* Copyright 2006 by:          Simple Machines LLC (http://www.simplemachines.org) *
*           2001-2006 by:     Lewis Media (http://www.lewismedia.com)             *
* Support, News, Updates at:  http://www.simplemachines.org                       *
***********************************************************************************
* This program is free software; you may redistribute it and/or modify it under   *
* the terms of the provided license as published by Simple Machines LLC.          *
*                                                                                 *
* This program is distributed in the hope that it is and will be useful, but      *
* WITHOUT ANY WARRANTIES; without even any implied warranty of MERCHANTABILITY    *
* or FITNESS FOR A PARTICULAR PURPOSE.                                            *
*                                                                                 *
* See the "license.txt" file for details of the Simple Machines license.          *
* The latest version can always be found at http://www.simplemachines.org.        *
**********************************************************************************/


########## Maintenance ##########
# Note: If $maintenance is set to 2, the forum will be unusable!  Change it to 0 to fix it.
$maintenance = 0;		# Set to 1 to enable Maintenance Mode, 2 to make the forum untouchable. (you'll have to make it 0 again manually!)
$mtitle = 'Maintenance Mode';		# Title for the Maintenance Mode message.
$mmessage = 'Okay faithful users...we\'re attempting to restore an older backup of the database...news will be posted once we\'re back!';		# Description of why the forum is in maintenance mode.

########## Forum Info ##########
$mbname = 'My Community';		# The name of your forum.
$language = 'english';		# The default language file set for the forum.
$boardurl = 'http://127.0.0.1/smf';		# URL to your forum's folder. (without the trailing /!)
$webmaster_email = 'noreply@myserver.com';		# Email address to send emails from. (like noreply@yourdomain.com.)
$cookiename = 'SMFCookie11';		# Name of the cookie to set for authentication.

########## Database Info ##########
$db_server = 'localhost';
$db_name = 'smf';
$db_user = 'root';
$db_passwd = '';
$db_prefix = 'smf_';
$db_persist = 0;
$db_error_send = 1;

########## Directories/Files ##########
# Note: These directories do not have to be changed unless you move things.
$boarddir = dirname(__FILE__);		# The absolute path to the forum's folder. (not just '.'!)
$sourcedir = dirname(__FILE__) . '/Sources';		# Path to the Sources directory.

########## Error-Catching ##########
# Note: You shouldn't touch these settings.
$db_last_error = 0;

if (file_exists(dirname(__FILE__) . '/install.php'))
	header('Location: http://' . (empty($_SERVER['HTTP_HOST']) ? $_SERVER['SERVER_NAME'] . (empty($_SERVER['SERVER_PORT']) || $_SERVER['SERVER_PORT'] == '80' ? '' : ':' . $_SERVER['SERVER_PORT']) : $_SERVER['HTTP_HOST']) . (strtr(dirname($_SERVER['PHP_SELF']), '\\', '/') == '/' ? '' : strtr(dirname($_SERVER['PHP_SELF']), '\\', '/')) . '/install.php');

# Make sure the paths are correct... at least try to fix them.
if (!file_exists($boarddir) && file_exists(dirname(__FILE__) . '/agreement.txt'))
	$boarddir = dirname(__FILE__);
if (!file_exists($sourcedir) && file_exists($boarddir . '/Sources'))
	$sourcedir = $boarddir . '/Sources';

?>

please can any one help me

    you're better off asking the developer of the script/software for assistance

      There are no parse errors in the code you posted. Are you sure you posted the correct file?

        <?
        /**********************************************************************************
        * Settings.php                                                                    *
        ***********************************************************************************
        * SMF: Simple Machines Forum                                                      *
        * Open-Source Project Inspired by Zef Hemel (zef@zefhemel.com)                    *
        * =============================================================================== *
        * Software Version:           SMF 1.1                                             *
        * Software by:                Simple Machines (http://www.simplemachines.org)     *
        * Copyright 2006 by:          Simple Machines LLC (http://www.simplemachines.org) *
        *           2001-2006 by:     Lewis Media (http://www.lewismedia.com)             *
        * Support, News, Updates at:  http://www.simplemachines.org                       *
        ***********************************************************************************
        * This program is free software; you may redistribute it and/or modify it under   *
        * the terms of the provided license as published by Simple Machines LLC.          *
        *                                                                                 *
        * This program is distributed in the hope that it is and will be useful, but      *
        * WITHOUT ANY WARRANTIES; without even any implied warranty of MERCHANTABILITY    *
        * or FITNESS FOR A PARTICULAR PURPOSE.                                            *
        *                                                                                 *
        * See the "license.txt" file for details of the Simple Machines license.          *
        * The latest version can always be found at http://www.simplemachines.org.        *
        **********************************************************************************/
        
        
        ########## Maintenance ##########
        # Note: If $maintenance is set to 2, the forum will be unusable!  Change it to 0 to fix it.
        $maintenance = 0;		# Set to 1 to enable Maintenance Mode, 2 to make the forum untouchable. (you'll have to make it 0 again manually!)
        $mtitle = 'Maintenance Mode';		# Title for the Maintenance Mode message.
        $mmessage = 'Okay faithful users...we\'re attempting to restore an older backup of the database...news will be posted once we\'re back!';		# Description of why the forum is in maintenance mode.
        
        ########## Forum Info ##########
        $mbname = '&#1605;&#1606;&#1578;&#1583;&#1609; &#1601;&#1603;&#1585;&#1577; - Feckra community ';		#1606;&#1578;&#1583;&#1609; &#1601;&#1603;&#1585;&#1577; - Feckra community ';		#1606;&#1578;&#1583;&#1609; &#1601;&#1603;&#1585;&#1577; - Feckra community ';		#1606;&#1578;&#1583;&#1609; &#1601;&#1603;&#1585;&#1577; - Feckra comunity';		#1606;&#1578;&#1583;&#1609; &#1601;&#1603;&#1585;&#1577; - Feckra comunity';		#1606;&#1578;&#1583;&#1609; &#1601;&#1603;&#1585;&#1577; - Feckra comunity';		#1606;&#1578;&#1583;&#1609; &#1601;&#1603;&#1585;&#1577; - Feckra comunity';		#1606;&#1578;&#1583;&#1609; &#1601;&#1603;&#1585;&#1577; - Feckra comunity';		# The name of your forum.
        $language = 'english';		# The default language file set for the forum.
        $boardurl = 'http://www.feckra.com/vb';		# URL to your forum's folder. (without the trailing /!)
        $webmaster_email = 'wael@feckra.com';		# Email address to send emails from. (like noreply@yourdomain.com.)
        $cookiename = 'FeckraCookie558';		# Name of the cookie to set for authentication.
        
        ########## Database Info ##########
        $db_server = 'localhost';
        $db_name = '11111111';
        $db_user = '1111111';
        $db_passwd = '1111111';
        $db_prefix = 'smf_';
        $db_persist = 0;
        $db_error_send = 1;
        
        ########## Directories/Files ##########
        # Note: These directories do not have to be changed unless you move things.
        $boarddir = '/home/1111111/public_html/vb';		# The absolute path to the forum's folder. (not just '.'!)
        $sourcedir = '/home/1111111/public_html/vb/Sources';		# Path to the Sources directory.
        
        ########## Error-Catching ##########
        # Note: You shouldn't touch these settings.
        $db_last_error = 0;
        
        if (file_exists(dirname(__FILE__) . '/install.php'))
        	header('Location: http://' . (empty($_SERVER['HTTP_HOST']) ? $_SERVER['SERVER_NAME'] . (empty($_SERVER['SERVER_PORT']) || $_SERVER['SERVER_PORT'] == '80' ? '' : ':' . $_SERVER['SERVER_PORT']) : $_SERVER['HTTP_HOST']) . (strtr(dirname($_SERVER['PHP_SELF']), '\\', '/') == '/' ? '' : strtr(dirname($_SERVER['PHP_SELF']), '\\', '/')) . '/install.php');
        
        # Make sure the paths are correct... at least try to fix them.
        if (!file_exists($boarddir) && file_exists(dirname(__FILE__) . '/agreement.txt'))
        	$boarddir = dirname(__FILE__);
        if (!file_exists($sourcedir) && file_exists($boarddir . '/Sources'))
        	$sourcedir = $boarddir . '/Sources';
        
        ?>
        

          Once again, the file parses fine:

          C:\Documents and Settings\Brad\Desktop>php -l wael_e.php
          No syntax errors detected in wael_e.php

          Can you paste the exact PHP parse error message you're getting? And also tell us the path to the file that you're pasting for us?

          Only suggestion I can make at this point is to change the '<?' to a full '<?php' since short tags have been deprecated.

            Ehm.. Where does it say short open tag is deprecated? 🙂 It can be a bad practise to use them(compability-wise) but they are not deprecated and will be in the future versions of PHP also.

            I dont think the actual error is because of short open tag(it would not parse at all if they are disabled). Problem could be that the file itself is mangled somehow when you've sent it to server.

              Hey, when I said it was the "only suggestion," I never denied that I was grasping at straws here! :p

              As for the short tags, it's at the very least deprecated in my mind; as for the manual, the strongest wording I could find is that they are "generally not recommended" (from: [man]basic-syntax.phpmode[/man]) stemming from the fact that they are disabled by default (which means someone somewhere @ php.net doesn't like them! :p).

              You're right though; the short tags don't sound like our culprit. That's why I think we need the full PHP error message as well as the path to the above file, just to double check we're looking at the right script.

                Write a Reply...