[PHP] DB connection problem

2004-03-19 Thread Khalid Judeh
hallo all,
i have a problem connecting to  mysql db, i use the following code to connect to the 
db:
$DBConn = mysql_connect("localhost", "myusername","mypassword") or die("Could not 
connect to database, " . mysql_error());
 mysql_select_db("db1", $DBConn);

and i get the following error:
Warning: mysql_connect(): Client does not support authentication protocol requested by 
server; consider upgrading MySQL client in c:\inetpub\wwwroot\php\db_test.php on line 
33
Could not connect to database, Client does not support authentication protocol 
requested by server; consider upgrading MySQL client
 
thanks in advance
 



Khaled Jouda 

cell. phone: 0163-2382758 
fax: 1(801)439-1253 
alternative email: [EMAIL PROTECTED]
_


Do you Yahoo!?
Yahoo! Mail - More reliable, more storage, less spam

Re: [PHP] Thank you, Microsoft! Now I need an alternate loginmethod

2004-03-19 Thread Marek Kilimajer
Chris de Vidal wrote:
I searched this group and someone suggested disabling Apache's keepalives
but I don't have root on this box so that option is out.
Try to send "Connection: close" header, then the connection will be 
terminated by the client.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Thank you, Microsoft! Now I need an alternateloginmethod

2004-03-19 Thread Marek Kilimajer
Chris de Vidal wrote:
Can you confirm GET strings are also encrypted?
I'm sure they do. But try to clear the URI from IE's history (using 
javascript), both username and password will be there.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Php mailer

2004-03-19 Thread Mrs. Geeta Thanu
Hi all,

I am new to php and want to use php for our mailing program.
At present we have servlet program what the users access it thru web
interface and use for sending,receiving and composing mails.

But it is giving lot of problem and hence I want to shift the entrie
system to PHP .

Please give me advice how to start with or URL of some example scripts
etc.


Thanks and Regds
Geetha

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Php mailer

2004-03-19 Thread Evan Nemerson
IMP and SquirrelMail are both nice.

http://www.horde.org/imp/
http://www.squirrelmail.org



On Friday 19 March 2004 03:40 pm, Mrs. Geeta Thanu wrote:
> Hi all,
>
> I am new to php and want to use php for our mailing program.
> At present we have servlet program what the users access it thru web
> interface and use for sending,receiving and composing mails.
>
> But it is giving lot of problem and hence I want to shift the entrie
> system to PHP .
>
> Please give me advice how to start with or URL of some example scripts
> etc.
>
>
> Thanks and Regds
> Geetha

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Mysql look up and then rename

2004-03-19 Thread Brent Clark
Hi all

for some reason I seem to be having a problem having to do a look up in a mysql table
and the take the result of that query and then perform the right action.

Basically I need to do a look up for a file 
for example

10006547.pdf.

I then need to:
if no letter of the alphabet is present.
then make it 10006547A.pdf
else if does exist, make it 10006547B.pdf

for some reason I cant seem to pull this off, add I honestly thought is would be a 
simple function.

If anyone knows of  a URL or can help in anyway

I really would appreciate it

Kind Regards
Brent Clark


Re: [PHP] too much trimming

2004-03-19 Thread Marek Kilimajer
Ivan Sergio Borgonovo wrote:
I've simple code like this:

-- begin --
#!/usr/bin/php -q

hey my name is 
and
I feel good
-- end --
newlines are ignored after php block end tags (?>)

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


php-general Digest 19 Mar 2004 11:26:30 -0000 Issue 2655

2004-03-19 Thread php-general-digest-help

php-general Digest 19 Mar 2004 11:26:30 - Issue 2655

Topics (messages 180926 through 180950):

Re: E-mail account disabling warning.
180926 by: Jeffrey Shaw
180930 by: Chris W. Parker
180931 by: Ryan A

Re: Retain form values...
180927 by: Chris W. Parker
180928 by: Shane McBride
180929 by: Chris W. Parker
180936 by: Shane McBride
180937 by: Tom Rogers
180938 by: John W. Holmes

Passing Access Variables to a Browser
180932 by: Tyger Gilbert
180933 by: Tyger Gilbert
180934 by: Tyger Gilbert
180935 by: Justin Patrin

Re: Javascript Mouseover Help
180939 by: Jake McHenry
180940 by: Tom Rogers

Re: Solution to display the results of an exec/system + rsh command
180941 by: Frédéric Martin

Guru's advice needed [Security: SQL injection]
180942 by: Tariq Murtaza
180944 by: Chris Shiflett

DB connection problem
180943 by: Khalid Judeh

Re: Thank you, Microsoft! Now I need an alternate loginmethod
180945 by: Marek Kilimajer
180946 by: Marek Kilimajer

Php mailer
180947 by: Mrs. Geeta Thanu
180948 by: Evan Nemerson

Mysql look up and then rename
180949 by: Brent Clark

Re: too much trimming
180950 by: Marek Kilimajer

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 ---
There seems to be a lot of these going around.

Remember:

Don't open attachments unless you are sure of what you are getting!

Keep your Virus Scan program up to date.  Any database over 14 days old
should be updated.

Many times, the Headers and addresses of the messages are faked.  This is
easy to do.  So if there is any doubt, send an e-mail to an address listed
at the website the email originates from and ask for more information.

These virus writers are relying on people to unwittingly open their
attachments so they may go through with their evil plans.

Is there any Php.net official on this list that can shed more light on this
please

JL Shaw
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.620 / Virus Database: 399 - Release Date: 3/11/2004
--- End Message ---
--- Begin Message ---
Jeffrey Shaw 
on Thursday, March 18, 2004 3:20 PM said:

> Is there any Php.net official on this list that can shed more light
> on this please

nothing to shed light on really... (unless i've missed something.)

it's not from the people at php.net so your best bet is to just ignore
it.



chris.
--- End Message ---
--- Begin Message ---

On 3/19/2004 12:20:17 AM, Jeffrey Shaw ([EMAIL PROTECTED]) wrote:
> There seems to be a lot of these going around.
>
> Remember:
>
> Don't open attachments unless you are sure of what you are getting!
>
> Keep your Virus Scan program up to date.  Any database over 14 days old
> should be updated.
>
> Many times, the Headers and addresses of the messages are faked.  This is
> easy to do.  So if there is any doubt, send an e-mail to an address listed
> at the website the email originates from and ask for more information.
>
> These virus writers are relying on people to unwittingly open their
> attachments so they may go through with their evil plans.
>
> Is there any Php.net official on this list that can shed more light on
this
> please

This is not just from the php.net site, I've gotten this email from a number
of our sites and had to
email all our members informing them not to open any attachments even if it
seems we sent it, if
we require them to download anything it will be AT our site and not
attached.

They ARE getting sneakier arnt they?

-Ryan
--- End Message ---
--- Begin Message ---
Shane McBride 
on Thursday, March 18, 2004 2:50 PM said:

> How about passing the form variables to a hidden field on the next
> page? I used this for several page forms before.

that won't work because he's not doing a multi-page form. he just wants
to send the form data back *if* the form fails his validation.



chris.
--- End Message ---
--- Begin Message ---
Gotcha. I typically use javascript to validate before the form is posted to
validate.

shane

-Original Message-
From: Chris W. Parker [mailto:[EMAIL PROTECTED]
Sent: Thursday, March 18, 2004 6:23 PM
To: Shane McBride; PHP
Subject: RE: [PHP] Retain form values...


Shane McBride 
on Thursday, March 18, 2004 2:50 PM said:

> How about passing the form variables to a hidden field on the next
> page? I used this for several page forms before.

that won't work because he's not doing a multi-page form. he just wants
to send the form data back *if* the form fails hi

Re: [PHP] Mysql look up and then rename

2004-03-19 Thread Marek Kilimajer
Brent Clark wrote:

Hi all

for some reason I seem to be having a problem having to do a look up in a mysql table
and the take the result of that query and then perform the right action.
Basically I need to do a look up for a file 
for example

10006547.pdf.

I then need to:
if no letter of the alphabet is present.
then make it 10006547A.pdf
else if does exist, make it 10006547B.pdf
for some reason I cant seem to pull this off, add I honestly thought is would be a simple function.

If anyone knows of  a URL or can help in anyway
preg_match() to find the letter (or no letter if there is not any)
ord() will give you the ASCII value of the character, you can now add 1 
  to it, watch for the ceiling (Z)
chr() to give you the letter from the new ASCII value

Don't forget to lock your table to be safe from simultaneously running 
requests:
myqsl_query('LOCK TABLES tbl_name [AS alias] {READ | WRITE}');

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Randomly expired session cookies

2004-03-19 Thread Ari-Pekka Tingander
Hi!

We are getting weird behaviour from PHP function session_start().

More or less randomly, the cookie expired date is in the past, something 
like "expires=Wed, 30-Apr-1902 10:05:03 GMT". (As it happens, this is 
very closely twice the current time in seconds since the epoch, if you 
do some signed/unsigned conversion.)

This keeps happening on two systems with different versions of PHP4, 
Apache and Red Hat Linux. The problem seems to be load-related, because 
it disappears on weekends. Graceful restart helps temporarily.

Has anyone heard of something like this?

--
Ari-Pekka Tingander
Song Networks, Finland
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] how does array_multisort work?(!??)

2004-03-19 Thread Marek Kilimajer
David T-G wrote:

Hi, all --

I have an array like

  $a =
array
(
  'key' =>
array
(
  'title' => "Topic Title",
  'content' => "Topic Content",
),
...
) ;
and I'd like to sort the whole thing not on the keys but on the titles.
It sounds like array_multisort should do exactly what I want, but I can't
seem to get it to work.
usort is what you need:

function cmp($a, $b)
{
   if ($a['title'] == $b['title']) {
   return 0;
   }
   return ($a['title'] < $b['title']) ? -1 : 1;
}
usort($a, "cmp");

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


RE: [PHP] PHP On Solaris 9 - MySQL Problem

2004-03-19 Thread trlists
On 18 Mar 2004 Cameron B. Prince wrote:

> I'm saying I can't connect to another machine running 3.x or 4.x from PHP,
> but I can connect to either via the v4.x mysql command line client that's
> installed on the webserver with PHP.

OK, I get it.  It certainly sounds like it could be a problem with the 
client libraries.  Did you build PHP on the web server or was it built 
for you?

Have you tried connecting from a different machine using PHP (to test 
if it is just the build of PHP on that one machine that's the problem)?

--
Tom

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] CMS advice needed

2004-03-19 Thread php4
Hi guys,

I need to setup a "Content Management System"

Which is the best from the many?

Thanks

Nico

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] CMS advice needed

2004-03-19 Thread Jay Blanchard
[snip]
I need to setup a "Content Management System"

Which is the best from the many?
[/snip]

http://catb.org/~esr/faqs/smart-questions.html
http://www.glasshaus.com/bookInfo.asp?bookId=65

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: Php mailer

2004-03-19 Thread Harry Wiens
Nocc is the app you're looking for
take a look at http://nocc.sourceforge.net/


"Mrs. Geeta Thanu" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
news:[EMAIL PROTECTED]
> Hi all,
>
> I am new to php and want to use php for our mailing program.
> At present we have servlet program what the users access it thru web
> interface and use for sending,receiving and composing mails.
>
> But it is giving lot of problem and hence I want to shift the entrie
> system to PHP .
>
> Please give me advice how to start with or URL of some example scripts
> etc.
>
>
> Thanks and Regds
> Geetha

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] DB connection problem

2004-03-19 Thread John W. Holmes
From: "Khalid Judeh" <[EMAIL PROTECTED]>

> i have a problem connecting to  mysql db, i use the following code to
connect to the db:
> $DBConn = mysql_connect("localhost", "myusername","mypassword") or
die("Could not connect to database, " . mysql_error());
>  mysql_select_db("db1", $DBConn);
>
> and i get the following error:
> Warning: mysql_connect(): Client does not support authentication protocol
requested by server; consider upgrading MySQL client in
c:\inetpub\wwwroot\php\db_test.php on line 33
> Could not connect to database, Client does not support authentication
protocol requested by server; consider upgrading MySQL client

Have you considered upgrading the MySQL client?

:)

It sounds like MySQL was upgraded on the server, but PHP was not recompiled
to support the version. For example, I do not think that MySQL clients v3
will work with MySQL 4.1 and above. Check with the MySQL site to be sure.

---John Holmes...

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] gmdate

2004-03-19 Thread BigMark
Hi an anyone help here, i have a shoutbox that displays the time with each
message but the time is 8 hours behind my time.

//here are the headers//
header("Expires: ".gmdate("D, d M Y H:i:s")."GMT");
header("Cache-Control: no-cache, must-revalidate");
header("Pragma: no-cache");

I have tried a few things but they didnt work and the coder hasnt replied, i
live in Perth Western Australia

thankyou!

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Thank you, Microsoft! Now I need an alternate loginmethod

2004-03-19 Thread Adam Voigt
Well, there is a MD5 javascript app, if you put a onclick method on your
submit button, to call the javascript, and md5 the password, you could
use a GET request to pass the username and md5'd password into your
login script.

I'm not sure if there is an equivalent SHA javascript, but if there is,
I would use that instead.


On Thu, 2004-03-18 at 14:38, Chris de Vidal wrote:
> Adam Voigt said:
> > If I ran XP I might be able to do that. From reading the security
> > release my MS, it sounds like some times the POST request gets b0rked,
> 
> Yep.
> 
> > if this is the case, I'm not sure there's much that can be done about
> > it.
> 
> ...except find an alternate login method, which is my question.  I know
> this isn't a problem on every site else there'd be far more uproar against
> Microsoft for not pushing it out.  Surely there must be another method
> other than the code I showed this mailing list.
> 
> I searched this group and someone suggested disabling Apache's keepalives
> but I don't have root on this box so that option is out.
> 
> At this point it's either disable passwords or find an alternate method;
> we're angering customers (thank you Microsoft!).
> 
> /dev/idal
-- 

Adam Voigt
[EMAIL PROTECTED]

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] gmdate

2004-03-19 Thread Thijs Lensselink
BigMark wrote on vrijdag 19 maart 2004 14:58:

> Hi an anyone help here, i have a shoutbox that displays the time with
> each message but the time is 8 hours behind my time.
> 
> //here are the headers//
> header("Expires: ".gmdate("D, d M Y H:i:s")."GMT");
> header("Cache-Control: no-cache, must-revalidate");
> header("Pragma: no-cache");
> 
> I have tried a few things but they didnt work and the coder hasnt
> replied, i live in Perth Western Australia
> 
> thankyou!

Hey BigMark,
 
Think this will do the trick
 
$timezone=3600*8; // GMT + 8
$date = gmdate("D M Y H:i", time() + $timezone);
 
MvG,
Thijs

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] php/mysql email

2004-03-19 Thread BigMark
I have a sports tipping script and instead of using the admin to close a
round off or input results ,would it be possible to do it via an email.

Mark

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] PHP encounters Access Violation

2004-03-19 Thread Ben Ramsey
What does this error mean?

PHP has encountered an Access Violation at 0177A8B4

I get it intermittently from pages in phpOpenTracker that call the 
jpgraph functions.  It's just a blank white page with that error, and 
that doesn't help me out at all.  I'm running Windows Server 2003/IIS 6 
with PHP 5RC1.

--
Regards,
 Ben Ramsey
 http://benramsey.com
 http://www.phpcommunity.org/wiki/People/BenRamsey
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Problems with PHP5 RC1

2004-03-19 Thread memoimyself
I'm writing this message in the hope that some of the people responsible for PHP5 will 
eventually read it.

I have just downloaded and installed PHP5 RC1 according to the instructions found in 
the package (which are basically the same as for previous releases of PHP). Before 
relating the problems I've had, I should say that I've been using PHP for about four 
years 
now and have successfully performed dozens of installations, under Windows, Linux 
and FreeBSD, so I'm not exactly a newbie having a go at his first install.

I'm trying to run PHP5 RC1 on a Windows 2000 test server with Apache 2.0.47.

Upon installation, when I first started Apache again, I got an error message to the 
effect 
that php4ts.dll could not be found in the c:\winnt\system32 directory. This is curious 
for 
two reasons: first and foremost, if anything is missing, it should be php5ts.dll, not 
php4ts.dll; second, php4ts.dll never used to be in the system32 directory and that 
never 
caused any problems. But it's no use cursing PHP5, so I copied php4ts.dll to the 
system32 directory and stopped getting the error message. Not a pretty solution, 
though.

I then edited php.ini to load the extensions I need, and noticed that the php_domxml 
extension is no longer an option, so I assumed that DOM XML is now bundled with 
PHP. As a matter of course, phpinfo() tells me that DOM/XML is enabled and that the 
libxml version is 2.5.11. However, when trying to use domxml_version(), 
domxml_new_doc(), domxml_open_mem() or any other DOM XML function, I get a "call 
to undefined function" error. If these functions now have new names, they're not 
listed in 
the online documentation.

Am I doing something seriously wrong or are these problems with PHP5 RC1?

Thanks,

Erik


Re: [PHP] E-mail account disabling warning.

2004-03-19 Thread Rasmus Lerdorf
On Fri, 19 Mar 2004 [EMAIL PROTECTED] wrote:

> > Dear user  of  e-mail server  "Php.net",
> >
> > We warn you about some  attacks on  your e-mail account. Your computer
> > may contain viruses, in order to keep  your computer and e-mail account
> >  safe, please,  follow the instructions.
> >
> > Pay  attention on attached file.
> >
> > For security purposes the attached file is password  protected.
> > Password is "86855".
> >
> > Have a good day,
> >The Php.net team   http://www.php.net
>
> Wtf, why am i receiving a virus ? Please admins can you prevent this, looks
> generic, add domain to title say its from domain, fuckkers.

We would love to prevent this.  You can help us out.  Here are the steps
we need everyone in the world to take to prevent this from happening:

 1. Everyone needs to stop using Windows
 2. Everyone has to grow a brain

A simple 2-step cure to most of the problems we face today.

-Rasmus

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Problem uploading large files via PHP (20+ MB)

2004-03-19 Thread Schonrock III, Keith H
All,

I am attempting to upload a large file via PHP to a web server running
Windows XP Pro IIS 5.1 and I am having some problems.  I have been trying to
find the right combination of settings in the php.ini file and elsewhere to
get large files to upload properly, but I keep getting a DNS error in
Internet Explorer 6 that shows up after about 12MB or 12.5MB of a 21.7MB
file has been transferred.  

When I looked at the IIS website connection timeout it was set at 900
seconds.  I have tried many different variations in the php.ini settings
file with little success.  I have tried using the "8M" format and also the
full out Byte count for size fields in the php.ini file.  I can upload files
that are smaller that 10 MB (I tested with one that was 9MB earlier) with no
problem.  Here are my most recent relevant settings in my php.ini file (that
I know of):

  max_execution_time = 3600
  max_input_time = 3600
  memory_limit = 104857600
  post_max_size = 104857600
  upload_max_filesize = 104857600

Does anyone have any ideas?  Am I missing something else?  If you need any
more information that I left out please let me know.  My code for the php
files is located below this message.  Any help is greatly appreciated!

Thanks,
Keith

-Sending php file:




This is a test document


 Send this file: 
 




-Receiving php file:



";
if (move_uploaded_file($_FILES['userfile']['tmp_name'], $uploadfile)) {
   print "File is valid, and was successfully uploaded. ";
   print "Here's some more debugging info:\n";
   print_r($_FILES);
} else {
   print "Possible file upload attack!  Here's some debugging info:\n";
   print_r($_FILES);
}
print "";

?> 



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] E-mail account disabling warning.

2004-03-19 Thread Firman Wandayandi
1) +0
2) +1

Firman

- Original Message -
From: "Rasmus Lerdorf" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Friday, March 19, 2004 9:42 PM
Subject: Re: [PHP] E-mail account disabling warning.


> On Fri, 19 Mar 2004 [EMAIL PROTECTED] wrote:
>
> > > Dear user  of  e-mail server  "Php.net",
> > >
> > > We warn you about some  attacks on  your e-mail account. Your computer
> > > may contain viruses, in order to keep  your computer and e-mail
account
> > >  safe, please,  follow the instructions.
> > >
> > > Pay  attention on attached file.
> > >
> > > For security purposes the attached file is password  protected.
> > > Password is "86855".
> > >
> > > Have a good day,
> > >The Php.net team   http://www.php.net
> >
> > Wtf, why am i receiving a virus ? Please admins can you prevent this,
looks
> > generic, add domain to title say its from domain, fuckkers.
>
> We would love to prevent this.  You can help us out.  Here are the steps
> we need everyone in the world to take to prevent this from happening:
>
>  1. Everyone needs to stop using Windows
>  2. Everyone has to grow a brain
>
> A simple 2-step cure to most of the problems we face today.
>
> -Rasmus
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Problem uploading large files via PHP (20+ MB)

2004-03-19 Thread Vincent DUPONT
DNS error seems to indicate that you have a connection problem, not a storage or file 
size restriction problem. 
Maybe the IP connection is interrupted. ..
Do you have the same problem when running on Localhost?

Vincent
-Original Message-
From: Schonrock III, Keith H [mailto:[EMAIL PROTECTED]
Sent: vendredi 19 mars 2004 15:48
To: [EMAIL PROTECTED]
Subject: [PHP] Problem uploading large files via PHP (20+ MB)


All,

I am attempting to upload a large file via PHP to a web server running
Windows XP Pro IIS 5.1 and I am having some problems.  I have been trying to
find the right combination of settings in the php.ini file and elsewhere to
get large files to upload properly, but I keep getting a DNS error in
Internet Explorer 6 that shows up after about 12MB or 12.5MB of a 21.7MB
file has been transferred.  

When I looked at the IIS website connection timeout it was set at 900
seconds.  I have tried many different variations in the php.ini settings
file with little success.  I have tried using the "8M" format and also the
full out Byte count for size fields in the php.ini file.  I can upload files
that are smaller that 10 MB (I tested with one that was 9MB earlier) with no
problem.  Here are my most recent relevant settings in my php.ini file (that
I know of):

  max_execution_time = 3600
  max_input_time = 3600
  memory_limit = 104857600
  post_max_size = 104857600
  upload_max_filesize = 104857600

Does anyone have any ideas?  Am I missing something else?  If you need any
more information that I left out please let me know.  My code for the php
files is located below this message.  Any help is greatly appreciated!

Thanks,
Keith

-Sending php file:




This is a test document


 Send this file: 
 




-Receiving php file:



";
if (move_uploaded_file($_FILES['userfile']['tmp_name'], $uploadfile)) {
   print "File is valid, and was successfully uploaded. ";
   print "Here's some more debugging info:\n";
   print_r($_FILES);
} else {
   print "Possible file upload attack!  Here's some debugging info:\n";
   print_r($_FILES);
}
print "";

?> 



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Image info?

2004-03-19 Thread Mike Mapsnac
Using php function I was able to get such information about image such as:
size(width, height), type of image and size of the image.
Can I get more information about image?

Thanks

_
FREE pop-up blocking with the new MSN Toolbar – get it now! 
http://clk.atdmt.com/AVE/go/onm00200415ave/direct/01/

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] confused about logic

2004-03-19 Thread Aaron Wolski
Hi All,
 
I have input for where users can enter order numbers in which to search
the database to find results matching their entry.
 
To enter multiple order numbers they can comma separate like:
1,34,21,34,54
 
What I need to do is take those numbers and make a query that would like
like:
 
(cart_id in('1','34','21','34','54') OR id in('1','34','21','34','54'))
 
ANY idea how I can accomplish this?
 
Thanks all!
 
Aaron
 


Re: [PHP] Problem uploading large files via PHP (20+ MB)

2004-03-19 Thread Raditha Dissanayake
Vincent DUPONT wrote:

DNS error seems to indicate that you have a connection problem, not a storage or file size restriction problem. 
Maybe the IP connection is interrupted. ..
Do you have the same problem when running on Localhost?
 

IE more often than not shows DNS failure message regardless of the 
actual error.

 max_execution_time = 3600
 max_input_time = 3600
 memory_limit = 104857600
 post_max_size = 104857600
 upload_max_filesize = 104857600
Does anyone have any ideas?  Am I missing something else?  If you need any
more information that I left out please let me know.  My code for the php
files is located below this message.  Any help is greatly appreciated!
 

Try with mozilla it will give you a better error message. Enable logging 
if you have not already done so and take a look at the log file that 
will give you a better idea about what exactly is going wrong.



--
Raditha Dissanayake.
---
http://www.radinks.com/upload/ 
Drag and Drop Upload thousands of files and folders in a single
transfer.  (HTTP or FTP) 

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] confused about logic

2004-03-19 Thread David O'Brien
At 10:45 AM 3/19/2004, you wrote:
Hi All,

I have input for where users can enter order numbers in which to search
the database to find results matching their entry.
To enter multiple order numbers they can comma separate like:
1,34,21,34,54
Let's say you place these in the following variable



$ordernum = "1,34,21,34,54";

$orderarr = explode(",", $ordernum);

$count = 0;
foreach ($orderarr as $id) {
if ($count == 0) {
$orderstr = $orderstr . " '" . $id . "' ";
} else {
$orderstr = $orderstr . ", '" . $id . "' ";
}
$count++;
}
$query = "(cart_id in($orderstr) OR id in($orderstr))";
echo $query;

?>

What I need to do is take those numbers and make a query that would like
like:
(cart_id in('1','34','21','34','54') OR id in('1','34','21','34','54'))

ANY idea how I can accomplish this?

Thanks all!

Aaron



David G. O'Brien
Web Services Coordinator / Systems Administrator
NACCRRA
The Nation's Network of Child Care Resource & Referral
1319 F Street NW, Suite 500
Washington, DC 20004
(202) 393-5501 ext. 113
(202) 393-1109 fax
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] confused about logic

2004-03-19 Thread Chris Boget
> To enter multiple order numbers they can comma separate like:
> 1,34,21,34,54
> What I need to do is take those numbers and make a query that would like
> like:
> (cart_id in('1','34','21','34','54') OR id in('1','34','21','34','54'))
> ANY idea how I can accomplish this?

$string = "'" . implode( "', '", explode( ',', '1,34,21,34,54' )) . "'";

echo "(cart_id in( $string ) OR id in( $string ))";

Chris


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] IIS error message (ISAPI)

2004-03-19 Thread Vincent DUPONT
Hi,
 
I have this message in the IIS log file :
Out-of-process+ISAPI+extension+request+failed.
 
This appeared when I passed my web applicaion from Mysql to Oracle batabase. I guess 
this is related to ISAPI module that cannot handle the load or processes needed by 
Oracle.
 
PLease help.
 
Vincent


RE: [PHP] Image info?

2004-03-19 Thread Jay Blanchard
[snip]
Using php function I was able to get such information about image such
as:
size(width, height), type of image and size of the image.

Can I get more information about image?
[/snip]

RTFM http://us4.php.net/image 

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] confused about logic

2004-03-19 Thread John W. Holmes
From: "Aaron Wolski" <[EMAIL PROTECTED]>

> I have input for where users can enter order numbers in which to search
> the database to find results matching their entry.
>  
> To enter multiple order numbers they can comma separate like:
> 1,34,21,34,54
>  
> What I need to do is take those numbers and make a query that would like
> like:
>  
> (cart_id in('1','34','21','34','54') OR id in('1','34','21','34','54'))

Why do you need to put quotes around integers??

$var = '1,34,21,34,54';

//replace comma with quote,comma,quote and add quotes to beginning and end
$in_clause = "'" . str_replace(',',"','",$var) . "'";

$query = "WHERE (cart_id IN ($in_clause) OR id IN ($in_clause))";

---John Holmes...

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Phrame

2004-03-19 Thread Chris Boget
Is anyone here very familiar with using Phrame?  If so, could
you email me offlist?

thnx,
Chris

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Problem uploading large files via PHP (20+ MB)

2004-03-19 Thread Schonrock III, Keith H
Well, I tried the process with Mozilla and the transfer was blazing fast
compared to IE and it completed successfully with no DNS errors.  IE is very
slow and consistently gets those DNS errors.  I did turn on logging and
found that this error is being produced whenever the DNS error shows up:

  The script started from the URL '/php/upload2.php' with parameters '' has
not responded within the configured timeout period.  The HTTP server is
terminating the script.

Since I need to get IE working with this process I guess my next question is
this:  In IIS 5.1 on Windows XP Pro, how do you increase the "configured
timeout period"?  As I stated before, when I go to the Control
Panels->Administrative Tools->Internet Information Services and look at the
Properties for my Default website the connection timeout is set to "900"
seconds.

Thanks,
Keith

>Vincent DUPONT wrote:
>
>>DNS error seems to indicate that you have a connection problem, not a
storage or file size >restriction problem. 
>>Maybe the IP connection is interrupted. ..
>>Do you have the same problem when running on Localhost?
>>  
>>
>IE more often than not shows DNS failure message regardless of the 
>actual error.
>
>>  max_execution_time = 3600
>>  max_input_time = 3600
>>  memory_limit = 104857600
>>  post_max_size = 104857600
>>  upload_max_filesize = 104857600
>>
>>Does anyone have any ideas?  Am I missing something else?  If you need any
>>more information that I left out please let me know.  My code for the php
>>files is located below this message.  Any help is greatly appreciated!
>>  
>>
>Try with mozilla it will give you a better error message. Enable logging 
>if you have not already done so and take a look at the log file that 
>will give you a better idea about what exactly is going wrong.
>
>-- 
>Raditha Dissanayake.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Image info?

2004-03-19 Thread Firman Wandayandi
Hi Mike,

use getimagesize(), http://www.php.net/manual/en/function.getimagesize.php

Firman

- Original Message -
From: "Mike Mapsnac" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, March 19, 2004 10:30 PM
Subject: [PHP] Image info?


> Using php function I was able to get such information about image such as:
> size(width, height), type of image and size of the image.
>
> Can I get more information about image?
>
> Thanks
>
> _
> FREE pop-up blocking with the new MSN Toolbar - get it now!
> http://clk.atdmt.com/AVE/go/onm00200415ave/direct/01/
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] confused about logic

2004-03-19 Thread Aaron Wolski
Chris!

Thanks so much. This worked perfectly

Aaron

> -Original Message-
> From: Chris Boget [mailto:[EMAIL PROTECTED]
> Sent: March 19, 2004 10:59 AM
> To: Aaron Wolski; [EMAIL PROTECTED]
> Subject: Re: [PHP] confused about logic
> 
> > To enter multiple order numbers they can comma separate like:
> > 1,34,21,34,54
> > What I need to do is take those numbers and make a query that would
like
> > like:
> > (cart_id in('1','34','21','34','54') OR id
in('1','34','21','34','54'))
> > ANY idea how I can accomplish this?
> 
> $string = "'" . implode( "', '", explode( ',', '1,34,21,34,54' )) .
"'";
> 
> echo "(cart_id in( $string ) OR id in( $string ))";
> 
> Chris
> 
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] confused about logic

2004-03-19 Thread Aaron Wolski
Thanks for the time John.

Chris's did the trick. I'll keep yours on hand in case I do happen to
run into problems.

I DO appreciate your help.

Thanks again!

Aaron

> -Original Message-
> From: John W. Holmes [mailto:[EMAIL PROTECTED]
> Sent: March 19, 2004 11:28 AM
> To: Aaron Wolski; [EMAIL PROTECTED]
> Subject: Re: [PHP] confused about logic
> 
> From: "Aaron Wolski" <[EMAIL PROTECTED]>
> 
> > I have input for where users can enter order numbers in which to
search
> > the database to find results matching their entry.
> >
> > To enter multiple order numbers they can comma separate like:
> > 1,34,21,34,54
> >
> > What I need to do is take those numbers and make a query that would
like
> > like:
> >
> > (cart_id in('1','34','21','34','54') OR id
in('1','34','21','34','54'))
> 
> Why do you need to put quotes around integers??
> 
> $var = '1,34,21,34,54';
> 
> //replace comma with quote,comma,quote and add quotes to beginning and
end
> $in_clause = "'" . str_replace(',',"','",$var) . "'";
> 
> $query = "WHERE (cart_id IN ($in_clause) OR id IN ($in_clause))";
> 
> ---John Holmes...
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re[4]: [PHP] days of week

2004-03-19 Thread Michal Migurski
>DC> $sunday = strtotime('1 January 1995'); // That day was a Sunday
>DC>   return strftime("%A", $sunday+(3600*24*$day));
>DC> }
>
>So despite asking for a way to do it without using dates in functions,
>that's exactly what you're doing?
>
>Heh, gotta love this list sometimes.

No need to be rude - you asked for a way to do it without knowing the
specific date. Jan 1 1995 was chosen because the 1st happens to be a
sunday, enabling you to take advantage of localized date functions.

-
michal migurski- contact info and pgp key:
sf/cahttp://mike.teczno.com/contact.html

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] confused about logic

2004-03-19 Thread Chris Boget
> Thanks for the time John.
> Chris's did the trick. I'll keep yours on hand in case I do happen to
> run into problems.
> I DO appreciate your help.

John's solution is actually technically better than mine in that it's only
using
one function call ("str_replace()") and as such only one possible point of
failure whereas mine is using 2 ("explode()" and "implode()") with 2
possible
points of failure.
This is all totally academic but am just pointing out...

Chris

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Retain form values...

2004-03-19 Thread Chris W. Parker
John W. Holmes 
on Thursday, March 18, 2004 7:11 PM said:

> Shane McBride wrote:
>> Actually all form validation is done before the form action takes
>> place, so that way we do not loose input.
> 
> I think you're missing the point. Client side validation is extremely
> easy to bypass. If that's all you're relying on, you're in trouble.

exactly, but i would like to elaborate on this a little by explaining
how it can be bypassed.

if your form is being sent via GET then it's trivial to fudge with the
values in the querystring. therefore if i were to actually mount an
attack i would do the following.

1. fill out the form correctly so that it is submitted.
2. copy the querystring that is created and determine what i want to
change.
3. come back to the site and, this time instead of filling out the form,
i'm going to paste my fudged querystring directly into the address bar.

i've just circumvented your client side validation.

if your form is being sent via POST then it's a little less trivial, but
any web savvy person let alone someone that knows how to attack a
website is not going to be hindered by the increased difficulty in you
using POST.

1. i'll go to the page with your form on it.
2. duplicate your form on my own server without the javascript that
performs the validation.
3. submit the form that resides on my own server.

again i've just circumvented your client side validation.

of course these are very basic examples but i think they work to
illustrate our point.

question for chris shiflett,

i haven't mentioned anything about how to prevent this except to say you
shouldn't rely solely on client side validation. is this topic going to
be brought up in your book? if not (if it hasn't already gone to press)
maybe it should?

question for everyone,

do you think it's a good idea to check the referrer on the second page
or is that unneccessary?




chris.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Thank you, Microsoft! Now I need an alternate loginmethod

2004-03-19 Thread Chris de Vidal
Marek Kilimajer said:
>> I searched this group and someone suggested disabling Apache's
>> keepalives but I don't have root on this box so that option is out.
>
> Try to send "Connection: close" header, then the connection will be
> terminated by the client.

I don't understand... would I place that code in the posted PHP page,
edit_agent.php?

To reiterate, no custom headers are sent with any PHP function unless
there is a failure.  IE bombs on a successful login (when no custom
headers are sent).  I'm not sure where I'd include this custom header or
why.

/dev/idal

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re[5]: [PHP] days of week

2004-03-19 Thread Richard Davey
Hello Michal,

Friday, March 19, 2004, 5:09:12 PM, you wrote:

>>So despite asking for a way to do it without using dates in functions,
>>that's exactly what you're doing?
>>
>>Heh, gotta love this list sometimes.

MM> No need to be rude - you asked for a way to do it without knowing the
MM> specific date. Jan 1 1995 was chosen because the 1st happens to be a
MM> sunday, enabling you to take advantage of localized date functions.

*I* never asked for anything - I just offered a solution to the
original posters issue to which not one word of thanks was offered,
just a "i want it this way now". So, your reply doesn't make sense if
it was intended to be directed at me.

-- 
Best regards,
 Richard Davey
 http://www.phpcommunity.org/wiki/296.html

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Thank you, Microsoft! Now I need an alternate loginmethod

2004-03-19 Thread Marek Kilimajer
Chris de Vidal wrote:
Marek Kilimajer said:

I searched this group and someone suggested disabling Apache's
keepalives but I don't have root on this box so that option is out.
Try to send "Connection: close" header, then the connection will be
terminated by the client.


I don't understand... would I place that code in the posted PHP page,
edit_agent.php?
To reiterate, no custom headers are sent with any PHP function unless
there is a failure.  IE bombs on a successful login (when no custom
headers are sent).  I'm not sure where I'd include this custom header or
why.
Simply execute:

header('Connection: close');

after successful login and before any other output. This is just a shot 
in the dark, it might not help at all.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Session problems...

2004-03-19 Thread Eric Gorr
I thought I had a pretty good handle on sessions, but I can't figure 
out what could possibly be going wrong in this case. I've stripped my 
code down to basically the bear minimum which still reproduces the 
problem, which I included below.

When I visit test1.php with the url:
http://domain&path/test1.php?name=bill&pwd=henry
I see the output:

user = 'bill'
ID= 41699d4461e8fe3a71243bb3cb1c2298'
You were remembered and are now being redirected to the home page. If 
this fails for some reason (and if you are seeing this, it probably 
has), please click here: To Home Page

However, upon redirection to test2.php, I see:
''
31e2cab461dc525ea9a8c22e5d997db5
The session ID appears to have changed. Any idea why?
I can use sessions in other situations with any problems...
test1.php
--

$isRemembered   = false;
$rememberedUser = "";
$username = $_GET[ 'name' ];
$password = $_GET[ 'pwd' ];
$isRemembered   = true;
$rememberedUser = $username;
  $_SESSION[ "validUser" ] = $rememberedUser;
  $sessionID = strip_tags( SID );
  echo "";
  echo "";
echo "";
echo "User Login";
echo "";
echo "";
echo "window.setTimeout( 'window.location=\"http://www.ericgorr.net/advciv/test2.php\";', 5000 );";
echo ""; echo ""; echo ""; echo "user = '" . $_SESSION[ "validUser" ] . "'"; echo "ID= " . session_id() . "'"; echo "You were remembered and are now being redirected to the home page. If this fails for some reason (and if you are seeing this, it probably has), please click here: "; echo "To Home Page"; echo ""; echo ""; ?> -- test2.php -- echo ""; echo ""; echo ""; echo ""; echo "'" . $_SESSION[ "validUser" ] . "'" . session_id() . ""; echo ""; echo ""; ?> -- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: date()

2004-03-19 Thread Andre Cerqueira
is that all?

Khalid Judeh wrote:

hello all,
i am new to php, i am trying to call the date  function this way:

and the result i get is: object18/03/04
any help would be appreciated
 


Khaled Jouda 

cell. phone: 0163-2382758 
fax: 1(801)439-1253 
alternative email: [EMAIL PROTECTED]
_

Do you Yahoo!?
Yahoo! Mail - More reliable, more storage, less spam
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Re: date()

2004-03-19 Thread Eric Gorr
Khalid Judeh wrote:

hello all,
i am new to php, i am trying to call the date  function this way:

and the result i get is: object18/03/04
any help would be appreciated
hummm...very odd. I did the same thing and got:

19/03/04

Can you provide any more details? What version of PHP is being used?

(I would, of course, have seen: '18/03/04' if I had run this yesterday )

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Re: Guru's advice needed ........[Security: SQL injection]

2004-03-19 Thread Andre Cerqueira
you need to ask yourself how the environment that you are using will 
interpret things
if you are sending this query:
"SELECT ... FROM ... WHERE field1='". $_POST['field1'] ."'"

and $_POST['field1'] is:
0' OR field2=0 AND ''='
the resulting string would be:
SELECT ... FROM ... WHERE field1='0' OR field2=0 AND ''=''
if u dont want that to happen, u should escape characters that can be 
interpreted as something that isnt plain data

"SELECT ... FROM ... WHERE field1='". addslashes($_POST['field1']) ."'"
result: SELECT ... FROM ... WHERE field1='0\' OR field2=0 AND \'\'=\''


Tariq Murtaza wrote:

*Dear Friends!*

Can someone shed some light  on how "SQL injection" attack occurs when 
*magic_quotes_gpc *is"ON" and how it prevents when its "OFF". To my 
understanding  apostrophise are escaped automatically in POST/GET/COOKIE 
when its ON, so how it tends towards SQL Injection.

Someone suggested to keep magic_quotes_qpc OFF through .htaccess file 
and use following line of codes to prevent attacks at start of the file...


But unfortunately it does not work for nested POST requests. do anyone 
have better idea?
Secondly why we have to stripslashes while DB (mysql for example) is 
doing it for us on execution and another question arises doesn't it 
prevent from SQL injection attack when apostrophise are escaped in query.

*What is the best practices handling 'quotation marks'  in input string 
and how to prevent SQL injection.

*Looking forward for some advice from panel of experts on forum.
Thanks and have a nice day!*
*Cheers!
*Tariq*

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Session problems...

2004-03-19 Thread John W. Holmes
From: "Eric Gorr" <[EMAIL PROTECTED]>

> When I visit test1.php with the url:
> http://domain&path/test1.php?name=bill&pwd=henry
>
> I see the output:
>
> user = 'bill'
> ID= 41699d4461e8fe3a71243bb3cb1c2298'
> You were remembered and are now being redirected to the home page. If
> this fails for some reason (and if you are seeing this, it probably
> has), please click here: To Home Page
>
> However, upon redirection to test2.php, I see:
> ''
> 31e2cab461dc525ea9a8c22e5d997db5
>
> The session ID appears to have changed. Any idea why?

> 'window.location=\"http://www.ericgorr.net/advciv/test2.php\";', 5000

If I go to "test1.php" at the above URL, I'm redirected to "test2.php" and
my "name" is remembered. If it's not working for you, then the session
cookie must not be getting set correctly or your browser is not accepting
cookies.

You can try passing the session id in the URL.

'window.location=\"http://www.ericgorr.net/advciv/test2.php?"; .
session_name() . '=' . session_id() . "\"', 5000

or

'window.location=\"http://www.ericgorr.net/advciv/test2.php?"; . SID . "\"',
5000

---John Holmes...

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: Problems with PHP5 RC1

2004-03-19 Thread Lester Caine
[EMAIL PROTECTED] wrote:

I'm trying to run PHP5 RC1 on a Windows 2000 test server with Apache 2.0.47.
Mines 2.0.48, but no problem.

Upon installation, when I first started Apache again, I got an error message to the effect 
that php4ts.dll could not be found in the c:\winnt\system32 directory. This is curious for 
two reasons: first and foremost, if anything is missing, it should be php5ts.dll, not 
php4ts.dll; second, php4ts.dll never used to be in the system32 directory and that never 
caused any problems. But it's no use cursing PHP5, so I copied php4ts.dll to the 
system32 directory and stopped getting the error message. Not a pretty solution, 
though.
First - you did change httpd.conf to point at the new module?
Second option, is there something 'extra' in your setup that 
is from PHP4?

I then edited php.ini to load the extensions I need, and noticed that the php_domxml 
extension is no longer an option, so I assumed that DOM XML is now bundled with 
PHP. As a matter of course, phpinfo() tells me that DOM/XML is enabled and that the 
libxml version is 2.5.11. However, when trying to use domxml_version(), 
domxml_new_doc(), domxml_open_mem() or any other DOM XML function, I get a "call 
to undefined function" error. If these functions now have new names, they're not listed in 
the online documentation.
Pass on that, not something I use (yet)

Am I doing something seriously wrong or are these problems with PHP5 RC1?
Only problem I have found is with ADOdb, a change between b4 
and RC1 needed a couple of mods, otherwise I just switch the 
paths between PHP4 and PHP5 and everything works.

--
Lester Caine
-
L.S.Caine Electronic Services
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Failing to Make Oracle Connection via php4.3.4

2004-03-19 Thread Martin McCormick
I am using php4.3.4 Build 5 on FreeBSD4.7 and am totally
stuck.  For about a week, I have been trying to write a php script
that will access an Oracle server on a different system over the
network.

I can't seem to let php know where to look to find all the
contact information such as is supposed to reside in tnsnames.ora.  At
least, I haven't found a place to put tnsnames.ora that tns
recognizes.

I got word from the maintainer of the FreeBSD port of php4.3
that the oci8 functions are not accessible.  The exact words were:

> You cannot build and use the oci8 extension. You may only use the oracle 
> extension.

I do have the ora_x functions such as ora_logon but I am not
even sure how far I can get.

The database server uses an Oracle8I data base.  I am also not
using php in a web development setting, but will be using it to get
and put data via SQL statements in to the Oracle server.

I have the IP address of the server and the port number, all
of which I put in to the tnsnames.ora file and which I planted in
about every directory that might possibly work.  None did.

Here is the test script command I am running followed by the
sqlnet.log output.  Rarely have I seen a diagnostic that says so much
and tells me so little about what I may have failed to do.:-)

