php-general Digest 7 Aug 2006 08:31:27 -0000 Issue 4279

2006-08-07 Thread php-general-digest-help
php-general Digest 7 Aug 2006 08:31:27 - Issue 4279 Topics (messages 240203 through 240219): Re: Using preg_match to find Japanese text 240203 by: MOKULEN_IMADICA Re: PHP Frameworks - Opinion 240204 by: Martin Alterisio Re: OT promotion candidates needed 240205

[PHP] looking for a short/simple kind of app...

2006-08-07 Thread bruce
hi... i'm looking for a short/simple kind of app to allow me to play around with some different tbls.. basically.. i have a couple of tbls where i have a top level tbls, and a few subordinate child tbls parent child child i'd like to be able to add/modify/delete items from the various

Re: [PHP] Newbie Form Question

2006-08-07 Thread David Dorward
Richard Lynch wrote: ?php if (isset($_REQUEST['email'])){ $success = mail($_REQUEST['action'], 'un/subscribe', 'un/subscribe', From: $_REQUEST[email]\r\nReply-to: $_REQUEST[email]); if ($success) echo Status Change Sent; else echo Unable to send Status Change; } ? What

[PHP] How to install PHP 4 on Apache 2.2

2006-08-07 Thread Ko Ko
Hi, I have Apache 2.2 and PHP 5 on Fedora 5. And since I am writing a lot of my php code which is only compatible with PHP 4 I remove the PHP 5 rpm and installed the PHP 4. But I notice that Apache 2.2 doesn't recognize PHP 4 right away. I can't find out on the net how to tweak the system

Re: [PHP] Image list performance ISSUE

2006-08-07 Thread Andy
Sorry for the late answer, I have different applications and the users are kept in DB so I cannot make for every user a directory. I made a solution with .htaccess from apache and redirection to a php script that outputs the image if the user has rights to the images. I will still have to

Re: [PHP] Image list performance ISSUE

2006-08-07 Thread Chris
Andy wrote: Sorry for the late answer, I have different applications and the users are kept in DB so I cannot make for every user a directory. I made a solution with .htaccess from apache and redirection to a php script that outputs the image if the user has rights to the images. I will

[PHP] shebang line drive me nuts.

2006-08-07 Thread Jochem Maas
I have a php shell script (the execute bit of the file is set) of which the first line is this: #!/usr/lib/php5/bin/php -q or this: #!/usr/bin/php -q or this: #!php -q in all cases I get the following error when I run (as root) the script: -bash: ./makemicrositeml: /usr/lib/php5/bin/php:

Re: [PHP] How to install PHP 4 on Apache 2.2

2006-08-07 Thread Chris
Ko Ko wrote: Hi, I have Apache 2.2 and PHP 5 on Fedora 5. And since I am writing a lot of my php code which is only compatible with PHP 4 I remove the PHP 5 rpm and installed the PHP 4. But I notice that Apache 2.2 doesn't recognize PHP 4 right away. I can't find out on the net how to

Re: [PHP] shebang line drive me nuts.

2006-08-07 Thread Robert Cummings
On Mon, 2006-08-07 at 09:59 +0200, Jochem Maas wrote: I have a php shell script (the execute bit of the file is set) of which the first line is this: #!/usr/lib/php5/bin/php -q or this: #!/usr/bin/php -q or this: #!php -q in all cases I get the following error when I run (as

Re: [PHP] shebang line drive me nuts.

2006-08-07 Thread Jochem Maas
hi Chris, Chris wrote: Jochem Maas wrote: I have a php shell script (the execute bit of the file is set) of which the first line is this: #!/usr/lib/php5/bin/php -q or this: #!/usr/bin/php -q or this: #!php -q in all cases I get the following error when I run (as root) the script:

Re: [PHP] shebang line drive me nuts.

2006-08-07 Thread Stut
Jochem Maas wrote: I have a php shell script (the execute bit of the file is set) of which the first line is this: #!/usr/lib/php5/bin/php -q or this: #!/usr/bin/php -q or this: #!php -q in all cases I get the following error when I run (as root) the script: -bash: ./makemicrositeml:

Re: [PHP] shebang line drive me nuts.

