[PHP-CVS] cvs: php4 /ext/standard filestat.c

2001-04-25 Thread Andi Gutmans

andiTue Apr 24 23:30:24 2001 EDT

  Modified files:  
/php4/ext/standard  filestat.c 
  Log:
  - Fix filetype() and lstat() too.
  
  
Index: php4/ext/standard/filestat.c
diff -u php4/ext/standard/filestat.c:1.60 php4/ext/standard/filestat.c:1.61
--- php4/ext/standard/filestat.c:1.60   Tue Apr 24 22:53:45 2001
+++ php4/ext/standard/filestat.cTue Apr 24 23:30:24 2001
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: filestat.c,v 1.60 2001/04/25 05:53:45 andi Exp $ */
+/* $Id: filestat.c,v 1.61 2001/04/25 06:30:24 andi Exp $ */
 
 #include php.h
 #include safe_mode.h
@@ -446,6 +446,7 @@
 }
 /* }}} */
 
+#define IS_LINK_OPERATION() (type == 8 /* filetype */ || type == 14 /* is_link */ || 
+type == 16 /* lstat */)
 
 static void php_stat(const char *filename, php_stat_len filename_length, int type, 
pval *return_value)
 {
@@ -469,29 +470,23 @@
BG(lsb).st_mode = 0; /* mark lstat buf invalid */
 #endif
if (V_STAT(BG(CurrentStatFile), BG(sb)) == -1) {
-   if ((type != 14)  (type != 15 || errno != ENOENT)) { /* 
fileexists() test must print no error */
+   if (!IS_LINK_OPERATION()  (type != 15 || errno != ENOENT)) { 
+/* fileexists() test must print no error */
php_error(E_NOTICE,stat failed for %s (errno=%d - 
%s), BG(CurrentStatFile), errno, strerror(errno));
}
efree(BG(CurrentStatFile));
BG(CurrentStatFile) = NULL;
-   if (type != 14) { /* Don't require success for is link */
+   if (!IS_LINK_OPERATION()) { /* Don't require success for link 
+operation */
RETURN_FALSE;
}
}
}
 
 #if HAVE_SYMLINK
-   if (8 == type /* filetype */
-   || 14 == type /* is link */
-   || 16 == type) { /* lstat */
-
+   if (IS_LINK_OPERATION()  !BG(lsb).st_mode) {
/* do lstat if the buffer is empty */
-
-   if (!BG(lsb).st_mode) {
-   if (V_LSTAT(filename, BG(lsb)) == -1) {
-   php_error(E_NOTICE, lstat failed for %s (errno=%d - 
%s), filename, errno, strerror(errno));
-   RETURN_FALSE;
-   }
+   if (V_LSTAT(filename, BG(lsb)) == -1) {
+   php_error(E_NOTICE, lstat failed for %s (errno=%d - %s), 
+filename, errno, strerror(errno));
+   RETURN_FALSE;
}
}
 #endif



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Precedence question- cookie value over form value?

2001-04-25 Thread Rasmus Lerdorf

 If I have a script that checks to see if a variaable is defined. The
 variaable is from a form and is sent to the script. There is also a
 cookie that may be set with a name as the same name as from the form.
 When the script checks and assuming the cookie is set and a value sent
 from the form , which value does the variable take on?

This is determined by your variables_order directive in your php.ini
file.  By default it is set to EGPCS which means that variables are
parsed and inserted into the symbol table in the order:

 Environment - GET - POST - Cookie - Server

That is, the later ones override the earlier ones.  So in your case the
cookie variable would take precedence.  The one from the form (the POST
one) would of course still be available in the $HTTP_POST_VARS array.

-Rasmus


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] unable to parse php

2001-04-25 Thread elias

you're trying to include test.php w/o specifiying it's correct location in
your other PHP script.
that's how it looks from here...

-elias
http://eassoft.cjb.net

[EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Anyone able to shed some light on this error?

 Warning: Failed opening '/usr/local/apache/htdocs/php/test/test.php'
 for inclusion (include_path='') in Unknown on line 0

 thanks, brendan


 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-CVS] cvs: php4 /sapi/thttpd thttpd.c

2001-04-25 Thread Sascha Schumann

sas Tue Apr 24 23:42:24 2001 EDT

  Modified files:  
/php4/sapi/thttpd   thttpd.c 
  Log:
  Fix optimization -- we did not send out custom Response Status Lines.
  
  
Index: php4/sapi/thttpd/thttpd.c
diff -u php4/sapi/thttpd/thttpd.c:1.40 php4/sapi/thttpd/thttpd.c:1.41
--- php4/sapi/thttpd/thttpd.c:1.40  Sun Apr 22 07:22:40 2001
+++ php4/sapi/thttpd/thttpd.c   Tue Apr 24 23:42:24 2001
@@ -77,17 +77,24 @@
int n = 0;
zend_llist_position pos;
sapi_header_struct *h;
+   size_t len;

if (!SG(sapi_headers).http_status_line) {
-   size_t len;
-
snprintf(buf, 1023, HTTP/1.0 %d Something\r\n, 
SG(sapi_headers).http_response_code);
len = strlen(buf);
vec[n].iov_base = buf;
-   vec[n++].iov_len = len;
-   TG(hc)-status = SG(sapi_headers).http_response_code;
-   TG(hc)-bytes_sent += len;
+   vec[n].iov_len = len;
+   } else {
+   vec[n].iov_base = SG(sapi_headers).http_status_line;
+   len = strlen(vec[n].iov_base);
+   vec[n].iov_len = len;
+   vec[++n].iov_base = \r\n;
+   vec[n].iov_len = 2;
+   len += 2;
}
+   TG(hc)-status = SG(sapi_headers).http_response_code;
+   TG(hc)-bytes_sent += len;
+   n++;
 
h = zend_llist_get_first_ex(sapi_headers-headers, pos);
while (h) {



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] last modified

2001-04-25 Thread Maxim Maletsky

my own 2c:

fopen:
fwrite into a file of yours,

when doing a check:
fopen 
compare the buffer size to the file size you have saved.

or the whole HTML code as a string.

But, I guess it is very unreliable since there are such things as banner
rotations etc...

Maybe there's another way to do it I never heard of.

Sincerely, 

 Maxim Maletsky
 Founder, Chief Developer
 PHPBeginner.com (Where PHP Begins)
 [EMAIL PROTECTED]
 www.phpbeginner.com



-Original Message-
From: Kasten, Holger [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, April 25, 2001 8:51 AM
To: [EMAIL PROTECTED]
Subject: [PHP] last modified 


Hello,
 
how can I check the last modified date of a website. I mean not my own site,
I mean other sites.
 
Thanx,
 
Holger

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] hello

2001-04-25 Thread Ralph Guzman

http://www.webmin.com

-Original Message-
From: Maxim Maletsky [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, April 25, 2001 12:10 AM
To: 'SuiteNet Operations Manager'; php-general
Subject: RE: [PHP] hello


what about Webmin?

it's wuite cool, it has it all.

(don't remember the URL, it comes with Linux Mandrake 7.2 for sure)
try searching on google

Sincerely, 

 Maxim Maletsky
 Founder, Chief Developer
 PHPBeginner.com (Where PHP Begins)
 [EMAIL PROTECTED]
 www.phpbeginner.com



-Original Message-
From: SuiteNet Operations Manager [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, April 25, 2001 1:59 PM
To: php-general
Subject: [PHP] hello


Im looking to set-up a customer based control panel for my
servers.
Running linux/apache.
I was wondering if you had any advice on ware to look for programs or
scripts that might help me to do this. I tried looking.
And I have not found anything any help would be highly appreciated thank
you.
-- 
Regards
Herb McDonald SuiteNet Comm Inc., Operations Manager
http://www.suite.net/
   PLEASE MAKE A NOTE THANK YOU !
   
Support has been changed from 
  1-954-971-4025  TO 1-561-784-9407
 Order/New Account Info Only 1-800-510-1936
 MESSAGE SEPARATOR 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] last modified

2001-04-25 Thread CC Zona

In article FA432D4D6C2EC1498940A59C494F153873335B@stca207a,
 [EMAIL PROTECTED] (Kasten, Holger) wrote:

 how can I check the last modified date of a website. I mean not my own site,
 I mean other sites.

Use fsockopen(), send a HEAD request, get back (sometimes*) a Last-Modified 
header.

*See RFC 2616 for more info on the inherent limitation of depending on 
Last-Modified.

-- 
CC

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] the SkyBiz matrix|downline program using PHP mySQL

2001-04-25 Thread Thomas Edison Jr.

we're trying to develop an exact replica of the SkyBiz
downline|Matrix system program. But it's getting so
complicated  niether is the logic coming out. we're
in need of help. Anyone familiar with the skybiz
matrix, please help!!
It's a 2 X 2 matrix system where a person can have
only two legs below him - Left  Right = and thus the
chain grows. Each person sponsors 2 people below him.
They can be directly below him or somewhere down the
line. But keeping a count of how many people o one's
right  left is getting impossible logically. 
please help!

Cheers,
T. Edison jr.


=
Rahul S. Johari (Director)
**
Abraxas Technologies Inc.
Homepage : http://www.abraxastech.com
Email : [EMAIL PROTECTED]
Tel : 91-4546512/4522124
***

__
Do You Yahoo!?
Yahoo! Auctions - buy the things you want at great prices
http://auctions.yahoo.com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] checking url

2001-04-25 Thread Maxim Maletsky

well, you can try fsockopen.

see it on php.net/fsockopen

it will even return you an error if not connected.

start from the example describing the function on PHP.net/fsockopen (did I
misspelled it?)


Sincerely, 

 Maxim Maletsky
 Founder, Chief Developer
 PHPBeginner.com (Where PHP Begins)
 [EMAIL PROTECTED]
 www.phpbeginner.com



-Original Message-
From: Dmitry [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, April 25, 2001 5:44 AM
To: [EMAIL PROTECTED]
Subject: [PHP] checking url


Hello all.
Can you tell me, how can I check url address?
Also I want to know error, which return.
 Dmitry



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Very important.

2001-04-25 Thread Maxim Maletsky

This virus was reply to each email sent.

I, that day, have posted a reply here to someone. It reached some poor
php-general list subscriber and it's outlook (or whatever) has replied to me
personally with that .EXE file attached. I didn't open it of course since I
receive such a staff at least twice a day (no kidding, I am subscribed to
dozens of lists)

I think, removing the guy of the list would help us to avoid meeting the
virus on this list again.


Sincerely, 

 Maxim Maletsky
 Founder, Chief Developer
 PHPBeginner.com (Where PHP Begins)
 [EMAIL PROTECTED]
 www.phpbeginner.com



-Original Message-
From: Padraic Tynan [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, April 25, 2001 6:29 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Very important.


Hi.

Yesterday an email-virus entitled Emanuel was sent out over this list, and I
am not sure by who. It came in the form of Emanuel.exe, and had an icon
resembling that of a standalone flash projector file (pink diamond with a
white multi-pointed asterisk-type thing in the middle).

This virus appears to be a backorifice or netbus style virus, and adds
something to a system file that makes it so that *every* time you try to
launch a program, it launches Wintask.exe, which is *not* an official
task, despite the name. It puts a green ICQ flower in your taskbar, and if
you click it, a button pops up that says Nunca bla bla esta button. The
bla bla is because I forget the word for push in spanish, and I'm not
about to open this program again -- It translates to NEVER PUSH THE BUTTON
-- and trust me, *don't*, this, i have found, is what activates the virus.

I may have lost several weeks of work to this virus, and I advise you all to
watch out, as it was likely sent inadvertantly.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] getting rows from separate tables stacked in a single array ? (newbie, mysql)

2001-04-25 Thread Maxim Maletsky

hey, why not to have one single query?

or..

INSERT INTO tmp_table SELECT * FROM first_table;
INSERT INTO tmp_table SELECT * FROM second_table;

... do a query on tmp_table,

DELETE FROM tmp_table;


but, isn't it better to have one table only? - you'll skipp three steps.



Sincerely, 

 Maxim Maletsky
 Founder, Chief Developer
 PHPBeginner.com (Where PHP Begins)
 [EMAIL PROTECTED]
 www.phpbeginner.com



-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, April 25, 2001 5:42 AM
To: [EMAIL PROTECTED]
Subject: [PHP] getting rows from separate tables stacked in a single
array ? (newbie, mysql)


Hi. 

This will probably sound simple to all of you but I am hitting my head on
a brick wall so far :-).

I need to generate a list (sorted by descending time) of different objects
referenced in multiple tables. All those objects share a key related to a
project.


This works splendidly from a single table :




$sql=select * from storyboards, where spot_id = \$spot_id\ order by
date_posted desc;
$result=MySQL_query($sql,$db);
while($row=MySQL_fetch_array($result))
{
$qt_title = $row[title];
$qt_duration = $row[duration];
$qt_date_posted = $row[date_posted]; //(timestamp)
$qt_description = $row[description];
$qt_id = $row[quicktime_id];
 


}

Is there a mysql query that would allow me to stack complete rows in
multiple tables at once (It seems more elegant because I can sort them
while extracting them) or is there a way in PHP to concatenate results in
a single array and then sort them by time... ?

I tried to use a join query, wich produced an invalid query error. (I
think it tries to produce a table with merged data, not just a stack of
rows).
 

$sql4=select * from quicktimes, other_images, storyboards, where
quicktimes.spot_id, other_images.spot_id, storyboards.spot_id =
\$spot_id\ order by date_posted desc;

thank you for your help !
nicolas

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Lines

2001-04-25 Thread Maxim Maletsky

I know, it was already answered before me (you),

I just though that an SQL database is a good advice for these who are trying
to do this kind of jobs.
It is obvious that the reason to use this function is to manage a stored
data in files.
then why not a database, if possible?


Sincerely, 

 Maxim Maletsky
 Founder, Chief Developer
 PHPBeginner.com (Where PHP Begins)
 [EMAIL PROTECTED]
 www.phpbeginner.com



-Original Message-
From: Jason Murray [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, April 25, 2001 4:52 PM
To: Maxim Maletsky; 'Rafael Faria'; [EMAIL PROTECTED]
Subject: RE: [PHP] Lines


  it's my first post on this list, and my doubt is...
  
  how can i take a file.txt and
  
  1 - know how many lines i have in this text
  2 - print line 5 until 10

 Is there any chance for you to use a database?
 these thing would become MUCH, MUCH easier.

Actually, this is really easy without using a database.

1. ?
  $filename = /path/to/file;
  $filedata = file($filename);
  $linesinfile = count($filedata);
   ?

2. ?
  $startline = 5;
  $stopline = 10;

  for ($i = $startline; $i  $stopline; $i++ )
  {
echo $filedata[$i-1];
  }
   ?

(Use $i-1 because the first line is actually 0).

Jason

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Newbie question about Classes

2001-04-25 Thread Maxim Maletsky

you should be starting to program from C++   :-)

Classes are described in many manuals on the web.
Try downloading phplib (phplib.netuse.de) to see then alive
phplib is one the most magnificent examples of classes use in PHP.


Sincerely, 

 Maxim Maletsky
 Founder, Chief Developer
 PHPBeginner.com (Where PHP Begins)
 [EMAIL PROTECTED]
 www.phpbeginner.com



-Original Message-
From: SED [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, April 25, 2001 1:47 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Newbie question about Classes


Hi,

I have now been 3-4 months writing PHP-codes and read the PHP manual
throughout. But there is one thing I can't figure out properly (I think it's
not covered enough in the manual): Classes!

When and why would I use it?

Is it only to group certain functions or does it have a special function?

Thanks!

Regards,
Sumarlidi Einar Dadason

SED - Graphic Design

--
Phone:   (+354) 4615501
Mobile:  (+354) 8960376
Fax: (+354) 4615503
E-mail:  [EMAIL PROTECTED]
Homepage:www.sed.is - New Homepage!
--


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Lines

2001-04-25 Thread Maxim Maletsky

Is there any chance for you to use a database?
these thing would become MUCH, MUCH easier.

Sincerely, 

 Maxim Maletsky
 Founder, Chief Developer
 PHPBeginner.com (Where PHP Begins)
 [EMAIL PROTECTED]
 www.phpbeginner.com



-Original Message-
From: Rafael Faria [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, April 25, 2001 4:59 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Lines




Hey Guys,
it's my first post on this list, and my doubt is...

how can i take a file.txt and

1 - know how many lines i have in this text
2 - print line 5 until 10

?

can someone help me?





---

[ r a f a e l   f a r i a] _
[EMAIL PROTECTED]
WebMaster Universo Online - http://www.uol.com.br
Phone # +55 11 3038-8665


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] PHP --with-imap

2001-04-25 Thread Calin Rotaru

Hello.

I have a problem with PHP.
I want to use imap functions. I receive a message that imap function is not 
defined. I compiled PHP again with --with-imap option , but I've got an error 
message at Apache compilation. 
What is realy happening?
Thanks

Calin

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Lines

2001-04-25 Thread Jason Murray

 I know, it was already answered before me (you),
 
 I just though that an SQL database is a good advice for these 
 who are trying to do this kind of jobs. It is obvious that the 
 reason to use this function is to manage a stored data in files.
 then why not a database, if possible?

I didn't see the purpose (I'm tired) - I just answered the q cos
I had a heart attack when I saw an answer of use a database for
counting line numbers ;)

Jason

-- 
Jason Murray
[EMAIL PROTECTED]
Web Developer, Melbourne IT
What'll Scorpy use wormhole technology for?
'Faster pizza delivery.'

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Lines

2001-04-25 Thread Jason Murray

  it's my first post on this list, and my doubt is...
  
  how can i take a file.txt and
  
  1 - know how many lines i have in this text
  2 - print line 5 until 10

 Is there any chance for you to use a database?
 these thing would become MUCH, MUCH easier.

Actually, this is really easy without using a database.

1. ?
  $filename = /path/to/file;
  $filedata = file($filename);
  $linesinfile = count($filedata);
   ?

2. ?
  $startline = 5;
  $stopline = 10;

  for ($i = $startline; $i  $stopline; $i++ )
  {
echo $filedata[$i-1];
  }
   ?

(Use $i-1 because the first line is actually 0).

Jason

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] DOCUMENT_ROOT

2001-04-25 Thread Maxim Maletsky

Open your apache's httpd.conf file:

see anything like this on VHost configuration of the site in question?

JI Admin Database
VirtualHost 1.0.0.10
ServerAdmin [EMAIL PROTECTED]
DocumentRoot D:/JI_admin
ServerName admin
ErrorLog logs/JI_admin-error.log
CustomLog logs/JI_admin-access.log common
/VirtualHost


that   

DocumentRoot D:/JI_admin

is exactly what your 

$DOCUMENT_ROOT

should be returning.

I think that is where your problem.


Sincerely, 

 Maxim Maletsky
 Founder, Chief Developer
 PHPBeginner.com (Where PHP Begins)
 [EMAIL PROTECTED]
 www.phpbeginner.com




-Original Message-
From: Jordan Elver [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, April 25, 2001 2:54 AM
To: PHP General Mailing List
Subject: [PHP] DOCUMENT_ROOT


Hi,
Has any got any idea why $DOCUMENT_ROOT returns /usr/local/htdocs on my home

machine but it should return /usr/local/htdocs/sitename or where ever I put 
it, but on my production machine it return what it should like 
/usr/local/sitename or whatever?

I'm trying to use it to help include files in different directories (see my 
previous post, site structure). Got any ideas about this?

Cheers,

Jord

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Is there such an array like $array[][]?

2001-04-25 Thread Tim Ward

A multi dimensional array is a matrix. if $array[1][2][3] was an element of
a multi-dimensional array then it would directly accessible as an element of
$array. It isn't. $array (and $array[n]) only contain arrays.

If $array was a 3-d array then ...

$array[1][2][3] = fred;
if (in_array(fred, $array)) echo fred found; // prints fred found

Tim Ward
Senior Systems Engineer

Please refer to the following disclaimer in respect of this message:
http://www.stivesdirect.com/e-mail-disclaimer.html


 -Original Message-
 From: Robert V. Zwink [mailto:[EMAIL PROTECTED]]
 Sent: 24 April 2001 15:20
 To: Tim Ward
 Cc: [EMAIL PROTECTED]
 Subject: RE: [PHP] Is there such an array like $array[][]?
 
 
 I don't understand your different definitions:  muti-dimensional and
 array of arrays
 
 From the manual:
 Multi-Dimensional Arrays
 Multi-dimensional arrays are actually pretty simple. For each 
 dimension of
 the array, you add another [key] value to the end:
 
  Tim Ward wrote:
  snip
  What looks like a 2d array is fact an array of arrays (and so
  on). If it's built right this can be treated as a multi-d 
 array in many
  ways  ... but not all.
 
 I wonder if you can help me understand this concept by giving 
 an example of
 what is possible with 1-dim arrays, but not with 3-dim arrays?
 
 From my point of view the only difference is writing a custom 
 comparison
 function when sorting, though this does seem logical considering the
 additional complexity of multiple dimensions.
 
 Thanks for your help.
 
 Robert Zwink
 
 
 -Original Message-
 From: Tim Ward [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, April 24, 2001 9:54 AM
 To: 'Robert V. Zwink'
 Subject: RE: [PHP] Is there such an array like $array[][]?
 
 
 my point was that what appear to be multi-dimensional arrays 
 in php are not
 that at all. What looks like a 2d array is fact an array of 
 arrays (and so
 on). If it's built right this can be treated as a multi-d 
 array in many ways
 ... but not all.
 
 There seem to be a lot of queries from people confused about 
 how to deal
 with arrays of arrays and this often stems from a 
 misconception that they
 are actually multi-d arrays.
 
   Tim Ward
   Senior Systems Engineer
 
 Please refer to the following disclaimer in respect of this message:
 http://www.stivesdirect.com/e-mail-disclaimer.html
 
 
  -Original Message-
  From: Robert V. Zwink [mailto:[EMAIL PROTECTED]]
  Sent: 24 April 2001 14:33
  To: Tim Ward; [EMAIL PROTECTED]
  Subject: RE: [PHP] Is there such an array like $array[][]?
 
 
  I have used the function usort() to sort multi-dimensional
  arrays before.
  It might be a challenge to write the comparison function, but it is
  possible.  I use 3-dim arrays all of the time.  Makes for a
  bit cleaner code
  IMHO.
 
  I suppose one thing to consider, is that if you have an 
 enormous 3-dim
  array, you are probably doing something wrong.  Generating a
  really big
  array can be resource intense, and can slow you page down
  exponentially.
  Select only parts of the recordset, or smaller chuck of the
  file for better
  execution, but if your application requires a large 3-dim
  array, it works
  just fine for me.
 
  Robert Zwink
 
  -Original Message-
  From: Tim Ward [mailto:[EMAIL PROTECTED]]
  Sent: Wednesday, April 18, 2001 8:06 AM
  To: '[EMAIL PROTECTED]'
  Subject: RE: [PHP] Is there such an array like $array[][]?
 
 
  1. there are no multi-dimensional arrays in php, just 
 single dimension
  arrays each element of which may be an array (or any other
  variable type).
  If you make every element of an array an array of size x, you
  will get what
  can be used as a multi-dimensional array. But if you forget
  what it really
  is, you'll run into problems like expecting to be able to sort
  $array[$x][$y] by $y.
  2. because of this you can have as many levels of an array as
  you want.
 
  try :
  $array[][][][] = fred;
  foreach($array as $level1)
  foreach($level1 as $level2)
  foreach($level2 as $level3)
  foreach($level3 as $value)
  echo($value);
 
  Tim Ward
  Senior Systems Engineer
 
  Please refer to the following disclaimer in respect of this message:
  http://www.stivesdirect.com/e-mail-disclaimer.html
 
 
   -Original Message-
   From: Plutarck [mailto:[EMAIL PROTECTED]]
   Sent: 17 April 2001 17:42
   To: [EMAIL PROTECTED]
   Subject: Re: [PHP] Is there such an array like $array[][]?
  
  
   PHP can be a tad screwy with how it handles multi-dimensional
   arrays, but
   yes PHP handles them. No real speed problems with them either.
  
   But you may just want to use an associative array like:
  
   $loc = array(y = $y, x = $x);
  
   Then just use $loc[y] and $loc[x].
  
   Just another option, but feel free to use multi-dimensional
   arrays. Just be
   aware that PHP supports only two dimensions (so $array[][][]
   will not work),
   and 

[PHP] RE: getting rows from separate tables stacked in a single array ? (newbie, mysql)

2001-04-25 Thread Tim Ward

how about something like:

$count = 0;
$list = array();
$sql[]=select * from storyboards, ... ;
$sql[]=select * from storyboard2, ... ;
$sql[]=select * from storyboard3, ... ;
$sql[]=select * from storyboard4, ... ;
foreach ($sql as $thissql)
{   $result=MySQL_query($thissql,$db);
while($row = MySQL_fetch_array($result))
$list[$row[field_to_sort_by] . *** . ++$count] = $row;

}

ksort($list)

I haven't tried this precisely but the principle should work, and I have
tried this method of sorting arrays by an element of the member arrays.

Tim Ward
Senior Systems Engineer

Please refer to the following disclaimer in respect of this message:
http://www.stivesdirect.com/e-mail-disclaimer.html


 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
 Sent: 24 April 2001 21:42
 To: [EMAIL PROTECTED]
 Subject: getting rows from separate tables stacked in a single array ?
 (newbie, mysql)
 
 
 Hi. 
 
 This will probably sound simple to all of you but I am 
 hitting my head on
 a brick wall so far :-).
 
 I need to generate a list (sorted by descending time) of 
 different objects
 referenced in multiple tables. All those objects share a key 
 related to a
 project.
 
 
 This works splendidly from a single table :
 
 
 
 
 $sql=select * from storyboards, where spot_id = \$spot_id\ order by
 date_posted desc;
 $result=MySQL_query($sql,$db);
 while($row=MySQL_fetch_array($result))
 {
 $qt_title = $row[title];
 $qt_duration = $row[duration];
 $qt_date_posted = $row[date_posted]; //(timestamp)
 $qt_description = $row[description];
 $qt_id = $row[quicktime_id];
   
  
 
 }
 
 Is there a mysql query that would allow me to stack complete rows in
 multiple tables at once (It seems more elegant because I can sort them
 while extracting them) or is there a way in PHP to 
 concatenate results in
 a single array and then sort them by time... ?
 
 I tried to use a join query, wich produced an invalid query error. (I
 think it tries to produce a table with merged data, not just 
 a stack of
 rows).
  
 
 $sql4=select * from quicktimes, other_images, storyboards, where
 quicktimes.spot_id, other_images.spot_id, storyboards.spot_id =
 \$spot_id\ order by date_posted desc;
 
 thank you for your help !
 nicolas
 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] payment verification...

2001-04-25 Thread elias

hello, i'm building an online payment form
the only thing is that i can't rely on the MOD10 CC validation algo...
any one knows any company that provides CC validation (checks if account
exists, and the money is enough to pay the price) ... ?
I only need a company with such validation issue
All hints would be appriciated.

-elias



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] PHP Binaries aside from Windows

2001-04-25 Thread Kyutums

I tried looking for other PHP binaries at
http://www.php.net/downloads.php. All it displayed was one from Windows.
What happened to the versions for Linux? Does it have a version for
Solaris?

- Andres Montiel


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] PHP --with-imap

2001-04-25 Thread Alexander Wagner

Calin Rotaru wrote:
 I want to use imap functions. I receive a message that imap function
 is not defined. I compiled PHP again with --with-imap option , but
 I've got an error message at Apache compilation.
 What is realy happening?

What error-message do you get?

regards
Wagner

-- 
In place of infinity we usually put some really big number, like 15.
 - Anonymous Computer Science professor


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] PHP Binaries aside from Windows

2001-04-25 Thread Alexander Wagner

Kyutums wrote:
 I tried looking for other PHP binaries at
 http://www.php.net/downloads.php. All it displayed was one from
 Windows. What happened to the versions for Linux? Does it have a
 version for Solaris?

Just grab the source and compile. This will work on most Unices, 
including Linux and Solaris.

regards
Wagner

-- 
In place of infinity we usually put some really big number, like 15.
 - Anonymous Computer Science professor


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] DOCUMENT_ROOT

2001-04-25 Thread Jordan Elver

Thanks for the reply,
I'm not using virtual hosts on my local machine but I am on the production 
machine. What should DOCUMENT_ROOT return? I though it returns the directory 
of the current script. So if I had a site in 
/usr/local/apache/htdocs/cha/script.php then I would expect DOCUMENT_ROOT to 
return /usr/local/apache/htdocs/cha/, is that right?

Is it posible to setup a virtual host on localhost?

Cheers,

Jord

On Wednesday 25 April 2001 01:05, you wrote:
 If you are using Apache virtual host, it will set virtual host's document
 root. Is this what you want?

 Regards,
 --
 Yasuo Ohgaki


 Jordan Elver [EMAIL PROTECTED] wrote in message
 01042417535900.00987@localhost">news:01042417535900.00987@localhost...

  Hi,
  Has any got any idea why $DOCUMENT_ROOT returns /usr/local/htdocs on my
  home machine but it should return /usr/local/htdocs/sitename or where
  ever I put it, but on my production machine it return what it should like
  /usr/local/sitename or whatever?
 
  I'm trying to use it to help include files in different directories (see
  my previous post, site structure). Got any ideas about this?
 
  Cheers,
 
  Jord
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  To contact the list administrators, e-mail: [EMAIL PROTECTED]

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] PLEASE HELP!! STRANGE ERROR!! IS THERE ANY PHP DEVELOPER?

2001-04-25 Thread Daniel BI

Did anybody have the same error?

I have this simple script:

===
?
session_start() ;
?

FORM METHOD=POST NAME="form1"
ENCTYPE="multipart/form-data" ACTION="another_script.php"

SELECT NAME="sel" onChange='hidden_filed.value=this.value3"
OPTION VALUE=1 First option
/SELECT

INPUT TYPE=HIDDEN NAME="hidden_field" VALUE=0


on a computer the output is perfect, on the second computer,
there is a strange error, I've ever seen in my life!

the output on the second computer, in the 'select' line, is this:

SELECT NAME="sel" onChange='hidden_filed.value=this.value 3"

as you can see, there is a space between the two "  ", and some times
there it show some garbage between those two "  " .

this only disappears when I remove the " session_start " statement!
ANY IDEA, PLEASE?!.. I am loosing many our and cannot figure out
how to fix that!.. I need sessions, I cannot just give it up!

the first computer is a Pentium II, on linux RH 6.1
with apache-1.4.13+modssl-2.7.1-1.3.14 (+opensll-0.9.6) +php-4.0.1pl1

and it's working just fine!

but... the second computer is Pentium III on linux RH 7.0, same
configuration, but with php-4.0.1pl2, (purchased!!!...) and it does
yeld that error.
I tried with the php-4.0.1pl1 (as with the first computer) but curiously...
it does act the same wrong way..
it seems to be something about sessions, but independently of the
php version...
I compiled the apache server with the 'public' UID, 'guest' GUID, and
they are present in my linux user and group list. the session does
actually write any info correctly. (i tried a session_register('blabla') and
it works)...
the error only disappears when I remove the " session_start " statement!

ANY help or idea would be greatly appreciated!

thanx,
Daniel BI



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Font?

2001-04-25 Thread bpx

Anyone know what font is used in the PHP logo?
:)



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




php-general Digest 25 Apr 2001 10:16:05 -0000 Issue 648

2001-04-25 Thread php-general-digest-help


php-general Digest 25 Apr 2001 10:16:05 - Issue 648

Topics (messages 50201 through 50264):

Re: File Transfer over HTTPS
50201 by: Rasmus Lerdorf

ereg_replace
50202 by: Wade
50203 by: J. Jones

Re: Very important.
50204 by: Plutarck
50244 by: Maxim Maletsky

Re: getting rows from separate tables stacked in a single array ? (newbie, mysql)
50205 by: Steve Lawson
50221 by: Nicolas Mermet
50226 by: Steve Lawson
50248 by: Maxim Maletsky
50257 by: Tim Ward

Re: checking if e-mail address and syntax are valid
50206 by: Plutarck
50233 by: Felix Kronlage

Re: checking url
50207 by: Plutarck
50247 by: Maxim Maletsky

Re: Newline in a guestbook
50208 by: Plutarck

