I'm having a lot of trouble with my xampp
, some time I've been trying to add anything to the mysql
database but I'm not successful in my attempts.
In% of PHP, the following lines are described:
[Sat Feb 13 01: 31: 07.052501 2016] [mpm_winnt: notice] [pid 2604: tid 468] AH00455: Apache / 2.4.18 (Win32) OpenSSL / 1.0.2e PHP / 7.0.1 configured - resuming normal operations
[Sat Feb 13 01: 31: 07.052501 2016] [mpm_winnt: notice] [pid 2604: tid 468] AH00456: Apache Lounge VC14 Server built: Dec 9 2015 10:17:39
AH00094: Command line: 'c: \ xampp \ apache \ bin \ httpd.exe -d C: / xampp [db2: / apache '[Sat Feb 13 01: 31: 07.064486 2016] [mpm_winnt: notice] [pid 2604: tid 468] AH00418: Parent: Created child process 6052
[ssl: warn] [pid 6052: tid 116] AH01909: www.example.com:443:01 server certificate does NOT include an ID which matches the server name
[ssl: warn] [pid 6052: tid 116] AH01909: www.example.com:443:01 server certificate does NOT include an ID which matches the server name
[Sat Feb 13 01: 31: 09.562545 2016] [mpm_winnt: notice] [pid 6052: tid 116] AH00354: Child: Starting 150 worker threads.
I'm making a simple error.log
as follows:
try {
$campos = array();
$campos[':TXT_NOMEX_BANNE'] = $targetFile;
$campos[':pesso'] = '1'; //$suc->$COD_IDENT_USUAR();
$sql = "INSERT INTO tbl_banner ('TXT_NOMEX_BANNE', 'COD_ULTIM_ATUAL', 'DAT_ULTIM_ATUAL') VALUES (:TXT_NOMEX_BANNE, :pesso, now())";
$conexao = new ConexaoDatabase();
$conexao->save($sql, $campos);
move_uploaded_file($tempFile, $targetFile);
} catch (Exception $e) {
die('ERRO AO ATUALIZAR BANCO DE DADOS');
error_log($e->getMessage());
}
My folder structure is as follows:
|includes
|--conexao.php
|--suc_validacao.php
|paginas
|--upload.php
And I'm giving an include as follows:
include '../includes/suc_validacao.php';
include '../includes/conexao.php';
In insert
I have a conexao.php
function, and it calls another function. Both described below:
public function save($sql, array $data) {
$con = self::getConnection();
$stmt = $con->prepare($sql);
$this->execute($stmt, $data);
if ($stmt->rowCount()) {
return true;
} else {
return false;
}
}
public function execute(PDOStatement $stmt, array $data = null) {
try {
if (isset($data)) {
$stmt->execute($data);
} else {
$stmt->execute();
}
return true;
} catch (PDOException $exc) {
if (isset($_SESSION['suc'])) {
return false;
}
}
If you have anything else to add, but I tried to do a lot of things, including reinstalling save
, redo xampp
, and more. Nothing worked, I already looked for something on the internet about the error, but I also did not find anything about it.
I would love help solving this problem.