php-general Digest 28 Sep 2006 08:20:24 -0000 Issue 4372

2006-09-28 Thread php-general-digest-help
php-general Digest 28 Sep 2006 08:20:24 - Issue 4372 Topics (messages 242321 through 242341): Re: LAMP benchmarking tool 242321 by: Rasmus Lerdorf Re: Download files outside DocumentRoot Dir 242322 by: Christopher Weldon Re: I can see my php code in browser? 242323

Re: [PHP] reading a remote directory

2006-09-28 Thread Stefan van der Linden
I have to read a directory (on a windows machine) from another box (a linux machine) and I thought that I could set the handle to the IP address of the windows box, but that does not work. Do I have to open a socket or is there another way? Thanks! You'll need a webserver to read the

Re: [PHP] Display dynamic progress bar

2006-09-28 Thread clive
well actually you can , firstly you have some element you can update like a text box and then use javascript to up this text box. what you then do is flush the content to php file generates and spit out some javascript to change the text box data I'm sorry, I should have said You'll need

[PHP] Wallet based shopping cart

2006-09-28 Thread wizard007
Hi, I am looking for a shopping cart/member script that will allow members of a site to purchase credits and then spend their credits on my site. I have trawled for hours but can't seem to find one anywhere. :-$ Anyone got any ideas??? Frustrated and wanting to move forward!! -- View this

[PHP] Custom Session Handler

2006-09-28 Thread Glenn Richmond
Hi guys, I couldn't find a developers list, so I hope this is the right list to post to. I need to create a custom session handler for our PHP server. We have a memcache server and so want to use that to handle our session information. I was able to get basic session code working via the custom

[PHP] Re: Logical OR in assignment

2006-09-28 Thread Kae Verens
Jason Karns wrote: I once saw the use of OR (|) in assignment. $x = $y | $z; Does this use bitwise OR? I'm trying to see if I could use the above expression in place of: $x = is_null($y) ? $z : $y; yes, '|' is bitwise OR, but that is /not/ a ternary operator. it's not safe to just replace

Re: [PHP] Print or Echo takes lots of time

2006-09-28 Thread Ivo F.A.C. Fokkema
On Tue, 26 Sep 2006 21:45:58 +1000, David Tulloh wrote: Google Kreme wrote: On 25 Sep 2006, at 06:11 , Sancar Saran wrote: ... If this is generating hundred of K of HTML, use ' instead of (yes, it's faster). I've seen this stated several times and at first glance it seems to make

[PHP] How do i check if a variable is a reference or a copy?

2006-09-28 Thread Mathijs
Hello there, Is there a way to check if a variable is passed by reference or if it is just a copy. With something like is_copy or is_reference? Thx in advance. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Convert UTF-8 to windows-874?

2006-09-28 Thread Peter Lauri
Hi group, I am having a site all encoded in UTF-8, and it works fine. I use AJAX a lot to send data back and forth to the server. I have one service that requires that I send the data in windows-874 encoding (SMS gateway in Thailand). So is there anyway I can take the data that is UTF-8

Re: [PHP] How do i check if a variable is a reference or a copy?

2006-09-28 Thread Dave Goodchild
Why do you want to do that? To check whether a variable is passed by reference or value look at the function prototype. If you clarify the reasons why you want to do that it would help. -- http://www.web-buddha.co.uk http://www.projectkarma.co.uk

Re: [PHP] Wallet based shopping cart

2006-09-28 Thread Ryan A
Hi, I am looking for a shopping cart/member script that will allow members of a site to purchase credits and then spend their credits on my site. I have trawled for hours but can't seem to find one anywhere. :-$ Anyone got any ideas??? Frustrated and wanting to move forward!! Hey! I have

RE: [PHP] Convert UTF-8 to windows-874?

2006-09-28 Thread Peter Lauri
I think I am on the right track right now. There is a function mb_convert_encoding() that could be used. However, I have not found out how to code windows-874? Warning: mb_convert_encoding(): Unknown encoding ISO-8859-11 in D:\webserver\viphavadee\sms\classes\sms.class.php on line 17 Was one of

Re: [PHP] strange errors from command line vs. web

2006-09-28 Thread blackwater dev
Ok, I've set up a username and password using Grant All Privileges, blah. with username and password. For some reason though the web now can't login with that. I then changed the root db password and put that in the config and the web side does run properly with that username, password. I

