Discussion:Php 5 mysql 5 : Différence entre versions

De SME Server Wiki
(==)
Ligne 238 : Ligne 238 :
  
 
Ca me fout un peu les boules tout ca, donc merci par avance pour vos feedback et aide.
 
Ca me fout un peu les boules tout ca, donc merci par avance pour vos feedback et aide.
 +
 +
== Reponse ==
  
 
salut
 
salut

Version du 17 décembre 2006 à 23:35

bonjour a tous, j'ai mis a jour vers php5 et mysql5 avec cette methode (legerement modifiée par rapport au wiki car trop de petites erreurs):

Code: Php 5 mysql 5 So what you have to do to install MySQL 5 on SME7 is:


==================

STEP 1: MAKE A BACKUP OF YOUR DATABASES:

==================

Code: mysqldump -aec >backup_mysql_databases.sql


==============

STEP 2: GET THE NEW RPM'S:

==============

THERE ARE TWO WAYS OF DOING THIS:


FIRST METHOD:


Code: wget \ http://mirror.centos.org/centos/4/centosplus/i386/RPMS/mysqlclient14-4.1.14-4.2.c4.1.i386.rpm \ http://mirror.centos.org/centos/4/centosplus/i386/RPMS/mysql-server-5.0.22-1.centos.1.i386.rpm \ http://mirror.centos.org/centos/4/centosplus/i386/RPMS/mysql-5.0.22-1.centos.1.i386.rpm

rpm -U mysql-5.0.22-1.centos.1.i386.rpm \ mysql-server-5.0.22-1.centos.1.i386.rpm \ mysqlclient14-4.1.14-4.2.c4.1.i386.rpm

Code: /etc/rc.d/init.d/mysqld stop rm -f /etc/my.cnf.rpmnew /etc/rc.d/init.d/mysqld start


To fix the privileges on Horde: Code: mysql -e "GRANT SELECT,INSERT,UPDATE,DELETE ON horde.* TO 'horde'@'localhost';FLUSH PRIVILEGES"



SECOND METHOD: (prefered)


Code: /etc/rc.d/init.d/mysqld stop yum --enablerepo=centosplus update mysql /etc/rc.d/init.d/mysqld start


To fix the privileges on Horde: Code: mysql -e "GRANT SELECT,INSERT,UPDATE,DELETE ON horde.* TO 'horde'@'localhost';FLUSH PRIVILEGES"



=======================================

STEP 3: ADD MISSING MySQL-TABLES TO MYSQL DATABASE: (for instance with PhpMyAdmin)

=======================================

Code: DROP TABLE IF EXISTS proc; CREATE TABLE proc ( db char( 64 ) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL default , name char( 64 ) NOT NULL default , type enum( 'FUNCTION', 'PROCEDURE' ) NOT NULL , specific_name char( 64 ) NOT NULL default , language enum( 'SQL' ) NOT NULL default 'SQL', sql_data_access enum( 'CONTAINS_SQL', 'NO_SQL', 'READS_SQL_DATA', 'MODIFIES_SQL_DATA' ) NOT NULL default 'CONTAINS_SQL', is_deterministic enum( 'YES', 'NO' ) NOT NULL default 'NO', security_type enum( 'INVOKER', 'DEFINER' ) NOT NULL default 'DEFINER', param_list blob NOT NULL , returns char( 64 ) NOT NULL default , body longblob NOT NULL , definer char( 77 ) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL default , created timestamp NOT NULL default CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP , modified timestamp NOT NULL default '0000-00-00 00:00:00', sql_mode set( 'REAL_AS_FLOAT', 'PIPES_AS_CONCAT', 'ANSI_QUOTES', 'IGNORE_SPACE', 'NOT_USED', 'ONLY_FULL_GROUP_BY', 'NO_UNSIGNED_SUBTRACTION', 'NO_DIR_IN_CREATE', 'POSTGRESQL', 'ORACLE', 'MSSQL', 'DB2', 'MAXDB', 'NO_KEY_OPTIONS', 'NO_TABLE_OPTIONS', 'NO_FIELD_OPTIONS', 'MYSQL323', 'MYSQL40', 'ANSI', 'NO_AUTO_VALUE_ON_ZERO', 'NO_BACKSLASH_ESCAPES', 'STRICT_TRANS_TABLES', 'STRICT_ALL_TABLES', 'NO_ZERO_IN_DATE', 'NO_ZERO_DATE', 'INVALID_DATES', 'ERROR_FOR_DIVISION_BY_ZERO', 'TRADITIONAL', 'NO_AUTO_CREATE_USER', 'HIGH_NOT_PRECEDENCE' ) NOT NULL default , comment char( 64 ) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL default , PRIMARY KEY ( db , name , type ) ) ENGINE = MYISAM DEFAULT CHARSET = utf8 COMMENT = 'Stored Procedures';

DROP TABLE IF EXISTS procs_priv; CREATE TABLE procs_priv ( Host char(60) collate utf8_bin NOT NULL default , Db char(64) collate utf8_bin NOT NULL default , User char(16) collate utf8_bin NOT NULL default , Routine_name char(64) collate utf8_bin NOT NULL default , Routine_type enum('FUNCTION','PROCEDURE') collate utf8_bin NOT NULL, Grantor char(77) collate utf8_bin NOT NULL default , Proc_priv set('Execute','Alter Routine','Grant') character set utf8 NOT NULL default , Timestamp timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, PRIMARY KEY (Host,Db,User,Routine_name,Routine_type), KEY Grantor (Grantor) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Procedure privileges';


==========

STEP 4: RESTART MySQL:

==========

You simply reboot the server

OR

without rebooting the server: Code: /etc/rc.d/init.d/mysqld stop; /etc/rc.d/init.d/mysqld start; /etc/rc.d/init.d/mysql.init restart;


===============================

PHP5

PHP 5 1 installez les mise à jour de php 5 sur centosplus

yum --enablerepo=centosplus update php

2 verifiez voir corrigez ceci:

php.ini

vi /etc/e-smith/templates/etc/php.ini/50PathsDirectories extension_dir = /usr/lib/php/modules . Si ce n'est pas le cas faites ceci cp /etc/e-smith/templates/etc/php.ini/50PathDirectories /etc/e-smith/templates-custom/etc/php.ini/50PathDirectories mcedit /etc/e-smith/templates-custom/etc/php.ini/50PathDirectories et modifiez en consequence... Puis: expand-template /etc/php.ini

httpd.conf

mcedit /etc/e-smith/templates/etc/httpd/conf/httpd.conf/20loadModule80PHP verifiez que la ligne est pressente: return "LoadModule php5_module modules/libphp5.so";

si ce n'est pas le cas :

cp /etc/e-smith/templates/etc/httpd/conf/httpd.conf/20loadModule80PHP /etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf/20loadModule80PHP mcedit /etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf/20loadModule80PHP et modifiez en consequence... Puis: expand-template /etc/httpd/conf/httpd.conf

3 verifiez le bon fonctionnement de

/etc/rc.d/init.d/httpd restart (puis n'oubliez pas php-domxml)


par contre maintenant j'ai en erreur sur mes log:

Code:

Nov 27 15:47:03 localhost httpd: PHP Notice: Only variable references should be returned by reference in /home/httpd/html/horde/lib/Horde/Cipher/BlockMode.php on line 48

Nov 27 16:18:47 localhost httpd: PHP Notice: Only variable references should be returned by reference in /home/httpd/html/horde/lib/Horde/DataTree.php on line 1180

Nov 27 16:18:47 localhost httpd: PHP Notice: Only variable references should be returned by reference in /home/httpd/html/horde/lib/Horde/Perms.php on line 347

Nov 27 16:18:47 localhost httpd: PHP Notice: Only variable references should be returned by reference in /home/httpd/html/horde/lib/Horde/Auth.php on line 1168


en voyant ce message et le probleme des variable, je me demandais si c'etait lié et si c'etait risqué en production d'avoir ce genre de log ?? Sachant que je n'ai pas de scripts perso !!



De meme lors d'un yum update, j'obtient ca maintenant:

Code: --> Finished Dependency Resolution

Error: Missing Dependency: php >= 4.3.0 is needed by package turba-h3

Error: Missing Dependency: php = 5.1.6-1.2.1.centos is needed by package php-imap

Error: Missing Dependency: php is needed by package pear-mail

Error: Missing Dependency: php >= 4.3.0 is needed by package ingo-h3

Error: Missing Dependency: php = 5.1.6-1.2.1.centos is needed by package php-ldap

Error: Missing Dependency: php is needed by package e-smith-ingo

Error: Missing Dependency: php >= 5.1.0-1 is needed by package php-pear

Error: Missing Dependency: php = 5.1.6-1.2.1.centos is needed by package php-gd

Error: Missing Dependency: php = 5.1.6-1.2.1.centos is needed by package php-pdo

Error: Missing Dependency: php is needed by package pear-mail_mime

Error: Missing Dependency: php >= 4.3.0 is needed by package imp-h3

Error: Missing Dependency: php = 5.1.6-1.2.1.centos is needed by package php-mysql

Error: Missing Dependency: php is needed by package pear-file

Error: Missing Dependency: php is needed by package e-smith-imp

Error: Missing Dependency: php is needed by package pear-date

Error: Missing Dependency: php = 5.1.6-1.2.1.centos is needed by package php-mbstring

Error: Missing Dependency: php is needed by package pear-db

Error: Missing Dependency: php >= 4.3.0 is needed by package horde

Error: Missing Dependency: php is needed by package pear-log

Error: Missing Dependency: php >= 4.0.1 is needed by package e-smith-php

Error: Missing Dependency: php = 4.3.9-3.15 is needed by package php-domxml

====================================================

No new rpms were installed. No additional commands are required.

====================================================

sachant qu'avec un rpm -qa '*php*" j'ai

Code: php-mbstring-5.1.6-1.2.1.centos php-5.1.6-1.2.1.centos e-smith-php-1.12.0-01 php-mysql-5.1.6-1.2.1.centos php-ldap-5.1.6-1.2.1.centos php-imap-5.1.6-1.2.1.centos php-xml-5.1.6-1.2.1.centos php-pdo-5.1.6-1.2.1.centos php-gd-5.1.6-1.2.1.centos php-pear-1.4.9-1.2.centos


Ca me fout un peu les boules tout ca, donc merci par avance pour vos feedback et aide.

Reponse

salut

apparement ces problemes avec horde existait deja avec SME5 lors d emsie à jour de php, voila les suggestions de l'époque :

PHP 4.1.1 doesn't like some of the database calls that IMP uses, even though they still work. To avoid having errors clutter up your screen, you'll want to find the line that says display_errors and set that to Off . If you want them to be logged, set log_errors to On , and error_log to syslog.