php-general Digest 8 Aug 2006 09:21:53 - Issue 4281
Topics (messages 240282 through 240301):
Re: Newbie Form Question
240282 by: Richard Lynch
240285 by: Andrew Kreps
Re: client-server upload communication?
240283 by: Richard Lynch
Re: Using preg_match to find
On Monday 07 August 2006 19:39, Peter Lauri wrote:
[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
PHP,
Shouldn't this regular expression select everything from the start of
the string to the first space character:
$firstWord = preg_match('#^*(.*) #iU', $word);
It doesn't, so clearly I'm wrong, but here's why I thought it would:
The enclosing has marks, #, I *think* just encloses the
Dave M G wrote:
PHP,
Shouldn't this regular expression select everything from the start of
the string to the first space character:
$firstWord = preg_match('#^*(.*) #iU', $word);
It doesn't, so clearly I'm wrong, but here's why I thought it would:
The enclosing has marks, #, I
Thanxs very much guys!
I do realize that it is not foolproof, but better than nothing. In my
situation mime_content_type doesn't work, so I will have to settle for the
other method.
Sjef
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
On 08/08/06, Dave M G [EMAIL PROTECTED] wrote:
PHP,
Shouldn't this regular expression select everything from the start of
the string to the first space character:
$firstWord = preg_match('#^*(.*) #iU', $word);
It doesn't, so clearly I'm wrong, but here's why I thought it would:
. stands for
Hi guys,
I'm really stuck with this error and since my backup scripts are no
longer running automatically through cron, I really need to get this
fixed soon :)
Suddenly my backup scripts die with the error Could not startup.. Only
through the cron, it runs fine through the console. I've tried
Dave M G schrieb:
PHP,
Shouldn't this regular expression select everything from the start of
the string to the first space character:
$firstWord = preg_match('#^*(.*) #iU', $word);
It doesn't, so clearly I'm wrong, but here's why I thought it would:
The enclosing has marks, #, I *think*
I want to send variable variables to a function but I cannot seem to get the
syntax correct. This is what I have so far...
function my_function ($$moule_no) {
// do something with $$module_no
}
my_function ($module1)
my_function ($module2)
my_function ($module3)
--
PHP General Mailing
Ross wrote:
I want to send variable variables to a function but I cannot seem to get the
syntax correct. This is what I have so far...
function my_function ($$moule_no) {
// do something with $$module_no
}
my_function ($module1)
my_function ($module2)
my_function
The function needs to be declared without variable variable
Du like this instead:
function my_function($module) {
// do something with $module
}
And then you call the function with the variable variable:
my_function($$module_no);
/Peter
-Original Message-
From: Ross
Ivo F.A.C. Fokkema wrote:
Hi guys,
I'm really stuck with this error and since my backup scripts are no
longer running automatically through cron, I really need to get this
fixed soon :)
Suddenly my backup scripts die with the error Could not startup.. Only
through the cron, it runs fine
Here is the cron command that we use. I've modified the path to the file for
security purposes.
*/5 * * 1-6 lynx -dump http://fully.qualified.path/cron_test.php
-auth=usr:pwd
Jef
-Original Message-
From: John Nichel [mailto:[EMAIL PROTECTED]
Sent: Tuesday, August 08, 2006 7:11 AM
A. I have a page on which people can supply dates in a text area. Dates are
entered like this:
3/01/2005
29/12/2005
2/01/2006
20/02/2006
28/12/2006
1/01/2007
15/02/2007
B. Now I need this Post element to be broken into pieces (per date) and each
of those pieces should be put into a text so the
On Tue, 08 Aug 2006 09:10:53 -0400, John Nichel wrote:
Ivo F.A.C. Fokkema wrote:
Suddenly my backup scripts die with the error Could not startup.. Only
through the cron, it runs fine through the console. I've tried all kinds
of tests with other PHP scripts, tried a different PC, asked my
On 08/08/06, Reinhart Viane [EMAIL PROTECTED] wrote:
A. I have a page on which people can supply dates in a text area. Dates
are
entered like this:
3/01/2005
29/12/2005
2/01/2006
20/02/2006
28/12/2006
1/01/2007
15/02/2007
B. Now I need this Post element to be broken into pieces (per date) and
I write a session to determine what module a user is on
$_SESSION['module_no']==1;
when they get to the end of the module I want to create a dynamic link to
the next module
$increment = $_SESSION['module_no']++;
$link= ../module_$increment.php;
The problem is every time the page is refreshed
On Tue, 08 Aug 2006 14:50:53 +0100, Dave Goodchild wrote:
On 08/08/06, Reinhart Viane [EMAIL PROTECTED] wrote:
A. I have a page on which people can supply dates in a text area. Dates
are
entered like this:
3/01/2005
29/12/2005
2/01/2006
20/02/2006
28/12/2006
1/01/2007
15/02/2007
B.
On Tuesday 08 August 2006 08:47, Ivo F.A.C. Fokkema wrote:
Does the user running the cron have permission to execute the php binary?
Yes, the file's owner is me and it's my crontab. Also, I've made the file
readable to all, just in case. All directories up the directory tree are
On Tue, 08 Aug 2006 14:54:08 +0100, Ross wrote:
I write a session to determine what module a user is on
$_SESSION['module_no']==1;
when they get to the end of the module I want to create a dynamic link to
the next module
$increment = $_SESSION['module_no']++;
$link=
On Tue, 08 Aug 2006 09:01:42 -0500, Ray Hauge wrote:
On Tuesday 08 August 2006 08:47, Ivo F.A.C. Fokkema wrote:
Does the user running the cron have permission to execute the php binary?
Yes, the file's owner is me and it's my crontab. Also, I've made the file
readable to all, just in case.
Ivo F.A.C. Fokkema wrote:
On Tue, 08 Aug 2006 14:54:08 +0100, Ross wrote:
I write a session to determine what module a user is on
$_SESSION['module_no']==1;
when they get to the end of the module I want to create a dynamic link to
the next module
$increment = $_SESSION['module_no']++;
On Tue, 2006-08-08 at 16:06 +0200, Reinhart Viane wrote:
try this:
$string = 3/01/2005 29/12/2005 2/01/2006 20/02/2006 28/12/2006 1/01/2007
15/02/2007;
$array = explode(' ', $string);
foreach ($array as $value) echo Date: $valuebr /;
If the user separates the dates by an enter in
try this:
$string = 3/01/2005 29/12/2005 2/01/2006 20/02/2006 28/12/2006 1/01/2007
15/02/2007;
$array = explode(' ', $string);
foreach ($array as $value) echo Date: $valuebr /;
If the user separates the dates by an enter in the textarea, you need to
explode on \r\n. To be able to handle
On Tue, 08 Aug 2006 07:28:43 -0600, Jef Sullivan wrote:
Here is the cron command that we use. I've modified the path to the file for
security purposes.
*/5 * * 1-6 lynx -dump http://fully.qualified.path/cron_test.php
-auth=usr:pwd
Jef
Thanks for the reply.
However, your example is not
Thx all
-Oorspronkelijk bericht-
Van: Ivo F.A.C. Fokkema [mailto:[EMAIL PROTECTED]
Verzonden: dinsdag 8 augustus 2006 16:17
Aan: Reinhart Viane
CC: php-general@lists.php.net
Onderwerp: RE: [PHP] break up variable and put each element in an array
On Tue, 2006-08-08 at 16:06 +0200,
On Tuesday 08 August 2006 09:01, Ivo F.A.C. Fokkema wrote:
On Tue, 08 Aug 2006 09:01:42 -0500, Ray Hauge wrote:
On Tuesday 08 August 2006 08:47, Ivo F.A.C. Fokkema wrote:
Does the user running the cron have permission to execute the php
binary?
Yes, the file's owner is me and it's my
Is there anything in your error log that says why it failed? (whatever
error_log points to in php.ini, or maybe what ErrorLog points to in
httpd.conf)
Arno
-Original Message-
From: Ivo F.A.C. Fokkema [mailto:[EMAIL PROTECTED]
Sent: 08 August 2006 01:42
To: php-general@lists.php.net
On Tue, 08 Aug 2006 10:01:41 -0500, Ray Hauge wrote:
On Tuesday 08 August 2006 09:01, Ivo F.A.C. Fokkema wrote:
On Tue, 08 Aug 2006 09:01:42 -0500, Ray Hauge wrote:
On Tuesday 08 August 2006 08:47, Ivo F.A.C. Fokkema wrote:
Does the user running the cron have permission to execute the php
Dave M G wrote:
PHP,
Shouldn't this regular expression select everything from the start of
the string to the first space character:
$firstWord = preg_match('#^*(.*) #iU', $word);
It doesn't, so clearly I'm wrong, but here's why I thought it would:
The enclosing has marks, #, I *think* just
Hi Everybody,
Despite all of my Googling and noodling, I can't seem to figure this
out, and am hoping someone might be able to point me in the right
direction.
Scenario:
- Running Apache 1.3 on OSX 10.4, PHP 5.1.4, MySQL 5.0.19
- Greek text is stored in a MySQL database, encoding set to UTF-8
-
John Wells wrote:
Hi Everybody,
Despite all of my Googling and noodling, I can't seem to figure this
out, and am hoping someone might be able to point me in the right
direction.
Scenario:
- Running Apache 1.3 on OSX 10.4, PHP 5.1.4, MySQL 5.0.19
- Greek text is stored in a MySQL database,
On Tue, 08 Aug 2006 18:00:29 +0100
Colin Guthrie [EMAIL PROTECTED] wrote:
- If I copy and paste greek characters from the db table into a string
in my PHP script, and output that, it works just FINE, without any
htmlentities() or other functions.
I'm at a loss. What am I doing wrong?
John Wells wrote:
Hi Everybody,
Despite all of my Googling and noodling, I can't seem to figure this
out, and am hoping someone might be able to point me in the right
direction.
Scenario:
- Running Apache 1.3 on OSX 10.4, PHP 5.1.4, MySQL 5.0.19
- Greek text is stored in a MySQL
If your server has the appropriate programs installed, there ARE some
command line utilities that can take a PDF and convert it to another form;
You can execute them with an exec call. Theoretically, if the PDF is corrupt
they will print out some kind of error which you can capture.
It could also
On Tue, August 8, 2006 8:02 am, Reinhart Viane wrote:
A. I have a page on which people can supply dates in a text area.
Dates are
entered like this:
3/01/2005
29/12/2005
2/01/2006
20/02/2006
28/12/2006
1/01/2007
15/02/2007
B. Now I need this Post element to be broken into pieces
On Tue, August 8, 2006 9:06 am, Reinhart Viane wrote:
try this:
$string = 3/01/2005 29/12/2005 2/01/2006 20/02/2006 28/12/2006
1/01/2007
15/02/2007;
$array = explode(' ', $string);
foreach ($array as $value) echo Date: $valuebr /;
If the user separates the dates by an enter in the
On Tue, August 8, 2006 7:25 am, Ross wrote:
I want to send variable variables to a function but I cannot seem to
get the
syntax correct. This is what I have so far...
function my_function ($$moule_no) {
For sure, you don't want $$ in the arglist.
You probably want $module_varname, I
On Tue, August 8, 2006 10:27 am, John Wells wrote:
Despite all of my Googling and noodling, I can't seem to figure this
out, and am hoping someone might be able to point me in the right
direction.
I would guess that the MySQL client linked into PHP isn't UTF-8, and
it keeps asking the MySQL
I was just wondering if there was any thought one way or another on
the best practice for doing this.
Lets say I have 10 functions that I want to reuse on my site. Not
every page needs every function. So I move the function to an
external page and then require it for the page.
The
On Tue, 2006-08-08 at 13:30 -0700, Kevin Murphy wrote:
I was just wondering if there was any thought one way or another on
the best practice for doing this.
Lets say I have 10 functions that I want to reuse on my site. Not
every page needs every function. So I move the function to an
Turn off Magic Quotes.
They are doing an extra (bogus) escape before you ever get a chance at
the data.
On Mon, August 7, 2006 1:00 pm, Peter Lauri wrote:
I should maybe add that the data actually comes from a form:
mysql_query(sprintf(INSERT INTO table (value1, value2) VALUES (1,
'%s'),
Kevin Murphy wrote:
I was just wondering if there was any thought one way or another on the
best practice for doing this.
Lets say I have 10 functions that I want to reuse on my site. Not every
page needs every function. So I move the function to an external page
and then require it for the
try this:
$string = 3/01/2005 29/12/2005 2/01/2006 20/02/2006 28/12/2006
1/01/2007
15/02/2007;
$array = explode(' ', $string);
foreach ($array as $value) echo Date: $valuebr /;
If the user separates the dates by an enter in the textarea, you need
to
explode on \r\n. To be able to handle
On Tue, August 8, 2006 4:21 am, Dave M G wrote:
Shouldn't this regular expression select everything from the start of
the string to the first space character:
$firstWord = preg_match('#^*(.*) #iU', $word);
It doesn't, so clearly I'm wrong, but here's why I thought it would:
The enclosing
Perfect, thanks very much. I think I'll probably die before I'm ever
handy with regex.
On Aug 4, 2006, at 7:57 PM, Robert Cummings wrote:
On Fri, 2006-08-04 at 19:12 -0700, Brian Dunning wrote:
Is there a command to strip all non-alphanumerics form the beginning
and end of a string?
Ex.:
In that case you may find Regex Coach (http://weitz.de/regex-coach/)
handy. It essentially does the match in real-time as you watch, and
shows you exactly what each part of the regex is matching.
Essentially, you paste the text to search through in the bottom pane,
and start typing the regex
jonathan wrote:
i was having a conversation and was wondering where in the source code
for php is the process for writing get'd and post'd data to their
corresponding arrays? Also, is there a way to view the source code online?
thanks,
jonathan
PHP's cvs is available online at
I have a xhtml form with a select with options
if I click submit the processing page is loaded and the result of the form is
shown.
The option given to the processing page however is always the same: the first
in the list. It doesn't matter what I select in the drop down menu, the value
of
John Wells wrote:
Hi Everybody,
Despite all of my Googling and noodling, I can't seem to figure this
out, and am hoping someone might be able to point me in the right
direction.
Scenario:
- Running Apache 1.3 on OSX 10.4, PHP 5.1.4, MySQL 5.0.19
- Greek text is stored in a MySQL database,
I am in the process of converting my clients PHP scripts that are
using Interbase so they will work with SQL Server (their request;
not mine).
Is there a reference where I can get the COM Methods and Properties?
Also, without loading the large AdoDb, is there a Prepare()
method if I use the
Roel Dillen wrote:
I have a xhtml form with a select with options
if I click submit the processing page is loaded and the result of the form is
shown.
The option given to the processing page however is always the same: the first
in the list. It doesn't matter what I select in the drop down
Hello,
on 08/05/2006 11:47 PM Robert Cummings said the following:
This is necessary to escape wildcards characters that should be taken
literally in patterns. It is needed to implement the auto-complete
feature using SQL conditions of type field LIKE 'typed-text%'. If
typed-text contains % or
Hello,
on 08/06/2006 09:52 PM Martin Alterisio said the following:
Anyway, you may want to read this more in depth reflection of the
state
of the PHP framework world and recommendations on how to pick what
suits
best for you:
Richard, Madoka,
Thank you for your insights into searching for Japanese characters.
I've decided to stick with searching for words as determined by the
placement of spaces within the source text.
Thank you for your time and advice.
--
Dave M G
--
PHP General Mailing List
Richard, Adam, Barry, Dave, David,
Thank you all for your helpful advice regarding expressions.
I was able to combine all your advice, and made some additional
discoveries along the way.
The winning expression is:
#^(.*)\s#iU
First, I discovered that sometimes the source text had an
56 matches
Mail list logo