View previous topic :: View next topic |
Author |
Message |
yuriambrosio n00b

Joined: 17 Oct 2009 Posts: 47
|
Posted: Sun Jul 24, 2016 9:07 am Post subject: Call to undefined function mysql_connect() |
|
|
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! |
|
Back to top |
|
 |
fedeliallalinea Bodhisattva


Joined: 08 Mar 2003 Posts: 25111 Location: here
|
Posted: Sun Jul 24, 2016 1:09 pm Post subject: |
|
|
Use flag for mysql on php package is activated? _________________ Questions are guaranteed in life; Answers aren't. |
|
Back to top |
|
 |
Hu Moderator

Joined: 06 Mar 2007 Posts: 16461
|
Posted: Sun Jul 24, 2016 3:59 pm Post subject: |
|
|
Please post the output of emerge --info --verbose dev-db/mysql dev-lang/php www-servers/apache. |
|
Back to top |
|
 |
yuriambrosio n00b

Joined: 17 Oct 2009 Posts: 47
|
Posted: Sun Jul 24, 2016 5:06 pm Post subject: |
|
|
Someone suggested me to install XAMPP, and I did it, resolving.
Thanks to you all |
|
Back to top |
|
 |
Syl20 Guru


Joined: 04 Aug 2005 Posts: 568 Location: France
|
Posted: Tue Jul 26, 2016 1:07 pm Post subject: |
|
|
yuriambrosio wrote: | Someone suggested me to install XAMPP |
Someone should stop suggest...
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. |
|
Back to top |
|
 |
|