PhpDig.net

Go Back   PhpDig.net > PhpDig Forums > Script Installation

Reply
 
Thread Tools
Old 04-06-2006, 09:21 AM   #1
totobeloeil
Green Mole
 
Join Date: Apr 2006
Location: France
Posts: 12
White screen - pb with mysql_connect

Hello,
I can't connect to mySQL because something don't work :
I've got the 'echo' I put just before CONNECT.PHP calls mysql_connect, but I the 'echo' that is just after the call doesn't appear :
if (!defined('PHPDIG_DB_NAME')) {
define('PHPDIG_DB_PREFIX','');
define('PHPDIG_DB_HOST','localhost');
define('PHPDIG_DB_USER','root');
define('PHPDIG_DB_PASS','admin');
define('PHPDIG_DB_NAME','phpdig');
}
echo 'connect.php - avant appel de @mysql_connect<br>';
$id_connect = @mysql_connect(PHPDIG_DB_HOST,PHPDIG_DB_USER,PHPDIG_DB_PASS);
if (!$id_connect) {
echo ('out 1 connect.php<br>');
die("connect.php - Unable to connect to database : Check the connection script.\n");
}
echo 'connect.php - apres appel de @mysql_connect<br>';

The phpdig database and tables have been created in command-line mode, so mySQL is working.
What's wrong ?
totobeloeil is offline   Reply With Quote
Old 04-07-2006, 09:48 AM   #2
totobeloeil
Green Mole
 
Join Date: Apr 2006
Location: France
Posts: 12
Solved : MySQL is an extension of PHP

This was obvious :
MySQL is an extension of PHP.
So, another modification of php.ini is required.
See the official PHP documentation for further explanation :

http://www.php.net/manual/en/ref.mysql.php
totobeloeil is offline   Reply With Quote
Old 04-08-2006, 08:39 PM   #3
loanskey
Green Mole
 
Join Date: Feb 2006
Posts: 3
what you want us to look specifically over here ...


http://www.php.net/manual/en/ref.mysql.php


__________________
free loan information for UK is easy to get with loanskey.
We also provide loans providers details for United states as well. If you are a loan provider then please register yourself for free at Loanskey Network
loanskey is offline   Reply With Quote
Old 04-09-2006, 12:49 AM   #4
totobeloeil
Green Mole
 
Join Date: Apr 2006
Location: France
Posts: 12
Windows - Linking MySQL to PHP

Hi,

You can get more complete information here :
http://www.php.net/manual/en/install...extensions.php

For the installation of MySQL, I did the following modifications in the PHP.INI file :
extension_dir = "./ext/"
extension=php_mysqli.dll
extension=php_mysql.dll

Note that the lines are uncommented (i.e. without the leading ';').

Then, I created a folder 'ext' in the PHP directory, and put there the files 'php_mysqli.dll' and 'php_mysql.dll'.

I also copied the 'libmysql.dll' file into the folder C:\WINNT\System32 (because windows is there, could be C:\WINDOWS or anything else).

I found these files into the manual distribution of PHP.

The path to the PHP directory was specified during the installation of PHP, by adding it to the PATH environment variable (configuration panel / system / advanced).

Then, I restarted the machine, but I think you could jut restart the web server.

Then the install.php worked.

I hope this will be helpfull.
totobeloeil is offline   Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
PHP commands, Crontab and mysql_connect pugg09 Troubleshooting 0 12-15-2005 05:18 PM
Remote Screen Shots jmitchell Coding & Tutorials 6 01-09-2005 01:30 PM
Pb during Spidering logo2 Troubleshooting 18 01-07-2005 06:46 AM
search.php and blank screen gymsmoke Script Installation 1 04-04-2004 06:10 AM
indexing pb ??? Yannick Troubleshooting 1 12-16-2003 08:29 AM


All times are GMT -8. The time now is 02:29 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright © 2001 - 2005, ThinkDing LLC. All Rights Reserved.