[PHP] Date-TimeStamp

2001-10-20 Thread Daniel Harik

Hello guys

I store date in my dbase in folliwing format 2001-08-27 22:24:07, how
can i convert this to timestamp and do manipulation


Thank You very muc


-- 
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:Date-TimeStamp

2001-10-20 Thread Daniel Harik

I've tried this code:

$timea = explode( ,$timepostsed);
$timea1 = explode(-,$timea[0]);
$timea2 = explode(:,$timea[1]);
$timestamp =
mktime($timea2[0],$timea2[1],$timea2[2],$timea1[1],$timea1[2],$timea1[0]);


But it return -1


-- 
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] XML: Expat or DOM?

2001-10-20 Thread Tamas Arpad

On Saturday 20 October 2001 02:35, you wrote:
 Hi guys,

 Also, is it really risky to develop in DOM, considering the module
 is experimental, and in theory it could change ?

We are working with dom for about a year. Our project depends on it, 
so I hope it won't change much :))
By the way we are using it without any problem despite of it's 
experimental state.

I found it much easier to use than expat, especially with complex xml 
files.

Arpi

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

2001-10-20 Thread indrek siitan

Hi,

has anyone seen any Unicode support routines available anywhere for PHP?

the manual only documents utf8_encode() and utf8_decode(), that by
the documentation convert ISO-8859-1 strings to UTF8 and back.
but i also need support for other codepages (ISO-8859-*, KOI8-R
and others). I only need xx  UTF-8 encoding.



Rgds,
Indrek

-- 
For technical support contracts, goto https://order.mysql.com/
   __  ___ ___   __
  /  |/  /_ __/ __/ __ \/ /Indrek Siitan [EMAIL PROTECTED]
 / /|_/ / // /\ \/ /_/ / /__   MySQL AB, The Web Guru
/_/  /_/\_, /___/\___\_\___/   Tallinn, Estonia
   ___/   www.mysql.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] PHP and Unicode

2001-10-20 Thread indrek siitan

Hi,

 has anyone seen any Unicode support routines available anywhere for PHP?

disregard the question. found iconv support right after sending this mail :)


Rgds,
Indrek

-- 
For technical support contracts, goto https://order.mysql.com/
   __  ___ ___   __
  /  |/  /_ __/ __/ __ \/ /Indrek Siitan [EMAIL PROTECTED]
 / /|_/ / // /\ \/ /_/ / /__   MySQL AB, The Web Guru
/_/  /_/\_, /___/\___\_\___/   Tallinn, Estonia
   ___/   www.mysql.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] XSLT error functions

2001-10-20 Thread Vikram Vaswani

Hi all,

Am working with the XSLT functions in PHP. I'm trying to trap errors with
the xslt_error() functions - however, the function generates no output even
if I deliberately introduce errors into the XSLT sheet.

Same goes for the openlog() function. Any one have any ideas how I can use
these to generate and log errors?

Finally, I don't think the Sablot engine which ships with 4.0.6 supports
all the features of the XSLT spec. Any clues on where I can find a list of
supported items?

TIA,

Vikram

-- 
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: Expat o DOM?

2001-10-20 Thread Daniele Baroncelli

Sorry, for this message in Italian. It should have been addressed to the
Italian Php newsgoup.


Daniele



Daniele Baroncelli [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Salve,

 Vorrei cominciare il nuovo sviluppo del mio sito in XML.

 C'e' qualcuno che mi sa dire la reale differenza in velocita' tra i parser
 Expat e DOM?

 Inoltre, e' davvero rischioso sviluppare in DOM, considerando che il
modulo
 e' sperimentale e in teoria potrebbe cambiare?



 Saluti


 Daniele Baroncelli





-- 
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] Re: Annotated PHP Manual

2001-10-20 Thread DL Neil

 Khalid Hazmi wrote:
  How I can download the current Annotated PHP Manual???


 There is no such thing... AFAIK.
= Yasuo Ohgaki


Yasuo: Yes there is (and VERY useful it is too), check out the range of PHP 
documentation available from
http://www.php.net/docs.php

Khalid: Unlike some other packages I don't think there's a zipped-up, 
ready-for-download version. I presume this is
because the online version is always 'the latest' - but I don't know how often they 
update it (maybe that's somewhere on
the page I just quoted!?) You could try something called a webwhacker to download 
the web of pages that make up the
manual...

=dn



-- 
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] auth-loginform will not be parsed ?

2001-10-20 Thread Ronald Weinrich

Hello All
I try to implement a authsystem like.
1.) in php.ini I call prepend.php to initial db_mysql.inc ct_sql.inc
session.inc auth.inc perm.inc user.inc
local.inc.php page.inc.php
2.) in local.inc.php  I have the class My_Auth where I create a
$tpl new EasyTemplate(loginform.inc.php)

in the index.html I make a a href=pages/site2.phpindex/a in
pages/site2.php I have
?php  page_open(array(sess = Example_Session, auth = My_Auth));
?
(session works)

my problem is the loginform.inc.php will not be parsed  I try to put the
loginform.inc.php in every path below docRoot

Tia
Ron







-- 
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 have If...Else inside a For Loop???

2001-10-20 Thread ~~~i LeoNid ~~

On Fri, 19 Oct 2001 21:46:29 -0700 impersonator of [EMAIL PROTECTED] (Brad
Melendy) planted I saw in php.general:

arrh!   I don't think I can say much else.  Thanks so
much for pointing that out David.  ;-)

.Brad


