# Call to undefined function mysql_connect()

## yuriambrosio

Hello

I set up apache2 and php using these two manuals

https://wiki.gentoo.org/wiki/PHP

https://wiki.gentoo.org/wiki/Apache/it

on a x86_64 machine

Now the problem is that php seems to have no extensions (mysql, mysqli,...) and now of course I cannot use functions defined in those extensions for example mysql_connect().

How can I cope with this problem?

I've already checked the output of phpinfo() and I noticed that the set extension_dir (/usr/lib64/php5.6/lib/extensions/no-debug-non-zts-20131226) is empty, it doesnt exist.

I've also tryed a brutal way, since I can't find extensions installed on my system I downloaded the rpm php-mysql and extracted (it contains the folder extension with mysql.so, mysqli.so etc...) and set the php.ini properly. Same result. I'm going crazy since yesterday. Give me a hand please!

----------

## fedeliallalinea

Use flag for mysql on php package is activated?

----------

## Hu

Please post the output of emerge --info --verbose dev-db/mysql dev-lang/php www-servers/apache.

----------

## yuriambrosio

Someone suggested me to install XAMPP, and I did it, resolving.

Thanks to you all

----------

## Syl20

 *yuriambrosio wrote:*   

> Someone suggested me to install XAMPP

 

Someone should stop suggest...  :Rolling Eyes: 

It's like running a preconfigured VM on your machine (who said Docker ?). Install Windows and WAMP or EasyPHP, you'll get the same service.

Yes, that works. Today. But did you understand what you did ? Do you know what is running exactly ? How will you repair it once broken (yes, you will break it some day) ? How will you secure it ? Keep it up-to-date ?

Give you help. Uninstall XAMPP, and try to fix the small error you posted above. You'll learn lots of things about your system.

----------

