Can't Install MySQL with PHP

Hi,

I'm on a Raspberry Pi with Raspbian Wheezy.

I urgently need to get MySQL running with PHP, but I get an error.
For example:

$con=mysql_connect("127.0.0.1","root","******","ids");

gives

PHP Fatal error:  Call to undefined function mysql_connect()

So, I found I needed to install some packages to get PHP working with MySQL but they all 404 like so:

root@raspberrypi:/var/www/note/framework# apt-get install php5-mysql
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
  libasound2-dev libavahi-common-dev libcaca-dev libdirectfb-extra libelf1 libglib2.0-bin libglib2.0-dev libpcre3-dev libpcrecpp0 libpng12-dev libpthread-stubs0
  libpthread-stubs0-dev libpulse-mainloop-glib0 libslang2-dev libts-dev libxau-dev libxcb1-dev libxdmcp-dev x11proto-core-dev x11proto-input-dev x11proto-kb-dev
  x11proto-xext-dev xorg-sgml-doctools xtrans-dev
Use 'apt-get autoremove' to remove them.
The following NEW packages will be installed:
  php5-mysql
0 upgraded, 1 newly installed, 0 to remove and 168 not upgraded.
Need to get 68.8 kB of archives.
After this operation, 220 kB of additional disk space will be used.
Err http://mirrordirector.raspbian.org/raspbian/ wheezy/main php5-mysql armhf 5.4.4-14
  404  Not Found
Failed to fetch http://mirrordirector.raspbian.org/raspbian/pool/main/p/php5/php5-mysql_5.4.4-14_armhf.deb  404  Not Found
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?

and

root@raspberrypi:/var/www/note/framework# apt-get install php5-mysqlnd
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
  libasound2-dev libavahi-common-dev libcaca-dev libdirectfb-extra libelf1 libglib2.0-bin libglib2.0-dev libpcre3-dev libpcrecpp0 libpng12-dev libpthread-stubs0
  libpthread-stubs0-dev libpulse-mainloop-glib0 libslang2-dev libts-dev libxau-dev libxcb1-dev libxdmcp-dev x11proto-core-dev x11proto-input-dev x11proto-kb-dev
  x11proto-xext-dev xorg-sgml-doctools xtrans-dev
Use 'apt-get autoremove' to remove them.
The following NEW packages will be installed:
  php5-mysqlnd
0 upgraded, 1 newly installed, 0 to remove and 168 not upgraded.
Need to get 150 kB of archives.
After this operation, 413 kB of additional disk space will be used.
Err http://mirrordirector.raspbian.org/raspbian/ wheezy/main php5-mysqlnd armhf 5.4.4-14
  404  Not Found
Failed to fetch http://mirrordirector.raspbian.org/raspbian/pool/main/p/php5/php5-mysqlnd_5.4.4-14_armhf.deb  404  Not Found
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?

Can anybody help?

Freddy

EDIT: I have run apt-get update.

404 error has nothing to do with the operating system or its configuration but with the repository where you're trying to fetch the file from.

Try using a different mirror.

If you don't want to mess with Aptitude and its repos, you can also download the package by hand and install it with dpkg.

Here's a mirror that has the file but there may be many others.

I know what a 404 error is :stuck_out_tongue: it just seemed unlikely that a major repository wouldn't have such a major package.

Your mirror worked, anyway, thanks :slight_smile:

Freddy