Jump to content

SLOW MySQL after php update


Recommended Posts

php: 5.3.5

mysql: 5.1.41

using xampp

Hey. I just updated php from 5.3.1  to 5.3.5 (this was to run mediawiki)

After extracting the new files into I got the error Call to undefined function mysql_query() so I read the sticky on here about fixing it, I activated the php_mysql.ini module and MySQL was working again. The only problem is, it's taking around 1 second to process even the most simple queries.

I put together this, to make sure it wasn't just my application.

$test = 0;
while ($test <10){
$time_start = microtime(true);
mysql_connect("localhost",'myuser','mypassword');
mysql_selectdb("test");
$sql = mysql_query ( "
		SELECT *
		FROM `users`
" );
mysql_close();
$time_end = microtime(true);
$time = $time_end - $time_start;
echo "SQL test $test (traditional) $time seconds<br />";
$test ++;
}

which outputs this

SQL test 0 (traditional) 1.028904914856 seconds
SQL test 1 (traditional) 1.0245990753174 seconds
SQL test 2 (traditional) 1.0092370510101 seconds
SQL test 3 (traditional) 1.0117390155792 seconds
SQL test 4 (traditional) 1.0150861740112 seconds
SQL test 5 (traditional) 1.010293006897 seconds
SQL test 6 (traditional) 1.0164570808411 seconds
SQL test 7 (traditional) 1.0244569778442 seconds
SQL test 8 (traditional) 1.0180909633636 seconds
SQL test 9 (traditional) 1.0186388492584 seconds

What is wrong? is it MySQL or my php configuration? Here's my php.ini file

http://pastebin.com/Zkbqrq3u

'

 

I think it's probably PHP I can access the database with HeidiSQL and it works fine.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.