No output after mysql_connect

No output after mysql_connect

am 12.02.2007 11:24:38 von Dinesh Kumar

Hi MySQLers

I have written following script:
------------------------------------------------------------ ----------
echo 'Hello World';
$con = mysql_connect('localhost', 'dinesh', 'dinesh');
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
echo 'connected';
?>

------------------------------------------------------------ ------------
On execute, I find that 'Hello World' only is printed.
no code below mysql_connect function call get executed.
I do not get the errormessage also. Hence I do not know whether I am
connected.
Bytheway, I am able to connect through commandline interface using given
username and password.

Please help.

Regards

Dinesh


--
MySQL Windows Mailing List
For list archives: http://lists.mysql.com/win32
To unsubscribe: http://lists.mysql.com/win32?unsub=gcdmw-win32@m.gmane.org

Re: No output after mysql_connect

am 12.02.2007 14:58:05 von Tobin Cataldo

This is probably not a MySQL issue...
Set your error.log in your php.ini. If you have already set that then
the error should show up there. Also check the web server log for errors.

Dinesh Kumar wrote:
> Hi MySQLers
>
> I have written following script:
> ------------------------------------------------------------ ----------
> > echo 'Hello World';
> $con = mysql_connect('localhost', 'dinesh', 'dinesh');
> if (!$con)
> {
> die('Could not connect: ' . mysql_error());
> }
> echo 'connected';
> ?>
>
> ------------------------------------------------------------ ------------
> On execute, I find that 'Hello World' only is printed.
> no code below mysql_connect function call get executed.
> I do not get the errormessage also. Hence I do not know whether I am
> connected.
> Bytheway, I am able to connect through commandline interface using given
> username and password.
>
> Please help.
>
> Regards
>
> Dinesh
>


--
MySQL Windows Mailing List
For list archives: http://lists.mysql.com/win32
To unsubscribe: http://lists.mysql.com/win32?unsub=gcdmw-win32@m.gmane.org

Re: No output after mysql_connect

am 13.02.2007 06:34:27 von Dinesh Kumar

Hi
I have checked the web server log. It contains following error:

[Tue Feb 13 10:54:57 2007] [error] [client 172.16.16.50] PHP
Fatal error: Call to undefined function mysql_connect() in C:\\Program
Files\\Apache Software Foundation\\Apache2.2\\htdocs\\index.php on line 5,
referer: http://172.16.16.50/

Dinesh
----- Original Message -----
From: "Tobin Cataldo"

> This is probably not a MySQL issue...
> Set your error.log in your php.ini. If you have already set that then the
> error should show up there. Also check the web server log for errors.
------------------------------------------------------------ ----------
> > echo 'Hello World';
> $con = mysql_connect('localhost', 'dinesh', 'dinesh');
> if (!$con)
> {
> die('Could not connect: ' . mysql_error());
> }
> echo 'connected';
> ?>
> ------------------------------------------------------------ ------------


--
MySQL Windows Mailing List
For list archives: http://lists.mysql.com/win32
To unsubscribe: http://lists.mysql.com/win32?unsub=gcdmw-win32@m.gmane.org

Re: No output after mysql_connect

am 13.02.2007 11:44:40 von Jorge Bastos

So your mysql.so php extention isn't beeing loaded

do you have libmysql.dll in windows PATH ?


----- Original Message -----
From: "Dinesh Kumar"
To: "Tobin Cataldo"
Cc:
Sent: Tuesday, February 13, 2007 5:34 AM
Subject: Re: No output after mysql_connect


> Hi
> I have checked the web server log. It contains following error:
>
> [Tue Feb 13 10:54:57 2007] [error] [client 172.16.16.50] PHP
> Fatal error: Call to undefined function mysql_connect() in C:\\Program
> Files\\Apache Software Foundation\\Apache2.2\\htdocs\\index.php on line 5,
> referer: http://172.16.16.50/
>
> Dinesh
> ----- Original Message -----
> From: "Tobin Cataldo"
>
>> This is probably not a MySQL issue...
>> Set your error.log in your php.ini. If you have already set that then the
>> error should show up there. Also check the web server log for errors.
> ------------------------------------------------------------ ----------
>> >> echo 'Hello World';
>> $con = mysql_connect('localhost', 'dinesh', 'dinesh');
>> if (!$con)
>> {
>> die('Could not connect: ' . mysql_error());
>> }
>> echo 'connected';
>> ?>
>> ------------------------------------------------------------ ------------
>
>
> --
> MySQL Windows Mailing List
> For list archives: http://lists.mysql.com/win32
> To unsubscribe:
> http://lists.mysql.com/win32?unsub=mysql.jorge@decimal.pt
>
>


