0

I'm trying to set up a MySQL database, and all seems to be working except I cannot get PHP files to communicate with it. Just to be clear, the PHP files are correct, along with the host name, username, and password (I got the files from EasyAPNS). I have all of the ports open and phpMyAdmin does work, and PHP files run. I cannot get the database to work though. When the PHP files from EasyAPNS are run, I get return data stating that "We're having a slight problem with the database". Is there any common extra configuration that I might be forgetting about? Thanks.

2 Answers 2

1
  1. Does your script requires any php-mysql/php-mysqli modules and are they already installed.?
  2. Did you checked the database connectivity from localhost.? If not, check that first,

    mysql -h localhost -u dbusername -pPassword

Try to isolate the issue first, whether it is actually a communication problem with php & mysql or it is some problem with the database itself.

1
  • I says "The mcrypt extension is missing. Please check your PHP configuration." That's what it tells me, and I'll look for more modules that I might need. Thanks for your help! Aug 30, 2011 at 0:35
1

Can you check this from shell...

$ cat > test.php
<? print_r(get_defined_functions()); ?>
CTRL^D
$ php test.php | grep mysql_conn

If this does not result in something like

        [1182] => mysql_connect

You are likely missing a php-mysql module ; or it is not loaded.

php.ini or include of php.ini should have something like

extension=mysql.so

mysql.so Is usually provided by extra package you can look up in your distributions package management system.

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .