Parse error: syntax error, unexpected ´,´ in.

Merhaba Arkadaşlar. Bir Script Üzerinde editleme yapmaya çalışıyorum. Php bilgim yok denecek kadar az. Googleden yardım alıyorum.

Alınan Hata Kodu : Parse error: syntax error, unexpected ',' in /home/operikiz/public_html/31530/init.php on line 87


87 nci satır : ( $config['db_user'], $config['db_password'], $config['db_name'], $config['db_host'] );

Kodun Tamamı:

<?php
function fn_strip_tags( &$var )
{
    global $trusted_variables;
    if ( !is_array( $var ) )
    {
        return strip_tags( $var );
    }
    $stripped = array( );
    foreach ( $var as $k => $v )
    {
        if ( !is_array( $v ) )
        {
        }
        else
        {
            $sv = $trusted_variables;
        }
        $stripped[$sk] = $sv;
    }
    return $stripped;
}

function fn_add_slashes( &$var, $escape_nls = false )
{
    return addslashes( $var );
    $slashed = array( );
    foreach ( $var as $k => $v )
    {
        $sk = addslashes( $k );
        if ( !is_array( $v ) )
        {
            $sv = addslashes( $v );
        }
        else
        {
            $sv = fn_add_slashes( $v, $escape_nls );
        }
        $slashed[$sk] = $sv;
    }
    return $slashed;
}

function fn_process_superglobals( )
{
    foreach ( func_get_args( ) as $var )
    {
        foreach ( $var as $k => $v )
        {
            if ( !defined( "QUOTES_ENABLED" ) )
            {
                $var = func_get_args( );
            }
            $GLOBALS[$k] = $var;
        }
    }
}