David Pearson [EMAIL PROTECTED] wrote in message
003101c1591a$e00ec290$320110ac@david">news:003101c1591a$e00ec290$320110ac@david...
 Could it be the semi colon at the end of the 'if' line, at '... $nChar =
 45); { ...'  ?  Looks like the if statement ends there, the ' { print
 OK.; } ' is a block on it's own and the 'else' is now out of context.

 -Original Message-
 From: Brad Melendy [mailto:[EMAIL PROTECTED]]
 Sent: Friday, October 19, 2001 8:03 PM
 To: [EMAIL PROTECTED]
 Subject: [PHP] Can I have If...Else inside a For Loop???


 Hi All,
 I'm stumped.  I've got the following code:

 ?php
 if(isSet($domain))
 {
  for ( $counter=0; $counter = strlen($domain); $counter++ )
   {
   $nChar = ord(strtolower(substr($domain, $counter, 1)));
   if (($nChar  47 And $nChar  58) or ($nChar  96 And $nChar  123) or
 $nChar = 45);
I'd also ^^put == here, or you NEVER get to else{ anyway

-- 
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] Desparate... rebuild gone wrong

2001-10-20 Thread php

Hi,


I have been toying with my php builds (on linux), and upgraded my mcrypt
library
and subsequently killed php.



make[1]: Entering directory `/usr/src/1/php4/Zend'
/bin/sh ../libtool --silent --mode=compile
gcc -DHAVE_CONFIG_H -I. -I. -I../main   -I../TSRM  -g -O2 -prefer-non-pic -s
tatic -c -o zend_language_parser.lo `test -f zend_language_parser.c || echo
'./'`zend_language_parser.c
zend_language_parser.c: In function `zendparse':
zend_language_parser.c:3088: Internal error: Segmentation fault.
Please submit a full bug report.
See URL:http://bugzilla.redhat.com/bugzilla/ for instructions.
make[1]: *** [zend_language_parser.lo] Error 1
make[1]: Leaving directory `/usr/src/1/php4/Zend'
make: *** [all-recursive] Error 1



have tried new cvs, ./buildconf etc

Any tips?

sean


-- 
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-send (Download the whole directory using PHP)

2001-10-20 Thread Mark Lo

Hi Sir,

I have been asking this for so many times, and I never get a reply
for this !!!   Please help me.  I would like to know how to download the
whole directory using PHP.  Can anyone supply me some sources code for this.

  I am greatly appreciate for your help.


Best Regards,


Mark Lo



-- 
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] Desparate... rebuild gone wrong

2001-10-20 Thread php

Sorry,
wrong list


-- 
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] Re-send (Download the whole directory using PHP)

2001-10-20 Thread Christopher William Wesley

On Sun, 21 Oct 2001, Mark Lo wrote:

 I have been asking this for so many times, and I never get a reply
 for this !!!   Please help me.  I would like to know how to download the
 whole directory using PHP.  Can anyone supply me some sources code for this.

I see a few reasons why you won't get an answer to your question:
1) you didn't ask a well-formed question.  your question was vague.
2) you didn't provide any information about your setup or environment.
3) you didn't ask for help.  you asked for code.
4) you didn't demonstrate that you're trying to come up with your
   own solution, and need some help to make your solution work.

You're free to make such inqueries, but we're also free to ignore them.
(Most people regard your type of inquery as rude, and delete them.)

If you remedy the conditions mentioned above, I'm sure people on the list
would be glad to help.

g.luck,
~Chris   /\
 \ / September 11, 2001
  X  We Are All New Yorkers
 / \ rm -rf /bin/laden



-- 
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] strip HTML

2001-10-20 Thread Gary

Hello All,
  How would I strip all HTML before the info in inserted to MySQL? The 
info is sent with a form. We Have one person that insist on using HTML.

TIA
Gary


-- 
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] Posted this a few day ago, really need help :S (arrays)

2001-10-20 Thread Roy van Pelt

Hello there...

The problem is that I can only add one value into the array...
Anyone knows what I'm doing wrong here(First project by the way!!)
=
?php
  session_start();
  session_register(offer);

// Make a new offer if it doesn't exist yet
if (!is_array($offer))
{
  $offer = array(array('pid' = '', 'pname' = '', 'pqty' = ''));
  $nrItems = 0;
}

// Get variables from products.php
$productID=trim(${pid});
$productName=trim(${productName});

// Add product to offer
if ($productID!=)
{
$nrItems = $nrItems + 1;
for ($i=0; $i$nrItems; $i=$i+1)
{
  if ($offer[$i]['pid']==)
  {
   $productQTY = 1;
   $offer[$i]['pid'] = $productID;
   $offer[$i]['pname'] = $productName;
   $offer[$i]['pqty'] = $productQTY;
  }
}
}

//if there are no items in the offer, print a message
if ($offer[0]['pid']==)
{
  echo No items in the offer.br\n;
  var_dump($offer).br\n;
  echo a href=producten.phpback/a;
}
//else print the contents of the offer
  else
{
for ($i=0; $i$nrItems; $i=$i+1)
{
  echo The offer:.br\n;

  var_dump($offer).br\n;

  echo The offer contains items: ;
  echo $nrItems.br\n;
  echo $offer[$i]['pid'].br\n;
  echo $offer[$i]['pname'].br\n;
  echo $offer[$i]['pqty'].br\n;
  echo br\n;
  echo a href=producten.phpback/a;
  echo br\n;
}
}
==

THNX in advance






-- 
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] Re-send (Download the whole directory using PHP)

2001-10-20 Thread Dave Goodrich

If you mean use PHP to download a directory of your choosing...

You could send the url to wget or lynx. This would make it easy to pass
flags as well such as dir level to get, follow links, recursive Y/N, etc.

Never done it but I think exec is what you want.

DAve




On Sun, Oct 21, 2001 at 12:54:32AM +0800, Mark Lo wrote:
 Hi Sir,
 
 I have been asking this for so many times, and I never get a reply
 for this !!!   Please help me.  I would like to know how to download the
 whole directory using PHP.  Can anyone supply me some sources code for this.
 
   I am greatly appreciate for your help.
 
 
 Best Regards,
 
 
 Mark Lo
 
 
 
 -- 
 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]
 

-- 
My other computer is your Windows machine...



-- 
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: strip HTML

2001-10-20 Thread James, Yz

The easiest way would be to use strip_tags(), though you could craft your
own regular expression.

http://www.php.net/strip_tags

James

Gary [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Hello All,
   How would I strip all HTML before the info in inserted to MySQL? The
 info is sent with a form. We Have one person that insist on using HTML.

 TIA
 Gary




-- 
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 have If...Else inside a For Loop???

2001-10-20 Thread Brad Melendy

H. dunno about that.  It's returning the results I'd expect as it is
now.  If I pass a string with characters that don't match the IF's criteria,
I'm getting the ELSE statement's results.  Thanks though.

Brad

~~~I Leonid ~~ [EMAIL PROTECTED] wrote in message
3bd15547.14743496@localhost">news:3bd15547.14743496@localhost...
 On Fri, 19 Oct 2001 21:46:29 -0700 impersonator of [EMAIL PROTECTED] (Brad
 Melendy) planted I saw in php.general:

 arrh!   I don't think I can say much else.  Thanks so
 much for pointing that out David.  ;-)
 
 .Brad
 
 
 David Pearson [EMAIL PROTECTED] wrote in message
 003101c1591a$e00ec290$320110ac@david">news:003101c1591a$e00ec290$320110ac@david...
  Could it be the semi colon at the end of the 'if' line, at '... $nChar
=
  45); { ...'  ?  Looks like the if statement ends there, the ' { print
  OK.; } ' is a block on it's own and the 'else' is now out of context.
 
  -Original Message-
  From: Brad Melendy [mailto:[EMAIL PROTECTED]]
  Sent: Friday, October 19, 2001 8:03 PM
  To: [EMAIL PROTECTED]
  Subject: [PHP] Can I have If...Else inside a For Loop???
 
 
  Hi All,
  I'm stumped.  I've got the following code:
 
  ?php
  if(isSet($domain))
  {
   for ( $counter=0; $counter = strlen($domain); $counter++ )
{
$nChar = ord(strtolower(substr($domain, $counter, 1)));
if (($nChar  47 And $nChar  58) or ($nChar  96 And $nChar  123)
or
  $nChar = 45);
 I'd also ^^put == here, or you NEVER get to else{ anyway



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

2001-10-20 Thread Heidi Belal

Anybody know of good reliable hosting that supports
php, and has a control panel to go with it?
thanks,
Heidi

=
Heidi Belal
ICQ# 32127109

A bus stops at a bus station.
A train stops at a train station.  On my desk
I have a work station...

__
Do You Yahoo!?
Make a great connection at Yahoo! Personals.
http://personals.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]




[PHP] Re: strip HTML

2001-10-20 Thread Gary

Thanks James:

  I had figured that part out (should of said so). What is happening is 
a form is passing the stuff to another page that does the DB UPDATE. The 
form action is
  form name=\cform\ method=\post\ action=\update.php\.
Where I am lost is where to put the strip_tags() like 
action=strip_tages(update.php);

Gary


Yz James wrote:

 The easiest way would be to use strip_tags(), though you could craft your
 own regular expression.
 
 http://www.php.net/strip_tags
 
 James
 
 Gary [EMAIL PROTECTED] wrote in message
 [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 
Hello All,
  How would I strip all HTML before the info in inserted to MySQL? The
info is sent with a form. We Have one person that insist on using HTML.

TIA
Gary


 
 


-- 
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] How do i retrieve the records that are NOT linked?

2001-10-20 Thread Simon Kimber

Hi All,

Are there any MySQL gurus who can help me solve this problem?

I have three tables...  users, categories and category_user_rights

categories contains:
ID,
parent_ID,
name

users contains:
username,
password,
name,
etc

category_user_rights contains:
username,
category_ID

How do I pull everything out of categories that a given user DOES NOT have
rights to?  ie.  every record from categories that does not have a record
in category_user_rights linking it to a username such as fred

Any help on this would be greatly appreciated!

Thanks!

Simon Kimber


-- 
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 do i retrieve the records that are NOT linked?

2001-10-20 Thread Jack Dempsey

if i understand you correctly, perhaps this:

select * from categories a,category_user_rights b where a.name!=b.username;

jack

categories contains:
ID,
parent_ID,
name

users contains:
username,
password,
name,
etc

category_user_rights contains:
username,
category_ID

How do I pull everything out of categories that a given user DOES NOT have
rights to?  ie.  every record from categories that does not have a record
in category_user_rights linking it to a username such as fred

Any help on this would be greatly appreciated!

Thanks!

Simon Kimber


--
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 Digest 20 Oct 2001 20:32:09 -0000 Issue 946

2001-10-20 Thread php-general-digest-help


php-general Digest 20 Oct 2001 20:32:09 - Issue 946

Topics (messages 71674 through 71702):

PHP and Unicode
71674 by: indrek siitan
71676 by: indrek siitan

Re: Re:Date-TimeStamp
71675 by: James, Yz
71677 by: Daniel Harik

XSLT error functions
71678 by: Vikram Vaswani
71699 by: Christian Stocker

Re: Expat o DOM?
71679 by: Daniele Baroncelli
71680 by: Daniele Baroncelli

Re: Annotated PHP Manual
71681 by: DL Neil

PHP/CGI problem: #!/path/php at top of CGI script appears in output
71682 by: Philippe
71685 by: Dave Goodrich

auth-loginform will not be parsed ?
71683 by: Ronald Weinrich

Upgrade problems php3 - php4
71684 by: sgibbs.vt.globalhealth.org

Re: Can I have If...Else inside a For Loop???
71686 by: ~~~i LeoNid ~~
71696 by: Brad Melendy

Desparate... rebuild gone wrong
71687 by: php
71689 by: php

Re-send (Download the whole directory using PHP)
71688 by: Mark Lo
71690 by: Christopher William Wesley
71694 by: Dave Goodrich

strip HTML
71691 by: Gary
71695 by: James, Yz
71698 by: Gary
71700 by: Jack Dempsey

Re: [PHP-INST] Re: [PHP] PHP/CGI problem: #!/path/php at top of CGI script appears in 
output
71692 by: Stefan Siefert

Posted this a few day ago, really need help :S (arrays)
71693 by: Roy van Pelt

php hosting
71697 by: Heidi Belal

How do i retrieve the records that are NOT linked?
71701 by: Simon Kimber
71702 by: Jack Dempsey

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]


--



Hi,

has anyone seen any Unicode support routines available anywhere for PHP?

the manual only documents utf8_encode() and utf8_decode(), that by
the documentation convert ISO-8859-1 strings to UTF8 and back.
but i also need support for other codepages (ISO-8859-*, KOI8-R
and others). I only need xx  UTF-8 encoding.



Rgds,
Indrek

-- 
For technical support contracts, goto https://order.mysql.com/
   __  ___ ___   __
  /  |/  /_ __/ __/ __ \/ /Indrek Siitan [EMAIL PROTECTED]
 / /|_/ / // /\ \/ /_/ / /__   MySQL AB, The Web Guru
/_/  /_/\_, /___/\___\_\___/   Tallinn, Estonia
   ___/   www.mysql.com






Hi,

 has anyone seen any Unicode support routines available anywhere for PHP?

disregard the question. found iconv support right after sending this mail :)


Rgds,
Indrek

-- 
For technical support contracts, goto https://order.mysql.com/
   __  ___ ___   __
  /  |/  /_ __/ __/ __ \/ /Indrek Siitan [EMAIL PROTECTED]
 / /|_/ / // /\ \/ /_/ / /__   MySQL AB, The Web Guru
/_/  /_/\_, /___/\___\_\___/   Tallinn, Estonia
   ___/   www.mysql.com





Hi Daniel,

Try this:

?
function DateToTimestamp($datetime) {
list ($date, $time) = explode( , $datetime);
list ($year, $month, $day) = explode(-, $date);
list($hour, $minute, $second) = explode(:, $time);

$timestamp = mktime($hour, $minute, $second, $month, $day, $year);

return $timestamp;
}

echo DateToTimestamp(2001-10-20 14:05:15);
?

Should work ok.

James

Daniel Harik [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 I've tried this code:

 $timea = explode( ,$timepostsed);
 $timea1 = explode(-,$timea[0]);
 $timea2 = explode(:,$timea[1]);
 $timestamp =
 mktime($timea2[0],$timea2[1],$timea2[2],$timea1[1],$timea1[2],$timea1[0]);


 But it return -1







Thank You





Hi all,

Am working with the XSLT functions in PHP. I'm trying to trap errors with
the xslt_error() functions - however, the function generates no output even
if I deliberately introduce errors into the XSLT sheet.

Same goes for the openlog() function. Any one have any ideas how I can use
these to generate and log errors?

Finally, I don't think the Sablot engine which ships with 4.0.6 supports
all the features of the XSLT spec. Any clues on where I can find a list of
supported items?

TIA,

Vikram




In [EMAIL PROTECTED], Vikram Vaswani
wrote:

 Hi all,
 
 Am working with the XSLT functions in PHP. I'm trying to trap errors
 with the xslt_error() functions - however, the function generates no
 output even if I deliberately introduce errors into the XSLT sheet.
 
 Same goes for the openlog() function. Any one have any ideas how I can
 use these to generate and log errors?


as far as i know, ext/sablot from 4.0.6 doesn't really support the error
function. you have to wait for 4.1.0 and the new ext/xslt extension,
which does support that just fine.
 
 Finally, I don't think the Sablot engine which ships with 4.0.6 supports
 all the features of the XSLT spec. Any clues on where I can find a list
 of supported items?

http://www.gingerall.com

chregu




Salve,


[PHP] Re: IRC Channel

2001-10-20 Thread Henrik Hansen

[EMAIL PROTECTED] (Chip Landwehr) wrote:

  Is there a PHP IRC channel?

#php on most networks

-- 
Henrik Hansen

-- 
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 do i retrieve the records that are NOT linked?

2001-10-20 Thread Simon Kimber

 if i understand you correctly, perhaps this:

 select * from categories a,category_user_rights b where
a.name!=b.username;

 jack

When i do something like that I get loads of duplicate records including the
ones that should be there!  so if i do a group the result just looks like
i've selected everything...

here's my query for getting all the (sub)categories that DO have an entry in
category_user_rights...  Somehow i need to reverse it to pull out
everything but what it's returning at the moment! :o(

$sql  = SELECT categories.ID, categories.title, categories.code ;
$sql .= FROM categories, category_user_rights ;
$sql .= WHERE categories.parentcat_INC = $cat ;
$sql .= AND categories.ID = category_user_rights.category_id ;
$sql .= AND category_user_rights.username = '$username';

$result = mysql_query($sql);








Original message:


categories contains:
ID,
parent_ID,
name

users contains:
username,
password,
name,
etc

category_user_rights contains:
username,
category_ID

How do I pull everything out of categories that a given user DOES NOT have
rights to?  ie.  every record from categories that does not have a record
in category_user_rights linking it to a username such as fred

Any help on this would be greatly appreciated!

Thanks!

Simon Kimber


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

2001-10-20 Thread Michael A. Peters

On Sat, 20 Oct 2001 11:29:19 -0700 (PDT)
Heidi Belal [EMAIL PROTECTED] wrote:

 Anybody know of good reliable hosting that supports
 php, and has a control panel to go with it?

Don't know what you mean by a control panel, but http://he.com/ is an excellent host.
Very inexpensive, and you get full MySQL database as well as php and cgi-bin.

They have a lot of bandwidth, too.
-- 
-=-=-=-=-=-=-=-=-=-=-=-=-
Michael A. Peters
http://24.5.29.77:10080/

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

2001-10-20 Thread Michael J. Seely


HI - I've been using http://www.tierranet.com/services/ for several years.
Good tech support.
Lots of extras.


Anybody know of good reliable hosting that supports
php, and has a control panel to go with it?
thanks,
Heidi

=
Heidi Belal
ICQ# 32127109

A bus stops at a bus station.
A train stops at a train station.  On my desk
I have a work station...

__
Do You Yahoo!?
Make a great connection at Yahoo! Personals.
http://personals.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]

-- 

_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
Michael Seely  408-777-9949




 

-- 
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] Super newbie question with Hello world! statement

2001-10-20 Thread epanagio

I have been trying for several hours to get this going but I can't. Any
suggestions?

html
body
   ?php
  phpinfo();
?
/body
/html

Also I have this extremely complex program:
html
body
?php
phpinfo();
?
/body
/html

In both cases the programs are named something.php

Thanks for your help.

Evan P.


-- 
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] Super newbie question with Hello world! statement

2001-10-20 Thread MINI2

Dump all the extra html tags and just put 
?php
phpinfo();
?

in the file and see if that works.

Cheers
Casey

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] 
Sent: Saturday, October 20, 2001 7:00 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Super newbie question with Hello world! statement

I have been trying for several hours to get this going but I can't. Any
suggestions?

html
body
   ?php
  phpinfo();
?
/body
/html

Also I have this extremely complex program:
html
body
?php
phpinfo();
?
/body
/html

In both cases the programs are named something.php

Thanks for your help.

Evan P.


-- 
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] Super newbie question with Hello world! statement

2001-10-20 Thread Evan Panagiotopoulos

Oops, while I was trying to get the version of Apache I tested the
httpd.conf file and I got the following messages:

params.c:Parameter() - Ignoring badly formed line in configuration file:
IfDefine HAVE_PHP
params.c:Parameter() - Ignoring badly formed line in configuration file:
LoadModule php_module modules/mod_php.so

WHat does this mean? SHould I try to reinstall something?

Thanks.


Mini2 wrote:

 Give us some info about the machine running this.  OS, PHP version,
 Apache?  Is this your own box? Remote server that you have a shared
 account on?

 Cheers
 Casey





-- 
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] I recently noticed your ad on 1America Mall..

2001-10-20 Thread Neil Gallagher

Dear fellow marketer

A few months back I joined a program and then...promptly forgot
about it. You may have done this yourself sometime...you intend
to work the program but then get caught in your day-to-day
activities and it's soon forgotten.

The program was free to join so maybe I just didn't take it very
seriously.

Anyway, near the end of May I received a letter from my
sponsor (Jim Henslin) informing me that I had more than 2000
PAID members in my downline!

As you can imagine, I was very skeptical. After all, how could I
have more than 2000 paid members under me in a program that I had
never promoted?

I took the time to check out the site...then wrote to Jim asking
for confirmation that these were paid members and not just free
sign-ups...like me :)

Well, it was true...I had 2365 paid members in my downline. This
in a program that I had never worked!

All I had to do was upgrade to a paid membership before the end
of the month and I would have my position locked in and a
downline of 2365 people.

You can bet I wasted no time in getting my membership upgraded!

I can tell you, if I had known what was happening with this
program, I would have become an active paid member months ago!

With this program, you will get a HUGE downline of PAID MEMBERS .
My sponsor's check, which is a minimum of $5,000, arrives every
month...on time.

How would you like to lock your position in FREE while you check
out this opportunity and watch your downline grow?

Just join Post Launch;

To sign up simply reply to: [EMAIL PROTECTED]
Type in Subject: Send My FREE Membership (required)
Type in Letter: Your First and Last Name (required)
Your Email Address (if different from above)

We will confirm your position and send you a special report
as soon as possible, also Your Free Member Number.

This is a ONE TIME mailing - your name is already on our exclude list.

I'll get you entered and let you know how you can
keep track of your growing downline.

That's all there's to it. No obligation. No risk. Do it Now!

I'll then send you info, and you can make up your own mind.

Warm regards
Neil Gallagher

P.S. After having several negative experiences with network
marketing companies I had pretty much given up on them.
This company is different--it offers value, integrity, and a
REAL opportunity to have your own home-based business...
and finally make real money on the 'Net.

Their revolutionary Vertical Integration plan is amazing and
GUARANTEES that you will have PAID members placed in your
downline.

Don't pass this up..you can sign up and test-drive the
program for FREE. Just join Post launch now for FREE.
Nothing more to it.

You have nothing to lose and potentially a LOT to gain. Just do
it!



--
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 have If...Else inside a For Loop???

2001-10-20 Thread Brad Melendy

Oops, I spoke too soon.  I wasn't getting the results I thought I was until
I used == instead of = at the very end of my IF statement.  Thanks very
much for pointing that out.

Brad

Brad Melendy [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 H. dunno about that.  It's returning the results I'd expect as it
is
 now.  If I pass a string with characters that don't match the IF's
criteria,
 I'm getting the ELSE statement's results.  Thanks though.

 Brad

 ~~~I Leonid ~~ [EMAIL PROTECTED] wrote in message
 3bd15547.14743496@localhost">news:3bd15547.14743496@localhost...
  On Fri, 19 Oct 2001 21:46:29 -0700 impersonator of [EMAIL PROTECTED]
(Brad
  Melendy) planted I saw in php.general:
 
  arrh!   I don't think I can say much else.  Thanks
so
  much for pointing that out David.  ;-)
  
  .Brad
  
  
  David Pearson [EMAIL PROTECTED] wrote in message
  003101c1591a$e00ec290$320110ac@david">news:003101c1591a$e00ec290$320110ac@david...
   Could it be the semi colon at the end of the 'if' line, at '...
$nChar
 =
   45); { ...'  ?  Looks like the if statement ends there, the ' { print
   OK.; } ' is a block on it's own and the 'else' is now out of
context.
  
   -Original Message-
   From: Brad Melendy [mailto:[EMAIL PROTECTED]]
   Sent: Friday, October 19, 2001 8:03 PM
   To: [EMAIL PROTECTED]
   Subject: [PHP] Can I have If...Else inside a For Loop???
  
  
   Hi All,
   I'm stumped.  I've got the following code:
  
   ?php
   if(isSet($domain))
   {
for ( $counter=0; $counter = strlen($domain); $counter++ )
 {
 $nChar = ord(strtolower(substr($domain, $counter, 1)));
 if (($nChar  47 And $nChar  58) or ($nChar  96 And $nChar  123)
 or
   $nChar = 45);
  I'd also ^^put == here, or you NEVER get to else{ anyway





-- 
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] cant redeclare class.....

2001-10-20 Thread Sagar

Hi all,

I'm using jm_sms class in mysql 
dowhile($myrow=mysql_fetch_array($result)) loop.
the class is running fine for the first time. But when it is called for the 
second time i'm
getting an error saying cant redeclare the class. How to make this class 
work within
a loop.

i'm attaching the files if u want to look inside.

any help is highly appreciated.

thanks,

/sagar 

HTML
HEAD
TITLE Welcome to SMS reminder . . . . .  /TITLE

/HEAD

BODY
?
$db=mysql_connect(localhost,root,terminator);
mysql_select_db(smsdb,$db);

$da=getdate();
$datestamp=$da[year]-$da[mon]-$da[mday];
$custime= date(H:i);
list($ahour, $amin) = explode(:,$custime);
$sql=select * from sms where taskdate='$datestamp' and hour(tasktime)='$ahour' and 
minute(tasktime)='$amin' and delivered !='Y';
$result=mysql_query($sql);
if($myrow=mysql_fetch_array($result))
{   
// Example script using jm_sms class

$email = [EMAIL PROTECTED];// MTNSMS login email address
$password = rascal;   // MTNSMS password
$number = +91 . $myrow[cellno]; // GSM phone number to send to
$signature = SAGAR SMS;   // Signature for text message
$message = $myrow[smstext];;  // Content of text message
$debug = FALSE; // Debugging messages not displayed

// Add additional accounts if required
// $jm_sms-addLogin( [EMAIL PROTECTED], password2 );
// $jm_sms-addLogin( [EMAIL PROTECTED], password3 );

include( class.jm_sms.php );
$jm_sms = new jm_sms( $email, $password, $debug );

// Add Proxy Server details if required
// $jm_sms-setProxyServer( proxyserver );
// $jm_sms-setProxyPort( 81 );
// $jm_sms-setProxyUser( proxyusername );
// $jm_sms-setProxyPass( proxypassword );
// $jm_sms-setProxy( TRUE );

$jm_sms-sendSMS( $number, $signature, $message );  


}

?
/BODY
/HTML


?

/*
jm_sms 0.7 21/09/01
Copyright (C) 2001 James McGlinn [EMAIL PROTECTED]
jm_sms is a class for sending GSM text messages via the
free web-based service at http://www.mtnsms.com/.
Updates can be found at http://james.mcglinn.org/jm_sms/.

This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
(See http://www.gnu.org/copyleft/gpl.html)

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

Changes:
0.7  21/09/01  Randomised login array for faster sending
  when over quota on first account.
  Speed optimisations in network code
   thanks to Mike Petrov ([EMAIL PROTECTED]).
0.6  06/06/01  Added check for incorrect login details.
0.5  31/05/01  Proxy support added
   thanks to Bas ([EMAIL PROTECTED]).
0.4  28/05/01  Provision for multiple mtnsms accounts.
   Bug fix for accounts defaulting to smsxtra.
0.3  27/04/01  New debug option outputs status data.
0.2  24/04/01  Re-attempts connection if server is busy.
0.1  23/04/01  Initial release.
*/
class jm_sms {

var $server;
var $cookies;
var $login;
var $curUrl;
var $debug = FALSE;
var $proxyServer;
var $proxyPort;
var $proxyUser;
var $proxyPass;
var $proxy = FALSE;

function getServer() { return $this-server; }
function setServer( $server ) { return $this-server = $server; }
function getCurUrl() { return $this-curUrl; }
function setCurUrl( $curUrl ) { return $this-curUrl = $curUrl; }
function getDebug() { return $this-debug; }
function setDebug( $debug ) { return $this-debug = $debug; }
function getProxyServer() { return $this-proxyServer; }
function setProxyServer( $proxyServer ) { return $this-proxyServer = 
$proxyServer; }
function getProxyPort() { return $this-proxyPort; }
function setProxyPort( $proxyPort ) { return $this-proxyPort = $proxyPort; }
function getProxyUser() { return $this-proxyUser; }
function setProxyUser( $proxyUser ) { return $this-proxyUser = $proxyUser; }
function getProxyPass() { return $this-proxyPass; }
function setProxyPass( $proxyPass ) { return $this-proxyPass = $proxyPass; }
function getProxy() { return $this-proxy; }
function setProxy( $proxy ) { return $this-proxy = $proxy; }

function jm_sms( $username, 

[PHP] cant redeclare class......

2001-10-20 Thread Sagar N Chand

Hi all,

I'm using jm_sms class in mysql 
dowhile($myrow=mysql_fetch_array($result)) loop.
the class is running fine for the first time. But when it is called for the 
second time i'm
getting an error saying cant redeclare the class. How to make this class 
work within
a loop.

i'm attaching the files if u want to look inside.

any help is highly appreciated.

thanks,

/sagar 

HTML
HEAD
TITLE Welcome to SMS reminder . . . . .  /TITLE

/HEAD

BODY
?
$db=mysql_connect(localhost,root,terminator);
mysql_select_db(smsdb,$db);

$da=getdate();
$datestamp=$da[year]-$da[mon]-$da[mday];
$custime= date(H:i);
list($ahour, $amin) = explode(:,$custime);
$sql=select * from sms where taskdate='$datestamp' and hour(tasktime)='$ahour' and 
minute(tasktime)='$amin' and delivered !='Y';
$result=mysql_query($sql);
if($myrow=mysql_fetch_array($result))
{   
// Example script using jm_sms class

$email = [EMAIL PROTECTED];// MTNSMS login email address
$password = rascal;   // MTNSMS password
$number = +91 . $myrow[cellno]; // GSM phone number to send to
$signature = SAGAR SMS;   // Signature for text message
$message = $myrow[smstext];;  // Content of text message
$debug = FALSE; // Debugging messages not displayed

// Add additional accounts if required
// $jm_sms-addLogin( [EMAIL PROTECTED], password2 );
// $jm_sms-addLogin( [EMAIL PROTECTED], password3 );

include( class.jm_sms.php );
$jm_sms = new jm_sms( $email, $password, $debug );

// Add Proxy Server details if required
// $jm_sms-setProxyServer( proxyserver );
// $jm_sms-setProxyPort( 81 );
// $jm_sms-setProxyUser( proxyusername );
// $jm_sms-setProxyPass( proxypassword );
// $jm_sms-setProxy( TRUE );

$jm_sms-sendSMS( $number, $signature, $message );  


}

?
/BODY
/HTML


?

/*
jm_sms 0.7 21/09/01
Copyright (C) 2001 James McGlinn [EMAIL PROTECTED]
jm_sms is a class for sending GSM text messages via the
free web-based service at http://www.mtnsms.com/.
Updates can be found at http://james.mcglinn.org/jm_sms/.

This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
(See http://www.gnu.org/copyleft/gpl.html)

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

Changes:
0.7  21/09/01  Randomised login array for faster sending
  when over quota on first account.
  Speed optimisations in network code
   thanks to Mike Petrov ([EMAIL PROTECTED]).
0.6  06/06/01  Added check for incorrect login details.
0.5  31/05/01  Proxy support added
   thanks to Bas ([EMAIL PROTECTED]).
0.4  28/05/01  Provision for multiple mtnsms accounts.
   Bug fix for accounts defaulting to smsxtra.
0.3  27/04/01  New debug option outputs status data.
0.2  24/04/01  Re-attempts connection if server is busy.
0.1  23/04/01  Initial release.
*/
class jm_sms {

var $server;
var $cookies;
var $login;
var $curUrl;
var $debug = FALSE;
var $proxyServer;
var $proxyPort;
var $proxyUser;
var $proxyPass;
var $proxy = FALSE;

function getServer() { return $this-server; }
function setServer( $server ) { return $this-server = $server; }
function getCurUrl() { return $this-curUrl; }
function setCurUrl( $curUrl ) { return $this-curUrl = $curUrl; }
function getDebug() { return $this-debug; }
function setDebug( $debug ) { return $this-debug = $debug; }
function getProxyServer() { return $this-proxyServer; }
function setProxyServer( $proxyServer ) { return $this-proxyServer = 
$proxyServer; }
function getProxyPort() { return $this-proxyPort; }
function setProxyPort( $proxyPort ) { return $this-proxyPort = $proxyPort; }
function getProxyUser() { return $this-proxyUser; }
function setProxyUser( $proxyUser ) { return $this-proxyUser = $proxyUser; }
function getProxyPass() { return $this-proxyPass; }
function setProxyPass( $proxyPass ) { return $this-proxyPass = $proxyPass; }
function getProxy() { return $this-proxy; }
function setProxy( $proxy ) { return $this-proxy = $proxy; }

function jm_sms( $username, 

[PHP] Re: cant redeclare class.....

2001-10-20 Thread Justin Garrett

Move include(class.jm_sms.php) outside of the loop.

--
Justin Garrett

Sagar [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Hi all,

 I'm using jm_sms class in mysql
 dowhile($myrow=mysql_fetch_array($result)) loop.
 the class is running fine for the first time. But when it is called for
the
 second time i'm
 getting an error saying cant redeclare the class. How to make this class
 work within
 a loop.

 i'm attaching the files if u want to look inside.

 any help is highly appreciated.

 thanks,

 /sagar



-- 
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] Using Logical OR operator in IF statement???

2001-10-20 Thread Brad Melendy

Hello,
Ok, this works:

if (substr($sString,(strlen($sString)-1)!=-)) {
print You can't have a dash at the end of your string.;
}

and this works:
if (substr($sString,0,1)!=-) {
print You can't have a dash at the beginning of your string.;
}

But, this doesn't work for any case:
if ((substr($sString,(strlen($sString)-1)!=-)) or
(substr($sString,0,1)!=-)) {
print you can't have a dash at the beginning or end of your string.;
}

What could be wrong?  I've used a logical OR operator in the middle of an IF
statement like this before, but for some reason, this just isn't working.
Anyone got any ideas?  I suppose I can just evaluate this with two different
IF statements, but it seems like I shoud be able to do it in one and reduce
duplicate code.  Thanks very much in advance.

.Brad




-- 
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/CGI problem: #!/path/php at top of CGI script appears in output

2001-10-20 Thread Philippe

Hi,
I'll synthetize the problem with the response I have givven to Curt. 

I've FreeBSD 4.2/Apache 1.3.9/PHP 4.0.6
I've installed PHP in Apache, it works very well
I need to have too PHP 4.0.6 in CGI mode (With Suexec but I don't think it's 
the problem) but I've a problem. 

In CGI mode, the path of PHP is always written at the top of the result 

I'll take for example this script which is in the cgi-bin with the execute 
mod (755), the extension is .cgi : 

 
#!/usr/local/bin/php
?
print Hello World;
?
  

When the file is called by the browser, the result is :
 
#!/usr/local/bin/php
Hello World
  

Does someone know the problem and the solution ?
Have I forgotten something ? 

I think that's a misconfiguration in PHP 

Thanks for your help 

Philippe 


-- 
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/CGI problem: #!/path/php at top of CGI script appears in output

2001-10-20 Thread Dave Goodrich

It's not you. I just built a bare cgi version of php, nothing but
'./configure' and got the same result.

I used this simple script to be sure I was in fact running the cgi binary
and it showed I was.

info.cgi
#!/usr/local/bin/php
?php
phpinfo();
?

I got the correct info page, but with the #!/usr/local/bin/php at the top
as you stated. Odd, but I've never used the cgi version so other than
confirming your problem I am afraid I'm no help.

DAve

On Sat, Oct 20, 2001 at 03:31:06PM +, Philippe wrote:
 Hi,
 I'll synthetize the problem with the response I have givven to Curt. 
 
 I've FreeBSD 4.2/Apache 1.3.9/PHP 4.0.6
 I've installed PHP in Apache, it works very well
 I need to have too PHP 4.0.6 in CGI mode (With Suexec but I don't think it's 
 
 the problem) but I've a problem. 
 
 In CGI mode, the path of PHP is always written at the top of the result 
 
 I'll take for example this script which is in the cgi-bin with the execute 
 mod (755), the extension is .cgi : 
 
 
 #!/usr/local/bin/php
 ?
 print Hello World;
 ?
  
 
 When the file is called by the browser, the result is :
 
 #!/usr/local/bin/php
 Hello World
  
 
 Does someone know the problem and the solution ?
 Have I forgotten something ? 
 
 I think that's a misconfiguration in PHP 
 
 Thanks for your help 
 
 Philippe 
 
 
 -- 
 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]
 

-- 
My other computer is your Windows machine...



-- 
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: [PHP-INST] Re: [PHP] PHP/CGI problem: #!/path/php at top of CGI script appears in output

2001-10-20 Thread Stefan Siefert

Hi @all..

I'm not sure if this can fix (or explain) your problem (cause I didn't tried
it in lack of time) but theoretical it could be :).

I think you only need the #!/usr/local/bin/php if you would like to run
scripts from the bash, or as a real cgi. But I think, there could be
another solution .. compile your php as cgi like you did and add these lines
in your httpd.conf

ScriptAlias /php/ /usr/local/bin/

AddType application/x-httpd-php .php .phtml .cgi

Action application/x-httpd-php /php/php

This should also launch the cgi - version of php, but doesn't requires the
#! line in the scripts. I'm not sure, but it should work.

Hope this helps you,

Stefan Siefert



- Original Message -
From: Dave Goodrich [EMAIL PROTECTED]
To: Philippe [EMAIL PROTECTED]
Cc: php-general [EMAIL PROTECTED]; php-install
[EMAIL PROTECTED]
Sent: Saturday, October 20, 2001 6:05 PM
Subject: [PHP-INST] Re: [PHP] PHP/CGI problem: #!/path/php at top of CGI
script appears in output


 It's not you. I just built a bare cgi version of php, nothing but
 './configure' and got the same result.

 I used this simple script to be sure I was in fact running the cgi binary
 and it showed I was.

 info.cgi
 #!/usr/local/bin/php
 ?php
 phpinfo();
 ?

 I got the correct info page, but with the #!/usr/local/bin/php at the top
 as you stated. Odd, but I've never used the cgi version so other than
 confirming your problem I am afraid I'm no help.

 DAve

 On Sat, Oct 20, 2001 at 03:31:06PM +, Philippe wrote:
  Hi,
  I'll synthetize the problem with the response I have givven to Curt.
 
  I've FreeBSD 4.2/Apache 1.3.9/PHP 4.0.6
  I've installed PHP in Apache, it works very well
  I need to have too PHP 4.0.6 in CGI mode (With Suexec but I don't think
it's
 
  the problem) but I've a problem.
 
  In CGI mode, the path of PHP is always written at the top of the result
 
  I'll take for example this script which is in the cgi-bin with the
execute
  mod (755), the extension is .cgi :
 
  
  #!/usr/local/bin/php
  ?
  print Hello World;
  ?
  
 
  When the file is called by the browser, the result is :
  
  #!/usr/local/bin/php
  Hello World
  
 
  Does someone know the problem and the solution ?
  Have I forgotten something ?
 
  I think that's a misconfiguration in PHP
 
  Thanks for your help
 
  Philippe
 
 
  --
  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]
 

 --
 My other computer is your Windows machine...



 --
 PHP Install 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] Upgrade problems php3 - php4

2001-10-20 Thread sgibbs

Our ISP is trying to upgrade php and mysql versions on our website.  The
current site works fine using MySQL 3.22.20a and PHP3.

We are able to upload, modify and create new database records with no
problem using webforms to enter test and html.


Now that we are trying to upgrade to MySQL 3.23.36 and PHP4, the uploads,
modifying and creating of new records with text and html no longer works.

Originally, the ISP thought apostrophes were the cause of the new problem
-they tried to adjust for that but it hasn't helped.

Are there any obvious changes in versions that would cause a problem?  I'm
not sure I've provided enough info to help you help me - I can provide some
of the code if there isn't an obvious change that I just don't know about.

Thank you!

Shawna

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