Ask a Question related to PHP Development, Design and Development.
-
Tom Thackrey #1
Re: problem connecting to mySQL
On 6-Jul-2003, "GazK" <wrong@wrong.co.uk> wrote:
> I am not a newbie to PHP, but have not touched it for a while, and now I
> need to get back into it for a project. I have the following login page
> script which I am using to test a DB connection to mySQL. I have checked
> that mySQL is started up but i get a parse error on line 23 (asterisked
> below). Can anyone shed some light? Its probably something really stoopid
> i
> know...
mysql_select_db("images, $db");
should be
mysql_select_db("images", $db);
--
Tom Thackrey
[url]www.creative-light.com[/url]
Tom Thackrey Guest
-
problem connecting from cf 6.0 to mysql 5
Hey guys, Heres my problem I can't connect to mysql after i upgraded to v5 it says: Connection verification failed for data source: eval... -
Connecting with MySQL
How I do to connect the ColdFusion with MySQL? I read http://www.macromedia.com/cfusion/knowledgebase/index.cfm?id=6ef0253 page, but it doesn't works... -
Problem connecting MySQL in MX Admin Panel
I am using Dreamweaver MX 6.1 and ColdFusion MX Server Administrator. OBDC Driver is Microsoft MySQL 3.5.1. The driver is set up under Microsoft... -
beginner question, problem connecting to mysql
hi all, i have problem with my php-mysql connection. i got "Fatal error: Call to undefined function: mysql_connect()" when i try to use mysql... -
PostgreSQL/mySQL: connecting, login code problem.
Hey, Hours ... I am searching I have these code and we found it's postgreSQL. Now we have mysql, isn't it possible to change the connect code and... -
GazK #2
Re: problem connecting to mySQL
Thanks for all that, i have been completely stitched up since this code
comes from "PHP for web professionals" (!).
--
reply email is not valid. Correct address is garry DOT junk AT blueyonder
DOT co DOT uk
"Tom Thackrey" <tomnr@creative-light.com> wrote in message
news:r5%Na.352$Sg6.120@newssvr16.news.prodigy.com. ..blueyonder>
> On 6-Jul-2003, "GazK" <wrong@wrong.co.uk> wrote:
>> > thanks for that, but its still failing on line 23!
> >
> > --
> > reply email is not valid. Correct address is garry DOT junk ATnow> > DOT co DOT uk
> > "Tom Thackrey" <tomnr@creative-light.com> wrote in message
> > news:4ZYNa.453$Vs.50961448@newssvr14.news.prodigy. com...> > >
> > > On 6-Jul-2003, "GazK" <wrong@wrong.co.uk> wrote:
> > >
> > > > I am not a newbie to PHP, but have not touched it for a while, andmultiple>> > stoopid> > > > I
> > > > need to get back into it for a project. I have the following login
> > > > page
> > > > script which I am using to test a DB connection to mySQL. I have
> > > > checked
> > > > that mySQL is started up but i get a parse error on line 23
> > > > (asterisked
> > > > below). Can anyone shed some light? Its probably something really> > > > i
> > > > know...
> > >
> > >
> > >
> > > mysql_select_db("images, $db");
> > > should be
> > > mysql_select_db("images", $db);
>
> Sorry, I didn't spot all the other errors...
>
> 1 You have colons at the end of your if and else statements, remove them.
> 2 There is no endif statement in php, remove them, too. If you need> statements in an if or else block use { and } to group them.
> 3 Your HTML has </br> which should be <br /> or <br>
> 4 The string in line 21 is wrong, it should be
>
> print("can\'t connect/n");
>
> Note that /n will not produce a new line in the browser only in the HTML
> source, use <br> if you want a new line in the browser.
>
> There may be others, but these are the ones I spotted on reading the code.
>
> --
> Tom Thackrey
> [url]www.creative-light.com[/url]
GazK Guest
-
GazK #3
Re: problem connecting to mySQL
PS correcting the
print("cant connect/n");
line has allowed the code to get to line 48 before stalling. Thanks for
getting me some progress!
--
reply email is not valid. Correct address is garry DOT junk AT blueyonder
DOT co DOT uk
"Tom Thackrey" <tomnr@creative-light.com> wrote in message
news:r5%Na.352$Sg6.120@newssvr16.news.prodigy.com. ..blueyonder>
> On 6-Jul-2003, "GazK" <wrong@wrong.co.uk> wrote:
>> > thanks for that, but its still failing on line 23!
> >
> > --
> > reply email is not valid. Correct address is garry DOT junk ATnow> > DOT co DOT uk
> > "Tom Thackrey" <tomnr@creative-light.com> wrote in message
> > news:4ZYNa.453$Vs.50961448@newssvr14.news.prodigy. com...> > >
> > > On 6-Jul-2003, "GazK" <wrong@wrong.co.uk> wrote:
> > >
> > > > I am not a newbie to PHP, but have not touched it for a while, andmultiple>> > stoopid> > > > I
> > > > need to get back into it for a project. I have the following login
> > > > page
> > > > script which I am using to test a DB connection to mySQL. I have
> > > > checked
> > > > that mySQL is started up but i get a parse error on line 23
> > > > (asterisked
> > > > below). Can anyone shed some light? Its probably something really> > > > i
> > > > know...
> > >
> > >
> > >
> > > mysql_select_db("images, $db");
> > > should be
> > > mysql_select_db("images", $db);
>
> Sorry, I didn't spot all the other errors...
>
> 1 You have colons at the end of your if and else statements, remove them.
> 2 There is no endif statement in php, remove them, too. If you need> statements in an if or else block use { and } to group them.
> 3 Your HTML has </br> which should be <br /> or <br>
> 4 The string in line 21 is wrong, it should be
>
> print("can\'t connect/n");
>
> Note that /n will not produce a new line in the browser only in the HTML
> source, use <br> if you want a new line in the browser.
>
> There may be others, but these are the ones I spotted on reading the code.
>
> --
> Tom Thackrey
> [url]www.creative-light.com[/url]
GazK Guest
-
Nikolai Chuvakhin #4
Re: problem connecting to mySQL
"GazK" <wrong@wrong.co.uk> wrote in message
news:<am_Na.349$UN5.285@news-binary.blueyonder.co.uk>...What's the error message?> "Tom Thackrey" <tomnr@creative-light.com> wrote in message
> news:4ZYNa.453$Vs.50961448@newssvr14.news.prodigy. com...>> >
> > mysql_select_db("images, $db");
> > should be
> > mysql_select_db("images", $db);
> thanks for that, but its still failing on line 23!
Cheers,
NC
Nikolai Chuvakhin Guest
-
David Robley #5
Re: problem connecting to mySQL
In article <7MDOa.86$AK5.76@news-binary.blueyonder.co.uk>,
[email]wrong@wrong.co.uk[/email] says...The error suggests there may be more info in the server log.> [Mon Jul 07 22:08:34 2003] [error] [client 127.0.0.1] Premature end of
> script headers: d:/program files/nusphere/apache/php/php.exe
>
> ....?
>
> --
> reply email is not valid. Correct address is garry DOT junk AT blueyonder
> DOT co DOT uk
> "David Robley" <robleyd@ozemail.com.oz> wrote in message
> news:MPG.197570493b1b13489896bc@news.spiderweb.com .au...> whatever> > In article <DPhOa.159$S95.8@news-binary.blueyonder.co.uk>,
> > [email]wrong@wrong.co.uk[/email] says...> > > Cleared the error at line 48, I now get the login window, however> over> > > username/password i put in, i get the following. Can anyone clear me> unable> > > the last hurdle?
> > >
> > > Internal Server Error
> > > The server encountered an internal error or misconfiguration and was> them of> > > to complete your request.
> > > Please contact the server administrator, [email]you@your.addr[/email]ess and inform> have> > > the time the error occurred, and anything you might have done that may> log.> > > caused the error.
> > >
> > > More information about this error may be available in the server error> >
> > If you have access to the log.....
--
Quod subigo farinam
$email =~ s/oz$/au/o;
David Robley Guest



Reply With Quote

