echo mysql_errno() . ": " . mysql_error() . "\n";
Visualizzazione post con etichetta php. Mostra tutti i post
Visualizzazione post con etichetta php. Mostra tutti i post
giovedì 21 agosto 2014
php: visualizzare gli eventuali errori nell'esecuzione di una query mysql
Inserire la linea di codice seguente subito dopo la query da controllare:
echo mysql_errno() . ": " . mysql_error() . "\n";
echo mysql_errno() . ": " . mysql_error() . "\n";
Etichette:
debug,
mysql,
mysql_errno,
mysql_error,
php
lunedì 28 aprile 2014
wordpress: installazione rapida requisiti da linea di comando
Eseguire i comandi seguenti (le parti in grassetto devono essere sostituite con dei nomi da voi scelti)
$ apt-get install apache2 php5 mysql-server php5-mysql
$ mysql -u USERNAME_MYSQL_ADMIN -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 5340 to server version: 3.23.54
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> CREATE DATABASE NOME_DATABASE;
Query OK, 1 row affected (0.00 sec)
mysql> GRANT ALL PRIVILEGES ON NOME_DATABASE.* TO "NOME_UTENTE@localhost"
-> IDENTIFIED BY "PASSWORD";
Query OK, 0 rows affected (0.00 sec)
mysql> FLUSH PRIVILEGES;
Query OK, 0 rows affected (0.01 sec)
mysql> EXIT
Bye
$
A questo punto scaricate l'ultima versione di wordpress dal sito www.wordpress.org, scompattatela nella home del server apache e accedete con:
http://IP_ADDRESS_O_NOME_DEL_SERVER
e seguite le istruzioni riportate a video.
$ apt-get install apache2 php5 mysql-server php5-mysql
$ mysql -u USERNAME_MYSQL_ADMIN -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 5340 to server version: 3.23.54
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> CREATE DATABASE NOME_DATABASE;
Query OK, 1 row affected (0.00 sec)
mysql> GRANT ALL PRIVILEGES ON NOME_DATABASE.* TO "NOME_UTENTE@localhost"
-> IDENTIFIED BY "PASSWORD";
Query OK, 0 rows affected (0.00 sec)
mysql> FLUSH PRIVILEGES;
Query OK, 0 rows affected (0.01 sec)
mysql> EXIT
Bye
$
A questo punto scaricate l'ultima versione di wordpress dal sito www.wordpress.org, scompattatela nella home del server apache e accedete con:
http://IP_ADDRESS_O_NOME_DEL_SERVER
e seguite le istruzioni riportate a video.
Etichette:
command line,
linea di comando,
linux,
mysql,
php,
wordpress
mercoledì 23 ottobre 2013
PHP Warning: strtotime(): It is not safe to rely on the system's timezone settings.
Questo errore nei log di Apache:
FastCGI: server "/var/www/clients/client3/web4/cgi-bin/php5-fcgi-*-80-example.com" stderr: PHP message: PHP Warning: strtotime(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier.e' caratteristico di PHP 5.3 (pare sia sparito con la release 5.4).
Per risolverlo bisogna aggiungere al php.ini la riga:
date.timezone = "Europe/Rome"personalizzando se occorre la timezone tra doppi apici
giovedì 3 febbraio 2011
PHP: disabilitare (temporaneamente) i warning generati da uno script
Ci sono due possibilita:
- Inserire la riga seguente nel file di configurazione php.ini:
display_errors = 0
- Inserire a inizio script la clausola:
ini_set( "display_errors", 0);
domenica 30 novembre 2008
rkhunter: PHP Warning: Function registration failed - duplicate name - pg_update in Unknown on line 0

Puo' capitare, lanciando rkhunter, di ricevere warning da PHP come il seguente:PHP Warning: Function registration failed - duplicate
name - pg_update in Unknown on line 0.
Molto probabilmente avete aggiornato/compilato la versione Apache del PHP ma non quella CLI (ovvero la versione per console).
Su un sistema ubuntu/debian potrebbe bastare il seguente comando:sudo apt-get install php5-cli
Iscriviti a:
Post (Atom)