472,353 Members | 1,192 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,353 software developers and data experts.

Please help me connect PHP to MySql - Newbie problem

Hello,

I'm a newbie at PHP and MySql, although I have wads of experience of
ASP, ASP.NET, SQL Server, etc.

I have just installed PHP 5.2.3 on a server (Windows Server 2003), as
well as MySql 5.0.45. Both of these work fine independently, but I can't
get PHP to connect to MySql.

The first (and probably most basic) problem is that when I run phpinfo()
I don't see any mention of MySql. I suspect that this is the cause of
the lack of connectivity.

I have removed the comments from the following two lines in php.ini
(which is in C:\Windows)...

extension=php_mysql.dll
extension=php_mysqli.dll

I've also got the following line in there...

extension_dir = "C:\Program Files\PHP\ext\"

which points to the folder containing the two DLLs mentioned above.

I've rebooted the machine a couple of times since making these changes.

As I said, when I run phpinfo(), it doesn't mention MySql at all.

Anyone any ideas? If I try to connect, nothing happens. No errors,
nothing. I tried the following sample script from
http://uk.php.net/manual/en/function.mysql-connect.php to test it...

<?php
$link = mysql_connect('localhost', 'mysql_user', 'mysql_password');
if (!$link) {
die('Could not connect: ' . mysql_error());
}
echo 'Connected successfully';
mysql_close($link);
?>

(where I changed the user name and password obviously), but this didn't
produce anything. No message, no error, just a blank page.

TIA for any help

--
Alan Silver
(anything added below this line is nothing to do with me)
Jul 16 '08 #1
0 1071

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: James | last post by:
Please help - getting very desperate! Sun, 12 October 2003 05:39 I have PHPDEV 4.2.3 from Firepages.com.au as the upgrade to 4.3.0 did not...
1
by: Marc | last post by:
Hello, Newbie here..... Searching and working this for a week now. We too are having the same problems. Using MySql 4.0.14 and there are "no...
5
by: duikboot | last post by:
Hi all, I'm trying to export a view tables from a Oracle database to a Mysql database. I create insert statements (they look alright), but it...
0
by: Mark Adams | last post by:
I really need some help with this. MySQL will not start on boot despite everything I've done to make sure that it is set to do so. When I start...
1
by: jiing | last post by:
Now let me describe what I have done and my purpose: Originally, I want to user ports to install phpBB But I found that phpBB doesn't support...
2
by: B Squared | last post by:
This is a bit of a newbie question -- I've just installed MySQL 4.1.13 on a Fedora core 3 system. It installed great. It wasn't hard to get it...
2
by: Martin | last post by:
Hi all. I have a fully functional page hosted on my PC that uses PHP and connects to MySQL on my PC to generate it's code. I now have some web...
5
by: suma | last post by:
hi to all plaese help me i have same problem when download the phpdev and phptriad i cant connect to mysql when click the MyAdmin apear this...
10
rhitam30111985
by: rhitam30111985 | last post by:
hi all .. java/jdbc newbie here ... i cant seem to perform the most basic step for database connectivity using java . here is my code : import...
1
by: Kemmylinns12 | last post by:
Blockchain technology has emerged as a transformative force in the business world, offering unprecedented opportunities for innovation and...
0
jalbright99669
by: jalbright99669 | last post by:
Am having a bit of a time with URL Rewrite. I need to incorporate http to https redirect with a reverse proxy. I have the URL Rewrite rules made...
0
by: antdb | last post by:
Ⅰ. Advantage of AntDB: hyper-convergence + streaming processing engine In the overall architecture, a new "hyper-convergence" concept was...
0
by: Matthew3360 | last post by:
Hi there. I have been struggling to find out how to use a variable as my location in my header redirect function. Here is my code. ...
2
by: Matthew3360 | last post by:
Hi, I have a python app that i want to be able to get variables from a php page on my webserver. My python app is on my computer. How would I make it...
0
by: Arjunsri | last post by:
I have a Redshift database that I need to use as an import data source. I have configured the DSN connection using the server, port, database, and...
0
hi
by: WisdomUfot | last post by:
It's an interesting question you've got about how Gmail hides the HTTP referrer when a link in an email is clicked. While I don't have the specific...
0
Oralloy
by: Oralloy | last post by:
Hello Folks, I am trying to hook up a CPU which I designed using SystemC to I/O pins on an FPGA. My problem (spelled failure) is with the...
0
by: Carina712 | last post by:
Setting background colors for Excel documents can help to improve the visual appeal of the document and make it easier to read and understand....

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.