Re: [PHP] RE: why does it not work (fwd)

2001-05-22 Thread Adrian D'Costa

On 22 May 2001, Chris Searle wrote:

  Adrian == Adrian D'Costa [EMAIL PROTECTED] writes:
 
 Adrian // sql statement $searchStmt = select special.contid,
 Adrian special.cityid, special.curr1, special.catalogo,
 Adrian special.hf, special.curr2, special.vitofferta, special.fh,
 Adrian special.club, special.stars, city.city,RAND as r from
 Adrian special,city where DATE_SUB(special.periodo, INTERVAL 3
 Adrian DAY) '$tdate' and city.id=special.cityid order by r limit
 Adrian 1 ;
 
 So far as I know - the RAND function was introduced in 3.23 - at least
 the order by RAND functionality.
 
 From the docs:
 
 In MySQL Version 3.23, you can, however, do: SELECT * FROM table_name
 ORDER BY RAND()

If I cut and past this in the online mysql it works.  It display the
records randomly, why not in php?

Adrian


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

2001-05-22 Thread Dennis Gearon

Is a '.' inside of a [] a literal '.', or a 'any character'
metacharacter?
-- 
-
Look lovingly upon the present,
for it holds the only things that are forever true.
-
Sincerely, Dennis Gearon (Kegley)

-- 
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] Encrypt Password for Session

2001-05-22 Thread Joseph Blythe


Troy Moreland wrote:

 If I can't decrypt it, then I can't pass that password for the
 user.  How do I keep passing the password then w/o having to write it to the
 session.  Is that the right way to do it??

I don't know if this is the right way but what I would do is have a 
login page that does the md5 databse lookup, if it is successful writes 
the users name to a variable to the current session, maybe $verified_user

Now every page tests for $verified_user you will know if they have 
logged in correctly, This approach seems to work very well for me, I 
don't know if there are any major security holes though?

example:

if ( isset($verified_user) ) {
$user = $verified_user;
} else {
$user = nobody;
}

Hope this helps, it is pretty simple really.

Regards

Joseph



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

2001-05-22 Thread Jean-Arthur Silve

Hi !

We have a site which send mails to customers regulary.

My problem is that when some mails are returned (bacause addresses are not 
available or mailboxes are full etc..)
they are returned to the server administrator and not to the sender of the 
message.

When I send a mail, I use the PHP mail function .
In the header I put From: [EMAIL PROTECTED]\n\n

The From is ok because when someone receive the message, it is From the 
address I put.

May be is there another field to put in the header for the refused messages 
are returned to the sender I want ?

Thank you for your help

jean-arthur


EuroVox
4, place Félix Eboue
75583 Paris Cedex 12
Tel : 01 44 67 05 05
Fax : 01 44 67 05 19
Web : http://www.eurovox.fr



--
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] All of a sudden I get Warning: Bad arguments to implode() in busca_01.php on line 133

2001-05-22 Thread Martin Cabrera Diaubalick

Hello Everyone!

This is my code


if (count($array_id)==1)
{
 $string_id=$array_id;
}
else
{
 $string_id= implode(:,$array_id);
}


I've been testing it for three days and never had an error, now it comes and
goes. Do you know what could be wrong?

$array_id is an array of integers

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

2001-05-22 Thread Zak Greant

Ensure that the user that PHP is running as has permissions to read the
file.

--zak

- Original Message -
From: Jon A [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, May 21, 2001 10:36 AM
Subject: [PHP] ftp_put


 Hi, all.

 I try to do a file upload using the ftp_put function, where the source
file
 is a string from a browse field
 When I try to do the upload php says that there is an error opening the
 local file.

 Does any of you know how to solve this problem?

 thanks in advance, Jon A


 --
 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] All of a sudden I get Warning: Bad arguments to implode() in busca_01.php on line 133

2001-05-22 Thread Zak Greant

Sounds like you are trying to implode a non-existant array.

Change your code to handle an empty or missing array.

ie.



- Original Message -
From: Martin Cabrera Diaubalick [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, May 22, 2001 2:41 AM
Subject: [PHP] All of a sudden I get Warning: Bad arguments to implode() in
busca_01.php on line 133


 Hello Everyone!

 This is my code

 
 if (count($array_id)==1)
 {
  $string_id=$array_id;
 }
 else
 {
  $string_id= implode(:,$array_id);
 }
 

 I've been testing it for three days and never had an error, now it comes
and
 goes. Do you know what could be wrong?

 $array_id is an array of integers

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



-- 
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] All of a sudden I get Warning: Bad arguments to implode() in busca_01.php on line 133

2001-05-22 Thread Zak Greant

 ie.

Oops! Hit the right keys at the wrong time! :)

if (! count ($array_id))
{
echo '$array_id is empty or not set.';
}
else if (1 == count($array_id))
{
 $string_id=$array_id;
}
else
{
 $string_id= implode(:,$array_id);
}

--zak


-- 
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] Recompiling PHP with MySQL

2001-05-22 Thread Chris Lee

Jason,

Sorry for newbie question, how I compile MySQL from SRPM?
I know how to compile from source tar bar but not form SRPM.

Simple step to show how would be nice.

Thanks in advance.

Regards,
Chris Lee

On 21 May 2001 16:43:48 -0700, [EMAIL PROTECTED] (Jason
Murray) wrote:

 All were installed using Red Hat RPMs.  (Is this where I 
 screwed up from the start?)

Not neccessarily.

You might be able to find a PHP RPM with MySQL enabled, or download 
the source RPM (SRPM), edit the specfile and turn on the options you
need (you can then rebuild the RPM so you can reinstall if needed).

That said, I do find it kinda easy to compile PHP from the source 
code these days, and I'm no *nix guru.

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]




[PHP] Class and extends pb/bug? with php404pl1

2001-05-22 Thread Hugues BRUNEL


I use PHP 4.0.4pl1 and I don't understand why this doesn't work.
Does somebody help me ?

class a {
  var $foo1 ;

  function a($thefoo) {
$this-$foo1 = $thefoo ;
echo a::foo1=.$this-$foo1.\n ;
  }
}

class b extends a {
  var $foo2 ;

  function b($thefoo1, $thefoo2) {
$this-a($thefoo1) ;
$this-$foo2 = $thefoo2 ;

echo b::foo1=.$this-$foo1.\n ;
echo b::foo2=.$this-$foo2.\n ;
  }
}

$toto = new b(1,3) ;
echo FOO1=.$toto-$foo1.\n ;
echo FOO2=.$toto-$foo2.\n ;

The result is:
a::foo1=1
b::foo1=3 - (and not 1) ???
b::foo2=3
FOO1=3- (and not 1) ???
FOO2=3

