Jump to content

Problema Pornire Db.php (Access Denied)


Recommended Posts

Posted

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());

Posted

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
Posted

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 / ... 

Posted

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.

  • Upvote 1
Posted

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!

Posted

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.

  • Upvote 2

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.