[PHP] does magic_quotes_gpc prevents sql injection through forms?

2006-09-11 Thread Reinhart Viane
After some comments on my code I went on a 'fieldtrip' to learn about sql
injection...

Now after testing some examples with single and double quotes and mysql
comment (--) I haven't find any way to insert edit or delete any data in the
database.
The loginscript is rather simple:

$query="SELECT FROM persons WHERE login='$login' AND password='$password'";
$result=mysql_query($query) or die(mysql_error());

The form has action POST.
Now magic_quotes_gpc escapes every quote I insert.

Does this mean with magic_quotes_gpc on I am secured enough concerning
mysql-injection through forms?

Thx

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] does magic_quotes_gpc prevents sql injection through forms?

2006-09-11 Thread Dave Goodchild


I don't think so. What if magic_quotes_gpc gets turned off or you move to
another environment. Best practice is to turn if off (if you can) and so
gain fine control over your data. You can either compromise and use a
function that checks whether the setting is enabled and either add your own
slashes or do nothing. To ensure the best level of control over escaping
data before it goes into your db, check out mysql_real_escape_string.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php





--
http://www.web-buddha.co.uk
http://www.projectkarma.co.uk


RE: [PHP] does magic_quotes_gpc prevents sql injection through forms?

2006-09-11 Thread Reinhart Viane
So, if I understand correct mysql_real_escape_string is the way to prevent
sql injection.
Is there still need (as in both good coding and security) for variable
validation at that point? Like a hidden field id that must only be an int?


Van: Dave Goodchild [mailto:[EMAIL PROTECTED] 
Verzonden: maandag 11 september 2006 13:04
Aan: [EMAIL PROTECTED]
CC: php-general@lists.php.net
Onderwerp: Re: [PHP] does magic_quotes_gpc prevents sql injection through
forms?

I don't think so. What if magic_quotes_gpc gets turned off or you move to
another environment. Best practice is to turn if off (if you can) and so
gain fine control over your data. You can either compromise and use a
function that checks whether the setting is enabled and either add your own
slashes or do nothing. To ensure the best level of control over escaping
data before it goes into your db, check out mysql_real_escape_string. 
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



-- 
http://www.web-buddha.co.uk 
http://www.projectkarma.co.uk 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] does magic_quotes_gpc prevents sql injection through forms?

2006-09-11 Thread Dave Goodchild

Yes. Always treat incoming data as if it were tainted. How rigorous you are
is up to you, but check for required fields, then validate them (type, size
etc) and finally escape before database entry.



http://www.projectkarma.co.uk





--
http://www.web-buddha.co.uk
http://www.projectkarma.co.uk


RE: [PHP] does magic_quotes_gpc prevents sql injection through forms?(SOLVED)

2006-09-11 Thread Reinhart Viane
Thx a lot

-Oorspronkelijk bericht-
Van: Dave Goodchild [mailto:[EMAIL PROTECTED] 
Verzonden: maandag 11 september 2006 14:10
Aan: Reinhart Viane
CC: php-general@lists.php.net
Onderwerp: Re: [PHP] does magic_quotes_gpc prevents sql injection through
forms?

Yes. Always treat incoming data as if it were tainted. How rigorous you are
is up to you, but check for required fields, then validate them (type, size
etc) and finally escape before database entry.

>
> http://www.projectkarma.co.uk
>
>


-- 
http://www.web-buddha.co.uk
http://www.projectkarma.co.uk

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] does magic_quotes_gpc prevents sql injection through forms?

2006-09-11 Thread David Tulloh
With magic_quotes_gpc or addslashes it's harder to do injection attacks
but it's still possible.  http://shiflett.org/archive/184 demonstrates
an attack using php and mysql with multi-byte characters.

I think the more likely attack is actually due to how annoying
magic_quotes is.  You have to remove it to do any work, then you have to
remember to put it back on because you aren't escaping your sql.

A final point is that it looks like magic_quotes will be removed from PHP6.


David

Reinhart Viane wrote:
> After some comments on my code I went on a 'fieldtrip' to learn about sql
> injection...
> 
> Now after testing some examples with single and double quotes and mysql
> comment (--) I haven't find any way to insert edit or delete any data in the
> database.
> The loginscript is rather simple:
> 
> $query="SELECT FROM persons WHERE login='$login' AND password='$password'";
> $result=mysql_query($query) or die(mysql_error());
> 
> The form has action POST.
> Now magic_quotes_gpc escapes every quote I insert.
> 
> Does this mean with magic_quotes_gpc on I am secured enough concerning
> mysql-injection through forms?
> 
> Thx
> 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: Ajax and PHP: XMLHTTP

2006-09-11 Thread Alex Turner

Micky Hulse wrote:



Can I replace the above with some sort of XMLHTTP request?

Googling now... thought I would ask here first.

Any good links to tuts that might cover that sort of thing?

Kinda thinking about plugging some Ajax into a random image php script.

TIA. :)
Cheers,
Micky

I think that is a javascript question is it not?  Unless you mean to use 
curl or some such.


AJ

--
www.deployview.com
www.nerds-central.com
www.project-network.com

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] does magic_quotes_gpc prevents sql injection through forms?(SOLVED)

2006-09-11 Thread Faisal Sahar
CAN ANYONE TELL ME WHAT TOPICS ARE REQUIRED TO MASTER 
IN ORDER TO BECOME A GENIOUS WEB PROGRAMMER ? 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] does magic_quotes_gpc prevents sql injection through forms?(SOLVED)

2006-09-11 Thread Dave Goodchild

Learning strtolower() for a start.

On 11/09/06, Faisal Sahar <[EMAIL PROTECTED]> wrote:


CAN ANYONE TELL ME WHAT TOPICS ARE REQUIRED TO MASTER
IN ORDER TO BECOME A GENIOUS WEB PROGRAMMER ?

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php





--
http://www.web-buddha.co.uk
http://www.projectkarma.co.uk


Re: [PHP] Ajax and PHP: XMLHTTP

2006-09-11 Thread Arpad Ray

Micky Hulse wrote:



Can I replace the above with some sort of XMLHTTP request?

As noted, that's a javascript question. However your PHP code is 
vulnerable to XSS attacks; you should at least encode the output with 
htmlspecialchars() so that URLs like 
"foo.php/alert('hi');" are safe.

eg. 

Arpad

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] strip urls

2006-09-11 Thread Merlin

Hi there,

I am trying to strip URL's out of a text. There is a function for this 
in php, but I can't find it anywhere. Can sombody help?


Regards,

Merlin

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] does magic_quotes_gpc prevents sql injection through forms?

2006-09-11 Thread Reinhart Viane
>I think the more likely attack is actually due to how annoying
>magic_quotes is.  You have to remove it to do any work, then you have to
>remember to put it back on because you aren't escaping your sql.


>David

What exactly do you mean by ' You have to remove it to do any work '?

Seems that the only and best way to prevent mysql injection is the
combination of mysql_real_escape_string combined with value validation.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] RE: Ajax and PHP: XMLHTTP

2006-09-11 Thread Miguel Guirao


What do you exactly want to do?

-Original Message-
From: Micky Hulse [mailto:[EMAIL PROTECTED]
Sent: Domingo, 10 de Septiembre de 2006 10:46 p.m.
To: php php
Subject: Ajax and PHP: XMLHTTP




Can I replace the above with some sort of XMLHTTP request?

Googling now... thought I would ask here first.

Any good links to tuts that might cover that sort of thing?

Kinda thinking about plugging some Ajax into a random image php script.

TIA. :)
Cheers,
Micky

-- 
  Wishlist: 
Switch: 
  BCC?: 
My:  


Este mensaje es exclusivamente para el uso de la persona o entidad a quien esta 
dirigido; contiene informacion estrictamente confidencial y legalmente 
protegida, cuya divulgacion es sancionada por la ley. Si el lector de este 
mensaje no es a quien esta dirigido, ni se trata del empleado o agente 
responsable de esta informacion, se le notifica por medio del presente, que su 
reproduccion y distribucion, esta estrictamente prohibida. Si Usted recibio 
este comunicado por error, favor de notificarlo inmediatamente al remitente y 
destruir el mensaje. Todas las opiniones contenidas en este mail son propias 
del autor del mensaje y no necesariamente coinciden con las de Radiomovil 
Dipsa, S.A. de C.V. o alguna de sus empresas controladas, controladoras, 
afiliadas y subsidiarias. Este mensaje intencionalmente no contiene acentos.

This message is for the sole use of the person or entity to whom it is being 
sent.  Therefore, it contains strictly confidential and legally protected 
material whose disclosure is subject to penalty by law.  If the person reading 
this message is not the one to whom it is being sent and/or is not an employee 
or the responsible agent for this information, this person is herein notified 
that any unauthorized dissemination, distribution or copying of the materials 
included in this facsimile is strictly prohibited.  If you received this 
document by mistake please notify  immediately to the subscriber and destroy 
the message. Any opinions contained in this e-mail are those of the author of 
the message and do not necessarily coincide with those of Radiomovil Dipsa, 
S.A. de C.V. or any of its control, controlled, affiliates and subsidiaries 
companies. No part of this message or attachments may be used or reproduced in 
any manner whatsoever.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] does magic_quotes_gpc prevents sql injection through forms?

2006-09-11 Thread Christopher Weldon
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Reinhart Viane wrote:
> 
> Seems that the only and best way to prevent mysql injection is the
> combination of mysql_real_escape_string combined with value validation.
> 

Yes, this should be what you use. When you think about application
design, not only should you escape the data going into the database for
security purposes. DBMS's have certain characters specific to them that
can make the DMBS think what's been inputted as a quote, but PHP won't
see it as a quote, and magic_quotes, addslashes, etc. won't catch it -
still leaving a security hole.

You should also be making sure you're inserting the proper data (ints in
integer fields, strings in varchar, char, text, etc. fields) so that
your DBMS doesn't start spitting SQL errors out in a log (or worse yet -
to your visitor) and cause nightmares for visitors entering seemingly
valid data when they aren't. This is definitely done in the case where
you don't have quotes around your data in the SQL query - as is done
sometimes with integer, double, etc.

Easy validation for integer:

is_numeric($_POST['var'])

Easy way to just straight-up typecast:

$clean['var'] = (int) $_POST['var'];

The best way is to check to see if it is_numeric rather than force it's
type to be integer - but for simplicities sake, it can be used.

- --
Christopher Weldon, ZCE
President & CEO
Cerberus Interactive, Inc.
[EMAIL PROTECTED]
979.739.5874
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.1 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFFBXHEZxvk7JEXkbERAuf/AJ9Rs8TxgKjNlK6XR59KykTq3OXUdACeNPaW
O5j8lNIEWIaPA56ZdCttaUA=
=+ur0
-END PGP SIGNATURE-

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] strip urls

2006-09-11 Thread Mariano Guadagnini
You may try using regular expressions for that. Something like 
preg_replace("http:\/\/.*\s","",$your_var). That's a simple example, but 
you can change to suit your needs, check the online help for more info 
about.


HTH,

Mariano.

Merlin wrote:

Hi there,

I am trying to strip URL's out of a text. There is a function for this 
in php, but I can't find it anywhere. Can sombody help?


Regards,

Merlin





--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.405 / Virus Database: 268.12.2/443 - Release Date: 11/09/2006

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Starting week number of year to Sunday

2006-09-11 Thread Bagus Nugroho
 
Hi All,

Is anyway to change starting week number of year on Sunday, instead
Monday as default?

Thanks in advance,
bn

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: Newbie question about

2006-09-11 Thread Jon Anderson

Satyam wrote:

for ($x=0;$x<1000;$x++) {
   echo ' X is ' , $x , '';
}
This seems to be a hair faster. I extended the test to 1 requests 
(still concurrency 10) to make the test a little more reproducible:


echo str,var,str did 604.65 requests a second where ?> did 599.63 requests a second. I also tried echo str . var . 
str, and it came in at about 584.55 requests a second.  printf("str %i 
str",var) came out at 547.01 requests a second and printf("str %s 
str",var) was only 452.03 requests a second.
Can you try and time that one so we have comparable results?  This one 
should be second best:


for ($x=0;$x<1000;$x++) {
   echo "X is $x";
}

Approximately 330 (?!) requests a second for that one.
Back again to what would be 'longer', well, in your example, the whole 
header, up to the loop itself should be faster if sent out of PHP. 
Likewise, you could echo $buffer right after the loop, drop out of PHP 
and send the footer as plain HTML.  This, of course, is harder to time 
since it happens only once.  I admit though that I did time the 
options I listed and on the 'dropping in and out of PHP' I'm relying 
on the PHP manual ( see 
http://www.php.net/manual/en/language.basic-syntax.php, the first 
paragraph after the examples) and the source of the lexical scanner, 
which supports that, though your numbers do contradict it.  Interesting. 
I'm not sure that my results would count as contradictory - I'm running 
APC which would likely throw performance related numbers out of whack as 
compared to out-of-the-box PHP.


Because of that, I wouldn't recommend anyone take my numbers too 
seriously - they're just an example taken from my server: 1.8 GHz 
SMP/1G/RAID5/Linux 2.6.17.7/Apache 2.2.3/PHP 5.1.6/APC 3.0.12p2. Anyone 
else's results would probably vary widely.


jon

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] FUNCTION TO CHECK IMAGE

2006-09-11 Thread tedd

At 11:40 PM -0700 9/10/06, BBC wrote:

 > At 12:49 AM -0700 9/10/06, BBC wrote:

 >Hi all.
 >I'm having a problem regarding image handling. Sometimes an image
 >can be showed in browser normally (in my computer) but when I
 >upload it into my site that image is not valid, so there is an issue
 >in my getimagesizes() function.
 >Is there any function to recover such problem? I used
 >"if(file_exists($image_path))" but it couldn't solve the problem.
 >Input would be appreciated
 >

 >

 How are you uploading your image?

I upload a file through some form then I manipulate it's size


Don't manipulate it's size and see if that works.

Size of image can't be define seem's like the image is not there, 
but it's not  happened all the time.


Can't help with sporadic problems -- that's probably a logic error.

tedd

--
---
http://sperling.com  http://ancientstones.com  http://earthstones.com

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: How could I make the browser to send a command to a cash register...

2006-09-11 Thread Man-wai Chang
> That 100% depends on how the cash register works.  Is it an NT cash
> register, or an propitiatory one?  Is it rs232 or on a network?
> Basically, find out how the cash register can be controlled, then make a
> php script that can fire that control.

Thanks.

It's a RS232 serial register. PHP, running at the server side, could
talk to the hardware at the client side? Or is it ActiveX?


-- 
  .~.   Might, Courage, Vision, SINCERITY. http://www.linux-sxs.org
 / v \  Simplicity is Beauty! May the Force and Farce be with you!
/( _ )\ (Ubuntu 6.06)  Linux 2.6.17.13
  ^ ^   23:31:01 up 2 days 4:25 0 users load average: 0.04 0.07 0.05
news://news.3home.net news://news.hkpcug.org news://news.newsgroup.com.hk

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Date maths

2006-09-11 Thread tedd

At 9:19 PM +0100 9/10/06, Dave Goodchild wrote:

Has anyone out there had to deal with a similar problem, and if so do you
have any advice. This is going to take time so I will be patient and
continue, and welcome any suggestions. Many thanks and I can post code to
specific requests.


Dave:

You might also consider MySQL functions for this -- there's many of 
them. The MySQL Cookbook by Paul DuBois:




has an entire chapter dealing with just date issues. Cheap, but 
excellent, advice.


tedd

--
---
http://sperling.com  http://ancientstones.com  http://earthstones.com

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] [ANNOUNCEMENT] Sparse v1.06b released

2006-09-11 Thread Daniel Orner
	It's been a little while, but a new beta version of Sparse is out. This 
adds a warning log, a button to save either the current page or the 
whole dataset as a CSV file, a tag that turns into a form that allows 
the user to view specific rows, and a bunch of bugfixes. Take a look!


--Daniel
--
Sparse - a new way to write MySQL-based programs with little to no 
actual programming. Save yourself time and effort!

http://sparse-php.sourceforge.net/

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Re: How could I make the browser to send a command to a cash register...