Re: [PHP] strange errors from command line vs. web

2006-09-28 Thread Ivo F.A.C. Fokkema
Hi, (sorry for top-posting) This is the great way PHP-cli lets you know it hasn't got any MySQL support :) Enable that, and you're good to go. Mind you, PHP-cli has a separate php.ini file. Ivo On Thu, 28 Sep 2006 08:26:13 -0400, blackwater dev wrote: Ok, I've set up a username and

RE: [PHP] Convert UTF-8 to windows-874?

2006-09-28 Thread Peter Lauri
Hi, I was on the right track. However, the mbstring does not seam to support windows-874 (ISO-8859-11). What is the next step I could take? One not the good is to convert the whole system to Windows-874 and use that, but that is not so fun. Please help me :) Best regards, Peter Lauri

Re: [PHP] I can see my php code in browser? [SOLVED]

2006-09-28 Thread afan
You need a line like one of the following in your Apache http.conf file: LoadModule php4_module/usr/local/php/phpWeb/.libs/libphp4.so #LoadModule php5_module /usr/local/php/phpWeb/.libs/libphp5.so This line I didn't need since module was alreadi loaded... You also need to

[PHP] mysql_real_escape_string() question

2006-09-28 Thread tedd
Hi gang: In one of my snip-its, namely: http://xn--ovg.com/pdf I was generating a pdf document after the user filled in a form. I had been cleaning the user input by using -- $name = mysql_real_escape_string($name); -- even though I wasn't using MySQL (the code was a cut-paste from some

[PHP] recv() socket question

2006-09-28 Thread Jeff Lanzarotta
Hello, I am writing a web page that contains some php code the will send/receive a message from a java application running on our server. The php code successfully sends a message to the server but will not, as far as I know, receive the message back. The only way I know this is that I attempt

[PHP] Re: mysql_real_escape_string() question

2006-09-28 Thread Ivo F.A.C. Fokkema
On Thu, 28 Sep 2006 11:06:45 -0400, tedd wrote: Hi gang: In one of my snip-its, namely: http://xn--ovg.com/pdf I was generating a pdf document after the user filled in a form. I had been cleaning the user input by using -- $name = mysql_real_escape_string($name); -- even though

Re: [PHP] Re: mysql_real_escape_string() question

2006-09-28 Thread Eric Butera
On 9/28/06, Ivo F.A.C. Fokkema [EMAIL PROTECTED] wrote: Hi Tedd, According to http://nl3.php.net/mysql_real_escape_string The function requires a MySQL connection. If there is none, it will try and create one. That fails now. Possibly you could use addslashes()? Regards, Ivo -- PHP General

Re: [PHP] recv() socket question

2006-09-28 Thread Richard Lynch
On Thu, September 28, 2006 10:14 am, Jeff Lanzarotta wrote: I am writing a web page that contains some php code the will send/receive a message from a java application running on our server. The php code successfully sends a message to the server but will not, as far as I know, receive the

Re: [PHP] recv() socket question

2006-09-28 Thread Jeff Lanzarotta
OK, I will try and contact Juan. I wrote the Java server. I believe the Java side is working because I can send/receive messages just fine using other clients written in other languages, just not the php client... Regards, -Jeff --- Richard Lynch [EMAIL PROTECTED] wrote: On Thu, September 28,

Re: [PHP] mysql_real_escape_string() question

2006-09-28 Thread Richard Lynch
On Thu, September 28, 2006 10:06 am, tedd wrote: In one of my snip-its, namely: http://xn--ovg.com/pdf I was generating a pdf document after the user filled in a form. I had been cleaning the user input by using -- $name = mysql_real_escape_string($name); -- even though I wasn't using

RE: [PHP] Convert UTF-8 to windows-874?

2006-09-28 Thread Richard Lynch
I think that the iconv function/package may have what you are looking for... This is just a parrot of previous answers to similar questions. I have no personal knowledge... You could also contact the Thai folks and find out if there is anything close enough to Windows-874 to use. From my

Re: [PHP] strange errors from command line vs. web

2006-09-28 Thread blackwater dev
Ok, dumb question but how do I do that? I know how to re-compile the standard php. My code also uses mssql via freetds, does that somehow need to be enabled as it doesn't seem to fail there. Thanks! On 9/28/06, Ivo F.A.C. Fokkema [EMAIL PROTECTED] wrote: Hi, (sorry for top-posting) This

[PHP] CfP: IEEE Software Special Issue on Rapid Application Development with Dynamically Typed Languages

2006-09-28 Thread Laurence Tratt
IEEE Software Special Issue Rapid Application Development with Dynamically Typed Languages Call for Papers Publication:

Re: [PHP] Custom Session Handler

2006-09-28 Thread Richard Lynch
On Thu, September 28, 2006 1:46 am, Glenn Richmond wrote: I couldn't find a developers list, so I hope this is the right list to If you get no answer here, php-internals is a potential source, for a quick reference to the right part of the source where that bit of code lives. Also try finding

Re: [PHP] Wallet based shopping cart

2006-09-28 Thread Richard Lynch
On Thu, September 28, 2006 1:41 am, wizard007 wrote: I am looking for a shopping cart/member script that will allow members of a site to purchase credits and then spend their credits on my site. I have trawled for hours but can't seem to find one anywhere. :-$ Anyone got any ideas???

Re: [PHP] Logical OR in assignment

2006-09-28 Thread Richard Lynch
On Wed, September 27, 2006 10:05 pm, Larry Garfield wrote: The single pipe | is bitwise OR, yes. You're probably thinking of this construct: a = b || c Which is a valid and common default-value idiom in Python and Javascript, but I don't think works in PHP. (If it does, someone please

RE: [PHP] Best open source project/framework to support a php training course?

2006-09-28 Thread Richard Lynch
On Wed, September 27, 2006 8:47 pm, Ligaya A. Turmelle wrote: You should also make sure to go over security in one of your classes - Might I suggest instead that *EVERY* lesson have a Security focus for a few minutes on whatever issues are relevant to whatever is being discussed -- and if you

Re: [PHP] strange errors from command line vs. web

2006-09-28 Thread Richard Lynch
On Thu, September 28, 2006 7:26 am, blackwater dev wrote: Ok, I've set up a username and password using Grant All Privileges, blah. with username and password. For some reason though the web now can't login with that. I then changed the root db password and put that in the config and the

Re: [PHP] strange errors from command line vs. web

2006-09-28 Thread Travis Doherty
blackwater dev wrote: Ok, dumb question but how do I do that? I know how to re-compile the standard php. My code also uses mssql via freetds, does that somehow need to be enabled as it doesn't seem to fail there. Thanks! echo about to connect; $this-connectionID=

Re: [PHP] How do i check if a variable is a reference or a copy?

2006-09-28 Thread Richard Lynch
On Thu, September 28, 2006 5:03 am, Mathijs wrote: Is there a way to check if a variable is passed by reference or if it is just a copy. With something like is_copy or is_reference? If your code doesn't already know which it is, you've screwed up somewhere. -- Like Music?

RE: [PHP] Convert UTF-8 to windows-874?

2006-09-28 Thread Peter Lauri
Iconv did it for me, a great thanks!!! /Peter -Original Message- From: Richard Lynch [mailto:[EMAIL PROTECTED] Sent: Thursday, September 28, 2006 11:12 PM To: Peter Lauri Cc: 'PHP General' Subject: RE: [PHP] Convert UTF-8 to windows-874? I think that the iconv function/package may have

[PHP] problem with email characters

2006-09-28 Thread Ross
Is there a function that sorts out all the dodgy characters in an email... e.g. ? An update on Scottish Social Networks Forum ? A summary of the conference Social Networks - Evidence and Potential ? Information on two organisations playing their part in supporting positive social networks -

[PHP] Re: problem with email characters

2006-09-28 Thread Ross
Actually I think it is a carriage return! Ross Ross [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Is there a function that sorts out all the dodgy characters in an email... e.g. ? An update on Scottish Social Networks Forum ? A summary of the conference Social Networks -

[PHP] Re: problem with email characters

2006-09-28 Thread Manuel Lemos
Hello, on 09/28/2006 02:27 PM Ross said the following: Is there a function that sorts out all the dodgy characters in an email... e.g. ? An update on Scottish Social Networks Forum ? A summary of the conference Social Networks - Evidence and Potential ? Information on two

Re: [PHP] mysql_real_escape_string() question

2006-09-28 Thread tedd
At 11:06 AM -0500 9/28/06, Richard Lynch wrote: What's up with that? Any ideas as to what happened? One also has to ask WHY you would use MySQL's escaping for data that's not going into MySQL. That's almost certainly wrong Richard: Yes, according to:

Re: [PHP] strange errors from command line vs. web

2006-09-28 Thread blackwater dev
Yep, I get called to undefined function so I need to somehow re-compile the cli version? How do I give support to just the cli version? I'm going to the docs now. Thanks! On 9/28/06, Travis Doherty [EMAIL PROTECTED] wrote: blackwater dev wrote: Ok, dumb question but how do I do that? I

Re: [PHP] mysql_real_escape_string() question

2006-09-28 Thread tedd
At 11:06 AM -0500 9/28/06, Richard Lynch wrote: Though I confess, I'm sometimes at a loss how to properly escape certain data for certain situations... Here's an example: Take the Subject of an email. Sure, I've sanitized it to be sure there are no newlines for header injection. But now how

Re: [PHP] How do i check if a variable is a reference or a copy?

2006-09-28 Thread Martin Alterisio
2006/9/28, Mathijs [EMAIL PROTECTED]: Hello there, Is there a way to check if a variable is passed by reference or if it is just a copy. With something like is_copy or is_reference? Thx in advance. Is this part of the I don't know if two vars reference the same object in PHP4 dilemma?

[PHP] Changing values in .htaccess

2006-09-28 Thread Martin Marques
I'm trying helplessly to get session.use_trans_sid to true in one directory that needs it. So I put this in an .htaccess file: php_value session.use_trans_sid 1 The thing is, it didn't work. I also tried changing 1 to On with no luck at all. Ideas are welcome. -- 21:50:04 up 2 days,

Re: [PHP] Changing values in .htaccess

2006-09-28 Thread Curt Zirzow
On 9/28/06, Martin Marques martin@bugs.unl.edu.ar wrote: I'm trying helplessly to get session.use_trans_sid to true in one directory that needs it. So I put this in an .htaccess file: php_value session.use_trans_sid 1 The thing is, it didn't work. I also tried changing 1 to On with no luck at

Re: [PHP] Changing values in .htaccess

2006-09-28 Thread Martin Marques
yOn Thu, 28 Sep 2006, Curt Zirzow wrote: On 9/28/06, Martin Marques martin@bugs.unl.edu.ar wrote: I'm trying helplessly to get session.use_trans_sid to true in one directory that needs it. So I put this in an .htaccess file: php_value session.use_trans_sid 1 The thing is, it didn't work. I

Re: [PHP] Changing values in .htaccess

2006-09-28 Thread Curt Zirzow
On 9/28/06, Martin Marques martin@bugs.unl.edu.ar wrote: yOn Thu, 28 Sep 2006, Curt Zirzow wrote: On 9/28/06, Martin Marques martin@bugs.unl.edu.ar wrote: I'm trying helplessly to get session.use_trans_sid to true in one directory that needs it. So I put this in an .htaccess file:

Re: [PHP] Custom Session Handler

2006-09-28 Thread Glenn Richmond
Hi Richard, No suggestions yet, but hopefully something will come through. Wouldn't you know it, I had a brainstorm while writing this response. amazing what a night's sleep will do. The key to getting a module registered is in session.c in the function PHPAPI int

Re: [PHP] Changing values in .htaccess

2006-09-28 Thread Google Kreme
On 28 Sep 2006, at 14:30 , Curt Zirzow wrote: If you can, set this on a per directory setting in your virtualhost setting within a Directory or Location, instead of turning on .htaccess. Er... why? So you have to get root privs to edit your virtual conf? there's nothing wrong with .htaccess,

Re: [PHP] Changing values in .htaccess

2006-09-28 Thread Curt Zirzow
On 9/28/06, Google Kreme [EMAIL PROTECTED] wrote: On 28 Sep 2006, at 14:30 , Curt Zirzow wrote: If you can, set this on a per directory setting in your virtualhost setting within a Directory or Location, instead of turning on .htaccess. Er... why? So you have to get root privs to edit your

[PHP] OOP Hello World

2006-09-28 Thread Martin Alterisio
What's up folks? I just wanted to tell you about a thread that's going on in the spanish php mailing list. A fellow software developer which had just started with OOP was asking for Hello World examples using OOP. The examples of code he had been doing was not that different from the usual Hello