Jump to content
php.lv forumi

PHP usage 100 %


element

Recommended Posts

Kaadi vareetu buut iemesli php cpu 100 % noslodzei? Serveris nav no jaunaakajiem (Athlon 1.8, 512mb ram), bet cpu noslodze veerojama tikai peedeejaa laikaa. Kodeets liidz shim arii nav nekas.

Pie paarslodzes, Apache serveris rija visus 100%, bet vakar tika paarlikts lighttpd, kas paraadiija, ka procesu rij tieshi php.exe.

IIpashi izteikti tas ir mirklii, kad tiek ielaadeeta fona atteelu galerija. Cpu deelj shitaa arii uz 57 graadiem turaas. Tiek izmantots win2003, php5, mysql5, lighttpd 1.4.13 (pirmiit bija apache 2.2).

Iespeejams, ka pieprasiijumu (veikto operaaciju skaits) ir paaraak liels, bet nezinu kaa lai to nosaka.

Liidz ar to, ja kaadam ir bijusi shaada probleema, luudzu iesakiet ko dariit.

Link to comment
Share on other sites

bildes vajadzētu tikai 1 reizi reseizot & iemest kešā, & pectam pataisno no keša rādīt :)

 

tad būtu labi arī ar pašķību & lēnu kodu :D

 

 

 

---------

 

Jē mans 100 spams :D :D

Edited by 4e4en
Link to comment
Share on other sites

bildeem thumbnaili jau saveidoti.. pashlaik uzliku uz citas kastes visu kodu, bet eniivei noslodze nezheeliigaa.. taatad jaameklee probleema kodaa vai arii pashaa konfiguraacijaa, jo taa tika paarkopeeta. Diezgan noslogots ir arii mysql. pieprasiijumi gan tiek "liiki" njemti. katram rakstu sql pieprasiijumu un tad izvelku no db. kaa to vareetu nooptimizeet? (domaaju tas arii noeed resursu) :/ bet vai tikai?

Edited by element
Link to comment
Share on other sites

kaads var paliidzeet, luudzu?

taatad katru reizi izmantoju shaadu veidu kaa dabuut datus no mysql db.. kaa vareetu shito nooptimizeet? varbuut kaads var uzrakstiit kaadu piemeeru, luudzu?

<?php
mysql_connect("hostname", "user", "password");
mysql_select_db("mydb");
$result = mysql_query("select * from mytable");
while ($row = mysql_fetch_object($result)) {
  echo $row->user_id;
  echo $row->fullname;
}
mysql_free_result($result);
?>

Link to comment
Share on other sites

nav labi rakstiit

SELECT * FROM tabulis

jo taa dabuun pilniigi visus ierakstus...

ja vien tas nav tavs merkjis tad noteikti izmanto saadi

SELECT lauks1, lauks2 FROM tabulis WHERE nosacijums .....

jo tad tiks ielasiits atminjaa tikai luks1 un lauks 2 (nu cik nu vinjus buusi noraadiijis....)

tapat ir ar WHERE ja nu nav nekaadu nosacijumu un vajag visas rindas tad neko, bet parasti jau nosacijumi ir...

teiksim

SELECT vards, uzvards, kautkas_vel FROM tabuliss WHERE vards='Trakaiss'

+ konekteties pie DB vajag tikai pasaa skripta sakumaa nevis katru reizi... tas arii ieverojami uzlabos atrdarbiibu...

Link to comment
Share on other sites

kaads var paliidzeet, luudzu?

taatad katru reizi izmantoju shaadu veidu kaa dabuut datus no mysql db.. kaa vareetu shito nooptimizeet? varbuut kaads var uzrakstiit kaadu piemeeru, luudzu?

Shis te nav ļoti CPU intensive.. visādā ziņā noslodzei vajadzētu būt MySQL pusē nevis php..

tikai jautājums kapēc tiek izmantots mysql_fetch_object($result)? mysql_fetch_assoc vai fetch_row būs krietni ātrāk..

 

Liidz ar to, ja kaadam ir bijusi shaada probleema, luudzu iesakiet ko dariit.

Uzlikt servera-statusu (gan lighttpd gan apache tāds ir) un paskatīties pie kuri requesti ilgāk izpildās un pie kuriem cpu sāk mocīties..

