PHP MySQL problems

From: *** HAWK (ignore_at_ignore.net)
Date: 10/25/03


Date: Sat, 25 Oct 2003 12:20:29 +0100

Can anyone explain this error - I am trying to setup PHP/Apache/MySQL on my
home machine (Winxp pro)
I have got everything working now - I know MySQL works cos I am able to run
the MySQL monitor through the command prompt. But when I run the following
php file (see text below as contained in the php file) IE returns the
following error -
Parse error: parse error, unexpected T_STRING in
C:\Apache\htdocs\mysqltest.php on line 8

PHP Script
<html>
<head> <title>MySQL Connection Test</title> </head>
<body>
<h2>

<?php
 $connection = mysql_connect("localhost","root","") or

die("Sorry - unable to connect to MySQL");
echo(Congratulations - you are connected to MySQL");
?>

</h2>
</body>
</html>



Relevant Pages

  • Breaking from MySQL to Linux system (SQL Injection).
    ... found a Mysql Injection based in error response. ... I'm able to explore it using a query like this one: ... of all .php file he upload. ...
    (Pen-Test)
  • mySQL connection limit
    ... connections are available per mySQL account or something like that. ... PHP file and as a result the above is not necessary. ... snippet too many times cause mySQL to prevent user "myself" from connecting ...
    (comp.lang.php)
  • Re: Using MySQL Command Load Data Infile
    ... Bruce A. Julseth wrote: ... > The file is located in the same directory as my .PHP file. ... I suspect MySQL requires a full pathname to the file, ...
    (comp.lang.php)
  • running PHP on Windows XP
    ... I installed Apache/MySQL/PHP on Windows XP. ... Microsoft IIS 4 or higher was defaultly selected for MySQL. ... When I double-click a PHP file, ... I want my PHP file to work on my browser offline just like uploading ...
    (comp.lang.php)
  • Re: classes and require ?
    ... I have a big class in one php file. ... "Parse error: syntax error, unexpected T_REQUIRE_ONCE, expecting T_FUNCTION in ... of class because in thouse files are functions which are the member of that class. ... And you can't put them in the constructor as Henrik indicated or you would be including them in the constructor itself. ...
    (comp.lang.php)