php-general Digest 2 Apr 2007 10:22:28 -0000 Issue 4711
Topics (messages 251903 through 251910):
Re: simple page not found 404 script - PHP
251903 by: Zoltán Németh
Re: HTDIGEST FILE FORMAT
251904 by: Buesching, Logan J
Re: finding the index name of an associative array
251905 by: Myron Turner
Re: Ide help needed
251906 by: Davi
251907 by: Arno Kuhl
pg_last_error()
251908 by: "Miguel J. Jiménez"
Re: Security Best Practice: typecast?
251909 by: Robin Vickery
Re: 0x9f54
251910 by: Seak, Teng-Fong
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:
php-general@lists.php.net
----------------------------------------------------------------------
--- Begin Message ---
2007. 03. 30, péntek keltezéssel 19.01-kor Dwayne Heronimo ezt írta:
> wierd.. your code is behaving exactly the same as mine did.
> it will display the error and the page.. but both at the same time :S
>
> it is working but somehow it continues to execute.
>
> http://arubaguide.org/arubaguide/categories.php?catcode=art
>
> http://arubaguide.org/arubaguide/categories.php?catcode=blabla
>
>
>
> "Davi" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
> Em Sexta 30 Maro 2007 13:42, Dwayne Heronimo escreveu:
> > Yes but this file does not exist. It is just to use for my queries. so I
> > think I cannot use the file_exists function. Which other function I would
> > use to do this?
> > I already have setup the .htaccess file to point also to a 404 page. but
> > this works only if the URL is totally wrong. like
> > www.arubaguide.org/blabla
> > but not www.arubaguide.org/categories.php?catcode=blabla
> >
> >
>
> Try something like that:
>
> <?php
>
> define("HTML","html/");
>
> define("INC","inc/");
>
> $ext = array ("php","html","htm");
>
> $exists = false;
>
> foreach($ext as $file_ext) {
>
> if ( file_exists ( HTML.$_GET["catcode"].".".$file_ext ) )
> {
> $exists = true;
> break;
> }
> }
>
> if ( ! ( $exists ) ){
> include ( "404.php" );
don't forget the exit here:
exit;
that's why it displays all the stuff later on
greets
Zoltán Németh
> }
> else {
> include ( HTML.$_GET["catcode"].".".$file_ext );}
>
> ?>
>
>
> --
> Davi Vidal
> [EMAIL PROTECTED]
> [EMAIL PROTECTED]
> --
>
> Agora com fortune:
> "[Peter and his friends have formed a rock band and are performing at a
> prison]
> Peter Griffin: [shouting into microphone] Hello, Cleveland!
> Cleveland: Hello, Peter.
> Quagmire: [clapping drum sticks together] One, two, three, *four*!
> Peter Griffin: [small amount of time passes] Oh, my God. We don't know any
> songs. [prisoners get mad] "
>
--- End Message ---
--- Begin Message ---
The password is the hash of the entire thing, not just the password. So
it would be the following:
echo "admin:trac:".md5('admin:trac:admin');
-Logan
-----Original Message-----
From: Manolet Gmail [mailto:[EMAIL PROTECTED]
Sent: Sunday, April 01, 2007 5:28 PM
To: php-general@lists.php.net
Subject: HTDIGEST FILE FORMAT
hi, i want a php script to create htdigest file...
the correct file is:
username:admin
digest:trac
pass:admin
admin:trac:71ea86385b35d5e2575b0baec1904ded
i try to do it on php with this:
echo "admin:trac:".md5("admin");
but i receive this:
admin:trac:21232f297a57a5a743894a0e4a801fc3
how is the htdigest format?
--- End Message ---
--- Begin Message ---
Man-wai Chang wrote:
> myarray=array()
> myarray['a']=1
> myarray['b']=1
> myarray['c']=1
>
> Is there an iterative way to find out the array index values ('a', 'b'
> and 'c') of myarray?
>
>
array *array_keys* ( array $input [, mixed $search_value [, bool $strict]] )
*array_keys()* returns the keys, numeric and string, from the /input/
array.
http://www.php.net/manual/en/function.array-keys.php
--
_____________________
Myron Turner
http://www.room535.org
http://www.bstatzero.org
http://www.mturner.org/XML_PullParser/
--- End Message ---
--- Begin Message ---
Em Sexta 30 Março 2007 14:39, [EMAIL PROTECTED] escreveu:
> I am a beginer with php and i need to know which IDE is best suited
> under windows and linux both
>
> i have seen dreamweaver working and have heard about GoLive too but don't
> know whichone to go for
>
> can you please help me decide
> and also
> tell me some other IDE's if possible
Does anyone knows any IDE for PHP like VisualStudio.net?
TIA
--
Davi Vidal
[EMAIL PROTECTED]
[EMAIL PROTECTED]
--
Agora com fortune:
"Beneath this stone lies Murphy,
They buried him today,
He lived the life of Riley,
While Riley was away."
--- End Message ---
--- Begin Message ---
Nuspere's PHPEd. Highly recommended. I looked at all the alternatives,
including Zend and Eclipse, and IMO PHPEd is superior. And faster
performance is a real bonus.
Arno
-----Original Message-----
From: Davi [mailto:[EMAIL PROTECTED]
Sent: 02 April 2007 02:50
To: php-general@lists.php.net
Subject: Re: [PHP] Ide help needed
Em Sexta 30 Março 2007 14:39, [EMAIL PROTECTED] escreveu:
> I am a beginer with php and i need to know which IDE is best suited
> under windows and linux both
>
> i have seen dreamweaver working and have heard about GoLive too but don't
> know whichone to go for
>
> can you please help me decide
> and also
> tell me some other IDE's if possible
Does anyone knows any IDE for PHP like VisualStudio.net?
TIA
--
Davi Vidal
[EMAIL PROTECTED]
[EMAIL PROTECTED]
--
Agora com fortune:
"Beneath this stone lies Murphy,
They buried him today,
He lived the life of Riley,
While Riley was away."
--
--- End Message ---
--- Begin Message ---
Hello, the question is simple... After I try to free a resultset in
postgres using pg_free_result() it returns false ... Can I use
pg_last_error() to get the cause of this last error? I have tried but it
returns an empty string and I do not know if it is because I cannot use
pg_last_error() thus. Thanks a lot...
--
Miguel J. Jiménez
Programador Senior
Área de Internet/XSL/PHP
[EMAIL PROTECTED]
----------------------------------------------------
ISOTROL
Edificio BLUENET, Avda. Isaac Newton nº3, 4ª planta.
Parque Tecnológico Cartuja '93, 41092 Sevilla.
Teléfono: 955 036 800 - Fax: 955 036 849
http://www.isotrol.com
"Killing is often a part of life. What's hypocritical is to condemn, and then make
allowances when the situation suits."
Utu-Noranti Pralatong (Farscape 4x17 - A Constellation Of Doubt)
--- End Message ---
--- Begin Message ---
On 01/04/07, Richard Lynch <[EMAIL PROTECTED]> wrote:
So, after a recent thread on data filtering, I'm wondering...
Is this "good enough" in ALL possible Unicode/charset situations:
$foo_id = (int) $_POST['foo_id'];
$query = "insert into whatever(foo_id) values($foo_id)";
Or is it possible, even theoretically possible, for a sequence of:
[-]?[0-9]+
to somehow run afoul of ANY charset?
Depends how standard you want to get: '--' is the SQL comment
character, so if you have something like:
SELECT ... WHERE column-$foo > 3 AND password='$password'
and foo is a negative integer, then in ANSI SQL, you've just commented
out everything after 'column', leaving you with:
SELECT ... WHERE column
Mysql protects you from that by demanding a space after the comment sequence.
-robin
--- End Message ---
--- Begin Message ---
Man-wai Chang wrote:
>>> MySQL? MSSQL? PgSQL?
>>> Tijnema
>>>
>> It seems he wanted to insert a Chinese character with that hex value.
>>
>
> Yes... I tried the insert with PHP, including the use of
> mysql_real_escape_string(), but MySQL still gave me a blank only.
Well, this doesn't seem to be PHP related. You'd better ask your
answer in MySQL forum/mailing-list.
But have you tried to insert your value using MySQL Query Browser?
If you can't do that there, it's a problem which is unrelated to PHP.
On the other hand, I remember you talked about the type of that
column to be char(2). Have you specified what encoding it's using?
Moreover, I hope you're not using legacy encoding like Big5 or GB. Use
Unicode (UTF-8) if your database is a brand new one.
Good luck
----------
* Zoner PhotoStudio 8 - Your Photos perfect, shared, organised!
www.zoner.com/zps
You can download your free version.
--- End Message ---