--
MySQL Windows Mailing List
For list archives: http://lists.mysql.com/win32
To unsubscribe: http://lists.mysql.com/win32?unsub=gcdmw-win32@m.gmane.org

Re: No output after mysql_connect

am 14.02.2007 06:28:08 von Dinesh Kumar

It was not there.
I now copied it to windows path.
Now I am getting the error displayed on the browser:

Fatal error: Call to undefined function mysql_connect() in C:\Program
Files\Apache Software Foundation\Apache2.2\htdocs\index.php on line 5

----- Original Message -----
From: "Jorge Bastos"
To:
Sent: Tuesday, February 13, 2007 4:14 PM
Subject: Re: No output after mysql_connect


> So your mysql.so php extention isn't beeing loaded
>
> do you have libmysql.dll in windows PATH ?


--
MySQL Windows Mailing List
For list archives: http://lists.mysql.com/win32
To unsubscribe: http://lists.mysql.com/win32?unsub=gcdmw-win32@m.gmane.org

Re: No output after mysql_connect

am 14.02.2007 11:42:11 von Jorge Bastos

Still's correct.

in your php.ini, do you have extension=mysql.dll ?

find for "extension" and add this on it and restart apache

----- Original Message -----
From: "Dinesh Kumar"
To: "Jorge Bastos" ;
Sent: Wednesday, February 14, 2007 5:28 AM
Subject: Re: No output after mysql_connect


> It was not there.
> I now copied it to windows path.
> Now I am getting the error displayed on the browser:
>
> Fatal error: Call to undefined function mysql_connect() in C:\Program
> Files\Apache Software Foundation\Apache2.2\htdocs\index.php on line 5
>
> ----- Original Message -----
> From: "Jorge Bastos"
> To:
> Sent: Tuesday, February 13, 2007 4:14 PM
> Subject: Re: No output after mysql_connect
>
>
>> So your mysql.so php extention isn't beeing loaded
>>
>> do you have libmysql.dll in windows PATH ?
>
>

--
MySQL Windows Mailing List
For list archives: http://lists.mysql.com/win32
To unsubscribe: http://lists.mysql.com/win32?unsub=gcdmw-win32@m.gmane.org

Re: No output after mysql_connect

am 14.02.2007 12:39:38 von Dinesh Kumar

there is no entry extension=mysql.dll in my php.ini
what is worse, the file mysql.dll does not exist anywhere in my system.
this is despite the fact that my mysql installation completed smoothly.

Dinesh

----- Original Message -----
From: "Jorge Bastos"

> Still's correct.
>
> in your php.ini, do you have extension=mysql.dll ?
>
> find for "extension" and add this on it and restart apache
>
> ----- Original Message -----
> From: "Dinesh Kumar"
> To: "Jorge Bastos" ;
> Sent: Wednesday, February 14, 2007 5:28 AM
> Subject: Re: No output after mysql_connect
>
>
>> It was not there.
>> I now copied it to windows path.
>> Now I am getting the error displayed on the browser:
>>
>> Fatal error: Call to undefined function mysql_connect() in C:\Program
>> Files\Apache Software Foundation\Apache2.2\htdocs\index.php on line 5
>>
>> ----- Original Message -----
>> From: "Jorge Bastos"
>> To:
>> Sent: Tuesday, February 13, 2007 4:14 PM
>> Subject: Re: No output after mysql_connect
>>
>>
>>> So your mysql.so php extention isn't beeing loaded
>>>
>>> do you have libmysql.dll in windows PATH ?
>>
>>

--
MySQL Windows Mailing List
For list archives: http://lists.mysql.com/win32
To unsubscribe: http://lists.mysql.com/win32?unsub=gcdmw-win32@m.gmane.org

Re: No output after mysql_connect

am 14.02.2007 14:42:16 von Tobin Cataldo

Its 'php_mysql.dll' in the php/ext subdirectory. My php.ini entry for
this extension is on line 651.

Also look for this bit (mine is on line 520):
; Directory in which the loadable extensions (modules) reside.
extension_dir = "./ext"

You may need to adjust the extension directory to reflect your set up.



