Jump to content
Saguna

Problema Pornire Db.php (Access Denied)

Recommended Posts

Cand incerc sa ma conectez la baza de date, primesc urmatoarele erori:

 

Warning: mysqli::mysqli() [mysqli.mysqli]: (28000/1045): Access denied for user 'u697769081_1'@'10.2.1.26' (using password: YES) in /home/u697769081/public_html/inc/db/db.php on line 26

Fatal error: Call to undefined function fail() in /home/u697769081/public_html/inc/db/db.php on line 28
 
linia 26 - $db = new mysqli($db_host, $db_user, $db_pass, $db_name);
if (mysqli_connect_errno())
linia 28 - fail("MySQL connect", mysqli_connect_error());

Share this post


Link to post
Share on other sites

Ai gresit username sau parola si urma sa-ti arunce un mesaj de eroare, dar functia fail(arg1, arg2) nu este definita.

Share this post


Link to post
Share on other sites

S-a rezolvat conectarea dar acum imi da altceva:

 

Warning: require_once(lang/.php) [function.require-once]: failed to open stream: No such file or directory in /home/u697769081/public_html/index.php on line 74

Fatal error: require_once() [function.require]: Failed opening required 'lang/.php' (include_path='.:/opt/php-5.3/pear') in /home/u697769081/public_html/index.php on line 74

Share this post


Link to post
Share on other sites

Da inteleg, ma uit foarte atent crede-ma, deci asta e linia cu problema require_once "lang/".$lang.".php";  si am reeditat-o in require_once "lang".$lang.".php";

si degeaba. apre la fel eroarea dar fara acel / ... 

Share this post


Link to post
Share on other sites

Acum ca ai pus contextul, inteleg mai bine.

lang este folderul cu limbile si $lang este variabila. In cazul asta, pune slashul la loc.

Erorile iti apar din cauza ca nu-ti gaseste definitiile functiilor si variabilelor.

Se pare ca ai o problema majora cu structura folderelor, locatia fisierelor sursa sau ai uitat sa incluzi ce trebuie prin surse.

Share this post


Link to post
Share on other sites

S-a rezolvat, nu isi gasea sursa pentru a-si alege limba:

require_once "lang/".$lang.".php";

asa era corect:

require_once "lang/en".$lang.".php";

 
Mersi de ajutor, adica daca nu imi atrageai atentia... nu cred ca rezolvam!
Respect!

Share this post


Link to post
Share on other sites

Nu e normal sa functioneze asa. Tocmai ce ai facut abstractie de variabila $lang.

require_once "lang/en".$lang.".php";

sau

require_once "lang/en.php";

tot aia e. Normal ar fi trebuit sa mearga asa:

require_once "lang/".$lang.".php";

si $lang sa ia diferite valori (en,cz,de,ro, etc...), in functie de limba selectata in program.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...