MSIE on Windows can't open PDF via SSL
50209 by: DAve Goodrich

last modified
50210 by: Kasten, Holger
50242 by: Maxim Maletsky
50245 by: CC Zona

Re: Parse Error for a weirdo!
50211 by: Yasuo Ohgaki

Re: DOCUMENT_ROOT
50212 by: Yasuo Ohgaki
50250 by: Maxim Maletsky
50262 by: Jordan Elver

user login names/values
50213 by: Dennis Gearon

New uses please help mysql query problem
50214 by: Greg Kelly
50241 by: Maxim Maletsky

Help php ICQ function
50215 by: Greg Kelly

Can I install Lihnux on My Windows 95 machine ?
50216 by: Manisha
50217 by: Jack Dempsey
50218 by: Wade DeWerff
50219 by: Kath
50220 by: Manisha
50222 by: Manisha
50227 by: Yasuo Ohgaki
50228 by: Manisha
50234 by: Manisha
50235 by: Yasuo Ohgaki
50236 by: Brian Clark
50237 by: B. van Ouwerkerk

random letters and numbers
50223 by: Randy Johnson
50224 by: Steve Lawson
50225 by: J. Jones

Directory Alias Problems with Apache1.3/PHP4
50229 by: Vivre Draco

hello
50230 by: SuiteNet Operations Manager
50240 by: Maxim Maletsky
50243 by: Ralph Guzman

Re: .inc location security
50231 by: Avetis Avagyan

unable to parse php
50232 by: Brendan_Caulfield.fujisawa.com
50239 by: elias

Re: Precedence question- cookie value over form value?
50238 by: Rasmus Lerdorf

the SkyBiz matrix|downline program using PHP  mySQL
50246 by: Thomas Edison Jr.

Re: Lines
50249 by: Maxim Maletsky
50251 by: Jason Murray
50252 by: Maxim Maletsky
50255 by: Jason Murray

Re: Newbie question about Classes
50253 by: Maxim Maletsky

PHP --with-imap
50254 by: Calin Rotaru
50256 by: Alexander Wagner

Re: Is there such an array like $array[][]?
50258 by: Tim Ward

payment verification...
50259 by: elias

PHP Binaries aside from Windows
50260 by: Kyutums
50261 by: Alexander Wagner

PLEASE HELP!! STRANGE ERROR!! IS THERE ANY PHP DEVELOPER?
50263 by: Daniel BI

Font?
50264 by: bpx

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]


--



 If I wanted to use this utility to copy a file from a users (Windows)
 workstation to my (Linux) webserver, how would I do this?  The program on
 the users workstation will create a file called info.txt and place it in
 c:\wow.  I want it to go to my server upload.mydomain.com.  How do I get the
 file c:\wow\info.txt from the user to my web server over https?

You'll need the user to run some program that sends it.  Like the curl
thing if it actually works on Windows.

-Rasmus





I am attempting to do an   ereg_replace(),  but the charachter I want to
replace is a \. Any Ideas how I make the following work?

$F_name = ereg_replace (\, , $acc_fname);
echo $F_name;

Thanks,
Wade






On Tue, Apr 24, 2001 at 06:21:20PM -0400, Wade wrote:
 I am attempting to do an   ereg_replace(),  but the charachter I want to
 replace is a \. Any Ideas how I make the following work?
 
 $F_name = ereg_replace (\, , $acc_fname);
 echo $F_name;
 
 Thanks,
 Wade
 

use \\ 




I responded to the message which included the attachment, and here it is for
those who missed it:

Goody, a virus. LOL

Note: According to the Virus scanner used on php.net (or on the mailing
list. whichever) Emanuel.exe is a virus. Here is the URL for information on
it:

http://vil.mcafee.com/dispVirus.asp?virus_k=98881;

Gotta hate when that happens.



- end old message -


--
Plutarck
Should be working on something...
...but forgot what it was.


Padraic Tynan [EMAIL PROTECTED] wrote in message
008701c0cd05$a0e274a0$[EMAIL PROTECTED]">news:008701c0cd05$a0e274a0$[EMAIL PROTECTED]...
Hi.

Yesterday an email-virus entitled Emanuel was sent out over this list, and I
am not sure by who. It came in the form of 

Re: [PHP] Autoupdate of page

2001-04-25 Thread Richard

You can set a JavaScript to refresh after an amount of time, or call this
function whenever the table is updated.


echo script language='javascript'jscode/script;// as soon
as you are done.


-Richard


Chris Anderson [EMAIL PROTECTED] wrote in message
004101c0cba9$b330b840$211412d1@null">news:004101c0cba9$b330b840$211412d1@null...
 Hitting refresh would do it, you cant do anything client wise because the
 box is being filled by the server code
 - Original Message -
 From: Martin Skjöldebrand [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Tuesday, April 24, 2001 3:53 PM
 Subject: [PHP] Autoupdate of page


  IS there a standard way of auto-updateing the contents of a page after
a
  databas insert or edit? Do a SELECT updates the contents I can update
  tables I've noticed. Contents in select boxes (as in
 
   while ($row = mysql_fetch_row($secquery_res)) {
  print option$row[0]/option;
}
  )
 
  is not automatically updated to match edits or inserts done on the same
  page. You have to initialize the select box again. Or is there another
 way?
 
  M.
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  To contact the list administrators, e-mail: [EMAIL PROTECTED]
 
 


 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] File Transfer over HTTPS

2001-04-25 Thread Meir kriheli

On Wednesday 25 April 2001 01:15, Rasmus Lerdorf wrote:
  If I wanted to use this utility to copy a file from a users (Windows)
  workstation to my (Linux) webserver, how would I do this?  The program on
  the users workstation will create a file called info.txt and place it
  in c:\wow.  I want it to go to my server upload.mydomain.com.  How do I
  get the file c:\wow\info.txt from the user to my web server over https?

 You'll need the user to run some program that sends it.  Like the curl
 thing if it actually works on Windows.

 -Rasmus

If you're running ssh on the server you can try the scp (secure copy ?) 
protocol. For windows there's is a freeware called winscp (loop it up in 
google). But this has nothing to do with php.

-- 
Meir Kriheli

  There's someone in my head, but it's not me - Pink Floyd

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] selected option bla bla

2001-04-25 Thread Hasbullah Pit (sebol)

I have this one :-

select name=jenis_biasiswa
  option selectedPenuh/option
  optionSeparuh/option
  optionSendiri/option
/select
and a field of table which contained with 
'Penuh' OR 'Separuh' OR 'Sendiri'

I want to make it Ither one is 'selected' during a particular time.
i'm thinking of having something like this:-


select name=jenis_biasiswa
option ? function_that_determine_it_selected_or_not(Penuh)?
Penuh/option
option ? function_that_determine_it_selected_or_not(Separuh)?
Separuh/option
option ? function_that_determine_it_selected_or_not(Sendiri)? 
Sendiri/option
/select

Is that any prebuild/example funtion for  that
function_that_determine_it_selected_or_not(Sendiri) then print
Selected ?

thanks in advance


-- 
Hasbullah Bin Pit (sebol) http://ikhlas.com

 Melihat keadaan sistem kehakiman sekarang ini,
  Saya tak hairan kalau saya disabitkan dengan kesalahan 
 'Menceraikan isteri di luar mahkamah' ketika saya masih bujang
   - Hasbullah Pit -

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Very important.

2001-04-25 Thread B. van Ouwerkerk


I think, removing the guy of the list would help us to avoid meeting the
virus on this list again.

Come on.. this is a very_old_common_virus. Any half decent AV product 
should keep your system clean from this. Rather warn the person and help 
him to get rid of the virus..

If everyone who send a virus to a list should have been kicked off the 
listadmins would have a daytime job on this..

Bye,


B.


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Very important.

2001-04-25 Thread B. van Ouwerkerk


I may have lost several weeks of work to this virus, and I advise you all 
to watch out, as it was likely sent inadvertantly.

Does the word backup ring any bells
Ever hear about antivirus software

Bye,



B.


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] user login names/values

2001-04-25 Thread Thimo von Rauchhaupt

Just to mention security, look at this page:

http://www.livin4.com/jhacker/jh1.htm

A simple login isn?t that easy,





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] DOCUMENT_ROOT

2001-04-25 Thread Maxim Maletsky

NO, not the directory of the current script.

the directory of your virtual host.

DOCUMENT_ROOT is your WEB ROOT

common. I gave an example... look into your apache (vHOST) DocumentRoot is
what your $DOCUMENT_ROOT is

Sincerely, 

 Maxim Maletsky
 Founder, Chief Developer
 PHPBeginner.com (Where PHP Begins)
 [EMAIL PROTECTED]
 www.phpbeginner.com


 
-Original Message-
From: Jordan Elver [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, April 25, 2001 7:03 PM
To: Yasuo Ohgaki
Cc: PHP General Mailing List
Subject: Re: [PHP] DOCUMENT_ROOT


Thanks for the reply,
I'm not using virtual hosts on my local machine but I am on the production 
machine. What should DOCUMENT_ROOT return? I though it returns the directory

of the current script. So if I had a site in 
/usr/local/apache/htdocs/cha/script.php then I would expect DOCUMENT_ROOT to

return /usr/local/apache/htdocs/cha/, is that right?

Is it posible to setup a virtual host on localhost?

Cheers,

Jord

On Wednesday 25 April 2001 01:05, you wrote:
 If you are using Apache virtual host, it will set virtual host's document
 root. Is this what you want?

 Regards,
 --
 Yasuo Ohgaki


 Jordan Elver [EMAIL PROTECTED] wrote in message
 01042417535900.00987@localhost">news:01042417535900.00987@localhost...

  Hi,
  Has any got any idea why $DOCUMENT_ROOT returns /usr/local/htdocs on my
  home machine but it should return /usr/local/htdocs/sitename or where
  ever I put it, but on my production machine it return what it should
like
  /usr/local/sitename or whatever?
 
  I'm trying to use it to help include files in different directories (see
  my previous post, site structure). Got any ideas about this?
 
  Cheers,
 
  Jord
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  To contact the list administrators, e-mail: [EMAIL PROTECTED]

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] PLEASE HELP!! STRANGE ERROR!! IS THERE ANY PHP DEVELOPER?

2001-04-25 Thread Maxim Maletsky

correct: 

we are PHP developers, not JavaScript.

However, I am sure that the amount and configurations of your computers
don't matter here.
try to look for a simple problem. Try to rewrite it all again, etc... not a
big deal - don't hit your head to the wall.


Sincerely, 

 Maxim Maletsky
 Founder, Chief Developer
 PHPBeginner.com (Where PHP Begins)
 [EMAIL PROTECTED]
 www.phpbeginner.com



-Original Message-
From: Daniel BI [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, April 25, 2001 7:12 PM
To: PHP digest
Subject: [PHP] PLEASE HELP!! STRANGE ERROR!! IS THERE ANY PHP DEVELOPER?


Did anybody have the same error?

I have this simple script:

===
?
session_start() ;
?

FORM METHOD=POST NAME="form1"
ENCTYPE="multipart/form-data" ACTION="another_script.php"

SELECT NAME="sel" onChange='hidden_filed.value=this.value3"
OPTION VALUE=1 First option
/SELECT

INPUT TYPE=HIDDEN NAME="hidden_field" VALUE=0


on a computer the output is perfect, on the second computer,
there is a strange error, I've ever seen in my life!

the output on the second computer, in the 'select' line, is this:

SELECT NAME="sel" onChange='hidden_filed.value=this.value 3"

as you can see, there is a space between the two "  ", and some times
there it show some garbage between those two "  " .

this only disappears when I remove the " session_start " statement!
ANY IDEA, PLEASE?!.. I am loosing many our and cannot figure out
how to fix that!.. I need sessions, I cannot just give it up!

the first computer is a Pentium II, on linux RH 6.1
with apache-1.4.13+modssl-2.7.1-1.3.14 (+opensll-0.9.6) +php-4.0.1pl1

and it's working just fine!

but... the second computer is Pentium III on linux RH 7.0, same
configuration, but with php-4.0.1pl2, (purchased!!!...) and it does
yeld that error.
I tried with the php-4.0.1pl1 (as with the first computer) but curiously...
it does act the same wrong way..
it seems to be something about sessions, but independently of the
php version...
I compiled the apache server with the 'public' UID, 'guest' GUID, and
they are present in my linux user and group list. the session does
actually write any info correctly. (i tried a session_register('blabla') and
it works)...
the error only disappears when I remove the " session_start " statement!

ANY help or idea would be greatly appreciated!

thanx,
Daniel BI



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] How to turn off warnings ???

2001-04-25 Thread ahmad varoqua

::-Original Message-
::From: Christian Reiniger [mailto:[EMAIL PROTECTED]]
::Sent: Tuesday, April 24, 2001 12:57 AM
::To: Php-General
::Subject: Re: [PHP] How to turn off warnings ???
::
::
::On Monday 23 April 2001 23:50, Roee Rubin wrote:

:: Whenever I try to execute some code I receive 'warnings', that
:: basically clutter up the screen. Since I am assuming that these are not
:: fatal - is there  any way to turn them off?
::
::Warnings are not fatal as such, but they often give hints that you have a
::bug somewhere. Correct your code.
::
::--
::Christian Reiniger
::LGDC Webmaster (http://sunsite.dk/lgdc/)
::
::...1000100011010101101010110100111010113...
::

Hello, I too am a novice and have the same problems with warning: undefined
variable or undefined index when I have display errors 'on'.  The scripts
work fine and I have reg_globals 'off' (I've been following that thread
closely as well!) .  How critical are these warnings? Is it overenthusiam on
php's error tracking?  You say to 'correct the code' and I believe you, but
what should I do?  I want my code to be as clean as possible.   I've been
enlightened to A LOT of things in the short time I've been on this list and
any input is greatly appreciated!!

tia,

ahmad



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] payment verification...

2001-04-25 Thread B. van Ouwerkerk


hello, i'm building an online payment form
the only thing is that i can't rely on the MOD10 CC validation algo...
any one knows any company that provides CC validation (checks if account
exists, and the money is enough to pay the price) ... ?
I only need a company with such validation issue
All hints would be appriciated.

Dunno.. I saw a nice article about this on www.devshed.com

Bye,



B.


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Fatal Errors and Error Handling

2001-04-25 Thread Svein Roar Nilsen

Christian Reiniger [EMAIL PROTECTED] wrote in message
01042417490700.07614@chrisbig">news:01042417490700.07614@chrisbig...
Well, needed to use might be incorrect, because return value evaluation
can be used instead (unless some functions never signal errors via their
return value). Aside from that you're right.

OK, I will try to clarify my original problem...

At http://www.php.net/manual/en/function.xslt-process.php there is an
example program. When I use it as is, it works all right and produces a nice
table. Here is a short section of the code:
-
[...]
if (xslt_process($xslData, $xmlData, $result)) {
[...]
} else {
echo There was an error that occurred in the XSL transformation...\n;
echo \tError number:  . xslt_errno() . \n;
echo \tError string:  . xslt_error() . \n;
exit;
}
?
-

This is quite similar to what I am trying. If you now corrupts the xmlData
variable, e.g. by changing article to rticl without changing the closing
tag, you will get an error message saying

br
bFatal error/b:  XML parser error 7: mismatched tag in
b/var/www/test.php/b on line b40/bbr

As you can see here, xslt_process() dies with a fatal error and the program
is terminated, and we never get to testing the return value. The next
problem, is that since the error is fatal, it is also not possible to use
set_error_handler() to catch the error. And placing the @-sing before the
variable only supresses the default error-message, which is not an
acceptable solution to us. The last thing I tried, was the
error_prepend_string and error_append_string in php.ini, but it is very
difficult making a valid error-message this way. Because of the unclosed
br tags we don't get a valid xml-message. And because of the b and br
tags, it would not comply with the error-message format we need to use
anyway. And using the @-sing causes error_append/prepend_string to be
ignored alltogether.

And in my opinion, there are too many things that can cause PHP to die with
a fatal error. So we simply *must* be able to handle it and give a valid and
reasonable error-message back.

--
Svein Roar Nilsen
Norwegian Hydrographic Services




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] checking url

2001-04-25 Thread Subodh Gupta

Hi Dmitry,

In case you want a regular expression to check if it is a valid url you can try this...
 
