This question already has answers here:
Why does this PDO statement silently fail?
(2 answers)
Closed 6 years ago.
Mysql seems not inserting in my table even if there is no error displayed, I even used
error_reporting(E_ALL);
ini_set('display_errors', '1');
but it always dosent return anything, there is my code:
the connexion file
<?php
class Connexion
{
public static function cnx()
{
try{
$db=new PDO('mysql:host=localhost;dbname=championship','root','');
return $db;
}
catch(Exception $e){
die('Erreur :'.$e->getMessage());
}
}
}
?>
the main file
<?php
session_start();
include_once("../cnx.php");
include_once('theme.php');
include_once('criteria.php');
$num_rows=Criteria::countCriteria();
$id_theme=$_GET['id_theme'];
for ($i = 1; ; $i++) {
if ($i > $num_rows) {
break;
}
Criteria::saveScoreByCriteria($_SESSION['user']['id'],$i,$_POST["mark_criteria$i"],$_POST["comment_criteria$i"],$id_theme);
}
Theme::saveJudgeScore($id_theme,$_SESSION['user']['id'],$_POST["judge_general_comment"]);
header("location:list_theme.php");
?>
and this the function
saveScoreByCriteria($id_judge,$id_criteria,$mark,$comment,$id_theme)
<?php
public static function saveScoreByCriteria($id_judge,$id_criteria,$mark,$comment,$id_theme)
{
$cnx=new Connexion();
$db=$cnx->cnx();
$req=$db->prepare("INSERT INTO `judge_criteria`( `id_judge`, `id_criteria`, `mark`, `comment`, `id_theme`) values (:id_judge,:id_criteria,:mark,:comment,:id_theme)");
$req->execute(array(':id_judge'=>$id_judge,':id_criteria'=>$id_criteria,':mark'=>$mark,':comment'=>$comment,':id_theme'=>$id_theme));
}
?>
Hope that somebody could help me!
thanks.
here is the complete error log file
[Thu Oct 06 08:31:40.250444 2016] [mpm_winnt:notice] [pid 7872:tid 292] AH00428: Parent: child process 5128 exited with status 1073807364 -- Restarting.
[Thu Oct 06 08:35:32.354324 2016] [ssl:warn] [pid 5572:tid 296] AH01909: RSA certificate configured for www.example.com:443 does NOT include an ID which matches the server name
[Thu Oct 06 08:35:32.619524 2016] [core:warn] [pid 5572:tid 296] AH00098: pid file C:/xampp/apache/logs/httpd.pid overwritten -- Unclean shutdown of previous Apache run?
[Thu Oct 06 08:35:33.274725 2016] [ssl:warn] [pid 5572:tid 296] AH01909: RSA certificate configured for www.example.com:443 does NOT include an ID which matches the server name
[Thu Oct 06 08:35:36.925132 2016] [mpm_winnt:notice] [pid 5572:tid 296] AH00455: Apache/2.4.7 (Win32) OpenSSL/1.0.1e PHP/5.5.9 configured -- resuming normal operations
[Thu Oct 06 08:35:36.925132 2016] [mpm_winnt:notice] [pid 5572:tid 296] AH00456: Apache Lounge VC11 Server built: Nov 21 2013 20:13:01
[Thu Oct 06 08:35:36.925132 2016] [core:notice] [pid 5572:tid 296] AH00094: Command line: 'c:\\xampp\\apache\\bin\\httpd.exe -d C:/xampp/apache'
[Thu Oct 06 08:35:36.956332 2016] [mpm_winnt:notice] [pid 5572:tid 296] AH00418: Parent: Created child process 4244
[Thu Oct 06 08:35:38.251134 2016] [ssl:warn] [pid 4244:tid 308] AH01909: RSA certificate configured for www.example.com:443 does NOT include an ID which matches the server name
[Thu Oct 06 08:35:39.093535 2016] [ssl:warn] [pid 4244:tid 308] AH01909: RSA certificate configured for www.example.com:443 does NOT include an ID which matches the server name
[Thu Oct 06 08:35:39.171535 2016] [mpm_winnt:notice] [pid 4244:tid 308] AH00354: Child: Starting 150 worker threads.
[Thu Oct 06 14:06:00.652885 2016] [mpm_winnt:notice] [pid 5572:tid 296] AH00428: Parent: child process 4244 exited with status 1073807364 -- Restarting.
[Thu Oct 06 14:21:10.787495 2016] [ssl:warn] [pid 1200:tid 296] AH01909: RSA certificate configured for www.example.com:443 does NOT include an ID which matches the server name
[Thu Oct 06 14:21:10.959095 2016] [core:warn] [pid 1200:tid 296] AH00098: pid file C:/xampp/apache/logs/httpd.pid overwritten -- Unclean shutdown of previous Apache run?
[Thu Oct 06 14:21:11.473896 2016] [ssl:warn] [pid 1200:tid 296] AH01909: RSA certificate configured for www.example.com:443 does NOT include an ID which matches the server name
[Thu Oct 06 14:21:14.709503 2016] [mpm_winnt:notice] [pid 1200:tid 296] AH00455: Apache/2.4.7 (Win32) OpenSSL/1.0.1e PHP/5.5.9 configured -- resuming normal operations
[Thu Oct 06 14:21:14.709503 2016] [mpm_winnt:notice] [pid 1200:tid 296] AH00456: Apache Lounge VC11 Server built: Nov 21 2013 20:13:01
[Thu Oct 06 14:21:14.709503 2016] [core:notice] [pid 1200:tid 296] AH00094: Command line: 'c:\\xampp\\apache\\bin\\httpd.exe -d C:/xampp/apache'
[Thu Oct 06 14:21:14.740703 2016] [mpm_winnt:notice] [pid 1200:tid 296] AH00418: Parent: Created child process 648
[Thu Oct 06 14:21:16.581506 2016] [ssl:warn] [pid 648:tid 308] AH01909: RSA certificate configured for www.example.com:443 does NOT include an ID which matches the server name
[Thu Oct 06 14:21:17.252307 2016] [ssl:warn] [pid 648:tid 308] AH01909: RSA certificate configured for www.example.com:443 does NOT include an ID which matches the server name
[Thu Oct 06 14:21:17.314707 2016] [mpm_winnt:notice] [pid 648:tid 308] AH00354: Child: Starting 150 worker threads.
This line may be causing you the problem, using static method on non static manner
$db = $cnx->cnx();
Use this instead
$db = Connexion::cnx();
Whenever i put session_start(); to my php code my site won't load anymore. I'm running xampp on windows server 2012. I tested same php code on my local machines xampp and it did work so I guess there is something wrong with my server. When I try to connect to my page I get following errors in apache error.log
[Thu Jan 28 13:20:26.764131 2016] [mpm_winnt:notice] [pid 1296:tid 412] AH00428: Parent: child process 2900 exited with status 255 -- Restarting.
[Thu Jan 28 13:20:28.043237 2016] [ssl:warn] [pid 1296:tid 412] AH01909: 192.168.0.14:443:0 server certificate does NOT include an ID which matches the server name
[Thu Jan 28 13:20:28.323966 2016] [mpm_winnt:notice] [pid 1296:tid 412] AH00455: Apache/2.4.18 (Win32) OpenSSL/1.0.2e PHP/7.0.1 configured -- resuming normal operations
[Thu Jan 28 13:20:28.323966 2016] [mpm_winnt:notice] [pid 1296:tid 412] AH00456: Apache Lounge VC14 Server built: Dec 9 2015 10:17:39
[Thu Jan 28 13:20:28.323966 2016] [core:notice] [pid 1296:tid 412] AH00094: Command line: 'D:\xampp\apache\bin\httpd.exe -d D:/XAMPP/apache'
[Thu Jan 28 13:20:28.323966 2016] [mpm_winnt:notice] [pid 1296:tid 412] AH00418: Parent: Created child process 3292
[Thu Jan 28 13:20:28.838770 2016] [ssl:warn] [pid 3292:tid 324] AH01909: 192.168.0.14:443:0 server certificate does NOT include an ID which matches the server name
[Thu Jan 28 13:20:29.025972 2016] [ssl:warn] [pid 3292:tid 324] AH01909: 192.168.0.14:443:0 server certificate does NOT include an ID which matches the server name
[Thu Jan 28 13:20:29.104269 2016] [mpm_winnt:notice] [pid 3292:tid 324] AH00354: Child: Starting 150 worker threads.
[Thu Jan 28 13:20:29.275575 2016] [mpm_winnt:notice] [pid 1296:tid 412] AH00428: Parent: child process 3292 exited with status 255 -- Restarting.
[Thu Jan 28 13:20:29.712379 2016] [ssl:warn] [pid 1296:tid 412] AH01909: 192.168.0.14:443:0 server certificate does NOT include an ID which matches the server name
[Thu Jan 28 13:20:29.759179 2016] [mpm_winnt:notice] [pid 1296:tid 412] AH00455: Apache/2.4.18 (Win32) OpenSSL/1.0.2e PHP/7.0.1 configured -- resuming normal operations
[Thu Jan 28 13:20:29.759179 2016] [mpm_winnt:notice] [pid 1296:tid 412] AH00456: Apache Lounge VC14 Server built: Dec 9 2015 10:17:39
[Thu Jan 28 13:20:29.759179 2016] [core:notice] [pid 1296:tid 412] AH00094: Command line: 'D:\xampp\apache\bin\httpd.exe -d D:/XAMPP/apache'
[Thu Jan 28 13:20:29.759179 2016] [mpm_winnt:notice] [pid 1296:tid 412] AH00418: Parent: Created child process 2964
[Thu Jan 28 13:20:30.211582 2016] [ssl:warn] [pid 2964:tid 328] AH01909: 192.168.0.14:443:0 server certificate does NOT include an ID which matches the server name
[Thu Jan 28 13:20:30.383184 2016] [ssl:warn] [pid 2964:tid 328] AH01909: 192.168.0.14:443:0 server certificate does NOT include an ID which matches the server name
[Thu Jan 28 13:20:30.414387 2016] [mpm_winnt:notice] [pid 2964:tid 328] AH00354: Child: Starting 150 worker threads.
I am using Xampp for developing a web using php and MySQL. I am new in this and when I am starting the admin of my Apache and MySQL it gives me an error i.e.
[Fiddler] The socket connection to localhost failed.
ErrorCode: 10061.
No connection could be made because the target machine actively refused it 127.0.0.1:80
How can I fix this error?
my error log is
[Wed Jun 24 01:02:56.435415 2015] [ssl:warn] [pid 2460:tid 388] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
[Wed Jun 24 01:02:56.872940 2015] [ssl:warn] [pid 2460:tid 388] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
[Wed Jun 24 01:02:56.966694 2015] [mpm_winnt:notice] [pid 2460:tid 388] AH00455: Apache/2.4.12 (Win32) OpenSSL/1.0.1l PHP/5.5.24 configured -- resuming normal operations
[Wed Jun 24 01:02:56.966694 2015] [mpm_winnt:notice] [pid 2460:tid 388] AH00456: Apache Lounge VC11 Server built: Jan 28 2015 16:48:40
[Wed Jun 24 01:02:56.966694 2015] [core:notice] [pid 2460:tid 388] AH00094: Command line: 'C:\\xampp\\apache\\bin\\httpd.exe -d C:/xampp/apache'
[Wed Jun 24 01:02:56.997952 2015] [mpm_winnt:notice] [pid 2460:tid 388] AH00418: Parent: Created child process 2816
Apache server shutdown initiated...
sl:warn] [pid 2816:tid 396] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
[Wed Jun 24 01:02:59.326174 2015] [ssl:warn] [pid 2816:tid 396] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
[Wed Jun 24 01:02:59.654315 2015] [mpm_winnt:notice] [pid 2816:tid 396] AH00354: Child: Starting 150 worker threads.
[Wed Jun 24 01:08:02.534498 2015] [ssl:warn] [pid 1396:tid 408] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
[Wed Jun 24 01:08:02.675145 2015] [core:warn] [pid 1396:tid 408] AH00098: pid file C:/xampp/apache/logs/httpd.pid overwritten -- Unclean shutdown of previous Apache run?
[Wed Jun 24 01:08:02.862638 2015] [ssl:warn] [pid 1396:tid 408] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
[Wed Jun 24 01:08:02.940762 2015] [mpm_winnt:notice] [pid 1396:tid 408] AH00455: Apache/2.4.12 (Win32) OpenSSL/1.0.1l PHP/5.5.24 configured -- resuming normal operations
[Wed Jun 24 01:08:02.940762 2015] [mpm_winnt:notice] [pid 1396:tid 408] AH00456: Apache Lounge VC11 Server built: Jan 28 2015 16:48:40
[Wed Jun 24 01:08:02.940762 2015] [core:notice] [pid 1396:tid 408] AH00094: Command line: 'c:\\xampp\\apache\\bin\\httpd.exe -d C:/xampp/apache'
[Wed Jun 24 01:08:02.987647 2015] [mpm_winnt:notice] [pid 1396:tid 408] AH00418: Parent: Created child process 3988
[Wed Jun 24 01:08:05.237745 2015] [ssl:warn] [pid 3988:tid 412] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
[Wed Jun 24 01:08:05.612764 2015] [ssl:warn] [pid 3988:tid 412] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
[Wed Jun 24 01:08:05.706523 2015] [mpm_winnt:notice] [pid 3988:tid 412] AH00354: Child: Starting 150 worker threads.
[Wed Jun 24 01:31:46.976420 2015] [mpm_winnt:notice] [pid 2460:tid 388] AH00422: Parent: Received shutdown signal -- Shutting down the server.
[Wed Jun 24 01:31:49.007777 2015] [mpm_winnt:notice] [pid 2816:tid 396] AH00364: Child: All worker threads have exited.
[Wed Jun 24 01:31:49.648419 2015] [mpm_winnt:notice] [pid 2460:tid 388] AH00430: Parent: Child process 2816 exited successfully.
[Wed Jun 24 11:40:07.275528 2015] [ssl:warn] [pid 2984:tid 396] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
[Wed Jun 24 11:40:07.619288 2015] [ssl:warn] [pid 2984:tid 396] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
[Wed Jun 24 11:40:09.650651 2015] [mpm_winnt:notice] [pid 2984:tid 396] AH00455: Apache/2.4.12 (Win32) OpenSSL/1.0.1l PHP/5.5.24 configured -- resuming normal operations
[Wed Jun 24 11:40:09.650651 2015] [mpm_winnt:notice] [pid 2984:tid 396] AH00456: Apache Lounge VC11 Server built: Jan 28 2015 16:48:40
[Wed Jun 24 11:40:09.650651 2015] [core:notice] [pid 2984:tid 396] AH00094: Command line: 'c:\\xampp\\apache\\bin\\httpd.exe -d C:/xampp/apache'
[Wed Jun 24 11:40:09.666277 2015] [mpm_winnt:notice] [pid 2984:tid 396] AH00418: Parent: Created child process 1392
[Wed Jun 24 11:40:11.400745 2015] [ssl:warn] [pid 1392:tid 396] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
[Wed Jun 24 11:40:11.682008 2015] [ssl:warn] [pid 1392:tid 396] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
[Wed Jun 24 11:40:11.807018 2015] [mpm_winnt:notice] [pid 1392:tid 396] AH00354: Child: Starting 150 worker threads.
I have been developing an application using Laravel 5 with XAMPP without any problem for the past 2 weeks. All of a sudden I have encountered a problem. Apache restarts itself whenever I try to open the Application. I have an application using Laravel 4.2 and it is running seamlessly. So does other applications with no framework.
here is my apache_error log
[Mon Apr 13 11:17:55.124340 2015] [ssl:warn] [pid 244:tid 232] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
[Mon Apr 13 11:17:56.553187 2015] [ssl:warn] [pid 244:tid 232] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
[Mon Apr 13 11:17:56.990707 2015] [mpm_winnt:notice] [pid 244:tid 232] AH00354: Child: Starting 150 worker threads.
[Mon Apr 13 11:19:24.202850 2015] [mpm_winnt:notice] [pid 2660:tid 260] AH00428: Parent: child process 244 exited with status 3221225725 -- Restarting.
[Mon Apr 13 11:19:26.188766 2015] [ssl:warn] [pid 2660:tid 260] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
[Mon Apr 13 11:19:26.427117 2015] [mpm_winnt:notice] [pid 2660:tid 260] AH00455: Apache/2.4.10 (Win32) OpenSSL/1.0.1i PHP/5.6.3 configured -- resuming normal operations
[Mon Apr 13 11:19:26.427117 2015] [mpm_winnt:notice] [pid 2660:tid 260] AH00456: Apache Lounge VC11 Server built: Jul 17 2014 11:50:08
[Mon Apr 13 11:19:26.428120 2015] [core:notice] [pid 2660:tid 260] AH00094: Command line: 'c:\\xampp\\apache\\bin\\httpd.exe -d C:/xampp/apache'
[Mon Apr 13 11:19:26.812682 2015] [mpm_winnt:notice] [pid 2660:tid 260] AH00418: Parent: Created child process 6196
How do I troubleshoot this?
Note: this thread and this didn't solve my problem.
Having a problem trying to install XAMPP on my Windows 7 machine. Essentially when I start apache and mysql the xampp index page (localhost) works fine. In my local file directory I have tried this:
In:
C:\xampp\htdocs
I've created a file called 'test.php' then in the Web Browser I have tried localhost/test.php
and I get the 'Object not found!' error.
I have tried creating a directory called:
C:\xampp\htdocs\oop
then added a index file:
C:\xampp\htdocs\oop\index.php
and in the Web Browser tried 'localhost/oop' and 'localhost/oop/index.php' but am receiving the same error.
My error log is:
[Sat Apr 19 22:09:09.742135 2014] [ssl:warn] [pid 3508:tid 260] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
[Sat Apr 19 22:09:10.248164 2014] [ssl:warn] [pid 3508:tid 260] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
[Sat Apr 19 22:09:10.346169 2014] [mpm_winnt:notice] [pid 3508:tid 260] AH00455: Apache/2.4.9 (Win32) OpenSSL/0.9.8y PHP/5.4.27 configured -- resuming normal operations
[Sat Apr 19 22:09:10.346169 2014] [mpm_winnt:notice] [pid 3508:tid 260] AH00456: Apache Lounge VC10 Server built: Mar 17 2014 11:15:11
[Sat Apr 19 22:09:10.346169 2014] [core:notice] [pid 3508:tid 260] AH00094: Command line: 'c:\\xampp\\apache\\bin\\httpd.exe -d C:/xampp/apache'
[Sat Apr 19 22:09:10.365170 2014] [mpm_winnt:notice] [pid 3508:tid 260] AH00418: Parent: Created child process 2692
[Sat Apr 19 22:09:11.325225 2014] [ssl:warn] [pid 2692:tid 272] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
[Sat Apr 19 22:09:11.687246 2014] [ssl:warn] [pid 2692:tid 272] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
[Sat Apr 19 22:09:11.734249 2014] [mpm_winnt:notice] [pid 2692:tid 272] AH00354: Child: Starting 150 worker threads.
[Sat Apr 19 22:14:57.151005 2014] [ssl:warn] [pid 5348:tid 260] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
[Sat Apr 19 22:14:57.207008 2014] [core:warn] [pid 5348:tid 260] AH00098: pid file C:/xampp/apache/logs/httpd.pid overwritten -- Unclean shutdown of previous Apache run?
[Sat Apr 19 22:14:57.461023 2014] [ssl:warn] [pid 5348:tid 260] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
[Sat Apr 19 22:14:57.514026 2014] [mpm_winnt:notice] [pid 5348:tid 260] AH00455: Apache/2.4.9 (Win32) OpenSSL/0.9.8y PHP/5.4.27 configured -- resuming normal operations
[Sat Apr 19 22:14:57.514026 2014] [mpm_winnt:notice] [pid 5348:tid 260] AH00456: Apache Lounge VC10 Server built: Mar 17 2014 11:15:11
[Sat Apr 19 22:14:57.514026 2014] [core:notice] [pid 5348:tid 260] AH00094: Command line: 'c:\\xampp\\apache\\bin\\httpd.exe -d C:/xampp/apache'
[Sat Apr 19 22:14:57.517026 2014] [mpm_winnt:notice] [pid 5348:tid 260] AH00418: Parent: Created child process 2356
[Sat Apr 19 22:14:58.340073 2014] [ssl:warn] [pid 2356:tid 272] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
[Sat Apr 19 22:14:58.659092 2014] [ssl:warn] [pid 2356:tid 272] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
[Sat Apr 19 22:14:58.717095 2014] [mpm_winnt:notice] [pid 2356:tid 272] AH00354: Child: Starting 150 worker threads.
Other things which I've tried:
In the httpd.conf file I have changed the 'Listen 80' to 'Listen 1337' (Skype is also turned off) but it doesn't resolve anything.
I have also looked at the Documentroot and it seems fine:
DocumentRoot "C:/xampp/htdocs"
<Directory "C:/xampp/htdocs">
I've tried:
DocumentRoot "C:\xampp\htdocs"
<Directory "C:\xampp\htdocs">
But the same problem.
I'm new to using XAMPP and configuring it so any help is much appreciated.
Thanks.
Try to put that test.php file in a folder (eg.demo) inside htdocs and then try to browse
http://localhost/demo/test.php
hope this would help you.
Look into your /etc/httpd.conf file and check if you have Virtual hosts activated.
I you have it activated, check your etc/extra/httpd-vhosts.conf file. You might have set up a VirtualHost already.