Dinesh Kumar wrote:
> there is no entry extension=mysql.dll in my php.ini
> what is worse, the file mysql.dll does not exist anywhere in my system.
> this is despite the fact that my mysql installation completed smoothly.
>
> Dinesh
>
> ----- Original Message ----- From: "Jorge Bastos"
>
>
>> Still's correct.
>>
>> in your php.ini, do you have extension=mysql.dll ?
>>
>> find for "extension" and add this on it and restart apache
>>
>> ----- Original Message ----- From: "Dinesh Kumar"
>>
>> To: "Jorge Bastos" ;
>> Sent: Wednesday, February 14, 2007 5:28 AM
>> Subject: Re: No output after mysql_connect
>>
>>
>>> It was not there.
>>> I now copied it to windows path.
>>> Now I am getting the error displayed on the browser:
>>>
>>> Fatal error: Call to undefined function mysql_connect() in
>>> C:\Program Files\Apache Software
>>> Foundation\Apache2.2\htdocs\index.php on line 5
>>>
>>> ----- Original Message ----- From: "Jorge Bastos"
>>>
>>> To:
>>> Sent: Tuesday, February 13, 2007 4:14 PM
>>> Subject: Re: No output after mysql_connect
>>>
>>>
>>>> So your mysql.so php extention isn't beeing loaded
>>>>
>>>> do you have libmysql.dll in windows PATH ?
>>>
>>>
>


--
MySQL Windows Mailing List
For list archives: http://lists.mysql.com/win32
To unsubscribe: http://lists.mysql.com/win32?unsub=gcdmw-win32@m.gmane.org

Re: No output after mysql_connect

am 14.02.2007 14:54:27 von Jorge Bastos

but it's correct.
mysql.dll does not come with mysql, but with php or you have to grab it
separatly on:

for php 5.2x
http://www.php.net/get/pecl-5.2.1-Win32.zip/from/a/mirror



----- Original Message -----
From: "Dinesh Kumar"
To: "Jorge Bastos"
Cc:
Sent: Wednesday, February 14, 2007 11:39 AM
Subject: Re: No output after mysql_connect


> there is no entry extension=mysql.dll in my php.ini
> what is worse, the file mysql.dll does not exist anywhere in my system.
> this is despite the fact that my mysql installation completed smoothly.
>
> Dinesh
>
> ----- Original Message -----
> From: "Jorge Bastos"
>
>> Still's correct.
>>
>> in your php.ini, do you have extension=mysql.dll ?
>>
>> find for "extension" and add this on it and restart apache
>>
>> ----- Original Message -----
>> From: "Dinesh Kumar"
>> To: "Jorge Bastos" ;
>> Sent: Wednesday, February 14, 2007 5:28 AM
>> Subject: Re: No output after mysql_connect
>>
>>
>>> It was not there.
>>> I now copied it to windows path.
>>> Now I am getting the error displayed on the browser:
>>>
>>> Fatal error: Call to undefined function mysql_connect() in C:\Program
>>> Files\Apache Software Foundation\Apache2.2\htdocs\index.php on line 5
>>>
>>> ----- Original Message -----
>>> From: "Jorge Bastos"
>>> To:
>>> Sent: Tuesday, February 13, 2007 4:14 PM
>>> Subject: Re: No output after mysql_connect
>>>
>>>
>>>> So your mysql.so php extention isn't beeing loaded
>>>>
>>>> do you have libmysql.dll in windows PATH ?
>>>
>>>
>

--
MySQL Windows Mailing List
For list archives: http://lists.mysql.com/win32
To unsubscribe: http://lists.mysql.com/win32?unsub=gcdmw-win32@m.gmane.org

Re: No output after mysql_connect

am 15.02.2007 06:31:21 von Dinesh Kumar

Hi ALL

I have enabled the php_mysql.dll entry in php.ini.
I also corrected the "; Directory in which the loadable extensions
(modules) reside."
entry to 'extension_dir=./ext' .
Now the database connects.
Thanks.

Dinesh

----- Original Message -----
From: "Tobin Cataldo"
To:
Sent: Wednesday, February 14, 2007 7:12 PM
Subject: Re: No output after mysql_connect


> Its 'php_mysql.dll' in the php/ext subdirectory. My php.ini entry for this
> extension is on line 651.
>
> Also look for this bit (mine is on line 520):
> ; Directory in which the loadable extensions (modules) reside.
> extension_dir = "./ext"
>
> You may need to adjust the extension directory to reflect your set up.


--
MySQL Windows Mailing List
For list archives: http://lists.mysql.com/win32
To unsubscribe: http://lists.mysql.com/win32?unsub=gcdmw-win32@m.gmane.org