Bonjour à tous !
Mon site est presque terminé, après avoir franchi bcp d'obstacles, j'en suis maintenant à la mise à jour de mes bases visiteurs, mais le mur me semble un peu haut !
En effet, bien que le mysqli_connect soit accepté, je n'arrive pas à accéder à ma base visiteurs.
Par ailleurs je n'ai pas réussi à récupérer ni mysql_error() ni mysql_errno() qui sont désespérément vides (ceci expliquant la dernière erreur dans APACHE ERROR LOG).
Je vous donne les instructions qui posent problème, ainsi que les résultats dans MYSQL LOG et APACHE ERROR LOG.
Cela provient fort probablement de la config WAMP que je ne maîtrise pas du tout...
D'avance merci.
<?php
$today = date("Y-m-d") ;
$link = mysqli_connect('localhost', 'root') ;
if ( ! $link ) { $check = 'SGBDD indisponible' ; goto compte_rendu ; }
if ( ! mysqli_select_db( $link, 'visiteurs' ) )
{ $check = 'Base Visiteurs inaccessible' ; goto fermer ; }
#-----------------------------------------------------------------------------
# entre-deux, il y a tout mon code de mise à jour du SGBDD
#-----------------------------------------------------------------------------
fermer:
mysqli_close($link);
compte_rendu:
echo $check . " - " . mysqli_error($link) ;
?>
Résultat dans APACHE ERROR LOG :
--------------------------------
[Thu May 09 17:34:12 2013]
[client 127.0.0.1] File does not exist: C:/apache2, referer: http://localhost/tests/
[Thu May 09 17:34:12 2013]
[client 127.0.0.1] File does not exist: C:/apache2, referer: http://localhost/tests/
[Thu May 09 17:34:12 2013]
[client 127.0.0.1] File does not exist: C:/apache2, referer: http://localhost/tests/
[Thu May 09 17:34:12 2013]
[client 127.0.0.1] File does not exist: C:/apache2, referer: http://localhost/tests/
[Thu May 09 17:34:12 2013]
[client 127.0.0.1] File does not exist: C:/apache2, referer: http://localhost/tests/
[Thu May 09 17:34:12 2013]
[client 127.0.0.1] File does not exist: C:/wamp/www/favicon.ico
[Thu May 09 17:34:17 2013]
[client 127.0.0.1] File does not exist: C:/wamp/www/favicon.ico
[Thu May 09 17:35:02 2013]
[client 127.0.0.1] PHP Warning: mysqli_error() [<a href='function.mysqli-error'>function.mysqli-error</a>]: Couldn't fetch mysqli in C:\\wamp\\www\\tests\\misajour.php on line 53, referer: http://localhost/tests/formulaire.php
[Thu May 09 17:35:02 2013]
[client 127.0.0.1] PHP Stack trace:, referer: http://localhost/tests/formulaire.php
[Thu May 09 17:35:02 2013]
[client 127.0.0.1] PHP 1. {main}() C:\\wamp\\www\\tests\\traitement.php:0, referer: http://localhost/tests/formulaire.php
[Thu May 09 17:35:02 2013]
[client 127.0.0.1] PHP 2. include() C:\\wamp\\www\\tests\\traitement.php:40, referer: http://localhost/tests/formulaire.php
[Thu May 09 17:35:02 2013]
[client 127.0.0.1] PHP 3. mysqli_error() C:\\wamp\\www\\tests\\misajour.php:53, referer: http://localhost/tests/formulaire.php
Résultat dans MYSQL LOG :
-------------------------
130508 20:01:19 [Note] Plugin 'FEDERATED' is disabled.
130508 20:01:19 InnoDB: The InnoDB memory heap is disabled
130508 20:01:19 InnoDB: Mutexes and rw_locks use Windows interlocked functions
130508 20:01:19 InnoDB: Compressed tables use zlib 1.2.3
130508 20:01:19 InnoDB: Initializing buffer pool, size = 128.0M
130508 20:01:19 InnoDB: Completed initialization of buffer pool
130508 20:01:19 InnoDB: highest supported file format is Barracuda.
130508 20:01:20 InnoDB: Waiting for the background threads to start
130508 20:01:21 InnoDB: 1.1.8 started; log sequence number 2161259
130508 20:01:21 [Note] Server hostname (bind-address): '(null)'; port: 3306
130508 20:01:21 [Note] - '(null)' resolves to '::';
130508 20:01:21 [Note] - '(null)' resolves to '0.0.0.0';
130508 20:01:21 [Note] Server socket created on IP: '0.0.0.0'.
130508 20:01:21 [Note] Event Scheduler: Loaded 0 events
130508 20:01:21 [Note] wampmysqld: ready for connections.
Version: '5.5.24-log' socket: '' port: 3306 MySQL Community Server (GPL)
130509 0:18:30 [Note] wampmysqld: Normal shutdown
Mon site est presque terminé, après avoir franchi bcp d'obstacles, j'en suis maintenant à la mise à jour de mes bases visiteurs, mais le mur me semble un peu haut !
En effet, bien que le mysqli_connect soit accepté, je n'arrive pas à accéder à ma base visiteurs.
Par ailleurs je n'ai pas réussi à récupérer ni mysql_error() ni mysql_errno() qui sont désespérément vides (ceci expliquant la dernière erreur dans APACHE ERROR LOG).
Je vous donne les instructions qui posent problème, ainsi que les résultats dans MYSQL LOG et APACHE ERROR LOG.
Cela provient fort probablement de la config WAMP que je ne maîtrise pas du tout...
D'avance merci.
<?php
$today = date("Y-m-d") ;
$link = mysqli_connect('localhost', 'root') ;
if ( ! $link ) { $check = 'SGBDD indisponible' ; goto compte_rendu ; }
if ( ! mysqli_select_db( $link, 'visiteurs' ) )
{ $check = 'Base Visiteurs inaccessible' ; goto fermer ; }
#-----------------------------------------------------------------------------
# entre-deux, il y a tout mon code de mise à jour du SGBDD
#-----------------------------------------------------------------------------
fermer:
mysqli_close($link);
compte_rendu:
echo $check . " - " . mysqli_error($link) ;
?>
Résultat dans APACHE ERROR LOG :
--------------------------------
[Thu May 09 17:34:12 2013]

