Re: [PHP] Fwd: Worm Klez.E immunity - a public service by Jess Ragaza of Internet Architecture, Inc.
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Great... along with bieng infected with the klez virus, everyone on php.net now has the address book of someone from the Department of Juvenile Justice. This is the best advertisment so far for why uncle sam should switch to linux. Vive le penguin! , Dw. Sqlcoders.com Dynamic data driven web solutions - - Original Message - Sent: June 06 2002 08:56 AM Subject: [PHP] Fwd: Worm Klez.E immunity - a public service by Jess Ragaza of Internet Architecture, Inc. > From: "mmcree" <[EMAIL PROTECTED]> > > Subject: Worm Klez.E immunity > > Date: Thu, 06 Jun 2002 04:53:27 -0400 > > Klez.E is the most common world-wide spreading > worm.It's very dangerous by corrupting your files. > Because of its very smart stealth and anti-anti-virus > technic,most common AV software can't detect or clean > it. > > We developed this free immunity tool to defeat the > malicious virus. You only need to run this tool > once,and then Klez will never come into your PC. > NOTE: Because this tool acts as a fake Klez to fool > the real worm,some AV monitor maybe cry when you run > it. If so,Ignore the warning,and select 'continue'. > If you have any question,please mail to me. > > > __ > Do You Yahoo!? > Yahoo! - Official partner of 2002 FIFA World Cup > http://fifaworldcup.yahoo.com > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > -BEGIN PGP SIGNATURE- Version: PGP Personal Privacy 6.5.8 iQA/AwUBPQAVz9f2pW/GxlpVEQJtawCfXF05pf79aPD0KWedS0JLas8AizwAn2A0 doti2ROtVsG59URig1svd/PQ =ggss -END PGP SIGNATURE- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Fwd: Worm Klez.E immunity - a public service by Jess Ragaza of Internet Architecture, Inc.
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 - From http://www.snopes2.com/computer/virus/immunity.htm (Urban myths) Claim: A free immunity tool will protect your PC from the Klez.E virus. Status: False. Sample message: "Klez.E is the most common world-wide spreading worm.It's very dangerous by corrupting your files. Because of its very smart stealth and anti-anti-virus technic,most common AV software can't detect or clean it. We developed this free immunity tool to defeat the malicious virus. You only need to run this tool once,and then Klez will never come into your PC. NOTE: Because this tool acts as a fake Klez to fool the real worm,some AV monitor maybe cry when you run it. If so,Ignore the warning,and select 'continue'. If you have any question,please mail to me. " Origins: The messages quoted above are correct in noting that Klez is a common worm which is currently spreading and infecting computers world-wide, but they contain no "immunity tools" that will protect your PC from Klez. Far from it: in classic "trojan horse" fashion, these messages (bearing a subject line of "Worm Klez.E Immunity") are disguises that trick unsuspecting users into executing their attachments -- attachments which don't protect against the Klez virus but actually spread it. In other words, you opened one of these emails and now your system is sending out messages to everyone on your address book. HTH, Dw Sqlcoders.com Dynamic data driven web solutions > - - Original Message ----- > From: "Leotta, Natalie (NCI/IMS)" <[EMAIL PROTECTED]> > To: "'Sqlcoders.com Programming Dept'" <[EMAIL PROTECTED]> > Sent: June 06 2002 09:57 AM > Subject: RE: [PHP] Fwd: Worm Klez.E immunity - a public service by > Jess Ragaza of Internet Architecture, Inc. > > > > what made you say that we were infected? I didn't see anything > > in the email that looked at all virus-like (like at attachment). > > Was it filtered out at our mail server before I got the email? > > > > Thanks! > > > > -Natalie > > > > -Original Message- > > From: Sqlcoders.com Programming Dept > > [mailto:[EMAIL PROTECTED]] Sent: Thursday, June 06, 2002 > > 10:09 PM > > To: php general > > Cc: Jess Ragaza > > Subject: Re: [PHP] Fwd: Worm Klez.E immunity - a public service > > by Jess Ragaza of Internet Architecture, Inc. > > > > > > -BEGIN PGP SIGNED MESSAGE- > > Hash: SHA1 > > > > Great... > > along with bieng infected with the klez virus, > > everyone on php.net now has the address book of someone from the > > Department of Juvenile Justice. > > > > This is the best advertisment so far for why uncle sam should > > switch to linux. > > > > Vive le penguin! , > > Dw. > > > > > > Sqlcoders.com Dynamic data driven web solutions > > - - Original Message - > > Sent: June 06 2002 08:56 AM > > Subject: [PHP] Fwd: Worm Klez.E immunity - a public service by > > Jess Ragaza of Internet Architecture, Inc. > > > > > > > From: "mmcree" <[EMAIL PROTECTED]> > > > > > > Subject: Worm Klez.E immunity > > > > > > Date: Thu, 06 Jun 2002 04:53:27 -0400 > > > > > > Klez.E is the most common world-wide spreading > > > worm.It's very dangerous by corrupting your files. > > > Because of its very smart stealth and anti-anti-virus > > > technic,most common AV software can't detect or clean it. > > > > > > We developed this free immunity tool to defeat the > > > malicious virus. You only need to run this tool > > > once,and then Klez will never come into your PC. > > > NOTE: Because this tool acts as a fake Klez to fool > > > the real worm,some AV monitor maybe cry when you run > > > it. If so,Ignore the warning,and select 'continue'. > > > If you have any question,please mail to me. > > > > > > > > > __ > > > Do You Yahoo!? > > > Yahoo! - Official partner of 2002 FIFA World Cup > > > http://fifaworldcup.yahoo.com > > > > > > -- > > > PHP General Mailing List (http://www.php.net/) > > > To unsubscribe, visit: http://www.php.net/unsub.php > > > > > > > -BEGIN PGP SIGNATURE- > > Version: PGP Personal Privacy 6.5.8 > > > > iQA/AwUBPQAVz9f2pW/GxlpVEQJtawCfXF05pf79aPD0KWedS0JLas8AizwAn2A0 > > doti2ROtVsG59URig1svd/PQ > > =ggss > > -END PGP SIGNATURE- > > > > > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, visit: http://www.php.net/unsub.php > > -BEGIN PGP SIGNATURE- > Version: PGP Personal Privacy 6.5.8 > > iQA/AwUBPQApfNf2pW/GxlpVEQIRjwCfShlMHJeDDjn7BnwMMrr4XA1LyHwAoK7+ > biLWjqhinHYrFiL/thUB/XyM > =OB6i > -END PGP SIGNATURE- > -BEGIN PGP SIGNATURE- Version: PGP Personal Privacy 6.5.8 iQA/AwUBPQAsHdf2pW/GxlpVEQLgLQCghmZbJpmpDSpdAlgReGj2WJGCJ9oAoJx4 u7zwyxMRjtDqFZn8z6YUDO6p =iGzz -END PGP SIGNATURE- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Fwd: Worm Klez.E immunity - a public service by Jess Ragaza of Internet Architecture, Inc.
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi there, Yes this is a virus, a Trojan horse to be precise. I was commenting that it's nice enough to publish the contents of the senders address book (see the mail To: & cc: headers)... See my other email for details. HTH, Dw. - - Original Message - From: "Chris Hewitt" <[EMAIL PROTECTED]> To: "Sqlcoders.com Programming Dept" <[EMAIL PROTECTED]> Sent: June 06 2002 10:31 AM Subject: Re: [PHP] Fwd: Worm Klez.E immunity - a public service by Jess Ragaza of Internet Architecture, Inc. > Dw, > > Are you sure this originated from the source it says it did. It > seems to be asking people to run a program even if AV software says > do not. Sounds like a way to get a virus if you ask me. A pity we > can't look at the full headers, I bet its not real. > > Regards > > Chris > > Sqlcoders.com Programming Dept wrote: > > >-BEGIN PGP SIGNED MESSAGE- > >Hash: SHA1 > > > >Great... > >along with bieng infected with the klez virus, > >everyone on php.net now has the address book of someone from the > >Department of Juvenile Justice. > > > >This is the best advertisment so far for why uncle sam should > >switch to linux. > > > >Vive le penguin! , > >Dw. > > > > > >Sqlcoders.com Dynamic data driven web solutions > >- - Original Message - > >Sent: June 06 2002 08:56 AM > >Subject: [PHP] Fwd: Worm Klez.E immunity - a public service by > >Jess Ragaza of Internet Architecture, Inc. > > > > > >>From: "mmcree" <[EMAIL PROTECTED]> > >> > >>Subject: Worm Klez.E immunity > >> > >>Date: Thu, 06 Jun 2002 04:53:27 -0400 > >> > >>Klez.E is the most common world-wide spreading > >>worm.It's very dangerous by corrupting your files. > >>Because of its very smart stealth and anti-anti-virus > >>technic,most common AV software can't detect or clean > >>it. > >> > >>We developed this free immunity tool to defeat the > >>malicious virus. You only need to run this tool > >>once,and then Klez will never come into your PC. > >>NOTE: Because this tool acts as a fake Klez to fool > >>the real worm,some AV monitor maybe cry when you run > >>it. If so,Ignore the warning,and select 'continue'. > >>If you have any question,please mail to me. > >> > >> > >>__ > >>Do You Yahoo!? > >>Yahoo! - Official partner of 2002 FIFA World Cup > >>http://fifaworldcup.yahoo.com > >> > >>-- > >>PHP General Mailing List (http://www.php.net/) > >>To unsubscribe, visit: http://www.php.net/unsub.php > >> > > > >-BEGIN PGP SIGNATURE- > >Version: PGP Personal Privacy 6.5.8 > > > >iQA/AwUBPQAVz9f2pW/GxlpVEQJtawCfXF05pf79aPD0KWedS0JLas8AizwAn2A0 > >doti2ROtVsG59URig1svd/PQ > >=ggss > >-END PGP SIGNATURE- > > > > > > > > > -BEGIN PGP SIGNATURE- Version: PGP Personal Privacy 6.5.8 iQA/AwUBPQAsX9f2pW/GxlpVEQI7VgCgvGDB+xAniz9a1fINBnvfNJeYjlsAnjta ouqXRvf+4IZ32pE4Se5lVVA6 =uaQY -END PGP SIGNATURE- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Getting http:// include to return?
It's not exactly what you wanted, but try this: http://www.hysp.net","r";); while (!feof ($intFileHandle)) { $intFileOutput .= fgets($intFileHandle, 4096); } fclose($intFileHandle); return $intFileOutput; } ?> HTH, Dw. Sqlcoders.com Dynamic data driven web solutions - Original Message - From: "Leif K-Brooks" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: June 06 2002 08:08 PM Subject: [PHP] Getting http:// include to return? > I'm trying to make a script that people using PHP can get information > from my site from by including it. They would do something like: > $var = > include("http://mydomain.com/infoscript.php?infotoget=info1";); //returns > "This is info 1." > Is there anything I can do in my script to make return() work even > though they're not loading it locally? > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Reading from a dir.
Try... HTH, Dw. Sqlcoders.com Dynamic data driven web solutions - Original Message - From: "Steven Mallett" <[EMAIL PROTECTED]> To: "php-general" <[EMAIL PROTECTED]> Sent: June 08 2002 07:23 AM Subject: [PHP] Reading from a dir. > Is there another way to read the files from a directory? > > I tried the following: > > foreach (glob("*.txt") as $filename) { > echo "$filename size " . filesize($filename) . "\n"; > } > > but get an error whether safe mode is on or off. > > I'm just learning as you might guess. > > -- > Steve Mallett http://OSDir.com - Stable, Open Source Apps > [EMAIL PROTECTED] | [EMAIL PROTECTED] > http://open5ource.net | With new, all powerful, blogging > action! > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Removing ^M
You could replace if by ASCII code (^M is actually a representation of ASCII 013, the CR character, thanks to http://www.mindspring.com/~jc1/serial/Resources/ASCII.html for the ASCII lookup table.). This should fix it (untested) where $nicestring is the output, $chrnumber contains the ascii code for ^M, and the input (original) string is $badstring. Sqlcoders.com Dynamic data driven web solutions - Original Message - From: "Michael Hall" <[EMAIL PROTECTED]> To: "PHP List" <[EMAIL PROTECTED]> Sent: June 08 2002 05:40 PM Subject: [PHP] Removing ^M > > > I am trying remove ^M characters (some kind of newline character) from an > HTML file. I've tried all sorts of ereg_replace and sed possibilities > but the > things just won't go away. Does anyone have a way of removing such > characters? > > TIA > > Mick > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Emulating a class destructor
> This is completely off the top of my head (i've never done this > before) -- but try single-quoting it to prevent interpolation > > register_shutdown_function('$this->cleanup()'); > Hiya, thanks for the suggestion, but i get the same 'Unable to call ...' message. Any other ways you can think of? I tried the following: '$this->cleanup()' '$this->cleanup' I also tried the :: syntax but it woudlnt work, plus the actions to be performed rely on data contained within the instance. TIA, Dw. > -- > Scott Hurring > Systems Programmer > EAC Corporation > scott (*) eac.com > -- > "William_dw -- Sqlcoders" <[EMAIL PROTECTED]> wrote in message > 009401c211d9$a1863da0$6520fea9@dw">news:009401c211d9$a1863da0$6520fea9@dw... > > Hi there!, > > I'm trying to emulate a class destructor, according to the PHP documentation > > I can emulate this by using a call to register_shutdown_function(), > > containing the function to be called upon shutdown. > > > > While this apparently works outside a class, I want to use it inside a > > class, in other words I want to have something like this: > > > > class cRoute{ > > function cRoute(){ > > //register the shutdown function in case people who use this class > > dont call the appropiate close methods. > > register_shutdown_function("cleanup()"); > > } > > > > function cleanup(){ > > //cleanup. > > trigger_error("Please call close() before the page ends, to prevent > > problems close() has been called automatically for you."); > > $this->close(); > > } > > > > function close(){ > > //close open sockets, etc. > > } > > } > > > > I have tried: > > register_shutdown_function("cleanup()"); > > register_shutdown_function("$this->cleanup()"); > > register_shutdown_function($this->cleanup()); > > register_shutdown_function("cDB::cleanup()"); > > > > They all return something like: Warning: Unable to call ()() - function does > > not exist in Unknown on line 0 > > > > If anyone has any ideas I'd appreciate the help. > > Thanks in advance!, > > Dw. > > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Raising a custom error -- how?
Hiya, I want to be able to raise an error in some code I'm creating for reuse, most parts of this code deals with errors and just uses defaults as appropriate, but I need to be able to raise an error that will stop the PHP script interpreter and throw an error back to the developer. I've tried searching the manual for "user defined error", "throw error", "raise error" etc, but I guess it's just one of those functions that it's hard to find without already knowing where to find it. Any help would be appreciated!, Dw. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Cool PHP Tricks/Features ?
I've seen real-life examples of 100k pages going down to around 30k, considering that decrease in size, when you remember that CPU time is relatively cheap compared to bandwidth, it's worth the processing overhead in my opinion. Small (<20k) pages probably aren't worth it, for anything larger then as it's been mentioned, even if visitors have no idea the pages are smaller, if they load in 1/3 of the time it's useful, wanted, and definitely cool. Just remember that not every browser understands gzip compression, but also remember that a probably larger percentage of visitors have ECMAScript (JavaScript) switched off. You takes your chances, you makes your choice... William. - Original Message - From: "SP" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]>; "'Girish Nath'" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: May 14 2002 06:29 PM Subject: RE: [PHP] Cool PHP Tricks/Features ? > Well if his normal page is 100k and he can cut the > size down to 50k with gzip then instead of having > a monthly transfer of 100 GB for example, he would > only be paying for 50 GB. Seems like it's useful > for extremely large sites. > > > > -Original Message- > From: John Holmes > [mailto:[EMAIL PROTECTED]] > Sent: May 14, 2002 6:43 PM > To: 'Girish Nath'; [EMAIL PROTECTED] > Subject: RE: [PHP] Cool PHP Tricks/Features ? > > > Why do you think this is useful to you? I remember > reading an article on > this and its conclusion was that zipping the > output was only beneficial > for large data between fast computers over a slow > pipe. You have to look > at who your clients are and if it's beneficial to > have their machine use > up extra time (processing power) unzipping things > or not. Also, you're > using more processing time on your computer having > to do the zipping for > every request, too. > > ---John Holmes... > > > -Original Message- > > From: Girish Nath > [mailto:[EMAIL PROTECTED]] > > Sent: Tuesday, May 14, 2002 9:28 AM > > To: [EMAIL PROTECTED] > > Subject: [PHP] Cool PHP Tricks/Features ? > > > > Hi > > > > I've been using PHP for about 2 years now but > only just discovered > > ob_gzhandler and gzip/compressing http output. > > It's something i wish i'd found out about > earlier because even though > it's > > a > > simple concept the result blew me away :) > > > > Anyway, i just wanted to know of any other cool > tricks/features that > you > > guys are using that others could have > overlooked. > > > > Thanks > > > > > > Girish > > -- > > www.girishnath.co.uk > > > > > > > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, visit: > http://www.php.net/unsub.php > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: > http://www.php.net/unsub.php > > > --- > Incoming mail is certified Virus Free. > Checked by AVG anti-virus system > (http://www.grisoft.com). > Version: 6.0.361 / Virus Database: 199 - Release > Date: 07/05/02 > > --- > Outgoing mail is certified Virus Free. > Checked by AVG anti-virus system > (http://www.grisoft.com). > Version: 6.0.361 / Virus Database: 199 - Release > Date: 07/05/02 > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP,CyberCash,Verisign,PayFlow
- Original Message - From: "Analysis & Solutions" <[EMAIL PROTECTED]> To: "PHP List" <[EMAIL PROTECTED]> Sent: May 17 2002 07:27 AM Subject: Re: [PHP] PHP,CyberCash,Verisign,PayFlow > Hi Ryan: > > > Does this mean that if i want to start accepting credit cards on my site i > > wont have to pay for a credit card merchant account? > > You betcha. > Um, I think you need to read the manual, >From the Verisign Payflow Link Technical Documentation Guide: What is Payflow Link? Payflow Link is a VeriSign-hosted, secure HTTP-based Internet payment solution. It allows you (a merchant with an Internet merchant account) to connect your customers to VeriSignTs secure order form server and use it to automate order acceptance, authorization, processing, and transaction management. You gotta have an account from what I've found, might be different with cybercash though, Dw. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Subscriber count from db
I think http://www.php.net/manual/en/function.number-format.php might accomplish what you need. HTH, Dw - Original Message - From: "Randum Ian" <[EMAIL PROTECTED]> To: "PHP" <[EMAIL PROTECTED]> Sent: May 17 2002 08:44 AM Subject: [PHP] Subscriber count from db > Hi all, Ive been searching through the archives for this and I am still none > the wiser! > > Ive done a count on my database and found out I have "1234567890" stored in > a variable "$count". > > How do I output "1,234,567,890" so that if I write "I have 1,234,567,890 > subscribers" it looks better than "I have 1234567890 subscribers". > > A bit of a dummy question I know, Im sorry! > > Ian. > --- > Randum Ian > DJ / Reviewer / Webmaster, DancePortal (UK) Limited > [EMAIL PROTECTED] > http://www.danceportal.co.uk > DancePortal.co.uk - Global dance music media > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] refresh (part of) a page?
Hi there!, To keep both on the same line, you need to put them inside a table (like this: ) You can switch off any borders with the following: in the iframe code use an iframe tag like this: So to combine the two (both on the same line with no borders), something like this... HTH, Dw - Original Message - From: "savaidis" <[EMAIL PROTECTED]> To: "Sqlcoders.com Programming Dept" <[EMAIL PROTECTED]> Sent: May 20 2002 08:42 AM Subject: RE: [PHP] refresh (part of) a page? > Thanks a lot! > > Is possible to make invisible the borders? I tried "border=0" and "noborder" > but didn't work. > > Also to keep the 2 frames (I did put and another the same line and not to break the other at the bottom of the first? > > You will see it from tomorow at http://www.macedonia-hotels.gr > > > Thanks again! > > > > > > Makis > > > > -Original Message- > > From: Sqlcoders.com Programming Dept [mailto:[EMAIL PROTECTED]] > > Sent: Tuesday, May 21, 2002 4:57 AM > > To: savaidis > > Subject: Re: [PHP] refresh (part of) a page? > > > > > > Hi there!, > > You cannot refresh part of a single page, > > you would have to resend the entire page. > > > > There is another option which you could use, this will work on IE5+ and > > NS6+: > > An inline frame would allow you to update the page within it's > > boundary, so > > in other words you could have a page which has an > src="partWhichWillRefresh.php" width=400 height=200> > > tag, then you > > would need a page called partWhichWillRefresh.php which contains > > the content > > you want to refresh, > > inside partWhichWillRefresh.php, add whatever content you want to refresh, > > and the following JavaScript to accomplish the refresh: > > > > > > x = setTimeout(reloadme,5000); //the 5000 means 5 seconds, 60 > > seconds would > > be 6, etc. > > > > function reloadme(){ > > document.location.href = 'partWhichWillRefresh.php?rnd=0393'; //the > > rnd=0394 is simply to stop most caching. > > } > > > > > > HTH, > > Dw > > > > - Original Message - > > From: "savaidis" <[EMAIL PROTECTED]> > > To: <[EMAIL PROTECTED]> > > Sent: May 20 2002 01:39 AM > > Subject: RE: [PHP] refresh (part of) a page? > > > > > > > I look and I search everything, it looks I'm reaching to a wall :) > > > I used Netscape, I uploaded to my internet server, still the same. > > > Plus, I cannot find "header already send" at manual. > > > > > > The error message is : > > > Warning: Cannot add header information - headers already sent by (output > > > started at /mpla-mpla/main.php:41) in /mpla-mpla /main.php on line 83 > > > > > > Note that I use "header()" without problem on another php script on the > > same > > > server.(to redirect from a "parcked" domain) > > > > > > Someone could help? > > > > > > Thanks > > > > > > Makis > > > > > > > -Original Message- > > > > From: Jason Wong [mailto:[EMAIL PROTECTED]] > > > > Sent: Sunday, May 19, 2002 3:35 PM > > > > To: [EMAIL PROTECTED] > > > > Subject: Re: [PHP] refresh (part of) a page? > > > > > > > > > > > > On Sunday 19 May 2002 18:03, savaidis wrote: > > > > > I want to refrech a part of my page (or the whole page) using PHP. > > > > > Periodically, using a time delay. > > > > > Should I use frames? > > > > > > > > You cannot refresh part of a page without resending the whole > > > > page. You can > > > > use frames. > > > > > > > > > Also I tried to use "header (...)" calling the same page with > > different > > > > > name (and then back to the same page) but I got the warning: > > > > > "header already send". > > > > > > > > *Read* the manual and see what it says about header() and "header > > already > > > > send". > > > > > > > > -- > > > > Jason Wong -> Gremlins Associates -> www.gremlins.com.hk > > > > Open Source Software Systems Integrators > > > > * Web Design & Hosting * Internet & Intranet Applications > > Development * > > > > > > > > /* > > > > A great many people think they are thinking when they are merely > > > > rearranging their prejudices. > > > > -- William James > > > > */ > > > > > > > > > > > > -- > > > > PHP General Mailing List (http://www.php.net/) > > > > To unsubscribe, visit: http://www.php.net/unsub.php > > > > > > > > > > > > > -- > > > PHP General Mailing List (http://www.php.net/) > > > To unsubscribe, visit: http://www.php.net/unsub.php > > > > > > > > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Mcrypt: Blowfish or Twofish or no fish?
hiya, twofish runs at just over 25MB/sec when compiled into a test VC++ application, blowfish runs at 18MB/sec. As far as I remember, if you use the same keylenght (256 or 128) then you should get around the same level of encryption (probably not exact, but if one was that much weaker there'd be a warning on the Mcrypt page). HTH, Dw Sqlcoders.com Dynamic data driven web solutions - Original Message - From: "Jimmy Lantz" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: May 21 2002 09:27 AM Subject: [PHP] Mcrypt: Blowfish or Twofish or no fish? > Hi, > started playing with Mcrypt and just wanted to ask which encryption method > makes the stronger encryption? > (I can supply the necesary keylength). > Should I go for MCRYPT_BLOWFISH or MCRYPT_TWOFISH? Or no fish at all :) > > So what do I need it for? I'm going to use it encrypting files, sizes > varies between some 100 k's and 4-5 mb's. > / Jim > > Paranoia + A system w/o users = Safe system :) > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] printer_open
Hiya!, Have you tried adding this line in the very top of your script (just inside the opening To: <[EMAIL PROTECTED]> Sent: May 21 2002 11:19 AM Subject: [PHP] printer_open > I'm attempting to use the printer_open function in php, and am getting the > following error: > > Fatal error: Call to undefined function: printer_open() in c:\program > files\apache group\apache\htdocs\new\aview.php on line 209 > > I've tried commenting and uncommenting the extension=php_printer.dll > line in php.ini with no results. > > Help! > > J. Wharton > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] printer_open
hiya, there's not that much you can do directly (i.e.: without some activeX controls which the client has to accept and then only work on IE), you can print a document in JavaScript with window.print(); Something like this would work if you wanted to print the document on screen: (in the body tag) HTH, Dw Sqlcoders.com Dynamic data driven web solutions - Original Message - From: "J. Wharton" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: May 21 2002 12:13 PM Subject: Re: [PHP] printer_open > I wish they had noted this in the PHP manual. Does anyone know of a way to > manipulate the client computer's printer orientation? > > > J. Wharton > > "1lt John W. Holmes" <[EMAIL PROTECTED]> wrote in message > 006101c20101$6c3ae7b0$2f7e3393@TB447CCO3">news:006101c20101$6c3ae7b0$2f7e3393@TB447CCO3... > > Restart your web server when you make changes to php.ini. > > > > Also, note that these functions are for the printer on the server, i.e. > > where the code is running. > > > > ---John Holmes... > > > > - Original Message - > > From: "Sqlcoders.com Programming Dept" <[EMAIL PROTECTED]> > > To: "php general" <[EMAIL PROTECTED]> > > Cc: "J. Wharton" <[EMAIL PROTECTED]> > > Sent: Wednesday, May 22, 2002 1:29 AM > > Subject: Re: [PHP] printer_open > > > > > > > Hiya!, > > > Have you tried adding this line in the very top of your script (just > > inside > > > the opening > > DL("php_printer.dll"); > > > > > > (this call to load a dynamic extension must occur before any printer_ > > > related functions, if it works at all) > > > > > > Usually that works for me, if it doesn't work for you then check that > you > > > have the php_printer dll and that it's in the appropriate directory. > > > > > > HTH, > > > Dw > > > > > > Sqlcoders.com Dynamic data driven web solutions > > > - Original Message - > > > From: "J. Wharton" <[EMAIL PROTECTED]> > > > To: <[EMAIL PROTECTED]> > > > Sent: May 21 2002 11:19 AM > > > Subject: [PHP] printer_open > > > > > > > > > > I'm attempting to use the printer_open function in php, and am getting > > the > > > > following error: > > > > > > > > Fatal error: Call to undefined function: printer_open() in c:\program > > > > files\apache group\apache\htdocs\new\aview.php on line 209 > > > > > > > > I've tried commenting and uncommenting the extension=php_printer.dll > > > > line in php.ini with no results. > > > > > > > > Help! > > > > > > > > J. Wharton > > > > > > > > > > > > > > > > > > > > -- > > > > PHP General Mailing List (http://www.php.net/) > > > > To unsubscribe, visit: http://www.php.net/unsub.php > > > > > > > > > > > > > > > > > -- > > > PHP General Mailing List (http://www.php.net/) > > > To unsubscribe, visit: http://www.php.net/unsub.php > > > > > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Mcrypt: Blowfish or Twofish or no fish?
> > What about MD5? > MD5 is a message digest I believe, something akin to the oldstyle CRC32. Then again I haven't used it much (just to verify a client's credit card number without revealing the CC number). HTH, Dw. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] "Zend Timeout Window" crashed due to an Access Violation. -- Any ideas?
Hi there!, I've been testing some code for a company and I'm encountering something which I've never found before, right after making a call to a simple DB abstraction class which basically just makes a call to odbc_connect, then odbc_do, and then loops through the data saving the value of any field which is inside a passed array. Every time it access's this class, Norton crashguard pops up with the following: "'Zend Timeout Window' crashed due to an Access Violation." "Zend Timeout Window" is hidden, and I assume only exists for the lifetime of a PHP interpreter request. Does anyone know of a documented or undocumented problem using odbc_* under windows that causes the underlying Zend system to croak? TIA, Dw. Sqlcoders.com Dynamic data driven web solutions -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Function
Hi there!, When you include information from an include file, PHP treats the text as inline code if you use the include() function. In other words, if you use code like this: Then any functions inside file.php will be available just as if you'd copy/pasted them in. If file.php contained: function echoThis($this_text){ echo($this_text); } then you could type and whatever echoThis() is coded to do will happen just as if the file looked like this: For more information, see http://www.php.net/manual/en/function.include.php HTH, Dw Sqlcoders.com Dynamic data driven web solutions - Original Message - From: "Rodrigo" <[EMAIL PROTECTED]> To: "'Php Lista'" <[EMAIL PROTECTED]> Sent: May 21 2002 08:48 PM Subject: [PHP] Function Hi guys I'm trying to use a function on na .inc file, how should I do? How should I write the function and what should I write on the file so that the function file is "Included" to be used on a function call on the php file? I appreciate any kind of sample code. Thanx, Rodrigo de Oliveira Costa -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] W2K SP2, PHP 4.2.1, IIS 5
Hi there!, In a word - script mappings. In the IIS administrator, you must associate the .php extension with the php interpreter. Use the IIS help wizard to tell you how, or: 1. Start Regedt32.exe and open the following registry key: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W3SVC \Parameters\ScriptMap 2. Click Add Value from the Edit menu. 2b. The Value Name is .php 2c. The Data type is REG_SZ. 2d. The String value is \php.exe %s %s NOTE: The "%s %s" is case sensitive. (e.g. "%S %S" will not work). (%s %s is the file, you might need to add a -i or -whatever if php needs it) 3. Restart the WWW service. 4. Cross your fingers, if it doesn't work go in & play with the string value by using the edit dialog in regedt32. HTH, Dw. Sqlcoders.com Dynamic data driven web solutions - Original Message - From: "Joshua E Minnie" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: May 22 2002 10:54 AM Subject: [PHP] W2K SP2, PHP 4.2.1, IIS 5 > Hey all, > I have a problem, that I can't seem to find the answer to. I have > checked the archives and the website, but to no avail. I have installed PHP > 4.2.1 on my local machine with IIS running W2K Pro. When I run php -i, I > get the html output expected. But when I try to open the simple php script > >phpinfo(); > ?> > > all I get is the script written directly to the browser as text. I can't > figure out why it is not going through php.exe. Any help would be greatly > appreciated. > > -josh > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: JavaScript vs. Header redirect
Hi there!, I've looked over this thread and from what I gather you want to know if you can/should use JavaScript for redirecting, my usual way of going about things is to put a JavaScript location.href='page.aspx' call in the head of the document (putting JS in the head causes it to execute before the page is rendered, or should at any rate), and then I use a meta refresh tag as my backup, set for 3 seconds. That usually covers everything, it stops spiders (google has a strong dislike of meta refresh), it redirects JS users transparently, it's almost instantaneous for the paranoid-shouldn't-be-let-out-of-the-ward non JS people, and it's easy to code. Plus it works in any server side scripting language, as it's all client-side code. Just my $0.02, Dw. Sqlcoders.com Dynamic data driven web solutions - Original Message - From: "Hunter Vaughn" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: May 22 2002 11:19 AM Subject: [PHP] Re: JavaScript vs. Header redirect > Okay, looks like I was stupid/lazy for including the pseudo code instead of > something closer to what I was using. Also, perhaps I'm being dense, but I > don't understand what Michael's response has to do with this situation. Can > he or someone else enlighten me? Here's a more accurate/detailed > description of what's going on, complete with the exact code (minus > sensitive info) that I'm using: > > The chunk of code in question is a login handler. It's supposed to collect > two form fields named username and password from the Post method variables. > Then it's supposed to check the password against an encrypted version stored > in a database (I didn't include the database variables/code in the example > below). If it matches, it's supposed to redirect them to a page where they > can perform administrative functions. In the course of debugging it, I found > that the header("Location: ...") command worked perfectly until I called on > the $_POST or $HTTP_POST_VARS arrays (which seem to be synonymous). If I > removed the calls to the arrays, it worked fine. I looked through the > comments on the header function on www.php.net and through some of the > previous questions posted in the news group, and it seems like others have > experienced this problem as well. However, the most common situation noted > was that it broke as soon as they called a function. I guess I'm calling a > function implicitly when I ask for the $_POST variables. The most obvious > way I can see around this is simply to cause the client to redirect using > JavaScript. Of course, the downside to this is that the user may have > disabled scripting, but I'm working in a pretty closed environment, so I > think I can avoid that contingency. I'm using 4.1.2 as a cgi in a UNIX > environment w/ MySQL 3.22.x. > --Hunter Vaughn > > > $Host = "___"; >$User = "___"; >$Pass = "___"; >$dbName = "___"; >$username = $_POST[username]; >$password = $_POST[password]; > >$Link = mysql_connect($Host, $User, $Pass) or die ("Could not connect to > the database."); >mysql_select_db($dbName); > >if((ereg(".+@.+\..+", $username)) && (eregi("^[[:alnum:]]{8,16}$", > $password))) { > > $Query = "SELECT email, memberID, pass FROM Login where > email='$username'"; > $Result = mysql_query($Query); > $Row = @mysql_fetch_array($Result); > if((crypt($password, $Row[pass])) == $Row[pass]) { > session_start(); > $email = $Row[0]; > $memberID = $Row[1]; > session_register('email'); > session_register('memberID'); > //header("Location: http://some.domain.com/PHP/update.php";); > This doesn't work... > print("window.location = > \"http://some.domain.com/PHP/update.php\";;"); > exit; > } > else { > $message = urlencode("The username and password submitted do not > match those on file. Please try again."); > } >} >else { > $message = urlencode("Please enter your username and password to log > in."); >} >print("window.location = > \"http://some.domain.com/HTML/letsboogie22.html\";;"); >exit; > ?> > > "Hunter Vaughn" <[EMAIL PROTECTED]> wrote in message > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > > Is there any reason I can't just use a JavaScript redirect from a PHP > login > > handling script since I can't seem to get the header("Location: URL"); > > function to work? Any security concerns or anything else? As far as I > can > > tell, all calls to header fail as soon as I attain variables based on a > POST > > submission. See example below. > > > > > $username = $_POST[username]; > > $password = $_POST[password]; > > > > if(some username/password format verification) { > > query the database > > if($password matches pass in database) { > >
Re: [PHP] W2K SP2, PHP 4.2.1, IIS 5
Ho hum, So it doesn't seem to be script mappings - I stand corrected. Have you checked that the .PHP type is associated in the HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W3SVC\Parameters\Script Map branch of the registry?. You might want to check that it's .PHP, and not .PHP4 , as this could be your problem if some tool did the setup and you didn't see the actual file ext being mapped. If that doesn't work, then as you already know the problem isn't with the PHP interpreter, it's probably something in IIS having a fit. Here's my general checklist: Did you restart IIS? Did you restart the server? Does php.exe have the appropriate permissions? Are you sure that the script mappings are correct? (based upon the fact that you're getting the php source I'm inclined to say that it's still your script mappings). If all that fails, there's always: Have you tried a hammer? , I hope somewhere in there you find an answer, if it was me I'd be triple checking my script mappings, as from what you've said everything seems to work individually, the pieces just haven't been bound together. HTH, Dw. Sqlcoders.com Dynamic data driven web solutions - Original Message - From: "Sqlcoders.com Programming Dept" <[EMAIL PROTECTED]> To: "php general" <[EMAIL PROTECTED]> Cc: "Joshua E Minnie" <[EMAIL PROTECTED]> Sent: May 22 2002 09:14 PM Subject: Re: [PHP] W2K SP2, PHP 4.2.1, IIS 5 > Hi there!, > In a word - script mappings. > > In the IIS administrator, > you must associate the .php extension with the php interpreter. > > Use the IIS help wizard to tell you how, > or: > 1. Start Regedt32.exe and open the following registry key: > HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W3SVC > \Parameters\ScriptMap > > 2. Click Add Value from the Edit menu. > > 2b. The Value Name is .php > > 2c. The Data type is REG_SZ. > > 2d. The String value is \php.exe %s %s > NOTE: The "%s %s" is case sensitive. (e.g. "%S %S" will not work). > (%s %s is the file, you might need to add a -i or -whatever if php needs it) > > 3. Restart the WWW service. > > 4. Cross your fingers, if it doesn't work go in & play with the string value > by using the edit dialog in regedt32. > > HTH, > Dw. > > Sqlcoders.com Dynamic data driven web solutions > - Original Message - > From: "Joshua E Minnie" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: May 22 2002 10:54 AM > Subject: [PHP] W2K SP2, PHP 4.2.1, IIS 5 > > > > Hey all, > > I have a problem, that I can't seem to find the answer to. I have > > checked the archives and the website, but to no avail. I have installed > PHP > > 4.2.1 on my local machine with IIS running W2K Pro. When I run php -i, I > > get the html output expected. But when I try to open the simple php > script > > > > > phpinfo(); > > ?> > > > > all I get is the script written directly to the browser as text. I can't > > figure out why it is not going through php.exe. Any help would be greatly > > appreciated. > > > > -josh > > > > > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, visit: http://www.php.net/unsub.php > > > > > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Making varibles (more than one) with a function.
Sqlcoders.com Dynamic data driven web solutions - Original Message - From: "David Duong" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: May 22 2002 04:21 PM Subject: [PHP] Making varibles (more than one) with a function. > I am aware that return can return strings but is their a set global or a > function similar to return? hi there!, There sure is, it's called global. Usage: global $variable_a; global $variable_b; global $variable_c; ... HTH, Dw. > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] 'Couldn't compile code. And I'm not smart enough to tell you why, sorry.' -- Any ideas?
Hiya, I've been getting the strangest error: "Couldn't compile code. And I'm not smart enough to tell you why, sorry. in c3.php on line 25" Here's a code listing, if anyone can give me a hint as to what's up that would be great, this is the first time the PHP interpreter has thrown a wobbly like this on me. Although I have a feeling that this is really a Ming error which is bubbling up through to the web server for output. setrate(2); $movie->setbackground(0xfff,0xfff,0xfff); $font = new SWFFont("_sans"); $text = new SWFTextField(SWFTEXTFIELD_DRAWBOX ); $text->setBounds(100,15); $text->setFont($font); $text->setColor(0xff, 0, 0); $text->setname("display"); $container = new SWFSprite(); $container->add($text); $container->nextFrame(); $handle2 = $movie->add($container); $handle2->setname("container"); $handle2->moveto(10,10); $movie->nextframe(); $movie->nextframe(); $movie->add(new SWFAction("loadVariables('vars.php','_root');")); $movie->add(new SWFAction("_root.container.display = _root.date")); header('Content-type: application/x-shockwave-flash'); $movie->output(); ?> Any help would be appreciated, TIA, Dw. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] MS SQL Problem
Hiya, were you using the appropriate free_query & close functions to free up the memory & more importantly the socket used to talk to the sql server? You might want to try using the _pconnect function if it's available instead of the usual _connect statement. I'd guess that PHP ran out of sockets to make outbound connections with. Also, I believe that MSSQL is setup to only have around 1000 max connections open unless you alter the value in the config. HTH, Dw Sqlcoders.com Dynamic data driven web solutions - Original Message - From: "Justin Felker" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: May 31 2002 08:46 AM Subject: [PHP] MS SQL Problem > Last night, I ran into a problem when using the MS SQL support in PHP under > Apache/PHP module/MS SQL 2000. Everything worked well enough. I was able > to connect to the server, query data, and a number of other > things. However, I found that if I ran my test page (it connects to, > queries and displays 20 rows of data, then disconnects) over and over very > quickly (hold CTRL+R down basically) PHP would eventually (after about 6 > seconds) fail to connect to the MS SQL server. In fact, the web server > would have to be completely restarted before it could connect again. > > Has anyone run into this? I mean, if there is no solution to this and is > the cause of basically shaky MS SQL support, then the SQL server would be > made useless for sites with even a modest amount of traffic (several > requests per second). Is this a known problem? If so, could anyone help > me out? > > Thanks! > > Justin > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] MS SQL Problem
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi there, I remember reading of a config setting in php.ini which lowered the time PHP waits before clearing up/closing the socket out. If it's a linux system you might want to try running netstat to see the open net connections. If you see lots of open connections when you reload the page a few times to your sql server then you know you need to shorten the appropiate timeouts. If you dont see lots of open connections then it's something unrelated to the actual virtual circuits opened. HTH, Dw. - - Original Message - From: "Justin Felker" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: May 31 2002 11:21 PM Subject: Re: [PHP] MS SQL Problem > Thanks for the reply. Actually, I am using both mssql_free_query > and mssql_close along with mssql_pconnect. It still happens > however. I can post the code if you are unsure. Does it have a > history of threading issues as it only seems to happen when > several requests are sent all at once or at least in very fast > succession. > > Justin > > > At 06:56 PM 5/31/2002 -0700, you wrote: > >Hiya, > >were you using the appropriate free_query & close functions to > >free up the memory & more importantly the socket used to talk to > >the sql server? > > > >You might want to try using the _pconnect function if it's > >available instead of the usual _connect statement. > > > >I'd guess that PHP ran out of sockets to make outbound connections > >with. Also, I believe that MSSQL is setup to only have around 1000 > >max connections open unless you alter the value in the config. > > > >HTH, > >Dw > > > > > >Sqlcoders.com Dynamic data driven web solutions > >- Original Message - > >From: "Justin Felker" <[EMAIL PROTECTED]> > >To: <[EMAIL PROTECTED]> > >Sent: May 31 2002 08:46 AM > >Subject: [PHP] MS SQL Problem > > > > > > > Last night, I ran into a problem when using the MS SQL support > > > in PHP > >under > > > Apache/PHP module/MS SQL 2000. Everything worked well enough. > > > I was able to connect to the server, query data, and a number > > > of other things. However, I found that if I ran my test page > > > (it connects to, queries and displays 20 rows of data, then > > > disconnects) over and over very quickly (hold CTRL+R down > > > basically) PHP would eventually (after about 6 seconds) fail to > > > connect to the MS SQL server. In fact, the web server would > > > have to be completely restarted before it could connect again. > > > > > > Has anyone run into this? I mean, if there is no solution to > > > this and is the cause of basically shaky MS SQL support, then > > > the SQL server would be made useless for sites with even a > > > modest amount of traffic (several requests per second). Is > > > this a known problem? If so, could anyone help me out? > > > > > > Thanks! > > > > > > Justin > > > > > > > > > -- > > > PHP General Mailing List (http://www.php.net/) > > > To unsubscribe, visit: http://www.php.net/unsub.php > > > > > > > > > > > >-- > >PHP General Mailing List (http://www.php.net/) > >To unsubscribe, visit: http://www.php.net/unsub.php > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > -BEGIN PGP SIGNATURE- Version: PGP Personal Privacy 6.5.8 iQA/AwUBPPljiNf2pW/GxlpVEQLy9wCg3tHovxdcVNthQvHyGY0brheJOqsAn28o yFtm2vp4juq7zFZcQy8G9Qfp =2jJv -END PGP SIGNATURE- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] stupid error, please kick me (and send me a solution)
Hiya, You're using single quotes around all your strings, for variables to be replaced with their values, you must use double quotes. Try replacing every ' with ". HTH, Dw Sqlcoders.com Dynamic data driven web solutions - Original Message - From: "Jule Slootbeek" <[EMAIL PROTECTED]> To: "mysql" <[EMAIL PROTECTED]>; "php-general" <[EMAIL PROTECTED]> Sent: June 03 2002 03:09 PM Subject: [PHP] stupid error, please kick me (and send me a solution) > Hey guys, > i'm getting this error with the following sql script using php: > --error-- > Warning: Supplied argument is not a valid MySQL-Link resource in > /var/www/phpquiz/register_user.php on line 12 > --error-- > > --script-- > $link_glob = "mysql_connect('$host_glob', '$un_glob', '$pw_glob')"; > $query = "INSERT INTO user values('0', '$fname', '$lname', '$email', > '$username', PASSWORD('$password')"; > $result = mysql_db_query('$db_glob', '$query', $link_glob'); > if (!$result) { > echo "Your Information could not be entered into the database, > Please contact the href=mailto:$webmaster>webmaster." . mysql_errno() . > ": " . mysql_error() . ""; > } else { > echo "Your Information has successfully been entered into the > database!"; > > -- > Jule Slootbeek > [EMAIL PROTECTED] > > http://blindtheory.cjb.net > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php