[PHP] Looking up, deleting and inserting array values

2006-05-10 Thread Jonas Rosling
Hi, I'm trying to do something that I know works when you build an array like a map with elements and values. One of the problems with this is that I only get out the values from the array from the last row. And the other problem is it looks like I can't delete desired values within the array. Is

Re: [PHP] tired of referencing static variables/constants with 'self ::'

2006-05-10 Thread Jochem Maas
D. Dante Lorenso wrote: ... I mean, I was forced to write 'self ::' like 11 times in that constructor. THAT is annoying. would it help to consider that the annoyance is a matter of subjection rather than fact? ;-) I realize I am probably just venting since it's unlikely I can get anything

Re: [PHP] Looking up, deleting and inserting array values

2006-05-10 Thread Jochem Maas
Jonas Rosling wrote: Hi, I'm trying to do something that I know works when you build an array like a map with elements and values. One of the problems with this is that I only get out the values from the array from the last row. And the other problem is it looks like I can't delete desired

[PHP] Is there an easier way of doing this?

2006-05-10 Thread Chris Grigor
morning all, Is there an easier way of doing the following?? form1 submitting to form1.php input type=checkbox name=1 input type=checkbox name=2 input type=submit form1.php ?php $link = mysql_connect('host', 'user', 'pass') or die (Connection failed: . mysql_error());

[PHP] Re: Is there an easier way of doing this?

2006-05-10 Thread Barry
Chris Grigor schrieb: morning all, Is there an easier way of doing the following?? form1 submitting to form1.php input type=checkbox name=1 input type=checkbox name=2 input type=submit form1.php ?php $link = mysql_connect('host', 'user', 'pass') or die (Connection failed: . mysql_error());

Re: [PHP] To capture Http Headers

