Now, before someone marks this as a duplicate, I've been looking around on the internet for the last two days and have been unable to find a resolve for my issue.
All I'm trying to do is simply get mysql to run with php. But, no matter what I do, it still says that both mysql_connect() and mysqli_connect() are undefined functions.
I've tried installing both php5-mysql and php5-mysqlnd. I've tried configuring php.ini to enable the extension (I'd prefer to use the absolute path, but I cannot find mysql.so's absolute path anywhere on the internet).
I've tried uninstalling and purging all php/apache/mysql installations and reinstalling Apache, MySQL and PHP using this installation process http://howtoubuntu.org/how-to-install-lamp-on-ubuntu
And, people keep asking if I remembered to restart apache, yes, I did. No change.
Any light anyone can shed on this I'd be incredibly grateful for.
Some data you might find useful:
nathanf@nathanf:~⟫ php -v
PHP 5.3.29 (cli) (built: Mar 18 2016 02:32:59)
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2014 Zend Technologies
nathanf@nathanf:~⟫ php -m | grep mysql
<this didn't have any output>
nathanf@nathanf:~⟫ dpkg -s libapache2-mod-php5 | grep Status
Status: install ok installed
nathanf@nathanf:~⟫ dpkg -s php5-mysql | grep Status
Status: deinstall ok config-files
nathanf@nathanf:~⟫ dpkg -s php5-mysqlnd | grep Status
Status: install ok installed
sudo service apache2 restart;tail /var/log/apache2/error.log
* Restarting web server apache2
...done.
[Wed Apr 06 10:09:08.209690 2016] [core:notice] [pid 27834] AH00094: Command line: '/usr/sbin/apache2'
[Wed Apr 06 10:11:35.337736 2016] [mpm_prefork:notice] [pid 27834] AH00169: caught SIGTERM, shutting down
[Wed Apr 06 10:11:36.392695 2016] [mpm_prefork:notice] [pid 31633] AH00163: Apache/2.4.7 (Ubuntu) PHP/5.5.9-1ubuntu4.14 configured -- resuming normal operations
[Wed Apr 06 10:11:36.392726 2016] [core:notice] [pid 31633] AH00094: Command line: '/usr/sbin/apache2'
[Wed Apr 06 10:12:39.700572 2016] [mpm_prefork:notice] [pid 31633] AH00169: caught SIGTERM, shutting down
[Wed Apr 06 10:12:40.755404 2016] [mpm_prefork:notice] [pid 919] AH00163: Apache/2.4.7 (Ubuntu) PHP/5.5.9-1ubuntu4.14 configured -- resuming normal operations
[Wed Apr 06 10:12:40.755434 2016] [core:notice] [pid 919] AH00094: Command line: '/usr/sbin/apache2'
[Wed Apr 06 16:37:30.038532 2016] [mpm_prefork:notice] [pid 919] AH00169: caught SIGTERM, shutting down
[Wed Apr 06 16:37:31.371803 2016] [mpm_prefork:notice] [pid 25602] AH00163: Apache/2.4.7 (Ubuntu) PHP/5.5.9-1ubuntu4.14 configured -- resuming normal operations
[Wed Apr 06 16:37:31.371836 2016] [core:notice] [pid 25602] AH00094: Command line: '/usr/sbin/apache2'