You are not logged in.

#1 2014-06-19 19:40:49

Hugao
Member
From: Portugal
Registered: 2014-02-25
Posts: 27
Website

PHP modules not loading

Hey,

I'm having a problem with my PHP. The extension mysqli isn't loading. I already see some topics here but still i can't fix the problem. I already reinstall apache, php and all php extensions and still the problem continues. In phpinfo() the extension appears but I can't get values from mariadb and the output of vardump($link); its nothing, literally.

Can anyone help me?

Offline

#2 2014-06-20 14:02:42

xero
Member
From: ~/
Registered: 2014-04-02
Posts: 86
Website

Re: PHP modules not loading

can you connect to mariadb from the commanline or another db app like Emma? is the module enabled (uncommented) in your php.ini?


▬▬ι═══════ﺤ
http://git.io/.files

Offline

#3 2014-06-20 14:52:42

Hugao
Member
From: Portugal
Registered: 2014-02-25
Posts: 27
Website

Re: PHP modules not loading

xero wrote:

can you connect to mariadb from the commanline or another db app like Emma? is the module enabled (uncommented) in your php.ini?

yes and yes

Offline

#4 2014-06-20 19:57:55

xero
Member
From: ~/
Registered: 2014-04-02
Posts: 86
Website

Re: PHP modules not loading

how about

mysqli.allow_local_infile = On

maybe it's `1` not `On`, i can't remember off hand. also i assume you've restarted the services after ini changes?


▬▬ι═══════ﺤ
http://git.io/.files

Offline

#5 2014-06-20 20:01:27

Spider.007
Member
Registered: 2004-06-20
Posts: 1,175

Re: PHP modules not loading

Show us your php code of how you construct $link

Offline

#6 2014-06-20 20:15:03

Hugao
Member
From: Portugal
Registered: 2014-02-25
Posts: 27
Website

Re: PHP modules not loading

Spider.007 wrote:

Show us your php code of how you construct $link

$link=mysqli_connect("127.0.0.1","root","Ee0m1pC","mysql") or die (mysqli_error($c));
vardump($link);
$query = $link->query("select * from user");
vardump($query);

phpmyadmin gives the same error, says that mysqli isn't available.

Offline

#7 2014-06-20 20:16:11

Spider.007
Member
Registered: 2004-06-20
Posts: 1,175

Re: PHP modules not loading

Does

print_r(get_loaded_extensions());

show it?

Offline

#8 2014-06-20 20:19:03

Hugao
Member
From: Portugal
Registered: 2014-02-25
Posts: 27
Website

Re: PHP modules not loading

Spider.007 wrote:

Does

print_r(get_loaded_extensions());

show it?

Array ( [0] => Core [1] => date [2] => ereg [3] => libxml [4] => pcre [5] => zlib [6] => ctype [7] => dom [8] => fileinfo [9] => filter [10] => hash [11] => json [12] => mbstring [13] => SPL [14] => PDO [15] => Reflection [16] => session [17] => SimpleXML [18] => standard [19] => tokenizer [20] => xml [21] => xmlreader [22] => xmlwriter [23] => mysqlnd [24] => apache2handler [25] => curl [26] => gd [27] => gettext [28] => mcrypt [29] => mysqli [30] => mhash )

Offline

#9 2014-06-20 20:35:59

Hugao
Member
From: Portugal
Registered: 2014-02-25
Posts: 27
Website

Re: PHP modules not loading

xero wrote:

how about

mysqli.allow_local_infile = On

maybe it's `1` not `On`, i can't remember off hand. also i assume you've restarted the services after ini changes?

Now I can access to phpmyadmin, but when I run my scripts this error appears:

Fatal error: Call to undefined function mysqli_connect() in /home/hugo/public_html/teste.php on line 4

Edit:

Now I can't access phpMyAdmin neither

Last edited by Hugao (2014-06-20 20:47:48)

Offline

Board footer

Powered by FluxBB