[Thu May 09 17:34:12 2013]

[Thu May 09 17:34:12 2013]

[Thu May 09 17:34:12 2013]

[Thu May 09 17:34:12 2013]

[Thu May 09 17:34:12 2013]

[Thu May 09 17:34:17 2013]

[Thu May 09 17:35:02 2013]

[Thu May 09 17:35:02 2013]

[Thu May 09 17:35:02 2013]

[Thu May 09 17:35:02 2013]

[Thu May 09 17:35:02 2013]

Résultat dans MYSQL LOG :
-------------------------
130508 20:01:19 [Note] Plugin 'FEDERATED' is disabled.
130508 20:01:19 InnoDB: The InnoDB memory heap is disabled
130508 20:01:19 InnoDB: Mutexes and rw_locks use Windows interlocked functions
130508 20:01:19 InnoDB: Compressed tables use zlib 1.2.3
130508 20:01:19 InnoDB: Initializing buffer pool, size = 128.0M
130508 20:01:19 InnoDB: Completed initialization of buffer pool
130508 20:01:19 InnoDB: highest supported file format is Barracuda.
130508 20:01:20 InnoDB: Waiting for the background threads to start
130508 20:01:21 InnoDB: 1.1.8 started; log sequence number 2161259
130508 20:01:21 [Note] Server hostname (bind-address): '(null)'; port: 3306
130508 20:01:21 [Note] - '(null)' resolves to '::';
130508 20:01:21 [Note] - '(null)' resolves to '0.0.0.0';
130508 20:01:21 [Note] Server socket created on IP: '0.0.0.0'.
130508 20:01:21 [Note] Event Scheduler: Loaded 0 events
130508 20:01:21 [Note] wampmysqld: ready for connections.
Version: '5.5.24-log' socket: '' port: 3306 MySQL Community Server (GPL)
130509 0:18:30 [Note] wampmysqld: Normal shutdown