mysql not working with php

0 votes

 I'm using Apache2, php5, and MySQL. Every time I try to run any database action in PHP, all scripts stop.

In the php.ini, I did enable the following :

extension=php_mysql.dll
extension=php_mysqli.dll    

The code to test the database:

echo '<p>testinp php script</p>'; 


// mysqli
$mysqli = new mysqli("localhost", "root", $pw, $db);

echo 'Still here<br>';

$result = $mysqli->query("SELECT * from test");
$row = $result->fetch_assoc();
print_r ($row);


echo 'Still here'; 

The "Still here" message is not displayed. How can I fix this?

Jun 24 in PHP by narikkadan
• 10,840 points
12 views

No answer to this question. Be the first to respond.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.

Related Questions In PHP

0 votes
1 answer

Connection with MySQL server using PHP. How can we do that?

Hey @kartik, You have to provide MySQL hostname, ...READ MORE

answered Mar 27, 2020 in PHP by Niroj
• 82,720 points
388 views
0 votes
1 answer

How to convert from MySQL datetime to another format with PHP?

Hello, To convert a date retrieved from MySQL ...READ MORE

answered May 19, 2020 in PHP by Niroj
• 82,720 points
829 views
0 votes
0 answers

Getting PHP registration form to connect with MYSQL

I'm building a test site and my ...READ MORE

May 30 in PHP by Kichu
• 19,040 points
11 views
0 votes
0 answers

Why is PHP session_destroy() not working?

Why is session_destroy() not working? Is there any other way ...READ MORE

Jun 12 in PHP by narikkadan
• 10,840 points
12 views
0 votes
0 answers
0 votes
0 answers

ErrorDocument 404 /404.php is not working in .htaccess file in PHP

This is the Content of my .htaccess file is: ErrorDocument ...READ MORE

Jun 21 in PHP by narikkadan
• 10,840 points
36 views
0 votes
0 answers

Can anyone confirm that phpMyAdmin AllowNoPassword works with MySQL databases?

I have a version of phpMyAdmin located ...READ MORE

Jun 3 in PHP by Kichu
• 19,040 points
33 views
0 votes
0 answers

How to open php files through localhost?

I am creating a student management program ...READ MORE

Jun 10 in PHP by narikkadan
• 10,840 points
5 views
0 votes
2 answers

Define a SQL query? What is the difference between SELECT and UPDATE Query? How do you use SQL in SAS?

HI.. SQL is Structured Query Language, which is ...READ MORE

answered Aug 8, 2020 in PHP by anonymous
4,483 views
0 votes
1 answer

Why is not preferable to use mysql_* functions in PHP?

The reasons are as follows: The MySQL extension: Does ...READ MORE

answered Sep 7, 2018 in Database by DataKing99
• 8,240 points
338 views
webinar REGISTER FOR FREE WEBINAR X
Send OTP
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP