You are here: Re: mysql_connect stops via php « PHP Programming Language « IT news, forums, messages
Re: mysql_connect stops via php

Posted by Jerry Stuckle on 11/04/07 23:17

farhan wrote:
> On Nov 4, 8:05 pm, macca <ptmcna...@googlemail.com> wrote:
>> Howz about posting your code?
>>
>> Apart from that, check the settings in your php.ini file and make sure
>> that error reporting is turned on:
>>
>> set
>>
>> error_reporting = E_ALL
>>
>> and
>>
>> display_errors = On
>>
>> restart the server and run the script again.
>
> Here it is:
>
> <?php
> $username = "root";
> $password = "budget";
> $database = "budget";
>
> echo "foobar1";
>
> $link = mysql_connect("192.168.1.100", $username, $password);
>
> echo "foobar2";
>
> if (!$link) {
> die('Could not connect: ' . mysql_error());
> }
>
> echo 'Connected successfully';
> ?>
>
> HTML that is generated with this script is completely blank. Thanks
> for the display_errors = on tip, it is reporting errors (for other
> scripts) but nothing new for this one.
>
> Thanks again,
> Farhan
>
>

How long did you wait? If, for instance, the mysql_connect() takes a
long time to time out, you could be waiting for a while. And since by
default everything will be buffered, the echo "foobar1"; wouldn't be
seen, either.

Is the mysql server available on your intranet at that address? And is
MySql running?

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация