RE: [PHP] Mass Mail {?!}

2002-04-22 Thread Matthew Walker

I'd recommend this script with a few changes.

?

$Emails = array(Get your list of emails into the array somehow);

for($i=0; $icount($Emails); $i++) {
// send email code
usleep(delay in microseconds);
}

?

Matthew Walker
Senior Software Engineer
ePliant Marketing
 

-Original Message-
From: CDitty [mailto:[EMAIL PROTECTED]] 
Sent: Sunday, April 21, 2002 8:47 PM
To: Liam MacKenzie; PHP
Subject: Re: [PHP] Mass Mail {?!}

How about something like this.

?

$Total_emails = 100;
$i = 1;

if($Total_emails != $i){
// send email code

$i++;
}

?

This should be all you need.  I used something similar to crash my
work's 
email system by accident.  :)  Whoops.

CDitty

At 12:40 PM 4/22/2002 +1000, Liam MacKenzie wrote:
Hey all,
I was just wondering if someone's written a script that will let me
send 
lots of emails to an address, but with a small pause inbetween emails.

And no I'm not using this for spam, I need to test a SMTP server that
I'm 
developing.

Thanks for your help!


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



---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.345 / Virus Database: 193 - Release Date: 4/9/2002
 

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




Re: [PHP] eregi() problem

2002-04-22 Thread Miguel Cruz

On Mon, 22 Apr 2002, Gregor Jaksa wrote:
 if (!eregi(^[[:alpha:]]$, $HTTP_POST_VARS[vpis_ime]))
   echo wrong char;
 
 why does this always return wrong char no matter what value is in vpis_ime
 ... i tried blah, 242234 bla242h .. every single time i get wrong
 char. im using PHP 4.1.2

The only thing that will match that regex is a single alpha character.

Try ^[[:alpha:]]+$ (I added a plus) to match one or more.

miguel


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




[PHP] Re: Mass Mail {?!}

2002-04-22 Thread Manuel Lemos

Hello,

Liam Mackenzie wrote:
 
 Hey all,
 I was just wondering if someone's written a script that will let me send lots of 
emails to an address, but with a small pause inbetween emails.
 
 And no I'm not using this for spam, I need to test a SMTP server that I'm developing.

You may want to try this class:

http://www.phpclasses.org/browse.html/package/14.html

Anyway, why are you writing a new SMTP server? I mean what would it
provide that no other SMTP server provides? Does it send personalized
mass-mailing messages?

Regards
Manuel Lemos


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




[PHP] PHPortal anyone?

2002-04-22 Thread José León Serna

Hello:
I've just discovered this php product

   http://dev.4arrow.com

And I would like to know if anyone is using it and his/her opinion.

Best Regards.

QaDRAM Studio, RAD Development for the WEB
http://studio.qadram.com


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




[PHP] PHP + Microsoft Access

2002-04-22 Thread Tom Mikulecky

Hello

I have to interface an MSAccess database and Apache server on a linux
box thru PHP. The only way I found to do that is to use ODBC with some
specific drivers (I tried Openlink). This solution needs sort of server
running on a Windows station, it serves requests to the Access database
file.

The problem is that I would like to do this WITHOUT any Windows station,
to achieve good reliability (we can't have a Windows station running
just for that). Also the database can't be ported to any other format
because there are some programs written in VB-Access that need it as is.

So what I need is sort of sql driver for accessing mdb files on a
unix/linux box. Does-it exist? I searched a lot on the web but with no
succes.

Any suggestions are welcome
Thanx in advance

Some details:
- The Access database file (mdb) is located on a Unix box in a shared
folder

Tom


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




[PHP] Re: ereg size limit???

2002-04-22 Thread liljim

Hi,


Sp [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 I am trying to validate my input with ereg but I get the error Warning:
 REG_BADBR when I try over 255 characters.  Is there anyway around this?

 Works
 =
 if(eregi('^[A-Za-z]{1,255}$', test sentence))
   echo valid input;

 Doesn't Work
 
 if(eregi('^[A-Za-z]{1,256}$', test sentence))
   echo valid input;


First off, you're using eregi (case insensitive), but defining a-zA-Z (a
through z, case insensitive) in your characters class. You could just use
ereg and leave the character class as it is, or drop the A-Z from the eregi
version.

Secondly, I'd amend your code to:
^[a-z]+$

And thirdly, I'd just use a combination of ereg / preg_* functions and
strlen.

if(preg_match(/^[a-z]+$/i, $string)  strlen($string)  255)
{
echo Whatever.;
}

I'm not sure why you're getting that error, but then again, I haven't
bothered reading up about it :)

James



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




[PHP] Re: Open Download-Box

2002-04-22 Thread Martin Thoma

 this is a problem of IE, not of PHP.

Year, but since I controll IE with PHP, I thought someone has a
php-workaround.

Martin


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




[PHP] How to get allocated memory?

2002-04-22 Thread Adrian Ciutureanu

I get the PHP Fatal error:  Allowed memory size of N bytes exhausted and I
want to check free memory at some point in a script. How can I do that?



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




Re: [PHP] Attachments

2002-04-22 Thread Jason Wong

On Monday 22 April 2002 02:33, Jason Soza wrote:
 Hmm... Okay, I used this script I found on hotscripts - it copies the
 entire file to the specified directory:

   echo pcenterTrying to upload to: 
  . $upload_path . $filename . /center/p\n;

   if ( file_exists($upload_path.$filename) ) {
  echo pfont color='red'center
 . $message[fileexists]./font/center/p;

   } else {
  if( move_uploaded_file($HTTP_POST_FILES['userfile']['tmp_name'],
$upload_path.$filename) ) {
 echo pcenter . $message[complete]./center/p;
  } else {
 echo pfont color='red'center
. $message[incomplete]./font/center/p;
  }

 Now why would this work but the e-mail scripts not?

1) Did *you* write both the php  perl scripts? Just checking, if you wrote 
both, then you might have made the same mistake in both ;-) If they're by 
independent authors then the chances of the same mistake are slightly lower.

2) Just to really confirm that the upload process is not the problem can you 
try sending a local existing file using your scripts?

3) In your scripts I can't see where the attachments (ie the files) gets 
encoded to base64. Have I missed something?

-- 
Jason Wong - Gremlins Associates - www.gremlins.com.hk
Open Source Software Systems Integrators
* Web Design  Hosting * Internet  Intranet Applications Development *

/*
Who are you?
*/

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




Re: [PHP] Re: Open Download-Box

2002-04-22 Thread Jason Wong

On Monday 22 April 2002 16:39, Martin Thoma wrote:
  this is a problem of IE, not of PHP.

 Year, but since I controll IE with PHP, I thought someone has a
 php-workaround.

You don't control IE, MS does.

Some versions of IE insist on trying to display the file regardless of what 
the headers tell it to do, and regardless of whether or not it has the plugin 
to display such a file. It's a bug which seems to have been fixed, then 
broken, then fixed, then broken, ...!

-- 
Jason Wong - Gremlins Associates - www.gremlins.com.hk
Open Source Software Systems Integrators
* Web Design  Hosting * Internet  Intranet Applications Development *

/*
To add insult to injury.
-- Phaedrus
*/

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




Re: [PHP] Re: [HELP] redirect browser pass variable !

2002-04-22 Thread Joe

I can do it now.
Thanks all of you !

Joe

Hugh Danaher [EMAIL PROTECTED]
???:000b01c1e9c5$02ccf460$[EMAIL PROTECTED]
  {  header(Location:

http://www.XXX.edu/index.php?variable=$variablesecond_variable=$second_vari
 able);
exit;}
 You'll get to transfer about 255 characters using this method.
 hugh
 - Original Message -
 From: Adrian Ciutureanu [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Sunday, April 21, 2002 11:06 PM
 Subject: [PHP] Re: [HELP] redirect browser  pass variable !


  {  header(Location: http://www.XXX.edu/index.php?variable=$variable;);
exit;}
 
  Joe [EMAIL PROTECTED] wrote in message
  [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
   I am using header function to redirect browser.
  
   {  header(Location: http://www.XXX.edu/index.php;);
 exit;}
  
   Although it can redirect the browser but variable had not pass to next
  page.
  
   So can anyone teach me how to pass variable and redirect browser at
same
   time?
  
   Thx !
  
   Joe
  
  
 
 
 
  --
  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] Re: [PHP-DB] Re: [PHP] Re: Cross DB application

2002-04-22 Thread Richard Ellerbrock

On Sun, 21 Apr 2002 00:54:39 +0200, Manuel Lemos wrote:

 Hello,
 
 Richard Ellerbrock wrote:
  If you want to hear experiences of people that tried Metabase, try
  asking in Metabase mailing list (
  http://groups.yahoo.com/group/metabase-dev/ ) or BinaryCloud mailing
  lists ( http://binarycloud.tigris.org/servlets/ProjectMailingListList
  ). I think Alex Black (BinaryCloud project leader) has tried both
  MySQL and Oracle with Metabase.
 
 I have done MySQL (MyISAM, INNODB), PostgreSQL and Oracle 9i with AdoDB
 - see http://iptrack.sourceforge.net. Works just fine for me. The
 hardest part was to get around limitations of certain databases - like
 Oracle does no support record count. This is not impossible to get
 around, but
 
 If you would have used Metabase you would not have that problem because
 Metabase has a function that you may call any time after you execute a
 select query that returns the number of rows contained in the result
 set. That is a standard feature of Metabase that works with every
 database including Oracle.

Please take a moment to also discuss the limitations in between the
marketing hype - this feature is also not unique to your class. The
Oracle driver does not support native record count (as do many other
drivers, I forget which ones), so this needs to be emulated. The only way
is to read in the entire result set and emulate record count. This fails
for large result sets - please tell me how you intend doing this with a
couple of million records? This method is also not optimal as you always
land up reading the entire result set even if you do not wish to do so - a
record paging application comes to mind.

The only logical way is to do a select count(*) from table where ..., but
this is not transaction safe. Other alternatives would be to modify your
code not to depend on record count at all - this is what I did.

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




[PHP] security

2002-04-22 Thread Wilbert Enserink

Hi all,



I'm building a site where customers can store their personal information. I'm thinking 
of storing their creditcardno's also.
Can you give me some general tips with regard to security. What is the way to go here? 

thx. Wilbert

-
Pas de Deux
Van Mierisstraat 25
2526 NM Den Haag
tel 070 4450855
fax 070 4450852
http://www.pdd.nl
[EMAIL PROTECTED]
-


Re: [PHP] security

2002-04-22 Thread Jason Wong

On Monday 22 April 2002 17:16, Wilbert Enserink wrote:

 I'm building a site where customers can store their personal information.
 I'm thinking of storing their creditcardno's also. Can you give me some
 general tips with regard to security. What is the way to go here?

This has been discussed in some depth within the last month or so. Searching 
the archives for credit card should yield some results. You may also want 
to search the php-db archives as well.

-- 
Jason Wong - Gremlins Associates - www.gremlins.com.hk
Open Source Software Systems Integrators
* Web Design  Hosting * Internet  Intranet Applications Development *

/*
Let the machine do the dirty work.
-- Elements of Programming Style, Kernighan and Ritchie
*/

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




[PHP] Passing Arrays

2002-04-22 Thread Boaz Yahav

Suppose i have a multiple select posted to a script by a form.
now i have to send this array again with a new form to a new
script.
 
How do i do this?
 
thanks
 
berber



Re: [PHP] Passing Arrays

2002-04-22 Thread Matt Williams

On Monday 22 April 2002 11:40 am, Boaz Yahav wrote:
 Suppose i have a multiple select posted to a script by a form.
 now i have to send this array again with a new form to a new
 script.
  
 How do i do this?
  
 thanks
  
 berber


Hi Berber

you could serialize the array into a hidden field on the next form.

matt

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




Re: [PHP] security

2002-04-22 Thread W. Enserink

thx Jason. I found it!
regards!


- Original Message -
From: Jason Wong [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, April 22, 2002 11:29 AM
Subject: Re: [PHP] security


 On Monday 22 April 2002 17:16, Wilbert Enserink wrote:

  I'm building a site where customers can store their personal
information.
  I'm thinking of storing their creditcardno's also. Can you give me some
  general tips with regard to security. What is the way to go here?

 This has been discussed in some depth within the last month or so.
Searching
 the archives for credit card should yield some results. You may also
want
 to search the php-db archives as well.

 --
 Jason Wong - Gremlins Associates - www.gremlins.com.hk
 Open Source Software Systems Integrators
 * Web Design  Hosting * Internet  Intranet Applications Development *

 /*
 Let the machine do the dirty work.
 -- Elements of Programming Style, Kernighan and Ritchie
 */

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

- 
Pas de Deux 
Van Mierisstraat 25 
2526 NM Den Haag 
tel 070 4450855 
fax 070 4450852 
http://www.pdd.nl 
[EMAIL PROTECTED] 
-

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




[PHP] need urgent session help, since new php version broke my code

2002-04-22 Thread nospam

Hi all
 
all the links in my page link to not existing html pages.
i redirect the 404 to a php script. when users had disabeled cookies,
i parsed the request_uri for phpsessid and then set 
$HTTP_GET_VARS['PHPSESSID']=the parsed one.
when i after that called session_start(), php was using the id from
$HTTP_GET_VARS['PHPSESSID'].
after upgrade to the latest php version this does not work anymore. i
get a new PHPSESSID on every 
request. is there any way to keep the sessionid with these redirects?
 
*extremecryforhelpsincepageisbrokenfornoncookieusers*
 
Sebastian
 
 



Re: [PHP] need urgent session help, since new php version broke my code

2002-04-22 Thread Danny Shepherd

Well, since you fail to mention which versions of PHP you were using before
and after the upgrade it's a little difficult to diagnose your problem.

You should really have checked the change log
(http://www.php.net/ChangeLog-4.php) before upgrading anyway (a lot changed
in the 4.0.x - 4.1.x releases - including some variable names)

HTH

Danny.

- Original Message -
From: nospam [EMAIL PROTECTED]
To: 'Php-General [EMAIL PROTECTED]
Sent: Monday, April 22, 2002 11:02 AM
Subject: [PHP] need urgent session help, since new php version broke my code


 Hi all

 all the links in my page link to not existing html pages.
 i redirect the 404 to a php script. when users had disabeled cookies,
 i parsed the request_uri for phpsessid and then set
 $HTTP_GET_VARS['PHPSESSID']=the parsed one.
 when i after that called session_start(), php was using the id from
 $HTTP_GET_VARS['PHPSESSID'].
 after upgrade to the latest php version this does not work anymore. i
 get a new PHPSESSID on every
 request. is there any way to keep the sessionid with these redirects?

 *extremecryforhelpsincepageisbrokenfornoncookieusers*

 Sebastian





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




[PHP] Database and files

2002-04-22 Thread David Russell

Hi all,

I have a database. It receives from my users files - which could be word 
documents, Adobe PDF files, text docs, anything...

I store these in a BLOB field of the database.

On a certain page, I include a link to these files which have been saved 
into the blob. The link is a 
href=getattachment.php?Fileid=65)Document/a.

Now when people link to this (to go to gatattachment.php?fileid=65) the 
getattachment does the following:

Finds out the attachment mime type

Sends a:

Header(Content-type: mime-type);
Header(Header(Content-Disposition: attachment; filename=\File65.doc\ );
Stream the contents of the blob to the browser.

Where the Attachment Filename changes depending on the fileid, and the mime 
type (eg. Excel files would be xls)

Now when I click the link, I get garbled content on my browser (no matter 
which browser i use - IE, Konqueror, Opera, etc). If I change the headers 
to echos, teh I get teh correct results.

What am I doing wrong?

Thanks

David R

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




Re: [PHP] Database and files

2002-04-22 Thread Danny Shepherd

- Original Message -
From: David Russell [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, April 22, 2002 11:19 AM
Subject: [PHP] Database and files

 I have a database. It receives from my users files - which could be word
 documents, Adobe PDF files, text docs, anything...

 I store these in a BLOB field of the database.

If you get multiple requests for files, expect the db to fall over very
quickly - what's wrong with storing them on the filesystem and having a list
of them in the db?

[SNIP]

 Finds out the attachment mime type

 Sends a:

 Header(Content-type: mime-type);
 Header(Header(Content-Disposition: attachment;
filename=\File65.doc\ );
 Stream the contents of the blob to the browser.

WTF is up with Header(Header( ??
Surely this should be Header(Content-Disposition: attachment;
filename=\File65.doc\ );

Here's how I do it

header(content-type: $mime);
header(content-disposition: attachment; filename=\$displayName\);
echo $data;

One thing - note that that the header names and the actual mimetype are in
lower case. Got weird results with anything different.

HTH

Danny


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




Re: [PHP] Database and files

2002-04-22 Thread Richard Archer

At 12:19 PM +0200 22/4/02, David Russell wrote:

Header(Header(Content-Disposition: attachment; filename=\File65.doc\ );

That's not right. Must be a typo.

Make sure there is no output before the header function calls.

I use:

header(Content-type: application/octet-stream; name=\$fname\);
header(Content-Disposition: attachment; filename=\fname\);
header(Content-transfer-encoding: binary);

 ...R.

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




Re: [PHP] Database and files

2002-04-22 Thread Richard Archer

At 11:25 AM +0100 22/4/02, Danny Shepherd wrote:

If you get multiple requests for files, expect the db to fall over very
quickly - what's wrong with storing them on the filesystem and having a list
of them in the db?

If your DB falls over, get a better one. You wouldn't do this with
Access, but MySQL or PostgreSQL will handle this with no problems.

And storing them in the file system requires the web server process to
have write access to the directory in which the files are stored. And
so will any other users on that server. Security nightmare.


One thing - note that that the header names and the actual mimetype are in
lower case. Got weird results with anything different.

Interesting tip. I'll try that out on Mac IE which never did download
properly, IIRC.

 ...R.

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




[PHP] Re: [PHP-DB] Re: [PHP] Re: Cross DB application

2002-04-22 Thread Manuel Lemos

Hello,

Richard Ellerbrock wrote:
  I have done MySQL (MyISAM, INNODB), PostgreSQL and Oracle 9i with AdoDB
  - see http://iptrack.sourceforge.net. Works just fine for me. The
  hardest part was to get around limitations of certain databases - like
  Oracle does no support record count. This is not impossible to get
  around, but
 
  If you would have used Metabase you would not have that problem because
  Metabase has a function that you may call any time after you execute a
  select query that returns the number of rows contained in the result
  set. That is a standard feature of Metabase that works with every
  database including Oracle.
 
 Please take a moment to also discuss the limitations in between the
 marketing hype - this feature is also not unique to your class. The

There is absolutely no commercial interests behind Metabase. So there is
no marketing statement and even less hype. Metabase does exactly what is
described because I needed it to do that for my own applications,
especially in the beginning 3 years ago because I wanted to provide
smooth transition between MySQL applications that rely on these features
and databases like Oracle for which these features can be emulated.


 Oracle driver does not support native record count (as do many other
 drivers, I forget which ones), so this needs to be emulated. The only way
 is to read in the entire result set and emulate record count. This fails
 for large result sets - please tell me how you intend doing this with a
 couple of million records? This method is also not optimal as you always

Please tell me when in a Web application you need to read a whole result
set with million rows?


 land up reading the entire result set even if you do not wish to do so - a
 record paging application comes to mind.

If you want to just to read a range of rows of a whole an arbitrary
sized result set, you can use a feature of Metabase that with a single
call made before executing any SELECT query it tells to restrict to a
specified range of rows. It is like MySQL LIMIT except that it works
with all supported databases, including Oracle.

You know, Metabase was specifically though to address Web development
needs. If you look around in other platforms you see that Metabase
provides features that are not provided anywhere else, not even for
Java. Think for instance about sequences...


 
 The only logical way is to do a select count(*) from table where ..., but
 this is not transaction safe. Other alternatives would be to modify your
 code not to depend on record count at all - this is what I did.

Yes, that is the recommended way to do it. That is extensively
recommended in Metabase manual and tutorial.

Still Metabase provides that feature because the large majority of PHP
users comes from a low end database background like MySQL.

Regards,
Manuel Lemos

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




Re: [PHP] Database and files

2002-04-22 Thread Danny Shepherd

- Original Message -
From: Richard Archer [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, April 22, 2002 11:40 AM
Subject: Re: [PHP] Database and files


 At 11:25 AM +0100 22/4/02, Danny Shepherd wrote:

 If you get multiple requests for files, expect the db to fall over very
 quickly - what's wrong with storing them on the filesystem and having a
list
 of them in the db?

 If your DB falls over, get a better one. You wouldn't do this with
 Access, but MySQL or PostgreSQL will handle this with no problems.

I've tried it in MySQL  - it didn't work - after inserting aprox 8Mbs of
data the MySQL server died with a 'server has gone away' message. And more
than 2-3 users symltaneously requesting files of only a few hundred kb
really seemed to kill performance.

 And storing them in the file system requires the web server process to
 have write access to the directory in which the files are stored. And
 so will any other users on that server. Security nightmare.

Having other users on your server is the security mightmare :) If you setup
the webserver to have its own user ('apache' instead of 'nobody') and only
allow the apache user access to those files, that should lessen the problem.

 One thing - note that that the header names and the actual mimetype are in
 lower case. Got weird results with anything different.

 Interesting tip. I'll try that out on Mac IE which never did download
 properly, IIRC.



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




php-general Digest 22 Apr 2002 10:50:53 -0000 Issue 1301

2002-04-22 Thread php-general-digest-help


php-general Digest 22 Apr 2002 10:50:53 - Issue 1301

Topics (messages 93917 through 93966):

Re: PHP @ 24-hour programming competition
93917 by: Martin Towell
93923 by: Maxim Maletsky

Re: phpLISTMAN
93918 by: Maxim Maletsky

Re: Better standards in PHP-coding
93919 by: .ben
93920 by: Martin Towell
93921 by: .ben
93924 by: Maxim Maletsky
93935 by: Jason Wong

eregi() problem
93922 by: Gregor Jaksa
93925 by: Danny Shepherd
93943 by: Miguel Cruz

PHPTriad
93926 by: Mantas Kriauciunas

$server_path
93927 by: Jule Slootbeek
93928 by: Bogdan Stancescu

setting Apache's $REMOTE_USER externally
93929 by: Sek-Mun Wong

Mass Mail {?!}
93930 by: Liam MacKenzie
93933 by: CDitty
93942 by: Matthew Walker
93944 by: Manuel Lemos

[HELP] redirect browser  pass variable !
93931 by: Joe
93937 by: Jason Wong
93940 by: Adrian Ciutureanu
93941 by: hugh danaher
93952 by: Joe

Re: some problems about gd in php
93932 by: zhaoxd
93936 by: Jason Wong
93938 by: zhaoxd
93939 by: Jason Wong

Web Forum donated to PHP community
93934 by: Jim Hankins

PHPortal anyone?
93945 by: José León Serna

PHP + Microsoft Access
93946 by: Tom Mikulecky

Re: ereg size limit???
93947 by: liljim

Re: Open Download-Box
93948 by: Martin Thoma
93951 by: Jason Wong

How to get allocated memory?
93949 by: Adrian Ciutureanu

Re: Attachments
93950 by: Jason Wong

Re: [PHP-DB] Re: [PHP] Re: Cross DB application
93953 by: Richard Ellerbrock
93965 by: Manuel Lemos

security
93954 by: Wilbert Enserink
93955 by: Jason Wong
93958 by: W. Enserink

Passing Arrays
93956 by: Boaz Yahav
93957 by: Matt Williams

need urgent session help, since new php version broke my code
93959 by: nospam
93960 by: Danny Shepherd

Database and files
93961 by: David Russell
93962 by: Danny Shepherd
93963 by: Richard Archer
93964 by: Richard Archer
93966 by: Danny Shepherd

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]


--

---BeginMessage---

Firstly, since you can take in already written code, if you have a lot of
pre-written generic code, that would be good.

 We're really interested in your opinions - is this feasible or
 are we just plain mad? :)

You've probably both - aren't all programmer mad? g


-Original Message-
From: Dennis Moore [mailto:[EMAIL PROTECTED]]
Sent: Sunday, April 21, 2002 2:45 AM
To: Visontay Peter; [EMAIL PROTECTED]
Subject: Re: [PHP] PHP @ 24-hour programming competition


This sounds interesting... I am not familiar enought with PHP-GTK to give an
informed opinion.  I think your decision should be based on how familiar
with the tools you take into the contest.Since you are not face with a
lot of time, will your competition be using Visual IDEs to aid the rapid
development?

You may wnat to post to one of the php-gtk-* lists.  They may be able to
address your needs in more detail.

Good luck!!



If you choose to use PHP, please post the results of the contest to the
list.  It should be interesting.



- Original Message -
From: Visontay Peter [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, April 19, 2002 7:43 PM
Subject: [PHP] PHP @ 24-hour programming competition


 Hi!

 I have quite an unusual problem for you :) There will be a 24-hour
 programming competition at our university, where teams of 3 have one
 day to solve a complex problem (which will be revealed on the day
 of the competition). Teams cannot get help from outside, so no outward
 network / phone communication is available, but you can use anything you
 take there with you (any development tools, books, pre-written software
 etc.)

 The language in which you write the software is up to you, the most
 popular choices being C++ and Java - but this year our team are going
 to use PHP (and PHP-GTK).

 The big question is: will PHP be enough for the whole project, or will
 we need something else (like external C/Java modules)?
 Last year the task was to write an artificially intelligent soccer game
 based on a client-server architecture: there was a server acting like
 some kind of game controller (referee) and 2D display screen, while
 the automated clients (players) were playing individually according
 to the game's rules and some simulated information on what they 'see'
 at the time.

 It's said that it will be something quite different this year -
 but required knowledge includes:
 algorithm theory, information and code theory, artificial intelligence,

Re: [PHP] Database and files

2002-04-22 Thread David Russell

Hi all,

Another bug bites the dust...

Thank you so much for your responses... 

As for the DB/filesystem issue, we need to be able to easily replicate this 
at some time to another server as the system may easily become a 
distributed intranet system. We made the decision to use a database as this 
is easier to move around - (Backup, copy, restore) (yes, yes I know about 
tar/gz etc, but this seemed the easiest at the time.

I am using InterBase as a database backend (actually IBFirebird) as this is 
a database system that we have been using extensively int eh office for a 
while.

I think it was the uppercase/lowercase thing that bit me - (the 
header(Header( thing was a type, decided to copy/paste after typing 
header( g

Thanks again

David R

Richard Archer wrote:

 At 11:25 AM +0100 22/4/02, Danny Shepherd wrote:
 
If you get multiple requests for files, expect the db to fall over very
quickly - what's wrong with storing them on the filesystem and having a
list of them in the db?
 
 If your DB falls over, get a better one. You wouldn't do this with
 Access, but MySQL or PostgreSQL will handle this with no problems.
 
 And storing them in the file system requires the web server process to
 have write access to the directory in which the files are stored. And
 so will any other users on that server. Security nightmare.
 
 
One thing - note that that the header names and the actual mimetype are in
lower case. Got weird results with anything different.
 
 Interesting tip. I'll try that out on Mac IE which never did download
 properly, IIRC.
 
  ...R.


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




[PHP] Daemon starting

2002-04-22 Thread Gilles Nedostoupof

Hi all,

I'm looking for a simple method to start a linux daemon from a php script...
I've already tried to use sudo by giving rights to apache user to execute
some scripts from /etc/rc.d/init.d ; I do a exec (sudo
/etc/rc.d/init.d/daemon start); 
Sometimes the daemon startup, sometimes no... I need to re-run the script 2
or 3 times to start the daemon correctly.
(Same problem with stopping the daemon...)

Anybody have an idea?

Gilles.



Re: [PHP] Daemon starting

2002-04-22 Thread Danny Shepherd

Not played with them myself but you might want to take a look at the
system() and shell_exec() functions.

HTH

Danny.

- Original Message -
From: Gilles Nedostoupof [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, April 22, 2002 12:28 PM
Subject: [PHP] Daemon starting


 Hi all,

 I'm looking for a simple method to start a linux daemon from a php
script...
 I've already tried to use sudo by giving rights to apache user to execute
 some scripts from /etc/rc.d/init.d ; I do a exec (sudo
 /etc/rc.d/init.d/daemon start);
 Sometimes the daemon startup, sometimes no... I need to re-run the script
2
 or 3 times to start the daemon correctly.
 (Same problem with stopping the daemon...)

 Anybody have an idea?

 Gilles.



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




[PHP] problems with php-imap

2002-04-22 Thread Tarjei Huse

Hi,

I'm running a cuple of servers with php + mysql. Now, on one server I am
running a setup with PHP 4.0.6 (patched for security) and Cyrus Imapd
1.5.x. I am having large problems getting this to work. The server
functions w/o problems except that it segfaults every time I use the
imap-open call. 

I have seen others having reproted equal problems to this list, so I am
wondering if this is a known bug or if anyone has experienced this.

Also, I whant all possible tips for locating the error.

PS: My usernames are on the form username:int (f.x. arne:19 (not a real
one)) could this be the problem?

Tarjei

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




[PHP] Re: problems with php-imap

2002-04-22 Thread simon

On Mon, 2002-04-22 at 12:29, Tarjei Huse wrote:
 Hi,
 
 I'm running a cuple of servers with php + mysql. Now, on one server I am
 running a setup with PHP 4.0.6 (patched for security) and Cyrus Imapd
 1.5.x. I am having large problems getting this to work. The server
 functions w/o problems except that it segfaults every time I use the
 imap-open call. 

So does this use cclient as the imap support for PHP ? 
Personally I have found that buggy in the past try upgrading to the
latest version.

 
 I have seen others having reproted equal problems to this list, so I am
 wondering if this is a known bug or if anyone has experienced this.
 
 Also, I whant all possible tips for locating the error.

Here is a problem I had and how I found and fixed it.

Using: php,mod-ssl,apache to do webmail. 
Problem: It would SEGFPE every so many request (sometimes just 2   
  sometimes 100`s)

Tried to chase in the php code where this bug was
 and not trying mod_ssl (encryption must use the FPU alot etc.).

Eventually compiled php with -ggdb (debug symbols) setup my FreeBSD to
core dump in the same area and played. After backtracing several
coredump I found the this happened when the php added or subtracted  2
large numbers together.  
   After a bit more debug the FPU was broken on the CPU and it now runs
with FPU emulation and is ok. Interesting that that was the only thing
that tickled the FPU.


So compile php in debug mode is my advice.

-- 
Simon



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




[PHP] date format

2002-04-22 Thread hamish

Hello All,
I have a variable in the following date format: 

April 11, 2002, 1:53 pm 

and want to get it to the following format: 

-mm-dd 

what's the best way? 

hamish

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




[PHP] Php and SQL Server 2000 - Help Needed

2002-04-22 Thread dnph

Hi all of you
I 'm desesperatly trying to connect to my MS SQL server 2000 demo version using a php 
script (executed by a form), running Easyphp (apache) as Web server, under Win 2000 
Pro F Sp1.

It says
Warning: MS SQL message: Échec de la connexion de l'utilisateur 'Aurelien'. (severity 
14) in c:\program files\easyphp\www\s.php on line 9

Warning: MS SQL: Unable to connect to server: KOHAI in c:\program 
files\easyphp\www\s.php on line 9

KOHAI is my computeur name.. and aurelien my windows name. 
Even when i run the client tool, I have to use my windows Connection.

Please I need some help

Thanx



[PHP] Backup of MySQL database

2002-04-22 Thread Julian

Hi list!!!

I want to make a script to do a backup of a MySQL DB and email me it. It is
posible?

Can anybody explain me how to do the backup?

Thanks! Julian


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




[PHP] Re: Backup of MySQL database

2002-04-22 Thread Julio Nobrega Trabalhando

 Can anybody explain me how to do the backup?

  Mysql's manual?

 I want to make a script to do a backup of a MySQL DB and email me it. It
is
 posible?

  Then you take the backup (aka Mysql's dump), and attach it to a mail();


--

Julio Nobrega.

Um dia eu chego lá:
http://sourceforge.net/projects/toca

Ajudei? Salvei? Que tal um presentinho?
http://www.submarino.com.br/wishlistclient.asp?wlid=664176742884


Julian [EMAIL PROTECTED] wrote in message
005601c1e9fb$7bc42600$45102bc8@julian">news:005601c1e9fb$7bc42600$45102bc8@julian...
 Hi list!!!

 I want to make a script to do a backup of a MySQL DB and email me it. It
is
 posible?

 Can anybody explain me how to do the backup?

 Thanks! Julian




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




Re: [PHP] date format

2002-04-22 Thread Justin French

Hamish,

A quick read through the date functions in the manual is worthwhile
http://www.php.net/manual/en/ref.datetime.php

In particular, you need to look at strtotime() and date().

strtotime() is an often overlooked function, useful for getting almost any
english written date into a unix timestamp, then use date() to get it into
the format you wish.

Note, I removed the commas from the $date string, because I'm pretty sure it
will break the strtotime() function.


?

$date = April 11, 2002, 1:53 pm;

// one step at a time
$date = str_replace(,,,$date);
$date = strtotime($date);
$date = date('Y-m-d', $date);

// or, in one line, if that's your thing
$date = date('Y-m-d', strtotime(str_replace(,,,$date)));

?


Alternatively, you could have split the date on commas, and mucked around
with each element, but the above, IMHO, is the best way to go.


Regards,

Justin French

Creative Director
http://Indent.com.au





on 22/04/02 10:10 PM, hamish ([EMAIL PROTECTED]) wrote:

 Hello All,
 I have a variable in the following date format:
 
 April 11, 2002, 1:53 pm
 
 and want to get it to the following format:
 
 -mm-dd 
 
 what's the best way?
 
 hamish


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




RE: [PHP] Re: Backup of MySQL database

2002-04-22 Thread Fifield, Mike

I think everyone is aware that there is a mysql manual, obviously if someone
is posting in this forum they have not been able to find what they are
looking for in the manual. Or simply do not have to time to wade through the
manual to find what they are looking for. 

Here is a link to a script that does essentially what you are looking for.
http://www.zend.net/codex.php?id=634single=1


-Original Message-
From: Julio Nobrega Trabalhando [mailto:[EMAIL PROTECTED]] 
Sent: Monday, April 22, 2002 6:51 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Re: Backup of MySQL database

 Can anybody explain me how to do the backup?

  Mysql's manual?

 I want to make a script to do a backup of a MySQL DB and email me it. It
is
 posible?

  Then you take the backup (aka Mysql's dump), and attach it to a mail();


--

Julio Nobrega.

Um dia eu chego lá:
http://sourceforge.net/projects/toca

Ajudei? Salvei? Que tal um presentinho?
http://www.submarino.com.br/wishlistclient.asp?wlid=664176742884


Julian [EMAIL PROTECTED] wrote in message
005601c1e9fb$7bc42600$45102bc8@julian">news:005601c1e9fb$7bc42600$45102bc8@julian...
 Hi list!!!

 I want to make a script to do a backup of a MySQL DB and email me it. It
is
 posible?

 Can anybody explain me how to do the backup?

 Thanks! Julian




-- 
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] Pb with socket_set_timeout()

2002-04-22 Thread DrouetL


Hi the ML

I received the following error message on my web page when I try to
communicate with My SMTP server:

Warning: socket_set_timeout() is not supported in this PHP build

My config is

PHP 4.0.6
Win Nt 4
Apache 1.3.22

Any information on this function ?



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




Re: [PHP] Pb with socket_set_timeout()

2002-04-22 Thread Danny Shepherd

I don't think the windwos version of PHP supports sockets.

use fsockopen instead. (http://uk.php.net/manual/en/function.fsockopen.php)

HTH

Danny.

- Original Message - 
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, April 22, 2002 1:59 PM
Subject: [PHP] Pb with socket_set_timeout()


 
 Hi the ML
 
 I received the following error message on my web page when I try to
 communicate with My SMTP server:
 
 Warning: socket_set_timeout() is not supported in this PHP build
 
 My config is
 
 PHP 4.0.6
 Win Nt 4
 Apache 1.3.22
 
 Any information on this function ?
 
 
 
 -- 
 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] Passing Arrays

2002-04-22 Thread Maxim Maletsky \(PHPBeginner.com\)

Add it to the session.
Sessions can handle arrays with no problems.


Sincerely,

Maxim Maletsky
Founder, Chief Developer

www.PHPBeginner.com   // where PHP Begins




-Original Message-
From: Matt Williams [mailto:[EMAIL PROTECTED]] 
Sent: Monday, April 22, 2002 11:47 AM
To: Boaz Yahav; PHP General (E-mail)
Subject: Re: [PHP] Passing Arrays


On Monday 22 April 2002 11:40 am, Boaz Yahav wrote:
 Suppose i have a multiple select posted to a script by a form. now i 
 have to send this array again with a new form to a new script.
  
 How do i do this?
  
 thanks
  
 berber


Hi Berber

you could serialize the array into a hidden field on the next form.

matt

-- 
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] security

2002-04-22 Thread Maxim Maletsky \(PHPBeginner.com\)

Search archives, as a tip I'd suggest to encrypt the Credit Card numbers
with RC4 or some other algorithm.


Sincerely,

Maxim Maletsky
Founder, Chief Developer

www.PHPBeginner.com   // where PHP Begins




-Original Message-
From: Wilbert Enserink [mailto:[EMAIL PROTECTED]] 
Sent: Monday, April 22, 2002 11:17 AM
To: [EMAIL PROTECTED]
Subject: [PHP] security


Hi all,



I'm building a site where customers can store their personal
information. I'm thinking of storing their creditcardno's also. Can you
give me some general tips with regard to security. What is the way to go
here? 

thx. Wilbert

-
Pas de Deux
Van Mierisstraat 25
2526 NM Den Haag
tel 070 4450855
fax 070 4450852
http://www.pdd.nl
[EMAIL PROTECTED]
-


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




RE: [PHP] Better standards in PHP-coding

2002-04-22 Thread Maxim Maletsky \(PHPBeginner.com\)

Also very true.



Sincerely,

Maxim Maletsky
Founder, Chief Developer

www.PHPBeginner.com   // where PHP Begins




-Original Message-
From: Jason Wong [mailto:[EMAIL PROTECTED]] 
Sent: Monday, April 22, 2002 6:50 AM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] Better standards in PHP-coding


On Monday 22 April 2002 08:07, Maxim Maletsky wrote:
 I think standardization within the company is what important.

 I prefer tabs because when I have to delete a part of the line, I just

 hit back button once - not four times.

I prefer an editor which allows me to tab using spaces and to delete the

appropriate number of spaces when backspacing :)

-- 
Jason Wong - Gremlins Associates - www.gremlins.com.hk
Open Source Software Systems Integrators
* Web Design  Hosting * Internet  Intranet Applications Development *

/*
Logic is the chastity belt of the mind!
*/

-- 
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] Database and files

2002-04-22 Thread Maxim Maletsky \(PHPBeginner.com\)

Right, certain things is beter to keep in the Db. Keep present that the
file system is limited. You can't just have an unlimited amount of files
on the same directory.

PostgreSQL is the best choice on my opinion. mySQL might fail on a large
DB.


Sincerely,

Maxim Maletsky
Founder, Chief Developer

www.PHPBeginner.com   // where PHP Begins




-Original Message-
From: Richard Archer [mailto:[EMAIL PROTECTED]] 
Sent: Monday, April 22, 2002 12:41 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] Database and files


At 11:25 AM +0100 22/4/02, Danny Shepherd wrote:

If you get multiple requests for files, expect the db to fall over very

quickly - what's wrong with storing them on the filesystem and having a

list of them in the db?

If your DB falls over, get a better one. You wouldn't do this with
Access, but MySQL or PostgreSQL will handle this with no problems.

And storing them in the file system requires the web server process to
have write access to the directory in which the files are stored. And so
will any other users on that server. Security nightmare.


One thing - note that that the header names and the actual mimetype are

in lower case. Got weird results with anything different.

Interesting tip. I'll try that out on Mac IE which never did download
properly, IIRC.

 ...R.

-- 
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] Re: Backup of MySQL database

2002-04-22 Thread Julio Nobrega Trabalhando

 I think everyone is aware that there is a mysql manual, obviously if
someone
 is posting in this forum they have not been able to find what they are
 looking for in the manual. Or simply do not have to time to wade through
the
 manual to find what they are looking for.

  Hi Mike, I am not trying to start another flame war on this subject. But I
could have been harsh and just replied RTFM, which was the perfect case
for this. I don't like to answer simple questions, that the poster didn't
look like searched enough for the answer. I am, and I believe you are, busy
men.

  We're here to do the best we can, to help other people, but I believe we
also expect others to act at the same level. When I see a message here,
makes me wonder that the poster has searched for the answer on his own, has
tried, has fought to overcome a problem. A google search, a manual word
search, would give the poster the answer quickly than it took for him to
type his message. Probaly saving not only the original poster, but everyone
who downloaded and read the message, plus who whatever replied.

  Again, this is one of the oldest wars that can be fought in any
newsgroups, but I couldn't not let it pass without brief comments of what is
usually expected in such enviroments :-)

--

Julio Nobrega.

Um dia eu chego lá:
http://sourceforge.net/projects/toca

Ajudei? Salvei? Que tal um presentinho?
http://www.submarino.com.br/wishlistclient.asp?wlid=664176742884


Mike Fifield [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
I think everyone is aware that there is a mysql manual, obviously if someone
is posting in this forum they have not been able to find what they are
looking for in the manual. Or simply do not have to time to wade through the
manual to find what they are looking for.

Here is a link to a script that does essentially what you are looking for.
http://www.zend.net/codex.php?id=634single=1


-Original Message-
From: Julio Nobrega Trabalhando [mailto:[EMAIL PROTECTED]]
Sent: Monday, April 22, 2002 6:51 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Re: Backup of MySQL database

 Can anybody explain me how to do the backup?

  Mysql's manual?

 I want to make a script to do a backup of a MySQL DB and email me it. It
is
 posible?

  Then you take the backup (aka Mysql's dump), and attach it to a mail();


--

Julio Nobrega.

Um dia eu chego lá:
http://sourceforge.net/projects/toca

Ajudei? Salvei? Que tal um presentinho?
http://www.submarino.com.br/wishlistclient.asp?wlid=664176742884


Julian [EMAIL PROTECTED] wrote in message
005601c1e9fb$7bc42600$45102bc8@julian">news:005601c1e9fb$7bc42600$45102bc8@julian...
 Hi list!!!

 I want to make a script to do a backup of a MySQL DB and email me it. It
is
 posible?

 Can anybody explain me how to do the backup?

 Thanks! Julian




--
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] Backup of MySQL database

2002-04-22 Thread Maxim Maletsky \(PHPBeginner.com\)

I think it is already done a WHILE ago.
Look for it on source Forge or hotscripts.com. Include C/C++, Perl and
Shell scripting in your searches.


Sincerely,

Maxim Maletsky
Founder, Chief Developer

www.PHPBeginner.com   // where PHP Begins




-Original Message-
From: Julian [mailto:[EMAIL PROTECTED]] 
Sent: Monday, April 22, 2002 2:45 PM
To: PHP-General
Subject: [PHP] Backup of MySQL database


Hi list!!!

I want to make a script to do a backup of a MySQL DB and email me it. It
is posible?

Can anybody explain me how to do the backup?

Thanks! Julian


-- 
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] Php and SQL Server 2000 - Help Needed

2002-04-22 Thread heinisch

At 22.04.2002  14:04, you wrote:

Hi all of you
I 'm desesperatly trying to connect to my MS SQL server 2000 demo version 
using a php script (executed by a form), running Easyphp (apache) as Web 
server, under Win 2000 Pro F Sp1.

It says
Warning: MS SQL message: Échec de la connexion de l'utilisateur 
'Aurelien'. (severity 14) in c:\program files\easyphp\www\s.php on line 9

Warning: MS SQL: Unable to connect to server: KOHAI in c:\program 
files\easyphp\www\s.php on line 9

KOHAI is my computeur name.. and aurelien my windows name.
Even when i run the client tool, I have to use my windows Connection.

Please I need some help

Thanx
What is in s.php, specially on line 9 ??
And sorry about, but what´s the translation of the MS SQL message?

Oliver


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




RE: [PHP] Mass Mail {?!}

2002-04-22 Thread Maxim Maletsky \(PHPBeginner.com\)


Or just:

While(True) {
// send email
sleep(1);
if($tired==True)
Break;
}


Count how many mails you want and quit :-)



Sincerely,

Maxim Maletsky
Founder, Chief Developer

www.PHPBeginner.com   // where PHP Begins




-Original Message-
From: CDitty [mailto:[EMAIL PROTECTED]] 
Sent: Monday, April 22, 2002 4:47 AM
To: Liam MacKenzie; PHP
Subject: Re: [PHP] Mass Mail {?!}


How about something like this.

?

$Total_emails = 100;
$i = 1;

if($Total_emails != $i){
// send email code

$i++;
}

?

This should be all you need.  I used something similar to crash my
work's 
email system by accident.  :)  Whoops.

CDitty

At 12:40 PM 4/22/2002 +1000, Liam MacKenzie wrote:
Hey all,
I was just wondering if someone's written a script that will let me 
send
lots of emails to an address, but with a small pause inbetween emails.

And no I'm not using this for spam, I need to test a SMTP server that 
I'm
developing.

Thanks for your help!


-- 
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] PHP Training in NYC

2002-04-22 Thread Daniel Kushner

Hi ,

I am please to announce that the next PHP Training will take place on May
8th - 9th.

More information may be found at http://www.websapp.com/training.php

Regards,

Daniel Kushner


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




[PHP] PHP editor for windows

2002-04-22 Thread .ben

Other than notepad, interdev, ultraedit, etc (which i currently use for
editing), does anyone know of a good editor for PHP for Windows, ideally
with syntax colouring, etc?

Cheers,

 .ben


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




[PHP] Re: PHP editor for windows

2002-04-22 Thread Julio Nobrega Trabalhando

www.phpide.de

  It's called PHP Coder. Don't get the versions by Maguma (last time I used,
it was buggy). Instead, go to older downloads and get the PHP Coder file
named phpide-r2p3setup

--

Julio Nobrega.

Um dia eu chego lá:
http://sourceforge.net/projects/toca

Ajudei? Salvei? Que tal um presentinho?
http://www.submarino.com.br/wishlistclient.asp?wlid=664176742884


.Ben [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Other than notepad, interdev, ultraedit, etc (which i currently use for
 editing), does anyone know of a good editor for PHP for Windows, ideally
 with syntax colouring, etc?

 Cheers,

  .ben




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




[PHP] Re: PHP editor for windows

2002-04-22 Thread Craig

the new ultradev (MX) contains what you need
there is a trial download on the macromedia site


Julio Nobrega Trabalhando [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 www.phpide.de

   It's called PHP Coder. Don't get the versions by Maguma (last time I
used,
 it was buggy). Instead, go to older downloads and get the PHP Coder file
 named phpide-r2p3setup

 --

 Julio Nobrega.

 Um dia eu chego lá:
 http://sourceforge.net/projects/toca

 Ajudei? Salvei? Que tal um presentinho?
 http://www.submarino.com.br/wishlistclient.asp?wlid=664176742884


 .Ben [EMAIL PROTECTED] wrote in message
 [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
  Other than notepad, interdev, ultraedit, etc (which i currently use for
  editing), does anyone know of a good editor for PHP for Windows, ideally
  with syntax colouring, etc?
 
  Cheers,
 
   .ben
 





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




Re: [PHP] PHP editor for windows

2002-04-22 Thread Scott St. John

Macromedia/Allaire Home Site 5.0 has PHP color coding, not auto-complete, 
but you can customize it for auto-complete if you want.  You can also 
make it tab 2 instead of 4 :)  It's been my editor since the free version 
1.0 and it's a work horse.  And Home Site has Ultra Dev/Dream Weaver 
integration.

PS-- This is MY opinion and NOT intended to start any Holy Wars.

-Scott




On Mon, 22 Apr 2002, .ben wrote:

 Other than notepad, interdev, ultraedit, etc (which i currently use for
 editing), does anyone know of a good editor for PHP for Windows, ideally
 with syntax colouring, etc?
 
 Cheers,
 
  .ben
 
 
 

-- 



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




Re: [PHP] $HTTP_*_VARS ?

2002-04-22 Thread Erik Price


On Friday, April 19, 2002, at 06:18  PM, Tobias Lindqvist wrote:

 Hoe come I cant use $HTTP_*_VARS in my script ? I have register_globals
 on, track vars is also on and i have made the necessary changes in my
 apache config ( the ALLOWOVERRIDE ALL ). My system is Win XP, Apache (
 newest ) and newest PHP release.

You don't want to use $HTTP_*_VARS.

You want to use $_* ($_SESSION, $_COOKIE, $_GET, $_POST, $_SERVER, etc)


Erik






Erik Price
Web Developer Temp
Media Lab, H.H. Brown
[EMAIL PROTECTED]


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




RE: [PHP] PHP editor for windows

2002-04-22 Thread Caspar Kennerdale

www.editplus.com

-Original Message-
From: Scott St. John [mailto:[EMAIL PROTECTED]]
Sent: 22 April 2002 06:26
To: .ben
Cc: PHP
Subject: Re: [PHP] PHP editor for windows


Macromedia/Allaire Home Site 5.0 has PHP color coding, not auto-complete, 
but you can customize it for auto-complete if you want.  You can also 
make it tab 2 instead of 4 :)  It's been my editor since the free version 
1.0 and it's a work horse.  And Home Site has Ultra Dev/Dream Weaver 
integration.

PS-- This is MY opinion and NOT intended to start any Holy Wars.

-Scott




On Mon, 22 Apr 2002, .ben wrote:

 Other than notepad, interdev, ultraedit, etc (which i currently use for
 editing), does anyone know of a good editor for PHP for Windows, ideally
 with syntax colouring, etc?
 
 Cheers,
 
  .ben
 
 
 

-- 



-- 
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] PHP editor for windows

2002-04-22 Thread Steve Bradwell

I like VIM. at www.vim.org its got great color for a multitude of languages
and its a powerful editor too.

-Steve.

-Original Message-
From: Caspar Kennerdale [mailto:[EMAIL PROTECTED]]
Sent: Monday, April 22, 2002 5:40 PM
To: PHP
Subject: RE: [PHP] PHP editor for windows


www.editplus.com

-Original Message-
From: Scott St. John [mailto:[EMAIL PROTECTED]]
Sent: 22 April 2002 06:26
To: .ben
Cc: PHP
Subject: Re: [PHP] PHP editor for windows


Macromedia/Allaire Home Site 5.0 has PHP color coding, not auto-complete, 
but you can customize it for auto-complete if you want.  You can also 
make it tab 2 instead of 4 :)  It's been my editor since the free version 
1.0 and it's a work horse.  And Home Site has Ultra Dev/Dream Weaver 
integration.

PS-- This is MY opinion and NOT intended to start any Holy Wars.

-Scott




On Mon, 22 Apr 2002, .ben wrote:

 Other than notepad, interdev, ultraedit, etc (which i currently use for
 editing), does anyone know of a good editor for PHP for Windows, ideally
 with syntax colouring, etc?
 
 Cheers,
 
  .ben
 
 
 

-- 



-- 
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 General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Empty $_SESSION and $_POST ??

2002-04-22 Thread Erik Price


On Friday, April 19, 2002, at 09:41  PM, Andre Dubuc wrote:

 Is there a way I can verify that (a) globals are off and (b) $_SESSION 
 or
 $_POST are on? This probably what's happening -- I can't access the 
 arrays at
 all -- so, I think that might be where the problem lies. The $vars 
 still work
 though throughout all scripts.

$_SESSION and $_POST and other superglobals are already on all the time 
if you use PHP 4.1.x or later.

Verify that globals are off by writing a script that checks the for the 
presence or the value of $variable and then pass variable=1 or 
something on the querystring in your browser.


Erik






Erik Price
Web Developer Temp
Media Lab, H.H. Brown
[EMAIL PROTECTED]


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




RE: [PHP] security

2002-04-22 Thread heinisch

At 22.04.2002  15:17, you wrote:

Search archives, as a tip I'd suggest to encrypt the Credit Card numbers
with RC4 or some other algorithm.

Maxim,

I don´t agree your suggestion, as I mentioned earlier on the list, avoid 
storing CC numbers
unless it´s absolutely necessary, you´ve got a good insurance, and are your
own ISP knowing a lot of network security. Your suggestions may make
php-coder think that it is possible to store these data secure. But that´s 
not only
depending on php. If you store any data in an ISP-environment, you cannot be
shure that this is secure, as you don´t know how they set up their servers, 
firewalls ...

I wouldn´t give this suggestion without any word on this.

Oliver


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




RE: [PHP] PHP editor for windows

2002-04-22 Thread .ben

thanks for all the replies, will have a play with those suggested.

 .b

 -Original Message-
 From: Caspar Kennerdale [mailto:[EMAIL PROTECTED]]
 Sent: 22 April 2002 22:40
 To: PHP
 Subject: RE: [PHP] PHP editor for windows


 www.editplus.com

 -Original Message-
 From: Scott St. John [mailto:[EMAIL PROTECTED]]
 Sent: 22 April 2002 06:26
 To: .ben
 Cc: PHP
 Subject: Re: [PHP] PHP editor for windows


 Macromedia/Allaire Home Site 5.0 has PHP color coding, not auto-complete,
 but you can customize it for auto-complete if you want.  You can also
 make it tab 2 instead of 4 :)  It's been my editor since the free version
 1.0 and it's a work horse.  And Home Site has Ultra Dev/Dream Weaver
 integration.

 PS-- This is MY opinion and NOT intended to start any Holy Wars.

 -Scott




 On Mon, 22 Apr 2002, .ben wrote:

  Other than notepad, interdev, ultraedit, etc (which i currently use for
  editing), does anyone know of a good editor for PHP for Windows, ideally
  with syntax colouring, etc?
 
  Cheers,
 
   .ben
 
 
 

 --



 --
 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 General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] PHP editor for windows

2002-04-22 Thread Mark Harwood

http://www.phpedit.com/index.php


Steve Bradwell [EMAIL PROTECTED] wrote in message
57A1618E7109D311A97D0008C7EBB3A1CBB2C3@KITCHENER">news:57A1618E7109D311A97D0008C7EBB3A1CBB2C3@KITCHENER...
 I like VIM. at www.vim.org its got great color for a multitude of
languages
 and its a powerful editor too.

 -Steve.

 -Original Message-
 From: Caspar Kennerdale [mailto:[EMAIL PROTECTED]]
 Sent: Monday, April 22, 2002 5:40 PM
 To: PHP
 Subject: RE: [PHP] PHP editor for windows


 www.editplus.com

 -Original Message-
 From: Scott St. John [mailto:[EMAIL PROTECTED]]
 Sent: 22 April 2002 06:26
 To: .ben
 Cc: PHP
 Subject: Re: [PHP] PHP editor for windows


 Macromedia/Allaire Home Site 5.0 has PHP color coding, not auto-complete,
 but you can customize it for auto-complete if you want.  You can also
 make it tab 2 instead of 4 :)  It's been my editor since the free version
 1.0 and it's a work horse.  And Home Site has Ultra Dev/Dream Weaver
 integration.

 PS-- This is MY opinion and NOT intended to start any Holy Wars.

 -Scott




 On Mon, 22 Apr 2002, .ben wrote:

  Other than notepad, interdev, ultraedit, etc (which i currently use for
  editing), does anyone know of a good editor for PHP for Windows, ideally
  with syntax colouring, etc?
 
  Cheers,
 
   .ben
 
 
 

 --



 --
 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 General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] hi

2002-04-22 Thread Bjorn Abt

unsubscribe

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




[PHP] Return more than 255 chars

2002-04-22 Thread Jeff Hatcher

I'm running Advance Server with MSSQL 2000 Enterprise.

I can not get php to return more than 255 characters. In MSSQL I have
set a column up as an ntext, nvarchar (4000), etc... But no matter what
it only returns 255 characters. Its not the MSSQL Server because I have
no trouble returning with other languages. Any Suggestion?

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




Re: [PHP] Return more than 255 chars

2002-04-22 Thread Scott St. John

Change nvarchar to varchar, ntext to text. I do not think you can return a 
nvarchar from SQL Server like that.  Was this imported from Excel?

-Scott



On Mon, 22 Apr 2002, Jeff Hatcher wrote:

 I'm running Advance Server with MSSQL 2000 Enterprise.
 
 I can not get php to return more than 255 characters. In MSSQL I have
 set a column up as an ntext, nvarchar (4000), etc... But no matter what
 it only returns 255 characters. Its not the MSSQL Server because I have
 no trouble returning with other languages. Any Suggestion?
 
 

-- 



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




[PHP] deleting line in a text field

2002-04-22 Thread Kris Vose

How would you go about deleting a specific line in a textfield via PHP?š For example,š 
I want to delete line 2 only and save the changes. šHow would I go about doing this 
using fread and fwrite?
 
Kris



[PHP] Submit Form

2002-04-22 Thread dengach

I am using php4 on windows and has been serving php files just fine however,
once I started creating forms i.e data submition in forms. The browser
displays /php4/php.exe as part of the url even after I try to refresh the
page.



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




RE: [PHP] $HTTP_*_VARS ?

2002-04-22 Thread Tobias Lindqvist

Hi again.

 Hoe come I cant use $HTTP_*_VARS in my script ? I have
register_globals
 on, track vars is also on and i have made the necessary changes in my
 apache config ( the ALLOWOVERRIDE ALL ). My system is Win XP, Apache
(
 newest ) and newest PHP release.

You don't want to use $HTTP_*_VARS.

You want to use $_* ($_SESSION, $_COOKIE, $_GET, $_POST, $_SERVER, etc)

Well, I cant use them either for some reason...

Tobias.


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




RE: [PHP] Out of memory error message

2002-04-22 Thread Mullin, Reginald

Chris,

Thanks for your feedback.

Note: The ItemNumber is the Primary key for the Item table and the Foreign
key for the Inventory table.  Also, I'm only selecting a limited number of
fields in the MSSQL query string.

P.S.: If it were a PHP/MSSQL error, shouldn't the browser spit out an error
message as well? 

O  From Now 'Till Then,
\-Reginald Alex Mullin
/\  212-894-1690

 -Original Message-
 From: Chris Hewitt [SMTP:[EMAIL PROTECTED]]
 Sent: Saturday, April 20, 2002 7:10 AM
 To:   Mullin, Reginald
 Subject:  Re: [PHP] Out of memory error message
 
 Reginald,
 
 I assume both the Item and Inventory tables have an index on ItemNumber? 
 If not then a full table scan would want lots of memory and time if the 
 tables contain a large number of rows.
 
 Just a thought.
 HTH
 
 Chris
 
 Mullin, Reginald wrote:
 
 Hi Guys,
 
 Does anyone know what the following error message is and how I can go
 about
 solving it?
 
 ***ERROR MSG***
 Out of memory during large request for 2147487744 bytes, total sbrk()
 is
 1459608 bytes.
 
 This error message gets written to Apache's error logs every other time I
 execute my MSSQL query.  The web browser then displays The page cannot
 be
 displayed error (404).
 
 ***SAMPLE MSSQL QUERY***
 if ($ViewItemNumber){
 $ViewItemNumber = urldecode($ViewItemNumber);
 $sql = SELECT
 Item.ItemNumber,Item.Description,Item.Type,Item.Comments,Inventory.Site,I
 nve
 ntory.Location,Inventory.ItemNumber,Inventory.SerialNumber,Inventory.Lot,
 Inv
 entory.OnHandQuantity FROM Item,Inventory WHERE
 (Item.ItemNumber='$ViewItemNumber' AND
 Item.ItemNumber=Inventory.ItemNumber);
 $query = mssql_query($sql) or die (THE SECOND (2) TABLE SELECTION
 FAILED.);
 $results = mssql_fetch_array($query);
 echo $results['ItemNumber'];
 }
 
 
 Note: I'm running LAMP locally (NY) and connecting remotely to a Windows
 2000 box running MS SQL Server 2000 (UK) with the FreeTDS package. 
 
 
 O  From Now 'Till Then,
 \-Reginald Alex Mullin
 /\  212-894-1690
 
 
 
 **
 This email and any files transmitted with it are confidential and
 intended solely for the use of the individual or entity to whom they
 are addressed. If you have received this email in error please notify
 the postmaster at [EMAIL PROTECTED]
 
 
 www.sothebys.com
 **
 
 
 
 


**
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the postmaster at [EMAIL PROTECTED]


www.sothebys.com
**


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




Re: [PHP] Submit Form

2002-04-22 Thread Tyler Longren

Are you using method=post in your form tag?  Sometimes, if you leave that
out, some weird stuff will appear in the URL.

Tyler Longren
Captain Jack Communications
[EMAIL PROTECTED]
www.captainjack.com

- Original Message -
From: dengach [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, April 22, 2002 9:10 AM
Subject: [PHP] Submit Form


 I am using php4 on windows and has been serving php files just fine
however,
 once I started creating forms i.e data submition in forms. The browser
 displays /php4/php.exe as part of the url even after I try to refresh the
 page.



 --
 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] PHP editor for windows

2002-04-22 Thread Lauri Vain

 www.editplus.com

I second this recommendation! Really good program. 

Thanks,
Lauri
--
Tharapita Creations
[server-client web applications]
[EMAIL PROTECTED]
Mobile: +372 53 410 610


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




Re: [PHP] PHP editor for windows

2002-04-22 Thread Erik Price


On Monday, April 22, 2002, at 09:36  AM, .ben wrote:

 Other than notepad, interdev, ultraedit, etc (which i currently use for
 editing), does anyone know of a good editor for PHP for Windows, ideally
 with syntax colouring, etc?

 Cheers,

  .ben

You use etc for editing?  Sounds pretty cool.

(stupid Monday morning humor)



Erik






Erik Price
Web Developer Temp
Media Lab, H.H. Brown
[EMAIL PROTECTED]


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




RE: [PHP] PHP editor for windows

2002-04-22 Thread Maxim Maletsky \(PHPBeginner.com\)

Edit Plus, PHPEdit ... Just browse the archives, Ben


Sincerely,

Maxim Maletsky
Founder, Chief Developer

www.PHPBeginner.com   // where PHP Begins




-Original Message-
From: .ben [mailto:[EMAIL PROTECTED]] 
Sent: Monday, April 22, 2002 3:36 PM
To: PHP
Subject: [PHP] PHP editor for windows


Other than notepad, interdev, ultraedit, etc (which i currently use for
editing), does anyone know of a good editor for PHP for Windows, ideally
with syntax colouring, etc?

Cheers,

 .ben


-- 
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] PHP editor for windows

2002-04-22 Thread .ben

 On Monday, April 22, 2002, at 09:36  AM, .ben wrote:

  Other than notepad, interdev, ultraedit, etc (which i currently use for
  editing), does anyone know of a good editor for PHP for Windows, ideally
  with syntax colouring, etc?
 
  Cheers,
 
   .ben

 You use etc for editing?  Sounds pretty cool.

 (stupid Monday morning humor)



 Erik

Ahh, nothing like a bit of Python-esque humour to start the day (tho, my day
started 8 hours ago!)

Cheers,

 .b


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




RE: [PHP] PHP editor for windows

2002-04-22 Thread SHEETS,JASON (Non-HP-Boise,ex1)

I like ActiveState Komodo, it isn't free (I didn't find anything free that
did what I needed) but they do have a non commericial license and a trial
period.  http://www.activestate.com.

Jason

-Original Message-
From: Lauri Vain [mailto:[EMAIL PROTECTED]]
Sent: Monday, April 22, 2002 8:44 AM
To: 'PHP'
Subject: RE: [PHP] PHP editor for windows


 www.editplus.com

I second this recommendation! Really good program. 

Thanks,
Lauri
--
Tharapita Creations
[server-client web applications]
[EMAIL PROTECTED]
Mobile: +372 53 410 610


-- 
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] $HTTP_*_VARS ?

2002-04-22 Thread Erik Price


On Monday, April 22, 2002, at 10:28  AM, Tobias Lindqvist wrote:

 Hoe come I cant use $HTTP_*_VARS in my script ? I have
 register_globals
 on, track vars is also on and i have made the necessary changes in my
 apache config ( the ALLOWOVERRIDE ALL ). My system is Win XP, Apache
 (
 newest ) and newest PHP release.

 You don't want to use $HTTP_*_VARS.

 You want to use $_* ($_SESSION, $_COOKIE, $_GET, $_POST, $_SERVER, etc)

 Well, I cant use them either for some reason...

Sure you can.  You just hold down the shift key, press the number 4, 
then the dash-key next to the number zero, and then type 'g', 'e', and 
't'.  It should look like this:

$_GET

Next, you release the shift key and type the left-bracket key, followed 
by an apostrophe (singlequote).  Then type the name of the variable.  
Then type another apostrophe, and the closing bracket, like this:

$_GET['variablename']

Now you know how to use them.  If you continue to have problems, please 
try to describe them so that others on this list can come up with 
helpful information.  When you say newest PHP release, I'm assuming 
you're talking about 4.1.2 or higher?


Erik






Erik Price
Web Developer Temp
Media Lab, H.H. Brown
[EMAIL PROTECTED]


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




Re: [PHP] PHP editor for windows

2002-04-22 Thread Erik Price


On Monday, April 22, 2002, at 11:07  AM, .ben wrote:

 Other than notepad, interdev, ultraedit, etc (which i currently use 
 for
 editing), does anyone know of a good editor for PHP for Windows, 
 ideally
 with syntax colouring, etc?

 Cheers,

  .ben

 You use etc for editing?  Sounds pretty cool.

 (stupid Monday morning humor)



 Erik

 Ahh, nothing like a bit of Python-esque humour to start the day (tho, 
 my day
 started 8 hours ago!)

I was thinking of Adam Sandler.  I think it was Happy Gilmore.

Shooter McGrath makes threats, then: I eat shit like you for breakfast!
Happy Gilmore: You eat shit for breakfast?




Erik






Erik Price
Web Developer Temp
Media Lab, H.H. Brown
[EMAIL PROTECTED]


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




RE: [PHP] PHP editor for windows

2002-04-22 Thread Brian Drexler

I really hate to do this, but it's one of my pet peives.

Shooter McGavin:  I eat pieces of shit like you for breakfast.
Happy Gilmore:  You eat pieces of shit for breakfast.

Wonderful movie.sorry about being a prick.

Brian

-Original Message-
From: Erik Price [mailto:[EMAIL PROTECTED]]
Sent: Monday, April 22, 2002 11:19 AM
To: [EMAIL PROTECTED]
Cc: PHP
Subject: Re: [PHP] PHP editor for windows



On Monday, April 22, 2002, at 11:07  AM, .ben wrote:

 Other than notepad, interdev, ultraedit, etc (which i currently use 
 for
 editing), does anyone know of a good editor for PHP for Windows, 
 ideally
 with syntax colouring, etc?

 Cheers,

  .ben

 You use etc for editing?  Sounds pretty cool.

 (stupid Monday morning humor)



 Erik

 Ahh, nothing like a bit of Python-esque humour to start the day (tho, 
 my day
 started 8 hours ago!)

I was thinking of Adam Sandler.  I think it was Happy Gilmore.

Shooter McGrath makes threats, then: I eat shit like you for breakfast!
Happy Gilmore: You eat shit for breakfast?




Erik






Erik Price
Web Developer Temp
Media Lab, H.H. Brown
[EMAIL PROTECTED]


-- 
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] Re: Backup of MySQL database

2002-04-22 Thread Fifield, Mike

I agree it is annoying to see someone ask a question when it doesn't look
like they even tried to find the answer on there own. We just have to
remember that we have all been in the situation where we new so little about
a subject that we didn't even know were to begin to look. 

When a beginner posts a question on the forum, it only takes a couple of
seconds to read the question. On the other hand if you choose to respond to
every under researched question with useless information such as RTFM that
takes more of your time. As well as more time from everyone else who reads
your response. So really by responding with an answer that does not answer
anything is adding to the problem.

Not really that big of a deal though, just my opinion :o) 

Regards

Mike


-Original Message-
From: Julio Nobrega Trabalhando [mailto:[EMAIL PROTECTED]] 
Sent: Monday, April 22, 2002 7:27 AM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] Re: Backup of MySQL database

 I think everyone is aware that there is a mysql manual, obviously if
someone
 is posting in this forum they have not been able to find what they are
 looking for in the manual. Or simply do not have to time to wade through
the
 manual to find what they are looking for.

  Hi Mike, I am not trying to start another flame war on this subject. But I
could have been harsh and just replied RTFM, which was the perfect case
for this. I don't like to answer simple questions, that the poster didn't
look like searched enough for the answer. I am, and I believe you are, busy
men.

  We're here to do the best we can, to help other people, but I believe we
also expect others to act at the same level. When I see a message here,
makes me wonder that the poster has searched for the answer on his own, has
tried, has fought to overcome a problem. A google search, a manual word
search, would give the poster the answer quickly than it took for him to
type his message. Probaly saving not only the original poster, but everyone
who downloaded and read the message, plus who whatever replied.

  Again, this is one of the oldest wars that can be fought in any
newsgroups, but I couldn't not let it pass without brief comments of what is
usually expected in such enviroments :-)

--

Julio Nobrega.

Um dia eu chego lá:
http://sourceforge.net/projects/toca

Ajudei? Salvei? Que tal um presentinho?
http://www.submarino.com.br/wishlistclient.asp?wlid=664176742884


Mike Fifield [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
I think everyone is aware that there is a mysql manual, obviously if someone
is posting in this forum they have not been able to find what they are
looking for in the manual. Or simply do not have to time to wade through the
manual to find what they are looking for.

Here is a link to a script that does essentially what you are looking for.
http://www.zend.net/codex.php?id=634single=1


-Original Message-
From: Julio Nobrega Trabalhando [mailto:[EMAIL PROTECTED]]
Sent: Monday, April 22, 2002 6:51 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Re: Backup of MySQL database

 Can anybody explain me how to do the backup?

  Mysql's manual?

 I want to make a script to do a backup of a MySQL DB and email me it. It
is
 posible?

  Then you take the backup (aka Mysql's dump), and attach it to a mail();


--

Julio Nobrega.

Um dia eu chego lá:
http://sourceforge.net/projects/toca

Ajudei? Salvei? Que tal um presentinho?
http://www.submarino.com.br/wishlistclient.asp?wlid=664176742884


Julian [EMAIL PROTECTED] wrote in message
005601c1e9fb$7bc42600$45102bc8@julian">news:005601c1e9fb$7bc42600$45102bc8@julian...
 Hi list!!!

 I want to make a script to do a backup of a MySQL DB and email me it. It
is
 posible?

 Can anybody explain me how to do the backup?

 Thanks! Julian




--
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 General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Re: PHP + Microsoft Access

2002-04-22 Thread J Smith


AFAIK, there is no unix app for using Access databases. You could try WINE 
or some sort of virtual desktop running Windows and use Access through 
that, but that would probably be even less stable than Windows itself. 

Running Windows 2000 with service pack 2 for the db server should probably 
be stable enough, anyways. I've been using it for a few months and although 
I'm no Windows fan, at least it hasn't died on me yet.

J


Tom Mikulecky wrote:

 Hello
 
 I have to interface an MSAccess database and Apache server on a linux
 box thru PHP. The only way I found to do that is to use ODBC with some
 specific drivers (I tried Openlink). This solution needs sort of server
 running on a Windows station, it serves requests to the Access database
 file.
 
 The problem is that I would like to do this WITHOUT any Windows station,
 to achieve good reliability (we can't have a Windows station running
 just for that). Also the database can't be ported to any other format
 because there are some programs written in VB-Access that need it as is.
 
 So what I need is sort of sql driver for accessing mdb files on a
 unix/linux box. Does-it exist? I searched a lot on the web but with no
 succes.
 
 Any suggestions are welcome
 Thanx in advance
 
 Some details:
 - The Access database file (mdb) is located on a Unix box in a shared
 folder
 
 Tom


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




[PHP] deleting lines in a textfield

2002-04-22 Thread Kris Vose

How would you go about deleting a specific line in a textfield via PHP?  For example, 
I want to delete line 2 only and save the changes.  How would I go about doing this 
using fopen and fwrite?
š
Kris



Re: [PHP] script executeion problem - executes twice for no reason - help

2002-04-22 Thread R'twick Niceorgaw

remove the To:$email  from $headers. You have it already in the $to
parameter.


- Original Message -
From: Edward Bailey [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, April 22, 2002 11:48 AM
Subject: [PHP] script executeion problem - executes twice for no reason -
help


 Please excuse my ignorance, this is probably a simple
 problem but I have no idea what to do next.

 I wrote the following to send an automated response to
 users that fill out a form, select submit and that
 triggers the conditional if statement and then the
 script sends an HTML based newsletter to the user. The
 script does work, but it sends out TWO newsletters
 instead of one and I have no idea why. I have used the
 code below in several different forms and it does the
 same thing each time so I would assume the code is the
 problem.


 if()
 {$filename = ../includes/news.html;
 $to = $email;
 $subject = Newsletter;
 $fd = fopen ($filename, 'r');
 $message = fread ($fd,
 fileSize(../includes/news.html));
 fclose ($fd);
 $headers = To: $email\nFrom: $from\nReply-To:
 $reply_address\nMIME-Version: 1.0\nContent-type:
 text/html; charset=iso-8859-1\n;
 mail($to, $subject, $message, $headers);
 }

 Can anyone help me or point me in the right direction?

 Thanks

 Ed


 __
 Do You Yahoo!?
 Yahoo! Games - play chess, backgammon, pool and more
 http://games.yahoo.com/

 --
 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] Re: PHP editor for windows

2002-04-22 Thread Kunal Jhunjhunwala

I have been using html-kit @ http://www.chami.com/html-kit/
works great.. and the only stable inbuilt FTP proggy i have seen to date..
does anyone have alternatives to this? :)
Regards,
Kunal Jhunjhunwala

Minds think with ideas, not information. No amount of data, bandwidth, or
processing power can substitute for inspired thought. - Clifford Stoll
- Original Message -
From: dengach [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, April 22, 2002 9:16 PM
Subject: [PHP] Re: PHP editor for windows


 Have you tried Maguma Studio Light for PHP With Help version 1.0.0
released
 2002-04-05  formerly PHPide, get it from http://www.maguma.com . The
version
 with help comes with php and mysql help.

 .Ben [EMAIL PROTECTED] wrote in message
 [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
  Other than notepad, interdev, ultraedit, etc (which i currently use for
  editing), does anyone know of a good editor for PHP for Windows, ideally
  with syntax colouring, etc?
 
  Cheers,
 
   .ben
 





 --
 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] deleting lines in a textfield

2002-04-22 Thread Christoph Starkmann

AFAIK, there are no lines in a textfield; Text is simply displayed 
as needed to fit in the area of the textfield.

As soon as you can do anything with it in PHP, it is no longer in
a textfield but simply one string; This string you may search with
regular expressions or using PHP string functions.

If there were (are?) several lines, just crop everything from the
first newline to (not including) the second one.

HTH,

Kiko


 -Original Message-
 From: Kris Vose [mailto:[EMAIL PROTECTED]]
 Sent: Monday, April 22, 2002 5:45 PM
 To: [EMAIL PROTECTED]
 Subject: [PHP] deleting lines in a textfield
 
 
 How would you go about deleting a specific line in a 
 textfield via PHP?  For example, I want to delete line 2 only 
 and save the changes.  How would I go about doing this using 
 fopen and fwrite?
 š
 Kris
 

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




Re: [PHP] PHP editor for windows

2002-04-22 Thread DL Neil

 I really hate to do this, but it's one of my pet peives.

is that like a pet rock?

BTW if we're exercising peevishness, at the same time as indulging in
anally non-retentive breakfast habits, check out
http://www.onelook.com/cgi-bin/cgiwrap/bware/afen.cgi?type=word_allword
=peeve

  Other than notepad, interdev, ultraedit, etc (which i currently
use
  for
  editing), does anyone know of a good editor for PHP for Windows,
  ideally
  with syntax colouring, etc?

  You use etc for editing?  Sounds pretty cool.

This is a new product Erik, only released at the beginning of this
month, so it's no surprise that you haven't seen it in use yet. etc
(TM) is able to follow up the syntax coloring operation by making
changes to the code to correct syntax errors, puts brackets in exactly
the right place to indicate block structure within the code, imposes
data type prefixes in strict convention, chooses better variable names
than any caffeine-driven prog, and alerts designers to most logic errors
(the paid-support version guarantees a higher rate of success at the
last).

=dn


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




[PHP] $HTTP_POST_VARS vs _POST

2002-04-22 Thread DrouetL

HI ML

Only one little question :
I know that _POST doesn't exists on php 4.0.6 but does $HTTP_POST_VARS
exist on php 4.1.2 ?


Regards

Laurent



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




Re: [PHP] Session Tutorial

2002-04-22 Thread Ornella Fasolo

Hi,

I got a good start-tutorial from www.onlamp.com
the complete URL is 
http://www.onlamp.com/pub/a/php/excerpt/webdbapps_8/index.html?page=2
if you had some problem, you can write me, so I could send you it as an
attached file

i found it very good

regards
Ornella


Recently I have been trying to work with sessions however I must admit that
I am not sure I completely understand them. Does anyone know of a good
tutorial that thoroughly explains sessions?

Thanks in advance


--
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] Re: deleting lines in a textfield

2002-04-22 Thread Adrian Ciutureanu

?php
$file_name = 'test.txt';
$line_no_to_delete = 2;

$f = fopen($file_name, 'rw+');
$s = explode(\n, fread($f, filesize($file_name)));
unset($s[$line_no_to_delete - 1]);
fseek($f, 0);
fputs($f, implode(\n, $s));
fclose($f);
?

Kris Vose [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
How would you go about deleting a specific line in a textfield via PHP?  For
example, I want to delete line 2 only and save the changes.  How would I go
about doing this using fopen and fwrite?

Kris




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




[PHP] adding numbers to a file

2002-04-22 Thread Craig Westerman

I have a simple count file named count_db that contains ONLY the following:

{
'total' = 3954
}

How do I open file, find numbers in the file, add $newnumbers to existing
numbers. Then write these new numbers over the original numbers and close
the file. I'm just needing to do this once a day to correct a poor count.

Thanks

Craig 
[EMAIL PROTECTED]

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




[PHP] Re: adding numbers to a file

2002-04-22 Thread Adrian Ciutureanu

?php
$file_name = 'test.txt';
$new_value = rand(1000, 100);

$f = fopen($file_name, 'rw+');
$s = explode(\n, fread($f, filesize($file_name)));
$s[1] = substr($s[1], 0, 11) . $new_value;
fseek($f, 0);
fputs($f, implode(\n, $s));
fclose($f);
?

Craig Westerman [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 I have a simple count file named count_db that contains ONLY the
following:

 {
 'total' = 3954
 }

 How do I open file, find numbers in the file, add $newnumbers to existing
 numbers. Then write these new numbers over the original numbers and close
 the file. I'm just needing to do this once a day to correct a poor count.

 Thanks

 Craig 
 [EMAIL PROTECTED]



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




Re: [PHP] adding numbers to a file

2002-04-22 Thread Rasmus Lerdorf

$lines = file('filename');
foreach($lines as line) {
list($var,$val) = explode('=',$line);
if(trim($var)=='total') $val = trim($val);
}
$val = $new_value;
$fp = fopen('filename','w');
fputs($fp,{\n'total' = $new_value\n});
fclose($fp);

-Rasmus

On Mon, 22 Apr 2002, Craig Westerman wrote:

 I have a simple count file named count_db that contains ONLY the following:

 {
 'total' = 3954
 }

 How do I open file, find numbers in the file, add $newnumbers to existing
 numbers. Then write these new numbers over the original numbers and close
 the file. I'm just needing to do this once a day to correct a poor count.

 Thanks

 Craig 
 [EMAIL PROTECTED]

 --
 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] script executeion problem - executes twice for no reason- help

2002-04-22 Thread Miguel Cruz

On Mon, 22 Apr 2002, Edward Bailey wrote:
 if()
 {$filename = ../includes/news.html;

This condition will always return true.

What you are doing here is first executing the assignment:

   $filename = ../includes/news.html;

and then testing the outcome of that assignment (which is 
../includes/news.html). 

If you want to test whether or not $filename contains 
../includes/news.html, then you should use == instead of =

miguel


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




[PHP] How do remove WARNING message

2002-04-22 Thread Jean-Rene Cormier

Ok I'm trying to create a script that would allow users to bind to an
LDAP server and we all know there's gonna be some people mistyping their
password but when I try to bind and put the wrong password I always get
a warning message like this:

Warning: LDAP: Unable to bind to server: Invalid credentials in
/whatever/dir/script.php on line 53

Is there a way I don't get this message and I'd put my own error
message?

Thanks

Jean-Rene Cormier




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




Re: [PHP] $HTTP_POST_VARS vs _POST

2002-04-22 Thread Erik Price


On Monday, April 22, 2002, at 12:19  PM, [EMAIL PROTECTED] wrote:

 HI ML

 Only one little question :
 I know that _POST doesn't exists on php 4.0.6 but does $HTTP_POST_VARS
 exist on php 4.1.2 ?

Yes, but you would have had an answer to this question 45 minutes ago if 
you had just tried it.


Erik






Erik Price
Web Developer Temp
Media Lab, H.H. Brown
[EMAIL PROTECTED]


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




RE: [PHP] PHP editor for windows

2002-04-22 Thread .ben

   Other than notepad, interdev, ultraedit, etc (which i currently
 use
   for
   editing), does anyone know of a good editor for PHP for Windows,
   ideally
   with syntax colouring, etc?

   You use etc for editing?  Sounds pretty cool.

 This is a new product Erik, only released at the beginning of this
 month, so it's no surprise that you haven't seen it in use yet. etc
 (TM) is able to follow up the syntax coloring operation by making
 changes to the code to correct syntax errors, puts brackets in exactly
 the right place to indicate block structure within the code, imposes
 data type prefixes in strict convention, chooses better variable names
 than any caffeine-driven prog, and alerts designers to most logic errors
 (the paid-support version guarantees a higher rate of success at the
 last).

 =dn

Actually, I think you'll find that those features are actually only
available in Etc Plus! 2002 (Gold), Enterprise version.

No i do not have a copy.

 .b


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




Re: [PHP] How do remove WARNING message

2002-04-22 Thread Rasmus Lerdorf

Read the error handling chapter in the documentation.

-Rasmus

On Mon, 22 Apr 2002, Jean-Rene Cormier wrote:

 Ok I'm trying to create a script that would allow users to bind to an
 LDAP server and we all know there's gonna be some people mistyping their
 password but when I try to bind and put the wrong password I always get
 a warning message like this:

 Warning: LDAP: Unable to bind to server: Invalid credentials in
 /whatever/dir/script.php on line 53

 Is there a way I don't get this message and I'd put my own error
 message?

 Thanks

 Jean-Rene Cormier




 --
 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] From where was function called?

2002-04-22 Thread Nico van der Dussen

Hi,

I'm having a real problem:

In a codeset of more than 5000 lines of code, I have a rogue call to a
function.

Is there a way I can determine in a function from where the call was
made?  (Filename, linenumber etc)

Thanks

Nico


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




[PHP] ImageCreate v. ImageCreateTrueColor

2002-04-22 Thread Leotta, Natalie (NCI/IMS)

Hello,
 
I'm making an Image and I was wondering what the difference is between these
two Image constructors.  I need to find a way to make dotted and dashed
lines (according to different patterns I've been given) and I want the
sections between the dots to be transparent.  I'm planning on using the
ImageSetStyle function.  From what I read on PHP.net, some things cannot be
used with ImageCreateTrueColor, but it looks like some can only be used that
one. 
 
One thing I'm interested in is the constant IMG_COLOR_TRANSPARENT - can this
be used with ImageCreate?  
 
Is there a reason I should use one of the constructors over the other?
 
Thanks!
 
-Natalie
 

Natalie S. Leotta
Information Management Services, Inc.
(301) 680-9770
[EMAIL PROTECTED] 

 



Re: Re: [PHP] PHP editor for windows

2002-04-22 Thread DL Neil

  etc (TM) is able to follow up the syntax coloring operation by
making
  changes to the code to correct syntax errors, puts brackets in
exactly
  the right place to indicate block structure within the code, imposes
  data type prefixes in strict convention, chooses better variable
names
  than any caffeine-driven prog, and alerts designers to most logic
errors
  (the paid-support version guarantees a higher rate of success at the
  last).

Only the M$ version enforces rules.
All other OpSys users can/will do what they like.

 How about enforcing/auto-correcting to the One True Brace Style
(version
 42.0)?

It works with parentheses, brackets, braces, etc.

=dn


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




[PHP] Re: mod_rewrite

2002-04-22 Thread Philip Hallstrom

You could also do something like this:

Configure Apache so that *every* request on a virtual
host would be handled by a single PHP script.

VirtualHost *:80
 ServerName myserver.mydomain.org
 DocumentRoot /usr/local/www/myserver
 Action php-parse /path-to/script.php

 Action php-parse /path-to/script.php
 SetHandler php-parse

 Location /path-to/script.php
   SetHandler application/x-httpd-php
 /Location
/VirtualHost

Every request (whether the file exists or not) is handled by
/path-to/script.php.

Note that this means that gifs/jpgs also get run through this...


On Wed, 17 Apr 2002, [ rswfire ] wrote:

 I could really use your help with this.  The examples I have received from
 everyone thus far have not worked, including the last one that you posted.
 This is the situation:

 I have multiple domains, each with multiple subdomains, all of which
 automatically point to the root of my web environment.  I have only one file
 that does all of the work for all of these websites/webpages, and that is
 the index.php file in the root.  This file is smart enough to parse the url
 being accessed and create an appropriate page based on a very complex set of
 rules.

 Originally, I was using the ErrorDocument 404 to make it access the
 index.php file, but this has some inherent flaws.  The biggest problem was
 that forms that were being posted to a page that doesn't really exist never
 maintained the posted variables (due to the 404 redirect.)  Another
 limitation was that it just created a bunch of unnecessary error messages in
 my error log since there are no real pages on my network, even though it
 pretends there is.

 So, I need to use mod_rewrite.  That is apparent now.  The problem is I know
 nothing about creating regular expressions.  I simply need it to rewrite the
 url for any file that does not exist (it should not try to do so for a file
 that really does exist, say an image file) and it needs to have the
 following rule:

 A*.B*.C*/D*.E*

 Where A is a subdomain; B is the domain name; C is the top level domain; D/E
 are a file or directory.

 Some examples would be:

 http://www.swifte.net/
 http://www.cao.swifte.net/petition-sign.html
 http://hsdnetwork.swifte.net/technicians.html
 http://www.hsdnetwork.swifte.net/technicians.html
 http://www.caofund.org/
 http://www.hsdnetwork.com/

 Can you tell me how to do this?  I would appreciate your help so much!!

 -Samuel

 _
 Chat with friends online, try MSN Messenger: http://messenger.msn.com


 --
 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] How do remove WARNING message

2002-04-22 Thread Dennis Moore

I am not a LDAP expert, however I assume you can place a condition on your
bind command to kill the script or go to your error reporting...

?php
// do something like...
ldap_bind($bindstr) or die(Enter your error message here);

?

- Original Message -
From: Jean-Rene Cormier [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, April 22, 2002 1:03 PM
Subject: [PHP] How do remove WARNING message


 Ok I'm trying to create a script that would allow users to bind to an
 LDAP server and we all know there's gonna be some people mistyping their
 password but when I try to bind and put the wrong password I always get
 a warning message like this:

 Warning: LDAP: Unable to bind to server: Invalid credentials in
 /whatever/dir/script.php on line 53

 Is there a way I don't get this message and I'd put my own error
 message?

 Thanks

 Jean-Rene Cormier




 --
 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] Second opinion needed - javascript blocker

2002-04-22 Thread Leif K-Brooks

I am trying to block javascript from ares of my site that  users can change.
I am going to use the following code.  Can someone give me a second opinion
on whether it will work?

function stopjavascript($text){
//Stop people from using whatever;  tags, in case they can smuggle
javascript in with that
$text = str_replace(,amp;,$text);
//Stop the onmouseover, etc. parameters
$text = eregi_replace(on,o-n,$text);
//Stop script tags, as well as links to javascript:
$text = eregi_replace(script,sc-ript,$text);
//Return the edited string
return $text;
}


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




AW: [PHP] Second opinion needed - javascript blocker

2002-04-22 Thread Red Wingate

Maybe u should just strip all the javascript tags out
Of the user-input (output page) with a script like this:

$text = eregi_replace( *script[^]*([^]*)[^]*,//1,$test);

this should stip all the script-tags out of the text, but
will keep the text between the tags.

(the code was NOT tested :))

HF
red
-Ursprungliche Nachricht-
Von: Leif K-Brooks [mailto:[EMAIL PROTECTED]]
Gesendet: Montag, 22. April 2002 9:18 PM
An: [EMAIL PROTECTED]
Betreff: [PHP] Second opinion needed - javascript blocker

I am trying to block javascript from ares of my site that  users can change.
I am going to use the following code.  Can someone give me a second opinion
on whether it will work?

function stopjavascript($text){
//Stop people from using whatever;  tags, in case they can smuggle
javascript in with that
$text = str_replace(,amp;,$text);
//Stop the onmouseover, etc. parameters
$text = eregi_replace(on,o-n,$text);
//Stop script tags, as well as links to javascript:
$text = eregi_replace(script,sc-ript,$text);
//Return the edited string
return $text;
}


--
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




  1   2   >