2006-08-07 Thread Jochem Maas
hi Stut, I wish it was the line endings - I checked and they where unix-style. I do edit on windows normally (unless it's some rush fix and then I'll use vi or nano) but I have the line-endings set to unix. vi gave no sign of a ^M and I rewrote the shebang there just to be safe. alas no joy.

Re: [PHP] shebang line drive me nuts.

2006-08-07 Thread Chris
Jochem Maas wrote: I have a php shell script (the execute bit of the file is set) of which the first line is this: #!/usr/lib/php5/bin/php -q or this: #!/usr/bin/php -q or this: #!php -q in all cases I get the following error when I run (as root) the script: -bash: ./makemicrositeml:

Re: [PHP] shebang line drive me nuts.

2006-08-07 Thread Jochem Maas
hi Robert, thanks for thinking with me Robert Cummings wrote: On Mon, 2006-08-07 at 09:59 +0200, Jochem Maas wrote: I have a php shell script (the execute bit of the file is set) of which the first line is this: #!/usr/lib/php5/bin/php -q or this: #!/usr/bin/php -q or this:

Re: [PHP] shebang line drive me nuts.

2006-08-07 Thread Jochem Maas
Robert Cummings wrote: On Mon, 2006-08-07 at 09:59 +0200, Jochem Maas wrote: I have a php shell script (the execute bit of the file is set) of which the first line is this: #!/usr/lib/php5/bin/php -q or this: #!/usr/bin/php -q or this: #!php -q in all cases I get the following

Re: [PHP] Image list performance ISSUE

2006-08-07 Thread Andy
Thanks for the answers. I will launch anyway this solution, it is more secure for us... I will monitor the server to see if it can handle the load. Regards, Andy. - Original Message - From: Chris [EMAIL PROTECTED] To: Andy [EMAIL PROTECTED] Cc: WeberSites LTD [EMAIL PROTECTED];

Re: [PHP] shebang line drive me nuts.

2006-08-07 Thread Chris
Jochem Maas wrote: Robert Cummings wrote: On Mon, 2006-08-07 at 09:59 +0200, Jochem Maas wrote: I have a php shell script (the execute bit of the file is set) of which the first line is this: #!/usr/lib/php5/bin/php -q or this: #!/usr/bin/php -q or this: #!php -q in all cases I get the

Re: [PHP] shebang line drive me nuts.

2006-08-07 Thread Jochem Maas
Chris wrote: Jochem Maas wrote: Robert Cummings wrote: On Mon, 2006-08-07 at 09:59 +0200, Jochem Maas wrote: I have a php shell script (the execute bit of the file is set) of which the first line is this: #!/usr/lib/php5/bin/php -q or this: #!/usr/bin/php -q or this: #!php -q in

Re: [PHP] shebang line drive me nuts.

2006-08-07 Thread Sameer N Ingole
Jochem Maas wrote: I have a php shell script (the execute bit of the file is set) of which the first line is this: #!/usr/lib/php5/bin/php -q or this: #!/usr/bin/php -q or this: #!php -q in all cases I get the following error when I run (as root) the script: -bash: ./makemicrositeml:

[PHP] Re: shebang line drive me nuts.

2006-08-07 Thread Colin Guthrie
Jochem Maas wrote: in all cases I get the following error when I run (as root) the script: -bash: ./makemicrositeml: /usr/lib/php5/bin/php: bad interpreter: Permission denied Do you have root access on this machine? Perhaps the sysadmin as configured bash to not accept unknown interpreters?

Re: [PHP] shebang line drive me nuts.

2006-08-07 Thread Chris
Jochem Maas wrote: Chris wrote: Jochem Maas wrote: Robert Cummings wrote: On Mon, 2006-08-07 at 09:59 +0200, Jochem Maas wrote: I have a php shell script (the execute bit of the file is set) of which the first line is this: #!/usr/lib/php5/bin/php -q or this: #!/usr/bin/php -q or this:

Re: [PHP] shebang line drive me nuts.

2006-08-07 Thread Duncan Hill
On Monday 07 August 2006 09:11, Jochem Maas wrote: hi Robert, thanks for thinking with me If the FS permissions to the binary are correct, odds are the file system is actually mounted noexec. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP] shebang line drive me nuts.