Ja nav pilnīgas saprašanas kas pa koda daļu ģenerē šo noslodzi tad sākumā pa lielam gabalam atsevišķās koda daļas vai lapas diseiblot (ieliec kaut vai die() sākumā). Ja stāvoklis uzlabojas skaidrs ka vainīgs šis kods ja nekas nemainās turpini tālāk..

Var arī smalkāk uzlikt teiksim kādu koda profileri aļa Xdebug un pētīt tā izgāztos datus.

Link to comment
Share on other sites

taatad piemeeram, ja man ir index.php, kuraa ir require_once (fails.php), tad index.php vajadzeetu vienu @mysql_pconnect un beigaas @mysql_close(); Is that right?

kaa veel vareetu konekteeties klaat db? kaa vareetu nooptimizeet kveeriju, kas pieprasa datus, padodot to funkcijai, kas atgriezh nepiecieshamaas veertiibas, taadeejaadi katru reizi nevajadzeetu rakstiit while $result = @mysql_query($sql); while ($row = @mysql_fetch_object($result)) {$row->id;} @mysql_free_result($result);

viens variants paarveidot visu uz mysql_fetch_assoc vai fetch_row, bet eniivei buutu labaak to visu funkcijaa salikt.. vai varat paraadiit kaadu piemeeru?

vai varbuut izmantot Pear DB konekciju mysql`am?

kaa var noteikt, kursh no pieprasiijumiem noslogo mysql? varbuut kautkaadu procesu (kveeriju) listingu ar izpildes laiku automaatiski ir iespeejams uzgjenereet peec pieprasiijuma veikshanas liidz mysql_close izpildei?

vai iespeejams lighttpd arii iesleegt multiviews un vai tas norij ieveerojamu resursu pie biezhiem rekvestiem?

Edited by element
Link to comment
Share on other sites

taatad piemeeram, ja man ir index.php, kuraa ir require_once (fails.php), tad index.php vajadzeetu vienu @mysql_pconnect un beigaas @mysql_close(); Is that right?

mysql_pconnect jebšu persistantās konekcijas izmanto tikai tad ja tu zini ko dari ;)

1. Ja tev ir apache, tad katrs pieprasijums lielākoties anyway vērs jaunu konekciju

2. Katra jaunai konekekcijai MySQLam jaizdala atmiņas buferi (key/sort un hvz vēl kādi citi - formula ir MySQL manuāli) tas nozīmē ka pie pārdesmit konekcijām vajadzēs krietni daudz rama, taču ja konekciju skaitu var ierobežot vai arī tas nav tik liels tad varbūt nav tik traki

3. mysql_close() neaizver mysql_pconnect (pconnect nav iespējams aizvērt no php).

 

kaa veel vareetu konekteeties klaat db? kaa vareetu nooptimizeet kveeriju, kas pieprasa datus, padodot to funkcijai, kas atgriezh nepiecieshamaas veertiibas, taadeejaadi katru reizi nevajadzeetu rakstiit while $result = @mysql_query($sql); while ($row = @mysql_fetch_object($result)) {$row->id;} @mysql_free_result($result);
MySQLam Query Cache ir ieslēgts?

Vēl variants ir izmantot kādu kontent kesheri ..

 

viens variants paarveidot visu uz mysql_fetch_assoc vai fetch_row, bet eniivei buutu labaak to visu funkcijaa salikt.. vai varat paraadiit kaadu piemeeru?
Es īsti nesaprotu ko tu grasies iegūt "saliekot to visu funkcijā"...

 

vai varbuut izmantot Pear DB konekciju mysql`am?
Tikai ne to. PEAR DB dara 100 un 1 lietu tikai ne DBconectu (nu labi beigās uztaisa).

Ja ir interese varu iedot profilētu outputu :)

 

kaa var noteikt, kursh no pieprasiijumiem noslogo mysql? varbuut kautkaadu procesu (kveeriju) listingu ar izpildes laiku automaatiski ir iespeejams uzgjenereet peec pieprasiijuma veikshanas liidz mysql_close izpildei?

http://dev.mysql.com/doc/refman/5.0/en/slow-query-log.html

 

vai iespeejams lighttpd arii iesleegt multiviews un vai tas norij ieveerojamu resursu pie biezhiem rekvestiem?
Kas domāts ar multiviews lighttpd'am?
Link to comment
Share on other sites

