[PHP] RE: find (matching) person in other table

2007-05-31 Thread info
Hello Afan list, I recently coded such an animal for a customer. It is a quick and dirty piece of work. They had an existing dataset and wanted to match new registrants against the dataset so as to avoid duplication. First we applied logic to not accept duplicate email addresses in the

[PHP] local v remote

2007-05-31 Thread blueboy
On my localhost this works fine $result= mysql_query(SELECT date_format(date, '%d/%m/%Y') as date, title, id, display FROM NEWS); while ($row = mysql_fetch_assoc($result)) { but on my remote i get a mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource Can someone

[PHP] Re: local v remote

2007-05-31 Thread Darren Whitlen
blueboy wrote: On my localhost this works fine $result= mysql_query(SELECT date_format(date, '%d/%m/%Y') as date, title, id, display FROM NEWS); while ($row = mysql_fetch_assoc($result)) { but on my remote i get a mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource

Re: [PHP] uploading really big files

2007-05-31 Thread Angelo Zanetti
Richard Lynch wrote: On Wed, May 30, 2007 8:47 am, Angelo Zanetti wrote: We need to develop a system where we can upload really big files. IE 15 - 25 Mb. You're pushing the limit on user patience and browser timeouts... So I know you can set the limit of the upload thats not a

Re: [PHP] uploading really big files

2007-05-31 Thread Angelo Zanetti
Zoltán Németh wrote: 2007. 05. 30, szerda keltezéssel 15.47-kor Angelo Zanetti ezt írta: Dear all We need to develop a system where we can upload really big files. IE 15 - 25 Mb. So I know you can set the limit of the upload thats not a problem, I know a problem that we might experience

Re: [PHP] uploading really big files

2007-05-31 Thread Dimiter Ivanov
On 5/30/07, Angelo Zanetti [EMAIL PROTECTED] wrote: Dear all We need to develop a system where we can upload really big files. IE 15 - 25 Mb. So I know you can set the limit of the upload thats not a problem, I know a problem that we might experience is that the browser might time out. Is there

[PHP] Removing PHPSESSID - CGI Install

2007-05-31 Thread Shaun
Hi, I have PHP installed as a CGI module on my server. I want to stop PHPSESSID from appearing in the URL when a users cookies are turned for just one account. My hosting company says that this is impossible - they would have to change php.ini and that would affect every account on the server.

Re: [PHP] local v remote

2007-05-31 Thread Robin Vickery
On 31/05/07, blueboy [EMAIL PROTECTED] wrote: On my localhost this works fine $result= mysql_query(SELECT date_format(date, '%d/%m/%Y') as date, title, id, display FROM NEWS); 1. check return values, $result should not be false unless there's a problem. 2. if $result is false, check

[PHP] Re: local v remote

2007-05-31 Thread Jared Farrish
On my localhost this works fine $result= mysql_query(SELECT date_format(date, '%d/%m/%Y') as date, title, id, display FROM NEWS); while ($row = mysql_fetch_assoc($result)) { but on my remote i get a mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource Can someone

[PHP] Re: Re: Re: Re: preg_match() returns false but no documentation why

2007-05-31 Thread Jared Farrish
Well, sure. It often appears as .* meaning none or any number of any characters. Use it when you honestly don't care what it matches. This is what I thought it meant. Your example more than clears it up. Say you want to find out if the word frog occus in a text followed by the word dog.

[PHP] file_get_contents and https

2007-05-31 Thread Bob Hanson
I am new to PHP; using Apache 2.2 and PHP 5/Windows. I'd like to do this: $x = file_get_contents(https://user:[EMAIL PROTECTED]) I get: Warning: file_get_contents(https://...) [function.file-get-contents]: failed to open stream: Invalid argument in ... on line... I think I have the

[PHP] Re: local v remote

2007-05-31 Thread M. Sokolewicz
Jared Farrish wrote: Jared Farrish wrote: On my localhost this works fine $result= mysql_query(SELECT date_format(date, '%d/%m/%Y') as date, title, id, display FROM NEWS); while ($row = mysql_fetch_assoc($result)) { but on my remote i get a mysql_fetch_assoc(): supplied argument is not a

RE: [PHP] file_get_contents and https

2007-05-31 Thread Jay Blanchard
[snip] I am new to PHP; using Apache 2.2 and PHP 5/Windows. I'd like to do this: $x = file_get_contents(https://user:[EMAIL PROTECTED]) I get: Warning: file_get_contents(https://...) [function.file-get-contents]: failed to open stream: Invalid argument in ... on line... [/snip] The warning

Re: [PHP] file_get_contents and https

2007-05-31 Thread Bob Hanson
Thanks, Jay. I tried it first with a simple http://; call, and that worked fine. So unless https:... requires something additional in the way of arguments, that doesn't seem to be the issue. I'm hoping someone who has done this remembers what special installation issues there might be. When

Re: [PHP] file_get_contents and https

2007-05-31 Thread David Giragosian
On 5/31/07, Stut [EMAIL PROTECTED] wrote: Bob Hanson wrote: Thanks, Jay. I tried it first with a simple http://; call, and that worked fine. So unless https:... requires something additional in the way of arguments, that doesn't seem to be the issue. I'm hoping someone who has done this

Re: [PHP] file_get_contents and https

2007-05-31 Thread Stut
Bob Hanson wrote: Thanks, Jay. I tried it first with a simple http://; call, and that worked fine. So unless https:... requires something additional in the way of arguments, that doesn't seem to be the issue. I'm hoping someone who has done this remembers what special installation issues

Re: [PHP] Re: find (matching) person in other table

2007-05-31 Thread Afan Pasalic
Jared Farrish wrote: On 5/30/07, Afan Pasalic [EMAIL PROTECTED] wrote: email has to match in total. [EMAIL PROTECTED] and [EMAIL PROTECTED] are NOT the same in my case. thanks jared, If you can match a person by their email, why not just SELECT by email only (and return the persons

Re: [PHP] Re: find (matching) person in other table

2007-05-31 Thread David Giragosian
On 5/31/07, Afan Pasalic [EMAIL PROTECTED] wrote: Jared Farrish wrote: On 5/30/07, Afan Pasalic [EMAIL PROTECTED] wrote: email has to match in total. [EMAIL PROTECTED] and [EMAIL PROTECTED] are NOT the same in my case. thanks jared, If you can match a person by their email, why not

Re: [PHP] Re: find (matching) person in other table

2007-05-31 Thread Afan Pasalic
David Giragosian wrote: On 5/31/07, Afan Pasalic [EMAIL PROTECTED] wrote: Jared Farrish wrote: On 5/30/07, Afan Pasalic [EMAIL PROTECTED] wrote: email has to match in total. [EMAIL PROTECTED] and [EMAIL PROTECTED] are NOT the same in my case. thanks jared, If you can match a person

Re: [PHP] file_get_contents and https

2007-05-31 Thread Bob Hanson
Problem solved. Thank you all very much for such quick responses. The solution was to get ssleay32.dll from the PHP 5 ZIP distribution and put in my PHP directory. For the record: With Windows and PHP 5 all that is needed to use the https protocol in file_get_contents is to make sure that

[PHP] How do YOU initialize the form variables?

2007-05-31 Thread info
Hello, If I have an HTML form with input, example: username lastname mobile .. and so on ... Example simple initialization: // POST $username = $_POST['username']; $lastname = $_POST['lastname']; $mobile = $_POST['mobile']; What is the most popular method for making PHP initialize the

[PHP] 500 server error

2007-05-31 Thread blueboy
my .htacces file only contains 2 lines allowoverride all php_flag display_errors on I get a 500 server error, any ideas? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Attempting to search a MySQL database from PHP not working

2007-05-31 Thread Jason Pruim
Hi Everyone, I am attempting to setup a search field on a database application I'm dinking around with and running into problems that I'm hoping someone might be able to shed some light on. Here is the code I am using to display the results of the search: echo ('table border=1'); echo

Re: [PHP] Attempting to search a MySQL database from PHP not working

2007-05-31 Thread Davi
Em Quinta 31 Maio 2007 16:25, Jason Pruim escreveu: Hi Everyone, I am attempting to setup a search field on a database application I'm dinking around with and running into problems that I'm hoping someone might be able to shed some light on. Here is the code I am using to display the results

Re: [PHP] Attempting to search a MySQL database from PHP not working

2007-05-31 Thread Robert Cummings
On Thu, 2007-05-31 at 15:25 -0400, Jason Pruim wrote: Hi Everyone, I am attempting to setup a search field on a database application I'm dinking around with and running into problems that I'm hoping someone might be able to shed some light on. Here is the code I am using to display the

Re: [PHP] Attempting to search a MySQL database from PHP not working

2007-05-31 Thread Dave Goodchild
Your problem is this: $result_row[] = mysql_query($query) or die(mysql_error()); ...you are assigning a query to a variable. What you need to do is something like this: $result = mysql_query($query) or die(mysql_error()); while ($result_row = mysql_fetch_array($result)) { . }

Re: [PHP] How do YOU initialize the form variables?

2007-05-31 Thread Robert Cummings
On Thu, 2007-05-31 at 10:57 -0700, [EMAIL PROTECTED] wrote: Hello, If I have an HTML form with input, example: username lastname mobile .. and so on ... Example simple initialization: // POST $username = $_POST['username']; $lastname = $_POST['lastname']; $mobile =

Re: [PHP] Attempting to search a MySQL database from PHP not working

2007-05-31 Thread Jason Pruim
On May 31, 2007, at 3:27 PM, Davi wrote: Em Quinta 31 Maio 2007 16:25, Jason Pruim escreveu: Hi Everyone, I am attempting to setup a search field on a database application I'm dinking around with and running into problems that I'm hoping someone might be able to shed some light on. Here is

Re: [PHP] ini_set() security question

2007-05-31 Thread Samuel Vogel
There is no bug filed for this. There is only one older bug ( http://bugs.php.net/bug.php?id=38804 ) which makes me think overwriting with ini_set() shouldn't be possible! Richard Lynch schrieb: On Wed, May 30, 2007 3:34 pm, Samuel Vogel wrote: And what happens if you try to allocate 3M

Re: [PHP] Attempting to search a MySQL database from PHP not working

2007-05-31 Thread Davi
Em Quinta 31 Maio 2007 16:38, Jason Pruim escreveu: while($result_row = mysql_fetch_array($result) { Worked perfectly after adding a closing ) Thanks for the tip! Forgive me for that!!! #'_'# I *always* forget the closing )... =P -- Davi Vidal [EMAIL PROTECTED] [EMAIL PROTECTED] --

Re: [PHP] 500 server error

2007-05-31 Thread Stut
blueboy wrote: my .htacces file only contains 2 lines allowoverride all php_flag display_errors on I get a 500 server error, any ideas? Check the Apache error log - that usually has more information on what's wrong. -Stut -- PHP General Mailing List (http://www.php.net/) To unsubscribe,

Re: [PHP] 500 server error

2007-05-31 Thread Daniel Brown
On 5/29/07, Stut [EMAIL PROTECTED] wrote: blueboy wrote: my .htacces file only contains 2 lines allowoverride all php_flag display_errors on I get a 500 server error, any ideas? Check the Apache error log - that usually has more information on what's wrong. -Stut -- PHP General Mailing

[PHP] Error logging

2007-05-31 Thread Clark Alexander
We have the following php.ini settings: error_reporting = E_ALL display_errors = Off display_startup_errors = Off log_errors = On log_errors_max_len = 1024 ignore_repeated_errors = Off ignore_repeated_source = Off report_memleaks = On track_errors = Off on a SuSE 10.1 server and the errors are

Re: [PHP] Error logging

2007-05-31 Thread Jochem Maas
Clark Alexander wrote: We have the following php.ini settings: error_reporting = E_ALL display_errors = Off display_startup_errors = Off log_errors = On log_errors_max_len = 1024 ignore_repeated_errors = Off ignore_repeated_source = Off report_memleaks = On track_errors = Off on a

Re: [PHP] Error logging

2007-05-31 Thread Clark Alexander
Yes, it does write to the file, but the only things going in there are notice type entries. Also, for further information, it is php 5.1.2 using the Suse rpm. On 5/31/07 5:14 PM, in article [EMAIL PROTECTED], Jochem Maas [EMAIL PROTECTED] wrote: Clark Alexander wrote: We have the following

Re: [PHP] Error logging

2007-05-31 Thread Clark Alexander
Upon review, I also discover that fatal error entries are being made as well. On 5/31/07 5:14 PM, in article [EMAIL PROTECTED], Jochem Maas [EMAIL PROTECTED] wrote: Clark Alexander wrote: We have the following php.ini settings: error_reporting = E_ALL display_errors = Off

Re: [PHP] Error logging

2007-05-31 Thread Richard Lynch
On Thu, May 31, 2007 3:25 pm, Clark Alexander wrote: We have the following php.ini settings: error_reporting = E_ALL display_errors = Off display_startup_errors = Off log_errors = On log_errors_max_len = 1024 ignore_repeated_errors = Off ignore_repeated_source = Off report_memleaks = On

Re: [PHP] How do YOU initialize the form variables?

2007-05-31 Thread Richard Lynch
On Thu, May 31, 2007 12:57 pm, [EMAIL PROTECTED] wrote: username lastname mobile .. and so on ... Example simple initialization: // POST $username = $_POST['username']; $lastname = $_POST['lastname']; $mobile = $_POST['mobile']; I personally go with: ?php $username =

Re: [PHP] Attempting to search a MySQL database from PHP not working

2007-05-31 Thread Richard Lynch
On Thu, May 31, 2007 2:25 pm, Jason Pruim wrote: Hi Everyone, I am attempting to setup a search field on a database application I'm dinking around with and running into problems that I'm hoping someone might be able to shed some light on. Here is the code I am using to display the results

Re: [PHP] ini_set() security question

2007-05-31 Thread Richard Lynch
File a bug report then, and see what happens... But you may want to test with most recent versions if you are not already on current PHP versions. On Thu, May 31, 2007 2:46 pm, Samuel Vogel wrote: There is no bug filed for this. There is only one older bug (

Re: [PHP] 500 server error

2007-05-31 Thread Richard Lynch
On Thu, May 31, 2007 2:10 pm, blueboy wrote: my .htacces file only contains 2 lines allowoverride all php_flag display_errors on I get a 500 server error, any ideas? Check Apache error_log to be sure, and ask on Apache mailing list... But I will point out that: The purpose of

Re: [PHP] Removing PHPSESSID - CGI Install

2007-05-31 Thread Richard Lynch
On Thu, May 31, 2007 5:55 am, Shaun wrote: I have PHP installed as a CGI module on my server. I want to stop PHPSESSID from appearing in the URL when a users cookies are turned for just one account. My hosting company says that this is impossible - they would have to change php.ini and that

Re: [PHP] uploading really big files

2007-05-31 Thread Richard Lynch
On Thu, May 31, 2007 5:07 am, Angelo Zanetti wrote: thanks for the replies. But how does a site like: http://www.yousendit.com/ do the upload of really huge files? Normal upload? I guess they've already worked through all the issues, assuming their service actually works... Or, perhaps, they

Re: [PHP] local v remote

2007-05-31 Thread Richard Lynch
On Thu, May 31, 2007 4:50 am, blueboy wrote: On my localhost this works fine $result= mysql_query(SELECT date_format(date, '%d/%m/%Y') as date, title, id, display FROM NEWS); while ($row = mysql_fetch_assoc($result)) { but on my remote i get a mysql_fetch_assoc(): supplied argument is not

Re: [PHP] Re: local v remote

2007-05-31 Thread Richard Lynch
On Thu, May 31, 2007 8:07 am, M. Sokolewicz wrote: In case you didn't know, 99% of code on this planet using mysql_query does not supply the secondary argument as most code-bases don't use 1 connection in the same script. That does not make it a Good Practice... I spent days fixing somebody

Re: [PHP] Streaming download to IE doesn't work

2007-05-31 Thread Richard Lynch
On Wed, May 30, 2007 9:16 pm, Daniel Kasak wrote: On Wed, 2007-05-30 at 13:40 -0500, Richard Lynch wrote: On Tue, May 29, 2007 6:37 pm, Daniel Kasak wrote: Actually, that blog had absolutely nothing to do with my problem ( thanks for RTFP!). Not only that, but the recommendation that I

Re: [PHP] using mysql_escape_string with implode() !!

2007-05-31 Thread Richard Lynch
On Wed, May 30, 2007 9:55 pm, Jim Lucas wrote: Greg Donald wrote: On 5/30/07, Richard Lynch [EMAIL PROTECTED] wrote: You want to use mysql_escape_string, and NOT addslashes and NOT Magic Quotes. function slashes( $var ) { if( is_array( $var ) ) { return array_map( 'slashes', $var

Re: [PHP] exec dont work for svn

2007-05-31 Thread Richard Lynch
On Wed, May 30, 2007 4:30 pm, Manolet Gmail wrote: 2007/5/30, Richard Lynch [EMAIL PROTECTED]: On Tue, May 29, 2007 10:44 am, Manolet Gmail wrote: 2007/5/28, Greg Donald [EMAIL PROTECTED]: On 5/28/07, Manolet Gmail [EMAIL PROTECTED] wrote: but this doesnt work: exec(svn

Re: [PHP] preg_match() returns false but no documentation why

2007-05-31 Thread Richard Lynch
On Wed, May 30, 2007 4:25 pm, Jared Farrish wrote: On 5/30/07, Richard Lynch [EMAIL PROTECTED] wrote: If you can't find them documented, print them out: echo PREG_NO_ERROR: ', PREG_NO_ERROR, '; Doh! PREG_NO_ERROR: 0 PREG_INTERNAL_ERROR: 1 PREG_BACKTRACK_LIMIT_ERROR: 2

Re: [PHP] preg_match() returns false but no documentation why

2007-05-31 Thread Richard Lynch
On Wed, May 30, 2007 5:04 pm, Jim Lucas wrote: btw: why is there a period in the second pattern? Also, why are you allowing for uppercase letters when the RFC's don't allow them? LDAP URL domain can't be ALL CAPS?! Last I heard, domain names were case-insensitive in every other URL... --

Re: [PHP] Re: Re: Re: Re: preg_match() returns false but no documentation why

2007-05-31 Thread Richard Lynch
On Thu, May 31, 2007 7:26 am, Jared Farrish wrote: That's what the 'period' is called in British English. http://google.ca/search?q=define%3Afull+stop In English syntax period and full stop are synonymous, and the RegEx manual is throwing dot into the same bag. That's very confusing to call

Re: [PHP] Re: find (matching) person in other table

2007-05-31 Thread Richard Lynch
MySQL doesn't let you use the calculated values (score) in the where clause. PostgreSQL does, as I recall. Sorry. You may be able to get around that with: Do a GROUP BY on something unique, so the GROUP BY is pointless, but then you can use HAVING score 0 Use a sub-query in MySQL 4.mumble or

Re: [PHP] using mysql_escape_string with implode() !!

2007-05-31 Thread Jim Lucas
Richard Lynch wrote: On Wed, May 30, 2007 9:55 pm, Jim Lucas wrote: Greg Donald wrote: On 5/30/07, Richard Lynch [EMAIL PROTECTED] wrote: You want to use mysql_escape_string, and NOT addslashes and NOT Magic Quotes. function slashes( $var ) { if( is_array( $var ) ) { return array_map(

RE: [PHP] Re: find (matching) person in other table

2007-05-31 Thread Daevid Vincent
Jumping in late so forgive if I'm mistaken, but can't you just use HAVING in place of WHERE select member_id, first_name, last_name, email, ..., (5*(first_name='$first_name) + 2*(first_name='$first_name')) as score from members HAVING score 0 -Original Message- From:

Re: [PHP] Re: Re: Re: Re: preg_match() returns false but no documentation why

2007-05-31 Thread Stut
Richard Lynch wrote: On Thu, May 31, 2007 7:26 am, Jared Farrish wrote: That's what the 'period' is called in British English. http://google.ca/search?q=define%3Afull+stop In English syntax period and full stop are synonymous, and the RegEx manual is throwing dot into the same bag. That's

Re: [PHP] How do YOU initialize the form variables?

2007-05-31 Thread Richard Lynch
On Thu, May 31, 2007 5:39 pm, [EMAIL PROTECTED] wrote: Thank you. Will use of your initialization method protect one from sql injection? It isn't clear from reading this: http://ca.php.net/htmlentities ??? htmlentities has absolutely ZERO protection against SQL Injection. None. Nada.

Re: [PHP] ZIP it :o)

2007-05-31 Thread Stut
Auto-Deppe, C. Haensel wrote: I have been trying to find an easy to use way to zip an archive on a linux box running PHP5. Now I've tried the zip-lib.php and others, but they always throw an error msg But that is not the question. I am looking to use exec(zip archive.zip $directory);

Re: [PHP] ZIP it :o)

2007-05-31 Thread Jim Lucas
Auto-Deppe, C. Haensel wrote: Morning guys, I have been trying to find an easy to use way to zip an archive on a linux box running PHP5. Now I've tried the zip-lib.php and others, but they always throw an error msg But that is not the question. I am looking to use exec(zip archive.zip

Re: [PHP] ZIP it :o)

2007-05-31 Thread Chris
Auto-Deppe, C. Haensel wrote: Morning guys, I have been trying to find an easy to use way to zip an archive on a linux box running PHP5. Now I've tried the zip-lib.php and others, but they always throw an error msg But that is not the question. I am looking to use exec(zip archive.zip

[PHP] ZIP it :o)

2007-05-31 Thread Auto-Deppe, C. Haensel
Morning guys, I have been trying to find an easy to use way to zip an archive on a linux box running PHP5. Now I've tried the zip-lib.php and others, but they always throw an error msg But that is not the question. I am looking to use exec(zip archive.zip $directory); $directory has been