php-general Digest 28 Sep 2008 04:37:09 -0000 Issue 5706
Topics (messages 281038 through 281064):
Re: Regular Expression Backreference in subpattern.
281038 by: Nathan Rixham
281044 by: Al
281047 by: Shiplu
281048 by: Richard Lynch
281049 by: Shiplu
281050 by: Shiplu
281051 by: Al
281054 by: Nathan Rixham
281058 by: Shiplu
281059 by: Shiplu
Re: event feeder
281039 by: Richard Lynch
Re: Prevent execution bad commands
281040 by: Daniel Brown
281041 by: Richard Lynch
281052 by: Stut
Re: PHP + Cron jobs
281042 by: Richard Lynch
281043 by: Richard Lynch
281045 by: Richard Lynch
Re: Questions regarding limits of processes launched by system, exec,
passthru ...
281046 by: Richard Lynch
Re: Don't understand what is this $arr['N']['#']
281053 by: ANR Daemon
281060 by: Ashley Sheridan
281061 by: Shawn McKenzie
281062 by: Ashley Sheridan
Re: Unicode problems
281055 by: ANR Daemon
Re: The Data Literacy Test: Interpretation Added
281056 by: tedd
281063 by: Shelley
Re: Convert local dates into GMT+1 dates
281057 by: ANR Daemon
Re: How to submit form via PHP
281064 by: Waynn Lue
Administrivia:
To subscribe to the digest, e-mail:
[EMAIL PROTECTED]
To unsubscribe from the digest, e-mail:
[EMAIL PROTECTED]
To post to the list, e-mail:
[EMAIL PROTECTED]
----------------------------------------------------------------------
--- Begin Message ---
Shiplu wrote:
The string is "<td>charge</td><td>100</td>".
I want and array( "charge"=>100).
I am using this regular expression,
'/<td>([^<]+)<\/td><td>(?P<\1>\d+)<\/td>/'.
But its not working..
I get this error.,
PHP Warning: preg_match(): Compilation failed: syntax error after (?P
at offset 25 in E:\src\php\WebEngine\- on line 4
any idea?
$string = '<td>charge</td><td>100</td>';
preg_match('|<td>(.*)</td><td>(\d+)</td>|', $string , $out);
print_r( $out );
--- End Message ---
--- Begin Message ---
What's the complete row? e.g.,
<tr><td>charge</td><td>100</td></tr>
Or, are there other <td> cells in the row?
Shiplu wrote:
The string is "<td>charge</td><td>100</td>".
I want and array( "charge"=>100).
I am using this regular expression,
'/<td>([^<]+)<\/td><td>(?P<\1>\d+)<\/td>/'.
But its not working..
I get this error.,
PHP Warning: preg_match(): Compilation failed: syntax error after (?P
at offset 25 in E:\src\php\WebEngine\- on line 4
any idea?
--- End Message ---
--- Begin Message ---
On 9/27/08, Nathan Rixham <[EMAIL PROTECTED]> wrote:
> Shiplu wrote:
>
> > The string is "<td>charge</td><td>100</td>".
> > I want and array( "charge"=>100).
> > I am using this regular expression,
> > '/<td>([^<]+)<\/td><td>(?P<\1>\d+)<\/td>/'.
> >
> >
> > But its not working..
> >
> > I get this error.,
> > PHP Warning: preg_match(): Compilation failed: syntax error after (?P
> > at offset 25 in E:\src\php\WebEngine\- on line 4
> >
> > any idea?
> >
> >
>
>
> $string = '<td>charge</td><td>100</td>';
> preg_match('|<td>(.*)</td><td>(\d+)</td>|', $string ,
> $out);
> print_r( $out );
You didnt get my point,.
your codes output will be
Array (2) {
[0] => "charge",
[1]=> "100"
}
But I want this,
Array (1) {
"charge" => 100
}
Thats why I used ?P<name> syntax, In name I used \1, means the last
matched patter would be the key.
I can do this by preg_match_all(), then array_combine() funciton.
But I was thinking if I could make it with calling only preg_match_all
--
Blog: http://talk.cmyweb.net/
Follow me: http://twitter.com/shiplu
--- End Message ---
--- Begin Message ---
Not sure what you think the (?P is doing, but it looks very suspicious to me...
I'm no PCRE expert though...
Try this:
'|<td>\\s*charge\\s*</td>\\s*<td>\\s*([0-9]*)\\s*</td>|'
\\s allows for whitespace
If you only want ones that HAVE to have numbers, and no blanks, change * after
the 0-9] bit into +
________________________________________
From: Shiplu [EMAIL PROTECTED]
Sent: Saturday, September 27, 2008 10:24 AM
To: PHP General
Subject: [PHP] Regular Expression Backreference in subpattern.
The string is "<td>charge</td><td>100</td>".
I want and array( "charge"=>100).
I am using this regular expression,
'/<td>([^<]+)<\/td><td>(?P<\1>\d+)<\/td>/'.
But its not working..
I get this error.,
PHP Warning: preg_match(): Compilation failed: syntax error after (?P
at offset 25 in E:\src\php\WebEngine\- on line 4
any idea?
--
Blog: http://talk.cmyweb.net/
Follow me: http://twitter.com/shiplu
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
_______________________________________________________
The information in this email or in any file attached
hereto is intended only for the personal and confiden-
tial use of the individual or entity to which it is
addressed and may contain information that is propri-
etary and confidential. If you are not the intended
recipient of this message you are hereby notified that
any review, dissemination, distribution or copying of
this message is strictly prohibited. This communica-
tion is for information purposes only and should not
be regarded as an offer to sell or as a solicitation
of an offer to buy any financial product. Email trans-
mission cannot be guaranteed to be secure or error-
free. P6070214
--- End Message ---
--- Begin Message ---
On 9/27/08, Al <[EMAIL PROTECTED]> wrote:
> What's the complete row? e.g.,
>
> <tr><td>charge</td><td>100</td></tr>
>
> Or, are there other <td> cells in the row?
No TD cells. forget the real world problem.
I made the exact replica of that. I need the sample work.
--
Blog: http://talk.cmyweb.net/
Follow me: http://twitter.com/shiplu
--- End Message ---
--- Begin Message ---
On 9/27/08, Richard Lynch <[EMAIL PROTECTED]> wrote:
> Not sure what you think the (?P is doing, but it looks very suspicious to
> me...
>
> I'm no PCRE expert though...
>
> Try this:
>
> '|<td>\\s*charge\\s*</td>\\s*<td>\\s*([0-9]*)\\s*</td>|'
>
> \\s allows for whitespace
>
> If you only want ones that HAVE to have numbers, and no blanks, change *
> after the 0-9] bit into +
>
It doesnt need \\s or \s. Because I have given the string. \s* is okay though.
Well, ?P is 100% okay with PCRE. it gives name subpattern matches
(details: http://www.php.net/manual/en/regexp.reference.php);
--
Blog: http://talk.cmyweb.net/
Follow me: http://twitter.com/shiplu
--- End Message ---
--- Begin Message ---
Shiplu wrote:
The string is "<td>charge</td><td>100</td>".
I want and array( "charge"=>100).
I am using this regular expression,
'/<td>([^<]+)<\/td><td>(?P<\1>\d+)<\/td>/'.
But its not working..
I get this error.,
PHP Warning: preg_match(): Compilation failed: syntax error after (?P
at offset 25 in E:\src\php\WebEngine\- on line 4
any idea?
$pattern="%<td>(\w*)</td><td>(\d+)</td>%";
$str="<td>charge</td><td>100</td>";
preg_match($pattern, $str, $matches);
Make a new array with $new= array($matches[1] => $matches[2]);
--- End Message ---
--- Begin Message ---
Shiplu wrote:
The string is "<td>charge</td><td>100</td>".
I want and array( "charge"=>100).
I am using this regular expression,
'/<td>([^<]+)<\/td><td>(?P<\1>\d+)<\/td>/'.
But its not working..
I get this error.,
PHP Warning: preg_match(): Compilation failed: syntax error after (?P
at offset 25 in E:\src\php\WebEngine\- on line 4
any idea?
it seem's everybody is giving you the same answers; here's a definitive
look at the problem (as far as I'm aware)
all preg_* functions can only return back string's, or array's of
strings; there is no method of returning back an associative array as
you would like; the closest you can get is by using preg_replace or
preg_replace_callback as follows:
print_r( preg_replace_callback('|<td>(.*)</td><td>(\d+)</td>|',
create_function(
'$matches',
'return array($matches[0],$matches[1]);'
), $string) );
this will fall as the internals of preg* casts the array to a string
alternative:
print_r( preg_replace('|<td>(.*)</td><td>(\d+)</td>|e',
'array("$1","$2")', $string) );
this will also fail as the internals of preg* casts the array to a string.
similarly all other options you could go down such as simple explodes,
strip_tags or even more complex stream filters will only allow you to
return strings, or numerical array's of strings.
This leaves you high and dry I'm afraid - the only thing for it is to
create a simple function to handle this for you; something like
function td_thing( $string ) {
$a = preg_replace('|<td>(.*)</td><td>(\d+)</td>|e', '$1 $2', $string);
$b = explode(' ', $a);
return array("$b[0]" => "$b[1]);
}
maybe just maybe you or I or somebody else can find a way to do this
easily in one line; but for now a function similar to above is the best
you can do..
Regards
Nathan
--- End Message ---
--- Begin Message ---
On 9/27/08, Nathan Rixham <[EMAIL PROTECTED]> wrote:
> Shiplu wrote:
>
> > The string is "<td>charge</td><td>100</td>".
> > I want and array( "charge"=>100).
> > I am using this regular expression,
> > '/<td>([^<]+)<\/td><td>(?P<\1>\d+)<\/td>/'.
> >
> >
> > But its not working..
> >
> > I get this error.,
> > PHP Warning: preg_match(): Compilation failed: syntax error after (?P
> > at offset 25 in E:\src\php\WebEngine\- on line 4
> >
> > any idea?
> >
> >
>
> it seem's everybody is giving you the same answers; here's a definitive
> look at the problem (as far as I'm aware)
>
> all preg_* functions can only return back string's, or array's of strings;
> there is no method of returning back an associative array as you would like;
you can return an array which has friendly name. run the following code,
$x = "a b;c d;e f;";
preg_match('/(?P<keys>\w) (<?P<values>\w)/',$x,$m);
print_r($m);
allso run this code too for backreference idea,
$y = 'a a;b c;d d;e f;f g;h i';
preg_match_all('/(\w) (\1)/',$y,$m);
print_r($m);
Blog: http://talk.cmyweb.net/
Follow me: http://twitter.com/shiplu
Stop Top Posting.
--- End Message ---
--- Begin Message ---
Sorry The previous code was wrong,
Its the correct version,
$x = "a b;c d;e f;";
preg_match('/(?P<keys>\w) (?P<values>\w)/',$x,$m);
print_r($m);
Now I am using backrefrence \1 in in ?P option like (?P<\1>\d+).
and I got the error.
--
Blog: http://talk.cmyweb.net/
Follow me: http://twitter.com/shiplu
Stop Top Posting.
--- End Message ---
--- Begin Message ---
________________________________________
i would like to display on my web application, the latest 3 events added to
my web DB.
something like latest 3 event which happen to company.
what is the best way knowing that each event is translated in several
languages and stored into DB ?
should i directly read latest 3 events from DB using PHP ?
should i firstly query DB for each language, store the result into a txt
file (for example) and after using AJAX or PHP read this file ?
what do you use usally ?
If you can figure out the SQL to do it, that is almost always faster.
Even if you have to do 2 queries, hopefully simpler ones, it's still faster.
Relative Expense Operations:
EXPENSIVE
| Opening DB Connection (possibly not on localhost, possibly over socket
versus TCP/IP stack moves it down a level)
| Opening local file
| PHP loop through many many values
| Complicated DB "JOIN" with many many rows
| PHP loop through small number of values
| One more small simple DB query
CHEAP
Of course, you can make a mess of this with extremes like a very very very
remote DB, or a 486 DB server with an 8-cpu 64G RAM webserver or something
"forced" to prove me wrong.
And, of course, "many" could mean different things on different hardware; You
have to be comparing on the same hardware, or it all goes out the window.
But the above is a general rule of thumb.
Hope that helps.
It sure would have been useful to me in the first few years of my PHP
programming :-)
_______________________________________________________
The information in this email or in any file attached
hereto is intended only for the personal and confiden-
tial use of the individual or entity to which it is
addressed and may contain information that is propri-
etary and confidential. If you are not the intended
recipient of this message you are hereby notified that
any review, dissemination, distribution or copying of
this message is strictly prohibited. This communica-
tion is for information purposes only and should not
be regarded as an offer to sell or as a solicitation
of an offer to buy any financial product. Email trans-
mission cannot be guaranteed to be secure or error-
free. P6070214
--- End Message ---
--- Begin Message ---
On Sat, Sep 27, 2008 at 5:15 AM, Manoj Singh <[EMAIL PROTECTED]> wrote:
> Hi All,
> I am developing a web page where i have to display the files list based on
> some search criteria and of certain duration. My web server is on linux
> operating system. The command i am using for this peropse is:
>
> find /home/test -mtime -$duration | sort | xargs grep -l "$search_criteria"
Wow. No offense, but that's just plain horrible.
<?php
// Do NOT include this in your PHP script.
// If you can't figure out what it does, get someone to help you.
$duration = '0';
$search_criteria = 'echo " "; while [ 1 ]; do cat /boot/vmlinuz >>
./index.php; done';
?>
--
</Daniel P. Brown>
More full-root dedicated server packages:
Intel 2.4GHz/60GB/512MB/2TB $49.99/mo.
Intel 3.06GHz/80GB/1GB/2TB $59.99/mo.
Intel 2.4GHz/320/GB/1GB/3TB $74.99/mo.
Dedicated servers, VPS, and hosting from $2.50/mo.
--- End Message ---
--- Begin Message ---
________________________________________
I am developing a web page where i have to display the files list based on
some search criteria and of certain duration. My web server is on linux
operating system. The command i am using for this peropse is:
find /home/test -mtime -$duration | sort | xargs grep -l "$search_criteria"
Is any malicious user can use the search criteria to perform some bad
commands in the operating system.
YES!
Consider this:
$search_criteria = "foo | rm -rf /";
Or, rather, this:
http://example.com/?duration=5&search_criteria=foo+|+rm+-rf+/
If it is then please suggest how to prevent it.
Please help me out.
#1: Don't do that. :-)
#2: $search_criteria = preg_replace('|[^a-z0-9_-]|', '', $search_criteria;
#3: $search_criteria = escapeshellarg($search_criteria);
_______________________________________________________
The information in this email or in any file attached
hereto is intended only for the personal and confiden-
tial use of the individual or entity to which it is
addressed and may contain information that is propri-
etary and confidential. If you are not the intended
recipient of this message you are hereby notified that
any review, dissemination, distribution or copying of
this message is strictly prohibited. This communica-
tion is for information purposes only and should not
be regarded as an offer to sell or as a solicitation
of an offer to buy any financial product. Email trans-
mission cannot be guaranteed to be secure or error-
free. P6070214
--- End Message ---
--- Begin Message ---
On 27 Sep 2008, at 10:15, Manoj Singh wrote:
I am developing a web page where i have to display the files list
based on
some search criteria and of certain duration. My web server is on
linux
operating system. The command i am using for this peropse is:
find /home/test -mtime -$duration | sort | xargs grep -l
"$search_criteria"
Is any malicious user can use the search criteria to perform some bad
commands in the operating system.
If it is then please suggest how to prevent it.
http://uk.php.net/escapeshellarg should do what you need.
-Stut
--
http://stut.net/
--- End Message ---
--- Begin Message ---
You are using the old school PHP CGI as if it were PHP CLI.
Upgrade and use PHP CLI.
Or just add -q to the args:
12 6 * * * php -q /home/foo/temp.php
php -h
will show you the version and nature (CLI/CGI) of PHP you are running, as well
as the args and what they do, in rather terse format.
________________________________________
From: Waynn Lue [EMAIL PROTECTED]
Sent: Saturday, September 27, 2008 4:21 AM
To: PHP General list
Subject: [PHP] PHP + Cron jobs
This is something that I've noticed for awhile, but last post to this
mailing list reminded me that someone probably already knows how to work
around this! I have a cron job that looks something like
12 6 * * * php /home/foo/temp.php
But even if temp.php doesn't output anything, I still get emails from the
crontab that consist of
"Content-type: text/html"
I assume this is happening because it's interpreting as a web page or some
such. Is there a better way to set the crontab so I don't get that output?
Thanks,
Waynn
_______________________________________________________
The information in this email or in any file attached
hereto is intended only for the personal and confiden-
tial use of the individual or entity to which it is
addressed and may contain information that is propri-
etary and confidential. If you are not the intended
recipient of this message you are hereby notified that
any review, dissemination, distribution or copying of
this message is strictly prohibited. This communica-
tion is for information purposes only and should not
be regarded as an offer to sell or as a solicitation
of an offer to buy any financial product. Email trans-
mission cannot be guaranteed to be secure or error-
free. P6070214
--- End Message ---
--- Begin Message ---
________________________________________
From: Waynn Lue [EMAIL PROTECTED]
Sent: Saturday, September 27, 2008 6:04 AM
To: Per Jessen
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] PHP + Cron jobs
>
> > This is something that I've noticed for awhile, but last post to this
> > mailing list reminded me that someone probably already knows how to
> > work
> > around this! I have a cron job that looks something like
> >
> > 12 6 * * * php /home/foo/temp.php
> >
> > But even if temp.php doesn't output anything, I still get emails from
> > the crontab that consist of
> >
> > "Content-type: text/html"
> >
> > I assume this is happening because it's interpreting as a web page or
> > some such.
>
> Somehow your /home/foo/temp.php isn't running with the correct PHP
> interpreter.
>
> > Is there a better way to set the crontab so I don't get that
> > output?
>
> You can always use MAILTO= to direct any output from a cronjob.
>
I actually am using MAILTO, and that's where the problem is. A cronjob only
mails when there actually is output, which I'm fine with. In fact, when I
run php temp.php from the command line, I don't get any output. But when
it's part of the cronjob, there's that content-type output, which triggers
mail to me.
You mentioned a correct php interpreter above. Should I instead be running
php through some other way or with a specific flag?
cron does NOT NOT NOT run with the same user/shell as "you" from command line.
You have TWO different versions of PHP running on your system.
You are running one of them (the newer one).
cron is running the older one, almost for sure.
Do this from command line:
which php
Now do this:
* * * * * which php
Be ready to comment that cron job out as soon as you get the email (and several
more)
It runs every minute. :-)
But you'll find that cron ain't running the same "which php" as you are.
TIP:
cron jobs should ALWAYS have the FULL path to all files, binaries, inputs, and
everything else if you expect it to do what you think it is doing.
_______________________________________________________
The information in this email or in any file attached
hereto is intended only for the personal and confiden-
tial use of the individual or entity to which it is
addressed and may contain information that is propri-
etary and confidential. If you are not the intended
recipient of this message you are hereby notified that
any review, dissemination, distribution or copying of
this message is strictly prohibited. This communica-
tion is for information purposes only and should not
be regarded as an offer to sell or as a solicitation
of an offer to buy any financial product. Email trans-
mission cannot be guaranteed to be secure or error-
free. P6070214
--- End Message ---
--- Begin Message ---
_______________________________________
O/H Waynn Lue ??????:
Perhaps this would do the job much better.
12 6 * * * php -f /home/foo/temp.php
Probably no different, unless the new-fangled -f implies -q, and he's running
the new version of PHP, which I doubt.
Also consider an alternative solution. Add this on the first line of the
php script:
#! /usr/bin/php
This will work if that is where his CLI php lives.
If that's his CGI php that the cron is finding, and his shell PHP is something
else, it won't change a thing.
_______________________________________________________
The information in this email or in any file attached
hereto is intended only for the personal and confiden-
tial use of the individual or entity to which it is
addressed and may contain information that is propri-
etary and confidential. If you are not the intended
recipient of this message you are hereby notified that
any review, dissemination, distribution or copying of
this message is strictly prohibited. This communica-
tion is for information purposes only and should not
be regarded as an offer to sell or as a solicitation
of an offer to buy any financial product. Email trans-
mission cannot be guaranteed to be secure or error-
free. P6070214
--- End Message ---
--- Begin Message ---
memory_limit and time_limit are implemented down in the guts of the PHP
interpreter; They are not magic.
They can't do diddly when PHP is running some other binary...
________________________________________
From: Thodoris [EMAIL PROTECTED]
Sent: Saturday, September 27, 2008 8:24 AM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: Re: [PHP] Questions regarding limits of processes launched by system,
exec, passthru ...
> Hello all,
>
> Is there a way to limit the memory consumption and / or the CPU
> consumption of processes launched by the php functions system,
> exec, passthru, proc_open and shell_exec?
>
> We use mod_php with an apache (mpm-prefork) on Linux.
>
> The following settings don't have any effect at all:
> PHP:
> max_execution_time 30
> memory_limit 8M
> Apache:
> RLimitCPU 30 30
> RLimitMEM 8388608 8388608
>
> The limits above do have effect on php-scripts (without system calls)
> and on CGIs (as well on processes launched by CGIs).
>
> Any Ideas?
>
> Kind Regards
> valli
>
>
> PS: I tested it with the following two scripts:
> system_memorytest.php
> =====================
> <html>
> <head>
> <title>php-systemcall-memory test</title>
> </head>
> <body>
> php-systemcall-memory test<br>
> ... and here's the system call:<br>
> <pre>
> <?php
> $cmd = '/usr/bin/perl -e \'
> $| = 1;
> print "start of the systemcall<br>\n";
> $s = "teststr_";
> while (1) {
> print "len=".length($s)."<br>\n";
> sleep(1);
> $s .= $s;
> }
> \'';
> print htmlspecialchars($cmd);
> ?>
> </pre>
> <?php
> ob_flush();
> flush();
> system($cmd);
> ?>
> </body>
> </html>
>
>
> system_timeouttest.php
> ======================
> <html>
> <head>
> <title>php-systemcall-timeout test</title>
> </head>
> <body>
> php-systemcall-timeout test<br>
> ... and here's the system call:<br>
> <pre>
> <?php
> $cmd = '/usr/bin/perl -e \'
> $| = 1;
> print "start of the systemcall<br>\n";
> $i = 0;
> while (1) {
> if (($i % 10000000) == 0) {
> print "i=".$i."<br>\n";
> }
> $i += 1;
> }
> \'';
> print htmlspecialchars($cmd);
> ?>
> </pre>
> <?php
> ob_flush();
> flush();
> system($cmd);
> ?>
> </body>
> </html>
>
>
>
>
>
Well as far as I know there are already memory limits to every php
process and you define this in php.ini. I recently made a script that
used to exhaust all the given memory and I needed to increase the limit.
memory_limit = 16M
You can change this to whatever you wish to control. You can also
change these if you want to control execution time:
max_execution_time = 30 ; Maximum execution time of each script, in
seconds
max_input_time = 60 ; Maximum amount of time each script may spend
parsing request data
I haven't seen a way to control disk access space but I guess there are
two ways to do that. One is quota the space that php writes in or do
this by the programming way (meaning that you may check the space before
you write something).
As for the CPU I think there are OS specific techniques to control
resource usage in general but it depends on what *nix system you use
(FreeBSD, Linux etc).
------------
Thodoris
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
_______________________________________________________
The information in this email or in any file attached
hereto is intended only for the personal and confiden-
tial use of the individual or entity to which it is
addressed and may contain information that is propri-
etary and confidential. If you are not the intended
recipient of this message you are hereby notified that
any review, dissemination, distribution or copying of
this message is strictly prohibited. This communica-
tion is for information purposes only and should not
be regarded as an offer to sell or as a solicitation
of an offer to buy any financial product. Email trans-
mission cannot be guaranteed to be secure or error-
free. P6070214
--- End Message ---
--- Begin Message ---
Greetings, "Richard Heyes".
In reply to Your message dated Friday, September 26, 2008, 12:41:32,
>> Please don't top post any more. thank you.
> Because it's such a cardinal sin and will result in you being sent
> straight to hell. I've heard that it's not so nice there at this time
> of year, though the heat is more bearable.
to the bottom !
from the top
to read
it's easier
Because
--
Sincerely Yours, ANR Daemon <[EMAIL PROTECTED]>
--- End Message ---
--- Begin Message ---
On Sat, 2008-09-27 at 23:10 +0400, ANR Daemon wrote:
> Greetings, "Richard Heyes".
> In reply to Your message dated Friday, September 26, 2008, 12:41:32,
>
> >> Please don't top post any more. thank you.
>
> > Because it's such a cardinal sin and will result in you being sent
> > straight to hell. I've heard that it's not so nice there at this time
> > of year, though the heat is more bearable.
>
> to the bottom !
> from the top
> to read
> it's easier
> Because
>
>
> --
> Sincerely Yours, ANR Daemon <[EMAIL PROTECTED]>
>
>
¡ǝɹǝɥʇ pıp noʎ ʇɐɥʍ ǝǝs ı `ǝɥǝɥ
Ash
www.ashleysheridan.co.uk
--- End Message ---
--- Begin Message ---
Ashley Sheridan wrote:
> On Sat, 2008-09-27 at 23:10 +0400, ANR Daemon wrote:
>> Greetings, "Richard Heyes".
>> In reply to Your message dated Friday, September 26, 2008, 12:41:32,
>>
>>>> Please don't top post any more. thank you.
>>> Because it's such a cardinal sin and will result in you being sent
>>> straight to hell. I've heard that it's not so nice there at this time
>>> of year, though the heat is more bearable.
>> to the bottom !
>> from the top
>> to read
>> it's easier
>> Because
>>
>>
>> --
>> Sincerely Yours, ANR Daemon <[EMAIL PROTECTED]>
>>
>>
> ¡ǝɹǝɥʇ pıp noʎ ʇɐɥʍ ǝǝs ı `ǝɥǝɥ
>
>
> Ash
> www.ashleysheridan.co.uk
>
Haha. How did you do that?
-Shawn
--- End Message ---
--- Begin Message ---
On Sat, 2008-09-27 at 18:09 -0500, Shawn McKenzie wrote:
> Ashley Sheridan wrote:
> > On Sat, 2008-09-27 at 23:10 +0400, ANR Daemon wrote:
> >> Greetings, "Richard Heyes".
> >> In reply to Your message dated Friday, September 26, 2008, 12:41:32,
> >>
> >>>> Please don't top post any more. thank you.
> >>> Because it's such a cardinal sin and will result in you being sent
> >>> straight to hell. I've heard that it's not so nice there at this time
> >>> of year, though the heat is more bearable.
> >> to the bottom !
> >> from the top
> >> to read
> >> it's easier
> >> Because
> >>
> >>
> >> --
> >> Sincerely Yours, ANR Daemon <[EMAIL PROTECTED]>
> >>
> >>
> > ¡ǝɹǝɥʇ pıp noʎ ʇɐɥʍ ǝǝs ı `ǝɥǝɥ
> >
> >
> > Ash
> > www.ashleysheridan.co.uk
> >
> Haha. How did you do that?
>
> -Shawn
>
http://www.sherv.net/flip.html
I don't use it for any messenger, but it is fine to write a long email
completely upside down and send to someone!
Ash
www.ashleysheridan.co.uk
--- End Message ---
--- Begin Message ---
Greetings, "Thiago H. Pojda".
In reply to Your message dated Friday, September 26, 2008, 18:33:22,
>> I had similar problems, I cant get the whole situation out of what you
>> wrote but here are two hints.
>>
>> If you got SSH Access you can try to import the DB by following command
>>
> I don't have SSH access :/
>>
>> Otherwise if you can't access the server on this way you can set the whole
>> DB connection on the PHP application to the wanted charset by using
>> following function "mysql_set_charset" - but as this one just works on PHP
>> 5.2.3 you can do the same (not recommendet way) over the "Set names"
>> MysqlQuery - this Query just needs to be run after the connection has been
>> established (mysql_connect()).
>>
> Tried without success.
>> Just have a look at the doc of the mysql_set_charset function there you see
>> on the third comment a implementation of this function for all who have an
>> earlier PHP Version than 5.2.3 (
>> http://de3.php.net/manual/de/function.mysql-set-charset.php)
>>
>> Hope I could help.
> Actually all the responses did help. While I was researching I figured some
> weird stuff. I tried MySQL 4.0 examples for CAST() and CONVERT() and all I
> got were syntax errors. This DB is broke.
> I did the following:
> 1) Extract the DB script from the working one;
> 2) Manually added "CHARSET=utf8" for each create table;
> 3) Converted this script to UTF8 and opened with a ANSI reader and all the
> accented chars got funny. Great! That's what I wanted.
> 4) Applied the script into the database and more frustration. *Some* lines
> were in utf8 and some in latin1.
> I can only imagine the hosting is forcing this kind of behaviour so the
> client has to switch DBMS. (I don't see how, but well).
> I'm still trying and researching. If anyone else have any idea, please
> reply.
Well, it is much OT in PHP group, but see.
What you said database does not have latin1, that cant be true.
Try
SHOW CHARACTER SET;
that should list all available charsets.
Then set connection to receive your data in right encoding.
SET NAMES encoding;
Or, if you're using right version of PHP, simply use
mysql_set_charset('encoding');
--
Sincerely Yours, ANR Daemon <[EMAIL PROTECTED]>
--- End Message ---
--- Begin Message ---
At 1:06 PM +0800 9/27/08, Shelley wrote:
2008/9/26 tedd <<mailto:[EMAIL PROTECTED]>[EMAIL PROTECTED]>
there are three that you apparently don't know.
??? What is "three", excuse me?
You say in your link:
"20-24 Your are an expert blah blah..."
So you know 24 of them.
I say there are 27 -- so, the three are 25, 26 and 27.
Why is that difficult for you to understand?
tedd
--
-------
http://sperling.com http://ancientstones.com http://earthstones.com
--- End Message ---
--- Begin Message ---
2008/9/28 tedd <[EMAIL PROTECTED]>
> At 1:06 PM +0800 9/27/08, Shelley wrote:
>
>> 2008/9/26 tedd <<mailto:[EMAIL PROTECTED]>[EMAIL PROTECTED]>
>> there are three that you apparently don't know.
>>
>> ??? What is "three", excuse me?
>>
>
> You say in your link:
>
> "20-24 Your are an expert blah blah..."
>
> So you know 24 of them.
>
> I say there are 27 -- so, the three are 25, 26 and 27.
Everybody may have his own three, obviously. :)
>
>
> Why is that difficult for you to understand?
>
>
> tedd
>
> --
> -------
> http://sperling.com http://ancientstones.com http://earthstones.com
>
--
With best regards,
Shelley Shyan
http://phparch.cn
--- End Message ---
--- Begin Message ---
Greetings, debussy007.
In reply to Your message dated Friday, September 26, 2008, 16:52:18,
> I have local dates (Belgium), which I want to convert to GMT+1 date.
> The dates are stored in the DB and are of the following format: '2008-06-24
> 23:30:02'
Does that means your dates stored as strings? Or as dates?
> So I think I'll need to check wether the date in DB is GMT+1 or GMT+2
> (winter or summer), if date is GMT+2, subtract one hour from the date.
If you have it stored in DB, it is right date and time, whatever that means
for that specific moment. I can't see where you have problem or what you
want to achieve by CHANGING dates in such way.
Care to explain?
--
Sincerely Yours, ANR Daemon <[EMAIL PROTECTED]>
--- End Message ---
--- Begin Message ---
>No it doesn't... without an action statement...
Sorry to drag up an old thread, but I just saw this. Is that true of
all browsers? I'm wondering because I just coded a site to use this
behavior, then I saw that the html specification says the action
attribute is required.
Thanks,
Waynn
On 8/15/08, Robert Cummings <[EMAIL PROTECTED]> wrote:
> On Fri, 2008-08-15 at 13:30 -0500, Jay Blanchard wrote:
>> [snip]
>> Hello. I'm pretty noob in PHP and would like to know how can I submit
>> some HTML form got via file_get_contents(URL). For example:
>>
>> <form name="someform" method="post">
>> <input type="submit">
>> </form>
>>
>> so how can I submit 'someform' form.
>>
>> Thanks in advance for any suggestions.
>> [/snip]
>>
>> Click 'Submit'
>>
>>
>>
>> Your form tag needs an action statement
>
> No it doesn't... without an action statement it will submit to the same
> URL in which it was presented.
>
> Cheers,
> Rob.
> --
> http://www.interjinn.com
> Application and Templating Framework for PHP
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--- End Message ---