Re: [PHP] Attempt at putting greedy htmlspecialchars on a diet

2003-10-04 Thread Gerard Samuel
Curt Zirzow wrote: That is an html entity and is not how it is stored. How that entity gets displayed depends entirely on what encoding you have set for the page. The japanese characters (charset ISO-2022-JP) to use to display the phrase for 'Contents' is: ^[$B$3$s$F$s$D^[(B (^[ == escape charac

php-general Digest 5 Oct 2003 04:21:30 -0000 Issue 2336

2003-10-04 Thread php-general-digest-help
php-general Digest 5 Oct 2003 04:21:30 - Issue 2336 Topics (messages 165038 through 165078): Global varialbes in functions 165038 by: Jeff McKeon 165039 by: Matt Schroebel 165040 by: Jeff McKeon Design Pattern Goulash Was: Committing OO Sin 165041 by: Gerard

Re: [PHP] $_SERVER['REMOTE_HOST']

2003-10-04 Thread John Nichel
John Taylor-Johnston wrote: PHP is Open Source. This is the general forum. Here is my suggestion: Create $_SERVER['REMOTE_HOST'] as a variable. $gethost = gethostbyaddr($_SERVER['REMOTE_ADDR']); is getting old. Anyone agree? Nope, sorry. I don't want my install of PHP to make a DNS lookup ever

Re: [PHP] Attempt at putting greedy htmlspecialchars on a diet

2003-10-04 Thread Curt Zirzow
* Thus wrote Gerard Samuel ([EMAIL PROTECTED]): > CPT John W. Holmes wrote: > > >From: "Eugene Lee" <[EMAIL PROTECTED]> > > > > > > > >>On Wed, Oct 01, 2003 at 01:12:16AM -0400, Gerard Samuel wrote: > >>: > >>: Got a problem with htmlspecialchars being too greedy, where > >>: for example, it conv

Re: [PHP] returning a variable from a class function? plus other probs

2003-10-04 Thread Curt Zirzow
* Thus wrote Dan Anderson ([EMAIL PROTECTED]): > > Using ' is prefered IIRC, and also escaping all the data before sending > > it to the database: > > Hmmm. Perhaps Emacs isn't converting from Unicode to ASCII properly? > ::shrugs:: I just know sometimes my queries don't work if I use ' . I ju

Re: [PHP] returning a variable from a class function? plusotherprobs

2003-10-04 Thread Kirk Babb
The user I created can only INSERT, SELECT, DELETE, UPDATE using the GRANT option from the mysql cmd line. I'll have to start checking my data per yours and Curt's responses. Sounds like I should remove the DELETE option from that user and create a second user with DELETE permission. -Kirk "Da

Re: [PHP] Attempt at putting greedy htmlspecialchars on a diet

2003-10-04 Thread Curt Zirzow
* Thus wrote Gerard Samuel ([EMAIL PROTECTED]): > - Edwin - wrote: > > >"Far east languages" are not necessarily in this form: "&#n;" So, > > > >running htmlspecialchars() on, say, Japanese characters would do NO > >harm since &, ", ', <, > are NOT Japanese characters ;) > > > >Or, am I missin

[PHP] Apache API?

2003-10-04 Thread \[ASDF\] Jeremy
Hi All, I've been thinking of developing an Apache module to ease my job, but I don't have a clue of C. I know that mod_perl and mod_tcl provides module programming support for Apache, are there any implementations of PHP in programming Apache modules? Thanks - Jeremy -- PHP General Mailing Lis

Re: [PHP] returning a variable from a class function? plus otherprobs

2003-10-04 Thread Dan Anderson
> up until now! Dumb now I realize, thanks for pointing that out. I've > created a new root pwd, and created a user with access only to the "alumni" If you want to be super secure you should create several users. Once for SELECTing, one for INSERTing, etc. Juggling resource handles gets tricky

Re: [PHP] returning a variable from a class function? plus other probs

2003-10-04 Thread Dan Anderson
> Using ' is prefered IIRC, and also escaping all the data before sending > it to the database: Hmmm. Perhaps Emacs isn't converting from Unicode to ASCII properly? ::shrugs:: I just know sometimes my queries don't work if I use ' . -Dan -- PHP General Mailing List (http://www.php.net/) To un

Re: [PHP] returning a variable from a class function? plus other probs

2003-10-04 Thread Curt Zirzow
* Thus wrote Dan Anderson ([EMAIL PROTECTED]): > > > $chk = "Select id, fname from contact_info where email =" . $email; > > You need to quote the email. So perhaps the following would be more > appropriate: > > $chk = "SELECT id, fname FROM contact_info WHERE email = \"{$email}

Re: [PHP] returning a variable from a class function? plus otherprobs

2003-10-04 Thread Kirk Babb
Dan, Thanks so much for the help - I learned a lot from your reply. I'll chew on this a while and go from there. BTW- yes, that really was my user and pwd up until now! Dumb now I realize, thanks for pointing that out. I've created a new root pwd, and created a user with access only to the "al

Re: [PHP] returning a variable from a class function? plus other probs

2003-10-04 Thread Dan Anderson
A couple of things... > $conxn = mysql_connect('localhost','root','redtail.7') or fail("Could > not connect: ".mysql_error()); Create a script inc.mysqlconnect.php that connects and selects and require_once() it on all of your files that need to connect to the database. This will sav

RE: [PHP] returning a variable from a class function? plus other probs

2003-10-04 Thread Javier Muniz
Your sql statement is generating an error. You can test for this using mysql_errno and mysql_error to test for and view the error, respectively. The likely cause of the SQL error is that you are not putting quotes (') around your string for the email query, the proper query would look like: $chk

[PHP] returning a variable from a class function? plus other probs

2003-10-04 Thread Kirk Babb
I'm new at OO and still a newbie at PHP despite hacking away at it for a while (admittedly off and on). I'm creating a signup form for alumni of our department, and I'm trying to verify that they have not signed up previously before allowing their data to be inserted. Trouble has ensued! :) In t

Re: [PHP] Attempt at putting greedy htmlspecialchars on a diet

2003-10-04 Thread Gerard Samuel
- Edwin - wrote: "Far east languages" are not necessarily in this form: "&#n;" So, running htmlspecialchars() on, say, Japanese characters would do NO harm since &, ", ', <, > are NOT Japanese characters ;) Or, am I missing something? :) Not exactly. When storing "far east languages" in a d

Re: [PHP] PHP and .HTACCESS

2003-10-04 Thread Curt Zirzow
* Thus wrote Marek Kilimajer ([EMAIL PROTECTED]): > it is virtualy impossible to make the browser forget the credentials. You sorta of can. If you redirect the user to something like: http://username:[EMAIL PROTECTED]/path/ The browser will/should forget the credentials. Curt -- List Stats

Re: [PHP] PHP and .HTACCESS

2003-10-04 Thread Mika Tuupola
On Fri, 3 Oct 2003, Marek Kilimajer wrote: > > thing that I can not find anywhere is how to code it so a user can click logoff > > and have it route them to another page and remove their authentication that was > > set. > it is virtualy impossible to make the browser forget the credentials.

Re: [PHP] changing from Apache mod to CGI

2003-10-04 Thread messju mohr
On Sun, Oct 05, 2003 at 05:28:49AM +0800, Jason Wong wrote: > On Sunday 05 October 2003 04:24, messju mohr wrote: > > > the cgi-sapi has a big advantage in a shared hosting environment: > > suexec - your php-scripts run with a distict uid for each customer. > > > > this is by far better than the h

Re: [PHP] Tracking IP Addresses

2003-10-04 Thread Mika Tuupola
On Sun, 5 Oct 2003, Mika Tuupola wrote: > On Fri, 3 Oct 2003, Stephen Craton wrote: > > > I'm wanting to track IP addresses by pinpointing their geological location > > (country and whatever) but I have no idea how to go about doing this. I've > > been searching on the net and PHP websites all da

Re: [PHP] $_SERVER['REMOTE_HOST']

2003-10-04 Thread Chris Shiflett
--- John Taylor-Johnston <[EMAIL PROTECTED]> wrote: > PHP is Open Source. This is the general forum. Here is my suggestion: > > Create $_SERVER['REMOTE_HOST'] as a variable. > > $gethost = gethostbyaddr($_SERVER['REMOTE_ADDR']); > > is getting old. Anyone agree? What do you mean by getting old?

RE: [PHP] Tracking IP Addresses

2003-10-04 Thread Mika Tuupola
On Fri, 3 Oct 2003, Larry Rosenman wrote: > IP's are not locked to a geographical area. > Period. APNIC, RIPE, ARIN and LACNIC store country information on assigned ip network blocks like this: -cut- apnic|MO|asn|4609|1|19950615|allocated apnic|KR|asn|4670|1|19950616|allocated ap

Re: [PHP] Tracking IP Addresses

2003-10-04 Thread Mika Tuupola
On Fri, 3 Oct 2003, Stephen Craton wrote: > I'm wanting to track IP addresses by pinpointing their geological location > (country and whatever) but I have no idea how to go about doing this. I've > been searching on the net and PHP websites all day but with no luck. Can > anyone point me towards a

Re: [PHP] changing from Apache mod to CGI

2003-10-04 Thread Jason Wong
On Sunday 05 October 2003 04:24, messju mohr wrote: > the cgi-sapi has a big advantage in a shared hosting environment: > suexec - your php-scripts run with a distict uid for each customer. > > this is by far better than the half-baked crutch called safe-mode. the > fact that the cgi-sapi's perfor

Re: [PHP] changing from Apache mod to CGI

2003-10-04 Thread Cristian Lavaque
Messju Mohr wrote: > On Sun, Oct 05, 2003 at 03:59:21AM +0800, Jason Wong wrote: >> On Sunday 05 October 2003 04:47, Cristian Lavaque wrote: >>> My webhost announced that it's changing PHP from Apache module to >>> CGI. I know nothing about this, so I'd like to know what I should >>> change in my s

Re: [PHP] changing from Apache mod to CGI

2003-10-04 Thread messju mohr
On Sun, Oct 05, 2003 at 03:59:21AM +0800, Jason Wong wrote: > On Sunday 05 October 2003 04:47, Cristian Lavaque wrote: > > My webhost announced that it's changing PHP from Apache module to CGI. I > > know nothing about this, so I'd like to know what I should change in my > > scripts so they still r

Re: [PHP] changing from Apache mod to CGI

2003-10-04 Thread Jason Wong
On Sunday 05 October 2003 04:47, Cristian Lavaque wrote: > My webhost announced that it's changing PHP from Apache module to CGI. I > know nothing about this, so I'd like to know what I should change in my > scripts so they still run, or they'll work the same? Did they give any convincing reason f

Re: [PHP] embedding code

2003-10-04 Thread Jason Wong
On Sunday 05 October 2003 02:58, John Taylor-Johnston wrote: > How do you do that? > > > Wouldn't it be a WHOLE lot smarter to just disable/enable PHP for > > specific sites/folders, etc? What web server are you using? > > Anyone? In short, you need the following (apache) directive inside the virt

[PHP] changing from Apache mod to CGI

2003-10-04 Thread Cristian Lavaque
My webhost announced that it's changing PHP from Apache module to CGI. I know nothing about this, so I'd like to know what I should change in my scripts so they still run, or they'll work the same? Thank you for your time. Cristian -- PHP General Mailing List (http://www.php.net/) To unsubscrib

[PHP] hotscripts style program (conclusion)

2003-10-04 Thread Ryan A
Hey all, Thanks to everyone who replied. I did a couple more searches on google and found that i was using the wrong search words, after visiting quite a few sites i saw that what i was looking for is called a "link farm" (would never have guessed that in a million years), got a nice link to http:

Re: [PHP] $_SERVER['REMOTE_HOST']

2003-10-04 Thread Ryan A
> The problem is that gethostbyaddr is an expesive call, DNS server must > be contacted. And most of the time you don't need it. Yep, its quite a pain in the ass as i found out the hard way, i had a banner software setup displaying upto 6 differient banners (and differient types. eg: text, banner

Re: [PHP] hotscripts style program

2003-10-04 Thread olinux
here's a decent article outlining how to build a directory. including code samples: http://www.webreference.com/perl/xhoo/php1/ olinux --- Marek Kilimajer <[EMAIL PROTECTED]> wrote: > You need to create a recursive function: > > // pseudo code > function count_content($cat_id) { > SELECT

Re: [PHP] embedding code

2003-10-04 Thread John Taylor-Johnston
How do you do that? > Wouldn't it be a WHOLE lot smarter to just disable/enable PHP for > specific sites/folders, etc? What web server are you using? Anyone? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] embedding code

2003-10-04 Thread John Taylor-Johnston
How do you do that? > Wouldn't it be a WHOLE lot smarter to just disable/enable PHP for > specific sites/folders, etc? What web server are you using? Anyone? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] $_SERVER['REMOTE_HOST']

2003-10-04 Thread Marek Kilimajer
John Taylor-Johnston wrote: PHP is Open Source. This is the general forum. Here is my suggestion: Create $_SERVER['REMOTE_HOST'] as a variable. $gethost = gethostbyaddr($_SERVER['REMOTE_ADDR']); is getting old. Anyone agree? The problem is that gethostbyaddr is an expesive call, DNS server must

[PHP] $_SERVER['REMOTE_HOST']

2003-10-04 Thread John Taylor-Johnston
PHP is Open Source. This is the general forum. Here is my suggestion: Create $_SERVER['REMOTE_HOST'] as a variable. $gethost = gethostbyaddr($_SERVER['REMOTE_ADDR']); is getting old. Anyone agree? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub

Re: [PHP] PHP coders spare time [OT}

2003-10-04 Thread Ryan A
Sooner or later everyones luck runs out :-D Cheers, -Ryan > If his wife knew to add that, I think the cat would already be out of the bag. > > > On Saturday 04 October 2003 05:37 am, Ryan A wrote: > > Hehehe, pretty funny. > > But guess what happens if you just add 3 letters in front of your name

Re: [PHP] NEW: XML Application Objects

2003-10-04 Thread rush
"Terence" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > <> > If you *do* finally decide to master XSLT, you have to conclude that > *any* other templating system is a complete/utter waste of time. (all > authors of ``yet another PHP templating system'', please try not to be > offend

[PHP] Design Pattern Goulash Was: Committing OO Sin

2003-10-04 Thread Gerard Samuel
Robert Cummings wrote: Feel free to ask questions I couldn't come up with anything substantial via other examples, so I fell back on a similar structure that Im currently using in my DB code. The goals: 1. To be able to have the child classes to talk to one another. 2. To be able to have the p

RE: [PHP] Global varialbes in functions

2003-10-04 Thread Jeff McKeon
Sorry, I just figured it out. The third function was getting it's data from a form submit using post and I didn't include a hidden input field with the $_GET[''] variable as a value. Jeff > -Original Message- > From: Jeff McKeon > Sent: Saturday, October 04, 2003 11:35 AM > To: php > Su

Re: [PHP] Global varialbes in functions

2003-10-04 Thread Matt Schroebel
Jeff McKeon said on Saturday, October 04, 2003 at 11:35 AM >However on the third funtion I get an undefined index error for '>ticketid' Post some code ... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Global varialbes in functions

2003-10-04 Thread Jeff McKeon
I've got a page that is passed the global variable 'ticketnumber' in the url. In my first two functions on the page I can call this variable using $_GET['ticketid'] no problem. However on the third funtion I get an undefined index error for 'ticketid' Anyone know why? Thanks, Jeff -- PHP Gen

php-general Digest 4 Oct 2003 15:27:29 -0000 Issue 2335

2003-10-04 Thread php-general-digest-help
php-general Digest 4 Oct 2003 15:27:29 - Issue 2335 Topics (messages 165013 through 165037): Re: embedding code 165013 by: John Taylor-Johnston Re: PHP coders spare time [OT} 165014 by: John W. Holmes 165016 by: Evan Nemerson 165026 by: Ryan A Re: libcurl an

Re: [PHP] NEW: XML Application Objects

2003-10-04 Thread Robert Cummings
On Sat, 2003-10-04 at 08:18, Terence wrote: > > Bloody hell Rob, you've started me on another rant when I could be in bed ;) > *grin* glad to help out. > XSLT is a pain in the butt if you want to master it - particularly if > you're going from imperative programming to declarative (maybe XPath

Re: [PHP] hotscripts style program

2003-10-04 Thread Ryan A
Hey, I want to make a resources section where a company (eg: programmer/ webdesigners/ graphic artists) etc simple fill in a form with a little description of themselves and their website link, i then either approve or delete their post. If approved they should be added under that category and use

Re: [PHP] hotscripts style program

2003-10-04 Thread Marek Kilimajer
You need to create a recursive function: // pseudo code function count_content($cat_id) { SELECT COUNT(*) FROM content WHERE cat_id='$cat_id' $count=sql_result(); SELECT cat_id FROM categories WHERE cat_id='$cat_id' while($cat_id2 = sql_result()) { $

Re: [PHP] PHP Notice: Undefined variable

2003-10-04 Thread Marek Kilimajer
Andrew Chernyack wrote: I recommend the next variant if ($_POST["msg"] =="hi") Why? I've created an html file with form's action parameter as info.php that contains phpinfo(). The result was PHP_SELF /~adolf/info.php _POST["a"] dv fdsvz _SERVER["CONTENT_LENGTH"] 10 You see, _PO

[PHP] Re: PHP Notice: Undefined variable

2003-10-04 Thread Jon Kriek
Simply lower your error reporting level. If you do not have access to your php.ini (not everyone does), then can you can amend this directive in either .htaccess or even on a per script basis by using the error_reporting() function like so. error_reporting(2039); (Equivalent to E_ALL & ~E_NOTICE)

Re: [PHP] hotscripts style program

2003-10-04 Thread Nathan Taylor
Are you looking to make a new HotScripts style website or just a similar menu system? - Original Message - From: Ryan A To: [EMAIL PROTECTED] Sent: Saturday, October 04, 2003 9:28 AM Subject: [PHP] hotscripts style program Hey, Anybody have any code or links to explain ho

[PHP] hotscripts style program

2003-10-04 Thread Ryan A
Hey, Anybody have any code or links to explain how to make a program like the one running on hotscripts? eg: when you visit there you have a couple of categories like : ASP, JAVA, PHP etc (if you select php) PHP --Scripts --Books --tutorials (if you select scripts) --Scripts category1(324)

Re: [PHP] PHP Notice: Undefined variable

2003-10-04 Thread Andrew Chernyack
I recommend the next variant if ($_POST["msg"] =="hi") Why? I've created an html file with form's action parameter as info.php that contains phpinfo(). The result was PHP_SELF /~adolf/info.php _POST["a"] dv fdsvz _SERVER["CONTENT_LENGTH"] 10 You see, _POST["a"] - Orig

[PHP] Re: PHP Notice: Undefined variable

2003-10-04 Thread Comex
<[EMAIL PROTECTED]> Nabil: > I got PHP Notice: Undefined variable > > Should I define always any var ?? when do I have do define a var?? > > example if I want to write > if ($_POST['msg'] =='hi') > { > do something ... > } -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit

Re: [PHP] NEW: XML Application Objects

2003-10-04 Thread Raditha Dissanayake
Hi Terrence The only thing that disagree with in your whole post is 'XSLT is a pain in the butt' far from it. I aint no master either but i really like it. XSLT is a pain in the butt if you want to master it - particularly if you're going from imperative programming to declarative (maybe XPath

[PHP] PHP Notice: Undefined variable

2003-10-04 Thread nabil
I got PHP Notice: Undefined variable Should I define always any var ?? when do I have do define a var?? example if I want to write -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] PHP coders spare time [OT}

2003-10-04 Thread Ryan A
Hehehe, pretty funny. But guess what happens if you just add 3 letters in front of your name and search. eg "php john w holmes" http://www.google.se/search?q=php+john+w+holmes&hl=en&ie=UTF-8&oe=UTF-8 you would have to get ready to push up daisys :-D Cheers, -Ryan > Ryan A wrote: > > > I t

Re: [PHP] NEW: XML Application Objects

2003-10-04 Thread Terence
Robert Cummings wrote: On Fri, 2003-10-03 at 11:30, Raditha Dissanayake wrote: Hi, Please give it a shot, it's real easy. far easier than any of the lame php template systems i have seen. The beauty is that the same XML/XSL combo can be used with PHP, perl, JSP/Servlets, C++, VC++,VB,C,C# and

[PHP] alpha channel inpng

2003-10-04 Thread Andrew Chernyack
Hi all... I have the problem: As a result i get an image but without transparency. What's the matter?

[PHP] Apache API support?

2003-10-04 Thread \[ASDF\] Jeremy
Hi All, I've been thinking of developing an Apache module to ease my job, but I don't have a clue of C. I know that mod_perl and mod_tcl provides module programming support for Apache, are there any implementations of PHP in programming Apache modules? Thanks - Jeremy -- PHP General Mailing Lis

[PHP] still not able to exec useradd with apache

2003-10-04 Thread nabil
still not able to exec useradd as apache -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] SQL Server through PEAR - problem

2003-10-04 Thread Evan Nemerson
PHP must be compiled --with-mssql in order to use the MS SQL extension. On Friday 03 October 2003 11:18 pm, [EMAIL PROTECTED] wrote: > Hello mailing list, I try to connect SQL server through PEAR directly, but > it doesn't work too, this is the code: > > Test DB Class - PEAR > > > Estado >