[root@ns04 cacti]# sestatus SELinux status: disabled
[root@ns04 cacti]# service mysqld status mysqld (pid 4288) is running... [root@ns04 cacti]#
[root@ns04 cacti]# mysql -u root -p ct <cacti.sql Enter password: ERROR 1050 (42S01) at line 5: Table 'cdef' already exists [root@ns04 cacti]#
[root@ns04 cacti]# rpm -qa php-mysql php-mysql-5.3.2-6.el6_0.1.x86_64 [root@ns04 cacti]#
Bạn xem log của Apache chưa?Log sau khi restart apache của em Code:
[root@ns04 ~]# service httpd restart Stopping httpd: [ OK ] Starting httpd: [ OK ] [root@ns04 ~]# tail /var/log/httpd/error_log [Sat Oct 29 18:05:58 2011] [notice] Digest: generating secret for digest authentication ... [Sat Oct 29 18:05:58 2011] [notice] Digest: done PHP Warning: Module 'mysql' already loaded in Unknown on line 0 [Sat Oct 29 18:05:58 2011] [notice] Apache/2.2.15 (Unix) DAV/2 PHP/5.3.2 configured -- resuming normal operations [Sat Oct 29 18:07:04 2011] [notice] caught SIGTERM, shutting down [Sat Oct 29 18:07:04 2011] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec) [Sat Oct 29 18:07:04 2011] [notice] Digest: generating secret for digest authentication ... [Sat Oct 29 18:07:04 2011] [notice] Digest: done PHP Warning: Module 'mysql' already loaded in Unknown on line 0 [Sat Oct 29 18:07:05 2011] [notice] Apache/2.2.15 (Unix) DAV/2 PHP/5.3.2 configured -- resuming normal operations [root@ns04 ~]#
192.168.0.11 - - [29/Oct/2011:19:57:47 -0400] "GET /cacti/ HTTP/1.1" 500 - "-" "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.11) Gecko/20101012 Firefox/3.6.11" 192.168.0.11 - - [29/Oct/2011:19:57:49 -0400] "GET /cacti/ HTTP/1.1" 500 - "-" "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.11) Gecko/20101012 Firefox/3.6.11" 192.168.0.11 - - [29/Oct/2011:19:58:32 -0400] "GET /cacti/ HTTP/1.1" 500 - "-" "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.11) Gecko/20101012 Firefox/3.6.11" 192.168.0.11 - - [29/Oct/2011:19:58:35 -0400] "GET /cacti/ HTTP/1.1" 500 - "-" "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.11) Gecko/20101012 Firefox/3.6.11" 192.168.0.11 - - [29/Oct/2011:19:58:38 -0400] "GET / HTTP/1.1" 200 42345 "-" "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.11) Gecko/20101012 Firefox/3.6.11" 192.168.0.11 - - [29/Oct/2011:19:58:38 -0400] "GET /index.php?=PHPE9568F35-D428-11d2-A769-00AA001ACF42 HTTP/1.1" 200 2146 "http://192.168.0.4/" "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.11) Gecko/20101012 Firefox/3.6.11" 192.168.0.11 - - [29/Oct/2011:19:58:38 -0400] "GET /index.php?=PHPE9568F34-D428-11d2-A769-00AA001ACF42 HTTP/1.1" 200 2524 "http://192.168.0.4/" "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.11) Gecko/20101012 Firefox/3.6.11" 192.168.0.11 - - [29/Oct/2011:19:58:42 -0400] "GET /cacti/ HTTP/1.1" 500 - "-" "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.11) Gecko/20101012 Firefox/3.6.11" 127.0.0.1 - - [29/Oct/2011:20:00:09 -0400] "GET / HTTP/1.0" 200 39698 "-" "check_http/v1.4.15 (nagios-plugins 1.4.15)"
/etc/php.ini extension_dir = /etc/php.d Lổi ở chổ này các bác , em phải copy mysql.so từ /usr/lib/php/modules đưa qua đó.For older versions of PHP, youu may have to edit the php.ini file and add: extension_dir = /etc/php.d]]>