Many thanks for any information (perhaps I'm very tired and I understand nothing??)

 Hugues.

-- 
Synaptique Europe
www.synaptique.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 URL Question - omitting index.php

2001-05-22 Thread Tomaz Kovacic

Microsoft's PWS and PHP executable as CGI. I beleave.

 I've had problems with porting php scripts from Linux/Apache/mod_php to
Windows/PWS/php as CGI in the past becourse PWS failed to serve pages with
short URLs like directory/?arg1=xarg2=y

Tomaz
- Original Message -
From: colin olkowski [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, May 21, 2001 10:01 PM
Subject: [PHP] PHP  URL Question - omitting index.php


 Quick question on passing arguments via URL.

 Does anyone know if any browsers have a hard time dealing with something
 like the following?

 http://www.blahbalh.com/directory/?arg1=arg1arg2=arg2

 In this case the directory would have an index.php file that would react
 based on the query string, but as you can see I'm not including the
 index.php in the link.

 Is this o.k. or will some browsers get confused?

 thanks in advance

 colin olkowski


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

2001-05-22 Thread Tarrant Costelloe

I seem unable to view my localhost by typing http://localhost; in my opera
client. It comes up with the error message, The server requested a login
authentication method which is not supported.

Anyone know a way about this?

Thanks in advance!

Tarrant Costelloe

-- 
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 Delphi code with PHP

2001-05-22 Thread Gilles Koffmann

Hi,

I'm trying to use some Delphi code with PHP without using COM (objective is
to port it to linux).
The first clue I have is that I have to create a DLL/so with a get_module()
function entry.

Does any documentation exists describing the process of creating your own
dll for use with PHP.

Thank's in advance for any clue

Gilles




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

2001-05-22 Thread Maxim Maletsky

nope, it works for me.
not Opera's fault.


Sincerely, 

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



-Original Message-
From: Tarrant Costelloe [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, May 22, 2001 6:18 PM
To: Php (E-mail)
Subject: [PHP] Opera  Localhost


I seem unable to view my localhost by typing http://localhost; in my opera
client. It comes up with the error message, The server requested a login
authentication method which is not supported.

Anyone know a way about this?

Thanks in advance!

Tarrant Costelloe

-- 
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] Class and extends pb/bug? with php404pl1

2001-05-22 Thread Maxim Maletsky

use $this-foo1

no double dollar signs. Otherwise PHP thinks you are trying to do variable
variables thing.

Sincerely, 

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



-Original Message-
From: Hugues BRUNEL [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, May 22, 2001 6:55 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Class and extends pb/bug? with php404pl1



I use PHP 4.0.4pl1 and I don't understand why this doesn't work.
Does somebody help me ?

class a {
  var $foo1 ;

  function a($thefoo) {
$this-$foo1 = $thefoo ;
echo a::foo1=.$this-$foo1.\n ;
  }
}

class b extends a {
  var $foo2 ;

  function b($thefoo1, $thefoo2) {
$this-a($thefoo1) ;
$this-$foo2 = $thefoo2 ;

echo b::foo1=.$this-$foo1.\n ;
echo b::foo2=.$this-$foo2.\n ;
  }
}

$toto = new b(1,3) ;
echo FOO1=.$toto-$foo1.\n ;
echo FOO2=.$toto-$foo2.\n ;

The result is:
a::foo1=1
b::foo1=3 - (and not 1) ???
b::foo2=3
FOO1=3- (and not 1) ???
FOO2=3

Many thanks for any information (perhaps I'm very tired and I understand
nothing??)

 Hugues.

-- 
Synaptique Europe
www.synaptique.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] All of a sudden I get Warning: Bad arguments to implode() in busca_01.php on line 133

2001-05-22 Thread Maxim Maletsky

Try:


if (!is_array($array_id))
{
 $string_id=$array_id;
}
else
{
 $string_id= implode(:,$array_id);
}


You have to always make sure, you are passing Array into an implode() or
explode().

BTW: your code would look cooler like this: 

$string_id = is_array($array_id) ? implode(:,$array_id) : $array_id;



Sincerely, 

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



-Original Message-
From: Martin Cabrera Diaubalick [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, May 22, 2001 5:41 PM
To: [EMAIL PROTECTED]
Subject: [PHP] All of a sudden I get Warning: Bad arguments to implode()
in busca_01.php on line 133


Hello Everyone!

This is my code


if (count($array_id)==1)
{
 $string_id=$array_id;
}
else
{
 $string_id= implode(:,$array_id);
}


I've been testing it for three days and never had an error, now it comes and
goes. Do you know what could be wrong?

$array_id is an array of integers

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

-- 
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] Problems with php 4.0.5 with iplanet 4

2001-05-22 Thread Felix Garcia Renedo

Hello,
I was able to install php 4.0.2 with Netscape iplanet 4 and it worked.
Now I'm trying to install php 4.0.5 with Netscape iplanet 4 and it
doesn't work.
When I start the netscape server it says:
conf_init: Error running init function load-modules: dlopen of
/opt/netscape/iplanet4/bin/libphp4.so failed (ld.so.1: ns-httpd: fatal:
relocati
on error: file /opt/netscape/iplanet4/bin/libphp4.so: symbol elf_version:
referenced symbol not found)

What's the problem?

Thanks

Félix García Renedo
  mailto:[EMAIL PROTECTED]
  mailto:[EMAIL PROTECTED]
  Tfn: 983-423000 Ext. 26520
  Fax: 983-423271
Centro de Telecomunicaciones e Informatica
Universidad de Valladolid
España



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

2001-05-22 Thread Maxim Maletsky

You gonna need to add 

Return-Path: [EMAIL PROTECTED]\n;

into your message header.

Sincerely, 

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



-Original Message-
From: Jean-Arthur Silve [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, May 22, 2001 5:27 PM
To: [EMAIL PROTECTED]
Subject: [PHP] returned eMails


Hi !

We have a site which send mails to customers regulary.

My problem is that when some mails are returned (bacause addresses are not 
available or mailboxes are full etc..)
they are returned to the server administrator and not to the sender of the 
message.

When I send a mail, I use the PHP mail function .
In the header I put From: [EMAIL PROTECTED]\n\n

The From is ok because when someone receive the message, it is From the 
address I put.

May be is there another field to put in the header for the refused messages 
are returned to the sender I want ?

Thank you for your help

jean-arthur


EuroVox
4, place Félix Eboue
75583 Paris Cedex 12
Tel : 01 44 67 05 05
Fax : 01 44 67 05 19
Web : http://www.eurovox.fr



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

2001-05-22 Thread Vanessa

Hi there,

I am trying to upload a picture via ftp_put, but I keep getting the error 
message:

Warning: ftp_put: url/image.jpg: No such file or directory. in 
/web/www/www.domain.com/upload.php on line xxx

Does that mean I can only use the php locally where the file is?
The php file is on one server and I am trying to upload a local file to 
another server.

The normal copy function caused problems since it saves the files as 
user=nobody and i had problems with the
directory modes. I thought the ftp functions were a good alternative. Am I 
wrong?

I am not sure as what exactly has to be inserted into localfile and 
remotefile in the ftp_put function either.

Any suggestions are welcome!!!

Thx, Nessi *confused*


[PHP] Max execution time for exec()?

2001-05-22 Thread Charles Williams \(CEO\)

Haven't seen anything to support this but it seems to me that exec() and
such has maximum execution times.  Can anyone verify this?

chuck



-- 
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] using Delphi code with PHP

2001-05-22 Thread John Lim

See http://zend.com/zend/api.php
Bye john

Gilles Koffmann [EMAIL PROTECTED] wrote in message
9edaso$ro7$[EMAIL PROTECTED]">news:9edaso$ro7$[EMAIL PROTECTED]...
 Hi,

 I'm trying to use some Delphi code with PHP without using COM (objective
is
 to port it to linux).
 The first clue I have is that I have to create a DLL/so with a
get_module()
 function entry.

 Does any documentation exists describing the process of creating your own
 dll for use with PHP.

 Thank's in advance for any clue

 Gilles





-- 
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] Recompiling PHP with MySQL

2001-05-22 Thread Pavel Jartsev

Chris Lee wrote:
 
 Jason,
 
 Sorry for newbie question, how I compile MySQL from SRPM?
 I know how to compile from source tar bar but not form SRPM.
 
 Simple step to show how would be nice.
 

rpm --rebuild some.src.rpm
And compiled binaries will be under /usr/src/RPM/RPMS/.
(Talking about Mandrake).

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




Re: [PHP] Max execution time for exec()?

2001-05-22 Thread George E. Papadakis

Php has max exec time limit. If you increase that limit you wont face any
problems with the functions/calls made by php including exec or system.

:: set_time_limit (secs)

 Haven't seen anything to support this but it seems to me that exec() and
 such has maximum execution times.  Can anyone verify this?

 chuck



 --
 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] What's wrong with this code?

2001-05-22 Thread Plutarck

Ahh, so you can use \\n within the regex itself...I was thinking that what
was capture in the regex itself wasn't available until the replace part.
Obviously that's not true ;)


Thanks alot, everyone! One problem down, all the other one's to go :)


Plutarck

Christian Reiniger [EMAIL PROTECTED] wrote in message
01052206314400.00595@chrisbig">news:01052206314400.00595@chrisbig...
On Tuesday 22 May 2001 05:06, Plutarck wrote:

 And now one more bit. For instance to kill an onclick event I use:

  $file = preg_replace(#(.*)onclick=\.*\(.*)#isU, \\1\\2,
 $file);

 Which works, kinda. Problem is, consider this:

 onclick='somecode()'

 It's not caught, because it only catches double quotes. How best can I
 say I want code which is between single quotes, or between double
 quotes, without it choking on something like:
 onclick='somecode(thisiswhereitwouldstop)'?

#(.*)onclick=(\|').*\\2(.*)#

A simple or combined with a backreference. And don't forget to adjust
your replacement string..

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




-- 
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] best way to flush stdout?

2001-05-22 Thread Plutarck

For almost every browser there is, no data inside a table will be
displayed until the browser get's the matching /table, so that's one thing
to remember.

flush() requests that any buffered data be sent to the client, but most
browsers have their own internal buffer.

So in other words, you can't. ;)


Plutarck

Phil Glatz [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 I have a page that displays a few lines, then runs a database query that
 takes five or six seconds. I'd like to flush stdout and display the first
 text while the query is running, so the user doesn't think the site is
 down.  What's the best way to accomplish this?  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 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] Class and extends pb/bug? with php404pl1

2001-05-22 Thread Christian Reiniger

On Tuesday 22 May 2001 11:54, Hugues BRUNEL wrote:

 echo b::foo1=.$this-$foo1.\n ;
 echo b::foo2=.$this-$foo2.\n ;

You're accessing the fields incorrectly. It's $this-foo1 (without the 
second '$').

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

CPU not found. retry, abort, ignore?

--
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] sessions without trans_id

2001-05-22 Thread Dalyyla

hi,

I have pbs with sessions. I would like to know first how to do , (enable
or
disable) about sessions in the php.ini file while I don't want to use
cookies
on the client at all.
I suppose I must put the id myself in each page. About this pint, I'd
like
to check something : if in my application I don't use the trans_id and
put
id in url's manually then if i publish my application on a server where
trans_id is enabled. What would happen ? He would put it anyway ?

Thanks
Dalyyla





-- 
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] unset()- newbie question

2001-05-22 Thread Chris Sano

?

$array[ 'test' ] = chris;
echo before  . $array[ 'test' ] . br;

unset( $array[ 'test' ] );
echo after  . $array[ 'test' ];

?

returns:
before chris
after

hence, the unset function works fine for me. what version of php are you
running?


Tom [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 I can't seem to get unset() to work when I'm strying to delete an
 element from an array.

 I have a select list that is populated by an array, and i need to
 be able to delete items from the list by deleting them from the
 array, but I don't know how.

 I tried using unset($array['element']); but it doesn't work.
 Does anyone know why?
 Does anyone know of a way to use array_diff() to delete elements
 from an array?

 Thanks,
 Tom







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

2001-05-22 Thread Internaut

Hello

Please could anyone tell me which part of the ini file I need to modify to
allow me to pass variables from one form to another.

Regards
Internaut



-- 
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] what's the diff between if($var1) and if(isset($var1)) and if(!empty($var1))???

2001-05-22 Thread Rasmus Lerdorf

if($var1) is true if $var1 is set and has a non-0 and non-false value

if(isset($var1)) is true if $var1 is set to any value including 0 or false

if(!empty($var1)) is true if $var1 is set to anything except a null-string


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

2001-05-22 Thread Matt Schroebel


 What is the best way to delete an element from an array?
 I tried using unset(), and it didn't work.

unset works with arrary elements, but it must be a global variable and not passed in.  
Try the code below to see the results.

?php
// deletes an element of global array
function deleteGlobal() {
global $animals;
echo brin deleteGlobal()-Spotbr\n;
unset ($animals[Spot]);
foreach ($animals as $key = $value) {
echo $key: $valuebr\n;
}
}
// deletes an element in local array only
function deleteElement($annArr) {
echo brin deleteElement()-Felixbr\n;
unset ($annArr[Felix]);
foreach ($annArr as $key = $value) {
echo $key: $valuebr\n;
}
}
// 
$animals = array(Kitty=cat, Max=dog, Spot=Dog, 
Felix=cat,Morris=cat);
echo Initial arraybr\n;
foreach ($animals as $key = $value) {
echo $key: $valuebr\n;
}
deleteGlobal();
echo brafter deleteGlobal()br\n;
foreach ($animals as $key = $value) {
echo $key: $valuebr\n;
}
deleteElement($animals);
echo brafter deleteElement()br\n;
foreach ($animals as $key = $value) {
echo $key: $valuebr\n;
}
echo brAfter unset()-Morrisbr\n;
unset ($animals[Morris]);
foreach ($animals as $key = $value) {
echo $key: $valuebr\n;
}
?

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