if ( !defined( "AREA" ) )
{
    exit( "Access denied" );
}
@set_magic_quotes_runtime( 0 );
ini_set( "magic_quotes_sybase", 0 );
if ( get_magic_quotes_gpc( ) )
{
    define( "QUOTES_ENABLED", true );
}
ini_set( "session.bug_compat_42", 1 );
ini_set( "session.bug_compat_warn", 0 );
define( "PS", PATH_SEPARATOR );
if ( defined( "CONSOLE" ) )
{
    $_SERVER['SERVER_SOFTWARE'] = "EVR";
    $_SERVER['REMOTE_ADDR'] = $_SERVER['HOSTNAME'];
    @set_time_limit( 0 );
}
fn_process_superglobals( $_GET, $_POST, $_COOKIE, $_SERVER );
if ( !empty( $QUERY_STRING ) )
{
    $QUERY_STRING = defined( "QUOTES_ENABLED" ) ? stripslashes( $QUERY_STRING ) : $QUERY_STRING;
}
define( "DIR_ROOT", realpath( dirname( __FILE__ ) ) );
require_once( DIR_ROOT."/inc/config.php" );
require_once( CORE_DIR."/ez_sql_core.php" );
require_once( CORE_DIR."/ez_sql_mysql.php" );
( $config['db_user'], $config['db_password'], $config['db_name'], $config['db_host'] );
if ( !$db )
{
    exit( "database bağlanılamadı." );
}
$db->query( "SET NAMES 'utf8'" );
foreach ( $_settings as $k => $v )
{
    $options[$v['type']][$v['option_name']] = $v['option_value'];
}
if ( 0 < $options['General']['ssl'] )
{
    if ( $target == "cart" && $mode == "payment" || $target == "cart" && $mode == "delivery" || $target == "users" && $mode == "ulogin" || $target == "users" && $mode == "register" )
    {
        $config['ssl'] = "https://";
    }
    else
    {
        $config['ssl'] = "http://";
    }
}
else
{
    $config['ssl'] = "http://";
}
$config['web_dir'] = $config['ssl'].$config['http_host'].$config['http_path'];
define( WEB_DIR, $config['web_dir'] );
$options['IMAGE']['upload_dir'] = IMAGES_DIR_OUT."/common_images/";
$options['IMAGE']['upload_dir_web'] = IMAGES_WEB_DIR_OUT."/common_images/";
if ( AREA == "A" )
{
    require_once( LIB_DIR."/admin_menu/admin_menu.php" );
    ( );
    require_once( LIB_DIR."/cre_tabs/cre_tabs.php" );
    ( );
    require( LIB_DIR."/imagepress/ipress.php" );
}
require_once( CORE_DIR."/fn.database.php" );
require_once( CORE_DIR."/fn.image.php" );
require_once( CORE_DIR."/fn.common.php" );
require_once( CORE_DIR."/fn.mail.php" );
require_once( CORE_DIR."/fn.string.php" );
require_once( CORE_DIR."/fn.category.php" );
require_once( CORE_DIR."/fn.post.php" );
require_once( CORE_DIR."/fn.hooks.php" );
require_once( CORE_DIR."/fn.kolon.php" );
require( LIB_DIR."/phpmailer/class.phpmailer.php" );
foreach ( $A as $k => $v )
{
    if ( substr( $k, 0, 1 ) != "_" )
    {
        $aaddons[] = strtolower( $k );
        include( ADDONS_DIR."/".$k."/func.php" );
        include( ADDONS_DIR."/".$k."/init.php" );
        if ( !( AREA == "A" ) || !( is_file( ADDONS_DIR."/".$k."/admin/{$hedef}.php" ) && $k != $hedef ) )
        {
        }
    }
}
if ( @( $ajax == 1 ) )
{
    if ( in_array(  ) )
    {
        if ( AREA == "A" )
        {
            $ac_dir = "admin";
        }
        if ( AREA == "C" )
        {
            $ac_dir = "customer";
        }
        if ( !empty( $ekads ) )
        {
            $eks_hedef_x = ADDONS_DIR."/".$hedef."/{$ac_dir}/".$hedef_eks.".php";
            include( $eks_hedef_x );
        }
        else
        {
            $x_hedef_x = ADDONS_DIR."/".$hedef."/{$ac_dir}/".$hedef.".php";
            if ( is_file( $x_hedef_x ) )
            {
                include( $x_hedef_x );
            }
            else
            {
                include( TARGET_DIR."/{$def_target}.php" );
            }
        }
    }
    else if ( is_file( TARGET_DIR."/{$hedef}.php" ) )
    {
        include( TARGET_DIR."/{$hedef}.php" );
    }
    else
    {
        include( TARGET_DIR."/{$def_target}.php" );
    }
    exit( );
}
if ( empty( $_SESSION['ilk'] ) )
{
    $_SESSION['ilk'] = 1;
}
if ( $_SESSION['ilk'] == 2 && $_SESSION['sayfa_sonlandir'] == 2 )
{
    if ( $_SESSION['adw_guv'] != "evo2012" )
    {
        fn_redirect( "http://www.adworld.com.tr/?target=iletisim&mesaj=e1" );
        exit( );
    }
    else
    {
        $_SESSION['adw_guv'] = "";
    }
}
$_SESSION['ilk'] = 2;
$_SESSION['sayfa_sonlandir'] = 1;
?>

Yardımlarınız için Teşekkür ederim.

2013-06-29 06:08:31

Php

theSinanSinan AY

87 nci satırı

$db =  mysql_connect ($config['db_user'], $config['db_password'], $config['db_name'], $config['db_host'] ); //şu şekilde değiştir

2013-06-29 15:10:41 Edit:2013-06-29 15:12:20

Php

Kardeş dediğin gibi yaptım. Fakat Bu kez veritabanına bağlanamadı diyor. Ki veritabanı doğru...

Arkadaşlar bu kodlar (ionCube)   şifreli idi ben bunu (Decoded yaptım.)

İndex Php dosyası : <?php
ob_start( );
session_start( );
define( "AREA", "C" );
$common_chache_time = 323;
require( dirname( __FILE__ )."/init.php" );
require( COMMON_DIR."/customer_common.php" );
if ( $hedef == "sitemap" )
{
    fn_sitemap_olustur( );
    exit( );
}
require( $s_tema."/index.php" );
$_SESSION['sayfa_sonlandir'] = 2;
?>

config.php dosyası : <?php
require( DIR_ROOT."/inc/config.local.php" );
if ( $_SERVER['HTTP_HOST'] == "localhost" )
{
    error_reporting( 0 );
    if ( version_compare( PHP_VERSION, "5.3.0", ">=" ) )
    {
        error_reporting( error_reporting( ) & ~E_DEPRECATED );
    }
}
else
{
    error_reporting( 0 );
}
@ini_set( "memory_limit", "48M" );
@set_time_limit( 3600 );
define( "HOST_DIR", $config['http_path'] );
define( "ADMIN_DIR", DIR_ROOT."/admin" );
define( "ADDONS_DIR", DIR_ROOT."/addons" );
define( "COMMON_DIR", DIR_ROOT."/inc/common" );
define( "LIB_DIR", DIR_ROOT."/inc/lib" );
define( "LIB_WEB_DIR", HOST_DIR."/inc/lib" );
define( "CORE_DIR", DIR_ROOT."/inc/core" );
define( "THEME_DIR", DIR_ROOT."/inc/themes" );
define( "THEME_W_DIR", HOST_DIR."/inc/themes" );
define( "IMAGES_DIR_OUT", DIR_ROOT."/inc/uploads" );
define( "IMAGES_WEB_DIR_OUT", HOST_DIR."/inc/uploads" );
define( "W_ADDONS_DIR", HOST_DIR."/addons" );
if ( AREA == "A" )
{
    define( "TARGET_DIR", ADMIN_DIR."/hedef" );
}
if ( empty( $hedef ) )
{
    $hedef = "home/manage";
}
if ( !empty( $ekads ) )
{
}
$def_target = "home";
$db_tables = array( "options" => $table_prefix."options", "images" => $table_prefix."images", "images_link" => $table_prefix."images_link", "relationships" => $table_prefix."relationships", "post" => $table_prefix."post", "postmeta" => $table_prefix."postmeta", "il" => $table_prefix."il", "ilce" => $table_prefix."ilce", "ilk_ayar" => $table_prefix."ilk_ayar", "kolonlar" => $table_prefix."kolonlar", "category" => $table_prefix."categories", "vergiler" => $table_prefix."vergiler" );
if ( AREA == "A" )
{
    $config['index_script'] = "admin.php";
}
else
{
    $config['index_script'] = "index.php";
}
$s_tema = THEME_DIR."/".$selected_theme;
$s_w_tema = THEME_W_DIR."/".$selected_theme;
if ( AREA == "C" )
{
    define( "TARGET_DIR", $s_tema."/hedef" );
}
?>

config.local.php dosyası :

<?php
$selected_theme = "v2";
$config = array( );
if ( $_SERVER['HTTP_HOST'] == "localhost" )
{
    $config['db_host'] = "localhost";
    $config['db_name'] = "operikiz_31530";
    $config['db_user'] = "operikiz_31530";
    $config['db_password'] = "31530";
    $config['http_host'] = "";
    $config['http_path'] = "";
}
else
{
    $config['db_host'] = "localhost";
    $config['db_name'] = "operikiz_31530";
    $config['db_user'] = "operikiz_31530";
    $config['db_password'] = "31530";
    $config['http_host'] = "www.operikizi.com";
    $config['http_path'] = "../31530";
}
$table_prefix = "jb_";
if ( AREA == "A" )
{
    $no_image = "images/resim_yok.gif";
}
if ( AREA == "C" )
{
    $no_image = "images/resim_yok.gif";
}
define( "SHORT", "desc" );
?>

init.dosyası

<?php
function fn_strip_tags( &$var )
{
    global $trusted_variables;
    if ( !is_array( $var ) )
    {
        return strip_tags( $var );
    }
    $stripped = array( );
    foreach ( $var as $k => $v )
    {
        if ( !is_array( $v ) )
        {
        }
        else
        {
            $sv = $trusted_variables;
        }
        $stripped[$sk] = $sv;
    }
    return $stripped;
}

function fn_add_slashes( &$var, $escape_nls = false )
{
    return addslashes( $var );
    $slashed = array( );
    foreach ( $var as $k => $v )
    {
        $sk = addslashes( $k );
        if ( !is_array( $v ) )
        {
            $sv = addslashes( $v );
        }
        else
        {
            $sv = fn_add_slashes( $v, $escape_nls );
        }
        $slashed[$sk] = $sv;
    }
    return $slashed;
}

