Thanks!
Your first appraoch seems to make clearer sense for me.
Great pinch hit,
John
Paul Novitski wrote:
If you're splitting your search string into discrete words, most
search engine logic doesn't require quotes. Typically, quotation
marks combine multiple words into single expressions, wh
On Thu, 2006-04-06 at 22:40, Kevin Waterson wrote:
> This one time, at band camp, Robert Cummings <[EMAIL PROTECTED]> wrote:
>
> > I'm gonna go out on a limb here and say WRONG!
> >
> > Run yourself a benchmark.
>
> benchmarks can be hazardous, but lets look at them at their most basic level.
>
Hi Tanner,
Here's a completely working piece of code that I got from my hosting
company. This looks like it does exactly what you want to do. I am
also including the output in the bottom of this e-mail.
sunil.
output: one thousand one
** Written By: Websulting (www dot websulting dot com)
At 11:40 PM 4/6/2006, Kevin Waterson wrote:
This one time, at band camp, Robert Cummings <[EMAIL PROTECTED]> wrote:
> I'm gonna go out on a limb here and say WRONG!
>
> Run yourself a benchmark.
benchmarks can be hazardous, but lets look at them at their most basic
level. By this
I mean how
This one time, at band camp, Robert Cummings <[EMAIL PROTECTED]> wrote:
> I'm gonna go out on a limb here and say WRONG!
>
> Run yourself a benchmark.
benchmarks can be hazardous, but lets look at them at their most basic level.
By this
I mean how folks use them every day...
http://www.phpro.o
[EMAIL PROTECTED] wrote:
Hi to all,
session_start();
$_SESSION['sessid'] = session_id;
echo $_SESSION['sessid']; will show e.g. 699e506bd42ea402985dce24a0ef9
After:
unset($_SESSION['sessid']);
$_SESSION['sessid'] = session_id();
I'm getting the same SID again.
I tried with session_unregist
At 05:56 PM 4/6/2006, John Nichel wrote:
I remember IF constructs from BASIC and PASCAL, but no switch statements
(somebody correct me if I'm wrong). But what I'm wondering is how in the
world did you do conditional checking if there were no switches, and you
don't use IF's? Did you not cod
David BERCOT wrote:
Hi,
I have a server with Apache 2, PHP 5.1.1 and Oracle Instant Client
10.2.0.1.
As I have a little bug [http://bugs.php.net/bug.php?id=29779], I've
tried the solution (in oci8.c) and recompiled ! But then, everything was
broken. So, I get the source of PHP 5.1.2 and recompil
Hi,
Friday, April 7, 2006, 6:20:41 AM, you wrote:
AB> Tom Rogers wrote:
AB> There isn't. I've got the suspicion it's got to do with the UTF-8
AB> character encoding because of the characters '', I've seen this
AB> before with HTML pages. Because of this I asked the person who's having
AB>
On Thursday 06 April 2006 11:20, tedd wrote:
> At 1:04 PM -0400 4/6/06, Robert Cummings wrote:
> >On Thu, 2006-04-06 at 11:50, tedd wrote:
> >> Regardless of speed, I find that switch is much easier to write and
> >> debug than if/elseif -- which, regardless of my shortcomings, I never
> >> use.
Brian Dunning wrote:
Is there a way to get PHP to not throw warnings on a per-script basis?
Why not just fix the code.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
tedd wrote:
At 1:04 PM -0400 4/6/06, Robert Cummings wrote:
On Thu, 2006-04-06 at 11:50, tedd wrote:
Regardless of speed, I find that switch is much easier to write and
debug than if/elseif -- which, regardless of my shortcomings, I never
use.
Umm, that you NEVER use elseif I think is str
On Thu, 2006-04-06 at 14:20, tedd wrote:
> At 1:04 PM -0400 4/6/06, Robert Cummings wrote:
>
> So, my programming probably predates both conditions -- however -- in
> 40 years I have NEVER used an if/elseif control structure by any name
> and I always found a way around it -- and one that was usu
Tom Rogers wrote:
Make sure you don't have any blank lines before the
There isn't. I've got the suspicion it's got to do with the UTF-8
character encoding because of the characters '', I've seen this
before with HTML pages. Because of this I asked the person who's having
the problems t
> Brian Dunning wrote:
> > Is there a way to get PHP to not throw warnings on a
> per-script basis?
> >
>
> Yes.
>
> ini_set()
>
or error_reporting()
JM
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Hi to all,
session_start();
$_SESSION['sessid'] = session_id;
echo $_SESSION['sessid']; will show e.g. 699e506bd42ea402985dce24a0ef9
After:
unset($_SESSION['sessid']);
$_SESSION['sessid'] = session_id();
I'm getting the same SID again.
I tried with session_unregister() and session_destroy()
Hi,
I have a server with Apache 2, PHP 5.1.1 and Oracle Instant Client
10.2.0.1.
As I have a little bug [http://bugs.php.net/bug.php?id=29779], I've
tried the solution (in oci8.c) and recompiled ! But then, everything was
broken. So, I get the source of PHP 5.1.2 and recompiled again.
Everything s
The way I understand it, pass by reference in php is determined in the
function definition and not the function call. Something like:
You used to be able to pass by reference at run time. But I see that is
no longer allowed... :| So I guess that makes my question moot.
Thanks for your help.
On Thursday 06 April 2006 12:24 pm, Chris Boget wrote:
> Is there a way to test to see if a function argument was passed by
> reference instead of by value?
>
> thnx,
> Chris
The way I understand it, pass by reference in php is determined in the
function definition and not the function call. Some
Is there a way to test to see if a function argument was passed by reference
instead of by value?
thnx,
Chris
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Brian Dunning wrote:
Is there a way to get PHP to not throw warnings on a per-script basis?
Yes.
ini_set()
--
John C. Nichel IV
Programmer/System Admin (ÜberGeek)
Dot Com Holdings of Buffalo
716.856.9675
[EMAIL PROTECTED]
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, vis
At 1:04 PM -0400 4/6/06, Robert Cummings wrote:
On Thu, 2006-04-06 at 11:50, tedd wrote:
Regardless of speed, I find that switch is much easier to write and
debug than if/elseif -- which, regardless of my shortcomings, I never
use.
Umm, that you NEVER use elseif I think is strongly coupled
because you have nothing in $session_id.
On 4/6/06, Diana Castillo <[EMAIL PROTECTED]> wrote:
> If I have nothing in $session_id, why do I get this message when I do a
> session_start() ?
> Warning: session_start(): The session id contains invalid characters, valid
> characters are only a-z, A-Z a
[snip]
Is there a way to get PHP to not throw warnings on a per-script basis?
[/snip]
ITFM http://www.php.net/manual/en/ref.errorfunc.php
error_reporting(0);
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Is there a way to get PHP to not throw warnings on a per-script basis?
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
At 07:48 PM 4/5/2006, Ray Hauge wrote:
I have 57 if/elseif/else statements because of all the different
criteria. Is
it considered better programming practice to use if/elseif/else statements
over a switch(true) case (true && false || true || false) syntax?
Here are two seemingly contradicto
[snip]
I am using PHP with Oracle, but not executing stored procedures.
I assume you are already validating the contents of the $addr variable
before you bind it?
Otherwise, no real ideas here...
[/snip]
Yes, I am validating the contents of the variable. I have ton some
reading, but details a
I am using PHP with Oracle, but not executing stored procedures.
I assume you are already validating the contents of the $addr variable
before you bind it?
Otherwise, no real ideas here...
-B
Jay Blanchard wrote:
[snip]
I have a stored procedure in Oracle;
p_BILL_TO_ADDRESS1 IN C
[snip]
I have a stored procedure in Oracle;
p_BILL_TO_ADDRESS1 IN CONT_ADDRESS.ADDRESS1%TYPE
Default NULL, --VC(50)
With a condition;
IF p_BILL_TO_ADDRESS1 is NULL THEN
Raise_Application_Error(-20100,'BILL TO Address cannot be a NULL
Value');
END IF;
I have some PHP code that tri
On Thu, 2006-04-06 at 11:50, tedd wrote:
>
> Regardless of speed, I find that switch is much easier to write and
> debug than if/elseif -- which, regardless of my shortcomings, I never
> use.
Umm, that you NEVER use elseif I think is strongly coupled with your
shortcomings :l But I'm not judging
On Thu, 2006-04-06 at 09:08, John Wells wrote:
> > ...Either way,
> > internally, switch behaves like if/elseif/else and generally only
> > provides an advantage with respect to code organization or if you want a
> > particular condition to drop through to other case blocks.
> >
>
> Considering th
At 7:01 PM -0700 4/5/06, Jai Rangi wrote:
Greeting,
I hope this is the right place for this. If not please guide me.
I am having problem with my "Form". Code is below. I want to
generate an error message if the required fields are not filled. If
they are filled then I want to add them to the da
Is there a certain file type that you are looking for? You could restrict
it to that, also you could chown the uploaded files to a no/low privelage
user.
On 4/6/06, Wolf <[EMAIL PROTECTED]> wrote:
>
> They all ended in .rar
>
> Files named:
> b.php.rar
> jpg.php.rar
> c99.php.rar
>
> Dan McCullou
On Thu, 2006-04-06 at 15:36 +0200, Jochem Maas wrote:
> >
> > Been tryin to figure out regex and have found some tutorials but some
> > have made things clear and others have confused me.
> >
We are busy building up a library of commonly used regex's on a wiki,
check it out at http://fsiu.uwc.a
At 4:27 PM -0700 4/5/06, Tanner Postert wrote:
I don't think it's built in, so I was wondering ya'll would recommend as the
best way to convert int to string, not basic type casting, but converting to
the english word the int represents.
Something like this:
5 = "Five" or 20 = "Twenty"
Tanner
They all ended in .rar
Files named:
b.php.rar
jpg.php.rar
c99.php.rar
Dan McCullough wrote:
> WHat types of files were they, if you dont mind me asking?
>
> On 4/6/06, Wolf <[EMAIL PROTECTED]> wrote:
>> I woke up on thanksgiving morning to find my server hacked through a
>> hole left by a file u
> Original Message
> Subject: Re: [PHP] IF or SWITCH
> From: "John Wells" <[EMAIL PROTECTED]>
> Date: Thu, April 06, 2006 6:08 am
> To: php-general@lists.php.net
>
> > ...Either way,
> > internally, switch behaves like if/elseif/else and generally only
> > provides an advantage
At 7:48 PM -0700 4/5/06, Ray Hauge wrote:
Hello World! wait, not coding... (sorry, long night)
Okay, I finally finished hashing out all the logic for a very complex set of
rules to determine what "type" an application should be set to. I won't bore
you with the details of it, but the question i
>
> Cool Chris I'm going to take a look at that movie. Dallas there is a
> section at the top of the ini file that lists some directives and
> their status to address security or performance issues, but as Chris
> mentioned your code could be as big of a risk as anything so pay
> attention to th
Cool Chris I'm going to take a look at that movie. Dallas there is a
section at the top of the ini file that lists some directives and
their status to address security or performance issues, but as Chris
mentioned your code could be as big of a risk as anything so pay
attention to that.
On 4/6/0
On Thursday 06 April 2006 6:19 am, Angelo Zanetti wrote:
> Hi guys
>
> Been tryin to figure out regex and have found some tutorials but some have
> made things clear and others have confused me.
>
> Anyway for a simple query, if I just wanted to check that a variable has
> only text and numeric cha
php.ini-anal-retentive-paranoid.
I'm editing mine for that right now, everything is off, the sever has
a keyboard, mouse, monitor no cd/dvd, no floppy, no usb and is
unplugged from the network, there are 6 security guards that surround
you and they give you 5 minutes on a timer.
On 4/6/06, Kevin
Ashley M. Kirchner wrote:
I'm trying to figure out if there's a tool that can do this
(programmatically) or if someone has some script idea/suggestion for
what I'd like to do. I have several 130px X 130px images (one per day)
that I collect. I'd like to have a script run that will read i
Wolf wrote:
What I am interested in finding out is what the best way is to
make sure that I can rework the upload area to allow upload and
download from it while keeping script kiddies from exploiting
it again.
I can post the scripts
If your scripts are very long, most of us won't take the tim
At 8:01 AM -0600 4/6/06, Ashley M. Kirchner wrote:
I'm trying to figure out if there's a tool that can do this
(programmatically) or if someone has some script idea/suggestion for
what I'd like to do. I have several 130px X 130px images (one per
day) that I collect. I'd like to have a scri
Dallas Cahker wrote:
I was looking to see if there was a quick checklist of settings
for php to be disabled/enabled in the ini file to make the
application more secure.
Although there are some directives worth disabling (register_globals,
magic_quotes_gpc, allow_url_fopen), most vulnerabilitie
WHat types of files were they, if you dont mind me asking?
On 4/6/06, Wolf <[EMAIL PROTECTED]> wrote:
> I woke up on thanksgiving morning to find my server hacked through a
> hole left by a file upload area of my site. I restored the backup and
> placed a few blocks in place on the server, so the
Dallas Cahker wrote:
I was looking to see if there was a quick checklist of settings for php to
be disabled/enabled in the ini file to make the application more secure.
I'm making sure the apps we come out with dont allow sql injections, or form
injections and so forth, I have just seen some pos
http://www.hardened-php.net/advisory_202005.79.html
check this out
On 4/6/06, Wolf <[EMAIL PROTECTED]> wrote:
> I woke up on thanksgiving morning to find my server hacked through a
> hole left by a file upload area of my site. I restored the backup and
> placed a few blocks in place on the serve
marvin hunkin wrote:
Hi.
doing this script for an assignment, and got it basically working.
the only problems are:
1. wen i load the user form, the focus goes to the login button, and not
the first form field.
did try putting one it, did not like it.
so how do i do this?
is there a basic dom
short_open_tag
Dallas Cahker wrote:
What is that called and where in the php.ini file do I enable it? Sorry if
this is a stupid question but since I dont know what its called it makes it
difficult to google it.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http
I would look here for an idea. http://phpsec.org/projects/guide/
I think you'll find many opinions on the matter. One thing to
remember is that once the app goes live your job doesnt stop there
you'll need to be just as stringent about security and checking logs
and errors as you were when you we
Short tags in the php.ini file.
On 4/6/06, Dallas Cahker <[EMAIL PROTECTED]> wrote:
> What is that called and where in the php.ini file do I enable it? Sorry if
> this is a stupid question but since I dont know what its called it makes it
> difficult to google it.
>
>
--
PHP General Mailing Lis
On 06/04/06, Angelo Zanetti <[EMAIL PROTECTED]> wrote:
>
> Anyway for a simple query, if I just wanted to check that a variable has only
> text and numeric characters would I do something like this
> (i want it to fail if it finds a symbol eg: + - { " etc...):
>
> echo "REG result: " . preg_match
I woke up on thanksgiving morning to find my server hacked through a
hole left by a file upload area of my site. I restored the backup and
placed a few blocks in place on the server, so they can get in, but they
can't get out ;)
What I am interested in finding out is what the best way is to
What is that called and where in the php.ini file do I enable it? Sorry if
this is a stupid question but since I dont know what its called it makes it
difficult to google it.
I'm trying to figure out if there's a tool that can do this
(programmatically) or if someone has some script idea/suggestion for
what I'd like to do. I have several 130px X 130px images (one per day)
that I collect. I'd like to have a script run that will read in the
folder(d) where thes
Jochem Maas wrote:
Angelo Zanetti wrote:
Hi guys
Been tryin to figure out regex and have found some tutorials but some
have made things clear and others have confused me.
Anyway for a simple query, if I just wanted to check that a variable
has only text and numeric characters would I do so
I was looking to see if there was a quick checklist of settings for php to
be disabled/enabled in the ini file to make the application more secure.
I'm making sure the apps we come out with dont allow sql injections, or form
injections and so forth, I have just seen some posts about magic quotes an
Thanks for the information
On 4/4/06, Chrome <[EMAIL PROTECTED]> wrote:
>
> I let GC and cookie expiration handle ending the session... The cookie was
> only set for 15 minutes
>
> Dan
>
>
> ---
> http://chrome.me.uk
>
>
> -Original Message-
> From: Dallas Cahker [mailto:[E
Thanks makes it alot easier to follow.
On 4/4/06, Dallas Cahker <[EMAIL PROTECTED]> wrote:
>
> Okay I'll look at that.
>
> What about switching to setting the password in md5 format in the cookie
> rather then a regular id. I might not call the cookie password but to me in
> thinking about it see
On 4/6/06, Robert Cummings <[EMAIL PROTECTED]> wrote:
>
> On Thu, 2006-04-06 at 02:29, Joe Wollard wrote:
> > The main perk to using switch over if
> > statements is speed (Google can back this up). The reason it's faster is
> > because it's simpler by design and is able to jump directly to the cas
John Taylor-Johnston wrote:
Scrolling back and forward through my PHP generated search
engine, my browser (FF) alerts to remind me that I have post
data. What kind of header can I add to avoid it doing that?
I have a pretty detailed article about this on my web site:
http://shiflett.org/articl
Angelo Zanetti wrote:
Hi guys
Been tryin to figure out regex and have found some tutorials but some
have made things clear and others have confused me.
Anyway for a simple query, if I just wanted to check that a variable has
only text and numeric characters would I do something like this
(i
At 11:08 PM 4/5/2006, John Taylor-Johnston wrote:
How can I take enquiry:
or
and parse its value to come up with this to do a boolean search
+"john"
or
+"john" +"johnston"
John,
If you're splitting your search string into discrete words, most
search engine logic doesn't require quotes.
This one time, at band camp, Angelo Zanetti <[EMAIL PROTECTED]> wrote:
should I enable magic_quotes_gpc or should I use
> addslashes() and stripslashes()?
magic quotes is disabled by default these days, and does not make for portable
code.
It is removed in PHP6
Kevin
--
"Democracy is two wol
This one time, at band camp, Peter Hoskin <[EMAIL PROTECTED]> wrote:
> Want a complete solution? $88 AUD/hr.
Or simply use this function...
http://phpro.org/examples/Numbers-to-Words.html
and my rates are only $85 AUD/hr ;)
Kevin
--
"Democracy is two wolves and a lamb voting on what to have
err, that should be
http://phpro.org/examples/Convert-Numbers-to-Words.html
Kevin
--
"Democracy is two wolves and a lamb voting on what to have for lunch.
Liberty is a well-armed lamb contesting the vote."
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php
If I have nothing in $session_id, why do I get this message when I do a
session_start() ?
Warning: session_start(): The session id contains invalid characters, valid
characters are only a-z, A-Z and 0-9 at
C:\Inetpub\wwwroot\usr\local\global\php\online\InterfaceManager.php line
149.
--
Diana
Hi guys
Been tryin to figure out regex and have found some tutorials but some have made
things clear and others have confused me.
Anyway for a simple query, if I just wanted to check that a variable has only
text and numeric characters would I do something like this
(i want it to fail if it fi
> Hi.
Hi!
> doing this script for an assignment, and got it basically working.
> the only problems are:
>
Assignment, eh? Generally, folks on the PHP list will not do your homework
for you. But I'll offer some light nudges in the right direction for you.
>
> 1. wen i load the user form, the
> ...Either way,
> internally, switch behaves like if/elseif/else and generally only
> provides an advantage with respect to code organization or if you want a
> particular condition to drop through to other case blocks.
>
Considering this is regarding an if/else with ***57*** conditional
checks,
Hi.
I have written a script which outputs a rather large ZIP file ( 200
MB ) by collecting a large amount of PDF files and html pages. When
the script is done, the available amount of free memory has decreased
by about 20 - 30%. Running 'periodic' on my machine ( Apple Xserve G5
with Mac
marvin hunkin wrote:
> Hi.
> doing this script for an assignment, and got it basically working.
> the only problems are:
>
>
> 1. wen i load the user form, the focus goes to the login button, and not
> the first form field.
> did try putting one it, did not like it.
> so how do i do this?
That'
marvin hunkin wrote:
> Hi.
> doing this script for an assignment, and got it basically working.
> the only problems are:
>
>
> 1. wen i load the user form, the focus goes to the login button, and not
> the first form field.
> did try putting one it, did not like it.
> so how do i do this?
That'
Angelo Zanetti wrote:
> Hi guys.
> ... So on my live server should I enable
> magic_quotes_gpc or should I use addslashes() and stripslashes()?
>
> Thanks in advance.
In addition to all the other replies saying that magic quotes are evil
which I completely agree with, it should also be noted that
On Thu, 2006-04-06 at 03:06, Joe Wollard wrote:
>
> um. Did you just stick you tounge out at me? (jk) Actually, Rob brings
Yes, though I forgot the smiley as I'm apt to do :)
> up a good point. switch statements are not always faster. Here's an
> example from
> http://www.php.net/manual/en/contr
The main perk to using switch over if
statements is speed
speed of development and ease of reading. Otherwise, it all ends up
the same under the bonnet afaik
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
1. Look at this: http://javascript.internet.com/forms/form-focus.html
2. See Below
3. Take a look at this function:
http://www.php.net/manual/en/function.date.php
-B
marvin hunkin wrote:
Hi.
doing this script for an assignment, and got it basically working.
the only problems are:
1.
On Thu, 2006-04-06 at 02:29, Joe Wollard wrote:
> The main perk to using switch over if
> statements is speed (Google can back this up). The reason it's faster is
> because it's simpler by design and is able to jump directly to the case that
> evaluates to true, whereas an if statement needs to eva
John Taylor-Johnston wrote:
Scrolling back and forward through my PHP generated search engine,
my browser (FF) alerts to remind me that I have post data.
What kind of header can I add to avoid it doing that?
Else what is the problem?
John
Try using GET
--
PHP General Mailing List (http://www.ph
81 matches
Mail list logo