FW: [PHP] Running two scripts from HTML

2001-05-22 Thread Valter Santos



Hi!

use script1.php only to call the two scripts, let's say,
script2.php and script3.php... 

script1.php should pass the arguments to the other scripts...

other way to go is to merge the two scripts in one...
and run the code sequencially...


Valter Santos
WEB/WAP Consultant

Email : [EMAIL PROTECTED]
Mobile: +351 93 9650075

WeDo Consulting - http://www.wedo.pt



 -Original Message-
 From: Luis E. Suarez [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, May 22, 2001 2:07 PM
 To: [EMAIL PROTECTED]
 Subject: [PHP] Running two scripts from HTML
 
 
 On an HTML page, I need to be able to do call two scripts from a 
 submit link
 or button.
 
 So, I have a link like this:
 
 a href=http://www.mysite.com/script1.php?data=1;Click here/a
 
 Simultaneously at the click of the link I need to run a second script.
 What's the best approach?
 
 
 
 -- 
 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]




FW: [PHP] $B%8%c%9%H%$%s!L(B010522$B9f!M(B

2001-05-22 Thread Valter Santos


yeahh!

I like it too :)


Valter Santos
WEB/WAP Consultant

Email : [EMAIL PROTECTED]
Mobile: +351 93 9650075

WeDo Consulting - http://www.wedo.pt



 -Original Message-
 From: Infomation Service [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, May 22, 2001 2:45 AM
 To: [EMAIL PROTECTED]
 Subject: [PHP] $B%8%c%9%H%$%s!L(B010522$B9f!M(B


 
 Just in MAIL$B!Z>?=P4jCf![(B
 $B(6(,(,(,(,(,(,(,(,(,(,(,(,(,(,(,(,(,(,(,(,(,(,(B
2001/05/22$B!J2P!K(B $B(,(6(B
 $B!z!z(BJUST IN MAIL$B9-9p%Z!<%8!z!z(B
 $B!!!ZFCA*>pJs![(B
 
 ___

 $B!z%l%s%?%k%*%U%#%9%*!<%W%s!&9b@_Hw!"7c0B2HDB(B
  

Re: [PHP] array sort

2001-05-22 Thread Markus Fischer

On Mon, May 21, 2001 at 06:05:49PM -0700, Alex Black wrote : 
  Use 'uasort()':
  
  function my_hash_sort( $a, $b) {
  $a = $a['num'];
  $b = $b['num'];
  if( $a == $b) return 0;
  return ( $a  $b) ? -1 : 1;
  }
  
  uasort( $test, 'my_hash_sort');
 
 hoping this wouldn't be the answer, thanks :)
 
 another for you:
 
 I've now coded my function, and the ordering works fine.
 
 except I'm inside a class and would really rather not include some strange
 little file with a single function in it. kludgemy code here/kludge
 
 on a whim, I tried 
 uasort($this-modules[$group], '$this-_ary_sort()');
 
 with no luck :)
 
 ideas?

sure :)

use

uasort( $this-modules[ $group], array( $this, '_ary_sort'))'

You could also write '$this' instead of '$this' and it would
work but would unneccessarily create a new copy of the object.

- Markus

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

2001-05-22 Thread Fai

Set  register_globals = On. But actually, you can use $HTTP_*_VARS[] to get
the values from the form. * represent: GET, POST or COOKIE

 Please could anyone tell me which part of the ini file I need to modify to
 allow me to pass variables from one form to another.

 Regards
 Internaut



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

2001-05-22 Thread Jon Haworth

form
input name=foo tabindex=1
input name=bar tabindex=2
/form

HTH
Jon


-Original Message-
From: Tarrant Costelloe [mailto:[EMAIL PROTECTED]]
Sent: 22 May 2001 16:14
To: Php (E-mail)
Subject: [PHP] Tab ordereing


What's the syntax for defining the tab order on a input box?


**
'The information included in this Email is of a confidential nature and is 
intended only for the addressee. If you are not the intended addressee, 
any disclosure, copying or distribution by you is prohibited and may be 
unlawful. Disclosure to any party other than the addressee, whether 
inadvertent or otherwise is not intended to waive privilege or confidentiality'

**

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

2001-05-22 Thread Plutarck

The order is the order they are written in the html code.

I'm not aware of any way to make it otherwise...


Plutarck

Tarrant Costelloe [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 What's the syntax for defining the tab order on a input box?


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

2001-05-22 Thread Plutarck

...and obviously I'm wrong ;)


Plutarck

Plutarck [EMAIL PROTECTED] wrote in message
9ee0bh$k0g$[EMAIL PROTECTED]">news:9ee0bh$k0g$[EMAIL PROTECTED]...
 The order is the order they are written in the html code.

 I'm not aware of any way to make it otherwise...


 Plutarck

 Tarrant Costelloe [EMAIL PROTECTED] wrote in message
 [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
  What's the syntax for defining the tab order on a input box?
 
 
  --
  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] Tab ordereing

2001-05-22 Thread Kurth Bemis

i believe that the attrib is taborder=3  bewarethat its not 4.0 standard 
tho.if i find a good resource then i'll send ti along to the list

 The order is the order they are written in the html code.
 
 I'm not aware of any way to make it otherwise...
 
 
 Plutarck
 
 Tarrant Costelloe [EMAIL PROTECTED] wrote in message
 [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 What's the syntax for defining the tab order on a input box?


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


-- 
This is my test sig


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

2001-05-22 Thread AJDIN BRANDIC

Hi

I am building a web server.  I installed RH6.2 and Apache was installed
with it (as binary I guess). I have also installed MySQL (server/client)
from binary RPM.  I want to install PHP4 source now.  Is there any way I
could install it without compiling Apache source version or do I need to 
get Apache
source and compile(make/make install) the two apps (Apache/PHP4)?  I 
guess MySQL can stay as it is. 


Regards

Ajdin

-- 
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 the session ID of php4 made like a session cookie?

2001-05-22 Thread Yasuo Ohgaki

Hello,

Just set

session.cookie_lifetime = 0

if you are using cookie session.
If you are using url session, it is not possible.

 wrote:

  Is it possible to erase at the same time the session data of php4 closes a 
browser?
 
  Please teach a method,
  when a browser is closed and session data can be canceled.
 
  - now Environment
  OS RedHatLinux6.2
  php 4.0.5
  At php.ini, it is session.cookie_lifetime = 0.; session.cache_limiter = 
nocache ;
 
  // Ichirou.Tanaka.


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




[PHP] Querying mysql.log

2001-05-22 Thread Jochen Kaechelin

Is there a script to analyse the mysql.log files to
do some statistics, or would it be better to
store needed informationen in a MySQL-Database
using sessions?



-- 
phpArbeitsgruppe in Gruendung - Jochen Kaechelin
Stuttgarter Str.3, D-73033 Goeppingen
Tel. 07161-92 95 94, Fax 07161-92 95 98
http://www.php-arbeitsgruppe.de, mailto:[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] session and back button

2001-05-22 Thread kaab kaoutar

Hi!
I'm using sessions and if the user hits the back button an expiration page 
appears! how can i disable the back button ?
i tried window.history.forward(1) but it fails !
Thanks
_
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.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] what's the diff between if($var1) and if(isset($var1)) and if(!empty($var1))???

2001-05-22 Thread Phil Driscoll

On Tuesday 22 May 2001 08:30, Rasmus Lerdorf wrote:

 if(!empty($var1)) is true if $var1 is set to anything except a null-string

I think this should be

if(!empty($var1)) is true if $var1 is set to anything except a null string, 0 
or the string '0'

It would be great, unless I've missed the point somewhere along the line, if 
empty treated '0' (string) as not empty, then the function could be used for 
checking user input where the string '0' is perfectly valid. In thousands of 
lines of PHP code I haven't been able to use empty() once - I always end up 
going
 if(isset($var)  strcmp($var,''))...

Just a dream :)
-- 
Phil Driscoll

-- 
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] session and back button

2001-05-22 Thread Boget, Chris

 I'm using sessions and if the user hits the back button an 
 expiration page appears! how can i disable the back button ?
 i tried window.history.forward(1) but it fails !

Even more interesting is that when a user presses the back 
button all the way back to the page that initially started the
session, a new session is started.  As such, all information
previously stored will be lost.
What I did to fix my problem (and I think it'll fix yours) is
that I start the session on a page the user cannot go back
to.  To do that, the only code in the file is:

?

  session_start();

  header( location: /home_page.php );
  exit();

?

Chris



[PHP] .htaccess for PHP

2001-05-22 Thread Trent Reimer

I heard that you can modify PHP settings with the .htaccess file for Apache.
How would this look if I wanted to adjust max_execution_time to a shorter
span, or to turn safe_mode on or off?



-- 
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] session_unset() and session_destroy()

2001-05-22 Thread Arcady Genkin

I don't think that I grasp the difference between session_unset() and
session_destroy() functions.  Would anyone explain?

Also, suppose that I want to totally wipe out an existing session, and
then start a new one.  Can I still do session_register() after I do
session_unset() or session_destroy() or both?

Many thanks,
-- 
Arcady Genkin

-- 
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 getting oracle to work with php4

2001-05-22 Thread louigi600

got php to work with mysql  but when I try to compile in oracle support 
something goes bad.
.configure, make  make install semm to go fine 
but when I restart apache I get an error:
Shutting down http: [OK]
Starting httpd: Syntax error on line 872 of /etc/httpd/conf/httpd.conf:
Cannot load /etc/httpd/lib/apache/libphp4.so into server: libclntsh.so.1.0: 
cannot open shared object file: No such file or directory
[FAILED]

what am I doing wrong ?

Can somebody help me please ?

-
Questo messaggio è stato inviato utilizzando http://it.my.gsmbox.com 

 output.zip

-- 
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: mailing list php-general@lists.php.netµÄ×Ô¶¯»ØÐÅ

2001-05-22 Thread kaab kaoutar

what ?


From: [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: mailing list [EMAIL PROTECTED]µÄ×Ô¶¯»ØÐÅ
Date: 22 May 2001 17:24:30 -

ºÜ¸ßÐËÊÕµ½ÄãµÄÓʼþ£¡


===
Ãâ·Ñµç×ÓÓÊÏä http://home.sina.com.cn

_
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.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] Is this a typo or what?

2001-05-22 Thread Henrik Hansen

Floyd Baker [EMAIL PROTECTED] wrote:

  
  I removed one of the two above the bottom 'return rettext'.   
  

There are sure something with that script, at least I found out there
is a } too much, maybe you removed one too many, can i see the
original script? I would also advise you to try and ident the script
correctly which makes it like 100% easier to read.

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




[PHP] image upload - determining image resolution in pixels ?

2001-05-22 Thread Nicolas Mermet

Hi,
I was wondering if there is a way to analize an uploaded jpeg file in
order to extract its resolution in pixels.
Would that be also possible with a quicktime movie ?
thanks,
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] Regular Expression Help

2001-05-22 Thread Jason Caldwell

I'm trying to figure out how to say with a Regular Expression how to check
for the following characters in a phone number:

( ) -

with a length between 1 and 20 --

I've tried the following and it doesn't seem to work.

eregi(^([0-9]|\\(|\\)|\\-){1,20}$)

I'm not interested in checking for a completely valid phone number... but
instead checking to see if the phone number is numbers with or without the
( ) - characters. Plus, I think creating a Regex expr that can check for US
and International formats would be too complex.

Thanks.
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] .htaccess for PHP

2001-05-22 Thread Matt Schroebel

php_value safe_mode 1 
php_value max_execution_time 15

You need to also set the AllowOverride option in apache so that apache looks into the 
.htaccess file.
http://httpd.apache.org/docs/misc/FAQ.html#htaccess-work 

 I heard that you can modify PHP settings with the .htaccess 
 file for Apache.
 How would this look if I wanted to adjust 
 max_execution_time to a shorter
 span, or to turn safe_mode on or off?

-- 
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] image upload - determining image resolution in pixels ?

2001-05-22 Thread Chris Lee

open the file with gd and use imagesx() and imagesy()

?php
$img = imagecreatefromjpeg($file_name)
$x = imagesx($img);
$y = imagesy($img);
?

gd does not handel quicktime, only jpeg, gif (older, dont go there), png,
tiff I think thts it. I havent checked. but never the less, images, not
movies.

--

  Chris Lee
  [EMAIL PROTECTED]


Nicolas Mermet [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Hi,
 I was wondering if there is a way to analize an uploaded jpeg file in
 order to extract its resolution in pixels.
 Would that be also possible with a quicktime movie ?
 thanks,
 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] array sort

2001-05-22 Thread Alex Black

 on a whim, I tried
   uasort($this-modules[$group], '$this-_ary_sort()');

hi all,

for those of you interested:

uasort($this-modules[$group], array($this,'_ary_sort'));

note the $this... this is a very good point, if you use $this, a new
instance of your class is created just to handle to sort :)

elsewhere in the same class:

function _ary_sort($a,$b) {
return $a['init'] - $b['init'];
}


is my 'final' code (thanks markus).


_alex



-- 
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 this a typo or what?

2001-05-22 Thread Floyd Baker

On 22 May 2001 19:32:00 +0200, you wrote:

Floyd Baker [EMAIL PROTECTED] wrote:

  
  I removed one of the two above the bottom 'return rettext'.   
  

There are sure something with that script, at least I found out there
is a } too much, maybe you removed one too many, can i see the
original script? I would also advise you to try and ident the script
correctly which makes it like 100% easier to read.

-- 
Henrik Hansen


http://www.php.net/manual/en/ref.strings.php

The top example of user contributed notes.  I didn't take anything
out..  It comes that way...  with 15 brackets. g  The extra one I
think is the second (or third) one up from the bottom.

Yes I have the whole thing indented to make sense.  I am still working
on it to make it work.

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]




Re: [PHP] Regular Expression Help

2001-05-22 Thread Mark Maggelet

On Tue, 22 May 2001 10:44:42 -0700, Jason Caldwell
([EMAIL PROTECTED]) wrote:
I'm trying to figure out how to say with a Regular Expression how
to check
for the following characters in a phone number:

( ) -

with a length between 1 and 20 --

I've tried the following and it doesn't seem to work.

eregi(^([0-9]|\\(|\\)|\\-){1,20}$)

oops, make that:
^[0-9\\(\\)-]{1,20}$

note: you don't have to escape the - when its the last char in the
range


I'm not interested in checking for a completely valid phone
number... but
instead checking to see if the phone number is numbers with or
without the
( ) - characters. Plus, I think creating a Regex expr that can check
for US
and International formats would be too complex.

Thanks.
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: php-list-
[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] exec command help

2001-05-22 Thread Nashirak Bosk

I am trying to run a something everytime a certain page is loaded.  I am
using PHP4 and am running Debian Linux.  I am trying to run this command
with exec:

 exec(/usr/sbin/postalias hash:aliases, $results);

In case you are curious this turns a file called aliases into a hashed
aliases file (aliases.db) so that postfix (a mail program), can look at
this aliases file.  I put this in a page and the page loads with no
errors, but the command doesnt look like it was ever run.  If I check
the aliases.db file the modified date is never right.  Any thoughts or
suggestions on what is going on or howto debug this so I can get more
information (I have been echoing the results but nothing comes up).
Thanks for you time.




--
---

Clayton Bluhm

Computer Engineering Student

[EMAIL PROTECTED] (home)





Re: [PHP] Is this a typo or what?

2001-05-22 Thread Charles Williams \(CEO\)


- Original Message -
From: Floyd Baker [EMAIL PROTECTED]
To: Henrik Hansen [EMAIL PROTECTED]
Cc: Henrik Hansen [EMAIL PROTECTED]; PHP General List
[EMAIL PROTECTED]
Sent: Tuesday, May 22, 2001 8:16 PM
Subject: Re: [PHP] Is this a typo or what?


 On 22 May 2001 19:32:00 +0200, you wrote:

 Floyd Baker [EMAIL PROTECTED] wrote:
 
  
   I removed one of the two above the bottom 'return rettext'.
  
 
 There are sure something with that script, at least I found out there
 is a } too much, maybe you removed one too many, can i see the
 original script? I would also advise you to try and ident the script
 correctly which makes it like 100% easier to read.
 
 --
 Henrik Hansen


 http://www.php.net/manual/en/ref.strings.php

 The top example of user contributed notes.  I didn't take anything
 out..  It comes that way...  with 15 brackets. g  The extra one I
 think is the second (or third) one up from the bottom.

 Yes I have the whole thing indented to make sense.  I am still working
 on it to make it work.

 Floyd


Floyd,

This works fine for me (if this is the correct example you were looking at):
function wraptext($text, $wrapmargin){
$rettext = ;
$linebuf = ;
$linelen = 0;
$tok = split([ \t], $text);
$numtok = count($tok);
for ($i = 0; $i  $numtok; $i++){
$elem = $tok[$i];
$elemlength = strlen($elem) + 1;
if (($linelen + $elemlength)  $wrapmargin){
$rettext = $rettext . $linebuf . br;
$linebuf = ;
$linelen = 0;
}
// Do we have a newline in this element?
  $pos = strrpos($elem, \\n);
  if ($pos){
 $before = substr($elem, 0, $pos);
 $after = substr($elem, $pos);
 $rettext = $rettext . $linebuf .   . $before . br;
 $linebuf = $after;
 $linelen = strlen($after);
  }else{
 $linebuf = $linebuf .   . $elem;
 $linelen = $linelen + $elemlength;
  }
}
return $rettext;
}

$test = wraptext(this is just a test to see if this thing works if not the
fuck it., 10);
echo$test;


-- 
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] File upload form

2001-05-22 Thread Boget, Chris

Below is the (very) simple form that I'm using to allow users
to upload files to my site:

---

html 
head 
titleUpload Attachment/title 
/head 
body  
br 
center 
h3Upload File/h3 
You are uploading from an unsecure server.br 
FORM ENCTYPE=multipart/form-data ACTION=/upload.php METHOD=POST
name=uploadForm 
table border=0 width=65% 
td colspan=4 align=center 
input type=file name=uploadfile size=50 
/td/tr 
tdbr/td/tr 
th align=center valign=center 
input type=submit name=submit value=Send This File
onClick=document.uploadForm.upload_file_name.value =
document.uploadForm.uploadfile.value

/th/tr 
/table 
/center 
input type=hidden name=upload_file_name value= 
input type=hidden name=site_key
value=d3d3LmNhcmliYmVhbnByZXN0aWdlLmNvbQ== 
input type=hidden name=host_key value=cGFudGhlci53aWxkLm5ldA== 
input type=hidden name=db_key value=Y2FyaWJiZWFucHJlc3RpZ2U= 
input type=hidden name=https_key value=MA== 
input type=hidden name=reg_file
value=d3d3LmNhcmliYmVhbnByZXN0aWdlLmNvbS9pbnRlcmFjdGl2ZS9sb2dpbi91cGxvYWRfZ
mlsZXMvcmVnaXN0ZXJfdXBsb2FkX2ZpbGUucGhw

/form 
brbr 
centera href= onclick=window.close(); return false;Close
Window/a/center 
brbr 
/body 
/html 

---

The problem that I'm experiencing using the above form is that when
some users (and the problem is consistent for those users) submit the
above form, *none* of the POST variables are getting passed to the
receiving page.  None of the hidden variables, not the input type = file
variable, _nothing_.  However, the majority of my users have absolutely
no problem using this form.  Just those very few.

Now, when I change this line:

FORM ENCTYPE=multipart/form-data ACTION=/upload.php METHOD=POST
name=uploadForm 

to this:

FORM ACTION=/upload.php METHOD=POST name=uploadForm 

(ie, remove the ENCTYPE=multipart/form-data),

all of the POST data gets sent to the receiving page for those users.

What is going on?  Why is the POST data not getting sent to the server
when theENCTYPE=multipart/form-datais included in the form
definition?  And why only for a very small subset of users?

Thanks for any insight you can give!

Chris



Re: [PHP] File upload form

2001-05-22 Thread Charles Williams \(CEO\)

sniped for brevities sake ;) 

Chris,

Have you asked what browsers they are using?  Also, what are you using to
serve this page?

chuck



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

2001-05-22 Thread Boget, Chris

 Have you asked what browsers they are using?  

This happens primarily on IE but it also happens
using NS

 Also, what are you using to serve this page?

?
PHP 4.0.4 and Apache.

Chris



Re: [PHP] Check multiple cookies

2001-05-22 Thread Sam Gooding

At 05:04 PM 5/21/01 +0100, James Holloway wrote:
Hi Sam,


  The following is exactly what I typed in (just copy and pasted) but I'm
  still getting the error:
 
  Cannot add header information - headers already sent by (output started at
  web.php:2) in
  web.php on line 19

Make sure that all output for Cookies and header information is sent before
any HTML, and that there is no whitespace before the initial ? tag - that's
probably the source of the problem.

Have a search for Output buffering on the PHP main site.

I have created a cookie that I can read in ASP using the following:

response.write Request.Cookies(cookie1)  p

However PHP will not output the value from the following statement:

$cookie1 = $HTTP_COOKIE_VARS[cookie1];

and if fact returns the error:

Undefined index: cookie1

Anybody have any idea why that might be?


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

2001-05-22 Thread Thomas Deliduka

Is there a good PHP alternative for a discussion board or something else
that allows for moderators and other good features that will run on Linux?

-- 

Thomas Deliduka
IT Manager
 -
New Eve Media
The Solution To Your Internet Angst
http://www.neweve.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] Debugging problems

2001-05-22 Thread Taline Makssabo

I'm using this as a log on but it gives me this warning message:

Warning: Supplied argument is not a valid MySQL resource
/httpd/html/php2/login.php on line 27


? ob_start() ?
?php
function access_denied()

Header(WWW-Authenticate: Basic realm=\$title\);
Header(HTTP/1.0 401 Unauthorized);
}

function auth_headers($title)

Header(WWW-Authenticate: Basic realm=\$title\);
Header(HTTP/1.0 401 Unauthorized);
}
if(!isset($PHP_AUTH_USER))

auth_headers(Members Area);
access_denied();
exit;
}
else {

$db_hostname = localhost; // database host, usually localhost
$db_username = contact; // username for the database (make sure it has
proper privledges)
$db_password = cdi986; // password that cooresponds to DB USERNAME
$db_database = contact_informations; // what database is your member info
stored in?

$query = SELECT username,password FROM contact_informations WHERE
username='$PHP_AUTH_USER' AND password='$PHP_AUTH_PW';
$link = mysql_connect($db_hostname, $db_username, $db_password) or
die(Unable to connect to database server);

if (mysql_num_rows(mysql_db_query($db_database, $query)) == 0)

auth_headers(Members Area);
access_denied();
exit;
}

mysql_close($link);
}
?


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

2001-05-22 Thread John Monfort



 Thanks for the background info.

 I'll check it out.

__John Monfort_
_+---+_
 P E P I E  D E S I G N S
   www.pepiedesigns.com
The world is waiting, are you ready?
-+___+-

On Tue, 22 May 2001, Maxim Maletsky wrote:

 a new (?) infamous programming language.

 Something similar to PHP but fully (religiously) Object Oriented.
 It claims to be more OOOriented then Python while with easier syntax than
 Perl.
 eRuby (it's embedded scripting language for web) can also run as an apache
 module, not only CGI (*nix only ).
 Ruby itself can function in similar way C does. (including windows
 management, command line, background jobs etc..)
 It is written by some Japanese gurus and is quite famous here in Tokyo.

 read on here:
 http://www.ruby-lang.org/en/

 Quite impressive as an idea and I really like it's language concept,
 but it is still soo immature.

 Sincerely,

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




 -Original Message-
 From: John Monfort [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, May 22, 2001 2:42 PM
 To: Maxim Maletsky
 Cc: 'PHP General List. (E-mail)'
 Subject: Re: [PHP] PHP  RUBY




   What is RUBY?


 -John




 On Tue, 22 May 2001, Maxim Maletsky wrote:

  Hello gurus,
 
  does anyone know a way to make PHP and RUBY running together (parsing both
  the same file) ?
 
  This is what I tried to do:
 
  httpd.conf:
 
  AddType application/x-httpd-php-source .phps
  AddType application/x-httpd-php .html
 
  #Action application/x-httpd-php /php/php.exe
 
  AddType application/x-httpd-eruby .rhtml .html
  Action application/x-httpd-eruby /cgi-bin/eruby
 
  as you can see PHP runs as apache's module and Ruby as CGI,
 
  It works fine for .rhtml files (with ruby), but when I give them the same
  file extension to parse only Ruby works, PHP shows the source.
 
  I know this a wrong try, well, still a try. Has anyone tried to do the
 same?
  Any success in any way?
 
  There are some things I'd like Ruby to do while processing PHP files.
 
 
  Sincerely,
 
   Maxim Maletsky
   Founder, Chief Developer
   PHPBeginner.com (Where PHP Begins)
   [EMAIL PROTECTED]
   www.phpbeginner.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] Discussion board

2001-05-22 Thread James Atkinson

http://www.phpbb.com

:)

- James

 -Original Message-
 From: Thomas Deliduka [mailto:[EMAIL PROTECTED]]
 Sent: May 22, 2001 12:10 PM
 To: PHP List
 Subject: [PHP] Discussion board


 Is there a good PHP alternative for a discussion board or something else
 that allows for moderators and other good features that will run on Linux?

 --

 Thomas Deliduka
 IT Manager
  -
 New Eve Media
 The Solution To Your Internet Angst
 http://www.neweve.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] Discussion board

2001-05-22 Thread Jerry Lake

I like Phorum
http://phorum.org/

Jerry Lake
Interface Engineering Technician
Europa Communications - http://www.europa.com
Pacifier Online - http://www.pacifier.com


-Original Message-
From: James Atkinson [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, May 22, 2001 12:23 PM
To: Thomas Deliduka; PHP List
Subject: RE: [PHP] Discussion board


http://www.phpbb.com

:)

- James

 -Original Message-
 From: Thomas Deliduka [mailto:[EMAIL PROTECTED]]
 Sent: May 22, 2001 12:10 PM
 To: PHP List
 Subject: [PHP] Discussion board


 Is there a good PHP alternative for a discussion board or something else
 that allows for moderators and other good features that will run on Linux?

 --

 Thomas Deliduka
 IT Manager
  -
 New Eve Media
 The Solution To Your Internet Angst
 http://www.neweve.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]




Re: [PHP] Debugging problems

2001-05-22 Thread Chris Lee

best bet is to put some error checking in.

 function _check_db($query = '', $line = '')
 {
  if ( mysql_errno() )
  {
   echo Error: Problem with DataBase : {$GLOBALS['db_database']}br\n;
   echo Error:  . mysql_errno() . ':' . mysql_error() . br\n;
   echo Query: $querybr\n;
   echo Line : $linebr\n;
   exit();
  }
 }

after every mysql command put this.

check_db($query, __LINE__);

ie.
?php
mysql_connect($db_hostname, $db_username, $db_password);
check_db(connect: $db_hostname, $db_username, $db_password, __LINE__);
...
mysql_db_query($db_database, $query);
check_db($query, __LINE__);
?

this will help alot in finding any mysql errors.

what was the command on line 27 ? email/news groups format posts, therefore
line 27 for you may be line 33 when Im looking at it.

--

  Chris Lee
  [EMAIL PROTECTED]



Taline Makssabo [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 I'm using this as a log on but it gives me this warning message:

 Warning: Supplied argument is not a valid MySQL resource
 /httpd/html/php2/login.php on line 27


 ? ob_start() ?
 ?php
 function access_denied()

 Header(WWW-Authenticate: Basic realm=\$title\);
 Header(HTTP/1.0 401 Unauthorized);
 }

 function auth_headers($title)

 Header(WWW-Authenticate: Basic realm=\$title\);
 Header(HTTP/1.0 401 Unauthorized);
 }
 if(!isset($PHP_AUTH_USER))

 auth_headers(Members Area);
 access_denied();
 exit;
 }
 else {

 $db_hostname = localhost; // database host, usually localhost
 $db_username = contact; // username for the database (make sure it has
 proper privledges)
 $db_password = cdi986; // password that cooresponds to DB USERNAME
 $db_database = contact_informations; // what database is your member
info
 stored in?

 $query = SELECT username,password FROM contact_informations WHERE
 username='$PHP_AUTH_USER' AND password='$PHP_AUTH_PW';
 $link = mysql_connect($db_hostname, $db_username, $db_password) or
 die(Unable to connect to database server);

 if (mysql_num_rows(mysql_db_query($db_database, $query)) == 0)

 auth_headers(Members Area);
 access_denied();
 exit;
 }

 mysql_close($link);
 }
 ?


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

2001-05-22 Thread Christopher Schreiber

I'd recommend taking a look at vBulletin... version 2 was just release
and it is the most powerful PHP based discussion board available:

http://www.vbulletin.com/

Hope this helps,

-Original Message-
From: Thomas Deliduka [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, May 22, 2001 3:10 PM
To: PHP List
Subject: [PHP] Discussion board


Is there a good PHP alternative for a discussion board or something else
that allows for moderators and other good features that will run on Linux?

-- 

Thomas Deliduka
IT Manager
 -
New Eve Media
The Solution To Your Internet Angst
http://www.neweve.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] About MySQL Recordset pagination...

2001-05-22 Thread Hassan Arteaga

Hi all !!

I'would  like to know if exist in MySQL or PHP functions to implement
pagination like ADO (This is for WINDOWS PHP programmers)

thanks in advanced !!
--
M. Sc. Hassan Arteaga Rodríguez
Microsoft Certified System Engineer
Network Admin, WEB Programmer
FUNDYCS, Ltd
[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] exec command help

2001-05-22 Thread Chris Lee

what is the output of $results ?

print_r($results);

try another command, ie.

exec(echo hello world, $results);
exec(echo hello world  /tmp/test.txt, $results);

does that work? does that file aliases.db permissions set as world
writeable, or the user.group set to nobody.nobody (ie. whatever your
webserver is set to), or does postalias run as suid root ? what Im getting
at is maybe the app is being run but doesnt have the permissions to edit the
file because of the user.group that is running the app.

--

  Chris Lee
  [EMAIL PROTECTED]



Nashirak Bosk [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 I am trying to run a something everytime a certain page is loaded.  I am
 using PHP4 and am running Debian Linux.  I am trying to run this command
 with exec:

  exec(/usr/sbin/postalias hash:aliases, $results);

 In case you are curious this turns a file called aliases into a hashed
 aliases file (aliases.db) so that postfix (a mail program), can look at
 this aliases file.  I put this in a page and the page loads with no
 errors, but the command doesnt look like it was ever run.  If I check
 the aliases.db file the modified date is never right.  Any thoughts or
 suggestions on what is going on or howto debug this so I can get more
 information (I have been echoing the results but nothing comes up).
 Thanks for you time.




 --
 ---

 Clayton Bluhm

 Computer Engineering Student

 [EMAIL PROTECTED] (home)






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

2001-05-22 Thread Thomas Deliduka

Thanks everyone for your suggestions (and thanks to those who will suggest
more later... To cover y'all too)

I'll check these out.

On 5/22/2001 3:32 PM this was written:

 Is there a good PHP alternative for a discussion board or something else
 that allows for moderators and other good features that will run on Linux?

-- 

Thomas Deliduka
IT Manager
 -
New Eve Media
The Solution To Your Internet Angst
http://www.neweve.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] unsubscribe leblanc+php@acadia.ne.mediaone.net

2001-05-22 Thread Louis LeBlanc

unsubscribe [EMAIL PROTECTED]

-- 
Louis LeBlanc
Fully Funded Hobbyist, KeySlapper Extrordinaire :)
[EMAIL PROTECTED]
http://acadia.ne.mediaone.netԿԬ

-- 
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] unsubscribe leblanc+php@acadia.ne.mediaone.net

2001-05-22 Thread Nicholas

-BEGIN PGP SIGNED MESSAGE-
Hash: MD5

Hello Louis,

gotta email that to the unsubscribe list... (at bottom of all msgs)

This In Reply to what you wrote on Tuesday, May 22, 2001, 4:05:26 PM,
Which Was
LL unsubscribe [EMAIL PROTECTED]




- --
Best regards,
 Nicholasmailto:[EMAIL PROTECTED]

-BEGIN PGP SIGNATURE-
Version: 2.6

iQCVAwUAOwrICLovzXm8USdPAQFLXwP+OvGPT0y2vhwylizAFaLe4uVVd6Iw/XXy
VQHh9EGIV6p5MELCfN39bVhQlsbjtWirSTMzQ5YROK4sAQFB4FqiZD291x7b+UoD
BDVUKAQ1A/rCzlL4WZLthN5nUr8tRokom2FiymSVxo1PnnGTckHhO2A4CQGDmSdf
fJJI65qb9a0=
=FHZC
-END PGP SIGNATURE-


-- 
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] About MySQL Recordset pagination...

2001-05-22 Thread py

I wrote a simple class to do that, it can be modified quite easily.
http://www.pywebsolutions.com/source.php

Hope this is what you are looking for...
py


- Original Message -
From: Hassan Arteaga [EMAIL PROTECTED]
To: Php (E-mail) [EMAIL PROTECTED]
Sent: Tuesday, May 22, 2001 8:39 PM
Subject: [PHP] About MySQL Recordset pagination...


Hi all !!

I'would  like to know if exist in MySQL or PHP functions to implement
pagination like ADO (This is for WINDOWS PHP programmers)

thanks in advanced !!
--
M. Sc. Hassan Arteaga Rodríguez
Microsoft Certified System Engineer
Network Admin, WEB Programmer
FUNDYCS, Ltd
[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] Regular Expression Help

2001-05-22 Thread Christian Reiniger

On Tuesday 22 May 2001 19:44, Jason Caldwell wrote:
 I'm trying to figure out how to say with a Regular Expression how to
 check for the following characters in a phone number:

 ( ) -

 with a length between 1 and 20 --

preg_match ('/^[\d()-]{1,20}$/', $Subject)

should do the trick.

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

Nothing is more dangerous than an idea if it's the only one you have.

- Emil-Auguste Chartier, Propos sur la religion, 1938

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

2001-05-22 Thread PAUL O'NEIL

I had a little trouble with RedHat using the RPM's to get those packages to
work. It only worked best when I used the tar.gz files on all three and
followed the instructions. I felt that since these are critical components
that need to work for me and I was doing it by hand anyway why even use
RedHat. I recently installed the latest SuSe and its awesome. They kept
everything pretty standard as far as I can tell. You could still install the
tar.gz's and conform to RedHat's way but unless you know a little bit this
can cause some problems. 

-Original Message-
From: AJDIN BRANDIC
To: [EMAIL PROTECTED]
Sent: 5/22/01 8:37 AM
Subject: [PHP] installing php4

Hi

I am building a web server.  I installed RH6.2 and Apache was installed
with it (as binary I guess). I have also installed MySQL (server/client)
from binary RPM.  I want to install PHP4 source now.  Is there any way I
could install it without compiling Apache source version or do I need to

get Apache
source and compile(make/make install) the two apps (Apache/PHP4)?  I 
guess MySQL can stay as it is. 


Regards

Ajdin

-- 
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] 3d array-number of elements in each dimension

2001-05-22 Thread Andrew V. Romero

I have a 3d array $ingredientsInfoSplit[$i][$j][$k] and this array is
contains $i-row that data (a compounded suspension) was found in,
$j-ingredients for the suspension, and $k-information on each ingredient
used for the suspension.  So each row in this file I have contains all
the information needed to make a particular suspension and this array
breaks it down so that I can read each part seperately.  First, would
there be a better way to hold this information?  This way seems to work
well but I am not an expert yet and was wondering if this is how you
would do it.

Now for the real question, for each suspension I need to determine how
many ingredients were used to create it.  So I need a way to determine
how many $j elements there are in $ingredientsInfoSplit[$i][$j][$k] .  I
have been looking at the count function but I can't figure out how I
could use it to determine how many $j elements there are.

Thanks for any help,
Andrew V. Romero
-Please remove all numbers from address to reply personally.-


-- 
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] Sites with PHP jobs

2001-05-22 Thread Mihailo Dzigurski

Hi,

I am looking for sites with PHP jobs, can somebody suggest me that kind of
sites?

Regards,
Mihailo.


_
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.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] Sites with PHP jobs

2001-05-22 Thread Boaz Yahav

http://www.weberjob.com

Sincerely

  berber

Visit http://www.weberdev.com Today!!! 
To see where PHP might take you tomorrow.
 

-Original Message-
From: Mihailo Dzigurski [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, May 22, 2001 10:22 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Sites with PHP jobs


Hi,

I am looking for sites with PHP jobs, can somebody suggest me that kind of
sites?

Regards,
Mihailo.


_
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.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 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] Sessions and Classes

2001-05-22 Thread Chris Kovalcik

Hi,
Can a class be stored as a session variable?
If not, what advantage is there to using classes in php?
I kind of see classes as used for things that will be frequently accessed/stored in 
memory, but with php(web) the code is basically executed once with nothing remaining 
in memory. Seems kind of a pain to create a class, initialize the class and work with 
it all for a single execution, or am I missing something?
EX: I create a customer class, then I have to fill in all the member variables, etc. 
But I would have to store all the info in a DB anyways, so what point is there to the 
class if I just need to update the DB. I can see a class for the DB access it self, to 
make it easier to change to other DB's, but not for a customer.

Chris



Re: [PHP] unsubscribe leblanc+php@acadia.ne.mediaone.net

2001-05-22 Thread Louis LeBlanc

On Tue, May 22, 2001 at 04:11:49PM -0400, Nicholas sat at the 'puter and typed:
 -BEGIN PGP SIGNED MESSAGE-
 Hash: MD5
 
 Hello Louis,
 
 gotta email that to the unsubscribe list... (at bottom of all msgs)
 
 This In Reply to what you wrote on Tuesday, May 22, 2001, 4:05:26 PM,
 Which Was
 LL unsubscribe [EMAIL PROTECTED]
 

Bah.  Sorry all.  That is just what I meant to do.

L
-- 
Louis LeBlanc
Fully Funded Hobbyist, KeySlapper Extrordinaire :)
[EMAIL PROTECTED]
http://acadia.ne.mediaone.netԿԬ

-- 
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] New BEE Q

2001-05-22 Thread dr0asif

New bee Q-
Can anyone help me to configure pws,mysql manually.
Kindly help and walk me through the process.
thanks
asif

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

2001-05-22 Thread Nicholas

-BEGIN PGP SIGNED MESSAGE-
Hash: MD5

Hello ,

  whenever i try to run this cvs command i get this
cvs -d :pserver:[EMAIL PROTECTED]:/cvsroot/best-board/devel 
init
Protocol error: Root request missing
wtf am i doing wrong what do i do .. thanks (note this is FOR a php
program..)

- --
Best regards,
 Nicholas  mailto:[EMAIL PROTECTED]

-BEGIN PGP SIGNATURE-
Version: 2.6

iQCVAwUAOwrO4LovzXm8USdPAQFS4wQA6EEl0udtH4dZ/yCh6OPn8uvvrHgjXaY5
BdRHVynpfasPrazAKZpkxqsAPSqGvmaEUQJcyMXnXJSgGic+ujk3bCoPY0ZLrWGs
JIiYX5QogQ9m7ZkggakMvSP0pUxkpZ3L1qyyC3/pBp4usD/ebEKh/+3pfkkwWgpT
FhSniZwesF8=
=MB9Q
-END PGP SIGNATURE-


-- 
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 getting oracle to work with php4

2001-05-22 Thread Markus Fischer

On Tue, May 22, 2001 at 07:06:32PM +0200, [EMAIL PROTECTED] wrote : 
 got php to work with mysql  but when I try to compile in oracle support 
 something goes bad.
 .configure, make  make install semm to go fine 
 but when I restart apache I get an error:
 Shutting down http: [OK]
 Starting httpd: Syntax error on line 872 of /etc/httpd/conf/httpd.conf:
 Cannot load /etc/httpd/lib/apache/libphp4.so into server: libclntsh.so.1.0: 
 cannot open shared object file: No such file or directory
 [FAILED]

libclntsh.so.1.0 is not in your library path /etc/ld.so.conf

btw, make sure you linked both apache  php against libpthread
like libclntsh.so.1.0 is

- Markus

-- 
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] image upload - determining image resolution in pixels ?

2001-05-22 Thread Markus Fischer

On Tue, May 22, 2001 at 10:38:32AM -0700, Nicolas Mermet wrote : 
 I was wondering if there is a way to analize an uploaded jpeg file in
 order to extract its resolution in pixels.

GetImageSize() is a favourite one here.

 Would that be also possible with a quicktime movie ?

Possibly, but no one has done a constribution yet to php.

- Markus

-- 
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] Database Information Manager script i wrote

2001-05-22 Thread scott [gts]

I've been working on this thing for the past few days
and thought i'd share it all with you.

i've posted a demo up:  you cannot delete rows,
but you can add and edit them
http://furt.com/php/dbedit/

to get the code: http://furt.com/php/dbedit_b1.zip
(please read specs.php for lots of information on how
the thing is layed out and how it all fits together)

-- 

The key thing that separates my script from the other
database manager scripts is that mine supports a sort
of foreign key referencing between tables.

for example:
if you have two tables, main_table and tid_table

assume main_table looks like this:
id  tid  description
--  ---  -
1   2,3  This is something

and tid_table looks like this:
id  Foo
--  ---
1   Bar
2   Baz
3   Bone

after putting a few options into the specs file, 
when you view the main_table, in place of the tid 2,3
the script will look up the real value of 2,3 and
replace it with Baz, Bone.


Basically, i needed something like this becuase the
company i work for wants to store porfolio information
in a large database... a single entry can have multiple
authours, multiple clients, etc. etc... and so i 
figured instead of having to keep typing in Scott
for all the things that i authour, why not have the
script put a drop-down combo box with a list of all
authours, when i add a record to main_table??

enough of me babbling.

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

2001-05-22 Thread scott [gts]

Oh, and the fields with blue link headings
dont sort correctly, becuase the actual values
of the fields are numeric... 

click on Raw to see the actual data in the database,
click on Complete to see the values that have been
looked up

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

2001-05-22 Thread Mike Gifford

Hello Fabian,

This was very helpful.  Thanks for letting me know about this little glitch.

It almost resolves the problem that I was having.  Now I no longer get xml 
errors.  However, I'm not able to output the XML either.

Any suggestions would be appreciated.  The updated code is available here:
http://www.airdiv-cupe.org/portal/newsfeed_new_parser.php

And I've included the full script in the email (at the very bottom of this message).

Thanks.


Mike

Fabian Raygosa wrote:

 for xml you have to escape certain characters in the file, one is the
 ampersand ...
 - Original Message -
 From: Mike Gifford [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Friday, May 18, 2001 12:24 PM
 Subject: [PHP] PHP  XML Parsing
 
 
 
 Hello,
 
 In looking for a good script to parse XML files I stumbled across the
 
 following
 
 tutorial (which looks very good):
 http://www.wirelessdevnet.com/channels/wap/features/xmlcast_php.html
 
 I have set this script up here:
 http://www.airdiv-cupe.org/portal/newsfeed_new_parser.php
 
 and I keep getting the following error (even after making a number of
 
 changes):
 
 XML error: not well-formed at line 16
 
 And I'm not sure how to troubleshoot this problem.
 
 I'm assuming that it is referring to line 16 on the XML file, in this
 
 case:
 
 http://cupe.ca/xml/cupenews.rdf
 
 My parsing definitions are as follows
$itemTitleKey = ^rdf^item^title;
$itemLinkKey = ^rdf^item^link;
$itemDescKey = ^rdf^item^description;
 
 Any help would be appreciated.
 
 Mike
 --
 Mike Gifford, OpenConcept Consulting, http://openconcept.ca
 Offering everything your organization needs for an effective web site.
 Featured Client: http://halifaxinitiative.org
 A good life is one inspired by love and guided by knowledge - B. Russell
 
 
 --
 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

class xitem {
   var $xTitle;
   var $xLink;
   var $xDescription;
  // function xitem() {
  // }
}

// general vars
$sTitle = Airline Division Newsfeeds;
$sLink = http://airdiv.cupe.ca/portal/;;
$sDescription = A Portal for the Airline Division of CUPE;
$arItems = array();
$itemCount = 0;

// * Start User-Defined Vars 
// rss url goes here
$uFile =http://cupe.ca/xml/cupenews.rdf;;
// descriptions (true or false) goes here
$bDesc = ; // If it exists this should be 'true'
// font goes here
$uFont = Verdana, Arial, Helvetica, sans-serif;
$uFontSize = 2;
// * End User-Defined Vars **

function startElement($parser, $name, $attrs) {
   global $curTag;   $curTag .= ^$name;
}

function endElement($parser, $name) {
   global $curTag;   $caret_pos = strrpos($curTag,'^');
   $curTag = substr($curTag,0,$caret_pos);
}

function characterData($parser, $data) {
global $curTag; // get the Channel information first
   global $sTitle, $sLink, $sDescription;
//  $titleKey = ^RSS^CHANNEL^TITLE;
//  $linkKey = ^RSS^CHANNEL^LINK;
//  $descKey = ^RSS^CHANNEL^DESCRIPTION;
   $titlekey = ^rdf:RDF^channel^title;
   $linkkey = ^rdf:RDF^channel^link;
   $desckey = ^rdf:RDF^channel^description;
   if ($curTag == $titleKey) {
 $sTitle = $data;
 echo  $sTitle;
   }
   elseif ($curTag == $linkKey) {
 $sLink = $data;
  echo  $sLink;
   }
   elseif ($curTag == $descKey) {
 $sDescription = $data;
   }   // now get the items
   global $arItems, $itemCount;
//  $itemTitleKey = ^RSS^CHANNEL^ITEM^TITLE;
//  $itemLinkKey = ^RSS^CHANNEL^ITEM^LINK;
//  $itemDescKey = ^RSS^CHANNEL^ITEM^DESCRIPTION;
   $itemtitlekey = ^rdf:RDF^item^title;
   $itemlinkkey = ^rdf:RDF^item^link;
   $itemdesckey = ^rdf:RDF^item^description;
if ($curTag == $itemTitleKey) {
 // make new xitem
 $arItems[$itemCount] = new xitem(); // set new item object's 
properties
 $arItems[$itemCount]-xTitle = $data;
 echo $data;
   }
   elseif ($curTag == $itemLinkKey) {
 $arItems[$itemCount]-xLink = $data;
 echo $data;
   }
   elseif ($curTag == $itemDescKey) {
 $arItems[$itemCount]-xDescription = $data;
 // increment item counter
 $itemCount++;
 echo $data;
   }

} // main loop

$xml_parser = xml_parser_create();
xml_set_element_handler($xml_parser, startElement, endElement);
xml_set_character_data_handler($xml_parser, characterData);
if (!($fp = fopen($uFile,r))) {
   die (could not open RSS for input);
}
while ($data = fread($fp, 4096)) {
$data=eregi_replace( , amp;,$data);
echo $data;
   if (!xml_parse($xml_parser, $data, feof($fp))) {
 die(sprintf(XML error: %s at line %d, 
xml_error_string(xml_get_error_code($xml_parser)), 
xml_get_current_line_number($xml_parser)));
   }
}
xml_parser_free($xml_parser); // write out the items
?
html
head
title?php echo ($sTitle); ?/title
meta name = description content = ?php echo ($sDescription); ?
/head
body bgcolor = #FF
font face = ?php 

[PHP] mysql error, dont see why.. please help

2001-05-22 Thread PeterOblivion

Here is the command.

mysql_query(UPDATE user_polls WHERE uid = '$UserName' AND type = '$type' SET 
url = '$file_name') or die(mysql_error());

Output
You have an error in your SQL syntax near 'WHERE uid = 'Oblivion' AND type = 
'music' SET url = 'test'' at line 1

This is SOOO weird.
PLEASE HELP

- Peter

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

2001-05-22 Thread Black Dragon

Hi,
can you tell me same library to play sounds from php and output an audio
stream to the browser.

I'm finding something that build dinamically an swf file (flash) from a
template swf and play an mp3 o wav.

can you tell me something? I've tried some library, bu unsucessfully



-- 
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] mysql error, dont see why.. please help

2001-05-22 Thread Tyler Longren

Shouldn't it be:
mysql_query(UPDATE user_polls SET url = '$file_name' WHERE uid = '$UserName' AND type 
= '$type) or die (mysql_error());

Maybe I'm wrong.

-- 
Tyler Longren
[EMAIL PROTECTED]
Currently Unemployed
www.noworkfortyler.com



On Tue, 22 May 2001 17:00:35 EDT
[EMAIL PROTECTED] wrote:

 Here is the command.
 
 mysql_query(UPDATE user_polls WHERE uid = '$UserName' AND type = '$type' SET 
 url = '$file_name') or die(mysql_error());
 
 Output
 You have an error in your SQL syntax near 'WHERE uid = 'Oblivion' AND type = 
 'music' SET url = 'test'' at line 1
 
 This is SOOO weird.
 PLEASE HELP
 
 - Peter
 
 -- 
 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 XML Parsing

2001-05-22 Thread Mike Gifford

Hello Peter,

Peter Dudley wrote:

 The problem is in your link URL, where you pass CGI parameters.  When XML
 sees the  character, it assumes it's a special character thing such as
 amp; or quot;, so it's expecting a semicolon.

replacing it with amp; fixed the XML error.  Thanks!
 
 linkhttp://cupe.ca/news/cupenews/showitem.asp?ID=2823cl=1/link
 Just yesterday I discovered a program called XML Spy which you can get on a
 30-day eval from www.tucows.com.  This was what pointed out the error to me
 in your file.

Interesting..  So to be consistent with proper XML formatting, should the server 
hosting the XML file convert the  into amp; ?

 When I was using XSL last year for the first time, I had a devil of a time
 figuring out how to get URLs, particularly with query strings attached,
 through the XML parsers.  Try using the %codes in your URLs instead of  and
 other special characters; that should help, if I remember correctly.
 (Similarly, building HREF tags using XSL stylesheets seemed pretty awkward,
 but I'm sure I was missing some crucial tidbit of information.)

I certainly feel like I'm missing something...  Although I'm a bit at odds as to how 
to troubleshoot this new file.

I no longer get the errors, but I'm not getting the results I'm looking for either.

The updated script is running here:
http://www.airdiv-cupe.org/portal/newsfeed_new_parser.php

I've also attached the full script (since I've made some changes to it).

Any additional help would be appreciated.

Mike

 Mike Gifford [EMAIL PROTECTED] wrote in message
 [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 
 Hello,
 
 In looking for a good script to parse XML files I stumbled across the
 
 following
 
 tutorial (which looks very good):
 http://www.wirelessdevnet.com/channels/wap/features/xmlcast_php.html
 
 I have set this script up here:
 http://www.airdiv-cupe.org/portal/newsfeed_new_parser.php
 
 and I keep getting the following error (even after making a number of
 
 changes):
 
 XML error: not well-formed at line 16
 
 And I'm not sure how to troubleshoot this problem.
 
 I'm assuming that it is referring to line 16 on the XML file, in this
 
 case:
 
 http://cupe.ca/xml/cupenews.rdf
 
 My parsing definitions are as follows
$itemTitleKey = ^rdf^item^title;
$itemLinkKey = ^rdf^item^link;
$itemDescKey = ^rdf^item^description;
 
 Any help would be appreciated.
 
 Mike


?php

class xitem {
   var $xTitle;
   var $xLink;
   var $xDescription;
  // function xitem() {
  // }
}

// general vars
$sTitle = Airline Division Newsfeeds;
$sLink = http://airdiv.cupe.ca/portal/;;
$sDescription = A Portal for the Airline Division of CUPE;
$arItems = array();
$itemCount = 0;

// * Start User-Defined Vars 
// rss url goes here
$uFile =http://cupe.ca/xml/cupenews.rdf;;
// descriptions (true or false) goes here
$bDesc = ; // If it exists this should be 'true'
// font goes here
$uFont = Verdana, Arial, Helvetica, sans-serif;
$uFontSize = 2;
// * End User-Defined Vars **

function startElement($parser, $name, $attrs) {
   global $curTag;   $curTag .= ^$name;
}

function endElement($parser, $name) {
   global $curTag;   $caret_pos = strrpos($curTag,'^');
   $curTag = substr($curTag,0,$caret_pos);
}

function characterData($parser, $data) {
global $curTag; // get the Channel information first
   global $sTitle, $sLink, $sDescription;
//  $titleKey = ^RSS^CHANNEL^TITLE;
//  $linkKey = ^RSS^CHANNEL^LINK;
//  $descKey = ^RSS^CHANNEL^DESCRIPTION;
   $titlekey = ^rdf:RDF^channel^title;
   $linkkey = ^rdf:RDF^channel^link;
   $desckey = ^rdf:RDF^channel^description;
   if ($curTag == $titleKey) {
 $sTitle = $data;
 echo  $sTitle;
   }
   elseif ($curTag == $linkKey) {
 $sLink = $data;
  echo  $sLink;
   }
   elseif ($curTag == $descKey) {
 $sDescription = $data;
   }   // now get the items
   global $arItems, $itemCount;
//  $itemTitleKey = ^RSS^CHANNEL^ITEM^TITLE;
//  $itemLinkKey = ^RSS^CHANNEL^ITEM^LINK;
//  $itemDescKey = ^RSS^CHANNEL^ITEM^DESCRIPTION;
   $itemtitlekey = ^rdf:RDF^item^title;
   $itemlinkkey = ^rdf:RDF^item^link;
   $itemdesckey = ^rdf:RDF^item^description;
if ($curTag == $itemTitleKey) {
 // make new xitem
 $arItems[$itemCount] = new xitem(); // set new item object's 
properties
 $arItems[$itemCount]-xTitle = $data;
 echo $data;
   }
   elseif ($curTag == $itemLinkKey) {
 $arItems[$itemCount]-xLink = $data;
 echo $data;
   }
   elseif ($curTag == $itemDescKey) {
 $arItems[$itemCount]-xDescription = $data;
 // increment item counter
 $itemCount++;
 echo $data;
   }

} // main loop

$xml_parser = xml_parser_create();
xml_set_element_handler($xml_parser, startElement, endElement);
xml_set_character_data_handler($xml_parser, characterData);
if (!($fp = fopen($uFile,r))) {
   die (could not open RSS for input);
}
while ($data = fread($fp, 4096)) {
$data=eregi_replace( , amp;,$data);
echo $data;
   if 

Re: [PHP] 3d array-number of elements in each dimension

2001-05-22 Thread Andrew V. Romero

I should clarify that I need to determine the number of elements in $j for
each row ($k).

Thanks,
To reply personally, remove all numbers from address.

Andrew V. Romero wrote:

 I have a 3d array $ingredientsInfoSplit[$i][$j][$k] and this array is
 contains $i-row that data (a compounded suspension) was found in,
 $j-ingredients for the suspension, and $k-information on each ingredient
 used for the suspension.  So each row in this file I have contains all
 the information needed to make a particular suspension and this array
 breaks it down so that I can read each part seperately.  First, would
 there be a better way to hold this information?  This way seems to work
 well but I am not an expert yet and was wondering if this is how you
 would do it.

 Now for the real question, for each suspension I need to determine how
 many ingredients were used to create it.  So I need a way to determine
 how many $j elements there are in $ingredientsInfoSplit[$i][$j][$k] .  I
 have been looking at the count function but I can't figure out how I
 could use it to determine how many $j elements there are.

 Thanks for any help,
 Andrew V. Romero
 -Please remove all numbers from address to reply personally.-

 --
 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] mysql error, dont see why.. please help

2001-05-22 Thread Chadwick, Russell


The SET clause has to come before WHERE clause   - Russ

---
Toolshed Computer Productions - Professional PHP Hosting
 Hosting - Dedicated Servers - Design - Programming
 http://www.toolshed51.com

-Original Message-
From: Tyler Longren [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, May 22, 2001 2:04 PM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] mysql error, dont see why.. please help


Shouldn't it be:
mysql_query(UPDATE user_polls SET url = '$file_name' WHERE uid =
'$UserName' AND type = '$type) or die (mysql_error());

Maybe I'm wrong.

-- 
Tyler Longren
[EMAIL PROTECTED]
Currently Unemployed
www.noworkfortyler.com



On Tue, 22 May 2001 17:00:35 EDT
[EMAIL PROTECTED] wrote:

 Here is the command.
 
 mysql_query(UPDATE user_polls WHERE uid = '$UserName' AND type = '$type'
SET 
 url = '$file_name') or die(mysql_error());
 
 Output
 You have an error in your SQL syntax near 'WHERE uid = 'Oblivion' AND type
= 
 'music' SET url = 'test'' at line 1
 
 This is SOOO weird.
 PLEASE HELP
 
 - Peter
 
 -- 
 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] URL Variables

2001-05-22 Thread Michael Conley

First, I realize this isn't really a PHP question.

If I include variables in a URL that I am passing to a web server over
HTTPS, is the URL (and hence, the variables) encrypted?
example:  https://www.yourdomain.com?firstname=michaellastname=conley

I need to make sure that the firstname and lastname information is not sent
over the internet in clear text.  




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

2001-05-22 Thread Chadwick, Russell


Variables as part of the url would not be encrypted, but you could send
variables as POST to the secure document and then they would get encrypted -
Russ

---
Toolshed Computer Productions - Professional PHP Hosting
 Hosting - Dedicated Servers - Design - Programming
 http://www.toolshed51.com

-Original Message-
From: Michael Conley [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, May 22, 2001 2:08 PM
To: '[EMAIL PROTECTED]'
Subject: [PHP] URL Variables


First, I realize this isn't really a PHP question.

If I include variables in a URL that I am passing to a web server over
HTTPS, is the URL (and hence, the variables) encrypted?
example:  https://www.yourdomain.com?firstname=michaellastname=conley

I need to make sure that the firstname and lastname information is not sent
over the internet in clear text.  



-- 
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] Regular Expression Question

2001-05-22 Thread Dylan Finney

Hello,

I was wondering if there is a way to match a pattern, then delete the entire
line containing the pattern.  I.E. (if I was searching for pattern in a
file containing

pattern:info:info:info
pattern2:info:info:info
pattern3:info:info:info

is there a way to delete the entire, and only the first line?)

or is there an easier way to just remove a line from a file?

thank you

Dylan Finney
www.healthcoast.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] ftp

2001-05-22 Thread Glenda Robalino

Hi..
maybe you could help me, I want to make an FTP but whithout Ftp_open and all 
those functions, is there any way???
tx
_
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.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]




  1   2   >