2006-05-10 Thread Stut
Please reply to the list and not just directly to me. Kaushal Shriyan wrote: Thanks Stut I have put the below script in test.php ?php var_dump($_REQUEST); var_dump($_ENV); ? I am getting the below information which is not formatted array(5) { [RSP_COOKIE]= string(28)

Re: [PHP] Is there an easier way of doing this?

2006-05-10 Thread Chris
Chris Grigor wrote: morning all, Is there an easier way of doing the following?? form1 submitting to form1.php input type=checkbox name=1 input type=checkbox name=2 input type=submit make this into: input type=checkbox name=blah[1] value=1 input type=checkbox name=blah[2] value=1 then you

Re: [PHP] Is there an easier way of doing this?

2006-05-10 Thread Peter Hoskin
Chris Grigor wrote: morning all, Is there an easier way of doing the following?? form1 submitting to form1.php input type=checkbox name=1 input type=checkbox name=2 input type=submit form1.php ?php $link = mysql_connect('host', 'user', 'pass') or die (Connection failed: .

[PHP] To Capture HTTP Headers

2006-05-10 Thread Kaushal Shriyan
I have put the below in test.php ?php var_dump($_REQUEST); var_dump($_ENV); ? I am getting the below information which is not formatted array(5) { [RSP_COOKIE]= string(28) type=1name=YW1pdA==stype=0 [RSP_DAEMON]= string(32) 9d07e725d2294db468407bb19badd8c2 [MC_CMP_ESK]= string(8) NonSense

Re: [PHP] Is there an easier way of doing this?

2006-05-10 Thread viraj
definitely a loop will do the job. on a form submission, you can get all the submitted fields/ values in $_POST or $_GET array. just, try 'print_r($_POST)', on top of your receiving script. you will realise the scene behind. :) then, get the size of the $_POST array and loop through the array

Re: [PHP] Is there an easier way of doing this?

2006-05-10 Thread Angelo Zanetti
Peter Hoskin wrote: Chris Grigor wrote: morning all, Is there an easier way of doing the following?? form1 submitting to form1.php input type=checkbox name=1 input type=checkbox name=2 input type=submit form1.php ?php $link = mysql_connect('host', 'user', 'pass') or die (Connection

[PHP] internal operation

2006-05-10 Thread Luke Cole
Do the file system and directory functions, perform the file system command relative to your OS. e.g. does the internal code of the function: rename(oldname, newname); do exactly (in unix file systems): `mv oldname newname` do exactly (in windows file systems): `ren oldname newname` If not,

Re: [PHP] Is there an easier way of doing this?

2006-05-10 Thread Chris
Chris Grigor wrote: Hi Chris While this works, it only posts the checkboxes that have been selected. How would I get a list of ones not checked? Always reply to the list as well. Checkboxes aren't submitted if they are not checked. It's not a PHP thing that does this. That's why you

[PHP] Cannot suppress fsockopen errors

2006-05-10 Thread Nick Wilson
Hi, Im having a hard time surpressing fsckopen() errors. I've looked at the manual and searched around, but what i am doing /appears/ to be correct, yet im still geting warnings... here's the code: // open a socket to the server if($handle = @fsockopen($bits['host'], 80, $errno, $errstr, 10)

[PHP] Re: To Capture HTTP Headers

2006-05-10 Thread M. Sokolewicz
Kaushal Shriyan wrote: I have put the below in test.php ?php var_dump($_REQUEST); var_dump($_ENV); ? I am getting the below information which is not formatted [snip] ...[/snip] Actually If I run my test.cgi file I get well formatted one and also If you can see from the output HTTP_USERNAME

[PHP] file Upload - checking file size before uploading

2006-05-10 Thread James Nunnerley
Is there anyway to check the size of a file before it starts uploading it? For instance, if the file is huge, and takes ages to upload, and is then rejected by the server, the user will be somewhat annoyed! I'm not even sure this is a php question! Cheers Nunners

Re: [PHP] file Upload - checking file size before uploading

2006-05-10 Thread Barry
James Nunnerley schrieb: Is there anyway to check the size of a file before it starts uploading it? For instance, if the file is huge, and takes ages to upload, and is then rejected by the server, the user will be somewhat annoyed! I'm not even sure this is a php question! No you can't.

RE: [PHP] file Upload - checking file size before uploading

2006-05-10 Thread Jay Blanchard
[snip] Is there anyway to check the size of a file before it starts uploading it? For instance, if the file is huge, and takes ages to upload, and is then rejected by the server, the user will be somewhat annoyed! [/snip] PHP is server-side and cannot check anything client-side. You cold use

Re: [PHP] file Upload - checking file size before uploading

2006-05-10 Thread Duncan Hill
On Wednesday 10 May 2006 13:39, Jay Blanchard wrote: [snip] Is there anyway to check the size of a file before it starts uploading it? For instance, if the file is huge, and takes ages to upload, and is then rejected by the server, the user will be somewhat annoyed! [/snip] PHP is

Re: [PHP] Is there an easier way of doing this?

2006-05-10 Thread tedd
At 10:49 AM +0200 5/10/06, Chris Grigor wrote: morning all, Is there an easier way of doing the following?? Try: http://www.weberdev.com/get_example-3754.html HTH's tedd -- http://sperling.com -- PHP General

Re: [PHP] throttle output streamed from a file?

2006-05-10 Thread tedd
At 10:56 PM -0500 5/9/06, D. Dante Lorenso wrote: to a client who may be very slow. Aren't they all. :-) tedd -- http://sperling.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

[PHP] Uploading Image File

2006-05-10 Thread Renzo Clavijo
Morning all. I would like to know if anybody could e-mail an example of code to upload files into a MySQL server using PHP from a form. Thanks a lot. Best Regards, RENZO CLAVIJO

Re: [PHP] tired of referencing static variables/constants with 'self ::'

2006-05-10 Thread John Wells
On 5/9/06, D. Dante Lorenso [EMAIL PROTECTED] wrote: As an OOP programmer, I would expect the scope search to be as follows: 1. LOCAL: current method 2. THIS: current instance ($this) 3. SELF: current class parent classes, in order of inheritance 4. GLOBAL: globals Ok, so this

[PHP] PHP suddenly stops working on FreeBSD

2006-05-10 Thread Paul Waring
I restarted Apache this morning in order to allow some new virtual hosts to be recognised, and now I've got a problem whereby all of my PHP scripts are being served up as source code instead of being executed by the web server. I don't know why this is, as far as I'm aware I haven't changed

Re: [PHP] Uploading Image File

2006-05-10 Thread gustav
Morning all. I would like to know if anybody could e-mail an example of code to upload files into a MySQL server using PHP from a form. Thanks a lot. Best Regards, RENZO CLAVIJO What exactly do you mean? Best regards /Gustav Wiberg -- PHP General Mailing List (http://www.php.net/)

Re: [PHP] PHP suddenly stops working on FreeBSD

2006-05-10 Thread rouvas
On Wednesday 10 May 2006 16:58, Paul Waring wrote: I restarted Apache this morning in order to allow some new virtual hosts to be recognised, and now I've got a problem whereby all of my PHP scripts are being served up as source code instead of being executed by the web server. I don't know

Re: [PHP] PHP suddenly stops working on FreeBSD

2006-05-10 Thread Jochem Maas
Paul Waring wrote: I restarted Apache this morning in order to allow some new virtual hosts to be recognised, and now I've got a problem whereby all of my PHP scripts are being served up as source code instead of being executed by the web server. I don't know why this is, as far as I'm aware I

Re: [PHP] PHP suddenly stops working on FreeBSD

2006-05-10 Thread Paul Waring
On 10/05/06, Jochem Maas [EMAIL PROTECTED] wrote: the php may be being loaded in via an include conf file do you havbe a line in httpd.conf that start with 'Include' ? Only one, and that includes some virtual host files (I don't think those are the problem, as Apache usually complains if

Re: [PHP] PHP suddenly stops working on FreeBSD

2006-05-10 Thread Jochem Maas
Paul Waring wrote: On 10/05/06, Jochem Maas [EMAIL PROTECTED] wrote: the php may be being loaded in via an include conf file do you havbe a line in httpd.conf that start with 'Include' ? Only one, and that includes some virtual host files (I don't think those are the problem, as Apache

Re: [PHP] PHP suddenly stops working on FreeBSD

2006-05-10 Thread Richard Collyer
Paul Waring wrote: Some version numbers in case it helps: php -v PHP 4.4.2 (cli) (built: May 10 2006 14:40:03) Copyright (c) 1997-2006 The PHP Group Zend Engine v1.3.0, Copyright (c) 1998-2004 Zend Technologies httpd -v Server version: Apache/2.0.58 Server built: May 7 2006 10:42:02 Does

[PHP] How to get incoming emails captured by PHP ?

2006-05-10 Thread Adrian
Hi All I have been trying to have PHP capture incoming emails sent to a specific email account and have not been able to achieve this, I have searched high and low on the internet and the same article (http://www.evolt.org/article/Incoming_Mail_and_PHP/18/27914/index.html) is plastered

Re: [PHP] PHP suddenly stops working on FreeBSD

2006-05-10 Thread Paul Waring
On 10/05/06, Riemer Palstra [EMAIL PROTECTED] wrote: These are rather recent versions of both, so I'm suspecting an upgrade was done recently which didn't make PHP all that happy. This is PHP built from the port /usr/ports/lang/php4? Go to that dir, type 'make config', make sure the APACHE knob

Re: [PHP] PHP suddenly stops working on FreeBSD

2006-05-10 Thread Paul Waring
On 10/05/06, Richard Collyer [EMAIL PROTECTED] wrote: Does this do the same with PHP5? Remember mod_php5 has gone from ports so lang/php5 then make config and select build apache option. I've no idea whether it does that with PHP5, but I'm not ready to upgrade to that version yet (perhaps over

Re: [PHP] How to get incoming emails captured by PHP ?

2006-05-10 Thread Stut
Adrian wrote: I have my aliases file set up with the line: ade: |/usr/bin/php, |/wwwroot/www.domain.com/ade/email.php (The path to my PHP is correct) There should only be one | on that line. It should read... ade: /usr/bin/php /wwwroot/www.domain.com/ade/email.php And the script it

[PHP] Re: Upload File

2006-05-10 Thread Renzo Clavijo
hi all.. I'm gonna be more precise: I wrote a form with fields text type=file , then i need to know how to upload the files to the MySQL server (postgreSQL wold be appreciated). It implies: Which field(s) must have the table where I'll save the image?. Is there an example code to upload

Re: [PHP] How to get incoming emails captured by PHP ?

2006-05-10 Thread John Nichel
Adrian wrote: Hi All I have been trying to have PHP capture incoming emails sent to a specific email account and have not been able to achieve this, I have searched high and low on the internet and the same article (http://www.evolt.org/article/Incoming_Mail_and_PHP/18/27914/index.html) is

Re: [PHP] How to get incoming emails captured by PHP ?

2006-05-10 Thread Stut
Stut wrote: Adrian wrote: I have my aliases file set up with the line: ade: |/usr/bin/php, |/wwwroot/www.domain.com/ade/email.php (The path to my PHP is correct) There should only be one | on that line. It should read... ade: /usr/bin/php /wwwroot/www.domain.com/ade/email.php D'oh,

[PHP] Re: Browser displays blank page, while request still being handled

2006-05-10 Thread Rolf Wouters
Yet another update. Strange thing happened. I fixed the problem... It's not a clean solution, it's not the right solution, but for now, it'll (have to) do :-) I changed my little test-script to include directives like max_input_time, set_time_limit(0) etc. Than I thought, why not try to

Re: [PHP] Uploading Image File

2006-05-10 Thread Jochem Maas
Renzo Clavijo wrote: Morning all. I would like to know if anybody could e-mail an example of code to upload files into a MySQL server using PHP from a form. recently a new phenomenon has appeared online, namely search engines:

RE: [PHP] How to get incoming emails captured by PHP ?

2006-05-10 Thread Adrian
Thanks, I changed the line to: ade: |/usr/bin/php /wwwroot/www.domain.com/ade/email.php And get this message back different but in essence the same I believe. I know the email.php doesn't do anything, I would love to get it there :) proving to be difficult :) - The following

[PHP] Re: Upload File

2006-05-10 Thread Barry
Renzo Clavijo schrieb: hi all.. I'm gonna be more precise: I wrote a form with fields text type=file , then i need to know how to upload the files to the MySQL server (postgreSQL wold be appreciated). It implies: Which field(s) must have the table where I'll save the image?. Is there

Re: [PHP] How to get incoming emails captured by PHP ?

2006-05-10 Thread Stut
Adrian wrote: Thanks, I changed the line to: ade: |/usr/bin/php /wwwroot/www.domain.com/ade/email.php And get this message back different but in essence the same I believe. I know the email.php doesn't do anything, I would love to get it there :) proving to be difficult :) - The

Re: [PHP] Re: Upload File

2006-05-10 Thread Peter Hoskin
Renzo Clavijo wrote: hi all.. I'm gonna be more precise: I wrote a form with fields text type=file , then i need to know how to upload the files to the MySQL server (postgreSQL wold be appreciated). It implies: Which field(s) must have the table where I'll save the image?. Is there

Re: [PHP] Re: Browser displays blank page, while request still being handled

2006-05-10 Thread Eric Butera
On 5/10/06, Rolf Wouters [EMAIL PROTECTED] wrote: Yet another update. Strange thing happened. I fixed the problem... It's not a clean solution, it's not the right solution, but for now, it'll (have to) do :-) I changed my little test-script to include directives like max_input_time,

Re: [PHP] Re: Upload File

2006-05-10 Thread Barry
Peter Hoskin schrieb: Renzo Clavijo wrote: hi all.. I'm gonna be more precise: I wrote a form with fields text type=file , then i need to know how to upload the files to the MySQL server (postgreSQL wold be appreciated). It implies: Which field(s) must have the table where I'll save the

RE: [PHP] How to get incoming emails captured by PHP ?

2006-05-10 Thread Adrian
THANK YOU! That did it, its now working, thank you for your help. -Original Message- From: Stut [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 10, 2006 11:03 AM To: Adrian Cc: php-general@lists.php.net Subject: Re: [PHP] How to get incoming emails captured by PHP ? Adrian wrote:

Re: [PHP] Re: Upload File

2006-05-10 Thread Peter Hoskin
But mysql can be quite a good spool though. That way you don't have to code one for yourself. That does not mean that there are not SIGNIFICANT ADVANTAGES to coding something to use the filesystem - such as seek speed. When dealing with large datasets of binary, filesystems are much quicker

Re: [PHP] Re: Upload File

2006-05-10 Thread Barry
Peter Hoskin schrieb: But mysql can be quite a good spool though. That way you don't have to code one for yourself. That does not mean that there are not SIGNIFICANT ADVANTAGES to coding something to use the filesystem - such as seek speed. When dealing with large datasets of binary,

[PHP] Re: How to get incoming emails captured by PHP ?

2006-05-10 Thread Adrian
Hi John Thank you, I have just got it working now, will look into the different ways you suggested. Adrian wrote: Hi All I have been trying to have PHP capture incoming emails sent to a specific email account and have not been able to achieve this, I have searched high and low on

[PHP] check socket status

2006-05-10 Thread Antanas Vipartas
Hi I need to check if socket on some port is listened by some service. How could I do this ? thanks, Antanas Vipartas -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: check socket status

2006-05-10 Thread Barry
Antanas Vipartas schrieb: Hi I need to check if socket on some port is listened by some service. How could I do this ? thanks, Antanas Vipartas Knock at the port door ;) Nah just kidding. you can try to connect via fsockopen. I hope that port gives something back you can read out. because

RE: [PHP] check socket status

2006-05-10 Thread Jim Moseby
Hi I need to check if socket on some port is listened by some service. How could I do this ? Your server is *nix? You could: $netstat_info=`netstat -l`; // notice back-tics ...then parse through the output. JM -- PHP General Mailing List (http://www.php.net/) To unsubscribe,

Re: [PHP] Re: Upload File

2006-05-10 Thread Jochem Maas
Peter Hoskin wrote: Renzo Clavijo wrote: hi all.. I'm gonna be more precise: I wrote a form with fields text type=file , then i need to know how to upload the files to the MySQL server (postgreSQL wold be appreciated). It implies: Which field(s) must have the table where I'll save the

Re: [PHP] check socket status

2006-05-10 Thread Antanas Vipartas
Jim Moseby wrote: Your server is *nix? You could: $netstat_info=`netstat -l`; // notice back-tics ...then parse through the output. JM `netstat -l | grep 5514` gives me information about listening service on port 5514. That's all I needed but I only can get this from *nix console. How

Re: [PHP] Re: Upload File

2006-05-10 Thread Peter Hoskin
Jochem Maas wrote: Peter Hoskin wrote: Renzo Clavijo wrote: hi all.. I'm gonna be more precise: I wrote a form with fields text type=file , then i need to know how to upload the files to the MySQL server (postgreSQL wold be appreciated). It implies: Which field(s) must have the

Re: [PHP] Re: Browser displays blank page, while request still being handled

2006-05-10 Thread Edward Vermillion
On May 10, 2006, at 10:54 AM, Rolf Wouters wrote: Yet another update. Strange thing happened. I fixed the problem... It's not a clean solution, it's not the right solution, but for now, it'll (have to) do :-) I changed my little test-script to include directives like max_input_time,

Re: [PHP] file Upload - checking file size before uploading

2006-05-10 Thread Phillip S. Baker
James Nunnerley wrote: Is there anyway to check the size of a file before it starts uploading it? For instance, if the file is huge, and takes ages to upload, and is then rejected by the server, the user will be somewhat annoyed! I'm not even sure this is a php question! Nope not a PHP

Re: [PHP] Re: Upload File

2006-05-10 Thread Edward Vermillion
On May 10, 2006, at 10:53 AM, Peter Hoskin wrote: GOOGLE DO NOT ARGUE o_O? So, if ASCII and Binary are both codesets... which does SQL use to store its data? ASCII is a codeset, utf* is a codeset binary is a, um... , binary data. varchar, etc = ASCII/utf*/whatever =

[PHP] Re: check socket status

2006-05-10 Thread Antanas Vipartas
Barry wrote: Knock at the port door ;) Nah just kidding. you can try to connect via fsockopen. I hope that port gives something back you can read out. because every port allows connections if it's not blocked or firewalled. actually, it helps. I can sense if the socked is listened. But the

RE: [PHP] check socket status

2006-05-10 Thread Jim Moseby
Jim Moseby wrote: Your server is *nix? You could: $netstat_info=`netstat -l`; // notice back-tics ...then parse through the output. JM `netstat -l | grep 5514` gives me information about listening service on port 5514. That's all I needed but I only can get this from

[PHP] Re: check socket status

2006-05-10 Thread Antanas Vipartas
Jim Moseby solved the problem I didn't even known that I can exec *nix commands straight from php file. ?php $netstat_info = `netstat -l | grep 5514`; // notice back-tics echo $netstat; ? this gave me what I wanted. Thanks guys for the help Antanas Vipartas -- PHP General Mailing List

Re: [PHP] check socket status

2006-05-10 Thread Antanas Vipartas
Jim Moseby wrote: ?PHP $netstat_info=`netstat -l`; echo $netstat_info; ? Assuming it has permissions, and all the stars are aligned, you should get the output of the 'netstat -l' command echoed to the screen. Thanks Jim, this really solved the problem up. -- PHP General Mailing List

Re: [PHP] file Upload - checking file size before uploading

2006-05-10 Thread Jochem Maas
Jay Blanchard wrote: [snip] Is there anyway to check the size of a file before it starts uploading it? For instance, if the file is huge, and takes ages to upload, and is then rejected by the server, the user will be somewhat annoyed! [/snip] PHP is server-side and cannot check anything

[PHP] PHP URL query

2006-05-10 Thread IraqiGeek
Hi all, I'm somewhat new to php, though I have played a bit with the language. I'm currently learning the language, and I'm having a problem passing variables through URL query. Here is what I have: A simple HTML file that contains: A HREF=test.php?var=test Hi, this is a test! /A and a php

Re: [PHP] PHP URL query

2006-05-10 Thread Jason Gerfen
IraqiGeek wrote: Hi all, I'm somewhat new to php, though I have played a bit with the language. I'm currently learning the language, and I'm having a problem passing variables through URL query. Here is what I have: A simple HTML file that contains: A HREF=test.php?var=test Hi, this is a

Re: [PHP] PHP URL query

2006-05-10 Thread Brad Bonkoski
?php $var = $_GET['var']; echo( Welcome to our Web site, $var! ); ? -B IraqiGeek wrote: Hi all, I'm somewhat new to php, though I have played a bit with the language. I'm currently learning the language, and I'm having a problem passing variables through URL query. Here is what I have: A

Re: [PHP] PHP URL query

2006-05-10 Thread Eric Butera
On 5/10/06, IraqiGeek [EMAIL PROTECTED] wrote: Hi all, I'm somewhat new to php, though I have played a bit with the language. I'm currently learning the language, and I'm having a problem passing variables through URL query. Here is what I have: A simple HTML file that contains: A

Re: [PHP] PHP URL query

2006-05-10 Thread Dave Goodchild
register_globals is disabled on your system, which is a good thing. So you have to reference all values sent via a form using GET with the $_GET superglobal array as follows: Welcome to our web site, {$_GET[var]} or 'Welcome to our web site, ' . $_GET['var'] etc etc On 10/05/06, IraqiGeek

Re: [PHP] PHP URL query

2006-05-10 Thread John Nichel
IraqiGeek wrote: Hi all, I'm somewhat new to php, though I have played a bit with the language. I'm currently learning the language, and I'm having a problem passing variables through URL query. Here is what I have: A simple HTML file that contains: A HREF=test.php?var=test Hi, this is a

Re: [PHP] PHP URL query

2006-05-10 Thread IraqiGeek
On Wednesday, May 10, 2006 6:08 PM GMT, Jason Gerfen [EMAIL PROTECTED] wrote: IraqiGeek wrote: Hi all, I'm somewhat new to php, though I have played a bit with the language. I'm currently learning the language, and I'm having a problem passing variables through URL query. Here is what I

[PHP] New: Browser based editor of WIN.INI files (on Windows)

2006-05-10 Thread Jeremy C O'Connor
Hi This is an announcement of a new browser based editor for the C:\WINDOWS\PHP.INI file. It lets you uncomment or comment lines by clicking a checkbox, and alter the values of configuration settings. You can also insert, edit and delete lines. It is in the Beta stage of release, so please let me

[PHP] Update: That is to say PHP.INI, not WIN.INI

2006-05-10 Thread Jeremy C O'Connor
phpEditIni project. That is to say PHP.INI, not WIN.INI -- net07350 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] PHP URL query

2006-05-10 Thread Vedanta Barooah
Try this : ?php $foo=$_GET['var']; echo ($foo); ? Refer: http://www.zend.com/zend/art/art-sweat4.php - Vedanta Barooah -Original Message- From: IraqiGeek [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 10, 2006 10:14 PM To: php-general@lists.php.net Subject: [PHP] PHP URL query Hi all,

[PHP] Good Answers

2006-05-10 Thread Richard Lynch
Hey y'all... In the spirit of improving the mailing list, I'd like to suggest that we, as a group, attempt to not provide answers with Bad Practices, or at least always to point out that the Sample is Bad Practice for production sites? For example, an answer to a question about ?php echo $foo?

RE: [PHP] Good Answers

2006-05-10 Thread Jay Blanchard
[snip] In the spirit of improving the mailing list, I'd like to suggest that we, as a group, attempt to not provide answers with Bad Practices, or at least always to point out that the Sample is Bad Practice for production sites? For example, an answer to a question about ?php echo $foo? where it

Re: [PHP] Re: Upload File

2006-05-10 Thread Richard Lynch
On Wed, May 10, 2006 9:52 am, Renzo Clavijo wrote: I'm gonna be more precise: I wrote a form with fields text type=file , then i need to Should be input And don't forget to use FORM attribute: enctype=multipart/form-data know how to upload the files to the MySQL server (postgreSQL

Re: [PHP] Good Answers

2006-05-10 Thread Eric Butera
On 5/10/06, Richard Lynch [EMAIL PROTECTED] wrote: Hey y'all... In the spirit of improving the mailing list, I'd like to suggest that we, as a group, attempt to not provide answers with Bad Practices, or at least always to point out that the Sample is Bad Practice for production sites? For

Re: [PHP] file Upload - checking file size before uploading

2006-05-10 Thread Richard Lynch
On Wed, May 10, 2006 11:09 am, Phillip S. Baker wrote: James Nunnerley wrote: However you can set the max file size within the form tag of HTML. I forget the proper snytax and tag off the top of my head. I am not sure the error it spits out as I have never tested that. you can also use

Re: [PHP] Cannot suppress fsockopen errors

2006-05-10 Thread Richard Lynch
On Wed, May 10, 2006 5:30 am, Nick Wilson wrote: Im having a hard time surpressing fsckopen() errors. I've looked at the manual and searched around, but what i am doing /appears/ to be correct, yet im still geting warnings... here's the code: // open a socket to the server if($handle =

Re: [PHP] internal operation

2006-05-10 Thread Richard Lynch
On Wed, May 10, 2006 4:11 am, Luke Cole wrote: Do the file system and directory functions, perform the file system command relative to your OS. e.g. does the internal code of the function: rename(oldname, newname); do exactly (in unix file systems): `mv oldname newname` do exactly (in

[PHP] Re: Good Answers

2006-05-10 Thread Jo�o C�ndido de Souza Neto
I agree. Some times i don´t put my questions here because i don´t know how to ask. But, many people do. Richard Lynch [EMAIL PROTECTED] escreveu na mensagem news:[EMAIL PROTECTED] Hey y'all... In the spirit of improving the mailing list, I'd like to suggest that we, as a group, attempt to

Re: [PHP] Is there an easier way of doing this?

2006-05-10 Thread Richard Lynch
for ($i = 1; $i = 20; $i++){ if (isset($_POST[$i])){ //insert blah blah blah } } Also, I don't think '1' is valid NAME for HTML specification. You could use: NAME=menu[1] Then in PHP: $menu = $_POST['menu']; for ($i = 1; $i = 20; $i++){ if (isset($menu[$i])){ } } And, of

Re: [PHP] Good Answers

2006-05-10 Thread Richard Lynch
On Wed, May 10, 2006 2:16 pm, Eric Butera wrote: On 5/10/06, Richard Lynch [EMAIL PROTECTED] wrote: these issues because they don't even know to consider these things. I still see so many examples passed on that have the ability to inject SQL or spam via E-Mail Header injection. I mean to

Re: [PHP] Re: Upload File

2006-05-10 Thread Rory Browne
There are names for people who use the blob field of a MySQL db to store images. Moron, and Idiot are just two examples, but if other circumstances exist, you can say newbie as well. As a newbie I thought myself that storing images in a DB would be a nice clean solution. Voices of experience said

Re: [PHP] internal operation

2006-05-10 Thread Rory Browne
www.php.net/streams On 5/10/06, Richard Lynch [EMAIL PROTECTED] wrote: On Wed, May 10, 2006 4:11 am, Luke Cole wrote: Do the file system and directory functions, perform the file system command relative to your OS. e.g. does the internal code of the function: rename(oldname, newname);

Re: [PHP] Good Answers

2006-05-10 Thread Micky Hulse
Good thread. Great points. I always thought this Sitepoint thread was very helpful: http://snipurl.com/qafg Cheers, Micky -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Good Answers

2006-05-10 Thread tedd
Hmmm. Maybe this should be part of a Netiquette document How to give good answers right next to that How to ask good questions document :-^ Yep, and right next to How to think good, How to Google, and How to RTFM :-) tedd --

[PHP] question about using temporary named pipe in the string for system

2006-05-10 Thread Ginger Cheng
Hello, PHP gurus, I have a command that I want to run using system function. The command exploits temporary named pipes in the place of temporary files. my command is paste (cut -f1 file1) (cut -f2 file2) final_file It works perfectly well if I just

Re: [PHP] question about using temporary named pipe in the string for system

2006-05-10 Thread Joe Henry
On Wednesday 10 May 2006 4:02 pm, Ginger Cheng wrote: Hello, PHP gurus, I have a command that I want to run using system function. The command exploits temporary named pipes in the place of temporary files. my command is paste (cut -f1 file1) (cut -f2 file2)

Re: [PHP] Good Answers

2006-05-10 Thread Jochem Maas
As usual, Richard shows the quality of his mettle! :-) I absolutely agree, some ideas: 1. have the mailing list automatically add a single line to the mailing list sig that promotes security/good-practice and points to phpsec.org? (I guess only someone like Rasmus could say whether this was

Re: [PHP] question about using temporary named pipe in the string for system

2006-05-10 Thread Jochem Maas
Ginger Cheng wrote: Hello, PHP gurus, I have a command that I want to run using system function. The command exploits temporary named pipes in the place of temporary files. my command is paste (cut -f1 file1) (cut -f2 file2) final_file It works perfectly

Re: [PHP] Re: Upload File

2006-05-10 Thread Jochem Maas
thank you Edward. Edward Vermillion wrote: On May 10, 2006, at 10:53 AM, Peter Hoskin wrote: GOOGLE DO NOT ARGUE o_O? yeah! I did figure it really was about time they changed their 'Do No Evil' slogan given their escapades in china funnily enough I watched a documentary the other

Re: [PHP] PHP URL query

2006-05-10 Thread Jochem Maas
IraqiGeek wrote: Hi all, ... two things which have nothing to do with your original question (that seems to have been covered rather well) Regards, IraqiGeek www.iraqigeek.com try viewing your site in firefox - notice all those question marks in the content? might be interesting to find

Re: [PHP] Re: Upload File

2006-05-10 Thread Jochem Maas
Jochem Maas wrote: thank you Edward. ... there is a funny little story about where the name BLOB came from: http://www.cvalde.net/misc/blob_true_history.htm just to note that BLOBs where invented by the guy that designed Interbase which just happens to be the ancestor of the coolest DBMS

Re: [PHP] file Upload - checking file size before uploading

2006-05-10 Thread Wolf
In your form uploading script: # individual file size limit - in bytes (102400 bytes = 100KB) $file_size_ind = 838860800; // 819.2 MB $weight=$_FILES[fileupload][size]; if ($weight$file_size_ind) { echobrimg src=\$dir_img/error.gif\ width=\15\ height=\15\nbsp;bfont size=\2\ERROR: please get

Re: [PHP] PHP suddenly stops working on FreeBSD

2006-05-10 Thread Matt
Just in case you ever need to check the configure line again in the future, you can get at it (even if you've built through the FreeBSD ports) through a phpinfo page. The third section on that page is labeled Configure Command and lists all the options used during the build. Matt On 5/10/06,

Re: [PHP] Good Answers

2006-05-10 Thread Ligaya Turmelle
Jay Blanchard wrote: [snip] In the spirit of improving the mailing list, I'd like to suggest that we, as a group, attempt to not provide answers with Bad Practices, or at least always to point out that the Sample is Bad Practice for production sites? For example, an answer to a question about

Re: [PHP] Good Answers

2006-05-10 Thread Ligaya Turmelle
Richard Lynch wrote: Hey y'all... In the spirit of improving the mailing list, I'd like to suggest that we, as a group, attempt to not provide answers with Bad Practices, or at least always to point out that the Sample is Bad Practice for production sites? For example, an answer to a question

[PHP] php parsing and db content

2006-05-10 Thread Schalk
Greetings All, I have the following problem. I load certain links and breadcrumbs from the database into a external .php file which I include on various pages within the site. Due to this I have defined a constant '_root' and precede all links with this to ensure that the links will work no

Re: [PHP] file Upload - checking file size before uploading

2006-05-10 Thread Chris
Wolf wrote: In your form uploading script: # individual file size limit - in bytes (102400 bytes = 100KB) $file_size_ind = 838860800; // 819.2 MB $weight=$_FILES[fileupload][size]; if ($weight$file_size_ind) { echobrimg src=\$dir_img/error.gif\ width=\15\ height=\15\nbsp;bfont size=\2\ERROR:

  1   2   >