Test script follows with server name changed to protect the innocent:

#!/usr/local/bin/php


Here's what happens.  Lines have been broken to fit the screen:

Fatal OSN connect error 12545, connecting to:

(DESCRIPTION=(ADDRESS=(PROTOCOL=beq)(PROGRAM=oracle)
(ARGV0=oracle)(ARGS='(DESCRIPTION=(LOCAL=YES)(ADDRESS=(PROTOCOL=beq)))
')(DE

  VERSION INFORMATION:
TNS for Intel SVR4 UNIX: Version 2.3.2.1.0 - Production
Oracle Bequeath NT Protocol Adapter for Intel SVR4 UNIX: Version
2.3.2.1.0 - Production
  Time: 19-MAR-04 11:17:55
  Tracing not turned on.
  Tns error struct:
nr err code: 12206
TNS-12206: Message 12206 not found; No message file for
product=NETWORK, facility=TNS
ns main err code: 12545
TNS-12545: Message 12545 not found; No message file for
product=NETWORK, facility=TNS
ns secondary err code: 12560
nt main err code: 515
TNS-00515: Message 515 not found; No message file for
product=NETWORK, facility=TNS

Martin McCormick WB5AGZ  Stillwater, OK 
OSU Information Technology Division Network Operations Group

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Session problems...

2004-03-19 Thread Eric Gorr
At 1:58 PM -0500 3/19/04, John W. Holmes wrote:
From: "Eric Gorr" <[EMAIL PROTECTED]>

 When I visit test1.php with the url:
 http://domain&path/test1.php?name=bill&pwd=henry
 I see the output:

 user = 'bill'
 ID= 41699d4461e8fe3a71243bb3cb1c2298'
 You were remembered and are now being redirected to the home page. If
 this fails for some reason (and if you are seeing this, it probably
 has), please click here: To Home Page
 However, upon redirection to test2.php, I see:
 ''
 31e2cab461dc525ea9a8c22e5d997db5
 The session ID appears to have changed. Any idea why?

 'window.location=\"http://www.ericgorr.net/advciv/test2.php\";', 5000
If I go to "test1.php" at the above URL, I'm redirected to "test2.php" and
my "name" is remembered. If it's not working for you, then the session
cookie must not be getting set correctly or your browser is not accepting
cookies.
Was the session id the same?

I am using Mozilla 1.7a and can use the 'Manage Stored Cookies' 
feature to see that it is accepting the cookie. The cookies contains 
the correct session id, displayed from test1.php. When I get to 
test2.php, the session id is different.

Again, I can use sessions without any problems in other situations 
with my site, so I do not believe there is a problem with my browser 
accepting cookies.

Do you have any other ideas?

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Re: Problems with PHP5 RC1

2004-03-19 Thread Red Wingate
I'm running RC1 on Win2k 2.0.47 without any problems. Make sure u updated
your PATH settings as some folders got renamed or moved. Add /path/to/php
and /path/to/php/dlls to your PATH setup. Switch 'extensions' to 'ext' in your
php.ini as well if you still have an old version from an old PHP5 beta or PHP4
release.

Otherwise consult the updated install.txt for more information

Am Freitag, 19. März 2004 20:23 schrieb Lester Caine:
> [EMAIL PROTECTED] wrote:
> > I'm trying to run PHP5 RC1 on a Windows 2000 test server with Apache
> > 2.0.47.
>
> Mines 2.0.48, but no problem.
>
> > Upon installation, when I first started Apache again, I got an error
> > message to the effect that php4ts.dll could not be found in the
> > c:\winnt\system32 directory. This is curious for two reasons: first and
> > foremost, if anything is missing, it should be php5ts.dll, not
> > php4ts.dll; second, php4ts.dll never used to be in the system32 directory
> > and that never caused any problems. But it's no use cursing PHP5, so I
> > copied php4ts.dll to the system32 directory and stopped getting the error
> > message. Not a pretty solution, though.
>
> First - you did change httpd.conf to point at the new module?
> Second option, is there something 'extra' in your setup that
> is from PHP4?
>
> > I then edited php.ini to load the extensions I need, and noticed that the
> > php_domxml extension is no longer an option, so I assumed that DOM XML is
> > now bundled with PHP. As a matter of course, phpinfo() tells me that
> > DOM/XML is enabled and that the libxml version is 2.5.11. However, when
> > trying to use domxml_version(), domxml_new_doc(), domxml_open_mem() or
> > any other DOM XML function, I get a "call to undefined function" error.
> > If these functions now have new names, they're not listed in the online
> > documentation.
>
> Pass on that, not something I use (yet)
>
> > Am I doing something seriously wrong or are these problems with PHP5 RC1?
>
> Only problem I have found is with ADOdb, a change between b4
> and RC1 needed a couple of mods, otherwise I just switch the
> paths between PHP4 and PHP5 and everything works.
>
> --
> Lester Caine
> -
> L.S.Caine Electronic Services

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] RE: Guru's advice needed ........[Security: SQL injection]

2004-03-19 Thread Marek Kilimajer
Matt Chatterley wrote:
In addition to protecting against SQL Injection, has anyone here
experimented with detecting and recording attempts at injection?
I've been pondering checking strings which come directly from user input for
sql keywords (and possibly using regexps to check for potential SQL Syntax
fragments), but before I begin, I thought asking would benefit me, if
someone with more experience has already tried this...
This might be an interesting social study :-)

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] RE: Guru's advice needed ........[Security: SQL injection]

2004-03-19 Thread John W. Holmes
From: "Marek Kilimajer" <[EMAIL PROTECTED]>

> Matt Chatterley wrote:
> > In addition to protecting against SQL Injection, has anyone here
> > experimented with detecting and recording attempts at injection?
> >
> > I've been pondering checking strings which come directly from user input
for
> > sql keywords (and possibly using regexps to check for potential SQL
Syntax
> > fragments), but before I begin, I thought asking would benefit me, if
> > someone with more experience has already tried this...
>
> This might be an interesting social study :-)

It's been mentioned here before, but a good idea is to log any kind of
validation errors that you get from user data. That should catch general
mistakes and attempts at cross site scripting / SQL injection, depending
upon your validation.

The real usefulness comes from using those logs to identify areas that are
"difficult" for your regular users to complete. If you're constantly ending
up with validation errors in a date field, then it must not be clear what
formats you accept or maybe you need to accept more formats. Same thing with
text in a number field, and vice-versa. Use the validation logs to determine
how effective your site/forms/etc are.

---John Holmes...

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Segment fault

2004-03-19 Thread Doug Dalton
I am writting a php script that will be used in production,  it connects 
to a imap server gets all the headers and stores them in a db:

Here is where it is crashing

0x28258ede in mm_cache () from /usr/local/lib/libc-client4.so.8

(gdb) bt
#0  0x28258ede in mm_cache () from /usr/local/lib/libc-client4.so.8
#1  0x2825b9a2 in mail_elt () from /usr/local/lib/libc-client4.so.8
#2  0x0809af8e in zif_imap_headers (ht=1, return_value=0x113196a4,
   this_ptr=0x0, return_value_used=1)
   at /usr/home/ddalton/src/php-4.3.4/ext/imap/php_imap.c:1048
#3  0x081c2b06 in execute (op_array=0x82acb24)
   at /usr/home/ddalton/src/php-4.3.4/Zend/zend_execute.c:1616
#4  0x081b13a9 in zend_execute_scripts (type=8, retval=0x0, file_count=3)
   at /usr/home/ddalton/src/php-4.3.4/Zend/zend.c:884
#5  0x08179f5b in php_execute_script (primary_file=0xbfbff6fc)
   at /usr/home/ddalton/src/php-4.3.4/main/main.c:1729
#6  0x081c8fa9 in main (argc=2, argv=0xbfbff76c)
   at /usr/home/ddalton/src/php-4.3.4/sapi/cli/php_cli.c:819
#7  0x0806af85 in _start ()
it appears to run out of memory in the c-client, increasing the memory 
limit does not resolve the issue here are the key elements of the code:

include '../config.php';

while($row = $results->fetchRow(DB_FETCHMODE_ASSOC))
{
$cnt=0;
$successful=false;
extract ($row);
$connectstr=connectstr($bmserver,$bmssl,$bmtype);
$mbox = imap_open("\{$connectstr}", "$bmusername", "$bmpassword", 
OP_READONLY );
$list = imap_list($mbox, "\{$server}", "*");

 if (is_array($list)) {
  reset($list);
   while (list($key, $val) = each($list))
   {
@imap_reopen($mbox,  $val, OP_READONLY );
 if ( $mbox === false )
  {
 $mbox = imap_open("\{$connectstr}$val", "$bmusername", 
"$bmpassword",  OP_READONLY );
  }
   $headers = @imap_headers($mbox);

   $numEmails = sizeof($headers);
if ($numEmails!=0 && is_array($headers))
{
 for($i = 0; $i < $numEmails; $i++)
 {
 $mailHeader = @imap_headerinfo($mbox, $i);
 $from = $mailHeader->fromaddress;
 $fromar=split(",",$from);
 $xfrom=sizeof($fromar);
for ($y=0; $y < $xfrom; $y++)
 {
 $emails=parseEmailString($fromar[$y]);
 if (insertemail ($emails))
   $successful=true;
 }
 }
}
   }
  }

}

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] What does it take to give a good technical presentation?

2004-03-19 Thread John W. Holmes
Since I'm fresh back from php|cruise, I thought I'd comment and ask for
comments on what it takes to give a good technical presentation. I'm
planning on writing about this topic in my next php|architect column, so be
aware that anything said here may appear in it.

This is in no way a jab at any of the php|cruise presenters. Most of them
did a good job and I had issues with some of them, but hell, they were doing
it and I wasn't. Good info was put out either way.

These are presented in random order, as they come to me and may overlap.
Please add your own comments and stories. General presentation comments
are fine, but try to focus on the problems or tips that help out with
technical / programming type presentations.

1) Rehearse: This is a must. You have to run through your presentation a
couple times and preferably in front of other people so they can provide
feedback. Some people are really good at impromptu speaking and can wing it,
but it still doesn't hurt to run through it just to see how long it takes.
If you're given an hour for a presentation, don't rehearse a 1.5 hour
presentation! When you run over it delays everything after you, too. If
you're the one planning a conference, you can't necessarily plan for extra
time between sessions / presentations, either. If you think you may run over
on time, let the planner know. Maybe you can go last so you don't mess
anyone else up?

2) Dry Run: As important as rehearsing before hand is doing a dry run of the
presentation in the actual place where you'll be giving the presentation and
preferably with the actual equipment you'll be using. What looks good on
your CRT monitor doesn't always look good from a projector (or whatever
display system they have). Do you have all of the cables you need to show
your presentation? Do the colors show up (especially yellows and oranges).
Can you read the fonts from the front and back of the room? Do you need a
microphone?

3) Typing Code: Don't type code during your presentation. I'd bet money that
everyone watching you already knows how to type. If it's a PHP conference,
I'd bet they know how to type PHP, too. We don't need you to show us how.
When you begin a presentation by opening up a text editor and typing



, I'm walking out. Either work the code (or snippets of it) into your
slides, or open up a text editor and show an already completed file. If you
need to make or illustrate changes to the code, either put that on
subsequent slides or load sequential files where the code is already
completed.

4) Text Editors: If you're going to use one, make sure you can adjust the
text size. Again, what looks good and easy to read on your monitor may not
during the actual presentation. Also take note of how long your lines and
entire scripts are. Scrolling left and right or many pages down can be a
pain during the middle of a presentation. Try to have as much code open as
you can and learn / make shortcuts to get back and forth between it and your
presentation that way your audience is not waiting on you.

5) Have a Buddy: This kind of goes along with all of the above suggestions;
try to have a buddy that can help you rehearse and give your presentation.
If you rehearse well enough, you can have your buddy flipping slides and
scrolling at the right times without you having to say "next slide" or
anything else. If you _really_ have to type, like filling out a form for
example (as a demo), then have your buddy doing that while you're explaining
things or make changes while you explain why he's doing so and what the
results will be (for example). Hell, you can even make your buddy the bad
guy that keeps you on track and on time and cuts off questions when
necessary.

6) Questions: Speaking of questions, try to pause between each slide and at
least look up to see if anyone has any questions. Too man people get their
nose caught in the computer or looking at their slides that they miss people
who want to ask a question. If you want to hold all questions until the end,
make sure you say so, but understand that this will be hard for the audience
to do. Also, realize that a large amount of questions may push you over your
time. Don't be afraid to cut questions off when your time is up or when you
really need to get to your next slide. If it's important, they'll find you
or ask when there is more time. IMO, the audience likes to have face-to-face
time with presenters when they have questions, anyhow, so try to make
yourself available.

7) Time: Time is your enemy.  This is why you rehearse and try to stay on
schedule, even with questions. If you realize that you have more info to
present than planned, keep in touch with whom ever is planning the
conference / meeting / etc and request more time. You may or may not get it.
Maybe you can be moved to last so that if you run over, you're not affecting
presenters after you.

8) Graphics and Transitions: This one will probably raise some arguments,
but I don't see much a need for pretty gr

Re: [PHP] Image info?

2004-03-19 Thread Rob Adams
"Jay Blanchard" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]

>>RTFM http://us4.php.net/image

I was reading the ... manual a little while ago, and I could've sworn I came
across a part that said:
'ATFNG'

We may have an infinite loop going.

  -- Rob

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Session problems...

2004-03-19 Thread Eric Gorr
Ah HA! I knew I wasn't crazy...well, pretty sure... ;-)

I figured out why my sessions were behaving so oddly.

I was accessing test1.php via:

  http://ericgorr.net/...

In test1.php, I was then redirecting to test2.php via

  http://www.ericgorr.net/...

Apparently, with Mozilla and Safari, php sessions sees these as two 
different domains and therefore cannot resume the session since the 
session IDs are stored under two different domains. (ok, poor wording 
here...feel free to make it more accurate)

However, with Internet Explorer is apparently a bit more lenient in 
these matters and I never got a failure.

So, I can change the redirection to:

  http://ericgorr.net/...

or I can visited test1.php via:

  http://www.ericgorr.net/...

and things will work.

Now, to solve the problem in the general case, it would seem 
necessary to pass the session id around. However, I am hoping that 
someone can suggest a better solution.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] What does it take to give a good technical presentation?

2004-03-19 Thread Chris Shiflett
--- "John W. Holmes" <[EMAIL PROTECTED]> wrote:
> Since I'm fresh back from php|cruise, I thought I'd comment and ask
> for comments on what it takes to give a good technical presentation.
> I'm planning on writing about this topic in my next php|architect
> column, so be aware that anything said here may appear in it.

I've considered writing about this before. Good topic. :-)

> 1) Rehearse: This is a must. You have to run through your
> presentation a couple times and preferably in front of other people
> so they can provide feedback.

Even if you can't reherse in front of other people, running through it by
yourself and actually saying it out loud can help you determine where you
stand on time. You want to be able to keep a relaxed pace during a
presentation, because going through anything quickly will leave almost
everyone confused, no matter how simple the topic seems to you. You also
don't want to be out of material half-way through.

> 2) Dry Run: As important as rehearsing before hand is doing a dry
> run of the presentation in the actual place where you'll be giving
> the presentation and preferably with the actual equipment you'll be
> using.

I don't think this is as important, but maybe it's because I always
present from my own laptop. The only thing you want to keep in mind is
that it is practically impossible to have font that is too large. Text
that is too large is much better than text that is too small.

Use a HUGE font size.

> Do the colors show up (especially yellows and oranges).

Use high contrast and never depend on accurate colors.

> Can you read the fonts from the front and back of the room?

I can answer for you: no! Make your font size larger. :-)

> Do you need a microphone?

A good conference organizer should have microphones in any rooms large
enough to warrant them.

> 3) Typing Code: Don't type code during your presentation.

Why not? From my experience, people appreciate live demonstrations of the
techniques you're discussing. I think you need to only be concerned with
two things:

1. Make your font HUGE! Seriously, if you're going to do anything from the
command line, make your font so big that it's cumbersome to you. Do this
before you start presenting, just in case someone asks a question that you
can better demonstrate through live demo.

2. Make any example painfully simple. If it's not simple, it needs to be
prepared ahead of time, as John suggests.

> 4) Text Editors: If you're going to use one, make sure you can adjust
> the text size.

Make it HUGE! :-) People that can't read it won't necessarily speak up,
and why make them?

> 6) Questions: Speaking of questions, try to pause between each slide
> and at least look up to see if anyone has any questions.

You should be looking up almost the entire time. In fact, you should
almost never, ever read from a slide anyway. I think there is nearly a
100% literate rate among conference attendees. Let them read the slides;
you discuss.

> If you want to hold all questions until the end, make sure you say
> so, but understand that this will be hard for the audience to do.

Don't even try this. I've often has question and answer periods at the
end, but I've yet to have a question. People want to ask questions when
they think of them, and when your presentation is over, people want to do
one of two things:

1. Leave (number one answer)
2. Come ask you a question face-to-face

> 8) Graphics and Transitions: This one will probably raise some
> arguments, but I don't see much a need for pretty graphics and
> transitions.

Count me as arguing. :-)

Pictures are good. Better are pictures that illustrate whatever it is you
are discussing. If you have slide after slide of bulleted lists, you're
talk is going to be boring. I hate boring talks.

> 9) Make Slides Available: This one should be a no brainer, but make
> sure people can get to your slides after the presentation, especially
> if they contain code.

The exception is, of course, if you're not allowed to (such as an
ApacheCon tutorial).

> 10) Uh: Uhmmm... Ahhh  This is what practicing is for. Try to
> avoid excessive "uhmms" and "ahhs" and other noise words when you're
> in front of an audience.

I've read (in reference to public speaking) that "uhhh" is encouraged. The
reason people think of this as bad is when they notice it - and this only
happens when you have nothing to say. Dead silence is even worse. So, what
you really need to do is avoid losing your train of thought. :-)

> This certainly isn't all inclusive, so please add to this with your
> own advice and experiences. Thank you.

I should point out that my comments are mostly from the perspective of an
attendee, since I've seen many more presentations than I've given.

I think a better resource than these few emails is Conference Presentation
Judo, a talk given by Mark Jason Dominus:

http://perl.plover.com/yak/presentation/samples/slide001.html

Chris

=
Chris Shiflett - http://shiflett.org/

PHP Secur

Re: [PHP] What does it take to give a good technical presentation?

2004-03-19 Thread John W. Holmes
From: "Chris Shiflett" <[EMAIL PROTECTED]>

> > 3) Typing Code: Don't type code during your presentation.
>
> Why not? From my experience, people appreciate live demonstrations of the
> techniques you're discussing.

Yeah, live demos are great, but I don't want to sit there and watch you type
all of your PHP code. Have it already typed and just load it, explain it,
and run it.

Any time spent typing on the computer is going to be dead time to the
audience, too, and draw your attention away from them.

> > 8) Graphics and Transitions: This one will probably raise some
> > arguments, but I don't see much a need for pretty graphics and
> > transitions.
>
> Count me as arguing. :-)
>
> Pictures are good. Better are pictures that illustrate whatever it is you
> are discussing. If you have slide after slide of bulleted lists, you're
> talk is going to be boring. I hate boring talks.

Maybe this is where my experience in doing briefings to military personnel
vs. doing presentations to civilians would hurt me. :)

If I'm boring and people fall asleep, I can make them do push-ups or
jumping-jacks in the back of the room. heh...

> I think a better resource than these few emails is Conference Presentation
> Judo, a talk given by Mark Jason Dominus:
>
> http://perl.plover.com/yak/presentation/samples/slide001.html

Awesome link w/great info. He agrees with you on the pictures, "even if they
are pointless" he says. :)

Although I would like to hear from other presenters and attendees on what
they think with specific regards to PHP/programming presentations.

---John Holmes...

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] What does it take to give a good technical presentation?

2004-03-19 Thread Chris Shiflett
--- "John W. Holmes" <[EMAIL PROTECTED]> wrote:
> Yeah, live demos are great, but I don't want to sit there and watch
> you type all of your PHP code. Have it already typed and just load
> it, explain it, and run it.

I guess it depends. I agree with you on some level, but I have seen the
live demos work. And, the best ones are often used as answers to a
question from the audience, so preparation ahead of time isn't an option.

If you're speaking from specific experience, the speaker may have stopped
speaking while typing (very bad), typed slow, or had an unnecessarily
complex example.

> Maybe this is where my experience in doing briefings to military
> personnel vs. doing presentations to civilians would hurt me. :)
> 
> If I'm boring and people fall asleep, I can make them do push-ups
> or jumping-jacks in the back of the room. heh...

Actually, I would love to see something crazy like that at a PHP
conference. :-)

> > http://perl.plover.com/yak/presentation/samples/slide001.html
> 
> Awesome link w/great info. He agrees with you on the pictures, "even
> if they are pointless" he says. :)

Yeah, which may be true (he is an excellent speaker, after all), but I
have a hard time agreeing with the pointless part.

> Although I would like to hear from other presenters and attendees on
> what they think with specific regards to PHP/programming
> presentations.

Me, too. I'd be more interested in hearing from attendees than speakers,
in fact.

Chris

=
Chris Shiflett - http://shiflett.org/

PHP Security - O'Reilly
 Coming mid-2004
HTTP Developer's Handbook - Sams
 http://httphandbook.org/
PHP Community Site
 http://phpcommunity.org/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] What does it take to give a good technical presentation?

2004-03-19 Thread John Coggeshall
On Fri, 2004-03-19 at 15:53, John W. Holmes wrote:
> 1) Rehearse: This is a must. You have to run through your presentation a
> couple times and preferably in front of other people so they can provide
> feedback. Some people are really good at impromptu speaking and can wing it,

This is a valid issue, but as a speaker I can tell you that after a few
conferences under my belt things don't always go as planned. There was
one talk in particular on the cruise where I had no choice but to "wing
it" based on what I had in front of me. It happens, 

> 2) Dry Run: As important as rehearsing before hand is doing a dry run of the
> presentation in the actual place where you'll be giving the presentation and
> preferably with the actual equipment you'll be using. What looks good on

I again agree, that too often people use a font that is too small to be
seen and that was something that presenters could have done a better job
with. However when it comes to the cables part, I have to defend the
speakers. The conference had no idea that one projector would have only
an s-video input, and if they had I consider it the job of the
conference to inform us of that -- I've never been to a conference that
didn't provide an vga-input and would personally fully expect to see one
that did. 

> 3) Typing Code: Don't type code during your presentation. I'd bet money that
> everyone watching you already knows how to type. If it's a PHP conference,
> I'd bet they know how to type PHP, too. We don't need you to show us how.
> When you begin a presentation by opening up a text editor and typing

The last session I gave was on Smarty, during which I had 10 slides and
the rest of the talk I was in my IDE doing stuff with code. Given I did
have examples prepared, I did do a fair amount of "typing" during the
talk and from everything I've heard it was a very successful talk. One
of the most successful presentations I've ever seen was given by Don Box
at Microsoft... it was a small group of us and he just started off his
talk by asking for a list of XML-related topics we wanted to hear
about... he wrote them all down on the whiteboard and just started
talking off-the-cuff. One of the most entertaining and educational
presentations I've ever seen. 

> , I'm walking out. Either work the code (or snippets of it) into your
> slides, or open up a text editor and show an already completed file. If you
> need to make or illustrate changes to the code, either put that on
> subsequent slides or load sequential files where the code is already
> completed.

Also, on that note -- attendees seem to really love when things go
wrong. I've been told, see, and actually experienced this phenomenon.
When your trying to give a presentation and something doesn't quite go
as expected, the experience of watching how you solve that problem
(since they probably have experienced the same) is very valuable to
them. It seems counter-intuitive, but many of the best things in the
world often are I find :)

> 5) Have a Buddy: This kind of goes along with all of the above suggestions;
> try to have a buddy that can help you rehearse and give your presentation.
> If you rehearse well enough, you can have your buddy flipping slides and
> scrolling at the right times without you having to say "next slide" or
> anything else. If you _really_ have to type, like filling out a form for
> example (as a demo), then have your buddy doing that while you're explaining
> things or make changes while you explain why he's doing so and what the
> results will be (for example). Hell, you can even make your buddy the bad
> guy that keeps you on track and on time and cuts off questions when
> necessary.

I don't agree with this point. I don't think a side-kick is necessary to
give a good presentation. 

> 8) Graphics and Transitions: This one will probably raise some arguments,
> but I don't see much a need for pretty graphics and transitions. It all
> depends upon your topic and audience, but plain bulleted slides will get
> your point across just as well as fancy flying text overtop of cute pictures
> of your cat. The audience will probably be less distracted. Depending on how

Completely disagree. Although I don't have the pretty transitions (I
don't own a Mac), I am a firm believer in the use of pictures in your
slides. Pictures help people stay interested, even if they aren't
necessarily interested in the particular slide you are discussing..
plus, with the right pictures you can help break the ice between
yourself and the audience - which is invaluable for the encouragement of
audience participation. The audience is going to be distracted by the
laptop in front of them if they don't care about what you have to say at
that very moment -- having them being distracted by something you are
controlling will help recapture their attention when you have something
they are about to say. 

> interesting of a speaker you are, though, maybe you'll need these to keep
> your audience interested. 

[PHP] Blank Page instead of Errors

2004-03-19 Thread Jonathan Duncan
I am baffled.  I really hope someone can save me.

(PHP 4.3.4)

I am getting blank pages (or partial blank pages if my HTML comes before the
PHP) instead of errors.  I know there are errors on the page because I have
specifically put parse errors in my code to see if the server would give me
errors, but instead all I get are blank pages.

I have checked the PHP.INI file and I see this:

error_reporting  =  E_ALL & ~E_NOTICE
display_errors  =  On

I have included different renditions of error_reporting at the top of my
script:

error_reporting(E_ALL)
error_reporting(E_ALL | E_PARSE | E_NOTICE)
error_reporting(E_ALL & E_PARSE & E_NOTICE)

... and some others.  Still nothing.

Is there something that I am missing?  Why can I not see any error messages?

Thank you,
Jonathan Duncan

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Blank Page instead of Errors

2004-03-19 Thread John W. Holmes
Jonathan Duncan wrote:

I am getting blank pages (or partial blank pages if my HTML comes before the
PHP) instead of errors.  I know there are errors on the page because I have
specifically put parse errors in my code to see if the server would give me
errors, but instead all I get are blank pages.
I have checked the PHP.INI file and I see this:

error_reporting  =  E_ALL & ~E_NOTICE
display_errors  =  On
Are you sure that's the right php.ini? Take a look at a phpinfo() page 
to see the actual settings your script is using.

Also, do a quick View Source of the page to make sure the error isn't 
being hidden in an HTML element.

--
---John Holmes...
Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/

php|architect: The Magazine for PHP Professionals – www.phparch.com

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Question on PDF upload

2004-03-19 Thread Jeffrey Lee
Hi all,

I believe many of you know this already.  But, for someone who's this
problem, I'd like to let u know something about file upload.
When u'd like to upload something by POST, if it fails, I will probably to
go edit php.ini's max_file_size value, but if it still fails, then?

Thanks for Raditha Dissanayake who gave out this link:
http://www.radinks.com/upload/config.php

And, if your apache's (Oh, I am using Apache only) and u've got this error
message in your error_log:
Requested content-length of 615950 is larger than configured limit of 524288
Then u may read this:
http://www.faqts.com/knowledge_base/view.phtml/aid/8176
Well, just editing or removing the line "LimitRequestBody", I made it work.
It may only for my case, but hope this helps a few people.

Finally, may I ask a question?  In my case, all of the PDFs that generated
from MS Word + Acrobat can be upload with the content-length=512KB, but the
PDFs generated from PageMaker, its content-length is greater than 512KB, why
the content-lengths are different?

Sorry for my poor english.

Thanks for your help.

Jeffrey




> Hi,
>
> I am sorry about that I didn't mention about the file size of that pdf.
> It's less than 1MB and I have checked my php.ini that it allows
> post_max_size = 8M.  So, in my little knowledge, I think it's alright.
>
> Thanks for your help.
>
> Jeffrey
>
> - Original Message - 
> From: "Raditha Dissanayake" <[EMAIL PROTECTED]>
> To: "Jeffrey Lee" <[EMAIL PROTECTED]>
> Cc: <[EMAIL PROTECTED]>
> Sent: Thursday, March 11, 2004 6:06 PM
> Subject: Re: [PHP] Question on PDF upload
>
>
> > ifIf you can view the file in your reader (before uploading) , the most
> > likely that you have exceeded the upload limit or something related to
> > that. hope you find the artilce at
> > http://www.radinks.com/upload/config.php usefull in configuring your php
> > to handle large uploads.
> >
> > All the baest
> >
> > Jeffrey Lee wrote:
> >
> > >Hi all,
> > >
> > >I am new to this newsgroup, hello all!
> > >
> > >I've written a script for my collueages to upload PDF file to the web
> server
> > >(apache 2.0.40).  I do it via a http form submit.
> > >
> > >Here's the form tag of it
> > > > >method="POST" onSubmit="return chkFields();">
> > >
> > >
> > >All files (PDF, xls) are able to be uploaded properly.  And these can
be
> > >viewed in browser.  For one PDF file, it cannot be uploaded.  When I've
> > >clicked submit, it should submit to upload.php, but for this particular
> pdf,
> > >the browser displays "The Page Cannot Be Found".  I am sure that
> upload.php
> > >is there as when I upload another file, it's working properly, even for
> > >other pdf.
> > >
> > >I would like to ask is it possible that something in that pdf's header
> > >corrupted?  But, I can view that file in my acroread and if I use FTP
to
> > >upload that file, then I can view the file in browser also.  Oh, please
> > >help.
> > >
> > >Cheers,
> > >
> > >Jeffrey
> > >
> > >
> > >
> >
> >
> > -- 
> > Raditha Dissanayake.
> > ---
> > http://www.radinks.com/upload/
> > Drag and Drop Upload thousands of files and folders in a single
> > transfer.  (HTTP or FTP)
> >
> > -- 
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
> >

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Blank Page instead of Errors

2004-03-19 Thread Jonathan Duncan
GENIUS!!

Why didn't I think of that.  You were correct.  The php.ini file that was
being used was elsewhere.  I found it, and restarted apache and now I get
errors!  I knew it was something simple, it always is, after the fact.

Thanks again!
Jonathan Duncan


"John W. Holmes" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Jonathan Duncan wrote:
>
> > I am getting blank pages (or partial blank pages if my HTML comes before
the
> > PHP) instead of errors.  I know there are errors on the page because I
have
> > specifically put parse errors in my code to see if the server would give
me
> > errors, but instead all I get are blank pages.
> >
> > I have checked the PHP.INI file and I see this:
> >
> > error_reporting  =  E_ALL & ~E_NOTICE
> > display_errors  =  On
>
> Are you sure that's the right php.ini? Take a look at a phpinfo() page
> to see the actual settings your script is using.
>
> Also, do a quick View Source of the page to make sure the error isn't
> being hidden in an HTML element.
>
> -- 
> ---John Holmes...
>
> Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/
>
> php|architect: The Magazine for PHP Professionals – www.phparch.com

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Simple question

2004-03-19 Thread webmaster
Im sure this question seems primitive to most of you, im new to using foreach with 
forms my question is how is the best way to keep from getting the submit button from 
comming through with the variables below is my code.



Advertiser Username


Advertiser Password


Advertiser Number Of Clicks Or Signups


Select Advertisement

Paid to click
Paid to signup






 $value)   
   { 
echo "'$value',"; 
}
}
?>
Thanks in addition for any help


Re: [PHP] Simple question

2004-03-19 Thread John W. Holmes
webmaster wrote:

how is the best way to keep from getting the
> submit button from comming through with the variables

Don't name it?

Just remember that users can send _any_ variable they want through a 
form... blindly looping through and accepting $_POST as a whole is 
probably a bad idea.

--
---John Holmes...
Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/

php|architect: The Magazine for PHP Professionals – www.phparch.com

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Simple question

2004-03-19 Thread Richard Davey
Hello,

Saturday, March 20, 2004, 6:08:36 AM, you wrote:

w> Im sure this question seems primitive to most of you, im new to
w> using foreach with forms my question is how is the best way to keep
w> from getting the submit button from comming through with the
w> variables below is my code.

Two ways:

1) If you don't need to have a name for your submit button, then
removing this element will stop it appearing in the $_POST array in
the first place. If all you want to do is change the text of the
submit button, use the value="" attribute instead of name="".

2) If you DO need the name (because of JavaScript or something) then
just place a check in your foreach loop to ignore the $key called
"go".

-- 
Best regards,
 Richard Davey
 http://www.phpcommunity.org/wiki/296.html

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: gmdate

2004-03-19 Thread David Robley
[EMAIL PROTECTED] (Bigmark) wrote in
news:[EMAIL PROTECTED]: 

> Hi an anyone help here, i have a shoutbox that displays the time with
> each message but the time is 8 hours behind my time.
> 
> //here are the headers//
> header("Expires: ".gmdate("D, d M Y H:i:s")."GMT");
> header("Cache-Control: no-cache, must-revalidate");
> header("Pragma: no-cache");
> 
> I have tried a few things but they didnt work and the coder hasnt
> replied, i live in Perth Western Australia
> 
> thankyou!
> 

>From the looks of the code, it is intended to show time in GMT - ie, 
Greenwich Mean Time which is coincidentally 8 hours behind Sandgroper time.

If you want local time, change gmdate to date, and get rid of the GMT at 
the end so you don't confuse the people at the viewing end.

You might want to have a look at http://au.php.net/date and 
http://au.php.net/gmdate for more information on the date and gmdate 
functions.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Guru's advice needed ........[Security: SQL injection]

2004-03-19 Thread Chris Shiflett
--- Tariq Murtaza <[EMAIL PROTECTED]> wrote:
> Can someone shed some light  on how "SQL injection" attack occurs when 
> *magic_quotes_gpc *is"ON" and how it prevents when its "OFF".

I'm not sure what "it" refers to there. In my opinion, relying on
magic_quotes_gpc is very dangerous. In fact, I just remembered a nice
online resource that will do a better job explaining this than I can:

http://phundamentals.nyphp.org/PH_storingretrieving.php

> Secondly why we have to stripslashes while DB (mysql for example) is 
> doing it for us on execution

It is? What database are you using? I think you're making an erroneous
assumption. Consider this SQL statement:

select * from foo where bar = 'Don't apostrophes screw things up?'

What does bar need to be in order for the where clause to match? Where
does the SQL statement end?

Hope that helps.

Chris

=
Chris Shiflett - http://shiflett.org/

PHP Security - O'Reilly
 Coming mid-2004
HTTP Developer's Handbook - Sams
 http://httphandbook.org/
PHP Community Site
 http://phpcommunity.org/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] RE: Guru's advice needed ........[Security: SQL injection]

2004-03-19 Thread Matt Chatterley
This reply has two purposes.

Firstly, a small suggestion (modest compared to the others which will
follow, no doubt!) - check out mysql_escape_string() - this may be useful to
you.

Secondly, a further question:

In addition to protecting against SQL Injection, has anyone here
experimented with detecting and recording attempts at injection?

I've been pondering checking strings which come directly from user input for
sql keywords (and possibly using regexps to check for potential SQL Syntax
fragments), but before I begin, I thought asking would benefit me, if
someone with more experience has already tried this...


Thanks,

Matt

-Original Message-
From: Tariq Murtaza [mailto:[EMAIL PROTECTED] 
Sent: 19 March 2004 18:41
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: Guru's advice needed [Security: SQL injection]

*Dear Friends!*

Can someone shed some light  on how "SQL injection" attack occurs when 
*magic_quotes_gpc *is"ON" and how it prevents when its "OFF". To my 
understanding  apostrophise are escaped automatically in POST/GET/COOKIE 
when its ON, so how it tends towards SQL Injection.

Someone suggested to keep magic_quotes_qpc OFF through .htaccess file 
and use following line of codes to prevent attacks at start of the file...



But unfortunately it does not work for nested POST requests. do anyone 
have better idea?
Secondly why we have to stripslashes while DB (mysql for example) is 
doing it for us on execution and another question arises doesn't it 
prevent from SQL injection attack when apostrophise are escaped in query.

*What is the best practices handling 'quotation marks'  in input string 
and how to prevent SQL injection.

*Looking forward for some advice from panel of experts on forum.
Thanks and have a nice day!*

*Cheers!
*Tariq*

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php