Reply to Re: PHP MySQL Connect Problem

Your name:

Reply:


Posted by Ian M Robertson on 12/20/06 22:11

yes_its_just_me@yahoo.com wrote:

> Hi everyone, I haven't used PHP since version 4 and am trying to use it
> for a new project. All I'm trying to do is connect to a MySQL database
> and show the contents of that database (as a start). However, nothing
> seems to be working. When I execute the script it does nothing, no
> error messages, nothing. I know that PHP is working because I've done
> the phpinfo(); thing and it works. I also know my database is working
> because I can access it from the command line and do whatever I want
> with it. So for some reason I'm not able to connect to it from PHP, but
> since I'm not getting any errors I have no clue what's wrong. I've
> included my code below. This is all set within the body tag. I'm trying
> to connect to a database called newsletter_emails and show the results
> of a table called newsletter_members. Any help would be appreciated.
> Thanks, Josh.

Could be a number of things - ( eg perhaps selinux is preventing php from
contacting mysql - had that problem on fedora - disable selinux to check )

So would be usefull to know what platform you are on. As the others have
posted some debug info would be helpfull - have a look
in /var/log/httpd/error_log ( on most unix ) that may give some idea of the
problem

Do you have the mysql component of php installed . With php5 the mysql lib
is not bundled ( unlike php4 )

Hope this gives you some pointers
IanR

--
homepage http://narian.org.uk

[Back to original 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

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