"/path/to/file" checks for directory path, if it doesnt exist, check for a file called path, then check for a file called path with a extension defined somewhere.

multiviews t.i. nav nepiecieshams rakstiit beigaas faila paplashinaajumu, piemeeram img?id=1. apache bija multiviews, bet kaa ir ar lighttpd ?

mysql cache bija 0 veertiiba, nomainiiju uz lielaaku.. tagad nochekoshu kas un kaa.. (ar 20M cache iesleegtu, bremzeeshana pie ielaades ir lielaaka, taa vismaz no lietotaaja puses ir juutams, servera galaa noslodze nemainaas) buus jaacheko pats kods.) Vai tukshaas rindinjas kodaa var dot taadu cpu intensive?

kaa ir ar mysql_pconnect? vai to buutu veelams, vai ir obligaati lietojams mysql_connect vietaa?

katru reizi droshi vien vajadzeetu paarbaudiit vai connections ar db veel eksistee, ja ne, konekteejamies pa jaunam?

Edited by element
Link to comment
Share on other sites

"/path/to/file" checks for directory path, if it doesnt exist, check for a file called path, then check for a file called path with a extension defined somewhere.

multiviews t.i. nav nepiecieshams rakstiit beigaas faila paplashinaajumu, piemeeram img?id=1. apache bija multiviews, bet kaa ir ar lighttpd ?

Priekš kam tev kaut ko tādu? Lielāku noslodzi vēl laikam tikai rewrite spēj ģenerēt..

 

mysql cache bija 0 veertiiba, nomainiiju uz lielaaku.. tagad nochekoshu kas un kaa.. (ar 20M cache iesleegtu, bremzeeshana pie ielaades ir lielaaka, taa vismaz no lietotaaja puses ir juutams, servera galaa noslodze nemainaas) buus jaacheko pats kods.)
Kā var būt klientam lielāka bremze ja keš ir servera pusē? :)

Jājautā vai tev tas serveris neswapojas līdz nemaņai?

Jā tā ir kāda unix/linux/bsd sistēma parādi ko tev atgriež konsolē 'free -m'

 

Vai tukshaas rindinjas kodaa var dot taadu cpu intensive?
Nē. Šis varbūt bija aktuāls pirms 10 gadiem.

 

kaa ir ar mysql_pconnect? vai to buutu veelams, vai ir obligaati lietojams mysql_connect vietaa?

Kā jau teicu.. mysql_pconnect vajadzētu lietot tikai tad ja tu saproti ko dari un ja serverim ir pietiekami atmiņas.

 

mysql_connect ir uz lokālas kastes (neņemot vērā tīkla latency) aizņem kādas 0.001 sekundes (un pat mazāk) ;)

 

katru reizi droshi vien vajadzeetu paarbaudiit vai connections ar db veel eksistee, ja ne, konekteejamies pa jaunam?
Nē, tas nav jāpārbauda. PHP to dara automātiski. Ja tu izsauksi 10 reiz mysql_connect() pēc kārtas arī tad tiks izveidota tikai viena konekcija.
Link to comment
Share on other sites

Nu reku teicu ka iedošu PEAR DB outputu (šito nogrābu vienā projektā, parādiju koderim un viņs sāka izmantot mysql_connect(). Un atvainojos ka nav memory outputa (būtu vēl interesantāk) bet tur php nebija ar memory_limit sakompilēts) :)

 

Uzdevums lai arī vienkārš - piekontektēties pie localhost ar 'user:password' datubāzei 'dbase' - ej nu saproti kāda mārutka pēc tas viss tiek darīts..

 