$url = yoururl;
if(empty($url)   !eregi(^http://[A-Za-z0-9\%\?\_\:\~\/\.-]+$,$url))
$errmsg=$url doesn't look like a valid URL\n;

I hope this helps.

Subodh Gupta
I have learned, Joy is not in things, it is in us.
You will ultimately be known by what you give and not what you get.

- Original Message - 
From: Dmitry [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, April 25, 2001 2:14 AM
Subject: [PHP] checking url


Hello all.
Can you tell me, how can I check url address?
Also I want to know error, which return.
 Dmitry



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] selected option bla bla

2001-04-25 Thread Wade

I am sure my solution is not the most elegant, but this is what I did:

?
switch($acc_state){
 case 0:
 $st0 = selected;
 break;
 case AL:
 $stAL = selected;
 break;
.

print SELECT size=1 tabindex=11 name=accstate
option value=\0\ $st0 /option
option value=\AL\ $stAL ALABAMA/option

?

Hasbullah Pit (sebol) [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 I have this one :-

 select name=jenis_biasiswa
   option selectedPenuh/option
   optionSeparuh/option
   optionSendiri/option
 /select
 and a field of table which contained with
 'Penuh' OR 'Separuh' OR 'Sendiri'

 I want to make it Ither one is 'selected' during a particular time.
 i'm thinking of having something like this:-


 select name=jenis_biasiswa
 option ? function_that_determine_it_selected_or_not(Penuh)?
 Penuh/option
 option ? function_that_determine_it_selected_or_not(Separuh)?
 Separuh/option
 option ? function_that_determine_it_selected_or_not(Sendiri)? 
 Sendiri/option
 /select

 Is that any prebuild/example funtion for  that
 function_that_determine_it_selected_or_not(Sendiri) then print
 Selected ?

 thanks in advance


 --
 Hasbullah Bin Pit (sebol) http://ikhlas.com

  Melihat keadaan sistem kehakiman sekarang ini,
   Saya tak hairan kalau saya disabitkan dengan kesalahan
  'Menceraikan isteri di luar mahkamah' ketika saya masih bujang
- Hasbullah Pit -

 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Fatal Errors and Error Handling

2001-04-25 Thread Christian Reiniger

On Wednesday 25 April 2001 13:32, Svein Roar Nilsen wrote:

[...]

 This is quite similar to what I am trying. If you now corrupts the
 xmlData variable, e.g. by changing article to rticl without
 changing the closing tag, you will get an error message saying

 br
 bFatal error/b:  XML parser error 7: mismatched tag in
 b/var/www/test.php/b on line b40/bbr

 As you can see here, xslt_process() dies with a fatal error and the
 program is terminated, and we never get to testing the return value.

[]

 And in my opinion, there are too many things that can cause PHP to die
 with a fatal error. So we simply *must* be able to handle it and give a
 valid and reasonable error-message back.

Ok, agreed. I'd consider this a bug that should be submitted to 
bugs.php.net
It's certainly not acceptable that code using xslt_process() has *no way* 
of recovering from a (quite common) error. Corrupted data is something to 
be expected, something that even has to be considered *normal* when 
developing such a thing.

-- 
Christian Reiniger
LGDC Webmaster (http://sunsite.dk/lgdc/)

Software is like sex: the best is for free -- Linus Torvalds

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] PLEASE HELP!! STRANGE ERROR!! IS THERE ANY PHP DEVELOPER?

2001-04-25 Thread Yasuo Ohgaki

Do you enable trans-sid? What happen if you disable it?
(There are several trans-sid related bugs are fixed since 4.0.1, I think.)

Regards,
--
Yasuo Ohgaki


""Daniel BI"" [EMAIL PROTECTED] wrote in message
002201c0cd70$2f8d6240$02001aac@adsl">news:002201c0cd70$2f8d6240$02001aac@adsl...
 Did anybody have the same error?

 I have this simple script:

 ===
 ?
 session_start() ;
 ?

 FORM METHOD=POST NAME="form1"
 ENCTYPE="multipart/form-data" ACTION="another_script.php"

 SELECT NAME="sel" onChange='hidden_filed.value=this.value3"
 OPTION VALUE=1 First option
 /SELECT

 INPUT TYPE=HIDDEN NAME="hidden_field" VALUE=0
 

 on a computer the output is perfect, on the second computer,
 there is a strange error, I've ever seen in my life!

 the output on the second computer, in the 'select' line, is this:

 SELECT NAME="sel" onChange='hidden_filed.value=this.value 3"

 as you can see, there is a space between the two "  ", and some times
 there it show some garbage between those two "  " .

 this only disappears when I remove the " session_start " statement!
 ANY IDEA, PLEASE?!.. I am loosing many our and cannot figure out
 how to fix that!.. I need sessions, I cannot just give it up!

 the first computer is a Pentium II, on linux RH 6.1
 with apache-1.4.13+modssl-2.7.1-1.3.14 (+opensll-0.9.6) +php-4.0.1pl1

 and it's working just fine!

 but... the second computer is Pentium III on linux RH 7.0, same
 configuration, but with php-4.0.1pl2, (purchased!!!...) and it does
 yeld that error.
 I tried with the php-4.0.1pl1 (as with the first computer) but curiously...
 it does act the same wrong way..
 it seems to be something about sessions, but independently of the
 php version...
 I compiled the apache server with the 'public' UID, 'guest' GUID, and
 they are present in my linux user and group list. the session does
 actually write any info correctly. (i tried a session_register('blabla') and
 it works)...
 the error only disappears when I remove the " session_start " statement!

 ANY help or idea would be greatly appreciated!

 thanx,
 Daniel BI



 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: PLEASE HELP!! STRANGE ERROR!! IS THERE ANY PHP DEVELOPER?

2001-04-25 Thread Daniel BI

Hi !
Don't bother with it, anybody!

I recompiled all under php-4.0.4pl1 version and it
works just fine! It seems it was the php version's fault..

thank u all!

Daniel BI

  Did anybody have the same error?
 
  I have this simple script:
 
 ===
 ?
 session_start() ;
 ?

 FORM METHOD=POST NAME="form1"
 ENCTYPE="multipart/form-data" ACTION="another_script.php"

 SELECT NAME="sel" onChange='hidden_filed.value=this.value3"
 OPTION VALUE=1 First option
 /SELECT

 INPUT TYPE=HIDDEN NAME="hidden_field" VALUE=0
 /FORM
 
 
  on a computer the output is perfect, on the second computer,
  there is a strange error, I've ever seen in my life!
 
  the output on the second computer, in the 'select' line, is this:
 
  SELECT NAME="sel" onChange='hidden_filed.value=this.value 3"
 
  as you can see, there is a space between the two "  ", and some times
  there it shows some garbage between those two "  " .
 
  this only disappears when I remove the " session_start " statement!
  ANY IDEA, PLEASE?!.. I am loosing many hours and cannot figure out
  how to fix that!.. I need sessions, I cannot just give it up!
 
  the first computer is a Pentium II, on linux RH 6.1
  with apache-1.3.14+modssl-2.7.1-1.3.14 (+opensll-0.9.6) +php-4.0.1pl1
 
  and it's working just fine!

  but... the second computer is Pentium III on linux RH 7.0, same
  configuration, but with php-4.0.1pl2, (purchased!!!...) and it does
  yeld that error.
  I tried with the php-4.0.1pl1 (as with the first computer) but
 curiously...
  it does act the same wrong way..
  it seems to be something about sessions, but independently of the
  php version...
  I compiled the apache server with the 'public' UID, 'guest' GUID, and
  they are present in my linux user and group list. the session does
  actually write any info correctly. (i tried a session_register('blabla')
   and
  it works)...
  the error only disappears when I remove the " session_start " statement!




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Generating XML

2001-04-25 Thread Young Chi-Yeung Fan

Hi,

I'm trying to write a script that generates XML dynamically and is
viewable in a browser (IE). Even though I send a header saying
Content-type: text/xml\n, PHP still puts in a Content-type of
text/html before that. How can I write the script so that this doesn't
happen?

Here's the script:

?php

header(Content-type: text/xml\n);

echo EOS
?xml version=1.0 encoding=UTF-8?
test
 blahdf/blah
/test
EOS;

?

Thanks so much for your help! (If you could cc a reply to my e-mail
address, that'd be really appreciated.)

Young


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Problem in sending mail with mail() function

2001-04-25 Thread Vishak K Tomy

Hello,
I tried to send mail through the mail function but it is not 
working. I am using php version 3.0.12 under linux, following is the
code I used to send mail.
So what is the problem with it, any body please solve this.

Regards
Vishak

html

?php
if ($submit) {
$recipient =
[EMAIL PROTECTED],[EMAIL PROTECTED],[EMAIL PROTECTED];
$sub = this is a test;
$message = this is a test message;
$headers .= From: $from \n;
$headers .= reply-To:$from\nX-Mailer: PHP/ .phpversion(). \n;
$headers .= Content-Type: text/html; charset=iso-8859-1\n;
$headers .= X-Priority: 1;
mail($recipient,$sub,$message,$headers);
}
?
form action=?php echo $PHP_SELF ?
input type=submit value=submit
/html

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] roblem in sending mail with mail() function

2001-04-25 Thread Vishak K Tomy

Hello,
I tried to send mail through the mail function but it is not 
working and it is not showing any error. I am using php version 3.0.12
under linux, following is the code I used to send mail.
So what is the problem with it, any body please solve this.

Regards
Vishak

html

?php
if ($submit) {
$recipient=[EMAIL PROTECTED],[EMAIL PROTECTED],[EMAIL PROTECTED];
$sub = this is a test;
$message = this is a test message;
$headers = Content-Type: text/html; charset=iso-8859-1\n;
$headers .= X-Priority: 1;
mail($recipient,$sub,$message,$headers);
}
?
form action=?php echo $PHP_SELF ?
input type=submit value=submit
/form
/html

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] PLEASE HELP!! STRANGE ERROR!! IS THERE ANY PHP DEVELOPER?

2001-04-25 Thread Pavel Jartsev

Daniel BI wrote:
 
 Did anybody have the same error?
 
 I have this simple script:
 
 ===
 ?
 session_start() ;
 ?
 
 FORM METHOD=POST NAME=form1
 ENCTYPE=multipart/form-data ACTION=another_script.php
 
 SELECT NAME=sel onChange='hidden_filed.value=this.value3

Maybe it's just typo, but line above should be:
SELECT NAME=sel onChange=hidden_field.value=this.value3


-- 
Pavel a.k.a. Papi

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] PHP and system()

2001-04-25 Thread Tym Rehm

I'm a newbie and I trying to write a program that will take an email address
from a form and send an email to that address. I'm trying to use mutt to
send the email, due to needing to attach a file to the email. I'm using
system() to call mutt, but it doesn't appear to work. I'm passing php
variable to the system() call. I think the problem is the system() wants
shell variables and not the php variables. Can someone give me a hand.
Thanks.


***
THIS MESSAGE IS INTENDED ONLY FOR THE USE OF THE INDIVIDUAL
OR ENTITY TO WHICH IT IS ADDRESSED AND MAY CONTAIN
INFORMATION THAT IS PRIVILEGED, CONFIDENTIAL, AND EXEMPT
FROM DISCLOSURE UNDER APPLICABLE LAW.
If the reader of this message is not the intended
recipient, or the employee or agent responsible for
delivering the message to the intended recipient, you are
hereby notified that any dissemination, distribution,
forwarding, or copying of this communication is strictly
prohibited.  If you have received this communication in
error, please notify the sender immediately by e-mail or
telephone, and delete the original message immediately.
Thank you.
***


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] HTTP message

2001-04-25 Thread Young Chi-Yeung Fan

Is it possible from PHP to look at the HTTP message sent to a script? If
so, how can I do it?

e.g.:

POST /MessageReceiver.jsp HTTP/1.0
Host: www.SomeHost.net
Content-Type: application/x-www-form-urlencoded
Content-Length: 105

XML=%3C?xml%20version%3D%221.0%22%20encoding%3D%22utf-8%22?%3E%0A%3Cdoc%3Ehello%20world%3E%3C/doc%3E%0A


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] payment verification...

2001-04-25 Thread elias

thank you.

B. van Ouwerkerk [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...

 hello, i'm building an online payment form
 the only thing is that i can't rely on the MOD10 CC validation algo...
 any one knows any company that provides CC validation (checks if account
 exists, and the money is enough to pay the price) ... ?
 I only need a company with such validation issue
 All hints would be appriciated.

 Dunno.. I saw a nice article about this on www.devshed.com

 Bye,



 B.


 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] DOCUMENT_ROOT

2001-04-25 Thread Jaxon

Not to beat a dead horse, but assuming a site structure like this:

/htdocs
/htdocs/modules
/htdocs/includes
/htdocs/templates

where all my PHP logic scripts are in htdocs, and all the bits and pieces
are in the other dirs, is there any way to set include_path to:

$include_path = $DOCUMENT_ROOT/config; $DOCUMENT_ROOT/includes;
$DOCUMENT_ROOT/templates;

so I can just include(filename.inc.php); where ever I am in my structure,
without worrying about putting in a relative or absolute path, AND do this
without altering the php.ini?? (cuz I may not have access to it in a shared
hosting env)

cheers,
jaxon



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] mcrypt help please

2001-04-25 Thread ryan.barnett1

Does anyone know how to install the mcrypt libraries for PHP in windows?


I'm running: Apache 1.3.12
PHP 4.0.2
Windows 98


I've downloaded libmcrypt-2.4.5b-win32.zip
(I think that this contains everything I need.)

I just need to know what to do next.

I couldn't find a friendly PHP module install guide anywhere and the
README file included with the mcrypt zip doesn't help a great deal.

Can anyone provide a step by step guide to installing mcrypt in windows?

Thanks in advance for all your help,

Ryan.
www.more4money.com




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Escaping Characters

2001-04-25 Thread Yasuo Ohgaki

""Wade"" [EMAIL PROTECTED] wrote in message
9c6dcb$h8e$[EMAIL PROTECTED]">news:9c6dcb$h8e$[EMAIL PROTECTED]...
 Aside from " (quotes), which HTML characters should be preceded with a \
 (backslash) to avoid parsing errors?

No.


 I have the following, which I have in an .inc file outside my web root. I
 have tried sticking the \ in front of the # (pound) and the = (equal) -- not
 out of any reason, but more out of frustration. I have been sticking
 dropdown menu in inc files with no troubles, but this is the first table
 I've tried to stick in there.  I'm trying not to ask questions here until
 after trying to find an answer in PHP.net, but I've had no luck on this one.
 ?
 table width=\"90%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\"
 align=\"center\"
   tr bgcolor=\"#ebebd6\"

 
 ?

Why you put HTML like this inside PHP code tag? If you need HTML.

Try this

?php
if ($var === TURE) {
?
h1 $var is true /h1
?php
}
else {
?
h1 $var is false /h1
?php
}
?

Regards,
--
Yasuo Ohgaki

 Much Thanks,
 Wade



 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]


RE: [PHP] DOCUMENT_ROOT

2001-04-25 Thread PHPBeginner.com

what about having an .htaccess file in each web root?
You can't have vartiables in your server's config files.


Sincerely,

 Maxim Maletsky
 Founder, Chief Developer

 PHPBeginner.com (Where PHP Begins)
 [EMAIL PROTECTED]
 www.phpbeginner.com




-Original Message-
From: Jaxon [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, April 25, 2001 10:33 PM
To: Maxim Maletsky
Cc: PHP General Mailing List
Subject: RE: [PHP] DOCUMENT_ROOT


Not to beat a dead horse, but assuming a site structure like this:

/htdocs
/htdocs/modules
/htdocs/includes
/htdocs/templates

where all my PHP logic scripts are in htdocs, and all the bits and pieces
are in the other dirs, is there any way to set include_path to:

$include_path = $DOCUMENT_ROOT/config; $DOCUMENT_ROOT/includes;
$DOCUMENT_ROOT/templates;

so I can just include(filename.inc.php); where ever I am in my structure,
without worrying about putting in a relative or absolute path, AND do this
without altering the php.ini?? (cuz I may not have access to it in a shared
hosting env)

cheers,
jaxon



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Wierd error messages

2001-04-25 Thread Euan Greig

Today my php 4/Apache/NT 4/Oracle 8i setup has started misbehaving. First
sign was a huge slowing down in the delivery of pages. Then Apache crashed.
I couldn't find anything interesting in the apache error log, but in the php
error log there are hundreds of messages like the ones below. Can anyone
explain, suggest how to deal with them? I should say that I have rebooted
both of the database and web servers.

TIA

Euan

[25-Apr-2001 14:34:48] PHP Warning:  Missing ] in üu variable in Unknown on
line 0
[25-Apr-2001 14:34:50] PHP Warning:  Missing ] in }´üt variable in Unknown
on line 0
[25-Apr-2001 14:34:50] PHP Warning:  Missing ] in üu variable in Unknown on
line 0
[25-Apr-2001 14:34:50] PHP Warning:  Missing ] in }´üt variable in Unknown
on line 0
[25-Apr-2001 14:34:50] PHP Warning:  Missing ] in üu variable in Unknown on
line 0
[25-Apr-2001 14:50:47] PHP Warning:  Missing ] in  variable in Unknown on
line 0
[25-Apr-2001 14:50:50] PHP Warning:  Missing ] in  variable in Unknown on
line 0
[25-Apr-2001 14:50:50] PHP Warning:  Missing ] in  variable in Unknown on
line 0




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] OOP and Future of PHP

2001-04-25 Thread Reuben D Budiardja


The only thing that I feel lack of in PHP is the real Object Oriented 
stuff, such as information hiding in the object in classes i.e. private and 
public variables, methods/functions.

This in a sene make it really difficult for developer to build an API for 
other developers that is secure. I myself have this problem. Is there any 
reasons why PHP was designed like this from the beginning? Is this issue 
going to be addresses somehow in the future? Anyone has any idea?

If anyone has any idea, or tricks to hide information in a variables or 
method in a class, or in other words, make a variable or method a private, 
I would really like to know. Thanks for any comments.


Reuben D. Budiardja
Web Database Application Programmer / Analyst
Devcorps, ITS
Goshen College, IN 46526


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-CVS] cvs: php4 /ext/ircg ircg.c

2001-04-25 Thread Sascha Schumann

sas Wed Apr 25 06:14:40 2001 EDT

  Modified files:  
/php4/ext/ircg  ircg.c 
  Log:
  Past profiling has shown that we waste too much time in the message
  scanner.  In the context of a channel message which is supposedly
  addressed to a large number of users, we therefore cache the result
  of the operation and recycle it.
  
  
Index: php4/ext/ircg/ircg.c
diff -u php4/ext/ircg/ircg.c:1.61 php4/ext/ircg/ircg.c:1.62
--- php4/ext/ircg/ircg.c:1.61   Tue Apr 24 02:40:05 2001
+++ php4/ext/ircg/ircg.cWed Apr 25 06:14:40 2001
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: ircg.c,v 1.61 2001/04/24 09:40:05 sas Exp $ */
+/* $Id: ircg.c,v 1.62 2001/04/25 13:14:40 sas Exp $ */
 
 #include php.h
 #include php_ini.h
@@ -268,9 +268,74 @@
}
 }
 
-
+/* This is an expensive operation in terms of CPU time.  We
+   try to spend as little time in it by caching messages which
+   are sent to channels (and hence used multiple times). */
 void ircg_mirc_color(const char *, smart_str *, size_t);
 
+#define NR_CACHE_ENTRIES 10
+
+struct {
+   smart_str src;
+   smart_str result;
+   int score;
+} static cache_entries[NR_CACHE_ENTRIES];
+
+void ircg_mirc_color_cache(smart_str *src, smart_str *result,
+   smart_str *channel)
+{
+   /* We only cache messages in the context of a channel */
+   if (channel) {
+   int i;
+   int least_used_slot = 0;
+   int least_used_score = 50;
+
+   /* Score system.  Initially, each slot gets 100 points.
+* If a slot result is used, the slot earns three points.
+* If a slot is not used but looked at, it gets punished.
+* Slots with less than 50 points are considered for recycling,
+* when the cache is full.  
+* This should ensure that new entries are not thrown out too
+* early and that old entries are expired appropiately.
+*/
+   
+   for (i = 0; i  NR_CACHE_ENTRIES  cache_entries[i].score; i++) {
+   /* case-sensitive comparison */
+   if (cache_entries[i].src.len == src-len 
+   memcmp(cache_entries[i].src.c, src-c, 
+src-len) == 0) {
+   cache_entries[i].score += 3;
+   smart_str_append_ex(result, cache_entries[i].result, 
+1);
+   return;
+   }
+   
+   /* old entries will expire */
+   if (cache_entries[i].score  1)
+   cache_entries[i].score--;
+   
+   /* looks like this is the least used entry up to now */
+   if (cache_entries[i].score  least_used_score) {
+   least_used_score = cache_entries[i].score;
+   least_used_slot = i;
+   }
+   }
+
+   /* cache is full */
+   if (i == NR_CACHE_ENTRIES)
+   i = least_used_slot;
+
+   cache_entries[i].score = 100;
+   cache_entries[i].src.len = 0;
+   cache_entries[i].result.len = 0;
+   ircg_mirc_color(src-c, cache_entries[i].result, src-len);
+   
+   smart_str_append_ex(cache_entries[i].src, src, 1);
+   smart_str_append_ex(result, cache_entries[i].result, 1);
+   } else {
+   /* No channel message, no caching */
+   ircg_mirc_color(src-c, result, src-len);
+   }
+}
+
 static void format_msg(const char *fmt, smart_str *channel, smart_str *to, smart_str 
*from, smart_str *msg, smart_str *result)
 {
const char *p;
@@ -336,7 +401,7 @@
case 'j':
 append_js_encoded_msg:
if (!encoded) {
-   ircg_mirc_color(msg-c, encoded_msg, msg-len);
+   ircg_mirc_color_cache(msg, encoded_msg, channel);
encoded = 1;
}
if (!js_encoded) {
@@ -348,7 +413,7 @@
case 'm':
if (mod_encode) goto append_js_encoded_msg;
if (!encoded) {
-   ircg_mirc_color(msg-c, encoded_msg, msg-len);
+   ircg_mirc_color_cache(msg, encoded_msg, channel);
encoded = 1;
}
smart_str_append_ex(result, encoded_msg, 1);



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Escaping Characters

2001-04-25 Thread PHPBeginner.com

   double quotes
 '  single quotes (yes, they are used quite often)
 \  backslash (JavaScripts etc.)


there are your enemies, nothing else.
forget about + =  $ ...


Sincerely,

 Maxim Maletsky
 Founder, Chief Developer

 PHPBeginner.com (Where PHP Begins)
 [EMAIL PROTECTED]
 www.phpbeginner.com




-Original Message-
From: Wade [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, April 25, 2001 8:47 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Escaping Characters


Aside from  (quotes), which HTML characters should be preceded with a \
(backslash) to avoid parsing errors?

I have the following, which I have in an .inc file outside my web root. I
have tried sticking the \ in front of the # (pound) and the = (equal) -- not
out of any reason, but more out of frustration. I have been sticking
dropdown menu in inc files with no troubles, but this is the first table
I've tried to stick in there.  I'm trying not to ask questions here until
after trying to find an answer in PHP.net, but I've had no luck on this one.
?
table width=\90%\ border=\0\ cellspacing=\0\ cellpadding=\0\
align=\center\
  tr bgcolor=\#ebebd6\


?

Much Thanks,
Wade



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] php FTP

2001-04-25 Thread PHPBeginner.com

I really don't think you can compile PHP on (not yours) server.


Sincerely,

 Maxim Maletsky
 Founder, Chief Developer

 PHPBeginner.com (Where PHP Begins)
 [EMAIL PROTECTED]
 www.phpbeginner.com





-Original Message-
From: ryan.barnett1 [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, April 25, 2001 11:03 PM
To: [EMAIL PROTECTED]
Subject: [PHP] php FTP


Hi there,

I would like to use the PHP FTP functions.
Unfortunately, my webhost hasn't compiled PHP with the FTP extensions.

So, I thought that I might upload the extension myself into my webspace then
call it using the command dl() from within a PHP webpage. That way, I could
(hopefully) get round my webhost - but not in a nasty way ;) !

First of all - will this work?

Secondly, where can I download the PHP extension? My webhost is using Cobalt
RaQ3 (x86 architecture running Linux).
Do I need to download an entire PHP package then extract the extension, or
can I just get the extension by itself.

Thanks in advance for all your help.

Ryan
www.more4money.com




--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] php FTP

2001-04-25 Thread ryan.barnett1

Hi there,

I would like to use the PHP FTP functions.
Unfortunately, my webhost hasn't compiled PHP with the FTP extensions.

So, I thought that I might upload the extension myself into my webspace then
call it using the command dl() from within a PHP webpage. That way, I could
(hopefully) get round my webhost - but not in a nasty way ;) !

First of all - will this work?

Secondly, where can I download the PHP extension? My webhost is using Cobalt
RaQ3 (x86 architecture running Linux).
Do I need to download an entire PHP package then extract the extension, or
can I just get the extension by itself.

Thanks in advance for all your help.

Ryan
www.more4money.com




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Some questions on PHPUnit

2001-04-25 Thread Steven Haryanto

Does anyone here use PHPUnit?

1. If a test script needs some external input to do testing 
(notably, database connect info), is it a good idea to present 
an HTML form to ask input from user? Or should it also be able 
to prompt the user for these in case the test script is run by the PHP binary.

2. I also use Python pyunit. Python has this idiom:

if __name__=='__main__':
# run the test

This is to detect whether the script is executed as the main 
module (and not being imported by some other module).

Is there a similar way to be able to do this in PHP? I need to 
know whether the PHP file is called directly by the browser/PHP 
binary and not include()'d/require()'d by other file. In the 
case of require_once() and include_once() I guess I can use 
get_required_files()/get_included_files().

Thanks,
Steve


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] safe uploading with PHP

2001-04-25 Thread Steven Haryanto

I am sorry if this is one of the FAQ.

Last time I checked (well, a few months ago), PHP has the 
vulnerability that the user who submitted the form can 
manipulate the global namespace to let PHP pick up arbitrary 
file in the system. Can we now do safe file uploading without 
turning off register_globals?

Thanks,
Steve


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] SVG PHP

2001-04-25 Thread Nick Winfield

Hi,

This might be a bit of a long shot, but I'm willing to give it a go. :)

Does anyone know of a server-side SVG parser that can be called via some
kind of PHP extension? I want to be able to parse an SVG XML file and
write it out to disk, for usage with customisable menus. I have been given
a few options, by a friend, but they involve running Batik (SVG Java
parser/generator/rasteriser) under an application server - a bit beyond
me, at present. Would would be great is if there were some kind of binary
out there on the web that could do the processing for me, as opposed to
relying on Java (slight overhead as the VM has to initialise). Another
similar option would be to write a Java app that acts as an SVG daemon,
meaning that it would listen on a port, take SVG data in and spew out a
rasterised JPEG/PNG etc - all that would be required would be a PHP
wrapper that could send data to the daemon and receive the image in
return.

The question is: are there any solutions to my problem out there already,
or should I think about adopting the Orion/Java method? On the other hand,
should I look into developing a PHP wrapper to do this?

I'd rather not run Orion/J2EE, as I find it bulky and a bit cumbersome in
places - however, if I have to, I guess I have to. :)

TIA,

Nick Winfield
-[ [EMAIL PROTECTED] ]-


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] php FTP

2001-04-25 Thread Matt Schroebel

I've never done it but here it is:

http://conf.php.net/pres/index.php?p=slides%2Fintroid=ac2



 -Original Message-
 From: ryan.barnett1 [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, April 25, 2001 10:03 AM
 To: [EMAIL PROTECTED]
 Subject: [PHP] php FTP
 
 
 Hi there,
 
 I would like to use the PHP FTP functions.
 Unfortunately, my webhost hasn't compiled PHP with the FTP extensions.
 
 So, I thought that I might upload the extension myself into 
 my webspace then
 call it using the command dl() from within a PHP webpage. 
 That way, I could
 (hopefully) get round my webhost - but not in a nasty way ;) !
 
 First of all - will this work?
 
 Secondly, where can I download the PHP extension? My webhost 
 is using Cobalt
 RaQ3 (x86 architecture running Linux).
 Do I need to download an entire PHP package then extract the 
 extension, or
 can I just get the extension by itself.
 
 Thanks in advance for all your help.
 
 Ryan
 www.more4money.com
 
 
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: 
 [EMAIL PROTECTED]
 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Wierd error messages

2001-04-25 Thread Brian S. Dunworth


At 03:03 PM 4/25/01 +0100, Euan Greig wrote:
[25-Apr-2001 14:34:48] PHP Warning:  Missing ] in üu variable in Unknown 
on line 0
[25-Apr-2001 14:34:50] PHP Warning:  Missing ] in }´üt variable in Unknown 
on line 0

  [...] etc

   I hate to say it, but this looks suspiciously like a memory leak in 
WindowsNT...  especially if the problem cleared up after rebooting.

  - Brian


  -
Brian S. Dunworth
Sr. Software Development Engineer
Oracle Database Administrator
The Printing House, Ltd.

(850) 875-1500  x225
[EMAIL PROTECTED]
  -


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-CVS] cvs: php4 /ext/ircg ircg.c ircg_scanner.c ircg_scanner.re

2001-04-25 Thread Sascha Schumann

sas Wed Apr 25 06:50:35 2001 EDT

  Modified files:  
/php4/ext/ircg  ircg.c ircg_scanner.c ircg_scanner.re 
  Log:
  Use the system malloc in the scanner 
  
  
Index: php4/ext/ircg/ircg.c
diff -u php4/ext/ircg/ircg.c:1.62 php4/ext/ircg/ircg.c:1.63
--- php4/ext/ircg/ircg.c:1.62   Wed Apr 25 06:14:40 2001
+++ php4/ext/ircg/ircg.cWed Apr 25 06:50:35 2001
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: ircg.c,v 1.62 2001/04/25 13:14:40 sas Exp $ */
+/* $Id: ircg.c,v 1.63 2001/04/25 13:50:35 sas Exp $ */
 
 #include php.h
 #include php_ini.h
@@ -439,7 +439,7 @@
}
 
if (encoded)
-   smart_str_free(encoded_msg);
+   smart_str_free_ex(encoded_msg, 1);
if (js_encoded)
smart_str_free_ex(js_encoded_msg, 1);
 
Index: php4/ext/ircg/ircg_scanner.c
diff -u php4/ext/ircg/ircg_scanner.c:1.9 php4/ext/ircg/ircg_scanner.c:1.10
--- php4/ext/ircg/ircg_scanner.c:1.9Tue Apr 24 02:40:05 2001
+++ php4/ext/ircg/ircg_scanner.cWed Apr 25 06:50:35 2001
@@ -1,4 +1,4 @@
-/* Generated by re2c 0.5 on Fri Apr 20 10:19:53 2001 */
+/* Generated by re2c 0.5 on Wed Apr 25 15:49:43 2001 */
 #line 1 /home/sas/src/php4/ext/ircg/ircg_scanner.re
 /*
+--+
@@ -18,7 +18,7 @@
+--+
  */
 
-/* $Id: ircg_scanner.c,v 1.9 2001/04/24 09:40:05 sas Exp $ */
+/* $Id: ircg_scanner.c,v 1.10 2001/04/25 13:50:35 sas Exp $ */
 
 #include ext/standard/php_smart_str.h
 #include stdio.h
@@ -79,19 +79,19 @@
 static void handle_scheme(STD_PARA)
 {
ctx-scheme.len = 0;
-   smart_str_appendl(ctx-scheme, start, YYCURSOR - start);
+   smart_str_appendl_ex(ctx-scheme, start, YYCURSOR - start, 1);
smart_str_0(ctx-scheme);
 }
 
 static void handle_url(STD_PARA)
 {
-   smart_str_appends(ctx-result, a target=blank href=\);
-   smart_str_append(ctx-result, ctx-scheme);
-   smart_str_appendl(ctx-result, start, YYCURSOR - start);
-   smart_str_appends(ctx-result, \);
-   smart_str_append(ctx-result, ctx-scheme);
-   smart_str_appendl(ctx-result, start, YYCURSOR - start);
-   smart_str_appends(ctx-result, /a);
+   smart_str_appends_ex(ctx-result, a target=blank href=\, 1);
+   smart_str_append_ex(ctx-result, ctx-scheme, 1);
+   smart_str_appendl_ex(ctx-result, start, YYCURSOR - start, 1);
+   smart_str_appends_ex(ctx-result, \, 1);
+   smart_str_append_ex(ctx-result, ctx-scheme, 1);
+   smart_str_appendl_ex(ctx-result, start, YYCURSOR - start, 1);
+   smart_str_appends_ex(ctx-result, /a, 1);
 }
 
 static void handle_color_digit(STD_PARA, int mode)
@@ -120,7 +120,7 @@
 static void finish_color_stuff(STD_PARA)
 {
if (ctx-font_tag_open) {
-   smart_str_appends(ctx-result, /font);
+   smart_str_appends_ex(ctx-result, /font, 1);
ctx-font_tag_open = 0;
}
 }
@@ -129,10 +129,10 @@
 {
switch (ctx-bold_tag_open) {
case 0:
-   if (!final) smart_str_appends(ctx-result, b);
+   if (!final) smart_str_appends_ex(ctx-result, b, 1);
break;
case 1:
-   smart_str_appends(ctx-result, /b);
+   smart_str_appends_ex(ctx-result, /b, 1);
break;
}
 
@@ -143,10 +143,10 @@
 {
switch (ctx-underline_tag_open) {
case 0:
-   if (!final) smart_str_appends(ctx-result, u);
+   if (!final) smart_str_appends_ex(ctx-result, u, 1);
break;
case 1:
-   smart_str_appends(ctx-result, /u);
+   smart_str_appends_ex(ctx-result, /u, 1);
break;
}
 
@@ -158,21 +158,21 @@
finish_color_stuff(STD_ARGS);
 
if (IS_VALID_CODE(ctx-fg_code)) {
-   smart_str_appends(ctx-result, font color=\);
-   smart_str_appends(ctx-result, color_list[ctx-fg_code]);
-   smart_str_appends(ctx-result, \);
+   smart_str_appends_ex(ctx-result, font color=\, 1);
+   smart_str_appends_ex(ctx-result, color_list[ctx-fg_code], 1);
+   smart_str_appends_ex(ctx-result, \, 1);
ctx-font_tag_open = 1;
}
 }
 
 static void passthru(STD_PARA)
 {
-   smart_str_appendl(ctx-result, start, YYCURSOR - start);
+   smart_str_appendl_ex(ctx-result, start, YYCURSOR - start, 1);
 }
 
 static void add_entity(STD_PARA, const char *entity)
 {
-   smart_str_appends(ctx-result, entity);
+   smart_str_appends_ex(ctx-result, entity, 1);
 }
 
 void ircg_mirc_color(const char *msg, smart_str *result, size_t msg_len) {
@@ -495,7 +495,7 @@
}
}
 stop:
-   smart_str_free(ctx-scheme);
+   smart_str_free_ex(ctx-scheme, 1);
 
finish_color_stuff(STD_ARGS);
  

Re: [PHP] SVG PHP

2001-04-25 Thread Phil Driscoll

I don't know of anything specifically - all the existing java stuff we've
played with is very big and very slow. One possible solution might be to
write a wrapper for the Adobe SVG browser plugin - it would be a reasonable
amount of work though, and of course the plugin would have to be available
for your server platform - which it probably isn't if your server is
powerful enough for the job :)

Cheers
--
Phil Driscoll
Dial Solutions
+44 (0)113 294 5112
http://www.dialsolutions.com
http://www.dtonline.org



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] SVG PHP

2001-04-25 Thread Matthew Luchak



What about writting a gimp plug-in...? http://www.gimp.org
 
Matthew Luchak 
Webmaster
Kaydara Inc. 
[EMAIL PROTECTED]


-Original Message-
From: Nick Winfield [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, April 25, 2001 9:50 AM
To: PHP General Mailing List
Subject: [PHP] SVG  PHP


Hi,

This might be a bit of a long shot, but I'm willing to give it a go. :)

Does anyone know of a server-side SVG parser that can be called via some
kind of PHP extension? 

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] checking if e-mail address and syntax are valid

2001-04-25 Thread Nikhil Goyal

I wrote a similar script of my own... Works fine for me

function email_valid($email) {

$pattern=^[0-9a-zA-Z_-]+(\.[0-9a-zA-Z_-]+)*@[0-9a-zA-Z_-]+(\.[0-9a-zA-Z_-]+
)+$;
 return ereg($pattern, $email);
 }

(returns false if email is not valid, true if it is)

N

Martin Skjöldebrand [EMAIL PROTECTED] wrote in message
9c4npf$ojq$[EMAIL PROTECTED]">news:9c4npf$ojq$[EMAIL PROTECTED]...
 Carlos Fernando Scheidecker Antunes wrote:

  Hello all!
 
  I would like to know if anyone has or know any PHP code to verify if a
  form entered e-mail address is valid?
 
  I would like that things like 4$%^%$@@.com.br could not be sent. I only
  has to verify the syntax of it, the existance I believe should be harder
  to verify but if it is possible I would be glad if anyone could point me
  the way.

 This is taken from PHP Developers Cookbook. Don't ask me exactly what it
 does, because I don't know. I think I can grasp the basics of it though.
 It isn't fool proof tho.


 if (!eregi (^([a-z0-9_]|\\-|\\.)+@(([a-z0-9_]|\\-)+\\.)+[a-z]{2,4}$,
 $users)) die (Invalid email);

 M.

 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] rounding up

2001-04-25 Thread Joseph Bannon

Is there a PHP command to round up to the nearest integer?

J

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] rounding up

2001-04-25 Thread Matt Williams

Hi

 
 Is there a PHP command to round up to the nearest integer?

www.php.net/ceil
www.php.net/round

HTH

M@

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] php FTP

2001-04-25 Thread Miles Thompson


Interesting - looks just great with Netscape Navigator 4.7; Netscape 6.1 
and Opera 5.?

My IE 5.x does not show the links, the title or the background, nor does it 
have blind hot area where the links are at the top of the page. That 
could be my IE and I curse Microosft daily. I can't uninstall it, and 
running repair doesn't fix it. Javascript Windows which used to work just 
fine now generate errors.

Long live cross-browsership! If someone would check this with IE 5.1  5.5 
I'd like to know if this is just my browser. If it is I'll have to 
reinstall NT to fix it. Damn, damn, and double-damn!

Cheers - Miles


At 10:26 AM 4/25/01 -0400, Matt Schroebel wrote:
I've never done it but here it is:

http://conf.php.net/pres/index.php?p=slides%2Fintroid=ac2



  -Original Message-
  From: ryan.barnett1 [mailto:[EMAIL PROTECTED]]
  Sent: Wednesday, April 25, 2001 10:03 AM
  To: [EMAIL PROTECTED]
  Subject: [PHP] php FTP
 
 
  Hi there,
 
  I would like to use the PHP FTP functions.
  Unfortunately, my webhost hasn't compiled PHP with the FTP extensions.
 
  So, I thought that I might upload the extension myself into
  my webspace then
  call it using the command dl() from within a PHP webpage.
  That way, I could
  (hopefully) get round my webhost - but not in a nasty way ;) !
 
  First of all - will this work?
 
  Secondly, where can I download the PHP extension? My webhost
  is using Cobalt
  RaQ3 (x86 architecture running Linux).
  Do I need to download an entire PHP package then extract the
  extension, or
  can I just get the extension by itself.
 
  Thanks in advance for all your help.
 
  Ryan
  www.more4money.com
 
 
 
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  To contact the list administrators, e-mail:
  [EMAIL PROTECTED]
 

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-CVS] cvs: php4 /ext/ircg ircg.c

2001-04-25 Thread Sascha Schumann

sas Wed Apr 25 07:07:48 2001 EDT

  Modified files:  
/php4/ext/ircg  ircg.c 
  Log:
  display cache info
  
  
Index: php4/ext/ircg/ircg.c
diff -u php4/ext/ircg/ircg.c:1.63 php4/ext/ircg/ircg.c:1.64
--- php4/ext/ircg/ircg.c:1.63   Wed Apr 25 06:50:35 2001
+++ php4/ext/ircg/ircg.cWed Apr 25 07:07:47 2001
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: ircg.c,v 1.63 2001/04/25 13:50:35 sas Exp $ */
+/* $Id: ircg.c,v 1.64 2001/04/25 14:07:47 sas Exp $ */
 
 #include php.h
 #include php_ini.h
@@ -275,6 +275,8 @@
 
 #define NR_CACHE_ENTRIES 10
 
+static unsigned long cache_hits, cache_misses;
+
 struct {
smart_str src;
smart_str result;
@@ -304,6 +306,7 @@
if (cache_entries[i].src.len == src-len 
memcmp(cache_entries[i].src.c, src-c, 
src-len) == 0) {
cache_entries[i].score += 3;
+   cache_hits++;
smart_str_append_ex(result, cache_entries[i].result, 
1);
return;
}
@@ -323,6 +326,7 @@
if (i == NR_CACHE_ENTRIES)
i = least_used_slot;
 
+   cache_misses++;
cache_entries[i].score = 100;
cache_entries[i].src.len = 0;
cache_entries[i].result.len = 0;
@@ -1453,8 +1457,13 @@
 
 PHP_MINFO_FUNCTION(ircg)
 {
+   char buf[100];
php_info_print_table_start();
php_info_print_table_header(2, ircg support, enabled);
+   sprintf(buf, %ul, cache_hits);
+   php_info_print_table_row(2, scanner result cache hits, buf);
+   sprintf(buf, %ul, cache_misses);
+   php_info_print_table_row(2, scanner result cache misses, buf);
php_info_print_table_end();
 }
 



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] rounding up

2001-04-25 Thread John Huggins


  Is there a PHP command to round up to the nearest integer?

 www.php.net/ceil
 www.php.net/round


These are the correct functions, but take great care in reading the user
contributed notes in the round function concerning x.5 rounding randomness.
Sometimes this can get you.

If you want to be sure 4.5 always rounds to 5, add a fudge factor smaller
than your precision, but larger than the precision of the computer.

$value = 4.5;
$fudge = 0.001;

round($value) sometimes returns 5
round($value) sometimes returns 4

$fudgedvalue = $value + $fudge;

round($fudgedvalue) = 5

This comes into play often when you do things like split a long list of
items into two columns on your web page and you use PHP (or any language) to
figure out where to end the first column and start the second.

It should be noted that this is not a PHP issue.  It affects any language
which relies on the hardware to compute.

Fun stuff eh?

John


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-CVS] cvs: php4 /ext/ircg ircg.c

2001-04-25 Thread Sascha Schumann

sas Wed Apr 25 07:15:09 2001 EDT

  Modified files:  
/php4/ext/ircg  ircg.c 
  Log:
  Fix format strings typo.  
  
  
Index: php4/ext/ircg/ircg.c
diff -u php4/ext/ircg/ircg.c:1.64 php4/ext/ircg/ircg.c:1.65
--- php4/ext/ircg/ircg.c:1.64   Wed Apr 25 07:07:47 2001
+++ php4/ext/ircg/ircg.cWed Apr 25 07:15:09 2001
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: ircg.c,v 1.64 2001/04/25 14:07:47 sas Exp $ */
+/* $Id: ircg.c,v 1.65 2001/04/25 14:15:09 sas Exp $ */
 
 #include php.h
 #include php_ini.h
@@ -1460,9 +1460,9 @@
char buf[100];
php_info_print_table_start();
php_info_print_table_header(2, ircg support, enabled);
-   sprintf(buf, %ul, cache_hits);
+   sprintf(buf, %lu, cache_hits);
php_info_print_table_row(2, scanner result cache hits, buf);
-   sprintf(buf, %ul, cache_misses);
+   sprintf(buf, %lu, cache_misses);
php_info_print_table_row(2, scanner result cache misses, buf);
php_info_print_table_end();
 }



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Escaping Characters

2001-04-25 Thread Yasuo Ohgaki
My previous post is a bit misleading.

""Wade"" [EMAIL PROTECTED] wrote in message
9c6dcb$h8e$[EMAIL PROTECTED]">news:9c6dcb$h8e$[EMAIL PROTECTED]...
 Aside from " (quotes), which HTML characters should be preceded with a \
 (backslash) to avoid parsing errors?

No and Yes.

NO: You don't have to escape PHP special characters in HTML.
YES: You need to escape PHP special characters in string. (Generally speaking)


 I have the following, which I have in an .inc file outside my web root. I
 have tried sticking the \ in front of the # (pound) and the = (equal) -- not
 out of any reason, but more out of frustration. I have been sticking
 dropdown menu in inc files with no troubles, but this is the first table
 I've tried to stick in there.  I'm trying not to ask questions here until
 after trying to find an answer in PHP.net, but I've had no luck on this one.
 ?
 table width=\"90%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\"
 align=\"center\"
   tr bgcolor=\"#ebebd6\"

 
 ?

You cannot write HTML like this in PHP code.
You can write HTML in conditional statement as my previous post.
You also could write it as follows

$html =EOH
table width="90%" border="0" cellspacing="0" cellpadding="0"
align="center"
   tr bgcolor="#ebebd6"

 
EOH;
print $html;


Heredoc does not require to escape ", ',newline,etc even if it is similar to
string with " or '.

Regards,
--
Yasuo Ohgaki



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]


RE: [PHP] php FTP

2001-04-25 Thread Matt Schroebel


Show fine in my I.E. 5.50.4134.0600

Incidentally, you need page 42 of the conference material for the ftp dl().  
instructions. 

 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, April 25, 2001 11:03 AM
 To: [EMAIL PROTECTED]
 Subject: RE: [PHP] php FTP
 
 
 
 Interesting - looks just great with Netscape Navigator 4.7; 
 Netscape 6.1 
 and Opera 5.?
 
 My IE 5.x does not show the links, the title or the 
 background, nor does it 
 have blind hot area where the links are at the top of the 
 page. That 
 could be my IE and I curse Microosft daily. I can't uninstall it, and 
 running repair doesn't fix it. Javascript Windows which used 
 to work just 
 fine now generate errors.
 
 Long live cross-browsership! If someone would check this with 
 IE 5.1  5.5 
 I'd like to know if this is just my browser. If it is I'll have to 
 reinstall NT to fix it. Damn, damn, and double-damn!
 
 Cheers - Miles
 
 
 At 10:26 AM 4/25/01 -0400, Matt Schroebel wrote:
 I've never done it but here it is:
 
 http://conf.php.net/pres/index.php?p=slides%2Fintroid=ac2
 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Problem in sending mail with mail() function

2001-04-25 Thread Sigitas Paulavicius


Vishak K Tomy [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Hello,
 I tried to send mail through the mail function but it is not
 working. I am using php version 3.0.12 under linux, following is the
 code I used to send mail.
 So what is the problem with it, any body please solve this.

 Regards
 Vishak

Hi

mail() uses the SMTP service running on localhost...errr... on the same
computer as the web service is running. So if there is no smtp service on
localhost, mail() won't work.
You must get SMTP libraray and use it to connect to some other server and
send the message. It's really simple and easy to come by.





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Newbie struggling to set $PGDATA

2001-04-25 Thread Geoff Caplan

Hi

Please help out a Linx/Postgres newbie.

I simply want to set the $PGDATA environmental variable, but can't
figure out how. The docs assume you already know...

I have tried setting it in my bash /etc/profile configuration file,
and it shows up ok if I echo $PGDATA in the shell. But none of the
postgres utilities such as initdb seem to be able to find it.

What don't I understand? I have already checked the docs/GreatBridge
manual/faqs/archive, so I would very much appreciate some help.

Geoff Caplan

PS sorry for the garbled duplicate posting - new mail client did
something strange



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] forms and RETURN key

2001-04-25 Thread Bill Rausch

I've observed a difference between how IE and NS interact with even simple
forms. With IE, hitting the RETURN or ENTER key usually but not always
triggers the submit button, but almost never with NS.  Is this behavior
controllable by my scripts?

For example:
headtitletest form/title/head
body
?php
if( $ok )
{
echo name1 is $name1\n;
echo name2 is $name2\n;
}
else
{
echo form action='$PHP_SELF' method=POST\n;
echo Name1:input type='TEXT' name='name1'\n;
#echo Name2:input type='TEXT' name='name2'\n;
echo input type='SUBMIT' name='ok' value='ok'\n;
echo /form\n;
}
?
/body

If I run this form using IE, hitting the Return/Enter key submits the form
but the 'ok' variable is not set; it just redraws the form.  If however, I
uncomment the third echo line (the one for Name2), then hitting the
Return/Enter key does have the desired effect in IE.  In NS, the first
version acts just like IE; the form redraws and that is all. But using the
second variant with both text fields, hitting the Return key in NS does
nothing at all.

Is this just the way it is?  :-(
Or is this behavior controllable somehow?  :-)
---
 Bill Rausch, Software Development, Unix, Mac, Windows
 Numerical Applications, Inc.  509-943-0861   [EMAIL PROTECTED]

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] safe uploading with PHP

2001-04-25 Thread Rasmus Lerdorf

 Last time I checked (well, a few months ago), PHP has the
 vulnerability that the user who submitted the form can
 manipulate the global namespace to let PHP pick up arbitrary
 file in the system. Can we now do safe file uploading without
 turning off register_globals?

Yes, this was fixed a while ago.  In PHP 4.0.3 I believe.

-Rasmus


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] getting rows from separate tables stacked in a single array ? (newbie, mysql)

2001-04-25 Thread Nicolas Mermet

I did put a spot ID because I never thought of building a temp table on
the fly and dropping it at the end of the script. :-) Now that is an
elegant concept !

I was going for a permanent table, wich would have been heavier to feed
when other tables got updated (but wich would have been automated). The
spot_id was the key to select the items. Making it a temp table is even
simpler. 
Altho on second though it means I have to grant create/write/drop
privileges to the clients, wich might open security issues... mmmhh.


I must say, this newsgroup rocks. I recieved highly valuable input on this
thread and by email. 
Thank you all !

Nicolas







In article 002b01c0cd39$3f86c240$[EMAIL PROTECTED],
[EMAIL PROTECTED] (Steve Lawson) wrote:

 Doh, I shoulda thought of that, a temp table is the best way to do it.
 Altho, I don't see why you have a spot_id as a key for that table.  Your are
 probably never going to access that table via that arbitrary number.  If
 anything, you should make item_id the key.  The id on your other tables
 should also be keys.
 
 SL.


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Lines

2001-04-25 Thread Rafael Faria

I should tell you that the text file is an htm that i have to print 
withou the header HTMLTITLE and footer /BODY/HTML

:PP

Rafael

I know, it was already answered before me (you),

I just though that an SQL database is a good advice for these who are trying
to do this kind of jobs.
It is obvious that the reason to use this function is to manage a stored
data in files.
then why not a database, if possible?


Sincerely,

  Maxim Maletsky
  Founder, Chief Developer
  PHPBeginner.com (Where PHP Begins)
  [EMAIL PROTECTED]
  www.phpbeginner.com



-Original Message-
From: Jason Murray [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, April 25, 2001 4:52 PM
To: Maxim Maletsky; 'Rafael Faria'; [EMAIL PROTECTED]
Subject: RE: [PHP] Lines


   it's my first post on this list, and my doubt is...
  
   how can i take a file.txt and
  
   1 - know how many lines i have in this text
   2 - print line 5 until 10

  Is there any chance for you to use a database?
  these thing would become MUCH, MUCH easier.

Actually, this is really easy without using a database.

1. ?
   $filename = /path/to/file;
   $filedata = file($filename);
   $linesinfile = count($filedata);
?

2. ?
   $startline = 5;
   $stopline = 10;

   for ($i = $startline; $i  $stopline; $i++ )
   {
 echo $filedata[$i-1];
   }
?

(Use $i-1 because the first line is actually 0).

Jason

---

[ r a f a e l   f a r i a] _
[EMAIL PROTECTED]
WebMaster Universo Online - http://www.uol.com.br
Phone # +55 11 3038-8665


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Upload a File

2001-04-25 Thread Rafael Faria


Hey Guys,

i'm here thinking what i did wrong.can u guys help me?

i did 2 ways to upload a file and none of them work fine! :/

first way
$folder = /tmp;
if(!copy($MyFile,$folder.$MyFile)){
  echo can't copy;
} else {
  echo work it!;
}

second way

$folder = /tmp;

$dest = $folder./.$MyFile_name;
if(!move_uploaded_file($MyFile, $dest)) {
   echo can't copy!;
   exit;
 }



so. can someone help me please? i just have to make it to finish my job :/

thanks




---

[ r a f a e l   f a r i a] _
[EMAIL PROTECTED]
WebMaster Universo Online - http://www.uol.com.br
Phone # +55 11 3038-8665


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Upload a File

2001-04-25 Thread Rafael Faria

i tried:
if (!move_uploaded_file($MyFile,/home/vacamarela/public_html/rafael)) {
 echo can't copy;
 exit;
}

and retur can't copy

my form is
input type=file name=MyFile size=40



:/

Rafael




Acesso fácil, rápido e ilimitado? Suporte 24hs? R$19,90?
Só no AcessoBOL. http://www.bol.com.br/acessobol/


move_uploaded_file($newfile,/complete/path/to/move/file/to);

My form variable for the file was called newfile.  That should help.  It
is very nice, just use it instead of copy and uyou should be good.  Good
luck.

+---+
|   |
|  If Yoda so strong in force is,   |
| why words in proper order he cannot put?  |
|   |
+---+
|   |
+---+
| Daniel J. Cleveland   |
|   e-mail: [EMAIL PROTECTED]|
+---+

---

[ r a f a e l   f a r i a] _
[EMAIL PROTECTED]
WebMaster Universo Online - http://www.uol.com.br
Phone # +55 11 3038-8665


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Upload a File

2001-04-25 Thread Rasmus Lerdorf

On Wed, 25 Apr 2001, Rafael Faria wrote:

 i tried:
 if (!move_uploaded_file($MyFile,/home/vacamarela/public_html/rafael)) {
  echo can't copy;
  exit;
 }

 and retur can't copy

Does your web server used id have write permission in that directory and
execute permission all the way down the line to get to that directory?

-Rasmus


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] simple querying mysql in a WML card problem :(

2001-04-25 Thread Sandeep Hundal

hi all!

i'm trying to get simple 2 line results from mysql in a wml card, but
i can't seem to manage it. here's my code:


?
header(Content-type: text/vnd.wap.wml); 
header(Cache-Control: no-cache, must-revalidate); 
header(Pragma: no-cache); 
echo (?xml version='1.0'?); 
? 

!DOCTYPE wml PUBLIC -//WAPFORUM//DTD WML 1.1//EN 
http://www.wapforum.org/DTD/wml_1.1.xml;;


?
include (db.php);
$query1 = SELECT club FROM table WHERE day='monday' ; 

echo 
wml   
card id=card1 title=clubbing by day 
p;

$result1 = mysql_query($query1);
if ($result1) {
echo  $day br;
while ($r1 = mysql_fetch_array($result1)) {
extract($r1);
echo $clubdetails br;
}
}

mysql_free_result($result1);

echo   /p
/card   
/wml;

?

simple? yet all it seems to give m is :

; = mysql_query( if ( { echo  
; while ( = mysql_fetch_array( { extract( echo  
; } }mysql_free_result( 
-

in my emulator (WinWAP).

Any help greatly appreciated!

/sandeep


Do You Yahoo!?
Get your free @yahoo.co.uk address at http://mail.yahoo.co.uk
or your free @yahoo.ie address at http://mail.yahoo.ie

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] maximum length of email address

2001-04-25 Thread Dennis Gearon

I've gone through the archives and through a bunch of RFC's, but have
had no luck in finding  maximum length for email addresses. Anybody
know if there is one and what it is?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Can I install Lihnux on My Windows 95 machine ?

2001-04-25 Thread sono


If you have separate physically separate drives and F is one of them.
Installing it should not be too big a problem.

Nothing is your Windows Bios should need to be changed
This has to do with your master boot record.

Grab a Linux dist.  Most of them come with good installers now adays and
make it quite easy to install.

Upon installtion Linux will rewrite your MBR and use lilo or some
other boot manager instead of windows default boot manager.  After
installtion you will get the option of booting into windows or Linux.

For the most part..ealier posts were correct..this is not the list for
this persay:/

Also if you are a newbie to linuxget a different machine or be
prepared to lose data or windows on your present machine.

Cheers

Sono

On Wed, 25 Apr 2001, B. van Ouwerkerk wrote:


 Current my Hard disk space for drive F:\  is 2.92 GB which is just fine
 for the time being. Do you mean to say that I can increase from 2.9 GB to
 let us say 4GB by taking it from some other drive may be D:\ ?
 
 Can you explain some more ?

 Partitionmagic is the SW you need to do this. It might be a better solution
 to buy a cheap Celeron based PC and build your Linux server. Buy 2 nics,
 one goes into the server, the other into your current system.

 I don't understand why you're having so many partitions. Unless you've got
 a good reason for this I would reinstall the lot with less partitions and
 install Linux as part of the process.

 Anyway.. if you don't have any experience with Linux you're going to see
 some problems..

 Bye,


 B.




-- 
Sono




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-CVS] cvs: php4 /ext/oci8 oci8.c

2001-04-25 Thread Andy Sautins

asautinsWed Apr 25 10:48:31 2001 EDT

  Modified files:  
/php4/ext/oci8  oci8.c 
  Log:
  
  
  Collections cleanup
 - Removed date specific methods.  Dates work consistently with
   the rest of the oci8 code.
 - Removed unused variables from collection code.
 - RETURN_FALSE on all errors.
 - fix error prints to php_error.
  
  

Index: php4/ext/oci8/oci8.c
diff -u php4/ext/oci8/oci8.c:1.119 php4/ext/oci8/oci8.c:1.120
--- php4/ext/oci8/oci8.c:1.119  Mon Apr 23 04:54:02 2001
+++ php4/ext/oci8/oci8.cWed Apr 25 10:48:30 2001
@@ -20,7 +20,7 @@
+--+
  */
 
-/* $Id: oci8.c,v 1.119 2001/04/23 11:54:02 thies Exp $ */
+/* $Id: oci8.c,v 1.120 2001/04/25 17:48:30 asautins Exp $ */
 
 /* TODO list:
  *
@@ -47,6 +47,8 @@
  * - make $lob-savefile use O_BINARY
  * - line 2728: ub4 length = -1; needs fixing
  * - delay OCIInitialize() as far as we can.
+ * - add PHP Array - OCICollection conversion
+ * - add Collection iterator object for INDEX BY tables
  */
 
 /* {{{ includes  stuff */
@@ -223,9 +225,6 @@
 PHP_FUNCTION(ocicollsize);
 PHP_FUNCTION(ocicollmax);
 PHP_FUNCTION(ocicolltrim);
-PHP_FUNCTION(ocicolldategetelem);
-PHP_FUNCTION(ocicolldateassignelem);
-PHP_FUNCTION(ocicolldateappendelem);
 #endif
 
 #define OCI_GET_STMT(statement,value) \
@@ -309,9 +308,6 @@
 PHP_FE(ocifreecoll,  NULL)
 PHP_FE(ocicollappend,NULL)
 PHP_FE(ocicollgetelem,   NULL)
-PHP_FE(ocicolldategetelem,NULL)
-PHP_FE(ocicolldateassignelem,NULL)
-PHP_FE(ocicolldateappendelem,NULL)
 PHP_FE(ocicollassignelem,NULL)
 PHP_FE(ocicollassign,NULL)
 PHP_FE(ocicollsize,  NULL)
@@ -342,9 +338,6 @@
 static zend_function_entry php_oci_coll_class_functions[] = {
 PHP_FALIAS(append,ocicollappend,  NULL)
 PHP_FALIAS(getelem,   ocicollgetelem, NULL)
-PHP_FALIAS(dategetelem,   ocicolldategetelem, NULL)
-PHP_FALIAS(dateassignelem,   ocicolldateassignelem, NULL)
-PHP_FALIAS(dateappendelem,   ocicolldateappendelem, NULL)
 PHP_FALIAS(assignelem,ocicollassignelem, NULL)
 PHP_FALIAS(assign,ocicollassign,  NULL)
 PHP_FALIAS(size,  ocicollsize,NULL)
@@ -584,7 +577,7 @@
 
php_info_print_table_start();
php_info_print_table_row(2, OCI8 Support, enabled);
-   php_info_print_table_row(2, Revision, $Revision: 1.119 $);
+   php_info_print_table_row(2, Revision, $Revision: 1.120 $);
 #ifndef PHP_WIN32
php_info_print_table_row(2, Oracle Version, PHP_OCI8_VERSION );
php_info_print_table_row(2, Compile-time ORACLE_HOME, PHP_OCI8_DIR );
@@ -4294,7 +4287,7 @@
 
 
 /* {{{ proto string ocifreecoll(object lob)
-   Deletes collection */
+   Deletes collection object*/
 
 PHP_FUNCTION(ocifreecoll)
 {
@@ -4307,7 +4300,8 @@
 inx = _oci_get_ocicoll(id,coll);
 if (inx) {
/*
-* Do we need to free the object? 
+* Do we need to free the object?
+* 
 */
connection = coll-conn;
 oci_debug(OCIfreecoll: coll=%d,inx);
@@ -4316,7 +4310,7 @@
 }
 }
 
-  RETURN_FALSE;
+   RETURN_FALSE;
 }
 /* }}} */
 
@@ -4332,10 +4326,9 @@
OCIString *ocistr = (OCIString *)0;
OCIInd new_ind = OCI_IND_NOTNULL;
OCIDate dt;
-char *buffer;
 int inx;
double ndx;
-ub4 loblen;
+
OCILS_FETCH();
 
 if ((id = getThis()) != 0) {
@@ -4352,11 +4345,12 @@
   case OCI_TYPECODE_DATE:
   convert_to_string_ex(arg);
   connection-error = OCIDateFromText(connection-pError,
-  
 (*arg)-value.str.val,
-  
 (*arg)-value.str.len,
-  
 0,0,0,0,dt);
+  
+(*arg)-value.str.val,
+  
+(*arg)-value.str.len,
+  
+0,0,0,0,dt);
   if (connection-error) {
   oci_error(connection-pError, OCIDateFromText, 
connection-error);
+  RETURN_FALSE;
   }
   connection-error = OCICollAppend(OCI(pEnv), 
   
  connection-pError, 
@@ -4365,17 +4359,20 @@
 

[PHP] LDAP listing from Exchange

2001-04-25 Thread Mike Tuller

I am having troubles displaying all the information I need from an Exchange
server. I can display name, department, title, but can't get the phone
number to show up. Can someone show me a script that will pull the object
identifiers from the server so that I can make sure I have everything set
right?

Thanks.


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Newbie Question

2001-04-25 Thread Jeff Warrington

In article 9c1gqf$i3j$[EMAIL PROTECTED], Wade
[EMAIL PROTECTED] wrote:

well, in your first IF clause, you refer to my_type without the $.

For the else clause, you are outputting HTML while still inside
the PHP block.

try one of these:

} else {

?
  select tabindex=13 name=my_type
option value=0 selectedSelect a Value/option option
value=oneOne/option
option value=twoTwo/option
option value=threeThree/option
  /select

?php

}

or 

} else {

printEOF

  select tabindex=13 name=my_type
option value=0 selectedSelect a Value/option option
value=oneOne/option
option value=twoTwo/option
option value=threeThree/option
  /select

EOF;

}


hope that helps,
Jeff

 I wanted to say thanks to all those that have helped me. This is really
 a great language and I am doing things I never thought I'd be able to
 do!
 
 Now to my question:
 
 I am doing some form validation, where I check the values entered by the
 user. If the value is correct, I format the results and print it out. If
 it is not correct, I want to allow them to fix it. When I have a text
 field, like first_name, I'm ok. But when I do an HTML list menu, I'm
 having troubles.
 
 Basically, this is what I want to do. If the value is correct, print the
 value. If it is not correct, display the list box. Here's an example
 (but you can see my else statement is wrong, and this is what I need
 help with):
 
   if (my_type != 0){
 switch($my_type){
 case one:
 print img src=\/trillion/img/one.gif\ width=\41\
 height=\26\ alt=\One\;
 print  One;
 break;
 case two:
 print img src=\/trillion/img/two.gif\ width=\41\
 height=\26\ alt=\Two\;
 print  Two;
 break;
 case three:
 print img src=\/trillion/img/three.gif\ width=\40\
 height=\26\ alt=\Three\;
 print  Three;
 break;
}
   }
   else {
   select tabindex=13 name=my_type
 option value=0 selectedSelect a Value/option
 option value=oneOne/option
 option value=twoTwo/option
 option value=threeThree/option
   /select
  }
  }
 
 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] LDAP listing from Exchange

2001-04-25 Thread Mike Tuller

I am having troubles displaying all the information I need from an Exchange
server. I can display name, department, title, but can't get the phone
number to show up. Can someone show me a script that will pull the object
identifiers from the server so that I can make sure I have everything set
right?

Thanks.


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-CVS] cvs: php4 /ext/fbsql php_fbsql.h

2001-04-25 Thread Frank M. Kromann

fmk Wed Apr 25 11:00:55 2001 EDT

  Modified files:  
/php4/ext/fbsql php_fbsql.h 
  Log:
  removed unused code
  
Index: php4/ext/fbsql/php_fbsql.h
diff -u php4/ext/fbsql/php_fbsql.h:1.3 php4/ext/fbsql/php_fbsql.h:1.4
--- php4/ext/fbsql/php_fbsql.h:1.3  Tue Apr 17 10:39:43 2001
+++ php4/ext/fbsql/php_fbsql.h  Wed Apr 25 11:00:55 2001
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: php_fbsql.h,v 1.3 2001/04/17 17:39:43 fmk Exp $ */
+/* $Id: php_fbsql.h,v 1.4 2001/04/25 18:00:55 fmk Exp $ */
 
 #define HAVE_FBSQL 1
 
@@ -28,10 +28,6 @@
 #define HAVE_FBSQL 1
 #endif
 #if HAVE_FBSQL
-
-#ifdef ZTS
-#include TSRM.h
-#endif
 
 extern zend_module_entry fbsql_module_entry;
 #define fbsql_module_ptr fbsql_module_entry



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Can I install Lihnux on My Windows 95 machine ?

2001-04-25 Thread B. van Ouwerkerk



Also if you are a newbie to linuxget a different machine or be
prepared to lose data or windows on your present machine.

Never lost any data.. Not even when I still was a newbie..

But it's always a good idea to create backups.

Bye,


B.


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-CVS] cvs: php4 /ext/fbsql php_fbsql.c

2001-04-25 Thread Frank M. Kromann

fmk Wed Apr 25 11:01:23 2001 EDT

  Modified files:  
/php4/ext/fbsql php_fbsql.c 
  Log:
  make fbsql_field_flags return a value
  
Index: php4/ext/fbsql/php_fbsql.c
diff -u php4/ext/fbsql/php_fbsql.c:1.12 php4/ext/fbsql/php_fbsql.c:1.13
--- php4/ext/fbsql/php_fbsql.c:1.12 Tue Apr 17 10:39:43 2001
+++ php4/ext/fbsql/php_fbsql.c  Wed Apr 25 11:01:22 2001
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: php_fbsql.c,v 1.12 2001/04/17 17:39:43 fmk Exp $ */
+/* $Id: php_fbsql.c,v 1.13 2001/04/25 18:01:22 fmk Exp $ */
 
 /* TODO:
  *
@@ -525,7 +525,7 @@
{
php_error(E_WARNING,Cannot connect to host '%s',hostName);
php_error(E_WARNING,fbcehClassErrorMessage());
-   return NULL;
+// return NULL;
}
result = malloc(sizeof(PHPFBLink));
result-retainCount = 1;
@@ -2780,17 +2780,16 @@
add_property_string(return_value, name,   
(char*)fbccmdLabelName(fbcmdColumnMetaDataAtIndex(result-metaData, column)),1);
add_property_string(return_value, table,  
(char*)fbccmdTableName(fbcmdColumnMetaDataAtIndex(result-metaData,column)),1);
add_property_long(return_value,   max_length, 
fbcdmdLength(fbccmdDatatype(fbcmdColumnMetaDataAtIndex(result-metaData,column;
-   add_property_string(return_value, type,   (char*)fbcdmdDatatypeString 
(fbcmdDatatypeMetaDataAtIndex(result-metaData, column)),1);
+   add_property_string(return_value, type,   
+(char*)fbcdmdDatatypeString(fbcmdDatatypeMetaDataAtIndex(result-metaData, 
+column)),1);
+   add_property_long(return_value,   not_null,   
+!fbccmdIsNullable(fbcmdColumnMetaDataAtIndex(result-metaData, column)));
 /* Remember to add the rest */
-/* add_property_long(return_value, 
not_null,IS_NOT_NULL(mysql_field-flags)?1:0); */
-/* add_property_long(return_value, 
primary_key,IS_PRI_KEY(mysql_field-flags)?1:0); */
-/* add_property_long(return_value, 
multiple_key,(mysql_field-flagsMULTIPLE_KEY_FLAG?1:0)); */
-/* add_property_long(return_value, 
unique_key,(mysql_field-flagsUNIQUE_KEY_FLAG?1:0)); */
-/* add_property_long(return_value, numeric,IS_NUM(mysql_field-type)?1:0); */
-/* add_property_long(return_value, blob,IS_BLOB(mysql_field-flags)?1:0); */
-/* add_property_string(return_value, 
type,php_mysql_get_field_name(mysql_field-type), 1); */
-/* add_property_long(return_value, 
unsigned,(mysql_field-flagsUNSIGNED_FLAG?1:0)); */
-/* add_property_long(return_value, 
zerofill,(mysql_field-flagsZEROFILL_FLAG?1:0)); */
+/* add_property_long(return_value, 
+primary_key,IS_PRI_KEY(fbsql_field-flags)?1:0); */
+/* add_property_long(return_value, 
+multiple_key,(fbsql_field-flagsMULTIPLE_KEY_FLAG?1:0)); */
+/* add_property_long(return_value, 
+unique_key,(fbsql_field-flagsUNIQUE_KEY_FLAG?1:0)); */
+/* add_property_long(return_value, numeric,IS_NUM(fbsql_field-type)?1:0); */
+/* add_property_long(return_value, blob,IS_BLOB(fbsql_field-flags)?1:0); */
+/* add_property_long(return_value, 
+unsigned,(fbsql_field-flagsUNSIGNED_FLAG?1:0)); */
+/* add_property_long(return_value, 
+zerofill,(fbsql_field-flagsZEROFILL_FLAG?1:0)); */
 }
 /* }}} */
 
@@ -2843,7 +2842,7 @@
 /* }}} */
 
 
-/* {{{ proto string mysql_field_name(int result, int field_index)
+/* {{{ proto string fbsql_field_name(int result, int field_index)
*/
 PHP_FUNCTION(fbsql_field_name)
 {
@@ -3069,7 +3068,7 @@
 /* }}} */
 
 
-/* {{{ proto string fbsql_field_flags(int result, int field_index)
+/* {{{ proto string string fbsql_field_flags(int result[, int field_index])
*/
 PHP_FUNCTION(fbsql_field_flags)
 {
@@ -3078,6 +3077,8 @@
int resultIndex;
PHPFBResult* result;
int column;
+   char buf[512];
+   int  len;
FBSQLLS_FETCH();
 
resultIndex = FB_SQL_G(resultIndex);
@@ -3109,12 +3110,51 @@
RETURN_FALSE;
}
}
-   if (array_init(return_value)==FAILURE)
-   {
-   RETURN_FALSE;
+   strcpy(buf, );
+   if (!fbccmdIsNullable(fbcmdColumnMetaDataAtIndex(result-metaData, column))) {
+   strcat(buf, not_null );
}
-   /* We should create the result -- currently empty */
-
+#if 0
+   if (IS_PRI_KEY(fbsql_field-flags)) {
+   strcat(buf, primary_key );
+   }
+   if (fbsql_field-flagsUNIQUE_KEY_FLAG) {
+   strcat(buf, unique_key );
+   }
+   if (fbsql_field-flagsMULTIPLE_KEY_FLAG) {
+   strcat(buf, multiple_key );
+   }
+   if (IS_BLOB(fbsql_field-flags)) {
+   strcat(buf, blob );
+   }
+   if (fbsql_field-flagsUNSIGNED_FLAG) {
+   strcat(buf, unsigned );
+   }
+   if (fbsql_field-flagsZEROFILL_FLAG) {

[PHP-CVS] cvs: php4 /ext/oci8 php_oci8.h

2001-04-25 Thread Andy Sautins

asautinsWed Apr 25 10:44:08 2001 EDT

  Modified files:  
/php4/ext/oci8  php_oci8.h 
  Log:
  
  
 Cleanup collections - removed unused members from oci_collection structure
  
  
Index: php4/ext/oci8/php_oci8.h
diff -u php4/ext/oci8/php_oci8.h:1.14 php4/ext/oci8/php_oci8.h:1.15
--- php4/ext/oci8/php_oci8.h:1.14   Fri Apr 13 07:43:39 2001
+++ php4/ext/oci8/php_oci8.hWed Apr 25 10:44:07 2001
@@ -17,7 +17,7 @@
+--+
 */
 
-/* $Id: php_oci8.h,v 1.14 2001/04/13 14:43:39 thies Exp $ */
+/* $Id: php_oci8.h,v 1.15 2001/04/25 17:44:07 asautins Exp $ */
 
 #if HAVE_OCI8
 # ifndef PHP_OCI8_H
@@ -83,18 +83,13 @@
 
 typedef struct {
 int id;
-int open;
 oci_connection *conn;
-oci_session *session;
-OCISvcCtx   *pServiceContext;
 OCIType *tdo;
 OCITypeCode coll_typecode;
 OCIRef  *elem_ref;
 OCIType *element_type;
 OCITypeCode element_typecode;
 OCIColl *coll;
-sword   error;
-OCIError*pError;
 } oci_collection;
 
 typedef struct {



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] maximum length of email address

2001-04-25 Thread Steven Haryanto

At 4/26/2001 01:08 AM, Dennis Gearon wrote:
I've gone through the archives and through a bunch of RFC's, but have
had no luck in finding  maximum length for email addresses. Anybody
know if there is one and what it is?

Perhaps it's one of those undefined values (like the maximum length of
an URL)? The username part is system-dependant, for example...

Steve


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-CVS] cvs: CVSROOT / avail cvsusers gen_acl_file.m4

2001-04-25 Thread Rasmus Lerdorf

rasmus  Wed Apr 25 10:45:52 2001 EDT

  Modified files:  
/CVSROOTavail cvsusers gen_acl_file.m4 
  Log:
  CVS account for Jascha Wetzel
  
  

Index: CVSROOT/avail
diff -u CVSROOT/avail:1.151 CVSROOT/avail:1.152
--- CVSROOT/avail:1.151 Sun Apr 22 17:24:05 2001
+++ CVSROOT/avail   Wed Apr 25 10:45:51 2001
@@ -2,12 +2,12 @@
 unavail
 avail|andi,andrei,jimw,rasmus,rubys,sas,ssb,thies,zeev,shane|CVSROOT
 
avail|andi,andrei,jimw,rasmus,rubys,sas,ssb,thies,zeev,shane,cmv,tcobb,gareth,jah,eschmid,ronabop,derick,sterling,stas,phildriscoll,jmoore,andre,sniper,david,lyric,zimt,mk,goba,zak,jmcastagnetto,dams|phpweb
-avail|andi,andrei,jimw,rasmus,rubys,sas,ssb,thies,zeev,shane,fmk,hirokawa,jah,eschmid,dbeu,sbergmann,samjam,avsm,ronabob,derick,sterling,venaas,stas,hholzgra,cmv,phildriscoll,jmoore,andre,sniper,changelog,sr,david,jdonagher,chagenbu,jon,elixer,joosters,jason,mysql,kalowsky,opaquedave,steinm,phanto,gluke,shuric,svanegmond,rjs,vlad,jimjag,emile,wez,sasha,camber,ohrn,romolo,martin,lurcher,wsanchez,dreid,bmcadams,swm,zhang,kevin,joey,jon,rael,jlp,sbergmann,troels,urs,jpm,adaniel,tuupola,mj,ssb,metallic,heyesr,aj,andre,zimt,uw,jeichorn,bjoern,chregu,bkelly,tfromm,subjective,cox,mboeren,fireclaw,jmcastagnetto,kaltoft,jccann|php4/pear,pearweb,pear
-avail|andi,andrei,jimw,rasmus,rubys,sas,ssb,thies,zeev,shane,fmk,hirokawa,jah,eschmid,dbeu,sbergmann,samjam,avsm,ronabob,derick,sterling,venaas,stas,hholzgra,cmv,phildriscoll,jmoore,andre,sniper,changelog,sr,david,jdonagher,chagenbu,jon,elixer,joosters,jason,mysql,kalowsky,opaquedave,steinm,phanto,gluke,shuric,svanegmond,rjs,vlad,jimjag,emile,wez,sasha,camber,ohrn,romolo,martin,lurcher,wsanchez,dreid,bmcadams,swm,zhang,kevin,joey|php4,php3,php31,phpfi
-avail|andi,andrei,jimw,rasmus,rubys,sas,ssb,thies,zeev,shane,fmk,hirokawa,jah,eschmid,dbeu,sbergmann,samjam,avsm,ronabob,derick,sterling,venaas,stas,hholzgra,cmv,phildriscoll,jmoore,andre,sniper,changelog,sr,david,jdonagher,chagenbu,jon,elixer,joosters,jason,mysql,kalowsky,opaquedave,steinm,phanto,gluke,shuric,svanegmond,rjs,vlad,jimjag,emile,wez,sasha,camber,ohrn,romolo,martin,lurcher,wsanchez,dreid,bmcadams,swm,zhang,kevin,joey,hholzgra|functable
+avail|andi,andrei,jimw,rasmus,rubys,sas,ssb,thies,zeev,shane,fmk,hirokawa,jah,eschmid,dbeu,sbergmann,samjam,avsm,ronabob,derick,sterling,venaas,stas,hholzgra,cmv,phildriscoll,jmoore,andre,sniper,changelog,sr,david,jdonagher,chagenbu,jon,elixer,joosters,jason,mysql,kalowsky,opaquedave,steinm,phanto,gluke,shuric,svanegmond,rjs,vlad,jimjag,emile,wez,sasha,camber,ohrn,romolo,martin,lurcher,wsanchez,dreid,bmcadams,swm,zhang,kevin,joey,entity,jon,rael,jlp,sbergmann,troels,urs,jpm,adaniel,tuupola,mj,ssb,metallic,heyesr,aj,andre,zimt,uw,jeichorn,bjoern,chregu,bkelly,tfromm,subjective,cox,mboeren,fireclaw,jmcastagnetto,kaltoft,jccann|php4/pear,pearweb,pear
+avail|andi,andrei,jimw,rasmus,rubys,sas,ssb,thies,zeev,shane,fmk,hirokawa,jah,eschmid,dbeu,sbergmann,samjam,avsm,ronabob,derick,sterling,venaas,stas,hholzgra,cmv,phildriscoll,jmoore,andre,sniper,changelog,sr,david,jdonagher,chagenbu,jon,elixer,joosters,jason,mysql,kalowsky,opaquedave,steinm,phanto,gluke,shuric,svanegmond,rjs,vlad,jimjag,emile,wez,sasha,camber,ohrn,romolo,martin,lurcher,wsanchez,dreid,bmcadams,swm,zhang,kevin,joey,entity|php4,php3,php31,phpfi
+avail|andi,andrei,jimw,rasmus,rubys,sas,ssb,thies,zeev,shane,fmk,hirokawa,jah,eschmid,dbeu,sbergmann,samjam,avsm,ronabob,derick,sterling,venaas,stas,hholzgra,cmv,phildriscoll,jmoore,andre,sniper,changelog,sr,david,jdonagher,chagenbu,jon,elixer,joosters,jason,mysql,kalowsky,opaquedave,steinm,phanto,gluke,shuric,svanegmond,rjs,vlad,jimjag,emile,wez,sasha,camber,ohrn,romolo,martin,lurcher,wsanchez,dreid,bmcadams,swm,zhang,kevin,joey,entity,hholzgra|functable
 avail|rasmus,sterling,jimw,ssb|pres
 
avail|jalal,zak,andre,ultrapingo,lyric,jmoore,ronabop,sbergmann,joey,sniper,torben,hellekin,cnewbill|qaweb

  1   2   3   >