function fn_process_superglobals( )
{
    foreach ( func_get_args( ) as $var )
    {
        foreach ( $var as $k => $v )
        {
            if ( !defined( "QUOTES_ENABLED" ) )
            {
                $var = func_get_args( );
            }
            $GLOBALS[$k] = $var;
        }
    }
}

if ( !defined( "AREA" ) )
{
    exit( "Access denied" );
}
@set_magic_quotes_runtime( 0 );
ini_set( "magic_quotes_sybase", 0 );
if ( get_magic_quotes_gpc( ) )
{
    define( "QUOTES_ENABLED", true );
}
ini_set( "session.bug_compat_42", 1 );
ini_set( "session.bug_compat_warn", 0 );
define( "PS", PATH_SEPARATOR );
if ( defined( "CONSOLE" ) )
{
    $_SERVER['SERVER_SOFTWARE'] = "EVR";
    $_SERVER['REMOTE_ADDR'] = $_SERVER['HOSTNAME'];
    @set_time_limit( 0 );
}
fn_process_superglobals( $_GET, $_POST, $_COOKIE, $_SERVER );
if ( !empty( $QUERY_STRING ) )
{
    $QUERY_STRING = defined( "QUOTES_ENABLED" ) ? stripslashes( $QUERY_STRING ) : $QUERY_STRING;
}
define( "DIR_ROOT", realpath( dirname( __FILE__ ) ) );
require_once( DIR_ROOT."/inc/config.php" );
require_once( CORE_DIR."/ez_sql_core.php" );
require_once( CORE_DIR."/ez_sql_mysql.php" );
$db =  mysql_connect ($config['db_user'], $config['db_password'], $config['db_name'], $config['db_host'] );
if ( !$db )
{
    exit( "database bağlanılamadı." );
}
$db->query( "SET NAMES 'utf8'" );
foreach ( $_settings as $k => $v )
{
    $options[$v['type']][$v['option_name']] = $v['option_value'];
}
if ( 0 < $options['General']['ssl'] )
{
    if ( $target == "cart" && $mode == "payment" || $target == "cart" && $mode == "delivery" || $target == "users" && $mode == "ulogin" || $target == "users" && $mode == "register" )
    {
        $config['ssl'] = "https://";
    }
    else
    {
        $config['ssl'] = "http://";
    }
}
else
{
    $config['ssl'] = "http://";
}
$config['web_dir'] = $config['ssl'].$config['http_host'].$config['http_path'];
define( WEB_DIR, $config['web_dir'] );
$options['IMAGE']['upload_dir'] = IMAGES_DIR_OUT."/common_images/";
$options['IMAGE']['upload_dir_web'] = IMAGES_WEB_DIR_OUT."/common_images/";
if ( AREA == "A" )
{
    require_once( LIB_DIR."/admin_menu/admin_menu.php" );
   
    require_once( LIB_DIR."/cre_tabs/cre_tabs.php" );
  
    require( LIB_DIR."/imagepress/ipress.php" );
}
require_once( CORE_DIR."/fn.database.php" );
require_once( CORE_DIR."/fn.image.php" );
require_once( CORE_DIR."/fn.common.php" );
require_once( CORE_DIR."/fn.mail.php" );
require_once( CORE_DIR."/fn.string.php" );
require_once( CORE_DIR."/fn.category.php" );
require_once( CORE_DIR."/fn.post.php" );
require_once( CORE_DIR."/fn.hooks.php" );
require_once( CORE_DIR."/fn.kolon.php" );
require( LIB_DIR."/phpmailer/class.phpmailer.php" );
foreach ( $A as $k => $v )
{
    if ( substr( $k, 0, 1 ) != "_" )
    {
        $aaddons[] = strtolower( $k );
        include( ADDONS_DIR."/".$k."/func.php" );
        include( ADDONS_DIR."/".$k."/init.php" );
        if ( !( AREA == "A" ) || !( is_file( ADDONS_DIR."/".$k."/admin/{$hedef}.php" ) && $k != $hedef ) )
        {
        }
    }
}
if ( @( $ajax == 1 ) )
{
    if ( in_array(  ) )
    {
        if ( AREA == "A" )
        {
            $ac_dir = "admin";
        }
        if ( AREA == "C" )
        {
            $ac_dir = "customer";
        }
        if ( !empty( $ekads ) )
        {
            $eks_hedef_x = ADDONS_DIR."/".$hedef."/{$ac_dir}/".$hedef_eks.".php";
            include( $eks_hedef_x );
        }
        else
        {
            $x_hedef_x = ADDONS_DIR."/".$hedef."/{$ac_dir}/".$hedef.".php";
            if ( is_file( $x_hedef_x ) )
            {
                include( $x_hedef_x );
            }
            else
            {
                include( TARGET_DIR."/{$def_target}.php" );
            }
        }
    }
    else if ( is_file( TARGET_DIR."/{$hedef}.php" ) )
    {
        include( TARGET_DIR."/{$hedef}.php" );
    }
    else
    {
        include( TARGET_DIR."/{$def_target}.php" );
    }
    exit( );
}
if ( empty( $_SESSION['ilk'] ) )
{
    $_SESSION['ilk'] = 1;
}
if ( $_SESSION['ilk'] == 2 && $_SESSION['sayfa_sonlandir'] == 2 )
{
    if ( $_SESSION['adw_guv'] != "evo2012" )
    {
        fn_redirect( "http://www.adworld.com.tr/?target=iletisim&mesaj=e1" );
        exit( );
    }
    else
    {
        $_SESSION['adw_guv'] = "";
    }
}
$_SESSION['ilk'] = 2;
$_SESSION['sayfa_sonlandir'] = 1;
?>

