Sorry I didn't mean work literally, but it should return the error you are looking for to describe what's up. Likewise with the other lines remove the or exit(); in case you have a typo. "Mike Quinn" <michael@stey.com> escribió en el mensaje 20031001104640.43341.qmail@pb1.pair.com">news:20031001104640.43341.qmail@pb1.pair.com... > Hi Morton, > > Remove or exit(); on the mysql_select_db("sampdb"); and that should work for > you! > > Regards, > > Michael Quinn > > "Morten Gulbrandsen" <mgu@owi-aachen.de> escribió en el mensaje > 20031001102400.3167.qmail@pb1.pair.com">news:20031001102400.3167.qmail@pb1.pair.com... > Thanks, > > > > I did, and now I can restart Apache. > > Here is my simplest PHP script. > > > > <?php echo $_SERVER["REMOTE_ADDR"]; ?> > > > > And the output is > > > > 127.0.0.1 > > > > Can't ask for more than that! > > > > I hacked a small script in order to connect to MySQL, > > containing these lines. > > > > <html> > <head> > <title>a simple example</title> > </head> > <body bgcolor="white"> > <p>Welcome to the very first MySQL database.</p> > <?php > # USHL home page > $conn_id = @mysql_connect ("localhost", "sampadm", "secret") > or exit (); > mysql_select_db ("sampdb") > or exit (); > $result_id = mysql_query ("SELECT COUNT(*) FROM member") > or exit (); > if ($row = mysql_fetch_row ($result_id)) > print ("<p>The League currently has " . $row[0] . " members.</p>"); > mysql_free_result ($result_id); > ?> > </body> > </html> > > > > > > > > > > Unfortunately I did not get anything else than the HTML paragraph. > > > > However, if I run this query from the command prompt, > > > > > C:\mysql\bin>mysql -h localhost -u sampadm -psecret sampdb > Welcome to the MySQL monitor. Commands end with ; or \g. > Your MySQL connection id is 408 to server version: 4.1.0-alpha-max-debug > > > > Type 'help;' or '\h' for help. Type '\c' to clear the buffer. > > > > mysql> select count(*) from member; > +----------+ > | count(*) | > +----------+ > | 102 | > +----------+ > 1 row in set (0.05 sec) > > > > mysql> > > I Do get a result, but not from php + apache, only from the command prompt. > > > > So it seems to me that PHP and Apache is living well under Windows, > > but I can't get the MySQL database to communicate with them. > > > > What can I do, please? > > Is this the right place for MySQL + php questions? > > > > Yours sincerely > > > > Morten Gulbrandsen > > > > "Manon" <purplespirit@hccnet.nl> schrieb im Newsbeitrag > 000801c387ea$ac7917e0$b64cc23e@Giga">news:000801c387ea$ac7917e0$b64cc23e@Giga... > Try this: put a copy of the php4ts.dll in your php\sapi folder > > -----Oorspronkelijk bericht----- > Van: Morten Gulbrandsen [mailto:Morten.Gulbrandsen@rwth-aachen.de] > Verzonden: dinsdag 30 september 2003 18:04 > Aan: php-windows@lists.php.net > Onderwerp: Can't start php under Apache after Load Module php4apache.dll > > > Hello Programmers > > I try to run a service. > > Apache 1.28 (win32) under win2000 > > And gets this error: > > Microsoft Management Console > Der Dienst "Apache" auf "Lokalen Computer" > konnte nicht gestartet werden. > Der Dienst hat keinen Fehler zurückgegeben. > > Es kann sich um einen internen Windows-Fehler oder > einen internen Dienstfehler handeln. > > Setzen Sie sich mit Ihrem Systemadministrator in Verbindung, falls das > Problem weiterhin besteht. > > > > C:\>NET START APACHE > Apache wird gestartet. > Apache konnte nicht gestartet werden. > > Der Dienst hat keinen Fehler gemeldet. > > >From my edited httpd.conf file: > > LoadModule php4_module "c:\temp\php-4.3.3-Win32\sapi\php4apache.dll" > AddModule mod_php4.c > AddType application/x-httpd-php .php > > However Apache did start and run smoothly before I attempted to append > the directives in httpd.conf. > > How can I run > php version 4.3.3 > Apache version 1.3.28 > MySQL server version: 4.1.0-alpha-max-debug > > successfully under > Microsoft Windows 2000 [Version 5.00.2195] > > Please ? > > Yours Sincerely > > Morten Gulbrandsen -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php