How to Customize, Modify or Change WordPress Database Connection Error Page Kā Pielāgot, grozīt vai mainīt WordPress Database Connection Error Page
When Kad WordPress WordPress , a popular blog publishing platform built in PHP and uses MySQL database, cannot connect or having problem connecting to the database (such as when database is down), or the MySQL server has too many connections exceeding maximum connection allowed (especially when your post or article is been dugg on Digg.com) and rejects or denies new incoming connections, WordPress will display a default “error establishing database connection” error message page. , Kas ir populāra blog publishing platforma uzcelta PHP un izmanto MySQL datubāzi, nevar savienot vai ir problēma, pieslēdzoties ar datu bāzi (piemēram, ja datu bāze ir uz leju), vai MySQL serveris ir pārāk daudz savienojumus pārsniedz maksimālo savienojuma atļauts (jo īpaši, ja jūsu pastu vai pants ir bijis dugg par Digg.com) un noraida vai noliedz jauns ienākošos savienojumus, WordPress būs redzams default "kļūda izveido datu bāzi, savienojums" kļūdu ziņu lapā. However, the WordPress error page, some is shown below, is not visitor friendly or user friendly, and worse, the default database error page also reveals the SQL server address and name. Tomēr, WordPress kļūdu lapā, daži ir norādīti turpmāk, nav apmeklētājs draudzīgs vai lietotājam draudzīgi, un vēl ļaunāk, noklusējuma datu bāzes kļūda page arī atklāj SQL servera adresi un nosaukumu.
Can't select database Nevar izvēlēties datubāzi
We were able to connect to the database server (which means your username and password is okay) but not able to select the localhost database. Mums bija iespēja, lai izveidotu savienojumu ar datu bāzes serveri (kas nozīmē, ka jūsu lietotājvārds un parole ir labi), bet nevar izvēlēties localhost datubāzē.
* Are you sure it exists? * Vai Jūs esat pārliecināts, ka tas ir?
* On some systems the name of your database is prefixed with your username, so it would be like username_wordpress. * Dažos sistēmas nosaukumu Jūsu datubāze ir prefiksu ar savu lietotājvārdu, lai tā būtu, piemēram, username_wordpress. Could that be the problem? Vai, ka ir problēma?If you don't know how to setup a database you should contact your host. Ja jūs nezināt, kā setup datubāzes sazinieties uzņēmējā. If all else fails you may find help at the WordPress Support Forums. Ja visi vēl nav jums var atrast palīdzību pie WordPress Support Forums.
Error establishing a database connection Kļūda, izveidojot datu bāzi, savienojums
This either means that the username and password information in your wp-config.php file is incorrect or we can't contact the database server at localhost. Tas vai nu nozīmē to, ka lietotājvārds un parole informāciju jūsu wp-config.php fails ir nepareiza vai mēs nevaram sazināties ar datu bāzes serveri pie localhost. This could mean your host's database server is down. Tas varētu nozīmēt savu uzņēmēja datu bāzes serveris ir uz leju.
Are you sure you have the correct username and password? Vai esat pārliecināts, ka ir pareizais lietotājvārds un parole?
Are you sure that you have typed the correct hostname? Vai esat pārliecināts, ka esat ievadījis pareizo resursdatora?
Are you sure that the database server is running? Vai esat pārliecināts, ka datubāzes servera darbojas?
These default Wordpress database error pages are more meant for website administrators or webmasters rather than the public visitors. Šie noklusējuma WordPress datubāzē kļūdu lapās ir daudz domāts par mājas lapas administratori vai tīmekļa pārziņiem, nevis valsts apmeklētājiem. However, you can change the error page to another different error page by modifying or altering wordings and text in the error page by customizing the wp-db.php file located in wp-include directory. Tomēr jūs varat mainīt kļūdu lapu uz citu dažādu kļūdu lapu pārveidojot vai mainot formulējumu un tekstu kļūdu lapā, pielāgot to wp-db.php fails atrodas wp-iekļaut direktorijā. Here's how you can hack the Wordpress default error message. Lūk, kā jūs varat sacirst ar WordPress noklusējuma kļūdas ziņojumu.
In wp-db.php (the file that handles the database connections that WordPress makes), you can see lines like “DB Constructor – connects to the server and selects a database” and “Select a DB (if another one needs to be selected)”. In wp-db.php (failu, ka rokturi Datubāzes savienojumi, WordPress padara), jūs varat redzēt līnijas, piemēram, "DB konstruktors - savienojumu ar serveri un izvēlas datu bāze" un "Izvēlieties DB (ja cita tāds ir jāizvēlas ) ". That's where you can alter the text and word in the error page. Tas ir, kur var mainīt tekstu, un vārdu kļūdas lapu. Just look carefully after the line, you will see exactly the some text and message as appeared on the database error page. Tikai rūpīgi pēc tam, kad līnija, jūs redzēsiet tieši tādu tekstu un ziņu, kā parādījās Datubāzes kļūda lapā. Edit them to your liking. Edit tos savā patika.

