Hmmm, po mom znanju, postoje 2 php mysql ekstenzije a to su mysql.so i mysqli.so. Da li si pokusao ucitati mysql ekstenziju iako je preporucljivo mysqli, barem dok ne rijesis problem?
Ima jos i pdo_mysql.so i pdo_mysqli.so. Koriste se uglavnom za povezivanje Zend frameworka sa Mysql bazom. Magento koristi standardno pdo_mysql ekstenziju, mada se moze konfigurisati i sa mysqli (sto cu na kraju uraditi ako ove dvije ekstenzije ne mogu ekzistirati zajedno).
Da, kad malo razmislim, trebalo bi oboje funkcionirati, ali sa aplikacijske strane. Kod ekstenzija mozda ovisi da li se koristi mysql ili mysqli posto se razlicito povezuje na bazu itd. (mysqli klasa ili set klasa, nisam siguran, mysql je set funkcija). Znaci, pokusaj to uvezati sve sa odgovarajucim ekstenzijama, pdo_mysql sa mysql ili pdo_mysqli sa mysqli.
Izbaci ekstenzije iz php.ini sto si dodao, restartaj server, pozovi iz skripte phpinfo() te pogledaj da li su mysql ili mysqli ucitani. Provjeri i pdo za svaki slucaj. Interesantna stvar je sto mysql i mysqli ekstenzija nisu zeljeli raditi zajedno kada sam podesavao testni server na windowsu. Ako je mysql ekstenzija ucitana probaj se tada prijaviti preko phpmyadmin. I dalje ce javljati da mysqli nije ucitan ali bi trebao odraditi pristup bazi.
UPDATE
ok, scratch that, ocito sam nesto napravio u medjuvremenu cim se mysql i mysqli ucitao kako treba. svejedno provjeri sa phpinfo()
pdo je takodjer ucitan kako treba.
Ok, otvori config file od phpmyadmin koji se zove config.inc.php i pronadji liniju koja izgleda ovako, vjerojatno je i u tebe isto:
i promijeni mysqli u mysql. Ako linije nema onda dodaj. Opcija forsira koristenje mysql ekstenzije za phpmyadmin umjesto mysqli. Jedan post je pisao kako im pdo_mysql nece da radi sa mysqli ekstenzijom. I da, obavezno pogledaj logove. Starija je verzija php-a na 8.04. Da li si phpmyadmin instalirao iz repoa ili si skinuo sa neta pa sam podesavao?
php je 5.2.4 a phpmyadmin sam skinuo sa stranice i smjestio u odgovarajuci direktorij u /var/www/mysite. Moguce da zadnja verzija phpmyadmina nije kompatibilna sa verzijom php-a?
I probao sam u toj liniji staviti mysqli i mysql, bez nekog rezultata. Ostaje mi sutra da detaljno pregledam logove, sigurno cu tamo naci rjesenje.
Mislim da znam u cemu je problem, samo moram skontati kako da ga rijesim :).
Naime, pdo_myslq je od ranije instaliran i konfigurisan jer mi je potreban za magento. Eh sada, meni se cini da mysql ekstenzija uopste nije instalirana, osim ako ne dolazi integrisana u php.
Kada instaliram paket php5-mysql i resetujem apache, isti se ne pokrene. Dakle, nemam nikakvu error poruku, cak dobijem i [OK] kao da se apache startao ali ps aux ne pokazuje ni jednu apache instancu. Sigurno ima negdje error zasto se to desava, pogledam sutra.
Dalje, da bih ponovo pokrenuo apache, moram deinstalirati php5-mysql. Nakon toga se apache starta, ps aux pokazuje instance ali imam problem sa konekcijom na magento bazu. Tada moram jos jednom instalirati pdo_mysql (iako nije deinstaliran) sa pecl install pdo_mysql i tek nakon jos jednog restarta apache-ja, sve je back to normal. Izuzem phpmyadmina koji ne radi.
Config sam pokusao rucno, eidtovanjem config.inc.php datoteke, kao i sa pokretanjem http://mysite.de/phpMyAdmin/setup/ u browseru. U oba slucaja mi javlja da ne moze da load mysql (ili mysqli) ekstenziju.
Dakle, obrisao sam phpmyadmin koji sam rucno instalirao i odradio instalaciju preko apt-get.a.
Uz phpmyadmin instaliran je i php5-mysql.
Nakon toga, apache se ne moze pokrenuti.
U messages, syslog i dameon logvima nisam nista nasao.
Ali /var/log/apache2/error.log pokazuje slijedeci error:
[Thu Dec 23 17:02:37 2010] [warn] No JkShmFile defined in httpd.conf. Using default /var/log/apache2/jk-runtime-status
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php5/20060613/php_curl.so' - /usr/lib/php5/20060613/php_curl.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php5/20060613/php_mcrypt.so' - /usr/lib/php5/20060613/php_mcrypt.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php5/20060613/php_xmlrpc.so' - /usr/lib/php5/20060613/php_xmlrpc.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php5/20060613/msqli.so' - /usr/lib/php5/20060613/msqli.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning: Module 'PDO' already loaded in Unknown on line 0
PHP Warning: Module 'pdo_mysql' already loaded in Unknown on line 0
/usr/sbin/apache2: symbol lookup error: /usr/lib/php5/20060613/pdo_mysql.so: undefined symbol: php_pdo_get_dbh_ce
Da bih podigao apache ponovo morao sam ovo odraditi:
#apt-get remove phpmyadmin php5-mysql
#pecl uninstall pdo_mysql
#pecl install pdo_mysql
#/etc/init.d/apache2 restart
Nakon toga apache se digao, naravno bez mysql ekstenzije.
Zanimljivo je da sam u error.log ponovo pronasao isti error:
[Thu Dec 23 17:13:40 2010] [warn] No JkShmFile defined in httpd.conf. Using default /var/log/apache2/jk-runtime-status
[Thu Dec 23 17:13:40 2010] [warn] No JkShmFile defined in httpd.conf. Using default /var/log/apache2/jk-runtime-status
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php5/20060613/php_curl.so' - /usr/lib/php5/20060613/php_curl.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php5/20060613/php_mcrypt.so' - /usr/lib/php5/20060613/php_mcrypt.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php5/20060613/php_xmlrpc.so' - /usr/lib/php5/20060613/php_xmlrpc.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php5/20060613/msqli.so' - /usr/lib/php5/20060613/msqli.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php5/20060613/mysql.so' - /usr/lib/php5/20060613/mysql.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php5/20060613/mysqli.so' - /usr/lib/php5/20060613/mysqli.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning: Module 'PDO' already loaded in Unknown on line 0
PHP Warning: Module 'pdo_mysql' already loaded in Unknown on line 0
[Thu Dec 23 17:13:40 2010] [warn] pid file /var/run/apache2.pid overwritten -- Unclean shutdown of previous Apache run?
[Thu Dec 23 17:13:40 2010] [notice] Apache/2.2.8 (Ubuntu) mod_jk/1.2.25 PHP/5.2.4-2ubuntu5.12 with Suhosin-Patch configured -- resuming normal operations
Naravno razumijem da nije mogao naci mysql i mysqli ali:
Nakon instalacije apache se ne podize. Slijedeca linija se pojavila kao u error.log datoteci:
/usr/sbin/apache2: symbol lookup error: /usr/lib/php5/20060613/pdo_mysql.so: undefined symbol: php_pdo_get_dbh_ce
php, apache i mysql su instalirani sa apt-get-om, dakle ne bi trebalo biti nikakvih compatibility issues involved.
Dalje sam ukinuo pdo_mysql i resetovao apache, koji se nakon toga digao.
Dakle, konflikt na relaciji pdo_mysql i php5-mysql.
Naravno, nakon ukidanja pdo_mysql ekstenzije dobijam slijedeci error:
[code]Fatal error: Uncaught exception ‘Zend_Db_Adapter_Exception’ with message ‘pdo_mysql extension is not installed’ in /web/cultus.eu/apache2/htdocs/lib/Varien/Db/Adapter/Pdo/Mysql.php:240 Stack trace: #0
/web/cultus.eu/apache2/htdocs/lib/Zend/Db/Adapter/Abstract.php(448): Varien_Db_Adapter_Pdo_Mysql->_connect() #1 /web/cultus.eu/apache2/htdocs/lib/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract-
query(‘SET NAMES utf8’, Array) #2 /web/cultus.eu/apache2/htdocs/lib/Varien/Db/Adapter/Pdo/Mysql.php(333): Zend_Db_Adapter_Pdo_Abstract->query(‘SET NAMES utf8’, Array) #3
/web/cultus.eu/apache2/htdocs/app/code/core/Mage/Core/Model/Resource/Type/Db/Pdo/Mysql.php(45): Varien_Db_Adapter_Pdo_Mysql->query(‘SET NAMES utf8’) #4
/web/cultus.eu/apache2/htdocs/app/code/core/Mage/Core/Model/Resource.php(93): Mage_Core_Model_Resource_Type_Db_Pdo_Mysql->getConnection(Object(Mage_Core_Model_Config_Element)) #5
/web/cultus.eu/apache2/htdocs/app/code/core/Mage/Core/Model/Mysql4/Abstract.php(297): Mage_Core_Model_Resource->getConnectio in /web/cultus.eu/apache2/htdocs/lib/Varien/Db/Adapter/Pdo/Mysql.php on line 240[/code]
Sto ce reci da moram prekonfigurisati magento da koristi mysqli a ne pdo_mysql.
Osim ako neko ne zna kako natjerati ove dvije ekstenzije da demokratski i bratski koegzistiraju, postujuci prava sva tri konstitutivna naroda i u skladu sa Daytonskim mirovnim ugovorom.
extension=php_curl.so
extension=php_xmlrpc.so
extension=php_mcrypt.so
u
extension=curl.so
extension=xmlrpc.so
extension=mcrypt.so
tako da sada cijeli extension dio izgleda ovako:
extension=pdo.so
extension=pdo_mysql.so
extension=curl.so
extension=mcrypt.so
extension=xmlrpc.so
;extension=mysql.so
;extension=mysqli.so
Koliko sam ja shvatio, mysql i mysqli se ne bi trebale ucitavati. Medjutim, error.log pokazuje slijedece:
root@admwebserver03:~# tail /var/log/apache2/error.log
[Thu Dec 23 21:29:36 2010] [warn] No JkShmFile defined in httpd.conf. Using default /var/log/apache2/jk-runtime-status
[Thu Dec 23 21:29:36 2010] [warn] No JkShmFile defined in httpd.conf. Using default /var/log/apache2/jk-runtime-status
PHP Warning: Module 'mcrypt' already loaded in Unknown on line 0
PHP Warning: Module 'curl' already loaded in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php5/20060613/mysql.so' - /usr/lib/php5/20060613/mysql.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php5/20060613/mysqli.so' - /usr/lib/php5/20060613/mysqli.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning: Module 'PDO' already loaded in Unknown on line 0
PHP Warning: Module 'pdo_mysql' already loaded in Unknown on line 0
PHP Warning: Module 'xmlrpc' already loaded in Unknown on line 0
[Thu Dec 23 21:29:36 2010] [notice] Apache/2.2.8 (Ubuntu) mod_jk/1.2.25 PHP/5.2.4-2ubuntu5.12 with Suhosin-Patch configured -- resuming normal operations
root@admwebserver03:~#
Sto znaci da se ekstenzije ucitaju preko neke druge datoteke, pa se tek onda cita php.ini.