Migration from local host to heztner server.
Migration from local host to heztner server.
HI, everything works fine on my xampp localhost sever, and i am now trasfering all files and database to heztner hosting server.
I get this error on my server processing file.
'''
<?php
session_start();
//include 'ChromePhp.php';
// ChromePhp::log('setData!');
echo "Setdata";
@$CompanyId = $_SESSION['ADASOFTCLIENT_CompanyId'];
@$username = $_SESSION['ADASOFTCLIENT_username'];
@$usersurname = $_SESSION['ADASOFTCLIENT_userSurname'];
@$loggedin = $_SESSION['ADASOFTCLIENT_loggedin'];
@$CompanyId = $CompanyId."_stock";
@$CompanyId = strtolower($CompanyId);
//------------check Loggin----//
if(isset($username) && isset($loggedin) && isset($CompanyId)){
echo "logged in";
// ChromePhp::log('Logged In!');
}else{
header('Location:login.php');
}
//ChromePhp::log($CompanyId );
include( "./php/DataTables.php" );
// Alias Editor classes so they are easy to use
use
DataTables\Editor,
DataTables\Editor\Field,
DataTables\Editor\Format,
DataTables\Editor\Join,
DataTables\Editor\Upload,
DataTables\Editor\Validate;
// Build our Editor instance and process the data coming from _POST
Editor::inst( $db, $CompanyId)
->fields(
Field::inst( 'id' ),
Field::inst( 'locked' ),
Field::inst( 'DOS' ),
Field::inst( 'StockNr') ->validator( 'Validate::notEmpty' )
->validator(function ($val){
$servername = ".....";
$username = "....";
$password = "....";
$dbname = "....";
$conn = new PDO("mysql:host=$servername;dbname=$dbname", $username, $password);
$conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
$sql = "SELECT StockNr FROM ".$_SESSION['ADASOFTCLIENT_CompanyId']."_stock WHERE (StockNr = '".$val."')";
$result = $conn->query($sql);
$return = $result->fetchColumn();
if($return){
return ("Stock Number:".$return." has been reseved.");
}else{
return true;
}
} ),
Field::inst('MMCODE')->validator( 'Validate::numeric' ),
Field::inst( 'MODEL' ),
Field::inst( 'MAKE' ),
Field::inst( 'TYPE' ),
Field::inst( 'SellingPrice' ),
Field::inst( 'IntroDate' ),
Field::inst( 'NewListPrice' ),
Field::inst( 'YEAR' ),
Field::inst( 'DYOS' ),
Field::inst( 'REGNR' )->validator( 'Validate::notEmpty' ),
Field::inst( 'OLDREG' ),
Field::inst( 'NatisNr' ),
Field::inst( 'NNRNEW' ),
Field::inst( 'COLOUR' ),
Field::inst( 'REG_MONTH' ),
Field::inst( 'CAPACITY' ),
Field::inst( 'VEHICLE_CONDITION' ),
Field::inst( 'KILOS' ),
Field::inst( 'KG' ),
Field::inst( 'CLASSIFICATION' ),
Field::inst( 'CHASSISNR' ),
Field::inst( 'VIN_NO' ),
Field::inst( 'ENGINENR' ),
Field::inst( 'COST' ),
Field::inst( 'OA' ),
Field::inst( 'STIP' ),
Field::inst( 'TRECON' ),
Field::inst( 'DLRC' ),
Field::inst( 'PERC_OF_TRADE' ),
Field::inst( 'TCOST' ),
Field::inst( 'MM_TRADE_VALUE' ),
Field::inst( 'MM_RETAIL_VALUE' ),
Field::inst( 'MM_DOR' ),
Field::inst( 'Estimated_Trade_Price' ),
Field::inst( 'Estimated_Retail_Price' ),
Field::inst( 'Res_Value' ),
Field::inst( 'stock_status' ),
Field::inst( 'SuppCode' )
)
->process( $_POST )
->json();
'''
this is the error..
Warning: require(/usr/www/users/adasac/php/Database/Driver/Mysql/Query.php): failed to open stream: No such file or directory in /usr/www/users/adasac/php/Bootstrap.php on line 52 Fatal error: require(): Failed opening required '/usr/www/users/adasac/php/Database/Driver/Mysql/Query.php' (include_path='.:/usr/share/php:/usr/share/pear') in /usr/www/users/adasac/php/Bootstrap.php on line 52
This question has accepted answers - jump to:
Answers
updating to the latest version of editor seems to have fixed it..
Great to hear - thanks for posting back.
Allan