2006-08-07 Thread Stut
Jochem Maas wrote: I wish it was the line endings - I checked and they where unix-style. I do edit on windows normally (unless it's some rush fix and then I'll use vi or nano) but I have the line-endings set to unix. vi gave no sign of a ^M and I rewrote the shebang there just to be safe. alas

[PHP] Ru locale + UTF-8

2006-08-07 Thread Tony Aldrich
Good day, I try to set ru locale that is converted to UTF-8 in output. I tried ru_ru.UTF-8 - with no results. ru returns week and month names in win-1251. What I missed? Apache/2.0.55 Win32 PHP/5.1.2 Tony. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

[PHP] [Solved] Re: [PHP] shebang line drive me nuts.

2006-08-07 Thread Jochem Maas
hi Duncan, the disk the home dirs are situated on (where the script was living) was indeed mounted as noexec. THANK YOU for saving me hours of mental torture (and teaching me something in the process), thanks to everyone else for giving their time/energy. kind regards, Jochem Duncan Hill

Re: [PHP] Image list performance ISSUE

2006-08-07 Thread David Tulloh
Andy wrote: ... I want to know... is this a big performance issue or not(the image is handled by php and not by apache directly) OR... Is there any other way to handle this situation??? Thanx, Andy. I'd recomend doing a bit of benchmarking to figure out if the performance hit is

[PHP] Re: looking for a short/simple kind of app...

2006-08-07 Thread David Robley
bruce wrote: hi... i'm looking for a short/simple kind of app to allow me to play around with some different tbls.. basically.. i have a couple of tbls where i have a top level tbls, and a few subordinate child tbls parent child child i'd like to be able to

[PHP] PDO and PGSQL: ERROR: syntax error at or near SET

2006-08-07 Thread Erik Gyepes
Hi all! I'm trying to learn using PDO and PostgreSQL together a little bit and I have some problems with (I thinks, auto incrementing fields) I have the following sample DB: CREATE TABLE users ( uid SERIAL UNIQUE NOT NULL, login TEXT NOT NULL, password TEXT NOT NULL, PRIMARY KEY (uid) ); and

[PHP] saving and retrieving an array from a database

2006-08-07 Thread Ross
Hi, I have an array of values. I want to save them with php to a single field in my database and then retrieve them to an array. What is the simplest way to achive this? Ross -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] yahoo thinks html mail is spam, what's wrong with header?

2006-08-07 Thread blackwater dev
Hello all, When I try to send email from my server as html, my yahoo account and several of my user's email accounts mark it as spam. I can send a normal email via mail() just fine but when I try to to html, it's bad. I've played with a few things but can't seem to figure it out. The html I

RE: [PHP] saving and retrieving an array from a database

2006-08-07 Thread Jim Moseby
Hi, I have an array of values. I want to save them with php to a single field in my database and then retrieve them to an array. What is the simplest way to achive this? http://us3.php.net/serialize Cheers! JM -- PHP General Mailing List (http://www.php.net/) To

Re: [PHP] saving and retrieving an array from a database

2006-08-07 Thread ross
ok this seem to work but how do I bring it back? This is what I have so far. ? $first[] = array('appple', 'pear', 'banana'); $second = serialize($first); $third[]= unserialize($second); echo $second; //outputs serialized data echo $third[1]; ? - Original Message - From: Peter Lauri

Re: [PHP] saving and retrieving an array from a database

2006-08-07 Thread Andrei
Well it seems like u made a mess there with arrays... ? $first[] = array('appple', 'pear', 'banana'); $second = serialize($first); $third[]= unserialize($second); echo $second; //outputs serialized data echo $third[1]; ? From definition of first I understand it's an array of arrays with

RE: [PHP] saving and retrieving an array from a database

2006-08-07 Thread Peter Lauri
http://se2.php.net/serialize /Peter -Original Message- From: Ross [mailto:[EMAIL PROTECTED] Sent: Monday, August 07, 2006 7:19 PM To: php-general@lists.php.net Subject: [PHP] saving and retrieving an array from a database Hi, I have an array of values. I want to save them with php to

[PHP] Declaring variables from the url

2006-08-07 Thread Dave M G
PHP list, I have many times set the value of a variable by declaring it in the URL, like so: http://www.domain.com/index.php?var=1 And then, to use the variable, all I have to do is use it in the script, like so: echo This is the value of the variable: . $var; But, for some reason, in a