0.0025		  0	   +0	   -> defined('SECURE_INCLUDE') /data/web/db/db_connect.php:2
0.0052		  0	   +0	   -> require_once(/data/web/db/DB.php) /data/web/db/db_connect.php:3
0.0079		  0	   +0		 -> require_once(/data/web/db/PEAR.php) /data/web/db/DB.php:30
0.0079		  0	   +0		   -> define('PEAR_ERROR_RETURN', 1) /data/web/db/PEAR.php:31
0.0079		  0	   +0		   -> define('PEAR_ERROR_PRINT', 2) /data/web/db/PEAR.php:32
0.0079		  0	   +0		   -> define('PEAR_ERROR_TRIGGER', 4) /data/web/db/PEAR.php:33
0.0080		  0	   +0		   -> define('PEAR_ERROR_DIE', 8) /data/web/db/PEAR.php:34
0.0080		  0	   +0		   -> define('PEAR_ERROR_CALLBACK', 16) /data/web/db/PEAR.php:35
0.0080		  0	   +0		   -> define('PEAR_ERROR_EXCEPTION', 32) /data/web/db/PEAR.php:40
0.0080		  0	   +0		   -> function_exists('version_compare') /data/web/db/PEAR.php:42
0.0081		  0	   +0		   -> zend_version() /data/web/db/PEAR.php:43
0.0081		  0	   +0		   -> version_compare('2.2.0', '2-dev', 'ge') /data/web/db/PEAR.php:43
0.0081		  0	   +0		   -> define('PEAR_ZE2', TRUE) /data/web/db/PEAR.php:43
0.0081		  0	   +0		   -> substr('Linux', 0, 3) /data/web/db/PEAR.php:45
0.0082		  0	   +0		   -> define('OS_WINDOWS', FALSE) /data/web/db/PEAR.php:50
0.0082		  0	   +0		   -> define('OS_UNIX', TRUE) /data/web/db/PEAR.php:51
0.0082		  0	   +0		   -> define('PEAR_OS', 'Unix') /data/web/db/PEAR.php:52
0.0082		  0	   +0		   -> defined('PATH_SEPARATOR') /data/web/db/PEAR.php:56
0.0083		  0	   +0		   -> ini_set('track_errors', TRUE) /data/web/db/PEAR.php:70
0.0083		  0	   +0		 -> define('DB_OK', 1) /data/web/db/DB.php:47
0.0084		  0	   +0		 -> define('DB_ERROR', -1) /data/web/db/DB.php:52
0.0084		  0	   +0		 -> define('DB_ERROR_SYNTAX', -2) /data/web/db/DB.php:57
0.0084		  0	   +0		 -> define('DB_ERROR_CONSTRAINT', -3) /data/web/db/DB.php:62
0.0084		  0	   +0		 -> define('DB_ERROR_NOT_FOUND', -4) /data/web/db/DB.php:67
0.0084		  0	   +0		 -> define('DB_ERROR_ALREADY_EXISTS', -5) /data/web/db/DB.php:72
0.0085		  0	   +0		 -> define('DB_ERROR_UNSUPPORTED', -6) /data/web/db/DB.php:77
0.0085		  0	   +0		 -> define('DB_ERROR_MISMATCH', -7) /data/web/db/DB.php:82
0.0086		  0	   +0		 -> define('DB_ERROR_INVALID', -8) /data/web/db/DB.php:87
0.0086		  0	   +0		 -> define('DB_ERROR_NOT_CAPABLE', -9) /data/web/db/DB.php:92
0.0086		  0	   +0		 -> define('DB_ERROR_TRUNCATED', -10) /data/web/db/DB.php:97
0.0087		  0	   +0		 -> define('DB_ERROR_INVALID_NUMBER', -11) /data/web/db/DB.php:102
0.0087		  0	   +0		 -> define('DB_ERROR_INVALID_DATE', -12) /data/web/db/DB.php:107
0.0087		  0	   +0		 -> define('DB_ERROR_DIVZERO', -13) /data/web/db/DB.php:112
0.0087		  0	   +0		 -> define('DB_ERROR_NODBSELECTED', -14) /data/web/db/DB.php:117
0.0087		  0	   +0		 -> define('DB_ERROR_CANNOT_CREATE', -15) /data/web/db/DB.php:122
0.0088		  0	   +0		 -> define('DB_ERROR_CANNOT_DROP', -17) /data/web/db/DB.php:127
0.0088		  0	   +0		 -> define('DB_ERROR_NOSUCHTABLE', -18) /data/web/db/DB.php:132
0.0088		  0	   +0		 -> define('DB_ERROR_NOSUCHFIELD', -19) /data/web/db/DB.php:137
0.0088		  0	   +0		 -> define('DB_ERROR_NEED_MORE_DATA', -20) /data/web/db/DB.php:142
0.0088		  0	   +0		 -> define('DB_ERROR_NOT_LOCKED', -21) /data/web/db/DB.php:147
0.0089		  0	   +0		 -> define('DB_ERROR_VALUE_COUNT_ON_ROW', -22) /data/web/db/DB.php:152
0.0089		  0	   +0		 -> define('DB_ERROR_INVALID_DSN', -23) /data/web/db/DB.php:157
0.0089		  0	   +0		 -> define('DB_ERROR_CONNECT_FAILED', -24) /data/web/db/DB.php:162
0.0089		  0	   +0		 -> define('DB_ERROR_EXTENSION_NOT_FOUND', -25) /data/web/db/DB.php:167
0.0089		  0	   +0		 -> define('DB_ERROR_ACCESS_VIOLATION', -26) /data/web/db/DB.php:172
0.0090		  0	   +0		 -> define('DB_ERROR_NOSUCHDB', -27) /data/web/db/DB.php:177
0.0090		  0	   +0		 -> define('DB_ERROR_CONSTRAINT_NOT_NULL', -29) /data/web/db/DB.php:182
0.0090		  0	   +0		 -> define('DB_PARAM_SCALAR', 1) /data/web/db/DB.php:200
0.0090		  0	   +0		 -> define('DB_PARAM_OPAQUE', 2) /data/web/db/DB.php:208
0.0090		  0	   +0		 -> define('DB_PARAM_MISC', 3) /data/web/db/DB.php:215
0.0091		  0	   +0		 -> define('DB_BINMODE_PASSTHRU', 1) /data/web/db/DB.php:230
0.0091		  0	   +0		 -> define('DB_BINMODE_RETURN', 2) /data/web/db/DB.php:235
0.0091		  0	   +0		 -> define('DB_BINMODE_CONVERT', 3) /data/web/db/DB.php:242
0.0091		  0	   +0		 -> define('DB_FETCHMODE_DEFAULT', 0) /data/web/db/DB.php:259
0.0091		  0	   +0		 -> define('DB_FETCHMODE_ORDERED', 1) /data/web/db/DB.php:264
0.0092		  0	   +0		 -> define('DB_FETCHMODE_ASSOC', 2) /data/web/db/DB.php:269
0.0092		  0	   +0		 -> define('DB_FETCHMODE_OBJECT', 3) /data/web/db/DB.php:274
0.0092		  0	   +0		 -> define('DB_FETCHMODE_FLIPPED', 4) /data/web/db/DB.php:283
0.0092		  0	   +0		 -> define('DB_GETMODE_ORDERED', 1) /data/web/db/DB.php:289
0.0093		  0	   +0		 -> define('DB_GETMODE_ASSOC', 2) /data/web/db/DB.php:290
0.0093		  0	   +0		 -> define('DB_GETMODE_FLIPPED', 4) /data/web/db/DB.php:291
0.0093		  0	   +0		 -> define('DB_TABLEINFO_ORDER', 1) /data/web/db/DB.php:310
0.0093		  0	   +0		 -> define('DB_TABLEINFO_ORDERTABLE', 2) /data/web/db/DB.php:311
0.0093		  0	   +0		 -> define('DB_TABLEINFO_FULL', 3) /data/web/db/DB.php:312
0.0094		  0	   +0		 -> define('DB_AUTOQUERY_INSERT', 1) /data/web/db/DB.php:320
0.0094		  0	   +0		 -> define('DB_AUTOQUERY_UPDATE', 2) /data/web/db/DB.php:321
0.0094		  0	   +0		 -> define('DB_PORTABILITY_NONE', 0) /data/web/db/DB.php:344
0.0094		  0	   +0		 -> define('DB_PORTABILITY_LOWERCASE', 1) /data/web/db/DB.php:350
0.0094		  0	   +0		 -> define('DB_PORTABILITY_RTRIM', 2) /data/web/db/DB.php:355
0.0095		  0	   +0		 -> define('DB_PORTABILITY_DELETE_COUNT', 4) /data/web/db/DB.php:360
0.0095		  0	   +0		 -> define('DB_PORTABILITY_NUMROWS', 8) /data/web/db/DB.php:365
0.0095		  0	   +0		 -> define('DB_PORTABILITY_ERRORS', 16) /data/web/db/DB.php:378
0.0095		  0	   +0		 -> define('DB_PORTABILITY_NULL_TO_EMPTY', 32) /data/web/db/DB.php:384
0.0095		  0	   +0		 -> define('DB_PORTABILITY_ALL', 63) /data/web/db/DB.php:389
0.0096		  0	   +0	   -> DB::connect('mysql://user:password@localhost/dbase', '') /data/web/db/db_connect.php:7
0.0097		  0	   +0		 -> DB::parseDSN('mysql://user:password@localhost/dbase') /data/web/db/DB.php:520
0.0097		  0	   +0		   -> is_array('mysql://user:password@localhost/dbase') /data/web/db/DB.php:745
0.0097		  0	   +0		   -> strpos('mysql://user:password@localhost/dbase', '://') /data/web/db/DB.php:754
0.0097		  0	   +0		   -> substr('mysql://user:password@localhost/dbase', 0, 5) /data/web/db/DB.php:755
0.0098		  0	   +0		   -> substr('mysql://user:password@localhost/dbase', 8) /data/web/db/DB.php:756
0.0098		  0	   +0		   -> preg_match('|^(.+?)\\((.*?)\\)$|', 'mysql', NULL) /data/web/db/DB.php:764
0.0099		  0	   +0		   -> count('user:password@localhost/dbase') /data/web/db/DB.php:772
0.0099		  0	   +0		   -> strrpos('user:password@localhost/dbase', '@') /data/web/db/DB.php:778
0.0099		  0	   +0		   -> substr('user:password@localhost/dbase', 0, 13) /data/web/db/DB.php:779
0.0100		  0	   +0		   -> substr('user:password@localhost/dbase', 14) /data/web/db/DB.php:780
0.0100		  0	   +0		   -> strpos('user:password', ':') /data/web/db/DB.php:781
0.0100		  0	   +0		   -> substr('user:password', 0, 5) /data/web/db/DB.php:782
0.0100		  0	   +0		   -> rawurldecode('dbase') /data/web/db/DB.php:782
0.0100		  0	   +0		   -> substr('user:password', 6) /data/web/db/DB.php:783
0.0101		  0	   +0		   -> rawurldecode('password') /data/web/db/DB.php:783
0.0101		  0	   +0		   -> preg_match('|^([^(]+)\\((.*?)\\)/?(.*?)$|', 'localhost/dbase', NULL) /data/web/db/DB.php:791
0.0101		  0	   +0		   -> strpos('localhost/dbase', '+') /data/web/db/DB.php:799
0.0102		  0	   +0		   -> strpos('localhost/dbase', '/') /data/web/db/DB.php:802
0.0102		  0	   +0		   -> explode('/', 'localhost/dbase', 2) /data/web/db/DB.php:803
0.0102		  0	   +0		   -> rawurldecode('localhost') /data/web/db/DB.php:812
0.0102		  0	   +0		   -> strpos('localhost', ':') /data/web/db/DB.php:814
0.0103		  0	   +0		   -> strpos('dbase', '?') /data/web/db/DB.php:827
0.0103		  0	   +0		   -> rawurldecode('dbase') /data/web/db/DB.php:829
0.0103		  0	   +0		 -> is_array('') /data/web/db/DB.php:523
0.0127		  0	   +0		 -> include_once(/data/web/db/mysql.php) /data/web/db/DB.php:537
0.0165		  0	   +0		   -> require_once(/data/web/db/common.php) /data/web/db/mysql.php:30
0.0166		  0	   +0		 -> class_exists('DB_mysql') /data/web/db/DB.php:541
0.0167		  0	   +0		 -> DB_mysql->DB_mysql() /data/web/db/DB.php:549
0.0167		  0	   +0		   -> DB_common->DB_common() /data/web/db/mysql.php:168
0.0167		  0	   +0			 -> PEAR->PEAR('DB_Error') /data/web/db/common.php:135
0.0167		  0	   +0			   -> get_class(class DB_mysql { public $phptype = 'mysql'; public $dbsyntax = 'mysql'; public $features = array (...); public $errorcode_map = array (...); public $connection = NULL; public $dsn = array (...); public $autocommit = TRUE; public $transaction_opcount = 0; public $_db = ''; public $fetchmode = 1; public $fetchmode_object_class = 'stdClass'; public $was_connected = NULL; public $last_query = ''; public $options = array (...); public $last_parameters = array (...); public $prepare_tokens = array (...); public $prepare_types = array (...); public $prepared_queries = array (...); public $_debug = FALSE; public $_default_error_mode = NULL; public $_default_error_options = NULL; public $_default_error_handler = ''; public $_error_class = 'PEAR_Error'; public $_expected_errors = array (...) }) /data/web/db/PEAR.php:172
0.0168		  0	   +0			   -> strtolower('DB_mysql') /data/web/db/PEAR.php:172
0.0168		  0	   +0			   -> strcasecmp('db_mysql', 'pear') /data/web/db/PEAR.php:179
0.0169		  0	   +0			   -> method_exists(class DB_mysql { public $phptype = 'mysql'; public $dbsyntax = 'mysql'; public $features = array (...); public $errorcode_map = array (...); public $connection = NULL; public $dsn = array (...); public $autocommit = TRUE; public $transaction_opcount = 0; public $_db = ''; public $fetchmode = 1; public $fetchmode_object_class = 'stdClass'; public $was_connected = NULL; public $last_query = ''; public $options = array (...); public $last_parameters = array (...); public $prepare_tokens = array (...); public $prepare_types = array (...); public $prepared_queries = array (...); public $_debug = FALSE; public $_default_error_mode = NULL; public $_default_error_options = NULL; public $_default_error_handler = ''; public $_error_class = 'DB_Error'; public $_expected_errors = array (...) }, '_db_mysql') /data/web/db/PEAR.php:181
0.0169		  0	   +0			   -> get_parent_class('db_mysql') /data/web/db/PEAR.php:190
0.0170		  0	   +0			   -> strcasecmp('DB_common', 'pear') /data/web/db/PEAR.php:179
0.0170		  0	   +0			   -> method_exists(class DB_mysql { public $phptype = 'mysql'; public $dbsyntax = 'mysql'; public $features = array (...); public $errorcode_map = array (...); public $connection = NULL; public $dsn = array (...); public $autocommit = TRUE; public $transaction_opcount = 0; public $_db = ''; public $fetchmode = 1; public $fetchmode_object_class = 'stdClass'; public $was_connected = NULL; public $last_query = ''; public $options = array (...); public $last_parameters = array (...); public $prepare_tokens = array (...); public $prepare_types = array (...); public $prepared_queries = array (...); public $_debug = FALSE; public $_default_error_mode = NULL; public $_default_error_options = NULL; public $_default_error_handler = ''; public $_error_class = 'DB_Error'; public $_expected_errors = array (...) }, '_DB_common') /data/web/db/PEAR.php:181
0.0170		  0	   +0			   -> get_parent_class('DB_common') /data/web/db/PEAR.php:190
0.0171		  0	   +0			   -> strcasecmp('PEAR', 'pear') /data/web/db/PEAR.php:179
0.0171		  0	   +0		 -> DB_common->setOption('persistent', '') /data/web/db/DB.php:552
0.0171		  0	   +0		 -> DB::isError(1) /data/web/db/DB.php:553
0.0172		  0	   +0		   -> is_a(1, 'DB_Error') /data/web/db/DB.php:592
0.0172		  0	   +0		 -> DB_common->getOption('persistent') /data/web/db/DB.php:558
0.0172		  0	   +0		 -> DB_mysql->connect(array ('phptype' => 'mysql', 'dbsyntax' => 'mysql', 'username' => 'dbase', 'password' => 'password', 'protocol' => 'tcp', 'hostspec' => 'localhost', 'port' => FALSE, 'socket' => FALSE, 'database' => 'dbase'), '') /data/web/db/DB.php:558
0.0173		  0	   +0		   -> PEAR->loadExtension('mysql') /data/web/db/mysql.php:195
0.0173		  0	   +0			 -> extension_loaded('mysql') /data/web/db/PEAR.php:731
0.0173		  0	   +0		   -> phpversion() /data/web/db/mysql.php:226
0.0174		  0	   +0		   -> version_compare('5.2.1RC1', '4.3.0', '>=') /data/web/db/mysql.php:226
0.0174		  0	   +0		   -> ini_get('track_errors') /data/web/db/mysql.php:233
0.0174		  0	   +0		   -> call_user_func_array('mysql_connect', array (0 => 'localhost', 1 => 'dbase', 2 => 'password', 3 => FALSE, 4 => NULL)) /data/web/db/mysql.php:237
0.0243		  0	   +0		   -> mysql_select_db('dbase', resource(7) of type (mysql link)) /data/web/db/mysql.php:258

Link to comment
Share on other sites

×
×
  • Create New...