2006-09-11 Thread Jay Blanchard
[snip]
It's a RS232 serial register. PHP, running at the server side, could
talk to the hardware at the client side? Or is it ActiveX?
[/snip]

You're correct, server-side cannot perform a client-side task.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: Newbie question about

2006-09-11 Thread Stut

How bored am I?

This bored: http://dev.stut.net/phpspeed/

Server is running PHP 5.1.2 (really should upgrade that) with no caches 
of any sort.


-Stut

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Fwd: Re: [PHP] Re: How could I make the browser to send a command to a cash register...]

2006-09-11 Thread Mitch Miller
Just realized I forgot to CC: the original list on my reply below.

I also have since realized that using the solution in my reply below,
the SERVER *COULD* cause the register to open.  On the server side, a
script that connects to HTTP://ip-of-register-to-open:secret-portnum
would cause the register to open as desired.

So, this is just a simple modification of my original reply.  You still
write a socket listener app. that runs on the workstation where the
register is connected, that is capable of opening the register on
demand.  Then, when the user using the browser does something to open
the cash drawer, you run a script on the server that connects to
REMOTE_ADDRESS:secret-port which makes the "listener" app. open the cash
drawer.  (Okay, so it's technically client based, but server driven.)

A similar tool (the same listener app, even) could be used to send text
to the workstation-attached receipt printer.  It could be setup such
that any text received on the port it's listening to, is simply echoed
to the printer.  So, now the server generates what needs sent to the
printer and prints it by connecting (from the server) to the listener
app., followed by a connection to the port that causes the drawer to open.

-- Mitch


 Original Message 
Subject: Re: [PHP]  Re: How could I make the browser to send a command
to a cash register...
Date: Mon, 11 Sep 2006 10:42:37 -0500
From: Mitch Miller <[EMAIL PROTECTED]>
To: Man-wai Chang <[EMAIL PROTECTED]>
References: <[EMAIL PROTECTED]>
<[EMAIL PROTECTED]> <[EMAIL PROTECTED]>

I think I'd be tempted to write a simple socket listener app., that
could listen on a TCP/IP port and when it makes a connection (and
optionally gets the right command), could open the register.

There are lots of examples of socket listener apps. done in Perl (check
Google), but the local app. would *not need* to be in Perl (that's just
one I've used personally).

Once the app. is running, simply connecting to
http://localhost:secret-portnum *could* be enough to make the app. open
the register (by sending the right command to the serial port).

Using this technique, any HTML that references
http://localhost:secret-portnum would open the register, regardless of
how the HTML is generated.

-- Mitch


Man-wai Chang wrote:
>>That 100% depends on how the cash register works.  Is it an NT cash
>>register, or an propitiatory one?  Is it rs232 or on a network?
>>Basically, find out how the cash register can be controlled, then make a
>>php script that can fire that control.
> 
> 
> Thanks.
> 
> It's a RS232 serial register. PHP, running at the server side, could
> talk to the hardware at the client side? Or is it ActiveX?
> 
> 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Getting an argument out of a web page

2006-09-11 Thread Brian Dunning
I'm trying to read a MySpace FriendID out of a web page. If you view  
the source, you see this is multiple places:


.&friendID=12345&

What's the simplest way to extract the FriendID and stick it in a  
variable? Is there a regex that would do this?


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Really stupid cookie question

2006-09-11 Thread Brian Dunning
I am embarrassed to ask this. If I set a cookie for 30 days, and the  
visitor comes back 25 days later but I do nothing to re-set the  
cookie, will his cookie expire in 5 days, or does his browser  
automatically reset it to another 30 days?


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] mail() help

2006-09-11 Thread suresh kumar
Hi to all,
  i am having one doubt regarding php mail function.i am using php 
mail() function to send mail to the users.but when i send mail throught php its 
going to the users bulk folder but not to the  user inbox.i dont know the 
reason.
   
   Is there any setting that is requried in the php.ini file (or) the 
user have to change their setting in their mail (or) is there any option 
available to send mail to the user inbox.tnxs for reply
   
 A.suresh
   
  


-
 Find out what India is talking about on  - Yahoo! Answers India 
 Send FREE SMS to your friend's mobile from Yahoo! Messenger Version 8. Get it 
NOW

Re: [PHP] Re: Newbie question about

2006-09-11 Thread tedd

At 4:56 PM +0100 9/11/06, Stut wrote:

How bored am I?

This bored: http://dev.stut.net/phpspeed/

Server is running PHP 5.1.2 (really should upgrade that) with no 
caches of any sort.


-Stut


Which begs the question, does it make much of a difference? (not you 
being bored, but the rather speed concers).


With all the things out there that can slow your browsers reaction 
time in presenting some result, does a couple of seconds count much 
in the over all scheme of things?


I know, purest will say that they want to make whatever they do as 
fast as possible, but is that time to make it faster be better spent 
elsewhere? We used to have to worry about the size of our strings, 
but now we can place the kjv of the bible in one. So, what's the 
point of counting characters in strings now?


I suspect at some point, probably soon, speed isn't going to matter much.

Opinions?

tedd

--
---
http://sperling.com  http://ancientstones.com  http://earthstones.com

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] strip urls

2006-09-11 Thread RalfGesellensetter
Am Montag 11 September 2006 15:36 schrieb Merlin:
> I am trying to strip URL's out of a text. There is a function for
> this in php, but I can't find it anywhere. Can sombody help?

hi, it's strip_tags and only removes the tags (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: Newbie question about

2006-09-11 Thread Satyam
I admit I'm totally surprised about the buffered results.  Nevertheless, may 
I sugest you add the following to the series of tests?:


   Using line-by-line single-quoted echowith comma separated 
arguments

';
   for ($x = 0; $x < $iterations; $x++)
   {
   echo 'X is',$x,'';
   }
   print '';

   $duration = mt() - $start;
   print 'Took '.number_format($duration, 4).' seconds';
?>
   »href="#" 
onclick="document.getElementById('table2a').style.display='block';
   document.getElementById('table2alink').style.display='none';return 
false;">

   Reveal output

There seems to be one thing rarely anybody remembers, echo admits multiple 
arguments, and as the numbers will show, (or at least they do in my 
machine), they are the second best option.


Satyam


- Original Message - 
From: "Stut" <[EMAIL PROTECTED]>

To: "Jon Anderson" <[EMAIL PROTECTED]>
Cc: "Satyam" <[EMAIL PROTECTED]>; 
Sent: Monday, September 11, 2006 5:56 PM
Subject: Re: [PHP] Re: Newbie question about 



How bored am I?

This bored: http://dev.stut.net/phpspeed/

Server is running PHP 5.1.2 (really should upgrade that) with no caches of 
any sort.


-Stut

--
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: Newbie question about

2006-09-11 Thread Stut

Satyam wrote:
I admit I'm totally surprised about the buffered results.  
Nevertheless, may I sugest you add the following to the series of tests?:


   Using line-by-line single-quoted echowith comma 
separated arguments



There seems to be one thing rarely anybody remembers, echo admits 
multiple arguments, and as the numbers will show, (or at least they do 
in my machine), they are the second best option.


Done, but again it doesn't seem to make any significant difference to 
the performance.


-Stut

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: Newbie question about

2006-09-11 Thread Stut

tedd wrote:

At 4:56 PM +0100 9/11/06, Stut wrote:

How bored am I?

This bored: http://dev.stut.net/phpspeed/

Server is running PHP 5.1.2 (really should upgrade that) with no 
caches of any sort.


-Stut


Which begs the question, does it make much of a difference? (not you 
being bored, but the rather speed concers).


With all the things out there that can slow your browsers reaction 
time in presenting some result, does a couple of seconds count much in 
the over all scheme of things?


I know, purest will say that they want to make whatever they do as 
fast as possible, but is that time to make it faster be better spent 
elsewhere? We used to have to worry about the size of our strings, but 
now we can place the kjv of the bible in one. So, what's the point of 
counting characters in strings now?


I suspect at some point, probably soon, speed isn't going to matter much.

Opinions?


I would have to agree. Having watched the server CPU load while playing 
with this test script it would  appear that the performance can be 
skewed a lot more by that than by the method you use for squidging out 
the output.


As a curiosity I've also added a test using  and 
bizarrely that appears to be slightly faster than .


Weird.

-Stut

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: Newbie question about

2006-09-11 Thread Stut

Jon Anderson wrote:

Stut wrote:

How bored am I?

This bored: http://dev.stut.net/phpspeed/

Server is running PHP 5.1.2 (really should upgrade that) with no 
caches of any sort. 
Just looking through the source, could you try changing the first 
example to put the output all on one line? It's the only one that does 
the row output on multiple indented lines - I'm kind of curious what 
effect (if any) that has on the results.


Done. Doesn't seem to make a difference - I didn't expect it to.

I also tried this on my own server. With the opcode cache, the results 
seem to be the inverse of yours without.


I would have been surprised if an opcode cache had made a huge 
difference. I don't think the Zend Engine is intelligent enough to 
compile the various different tests to the same set of opcodes - but I 
could be wrong. I'm still quite new to the PHP internals.


Also, with either server, the first three results seem to vary wildly, 
but the last two always seem to come out the same. I'm not sure why 
that is...


As I said in another post, the performance varies wildly with the load 
on the server.


-Stut

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] strip urls

2006-09-11 Thread Merlin

RalfGesellensetter schrieb:

Am Montag 11 September 2006 15:36 schrieb Merlin:

I am trying to strip URL's out of a text. There is a function for
this in php, but I can't find it anywhere. Can sombody help?


hi, it's strip_tags and only removes the tags (the plain text that would be displayed in a text browser.


Hi there,

thank you for the hint. This it the one I was searching for. However 
unfortunatelly the function also strips all other tags! I am looking for 
one that only does strip the 

I am not so familar with regex, but I fear I would need to :-(

My guess is that it must be something like this:

$str = 'foo  test o';
$str = preg_replace('http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Getting an argument out of a web page

2006-09-11 Thread John Nichel

Brian Dunning wrote:
I'm trying to read a MySpace FriendID out of a web page. If you view the 
source, you see this is multiple places:


.&friendID=12345&

What's the simplest way to extract the FriendID and stick it in a 
variable? Is there a regex that would do this?




Is it always in that format?

preg_match ( "/&friendID=(\d{5,})&/", $source, $id );

The result will be in $id[1].

--
John C. Nichel IV
Programmer/System Admin (ÜberGeek)
Dot Com Holdings of Buffalo
716.856.9675
[EMAIL PROTECTED]

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Getting an argument out of a web page

2006-09-11 Thread Brian Dunning

That did it, thanks!  :)

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Getting an argument out of a web page

2006-09-11 Thread John Nichel

Brian Dunning wrote:

That did it, thanks!  :)



Keep in mind that if the ID is less than 5 digits, it won't match (I 
don't know where MySpace ID's start).  You can change it to something 
like \d{1,} if you want it to match 1 or more digits.


--
John C. Nichel IV
Programmer/System Admin (ÜberGeek)
Dot Com Holdings of Buffalo
716.856.9675
[EMAIL PROTECTED]

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] strip urls

2006-09-11 Thread Christopher Weldon
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Merlin wrote:
> RalfGesellensetter schrieb:
>> Am Montag 11 September 2006 15:36 schrieb Merlin:
>>> I am trying to strip URL's out of a text. There is a function for
>>> this in php, but I can't find it anywhere. Can sombody help?
>>
>> hi, it's strip_tags and only removes the tags (> the plain text that would be displayed in a text browser.
> 
> Hi there,
> 
> thank you for the hint. This it the one I was searching for. However
> unfortunatelly the function also strips all other tags! I am looking for
> one that only does strip the  
> I am not so familar with regex, but I fear I would need to :-(
> 
> My guess is that it must be something like this:
> 
> $str = 'foo  test o';
> $str = preg_replace(' echo $str;
> 
> Can anybody help me on that? Thank you so much in advance.
> 
> Regards,
> 
> Merlin
> 

Two things:

First, you can actually specify which tags you don't want strip_tags to
take out. Say for example you want  and  tags to remain in the
string:

$string = strip_tags($string, '');

Second, don't forget the tags you'll need in the preg_replace function:

$str = preg_replace('/\]*\>/', "\1", $str);

You can use other characters, such as ! if you want instead of /, but
you have to use the same at the beginning and the end.

- --
Christopher Weldon, ZCE
President & CEO
Cerberus Interactive, Inc.
[EMAIL PROTECTED]
979.739.5874
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.1 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFFBZ9yZxvk7JEXkbERAhuUAJ4o4rBiypj2OwpHjrUj2e0XZ8FVhQCeJZ6e
eCOa+PYkyrRacqnT5VtoL/A=
=/r2e
-END PGP SIGNATURE-

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] mail() help

2006-09-11 Thread Christopher Weldon
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

suresh kumar wrote:
> Hi to all,
>   i am having one doubt regarding php mail function.i am using 
> php mail() function to send mail to the users.but when i send mail throught 
> php its going to the users bulk folder but not to the  user inbox.i dont know 
> the reason.
>
>Is there any setting that is requried in the php.ini file (or) the 
> user have to change their setting in their mail (or) is there any option 
> available to send mail to the user inbox.tnxs for reply
>
>  A.suresh
>
>   
> 
>   
> -
>  Find out what India is talking about on  - Yahoo! Answers India 
>  Send FREE SMS to your friend's mobile from Yahoo! Messenger Version 8. Get 
> it NOW

There are several things you need to check for, and probably add to your
emails that you're sending.

Number one, add additional headers to make SPAM / Bulk filters realize
the message is not SPAM or should not be considered SPAM. IE:

$headers =  "From: Suresh Kumar <[EMAIL PROTECTED]>\r\n".
"X-Mailer: PHP 4.3.2\r\n".
"X-Sender: $_SERVER['HTTP_HOST']\r\n".
"X-Comment: If you can put a comment here, do it.\r\n";

mail($to, $subject, $body, $headers);

The above is considering you have already declared the $to, $subject,
and $body variables. Also, make sure your $subject is not
'undisclosed-recipients;' or something like that - it's a big no-no and
will definitely flag some SPAM filters. Put a valid e-mail address - but
you can still use the BCC-headers and everything should go just fine.
Alternatively, if your list is not too large, it looks better to run a
for / while loop to send each recipient a message directly (ie: not
using BCC) as that will cut down on the SPAM probability.

Second, if you are making MIME emails, make sure you are doing so
correctly. You can learn about creating multipart/alternative MIME
emails more at www.php.net/mail.

Finally, if none of the above works, it would be helpful for us to see
the headers of the received message from one of your recipients where
the message was put in the BULK folder.

- --
Christopher Weldon, ZCE
President & CEO
Cerberus Interactive, Inc.
[EMAIL PROTECTED]
979.739.5874
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.1 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFFBaG2Zxvk7JEXkbERAgZiAKCJVQfno2fAca13Sx7aXPWD2WMgUwCeOMBX
grbViYDnAXXy8l1i4liVHzE=
=ka5I
-END PGP SIGNATURE-

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Really stupid cookie question

2006-09-11 Thread Christopher Weldon
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Brian Dunning wrote:
> I am embarrassed to ask this. If I set a cookie for 30 days, and the
> visitor comes back 25 days later but I do nothing to re-set the cookie,
> will his cookie expire in 5 days, or does his browser automatically
> reset it to another 30 days?
> 
> --PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 

It will expire in 5 days.

- --
Christopher Weldon, ZCE
President & CEO
Cerberus Interactive, Inc.
[EMAIL PROTECTED]
979.739.5874
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.1 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFFBaHLZxvk7JEXkbERAgBXAJ400jfYjm5EggSZpCKt8s2tnEpy5QCgt3yZ
8Och6y0aCPxgJw6t1R/VQnE=
=oH63
-END PGP SIGNATURE-

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: Re: [PHP] Re: How could I make the browser to send a command to a cash register...]

2006-09-11 Thread Satyam
I guess that embedding an ActiveX object to open the drawer into the web 
page would be the easiest option for the application programmers to handle. 
It would give the added flexibility to use JavaScript on the client side to 
call the object method to open the drawer, besides sending the page with the 
object embedded and the property to open the drawer set to open.  Besides, 
it would be easier to mantain since it is obvious which cash register you 
are talking about, the one physically attached, otherwise, you would have to 
mantain a table of which cash register corresponds to which client.


Satyam

- Original Message - 
From: "Mitch Miller" <[EMAIL PROTECTED]>

To: 
Sent: Monday, September 11, 2006 5:56 PM
Subject: [Fwd: Re: [PHP] Re: How could I make the browser to send a command 
to a cash register...]




Just realized I forgot to CC: the original list on my reply below.

I also have since realized that using the solution in my reply below,
the SERVER *COULD* cause the register to open.  On the server side, a
script that connects to HTTP://ip-of-register-to-open:secret-portnum
would cause the register to open as desired.

So, this is just a simple modification of my original reply.  You still
write a socket listener app. that runs on the workstation where the
register is connected, that is capable of opening the register on
demand.  Then, when the user using the browser does something to open
the cash drawer, you run a script on the server that connects to
REMOTE_ADDRESS:secret-port which makes the "listener" app. open the cash
drawer.  (Okay, so it's technically client based, but server driven.)

A similar tool (the same listener app, even) could be used to send text
to the workstation-attached receipt printer.  It could be setup such
that any text received on the port it's listening to, is simply echoed
to the printer.  So, now the server generates what needs sent to the
printer and prints it by connecting (from the server) to the listener
app., followed by a connection to the port that causes the drawer to open.

-- Mitch


 Original Message 
Subject: Re: [PHP]  Re: How could I make the browser to send a command
to a cash register...
Date: Mon, 11 Sep 2006 10:42:37 -0500
From: Mitch Miller <[EMAIL PROTECTED]>
To: Man-wai Chang <[EMAIL PROTECTED]>
References: <[EMAIL PROTECTED]>
<[EMAIL PROTECTED]> <[EMAIL PROTECTED]>

I think I'd be tempted to write a simple socket listener app., that
could listen on a TCP/IP port and when it makes a connection (and
optionally gets the right command), could open the register.

There are lots of examples of socket listener apps. done in Perl (check
Google), but the local app. would *not need* to be in Perl (that's just
one I've used personally).

Once the app. is running, simply connecting to
http://localhost:secret-portnum *could* be enough to make the app. open
the register (by sending the right command to the serial port).

Using this technique, any HTML that references
http://localhost:secret-portnum would open the register, regardless of
how the HTML is generated.

-- Mitch


Man-wai Chang wrote:

That 100% depends on how the cash register works.  Is it an NT cash
register, or an propitiatory one?  Is it rs232 or on a network?
Basically, find out how the cash register can be controlled, then make a
php script that can fire that control.



Thanks.

It's a RS232 serial register. PHP, running at the server side, could
talk to the hardware at the client side? Or is it ActiveX?




--
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] FUNCTION TO CHECK IMAGE

2006-09-11 Thread Christopher Weldon
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

BBC wrote:
>> BBC wrote:
>>> Hi all.
>>> I'm having a problem regarding image handling. Sometimes an image can be 
>>> showed in browser normally (in my computer) but when I
>>> upload it into my site that image is not valid, so there is an issue in my 
>>> getimagesizes() function.
>>> Is there any function to recover such problem? I used 
>>> "if(file_exists($image_path))" but it couldn't solve the problem.
>>> Input would be appreciated
>> - From what it sounds like you are doing, you are uploading a file through
>> some form, then manipulating it's size. Is this correct?
> 
> Yes it is, but the uploading was going well (size is ok). When I show the 
> image on the web using getimagesizes(), 'sometimes' such
> image size couldn't be resolved.
> Is there any function to define that image is ok or not?
> 
>> What happens when you stop manipulating it's size and try to view just the 
>> uploaded
>> file?
> 
> Size of image (after or before uploading) would be same. but the issue still 
> there (sometimes)
> 
> 

What types of images are these? JPG, PNG, GIF?

- --
Christopher Weldon, ZCE
President & CEO
Cerberus Interactive, Inc.
[EMAIL PROTECTED]
979.739.5874
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.1 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFFBaLsZxvk7JEXkbERAg62AJ4iWogZyWry445xv6bT8ld6Mfw79ACgkWhx
zfIJGqxli9pHPHrcHoi8FjI=
=sllc
-END PGP SIGNATURE-

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] strip urls

2006-09-11 Thread Merlin

Thank you! That workes excellent!

Merlin


Christopher Weldon schrieb:

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Merlin wrote:

RalfGesellensetter schrieb:

Am Montag 11 September 2006 15:36 schrieb Merlin:

I am trying to strip URL's out of a text. There is a function for
this in php, but I can't find it anywhere. Can sombody help?

hi, it's strip_tags and only removes the tags (
Hi there,

thank you for the hint. This it the one I was searching for. However
unfortunatelly the function also strips all other tags! I am looking for
one that only does strip the 

Two things:

First, you can actually specify which tags you don't want strip_tags to
take out. Say for example you want  and  tags to remain in the
string:

$string = strip_tags($string, '');

Second, don't forget the tags you'll need in the preg_replace function:

$str = preg_replace('/\]*\>/', "\1", $str);

You can use other characters, such as ! if you want instead of /, but
you have to use the same at the beginning and the end.

- --
Christopher Weldon, ZCE
President & CEO
Cerberus Interactive, Inc.
[EMAIL PROTECTED]
979.739.5874
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.1 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFFBZ9yZxvk7JEXkbERAhuUAJ4o4rBiypj2OwpHjrUj2e0XZ8FVhQCeJZ6e
eCOa+PYkyrRacqnT5VtoL/A=
=/r2e
-END PGP SIGNATURE-


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Really stupid cookie question

2006-09-11 Thread Tim Traver

Brian Dunning wrote:
I am embarrassed to ask this. If I set a cookie for 30 days, and the 
visitor comes back 25 days later but I do nothing to re-set the 
cookie, will his cookie expire in 5 days, or does his browser 
automatically reset it to another 30 days?


That depends on if you reset the cookie when they come back or not. If 
your routines set the cookie only if the cookie does not already exist, 
then it would not reset the cookie at 25 days, so it would indeed expire 
5 days after that.


If you check to see if the cookie exists first, and then reset the 
expiration date at that time, then the cookie would last for another 30 
days...


Tim.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] FUNCTION TO CHECK IMAGE

2006-09-11 Thread BBC
> What types of images are these? JPG, PNG, GIF?
Its jpg. Look... I don't know exactly what your point, I'm just asking you 
about the function to resolve the size of image like the
codes below:
if (file_exists($img_path)){
list($width,$height) = getimagesizes($img_path);
}else{
$width = $ height = $max_size;
}
So is there any other option to replace file_exists();?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: Newbie question about

2006-09-11 Thread Satyam
- Original Message - 
From: "Stut" <[EMAIL PROTECTED]>

To: "Satyam" <[EMAIL PROTECTED]>
Cc: 
Sent: Monday, September 11, 2006 6:32 PM
Subject: Re: [PHP] Re: Newbie question about 



Satyam wrote:

I admit I'm totally surprised about the buffered results.  Nevertheless,
may I sugest you add the following to the series of tests?:

   Using line-by-line single-quoted echowith comma separated
arguments


There seems to be one thing rarely anybody remembers, echo admits
multiple arguments, and as the numbers will show, (or at least they do in
my machine), they are the second best option.


Done, but again it doesn't seem to make any significant difference to the
performance.

-Stut




When I run those tests locally, the numbers are totally different and the
performance of one over the other comes out far clearer.  I can only assume
that the numbers in the test run  in a remote server are so much influenced
by the ability of the server to push out the characters into the output
stream that the processing time itself is of very little relevance.  This
table shows the numbers for the different tests as run on my machine,
locally (where output streaming is irrelevant) and run from your site:

Using Took 0.2801 secondsTook
3.5937 seconds

Using Took 0.3286 secondsTook 5.2654 seconds

Using line-by-line single-quoted print:Took 0.1215 secondsTook
3.2256 seconds

Using line-by-line single-quoted echo
with comma separated argumentsTook 0.2542 secondsTook 3.2220
seconds

Using line-by-line double-quoted print Took 0.1782 secondsTook
3.3129 seconds

Using buffered single-quoted printTook 0.0277 secondsTook 3.3077
seconds

Using buffered double-quoted printTook 0.2038 seconds Took 3.3012
seconds

It would seem that it takes about 3 seconds to push those bytes into the
network, the actual processing times get completely masked behind a simple
glitch in the throughput of the communication line.  While the differences
on the rightmost column (except for the second one, which is way off) are no
more than 5%, in the middle column the differences are up to 10 to 1.  But
then there is that second row, which is so much higher and it is so in both
columns.

Unfortunately, I cannot make much sense about all this.  I don't get it.
Nevertheless, something it is clear is that buffering all the output first
and then pushing it out all at once seems to beat them all, specially using
single quoted strings.  Run locally, the differences are amazing!

Satyam

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] RE: Ajax and PHP: XMLHTTP

2006-09-11 Thread Micky Hulse

Hi all, thanks for responses, I appreciate it. :)

Miguel Guirao wrote:

What do you exactly want to do?


Oh, I wanted to call a php function on my page that changes some CSS. I 
was hoping I could change my CSS on the fly without having to reload 
page... but after doing more research, I think that a page refresh is 
best way to go.


All the Ajax/PHP examples i have seen deal with elements on page (in 
this case i have PHP script in head that changes my css)... Still new to 
"Ajax" and XMLHTTP... I know how to handle JS, but I am way more 
comfortable with PHP. Not too many examps on the web that show some good 
techniques for calling PHP functions to manipulate CSS that I could find.


I am also not a big fan of plugging-in a huge Ajax scripting 
library(ies) for something as simple as calling a PHP script to 
manipulate CSS. I would prefer simple on the JS end of things and make 
it more about PHP without a page refresh. :D


Lol, hope that makes sense... In a bit of a rush - headed out door to 
work.  :)


You guys are right though, I should probably ask on the JS listserv.

Many thanks for your time.
Cheers,
Micky


--
 Wishlist: 
   Switch: 
 BCC?: 
   My: 

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: Newbie question about

2006-09-11 Thread tedd

At 5:36 PM +0100 9/11/06, Stut wrote:

tedd wrote:

Opinions?


I would have to agree. Having watched the server CPU load while 
playing with this test script it would  appear that the performance 
can be skewed a lot more by that than by the method you use for 
squidging out the output.


As a curiosity I've also added a test using  and 
bizarrely that appears to be slightly faster than .


Weird.


My guess would be that it's in the interpreter -- the look-up for 
"the short-tag option-on, or something similar. But, I admittedly 
don't know.


However, I strongly suspect that drawing to the screen will take 
longer than executing any "=" or "print" statement anyway. So 
regardless of the time saved in computation, the delivery would 
appear identical. It reminds me of the "hurry-up and wait" saying we 
had in the Army some 50 years back.


tedd
--
---
http://sperling.com  http://ancientstones.com  http://earthstones.com

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] PHP 4 OOP, re-using a object?

2006-09-11 Thread Curt Zirzow

On 9/10/06, Micky Hulse <[EMAIL PROTECTED]> wrote:

Christopher Weldon wrote:
> What's the error, and how do you have the class and functions defined?

Hi Christopher, thanks for asking.  :)

Actually, it was one of those silly, right in front of my face, logic
errors...

class RandomSplash {
var $alphabet = array('a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j',
'k', 'l', 'm');
function randomize($what) {
switch($what) {
case 'css':
$data = $this->$alphabet;
...
...
...
}
}

See the error?


For future reference it is best you provide a full code example in
what your problem is when you ask the question, Asking if it something
is proper isn't going to get you far.



is perfectly valid but accoring to the mistake you had you should have
been using:


It would have been more relevant to supply the problem along with the solution.



$data = $this->$alphabet;

should've been:

$data = $this->alphabet;

At first I thought it was how I was calling the class... all works now
though.  :)


Good to hear you got it resolved..

Curt.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] php4 / php5 unable to locate module

2006-09-11 Thread Zbigniew Szalbot
Hello,

I would appreciate your help. I am trying to get php and apache work
together and have a strange error while starting apache:

Can't locate API module structure `php4_module' in file
/usr/local/libexec/apache2/libphp5.so: Undefined symbol "php4_module"

I am using PHP 5.1.6 (cli) and Apache/2.0.59 on a FreeBSD 6.1 stable
release. Could anyone offer any suggestion why php4_module is missing in
libphp5.so?

Many thanks!

--
Zbigniew Szalbot

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] php4 / php5 unable to locate module

2006-09-11 Thread Curt Zirzow

On 9/11/06, Zbigniew Szalbot <[EMAIL PROTECTED]> wrote:

Hello,

I would appreciate your help. I am trying to get php and apache work
together and have a strange error while starting apache:

Can't locate API module structure `php4_module' in file
/usr/local/libexec/apache2/libphp5.so: Undefined symbol "php4_module"


How did you install both php and apache?


Curt

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] if statement with or comparison (newbie)

2006-09-11 Thread Curt Zirzow

On 9/8/06, Robert Cummings <[EMAIL PROTECTED]> wrote:

On Fri, 2006-09-08 at 15:30 -0600, Jeremy Privett wrote:
> Well, it could be this, too:
>
> switch( $_REQUEST['id'] ) {
>   case "white":
>   echo "Right color.";
>   break;
>
>   case "black":
>   echo "Right color.";
>   break;
>
>   default:
>   echo "Wrong color.";
>   break;
> }

Ugh, if you're going to use a big ugly case statement for something so
trivial at least make use of the fall-through feature:



I don't know about big and ugly, it seems more clear on what is going
on in this situation. But yeah it is best to clearify the switch as
you rewrote it.

curt.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] php4 / php5 unable to locate module

2006-09-11 Thread Zbigniew Szalbot
On Mon, 11 Sep 2006, Curt Zirzow wrote:
Hello,


> > I would appreciate your help. I am trying to get php and apache work
> > together and have a strange error while starting apache:
> >
> > Can't locate API module structure `php4_module' in file
> > /usr/local/libexec/apache2/libphp5.so: Undefined symbol "php4_module"
>
> How did you install both php and apache?

Thanks for such a fast response. I used portinstall. I did have apache
1.3.37 at the beginning but it later turned out that for some reason I
will have to upgrade for apache 2.x so I ran pkg_delete and the went for
apache2.

I am quite new to FreeBSD but the machine is not online and I want to test
and learn. I need these to working as I am running/testing/learning exim
and plan to use vexim in future. Probably irrelevant here but I am willing
to provide output.

Here is the content of php5 options:

_OPTIONS_READ=php5-5.1.6
WITH_CLI=true
WITH_CGI=true
WITH_APACHE=true
WITHOUT_DEBUG=true
WITHOUT_SUHOSIN=true
WITH_MULTIBYTE=true
WITH_IPV6=true
WITH_REDIRECT=true
WITH_DISCARD=true
WITH_FASTCGI=true
WITH_PATHINFO=true

Many thanks for your help!


--
Zbigniew Szalbot

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] DOM - parse HTML document

2006-09-11 Thread Leonidas Safran
Hello all,

I don't really get it to work with that functions from 
http://www.php.net/manual/en/ref.dom.php

I try to get the content of  fields on an external html page, where I just 
know some ids of the rows.

Example:
...

1234


1234


1234


1234

...

PS: Please note, that id is written more than once. So 
DomDocument->getElementById('tr01') returns only one element and not two or 
more...

I can't find out how to grab the data in the td fields... I don't find examples 
to look at... :-(

I'd be really glad if somebody could give me some advice or tutorial websites 
about that...


Thanks a lot

LS
-- 


"Feel free" – 10 GB Mailbox, 100 FreeSMS/Monat ...
Jetzt GMX TopMail testen: http://www.gmx.net/de/go/topmail

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] PHP 4 OOP, re-using a object?

2006-09-11 Thread Micky Hulse

Hi Curt, thanks for the feedback/input and your time. :)

Curt Zirzow wrote:
It would have been more relevant to supply the problem along with the 
solution.


Definitely. Sorry about that. Sometimes I post questions to forums/lists 
without thinking things through more thoroughly... Hehe, I half blame 
that on sleep deprivation and half on ADD. Lol, or something. :)


I will be sure to take your advice into account for my future posts to 
this and other lists.


Thanks again. Have a great day.
Cheers,
Micky

--
 Wishlist: 
   Switch: 
 BCC?: 
   My: 

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] DOM - parse HTML document

2006-09-11 Thread Satyam
To start with, an ID should never be repeated.  A name can be repeated, an 
ID shouldn't.  That is why there is a function to get an array of elements 
with a certain name but there is none to get a list of elements with the 
same ID simply because there shouldn't be any.   Something helpful in 
traversing  the DOM is any tool that gives you a good view of the tree 
structure.  One such comes already in the Firefox browser.


Satyam

- Original Message - 
From: "Leonidas Safran" <[EMAIL PROTECTED]>

To: 
Sent: Monday, September 11, 2006 11:11 PM
Subject: [PHP] DOM - parse HTML document



Hello all,

I don't really get it to work with that functions from 
http://www.php.net/manual/en/ref.dom.php


I try to get the content of  fields on an external html page, where I 
just know some ids of the rows.


Example:
...

1234


1234


1234


1234

...

PS: Please note, that id is written more than once. So 
DomDocument->getElementById('tr01') returns only one element and not two 
or more...


I can't find out how to grab the data in the td fields... I don't find 
examples to look at... :-(


I'd be really glad if somebody could give me some advice or tutorial 
websites about that...



Thanks a lot

LS
--


"Feel free" – 10 GB Mailbox, 100 FreeSMS/Monat ...
Jetzt GMX TopMail testen: http://www.gmx.net/de/go/topmail

--
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] php4 / php5 unable to locate module

2006-09-11 Thread Curt Zirzow

On 9/11/06, Zbigniew Szalbot <[EMAIL PROTECTED]> wrote:

On Mon, 11 Sep 2006, Curt Zirzow wrote:
Hello,


> > I would appreciate your help. I am trying to get php and apache work
> > together and have a strange error while starting apache:
> >
> > Can't locate API module structure `php4_module' in file
> > /usr/local/libexec/apache2/libphp5.so: Undefined symbol "php4_module"
>
> How did you install both php and apache?

Thanks for such a fast response. I used portinstall. I did have apache
1.3.37 at the beginning but it later turned out that for some reason I
will have to upgrade for apache 2.x so I ran pkg_delete and the went for
apache2.


This is where port understanding comes in handy, I avoid port
installation of my server level of applications (php/apache/db).

If I understand correctly you first did a portinstall to get
apache/php4 installed and then did a pkg_delete to remove those old
versions and then added portinstall php5.  What seems to be happening
is that you have an apache version that is trying to load php4 but
php5 is installed and thus the error. There are two options i think
will help:
 1) start over
 2) ensure there arn't any current port issues (via the bsd port mailing list)

Or
 1) install php/apache/(db) manually and manage updates yourself.

What ever is the case it is obvious that you have conflicting
(configuration/installation)'s.


You might also want to try some bsp-port resources on searching for
what is going wrong.

HTH,
Curt.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] php4 / php5 unable to locate module

2006-09-11 Thread Zbigniew Szalbot
On Mon, 11 Sep 2006, Curt Zirzow wrote:
Hi there again,


> > Thanks for such a fast response. I used portinstall. I did have apache
> > 1.3.37 at the beginning but it later turned out that for some reason I
> > will have to upgrade for apache 2.x so I ran pkg_delete and the went for
> > apache2.
>
> This is where port understanding comes in handy, I avoid port
> installation of my server level of applications (php/apache/db).
>
> If I understand correctly you first did a portinstall to get
> apache/php4 installed and then did a pkg_delete to remove those old
> versions and then added portinstall php5.  What seems to be happening
> is that you have an apache version that is trying to load php4 but
> php5 is installed and thus the error. There are two options i think
> will help:
>  1) start over

OK. Thanks! I did try to start over by deleting php5 and issuing make,
make install and make clean. However, the result was just the same.

I need to go to BSD lists to find out how to completely wipe out PHP from
the system so that there is no trace of it left. Would that be a good
solution for a newbie in *nix systems in general?

Thanks again. I really appreciate that you are devoting so much of your
time to help me!

Warm regards,

--
Zbigniew Szalbot

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] PHP 4 OOP, re-using a object?

2006-09-11 Thread Curt Zirzow

On 9/11/06, Micky Hulse <[EMAIL PROTECTED]> wrote:

Hi Curt, thanks for the feedback/input and your time. :)

Curt Zirzow wrote:
> It would have been more relevant to supply the problem along with the
> solution.

Definitely. Sorry about that. Sometimes I post questions to forums/lists
without thinking things through more thoroughly... Hehe, I half blame
that on sleep deprivation and half on ADD. Lol, or something. :)


No problems at all.  I just noticed that the question you originally
proposed couldn't really be solved without more info other wise
everyone would be guessing at what the issue is.. And in the end you
solved your own problem.

It is a common thing to do such a thing, i tend to practice this
method of posting questions to ensure i provide enough information to
solve the issue:
 1) compose a question
 2) forget the question was about and read the question, and see if
it is even able to be solved.
 3) if it cant be solved, include a statement like: I've been looking
over this and can't see what I'm missing (type of thing).


Curt.


I will be sure to take your advice into account for my future posts to
this and other lists.


heh.. now you have more advice to consider..  :)



Thanks again. Have a great day.


No problem.

Curt.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] DOM - parse HTML document

2006-09-11 Thread Leonidas Safran
Hello Satyam,

Thanks for your answering...

>> I don't really get it to work with that functions from
>> http://www.php.net/manual/en/ref.dom.php

>> I try to get the content of  fields on an external html page, where
>> I just know some ids of the rows.

>> Example:
>> ...
>> 
>> 1234
>> 
>> 
>> 1234
>> 
>> 
>> 1234
>> 
>>
>> 1234
>> 
>> ...

>> PS: Please note, that id is written more than once. So 
>> DomDocument->getElementById('tr01') returns only one element and not two
>> or more...

>> I can't find out how to grab the data in the td fields... I don't find
>> examples to look at... :-(

>> I'd be really glad if somebody could give me some advice or tutorial 
>> websites about that...

> To start with, an ID should never be repeated.  A name can be repeated, 
> an ID shouldn't.  That is why there is a function to get an array of 
> elements with a certain name but there is none to get a list of elements 
> with the same ID simply because there shouldn't be any.   Something 
> helpful in traversing  the DOM is any tool that gives you a good view of 
> the tree structure.  One such comes already in the Firefox browser.

Unfortunately, I have no way to modify the source html page, it's on the web.

By the way, because I found it strange to have more than one field with the 
same id, I looked on the famous selfhtml tutorial website 
http://de.selfhtml.org which says that unique id is only mandatory for css, but 
not for javascript actually. I was surprised...
http://de.selfhtml.org/css/formate/zentrale.htm#individualformate
http://en.selfhtml.org/css/formate/zentrale.htm#individualformate
(english translation is a little different)


LS
-- 


"Feel free" – 10 GB Mailbox, 100 FreeSMS/Monat ...
Jetzt GMX TopMail testen: http://www.gmx.net/de/go/topmail

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] php4 / php5 unable to locate module

2006-09-11 Thread Zbigniew Szalbot
Hi,

Please, please forgive! How dumb a person (me!) can sometimes be!

I looked at httpd.conf again and saw that instead of replacing php4.so
library object I added a new line with php5 entry...

Sorry to have bothered!

Thanks!

Zbyszek

On Mon, 11 Sep 2006, Zbigniew Szalbot wrote:

> On Mon, 11 Sep 2006, Curt Zirzow wrote:
> Hi there again,
>
>
> > > Thanks for such a fast response. I used portinstall. I did have apache
> > > 1.3.37 at the beginning but it later turned out that for some reason I
> > > will have to upgrade for apache 2.x so I ran pkg_delete and the went for
> > > apache2.
> >
> > This is where port understanding comes in handy, I avoid port
> > installation of my server level of applications (php/apache/db).
> >
> > If I understand correctly you first did a portinstall to get
> > apache/php4 installed and then did a pkg_delete to remove those old
> > versions and then added portinstall php5.  What seems to be happening
> > is that you have an apache version that is trying to load php4 but
> > php5 is installed and thus the error. There are two options i think
> > will help:
> >  1) start over
>
> OK. Thanks! I did try to start over by deleting php5 and issuing make,
> make install and make clean. However, the result was just the same.
>
> I need to go to BSD lists to find out how to completely wipe out PHP from
> the system so that there is no trace of it left. Would that be a good
> solution for a newbie in *nix systems in general?
>
> Thanks again. I really appreciate that you are devoting so much of your
> time to help me!
>
> Warm regards,
>
> --
> Zbigniew Szalbot
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

--
Zbigniew Szalbot

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Is SOAP not really enabled?

2006-09-11 Thread Brian Dunning

The techs at Rackspace just enabled SOAP for me. I have a command:

$soap = new SoapClient('http://geocoder.us/dist/eg/clients/ 
GeoCoderPHP.wsdl');


which works fine on my PHP 5.1.6 development server, but it won't run  
on my 4.3.9 server at Rackspace. The only place 'soap' appears in  
phpinfo() is '--with-soap' up in the Configure Command section. There  
is no Soap section further down on the page, as there is on my dev  
server (which, I notice, says '--enable-soap' instead).


Is it possible that the Rackspace techs didn't do something right?  
That would be a first indeed.


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Is SOAP not really enabled?

2006-09-11 Thread Ryan Creaser


Brian Dunning wrote:

The techs at Rackspace just enabled SOAP for me. I have a command:

$soap = new 
SoapClient('http://geocoder.us/dist/eg/clients/GeoCoderPHP.wsdl');


which works fine on my PHP 5.1.6 development server, but it won't run 
on my 4.3.9 server at Rackspace. The only place 'soap' appears in 
phpinfo() is '--with-soap' up in the Configure Command section. There 
is no Soap section further down on the page, as there is on my dev 
server (which, I notice, says '--enable-soap' instead).


Sorry to say, but there is no native soap extension in php4, it was 
introduced with php5. 


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Help with OpenSSL Function

2006-09-11 Thread Shanon Swafford

Hi guys,

I am trying to use Apache, PHP 4.3, and PHP's Openssl functions to encrypt a
variable.

Currently, I can successfully use the following command to encrypt an
existing file and create a new one:

openssl aes-256-cbc -e -in plain_file.xml -out encrypt_file.xml -k
1234123412341234

Is it possible to use the openssl functions in PHP 4.3 without having to use
the file system?

Can sombody help with the syntax to mimick the above to create a variable
with encrypted data from a plain text variable?

Here is a test I'm running:

It takes the following XML file:
http://71.164.193.239:8082/test.xml 

Here is the page:
http://71.164.193.239:8082/test.php

Here is the source:
http://71.164.193.239:8082/test.txt 

Problem:
1.  It spits out different data every time you refresh the test.php page.
Why?  Seems every so often, the encrypted data will be correct.

2.  I would like to get rid of shell_exec and the test.xml file.

3.  If this is not possible, how can I pass the plain variable to the
shell_exec command?

I also found mcrypt functions, but it is not available on my production
server.

Is there a better way to do this?

Thanks and have a good day,
Shanon

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] FUNCTION TO CHECK IMAGE

2006-09-11 Thread Christopher Weldon
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

BBC wrote:
>> What types of images are these? JPG, PNG, GIF?
> Its jpg. Look... I don't know exactly what your point, I'm just asking you 
> about the function to resolve the size of image like the
> codes below:
> if (file_exists($img_path)){
> list($width,$height) = getimagesizes($img_path);
> }else{
> $width = $ height = $max_size;
> }
> So is there any other option to replace file_exists();?
> 

Well, if I do remember correctly, then you are uploading a file. If
that's the case, then rather than using file_exists() you should be
using is_uploaded_file. Once you've verified that is_uploaded_file()
returns true, then use move_uploaded_file() to move the file to
someplace on your filesystem. If that returns true, then you should not
have to check file_exists again and just be able to use get getimagesize().

So, a good function for this would probably be:

function getUploadedImageSize($image, $to_path) {
global $max_size;

$width = $height = $max_size;

if (is_uploaded_file($image)) {
if (move_uploaded_file($image, $to_path)) {
list($width,$height) = getimagesize($to_path);
}
}

return array($width, $height);
}

list($width, $height) = getUploadedImageSize($tmp, '/the/final/path');

BTW, I don't know if you did a copy and paste from your code or if you
just typed it in really quickly, but you do have a few syntactical
errors in the code above. First, the image sizing function is
getimagesize - singular, not plural. Second, in your assignment
statement, you have a space where there should not be one:

$width = $ height = $max_size;
  ^

Just wanted to make sure you knew about that in case it was copied and
pasted.

- --
Christopher Weldon, ZCE
President & CEO
Cerberus Interactive, Inc.
[EMAIL PROTECTED]
979.739.5874
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.1 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFFBjDqZxvk7JEXkbERAr3XAKCXlgni7S6KuHAOY9ch7O9AkRBmEgCfcd6u
Oc1YRxq4EhHkeJpspLW0RdU=
=Kxek
-END PGP SIGNATURE-

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Is SOAP not really enabled?

2006-09-11 Thread Paul Scott

> Sorry to say, but there is no native soap extension in php4, it was 
> introduced with php5. 
> 

Yeah, in PHP4 you may want to go with one of two routes:

1. NuSOAP 
2. PEAR::SOAP 

AFAIK Pear Soap was used as a basis for the native C extension, so would
probably provide the easiest space for you to work with if you are using
the native SOAP stuff in PHP5. I do (did) prefer NuSOAP though, at the
time it provided all of our SOAP needs in PHP4. It can be downloaded as
a lib from Sourceforge IIRC.

--Paul

All Email originating from UWC is covered by disclaimer 
http://www.uwc.ac.za/portal/uwc2006/content/mail_disclaimer/index.htm 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] register globals on

2006-09-11 Thread Zbigniew Szalbot
Hello again,

Can I ask a general question? One of the website that we have built was
constructed using register globals. Thanks to that we set the language for
browsing the website by determining user's browser language and then also
(I think) it is used to remember some other choices users make while on
the website (especially the language for browsing).

Anyway, our ISP asks us to stop using register globals. They are right. We
should. However, the programmer we have been using to help us, insists
that without register globals on, we will have to revert to using cookies.
This - he claims - is not an option because if a user blocks cookies, site
as such will become useless (many options on the website are a consequence
of setting the language first).

I thought I would ask your opinion before we make any decision. Is it
really so that without register globals, such things as displaying
information from databases based on the initial choice of languages is not
an option? I am not a programmer so I just need general guidance.

Thank you very much in advance!

--
Zbigniew Szalbot

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] register globals on

2006-09-11 Thread Chris

Zbigniew Szalbot wrote:

Hello again,

Can I ask a general question? One of the website that we have built was
constructed using register globals. Thanks to that we set the language for
browsing the website by determining user's browser language and then also
(I think) it is used to remember some other choices users make while on
the website (especially the language for browsing).

Anyway, our ISP asks us to stop using register globals. They are right. We
should. However, the programmer we have been using to help us, insists
that without register globals on, we will have to revert to using cookies.
This - he claims - is not an option because if a user blocks cookies, site
as such will become useless (many options on the website are a consequence
of setting the language first).

I thought I would ask your opinion before we make any decision. Is it
really so that without register globals, such things as displaying
information from databases based on the initial choice of languages is not
an option? I am not a programmer so I just need general guidance.


Complete rubbish. He's being lazy.

--
Postgresql & php tutorials
http://www.designmagick.com/

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] register globals on

2006-09-11 Thread Zbigniew Szalbot
Hello again,

On Tue, 12 Sep 2006, Chris wrote:

> > I thought I would ask your opinion before we make any decision. Is it
> > really so that without register globals, such things as displaying
> > information from databases based on the initial choice of languages is not
> > an option? I am not a programmer so I just need general guidance.
>
> Complete rubbish. He's being lazy.

Thanks a lot! Any hint what to use instead? I mean I will tell him to
re-think things but with techi guys I would simply feel better saying we
need to rework the website using...???

Thank you again!

--
Zbigniew Szalbot

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php