Beside, from line 312 onwards is the header and footer output for the HTML of database connection error page, contains inside function named “bail”, which specifies things like the title of “WordPress: Error”. Blakus, no line 312 gada ir galvenes un kājenes produkciju HTML datu bāzes savienojuma kļūda lapā, satur iekšpusē funkcija ar nosaukumu "bail", kas nosaka, lietas, piemēram, nosaukumu "WordPress: Error". The “bail” function is called whenever a database connection error is encountered, and does what it's name said – bails out the error and displays an error message instead to notify the users. The "bail" funkciju sauc kad datubāzes savienojums kļūdas ir radušās, un tas, ko tas vārds teica - galvojumi, kas kļūdas un parāda kļūdas ziņojumu, nevis paziņot lietotājiem. You can change them if you like too. Varat mainīt tās, ja vēlaties too.
Please take a backup of wp-db.php file before you customize or alter it. Lūdzu, a backup of wp-db.php fails, pirms Jūs pielāgot vai grozīt to. If you break the code, your website visitors and surfers will get the PHP error instead. Ja jūs pauze kodu, Jūsu mājas lapas apmeklētājiem un sērfotājiem iegūs PHP kļūda vietā. Beside, be careful that when you upgrade your WordPress. Blakus, uzmanīties, ka, ja jūs paaugstināt savu WordPress. If you overwrite all files when upgrade the WordPress, the wp-db.php will be replaced back with the original unchanged version too, and you have to edit the file again. Ja jūs pārrakstīt visus failus, kad uzlabot WordPress, tad wp-db.php tiks aizstāta atpakaļ ar oriģinālo nemainīgs versija pārāk, un jums, lai rediģētu failu vēlreiz. Else, backup the wp-db.php before upgrading your WordPress and restore it after upgrading is done. Else, backup uz wp-db.php pirms pārkārtošanās jūsu WordPress un atjaunot to pēc pārkārtošanās tiek darīts.
IMPORTANT : The page is machine translated and provided "as is" without warranty. SVARĪGI: Šī lapa ir mašīna tulkoto un ar nosacījumu ", kas ir" bez garantijas. Machine translation may be difficult to understand. Machine translation var būt grūti saprast. Please refer to Lūdzu, skatiet original English article oriģināls angļu rakstu whenever possible. kad vien iespējams.
Related Articles Saistītie raksti
- How to Change the Frequency or Interval WordPress Auto Saves An Editing Post or Page Kā nomainīt biežumu vai Interval WordPress Auto Ietaupa An Editing Post vai
- Paginating or Split WordPress Post or Page with NextPage in WordPress Not Working Paginating vai sadalīt WordPress Post vai ar Nextpage in WordPress Not Working
- Error Has Occurred While Establishing A Connection To SQL Server 2005 Which Does Not Allow Local and Remote Connections Kļūda, nosakot savienojums ar SQL Server 2005, kas neļauj Local and Remote Connections
- WordPress MySQL SQL Query Error in WPDB Class WordPress MySQL SQL vaicājumu Kļūda WPDB klase
- How to Convert Character Set and Collation of WordPress Database Kā Convert Character Set un apkopošana WordPress Database
- IMP-00016 Required Character Set Conversion Not Supported Error when Import to Oracle Database IMP-00016 Obligātā Character Set Konversiju Not Supported kļūdu, kad Imports uz Oracle Database
- Oracle EXP-00091 Error When Export Database Oracle EXP-00091 kļūdu Kad Export Database
- Change Oracle Database User Password Maina Oracle Database Lietotājs Parole
- Oracle Database Import Error 3113/3114 Oracle Database Import Error 3113/3114
- Modify and Change Remote Desktop Listening Port Modificējiet un pārmaiņām Remote Desktop Klausīšanās Port










































March 21st, 2009 23:51 Marts 21, 2009 23:51
Thanks! Pateicība!
You Saved Me Here! Jūs Saglabātās Me Here!