You are here: Re: Database connection issues « PHP Programming Language « IT news, forums, messages
Re: Database connection issues

Posted by Rik on 07/16/07 21:22

[topposting fixed again, please don't do that]

>> >> > I am having very strange issues today. The scripts that I have,
>> that
>> >> > worked fine on Friday, now do not work properly. I can connect fine
>> >> > with a client application like MySql tools. I can do queries, and
>> >> > everything. I can even connect properly with mysqli, but apps that
>> use
>> >> > mysql to connect do not retrieve the information needed. I don't
>> get
>> >> > errors, so I don't know what is going on.
>> >> > I have no idea where to start, so if anyone has some idea, please
>> let
>> >> > em know.
>>
>> >> First course of action: ask the hoster what they've changed. MySQL
>> isn't
>> >> automatically included in packages anymore, maybe they did not
>> realize
>> >> that while upgrading.
>>
>> >> Then again, you should either get errors or empty recordsets. Are you
>> >> sure
>> >> display_errors is enabled with a proper error_reporting setting?
>> 'Does
>> >> not
>> >> work properly' does not compute here. Exactly what doesn't work, and
>> >> how.
>>
>> > It's on my server. Not an ISPs. display_errors is on.
>>
>> Check, and error_reporting level?
>>
>> > The only thing I can think of is that I ran apt-get upgrade. There was
>> > an error, that something wasn't installed, but I don't think it was
>> > anything to do with apache or php. I thought it was earlier last week
>> > though, before Friday.
>>
>> OK, so what is the error? What is the output of a single mysql_connect()
>> call? Does it give a resource? If yes, how are queries reacting, etc.,
>> etc. More info about what exactly is going wrong is required here.
>
> That's just it. There are no errors. The data just doesn't show up
> correctly. I copied the page that is suppose to display the data over
> to a different server, and that works. Hmmm.... I think I need to
> reinstall apache for some reason. The php.ini files for the 2 servers
> match.

Doesn't it show up, or does it show up messed up? Please be more precise
when reporting a problem, just saying it doesn't work correctly is hardly
constructive. Offcourse it's possible there's something wrong with either
Apache, MySQL or PHP install, but that's dubious.

If it works on another server, most likely the syntax is correct. Are you
using the same database server? Have you tried to make a simple testcase
as I said, with a mysql_connect() statement etc? A production page is
hardly the way to test for database problems, make a simple small page
with some connecting and queries like 'SHOW DATABASES', undependant on
other scripts and resources.

--
Rik Wasmus

 

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

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