RE: [PHP] Declaring variables from the url

2006-08-07 Thread Jay Blanchard
[snip] http://www.domain.com/index.php?var=1 And then, to use the variable, all I have to do is use it in the script, like so: echo This is the value of the variable: . $var; [/snip] echo $_GET['var']; -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

RE: [PHP] Declaring variables from the url

2006-08-07 Thread Jim Moseby
PHP list, I have many times set the value of a variable by declaring it in the URL, like so: http://www.domain.com/index.php?var=1 And then, to use the variable, all I have to do is use it in the script, like so: echo This is the value of the variable: . $var; But, for some

[PHP] php and printing

2006-08-07 Thread Jef Sullivan
Greetings to everyone, I have been able to program the capability of printing several end-of-month statements at the click of a button using php. The problem I am faced with is when one of these statements has more than one page. Management would like to have the second page have a header

Re: [PHP] Declaring variables from the url

2006-08-07 Thread Andrei
Also check in php.ini register_globals to be On if you want to have vars directly available in the script... Andy Jay Blanchard wrote: [snip] http://www.domain.com/index.php?var=1 And then, to use the variable, all I have to do is use it in the script, like so: echo This is

RE: [PHP] php and printing

2006-08-07 Thread Peter Lauri
You can generate a PDF with fpdf and then print that. -Original Message- From: Jef Sullivan [mailto:[EMAIL PROTECTED] Sent: Monday, August 07, 2006 8:50 PM To: php-general@lists.php.net Subject: [PHP] php and printing Greetings to everyone, I have been able to program the capability

Re: [PHP] PDO and PGSQL: ERROR: syntax error at or near SET

2006-08-07 Thread David Tulloh
Erik Gyepes wrote: ... $query = INSERT INTO users SET uid = :uid, login = :login, password = :password; ... When running the script I get the following error message: Error!: SQLSTATE[42601]: Syntax error: 7 ERROR: syntax error at or near SET at character 19 The INSERT INTO ... SET

[PHP] Re: yahoo thinks html mail is spam, what's wrong with header?

2006-08-07 Thread Colin Guthrie
blackwater dev wrote: Hello all, When I try to send email from my server as html, my yahoo account and several of my user's email accounts mark it as spam. I can send a normal email via mail() just fine but when I try to to html, it's bad. I've played with a few things but can't seem to

Re: [PHP] design?

2006-08-07 Thread Sjef
Thanks, John. It's probably also a matter of how you name the classes. It needs to be a clear name that describes what it 'is'. Hence, the depot name. Anyway, indeed I have finished the concept of the app. Sjef John Wells [EMAIL PROTECTED] schreef in bericht news:[EMAIL PROTECTED] On 6/30/06,

[PHP] Is this really a pdf?

2006-08-07 Thread Sjef
Is it possible to recognize if a file for upload really is a pdf (like the function getimagesize retuns the file type of the image)? Thanxs, Sjef -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] yahoo thinks html mail is spam, what's wrong with header?

2006-08-07 Thread Austin Denyer
blackwater dev wrote: Hello all, When I try to send email from my server as html, my yahoo account and several of my user's email accounts mark it as spam. I can send a normal email via mail() just fine but when I try to to html, it's bad. I've played with a few things but can't seem to

[PHP] Re: saving and retrieving an array from a database

2006-08-07 Thread Colin Guthrie
[EMAIL PROTECTED] wrote: ok this seem to work but how do I bring it back? This is what I have so far. ? $first[] = array('appple', 'pear', 'banana'); $second = serialize($first); $third[]= unserialize($second); echo $second; //outputs serialized data echo $third[1]; ? I think you

[PHP] Re: Is this really a pdf?

2006-08-07 Thread Barry
Sjef schrieb: Is it possible to recognize if a file for upload really is a pdf (like the function getimagesize retuns the file type of the image)? Thanxs, Sjef this might help http://de3.php.net/manual/en/function.mime-content-type.php -- Smileys rule (cX.x)C --o(^_^o) Dance for me! ^(^_^)o

[PHP] How to get rid off empty elements of an array?