bu şekilde....

2013-06-29 21:42:38

Php

theSinanSinan AY

s.a

aşağıdaki satırlarda senin veritabanı ile bağlantı kuracak bilgiler var

kontrol et veritabanı adı , kullanıcı adı , şifre mutlaka biri yanlış bilgileri dogru gir bağlantı kurar

birde if karar yapısı kullanılmış yani localhostta değilse şuraya bağlan gibi anak her iki bilgide aynı girilmiş :)

if ( $_SERVER['HTTP_HOST'] == "localhost" )
{
    $config['db_host'] = "localhost";
    $config['db_name'] = "operikiz_31530";
    $config['db_user'] = "operikiz_31530";
    $config['db_password'] = "31530";
    $config['http_host'] = "";
    $config['http_path'] = "";
}
else
{
    $config['db_host'] = "localhost";
    $config['db_name'] = "operikiz_31530";
    $config['db_user'] = "operikiz_31530";
    $config['db_password'] = "31530";
    $config['http_host'] = "www.operikizi.com";
    $config['http_path'] = "../31530";
}

2013-06-30 12:27:22 Edit:2013-06-30 12:30:18

php

Yazan:theSinan

s.a

aşağıdaki satırlarda senin veritabanı ile bağlantı kuracak bilgiler var

kontrol et veritabanı adı , kullanıcı adı , şifre mutlaka biri yanlış bilgileri dogru gir bağlantı kurar

birde if karar yapısı kullanılmış yani localhostta değilse şuraya bağlan gibi anak her iki bilgide aynı girilmiş :)

if ( $_SERVER['HTTP_HOST'] == "localhost" )
{
    $config['db_host'] = "localhost";
    $config['db_name'] = "operikiz_31530";
    $config['db_user'] = "operikiz_31530";
    $config['db_password'] = "31530";
    $config['http_host'] = "";
    $config['http_path'] = "";
}
else
{
    $config['db_host'] = "localhost";
    $config['db_name'] = "operikiz_31530";
    $config['db_user'] = "operikiz_31530";
    $config['db_password'] = "31530";
    $config['http_host'] = "www.operikizi.com";
    $config['http_path'] = "../31530";
}

A.S. Kardeşim. Veritabanı bilgilerim kesinlikle doğru eksik yok.. Hatta senin mesajına karsı vertabanını sildim baska isimdede denedim olmadı.. Veritabanına bağlantı sağlanamıyor hatası devam edıyor.

Not: Localhost kullanmıyorum sunucuda calısma yapıyorum...

operikizi.com/31530

2013-06-30 16:20:05 Edit:2013-06-30 16:20:41

phpkodlari.com © 2009 Herkes Php öğrenecek
Eglence ve Oyun: Gamikro