Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Add variable to apache and php handlers

Discussion in 'General Discussion' started by Marcelo Bonilla, Dec 28, 2017.

  1. Marcelo Bonilla

    Marcelo Bonilla Registered

    Joined:
    Dec 28, 2017
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Uruguay
    cPanel Access Level:
    Root Administrator
    Add variable to apache and php handlers

    $_SERVER ?
    PHP_AUTH_USER
    PHP_AUTH_PW
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    41,502
    Likes Received:
    1,616
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
  3. Marcelo Bonilla

    Marcelo Bonilla Registered

    Joined:
    Dec 28, 2017
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Uruguay
    cPanel Access Level:
    Root Administrator
    I did not work
     
  4. Marcelo Bonilla

    Marcelo Bonilla Registered

    Joined:
    Dec 28, 2017
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Uruguay
    cPanel Access Level:
    Root Administrator
    error_log
    PHP Strict Standards: Only variables should be assigned by reference in /home/cronos/public_html/engine/connect_core.php on line 29
     
  5. Marcelo Bonilla

    Marcelo Bonilla Registered

    Joined:
    Dec 28, 2017
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Uruguay
    cPanel Access Level:
    Root Administrator
    PHP:
    <?
    //Check ADODB version, 5.09 or late
    if(_ADODB_VERSION '5.09'){
        print (
    'Invalid ADODB version.');
        exit;
    }
    if(
    $core['connection_type'] == "ODBC"){
        
    $core_db = &ADONewConnection('odbc');
        if(
    $core['debug'] == 1){ $core_db->debug true; }
        
    $core_db_connect_sql $core_db->Connect($core['db_name'],$core['db_user'],$core['db_password'],$core['db_host']);
        if(!
    $core_db_connect_sql){
            
    $sql_part '1';
            include(
    'error_templates/sql_error.php');
            exit;
        }
        
    $core_db2 $core_db;
        if(
    $core['server_use_2_db'] == "1"){
            
    $core_db2 = &ADONewConnection('odbc');
            if(
    $core['debug'] == 1){ $core_db2->debug true; }
            
    $core_db_connect_sql2 $core_db2->NConnect($core['db_name2'],$core['db_user2'],$core['db_password2'],$core['db_host2']);
            if(!
    $core_db_connect_sql2){
                
    $sql_part '2';
                include(
    'error_templates/sql_error.php');
                exit;
            }
            
    $core_db2 $core_db2;
        }
    }elseif (
    $core['connection_type'] == "MSSQL"){
        
    $core_db = &ADONewConnection('mssql'); // LINE 29
        
    if($core['debug'] == 1){ $core_db->debug true; }
        
    $core_db_connect_sql $core_db->Connect($core['db_host'],$core['db_user'],$core['db_password'],$core['db_name']);
        if(!
    $core_db_connect_sql){
            
    $sql_part '1';
            include(
    'error_templates/sql_error.php');
            exit;
        }
        
    $core_db2 $core_db;
        if(
    $core['server_use_2_db'] == "1"){
            
    $core_db2 = &ADONewConnection('mssql');
            if(
    $core['debug'] == 1){ $core_db2->debug true; }
            
    $core_db_connect_sql2 $core_db2->NConnect($core['db_host2'],$core['db_user2'],$core['db_password2'],$core['db_name2']);
            if(!
    $core_db_connect_sql2){
                
    $sql_part '2';
                include(
    'error_templates/sql_error.php');
                exit;
            }
            
    $core_db2 $core_db2;
        }
    }

    ?>
     
  6. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    41,502
    Likes Received:
    1,616
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    This looks to be a PHP coding issue as opposed to an issue with the cPanel & WHM software. You will likely receive more user-feedback to this type of question on a website such as StackOverflow. EX:

    Strict Standards: Only variables should be assigned by reference in ADONewConnection
    Why are $_SERVER["PHP_AUTH_USER"] and $_SERVER["PHP_AUTH_PW"] not set?

    Thank you.
     
Loading...

Share This Page