2006-08-07 Thread afan
Hi to all! I have a form with 6 text fields where visitor has to enter product serial number (same type data). he has to enter AT LEAST ONE. for ($i=0; $i6; $i++) { echo 'input type=text name=PSN['.$i.'] value='.$PSN[$i].' size=25'; } After the form is submitted I'm getting an array Array

Re: [PHP] Is this really a pdf?

2006-08-07 Thread Ed Curtis
On Mon, 7 Aug 2006, Sjef wrote: Is it possible to recognize if a file for upload really is a pdf (like the function getimagesize retuns the file type of the image)? Thanxs, Sjef Yes it is. $_FILES['{form_field_name}']['type'] is your friend here. Just match it against a mime type your

[PHP] Re: Is this really a pdf?

2006-08-07 Thread Colin Guthrie
Sjef wrote: Is it possible to recognize if a file for upload really is a pdf (like the function getimagesize retuns the file type of the image)? If you have a suitible mime.magic file, and your PHP has the functionality built into it, you could try the mime_content_type() function.

[PHP] SOLVED (spelling error) - Re: [PHP] How to get rid off empty elements of an array?

2006-08-07 Thread afan
Sorry for this. Spelling error. :( -afan Hi to all! I have a form with 6 text fields where visitor has to enter product serial number (same type data). he has to enter AT LEAST ONE. for ($i=0; $i6; $i++) { echo 'input type=text name=PSN['.$i.'] value='.$PSN[$i].' size=25'; }

Re: [PHP] POST on redirects?

2006-08-07 Thread Chris Shiflett
Adam Zey wrote: function make_post($message) { $headers .= POST /foo.php HTTP/1.1\r\n; $headers .= Host: bar.com\r\n; $headers .= Content-Type: application/octet-stream\r\n; $headers .= Connection: keep-alive\r\n; $headers .= Content-Length: . strlen($message) . \r\n;

Re: [PHP] POST on redirects?

2006-08-07 Thread Chris Shiflett
Adam Zey wrote: $headers .= Content-Type: application/octet-stream\r\n; I missed the context of this function, but it seems like you probably mean to send: Content-Type: application/x-www-form-urlencoded Chris -- Chris Shiflett Principal, OmniTI http://omniti.com/ -- PHP General Mailing

[PHP] session array

2006-08-07 Thread Ross
I am creating an array of sessions $_SESSION['results'][] There may be up to 7 and I need to know why do I always get the notice'Undefined index: results in...'? How do I define or initialise the array if it only gets set once the form has been posted (an answer has been given) on the page.

Re: [PHP] POST on redirects?

2006-08-07 Thread Adam Zey
Chris Shiflett wrote: Adam Zey wrote: $headers .= Content-Type: application/octet-stream\r\n; I missed the context of this function, but it seems like you probably mean to send: Content-Type: application/x-www-form-urlencoded Chris The context is a bit strange, these POST

Re: [PHP] session array

2006-08-07 Thread Stut
Ross wrote: I am creating an array of sessions $_SESSION['results'][] There may be up to 7 and I need to know why do I always get the notice'Undefined index: results in...'? How do I define or initialise the array if it only gets set once the form has been posted (an answer has been

Re: [PHP] Re: Is this really a pdf?

2006-08-07 Thread Rory Browne
On 8/7/06, Colin Guthrie [EMAIL PROTECTED] wrote: Sjef wrote: Is it possible to recognize if a file for upload really is a pdf (like the function getimagesize retuns the file type of the image)? If you have a suitible mime.magic file, and your PHP has the functionality built into it, you

[PHP] Re: Declaring variables from the url

2006-08-07 Thread Adam Zey
Dave M G wrote: PHP list, I have many times set the value of a variable by declaring it in the URL, like so: http://www.domain.com/index.php?var=1 And then, to use the variable, all I have to do is use it in the script, like so: echo This is the value of the variable: . $var; But, for

[PHP] session arrays

2006-08-07 Thread Ross
I am creating an array of sessions $_SESSION['results'][] There may be up to 7 and I need to know why do I always get the notice'Undefined index: results in...'? How do I define or initialise the array if it only gets set once the form has been posted (an answer has been given) on the page.

Re: [PHP] How to get rid off empty elements of an array?

2006-08-07 Thread John Wells
Check the 5th and 6th fields. Something is in one of them. Because based on your checks, it will work: [php] $first_array = array( 'first', 'second', 'third', '', '', ''); foreach ($first_array as $value) { if (!empty($value))$second_array[] = $value; }

[PHP] Re: Is this really a pdf?

2006-08-07 Thread Colin Guthrie
Rory Browne wrote: http://uk.php.net/manual/en/function.mime-content-type.php Is this to protect against somebody trying to pass an mp3 off as a PDF, or to stop people mistakenly uploading PDF's. If it's the latter, then mime functions are probably okay. If the former, then you may want

Re: [PHP] How to get rid off empty elements of an array?

2006-08-07 Thread Martin Alterisio
2006/8/7, [EMAIL PROTECTED] [EMAIL PROTECTED]: Hi to all! I have a form with 6 text fields where visitor has to enter product serial number (same type data). he has to enter AT LEAST ONE. for ($i=0; $i6; $i++) { echo 'input type=text name=PSN['.$i.'] value='.$PSN[$i].' size=25'; } After

Re: [PHP] session array

2006-08-07 Thread Jochem Maas
Ross wrote: I am creating an array of sessions $_SESSION['results'][] always call session_start() before using $_SESSION There may be up to 7 and I need to know why do I always get the notice'Undefined index: results in...'? How do I define or initialise the array if it only gets

[PHP] stupid question...compiling php

2006-08-07 Thread blackwater dev
Ok, I am using a hosted server and php is installed from the linux distro. I usually have all the stuff in a php file somewhere so I can just go back ./configure, etc. I can't seem to find the configure for php on this box so I can recompile but I know it is there as I can use php and see the

Re: [PHP] stupid question...compiling php

2006-08-07 Thread Jochem Maas
blackwater dev wrote: Ok, I am using a hosted server and php is installed from the linux distro. I usually have all the stuff in a php file somewhere so I can just go back ./configure, etc. I can't seem to find the configure for php on this box so I can recompile but I know it is there

Re: [PHP] stupid question...compiling php

2006-08-07 Thread blackwater dev
Ok, doing that now and it's taking a while. I can do phpinfo but that tells me the config line and where the ini files are, not necessarily where the configure stuff is to recompile...correct? On 8/7/06, Jochem Maas [EMAIL PROTECTED] wrote: blackwater dev wrote: Ok, I am using a hosted

Re: [PHP] stupid question...compiling php

2006-08-07 Thread Jochem Maas
blackwater dev wrote: Ok, doing that now and it's taking a while. it might take forever. I made a thinko, it should have been: php -i | grep configure (it should be pretty much instantaneous) I can do phpinfo but that tells me the config line and where the ini files are, not necessarily

[PHP] php/ajax..

2006-08-07 Thread bruce
hi.. will php allow a user to enter field on a form, and compute aresult based on the field, without having to reload the entire form, or will i need ajax... any good examples on how to accomplish this.. thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

RE: [PHP] php/ajax..

2006-08-07 Thread Jay Blanchard
[snip] will php allow a user to enter field on a form, and compute aresult based on the field, without having to reload the entire form, or will i need ajax... [/snip] You will only need JavaScript. Remember, JavaScript is client-side, PHP is server-side. -- PHP General Mailing List

Re: [PHP] php/ajax..

2006-08-07 Thread Robert Cummings
On Mon, 2006-08-07 at 12:11 -0700, bruce wrote: hi.. will php allow a user to enter field on a form, and compute aresult based on the field, without having to reload the entire form, or will i need ajax... any good examples on how to accomplish this.. You have 150 posts since February 5th

Re: [PHP] php/ajax..

2006-08-07 Thread Mariano Guadagnini
bruce wrote: hi.. will php allow a user to enter field on a form, and compute aresult based on the field, without having to reload the entire form, or will i need ajax... any good examples on how to accomplish this.. thanks PHP is executed on the server, so you cannot campute something

RE: [PHP] php/ajax..

2006-08-07 Thread Peter Lauri
Robert, have you studied Neuron Networks? -Original Message- From: Robert Cummings [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 08, 2006 2:16 AM To: [EMAIL PROTECTED] Cc: php-general@lists.php.net Subject: Re: [PHP] php/ajax.. On Mon, 2006-08-07 at 12:11 -0700, bruce wrote: hi..

[PHP] Re: php/ajax..

2006-08-07 Thread Adam Zey
bruce wrote: hi.. will php allow a user to enter field on a form, and compute aresult based on the field, without having to reload the entire form, or will i need ajax... any good examples on how to accomplish this.. thanks PHP is a server-side language. Javascript is a client-side

RE: [PHP] php/ajax..

2006-08-07 Thread Robert Cummings
On Mon, 2006-08-07 at 21:15 +0700, Peter Lauri wrote: Robert, have you studied Neuron Networks? I've touched on them. Though I'm sure we both know to which kind of neuron I was referring :) Cheers, Rob. -Original Message- From: Robert Cummings [mailto:[EMAIL PROTECTED] Sent:

RE: [PHP] Re: php/ajax..

2006-08-07 Thread bruce
thanks for the reply... that's pretty much what i had read/found out.. 'ppreciate it.. -Original Message- From: Adam Zey [mailto:[EMAIL PROTECTED] Sent: Monday, August 07, 2006 12:04 PM To: [EMAIL PROTECTED] Cc: php-general@lists.php.net Subject: [PHP] Re: php/ajax.. bruce wrote:

Re: [PHP] Image list performance ISSUE

2006-08-07 Thread Richard Lynch
On Mon, August 7, 2006 2:44 am, Andy wrote: The performance Issue that I asked was: Is there a difference if apache sends the image or If I output it with php with readfile. Yes. How much of a difference it makes depends on YOUR hardware. Test it and see is the only sensible answer we can

Re: [PHP] Newbie Form Question

2006-08-07 Thread Richard Lynch
On Mon, August 7, 2006 2:37 am, David Dorward wrote: Richard Lynch wrote: ?php switch($_REQUEST['email']){ case '[EMAIL PROTECTED]': case '[EMAIL PROTECTED]': //Do nothing. break; default: die(Hack attempt.); break; } if (isset($_REQUEST['email'])){ $success =

Re: [PHP] client-server upload communication?

2006-08-07 Thread Richard Lynch
On Sun, August 6, 2006 9:56 am, tedd wrote: I posted this question on a js list, but didn't received an answer. Maybe someone here might be able to provide some insight or direction. In my ajax experiment monitoring states, namely: http://xn--ovg.com/ajax_readystate I can see the

Re: [PHP] Using preg_match to find Japanese text

2006-08-07 Thread Richard Lynch
On Sat, August 5, 2006 9:06 pm, Dave M G wrote: While I'm only just learning about regular expressions in another thread, I still seem to be finding exceptional situations which have me questioning the extent to which preg expressions can be implemented. (The following contains UTF-8 encoded

Re: [PHP] Newbie Form Question

2006-08-07 Thread Andrew Kreps
Better yet, don't allow the user to enter a From address. Simply give them subscribe and unsubscribe radio buttons, and make sure the un/subscribe-ee gets a confirmation email. And certainly check your input fields for newlines. :) On 8/7/06, Richard Lynch [EMAIL PROTECTED] wrote: On Mon,

Re: [PHP] Sending data to persistent process stdin

2006-08-07 Thread Richard Lynch
On Sat, August 5, 2006 8:08 am, Ville Mattila wrote: I have been thinking of making a simple web-based interface to control my media center box (running debian linux). Being a bit enthustiatic, I thought I could use some generic tools for playing media files and write the whole UI by my own.

Re: [PHP] stupid question...compiling php

2006-08-07 Thread Andrew Kreps
I'll bet your hosting environment has not installed the php sources. If the server is shared with other clients, you'll probably need to download the source and compile php in your user space and run it as a CGI (if your host allows this configuration). Hopefully they have some allowances for

Re: [PHP] Is this really a pdf?

2006-08-07 Thread Richard Lynch
On Mon, August 7, 2006 9:08 am, Sjef wrote: Is it possible to recognize if a file for upload really is a pdf (like the function getimagesize retuns the file type of the image)? It should be noted that getimagesize is also not fool-proof for the same reasons as the PDF first-4 bytes == '%PDF'

Re: [PHP] Is this really a pdf?

2006-08-07 Thread Richard Lynch
On Mon, August 7, 2006 10:04 am, Ed Curtis wrote: On Mon, 7 Aug 2006, Sjef wrote: Is it possible to recognize if a file for upload really is a pdf (like the function getimagesize retuns the file type of the image)? Thanxs, Sjef Yes it is. $_FILES['{form_field_name}']['type'] is your

Re: [PHP] Declaring variables from the url

2006-08-07 Thread Richard Lynch
On Mon, August 7, 2006 8:13 am, Dave M G wrote: I have many times set the value of a variable by declaring it in the URL, like so: http://www.domain.com/index.php?var=1 And then, to use the variable, all I have to do is use it in the script, like so: echo This is the value of the

[PHP] Mixing sprintf and mysql_real_escape_string

2006-08-07 Thread Peter Lauri
Hi, I get strange output if I combine sprintf and mysql_real_escape_string. If I do this the resulting into the database is \' not ' as I want. mysql_query(sprintf(INSERT INTO table (value1, value2) VALUES (1, '%s'), mysql_real_escape_string( ' ))); Should this be like this? Do the sprintf

Re: [PHP] saving and retrieving an array from a database

2006-08-07 Thread Richard Lynch
On Mon, August 7, 2006 7:52 am, [EMAIL PROTECTED] wrote: ok this seem to work but how do I bring it back? This is what I have so far. ? $first[] = array('appple', 'pear', 'banana'); $second = serialize($first); Store $second in the DB here. It's just a big long-ass string at this point.

Re: [PHP] PDO and PGSQL: ERROR: syntax error at or near SET

2006-08-07 Thread Richard Lynch
On Mon, August 7, 2006 6:48 am, Erik Gyepes wrote: I'm trying to learn using PDO and PostgreSQL together a little bit and I have some problems with (I thinks, auto incrementing fields) I have the following sample DB: CREATE TABLE users ( uid SERIAL UNIQUE NOT NULL, My PostgreSQL knowledge

[PHP] Re: php/ajax..

2006-08-07 Thread Manuel Lemos
Hello, on 08/07/2006 04:11 PM bruce said the following: will php allow a user to enter field on a form, and compute aresult based on the field, without having to reload the entire form, or will i need ajax... any good examples on how to accomplish this.. You may want to take a look at this

Re: [PHP] yahoo thinks html mail is spam, what's wrong with header?

2006-08-07 Thread Richard Lynch
On Mon, August 7, 2006 7:21 am, blackwater dev wrote: When I try to send email from my server as html, my yahoo account and several of my user's email accounts mark it as spam. I can send a normal email via mail() just fine but when I try to to html, it's bad. Yes. Because most HTML

Re: [PHP] Mixing sprintf and mysql_real_escape_string

2006-08-07 Thread Richard Lynch
On Mon, August 7, 2006 12:35 pm, Peter Lauri wrote: I get strange output if I combine sprintf and mysql_real_escape_string. If I do this the resulting into the database is \' not ' as I want. mysql_query(sprintf(INSERT INTO table (value1, value2) VALUES (1, '%s'), mysql_real_escape_string(

RE: [PHP] Mixing sprintf and mysql_real_escape_string

2006-08-07 Thread Peter Lauri
I should maybe add that the data actually comes from a form: mysql_query(sprintf(INSERT INTO table (value1, value2) VALUES (1, '%s'), mysql_real_escape_string($_POST['formvalue']))); And when I have ' in the field, it will insert \' into the database in pure form. If I do this it will add just '

Re: [PHP] Mixing sprintf and mysql_real_escape_string

2006-08-07 Thread Martin Alterisio
2006/8/7, Peter Lauri [EMAIL PROTECTED]: I should maybe add that the data actually comes from a form: mysql_query(sprintf(INSERT INTO table (value1, value2) VALUES (1, '%s'), mysql_real_escape_string($_POST['formvalue']))); And when I have ' in the field, it will insert \' into the database

RE: [PHP] Mixing sprintf and mysql_real_escape_string

2006-08-07 Thread Peter Lauri
[snip]My guess: magic_quotes_gpc is enabled where you're running the script. Therefore slashes are already present in the data from the form post.[/snip] Should I turn it off? Adding slashes and mysql_real_escape_string is not exactly the same thing, correct? /Peter -- PHP General Mailing List