Email address obfuscation in effect -- please
click here to turn it off.
[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
- To: "MLUG Members" <EMAIL:PROTECTED>
- Subject: Re: [MLUG] Up against the wall with LAMP...
- From: "Scott Hussey" <EMAIL:PROTECTED>
- Date: Tue, 28 Mar 2006 16:56:31 -0600
- Delivery-date: Tue, 28 Mar 2006 17:02:54 -0600
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=QEgGfZGdM5y48yXkd+4XgB5QUmr4u1SbqLEv3CUX6FeJ6StSH5vD0lu6TXKuMY7CuQeMCx3RQCAZS3advWJnX1wdPyvG8zEsQTq5+u+2G6/di3BIr9VgwBd5yjOvDHdvkblpJwHrPx29bShGOPZV+vD/TTKeXoIMgstFkENidDA=
- Envelope-to: EMAIL:PROTECTED
- In-reply-to: <EMAIL:PROTECTED>
- References: <EMAIL:PROTECTED>
- Reply-to: MLUG Members <EMAIL:PROTECTED>
- Sender: EMAIL:PROTECTED
I'm not a PHP coder, but a T_Variable seems to be the token for a
variable in the php grammar. I would guess the $conn is not expected
because you didn't end the previous line with a semi-colon. But this
is just a guess.
scott
On 3/28/06, Mike Pepper <EMAIL:PROTECTED> wrote:
> I have been working on this forever, and it's time to get rolling.
> I bought Paul DuBois's MySQL third edition to assist in learning MySQL.
> I have MySQL installed, apache2 installed, php4 installed, and the pear
> package. I can connect to the MySQL program both locally and remotely.
> All is well up until it's time to bring the web into play.
> I can display simple php scripts without a problem.
>
> Both of these simple scripts work...
>
> <html>
> <body>
> <p>Hello World!</p>
> </body>
> </html>
>
> and
>
> <html>
> <body>
> <p><?php print ("Hello World!"); ?></p>
> </body>
> </html>
>
> Both display Hello World! in the browser as expected.
>
> Deeper into the tutorial he wants to use the c api which should be included in
> the packages that I am using.
>
> The package and version list follows.
>
> SuSE 9.3 Professional
>
> mysql Ver 14.7 Distrib 4.1.10a, for suse-linux (i686)
>
> PHP 4.3.10 (cli) (built: Mar 22 2005 19:34:44)
> Copyright (c) 1997-2004 The PHP Group
> Zend Engine v1.3.0, Copyright (c) 1998-2004 Zend Technologies
>
> pear:
> Configuration:
> ==============
> PEAR executables directory bin_dir /usr/bin
> PEAR documentation directory doc_dir /usr/share/php/doc
> PHP extension directory ext_dir /usr/lib/php/extensions
> PEAR directory php_dir /usr/share/php
> PEAR Installer cache directory cache_dir /tmp/pear/cache
> PEAR data directory data_dir /usr/share/php/data
> PHP CLI/CGI binary php_bin /usr/bin/php
> PEAR test directory test_dir /usr/share/php/test
> Cache TimeToLive cache_ttl 3600
> Preferred Package State preferred_state stable
> Unix file mask umask 22
> Debug Log Level verbose 1
> HTTP Proxy Server Address http_proxy <not set>
> PEAR server master_server pear.php.net
> PEAR password (for password <not set>
> maintainers)
> Signature Handling Program sig_bin /usr/local/bin/gpg
> Signature Key Directory sig_keydir /etc/pearkeys
> Signature Key Id sig_keyid <not set>
> Package Signature Type sig_type gpg
> PEAR username (for username <not set>
> maintainers)
>
> The program that I am attempting to run is:
>
> <html>
> <head>
> <title>U.S. Historical League</title>
> </head>
> <body bgcolor="grey">
> <p>Welsome to the U.S. Historical League Web Site.</p>
> <?php
> # USHL home page
>
> require_once "/usr/share/php/DB.php"
>
> $conn =& DB::connect ("mysql://sampadm:EMAIL:PROTECTED");
> if (DB::isError ($conn))
> exit ();
> $result =& $conn->query ("SELECT COUNT(*) FROM member");
> if (DB::isError ($result))
> exit ();
> if ($row =& $result->fetchrow ())
> print ("<p>The League currently has " . $row[0] . " members.</p>");
> $result->free ();
> $conn->disconnect ();
> ?>
> </body>
> </html>
>
> The error that I get is:
> Parse error: parse error, unexpected T_Variable
> in /home/mike/public_html/test.php on line 12
>
> Feel free to run it for your self.
> http://procurement.missouri.edu/~mike/test.php
>
> I really would like for this to work so that I can follow the tutorials in the
> book, and eventually build a form on the web that will access the database.
>
> At this point I am so frustrated that I can't see straight.
> cursing loudly, has not helped at all.
>
> Thanks for your time in advance.
>
> Mike
>
> _______________________________________________
> members mailing list
> EMAIL:PROTECTED
> http://mlug.missouri.edu/mailman/listinfo/members
>
--
Scott Hussey
EMAIL:PROTECTED
http://www.alexusstudios.com
_______________________________________________
members mailing list
EMAIL:PROTECTED
http://mlug.missouri.edu/mailman/listinfo/members