[PHP] Problems sending mails with PHP

2001-10-29 Thread Bruno

Yesterday everything was working fine, but today I got to my office and my
PHP couldn't send mails anymore. I get the next message in the apache log :

sh: sendmail -t -i: command not found

I've tried to change the php.ini mail section to point to the exact sendmail
path, but I get the same message.

Does anyone know what this problem is about?

Thank you!

Bruno



-- 
PHP General Mailing List (http://www.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 with From: and Reply to:

2001-10-29 Thread Per Hugosson

Hi,

I´m using php to send form data from our web page. When a visitor
fills in the form he adds his email address, but I cant get it to
show up in the From:-line. Instead I get From: Apache... which is
totally wrong of course. Our auto-reply goes to
[EMAIL PROTECTED] instead of to the senders adress. What do I
do wrong?

This is my script:

?php
mail([EMAIL PROTECTED], Press Picture Download,
From: $emailadress\n
X-Originating-IP: [$REMOTE_ADDR]\n
Content-Type: text/plain; charset=iso-8859-1\n
Reply-To: $emailadress\n\n Name: $name\n Company: $company\n Adress:
$adress\n Email: $emailadress\n Business: $business\n Send info:
$noinfo\n Comments: $comments);
?

and this is what I get:

Date: Wed, 24 Oct 2001 14:14:57 +0200
From: Apache [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: Press Picture Download

  Name: Bla bla bla
  Company: Bla bla bla
  Adress:  Bla bla bla
  Email: [EMAIL PROTECTED]
  Business: Bla bla bla
  Send Snowcrash info:
  Comments: Bla bla bla

From: [EMAIL PROTECTED]
X-Originating-IP: [111.111.111.111]
Content-Type: text/plain; charset=iso-8859-1
Reply-To: [EMAIL PROTECTED]
--
__
Snowcrash - Per Hugosson
Phone +46 (0)8 442 98 30
Fax +46 (0)8 442 98 11
Cell +46 (0)70 318 49 93


[PHP] Re: Problems sending mails with PHP

2001-10-29 Thread CC Zona

In article [EMAIL PROTECTED],
 [EMAIL PROTECTED] (Bruno) wrote:

 Yesterday everything was working fine, but today I got to my office and my
 PHP couldn't send mails anymore. I get the next message in the apache log :
 
 sh: sendmail -t -i: command not found
 
 I've tried to change the php.ini mail section to point to the exact sendmail
 path, but I get the same message.

You did restart the server after making the changes to php.ini, right? 

From http://php.net/configuration: The configuration file (called 
php3.ini in PHP 3.0, and simply php.ini as of PHP 4.0) is read when PHP 
starts up. For the server module versions of PHP, this happens only once 
when the web server is started.

-- 
CC

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




[PHP] Re: Problem with From: and Reply to:

2001-10-29 Thread CC Zona

In article p05100304b802cdc3b801@[212.247.198.195],
 [EMAIL PROTECTED] (Per Hugosson) wrote:

  I cant get it to 
 show up in the From:-line. Instead I get From: Apache... which is 
 totally wrong of course. Our auto-reply goes to 
 [EMAIL PROTECTED] instead of to the senders adress. What do I 
 do wrong?
 
 This is my script:
 
 ?php
 mail([EMAIL PROTECTED], Press Picture Download,
 From: $emailadress\n
 X-Originating-IP: [$REMOTE ADDR]\n
 Content-Type: text/plain; charset=iso-8859-1\n
 Reply-To: $emailadress\n\n Name: $name\n Company: $company\n Adress: 
 $adress\n Email: $emailadress\n Business: $business\n Send info: 
 $noinfo\n Comments: $comments);
 ?

Try changing the line terminators from \n to (RFC-compliant) \r\n.

-- 
CC

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




[PHP] Parse Error

2001-10-29 Thread Alberto

Parse error: parse error, expecting `T_VARIABLE' in
/sdr/httpd/Prisa/DATA/private/libs/captura/valores.php on line 18


?
/
//
// Trabaja con valores/indices
//
/

include(/sdr/httpd/Prisa/DATA/private/libs/db/db_sql.lib);

class val_valores
{
/
//
// Todos los campos de la tabla
//
/

var VAL_ID; -- Line 18
var VAL_TICKER;
var VAL_ID_FEED;


Where is the problem? Can't figure it :(



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




Re: [PHP] Parse Error

2001-10-29 Thread Alexander Weber

Just use 

var $VAL_ID;

Names of variables always start with a $ sign.


Alberto wrote:
 
 Parse error: parse error, expecting `T_VARIABLE' in
 /sdr/httpd/Prisa/DATA/private/libs/captura/valores.php on line 18

-- 
PHP General Mailing List (http://www.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] Parse Error

2001-10-29 Thread james . fairbairn

might be a syntax error in the .lib file you are including (missing ;,
possibly)... let me know.

-Original Message-
From: Alberto [mailto:alberto arround [EMAIL PROTECTED]]
Sent: 29 October 2001 10:14
To: [EMAIL PROTECTED]
Subject: [PHP] Parse Error


Parse error: parse error, expecting `T_VARIABLE' in
/sdr/httpd/Prisa/DATA/private/libs/captura/valores.php on line 18


?
/
//
// Trabaja con valores/indices
//
/

include(/sdr/httpd/Prisa/DATA/private/libs/db/db_sql.lib);

class val_valores
{
/
//
// Todos los campos de la tabla
//
/

var VAL_ID; -- Line 18
var VAL_TICKER;
var VAL_ID_FEED;


Where is the problem? Can't figure it :(



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

-- 
PHP General Mailing List (http://www.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] Parse Error

2001-10-29 Thread james . fairbairn

oops, missed that one!

-Original Message-
From: Alexander Weber [mailto:[EMAIL PROTECTED]]
Sent: 29 October 2001 10:08
To: Alberto
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] Parse Error


Just use 

var $VAL_ID;

Names of variables always start with a $ sign.


Alberto wrote:
 
 Parse error: parse error, expecting `T_VARIABLE' in
 /sdr/httpd/Prisa/DATA/private/libs/captura/valores.php on line 18

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

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




[PHP] Re: Parse Error

2001-10-29 Thread Valentin V. Petruchek

Try this:

var $VAL_ID;
var $VAL_TICKER;
var $VAL_ID_FEED;





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




[PHP] PHP changing my JavaScript??

2001-10-29 Thread Moloko

Hi All,
got a strange problem with a PHP include file that contains all my
JavaScript functions. This file is included on every page in my site and
contains some image swap behavious amongst other things. The first time I go
into the site, however, I get all sorts of JavaScript errors which I have
traced to the fact that lots of quotes are being dumped into the JavaScript
for some reason, screwing up the syntax. As soon as I hit refresh, the
quotes disappear and the page loads fine anyone got any ideas as to why
this is happening??

example of screwed up script:
var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0;
ia.length; i++)

this is how it should look:
var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; ia.length;
i++)


any ideas at all much appreciated!


--
Moloko
'When the going gets weird, the weird turn pro' - Dr Gonzo
GCM/CS/IT/MC d-- S++:- a-- C++ U--- P+ L !E W+++$ N+ K+ w+++$ M+ PS+++ PE-
PGP- t+ 5- X-- R* tv++ b+++ DI D G e h-- r++ y++



-- 
PHP General Mailing List (http://www.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] Function not found

2001-10-29 Thread De Necker Henri

Where can i find the code for the array_search() function in php4.I do
have php4 but the function isnt found.The in_array() function is found. 

-- 
PHP General Mailing List (http://www.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 with From: and Reply to:

2001-10-29 Thread Richard Heyes

 ?php
 mail([EMAIL PROTECTED], Press Picture Download,
 From: $emailadress\n
 X-Originating-IP: [$REMOTE_ADDR]\n
 Content-Type: text/plain; charset=iso-8859-1\n
 Reply-To: $emailadress\n\n Name: $name\n Company: $company\n Adress:
 $adress\n Email: $emailadress\n Business: $business\n Send info:
 $noinfo\n Comments: $comments);
 ?

You appear to be missing the body argument, which goes between the subject
and header arguments.

--
Richard Heyes
http://www.phpguru.org/frederick/
The good thing about American-English is that you can arbitrarily make up
words if you're stuck in the middle of a sentence with no way out


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




[PHP] Re: PHP changing my JavaScript??

2001-10-29 Thread _lallous

it happened to me when i enter the page for the very first time and I use
session_start()

I suggest to make the page reload itself w/ a parameter so that the first
pass to the site will screw the javascript and then automatically 2nd pass
(which is self called) is okay.


Moloko [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Hi All,
 got a strange problem with a PHP include file that contains all my
 JavaScript functions. This file is included on every page in my site and
 contains some image swap behavious amongst other things. The first time I
go
 into the site, however, I get all sorts of JavaScript errors which I have
 traced to the fact that lots of quotes are being dumped into the
JavaScript
 for some reason, screwing up the syntax. As soon as I hit refresh, the
 quotes disappear and the page loads fine anyone got any ideas as to
why
 this is happening??

 example of screwed up script:
 var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
 var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0;
 ia.length; i++)

 this is how it should look:
 var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
 var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0;
ia.length;
 i++)


 any ideas at all much appreciated!


 --
 Moloko
 'When the going gets weird, the weird turn pro' - Dr Gonzo
 GCM/CS/IT/MC d-- S++:- a-- C++ U--- P+ L !E W+++$ N+ K+ w+++$ M+ PS+++ PE-
 PGP- t+ 5- X-- R* tv++ b+++ DI D G e h-- r++ y++





-- 
PHP General Mailing List (http://www.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.ini executable

2001-10-29 Thread Phil Driscoll

On Sunday 28 October 2001 11:05 pm, jtjohnston wrote:
 Has anyone made a Windows executable to configure the php.ini? ... just
 asking, before I find myself doing it myself.

The windows installer version of the php distribution configures php.ini, but 
only deals with the bare minimum settings to get the software working.
-- 
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] Delivering NAMED pdf files

2001-10-29 Thread George Pitcher

Thanks to all who offered suggestions.

I have now solved the problem.

Realising that what was actually happening was the offered filename being
the same as the php script name, I built a routine which checks to see if a
script with the desired filename.php exists and if not it copies my script
to  a file with that name. This takes place when the page is first loaded,
redirecting to the next page in the web-process (remember that I'm doing all
this with Lasso/Filemaker). The button on that page then calls for the
filename script which pushes out the correctly named pdf document to the
user. I have another button which asks for confirmation that the download
was completed satisfactorily and that is used to delete the temporary
filename.php script.

This methgod may be of use to someone else. If so, please email me and I'll
share my code.

Regards

George P in Edinburgh and looking forward to Frankfurt next week


- Original Message -
From: Bill Rausch [EMAIL PROTECTED]
To: George Pitcher [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Friday, October 19, 2001 8:22 PM
Subject: RE: [PHP] Delivering NAMED pdf files


 George,

 Rasmus' suggestion is correct, but he was terse as usual :) and you
 might not have understood what he was saying.

 My solution is to present a list of the filenames available as LINKS
 (to non-existent files). Then the script does what you've already
 got.  The problem is that some browsers cheat and ignore the
 filename that you send in the headers because they think they know
 better because of the URL that is currently active. So you fool them
 by making a fake URL.

 In my case I have links that look like:
 a href=/dl.php/file.pdffile.pdf/a

 and my dl.php script looks something like:

 ...
 $uri = urldecode(substr($REQUEST_URI,8));   # skip over the /dl.php/
 $x = strpos( $uri, ? ); # get rid of trailing SID, etc.
 if( $x  0 )
  $uri = substr($uri,0,$x);

 header( ...
 header( ...

 readfile( $realfileloc/$uri );
 ...

 Bill
 --
   Bill Rausch, Software Development, Unix, Mac, Windows
   Numerical Applications, Inc.  509-943-0861   [EMAIL PROTECTED]


_
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 Digest 29 Oct 2001 12:06:36 -0000 Issue 963

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


php-general Digest 29 Oct 2001 12:06:36 - Issue 963

Topics (messages 72659 through 72706):

SSI
72659 by: Gary
72665 by: Christian Dechery
72666 by: Gary

Re: Breaking a string
72660 by: speedboy

Re: php-mysql question
72661 by: David Robley

Re: sending email to php script
72662 by: David Robley

Re: SMTP
72663 by: David Robley
72664 by: Lucas Chan

How to determine a valid Date
72667 by: Carlos Fernando Scheidecker Antunes
72676 by: Julio Nobrega
72677 by: David Robley

feature sugestion
72668 by: Ray Todd Stevens
72673 by: Kurt Lieber

Problem appending data in a file with fopen(ftp://...,a;)
72669 by: Dave Létourneau
72671 by: Kurt Lieber
72674 by: Dave Létourneau
72678 by: David Robley
72679 by: Kurt Lieber

now I can compile
72670 by: Ray Todd Stevens

Attention Die-Hard SEC Fans!
72672 by: cdubbayou.hotmail.com

Re: phpmyadmin is installed, now how to access it?
72675 by: Chip

MySQL command log
72680 by: Richard Baskett
72681 by: David Robley

Array's
72682 by: De Necker Henri
72683 by: _lallous

Re: php.ini executable
72684 by: _lallous
72705 by: Phil Driscoll

Re: Random
72685 by: _lallous

mySQL table update
72686 by: Niklas Lampén

Re: Array
72687 by: De Necker Henri
72688 by: _lallous

POSTing values to file
72689 by: Michiel van Heusden
72690 by: _lallous

Problems sending mails with PHP
72691 by: Bruno
72693 by: CC Zona

Problem with From: and Reply to:
72692 by: Per Hugosson
72694 by: CC Zona
72703 by: Richard Heyes

Parse Error
72695 by: Alberto
72696 by: Alexander Weber
72697 by: james.fairbairn.bt.com
72698 by: james.fairbairn.bt.com
72699 by: Valentin V. Petruchek

Re: [PHP-DB] mySQL table update
72700 by: DL Neil

PHP changing my JavaScript??
72701 by: Moloko
72704 by: _lallous

Function not found
72702 by: De Necker Henri

Re: Delivering NAMED pdf files
72706 by: George Pitcher

Administrivia:

To subscribe to the digest, e-mail:
[EMAIL PROTECTED]

To unsubscribe from the digest, e-mail:
[EMAIL PROTECTED]

To post to the list, e-mail:
[EMAIL PROTECTED]


--



How do you get a SSI to work on a php page?

TIA
Gary





At 19:04 28/10/01 -0500, Gary wrote:
How do you get a SSI to work on a php page?

you don't need SSI if you're running PHP... just use include()...

_
. Christian Dechery
. . Gaita-L Owner / Web Developer
. . http://www.webstyle.com.br
. . http://www.tanamesa.com.br





Yes I do, it is to run a pre-exiting program. I figured it out. I was 
uing double quotes in the ssi and excaping them when echoing. I should 
of been using single quotes.

Thanks
Gary

Christian Dechery wrote:

 At 19:04 28/10/01 -0500, Gary wrote:
 
 How do you get a SSI to work on a php page?
 
 
 you don't need SSI if you're running PHP... just use include()...
 
 _
 . Christian Dechery
 . . Gaita-L Owner / Web Developer
 . . http://www.webstyle.com.br
 . . http://www.tanamesa.com.br
 





 I was looking to take a string like Dan or Dan is great and return it
 like

 D
 a
 n...

http://www.php.net/manual/en/function.wordwrap.php





On Fri, 26 Oct 2001 23:27, Gerard Onorato wrote:
 Hello,

 I am a recent return to the list. Wow has the traffic grown! This is
 awesome.

 I have a couple of questions and one may be a RTFM but I can't find the
 answer.

 #1) While I thought I was extremely familiar with the MYSQL functions
 available in PHP I found on e in a code snippet that I have not used
 before and can't find. It is simply MYSQL(dbname, querystring). On a
 *nix box with Apache it is returning a resource ID but on a w2k box
 with apache (or iss) it is returning nothing at all. It does execute
 the query however. Any ideas or any pointer as to where I can actually
 find this function would be appreciated! Thanks.

An older version of the docs here shows that mysql is available for 
downwards compatibility, from mysql_db_query, which is deprecated since 
4.06. Changing to mysql_query is recommended.

 #2) Does anyone know of a convention / conference which will have any
 PHP coverage in the North East?

Northeast of where :-)

-- 
David Robley  Techno-JoaT, Web Maintainer, Mail List Admin, etc
CENTRE FOR INJURY STUDIES  Flinders University, SOUTH AUSTRALIA  

   I tripped over the lamp plug, Tom said cordially.




On Sat, 27 Oct 2001 03:23, JSheble wrote:
 A while ago an email came through here about how to parse out email
 message from a php script.  The thing that was mostly of interest to me
 is the ability to send an email to a php script, I guess through 

[PHP] Re: Problems sending mails with PHP

2001-10-29 Thread Bruno

Yes, I restarted the apache web server. ¿I suppose this is enough, no?

Bruno

Cc Zona [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 In article [EMAIL PROTECTED],
  [EMAIL PROTECTED] (Bruno) wrote:

  Yesterday everything was working fine, but today I got to my office and
my
  PHP couldn't send mails anymore. I get the next message in the apache
log :
 
  sh: sendmail -t -i: command not found
 
  I've tried to change the php.ini mail section to point to the exact
sendmail
  path, but I get the same message.

 You did restart the server after making the changes to php.ini, right?

 From http://php.net/configuration: The configuration file (called
 php3.ini in PHP 3.0, and simply php.ini as of PHP 4.0) is read when PHP
 starts up. For the server module versions of PHP, this happens only once
 when the web server is started.

 --
 CC



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




RE: [PHP] SSI

2001-10-29 Thread Patrick Dunford

The virtual( ) function is the same as #include on Apache

If you're running a script, you may need to simulate the CGI variables as
they aren't automatically available to a script that you would normally run
with the #exec SSI directive.

=
Patrick Dunford, Christchurch, NZ
http://pdunford.godzone.net.nz/
http://www.trainweb.org/ferrymead/


 -Original Message-
 From: Gary [mailto:[EMAIL PROTECTED]]
 Sent: Monday, 29 October 2001 14:59
 To: [EMAIL PROTECTED]
 Subject: Re: [PHP] SSI


 Yes I do, it is to run a pre-exiting program. I figured it out. I was
 uing double quotes in the ssi and excaping them when echoing. I should
 of been using single quotes.

 Thanks
 Gary

 Christian Dechery wrote:

  At 19:04 28/10/01 -0500, Gary wrote:
 
  How do you get a SSI to work on a php page?
 
 
  you don't need SSI if you're running PHP... just use include()...
 
  _
  . Christian Dechery
  . . Gaita-L Owner / Web Developer
  . . http://www.webstyle.com.br
  . . http://www.tanamesa.com.br
 




-- 
PHP General Mailing List (http://www.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: Array

2001-10-29 Thread Tim Ward

This seems way too complicated. I do this sort of thing all the time from a
mysql db. I've no idea where you're getting the data from but if it was from
a mysql db I'd just do

$result = mysql_query(SELECT field1, field2, field3, field4 FROM tablename
WHERE condition);
while ($array = Mysql_fetch_array($result)) $values[] = $array;
...
you van then do ...
foreach($values as $row)
{   echo( {$row[field1]}, {$row[field1]}, {$row[field1]}br);
// or whatever you want to do
}

Tim Ward

--
From:  De Necker Henri [SMTP:[EMAIL PROTECTED]]
Sent:  29 October 2001 07:26
To:  PHP-General (E-mail)
Subject:  RE: Array

Now i did the following :
My output is only null or blank values!,but my data is there!

 while($row=db_range()){
  list($co_id,$surname,$init,$ba) = $row;
  echo $co_id $surnamebr;  # This works perfect!
  $values[$i]['id'] = $co_id;
  $values[$i]['surname'] = $surname;
  $values[$i]['init'] = $init;
  $values[$i]['ba'] = $ba;
  $cid = $values[$i]['id'];
  echo $idbr  ;   # Doesnt wanna work
  list($a,$b,$c,$d) = $values[$i];
  echo $a ; # Doesnt wanna work
  $i++; 
}//end while 1

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




[PHP] Email limit

2001-10-29 Thread Richard Baskett

What is the limit to the amount of emails you can send out at once.. or in a
for loop, to php's mail function?

Rick


-- 
PHP General Mailing List (http://www.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] GD GIF or PNG Detect Part 2

2001-10-29 Thread Chris

I received good advice from my previous question:
Before creating a graphic, I would like to detect what type of graphic
files are supported. For example if GD is enabled and GIF Support is
available I'll create an GIF image. I know phpinfo() will tell me this
but I don't want to burden the user with this check.

I implemented the following:
if (ImageTypes()  IMG_GIF)
{
echo GIF support enabled;
}
elseif (ImageTypes()  IMG_PNG)
{
echo PNG support enabled;
else
{
echo This install of PHP does NOT support graphics creation;
}

However when there are no GD libraries installed the following error is
thrown:
Fatal error: Call to undefined function: imagetypes()…

Any suggestions to prevent the error message being thrown. Are there
other methods to detect the presence GD libraries before testing for GIF
or PNG support?


Regards,
Chris





-- 
PHP General Mailing List (http://www.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] GD GIF or PNG Detect Part 2

2001-10-29 Thread Daniel Reichenbach

 However when there are no GD libraries installed the 
 following error is
 thrown:
 Fatal error: Call to undefined function: imagetypes()…
 
 Any suggestions to prevent the error message being thrown. Are there
 other methods to detect the presence GD libraries before 
 testing for GIF
 or PNG support?
How about using something like this?

if (function_exists('ImageTypes')) {
// GD functions are available
} else {
// GD functions not available
}

http://www.php.net/manual/en/function.function-exists.php is the place
in the manual :)

Daniel



--
PHP General Mailing List (http://www.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] Email limit

2001-10-29 Thread Matt Friedman

I imagine that's only limited by your available bandwidth. If you try to
send emails out faster than your bandwidth will allow you'll get a slowdown
on your email server.

I use sleep() between each email to lessen the load on the server.

Matt.

- Original Message -
From: Richard Baskett [EMAIL PROTECTED]
To: PHP General [EMAIL PROTECTED]
Sent: Monday, October 29, 2001 6:43 AM
Subject: [PHP] Email limit


 What is the limit to the amount of emails you can send out at once.. or in
a
 for loop, to php's mail function?

 Rick


 --
 PHP General Mailing List (http://www.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] Sending two attachments

2001-10-29 Thread Jason G.

I believe one of your boundarys has -- at the end.  According to the RFC 
dealing with this subject, stick -- on the end of only the last boundary.

-Jason Garber
IonZoft.com








At 02:13 PM 10/12/2001 +0530, Sharat Hegde wrote:
Hello,

I am trying to send multiple attachments by email from my PHP program (two
to be precise).

I have put the relevant codes to send attachments, and separated it with the
Message Boundary. The first attachment comes fine. The second attachment is
also coming to my Inbox, but for some reason, Outlook Express (my mail
client) does not recognize the 2nd attachment. The message header and the
size of the email indicates that the content has two attachments.

Any clues?

The email looks like this after the standard headers for From and To:

MIME-Version: 1.0
Content-Type: multipart/mixed; boundary=Message-Boundary

This is a MIME encoded message.

--Message-Boundary
Content-Type: text/plain; charset=iso-8859-1

Testing mail component

--Message-Boundary
Content-Type: application/octet-stream; name=ValleyView1.csv
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename=ValleyView1.csv

Um9vbUlkLFNlcmlhbE51bWJlcixEaXNwbGF5T3JkZXIsRGVzY3JpcHRpb24sUmF0ZVR5cGUsQWR1
bHRQcmljZSxDaGlsZFByaWNlLE51bURheXMsTWluUGVyc29ucyxNYXhQZXJzb25zLEFwcGxpY2Fi
bGVEYXlzClIwMDIsMiwxLERvdWJsZSAzIG5pZ2h0cyxWQUwsMjI1LjAwLDAuMDAsMywxLDIsIjAs
MSwyIgpSMDAyLDEsMixEb3VibGUgNCBuaWdodHMsVkFMLDI4MC4wMCwwLjAwLDQsMSwyLCIwLDEi
Cg==

--Message-Boundary--
Content-Type: application/octet-stream; name=junk.txt
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename=junk.txt

SnVuayBUZXh0IEZpbGUKTGluZTIKTGluZTMK

--Message-Boundary--

--
PHP General Mailing List (http://www.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] Session handling with cookies??

2001-10-29 Thread Andy

Hello,

I have developed a member login system with cookies. Now I have the prob,
that the session stayes existend when the browser is closed. This could
couse a problem in Internet caffes for example. As second thing, I have
realized, that it depends on the clients clock!! I am sending a cookie which
expires in time() + $expireseconds. Unfortunatelly the time command takes
the tim from the server and the cookie expires checking the client time.

So... does anybody know how...

1) I get the system to delete the cookie as soon as I leave the site, or
close it
2) How to work on the same time.

Thanx for any help


Cheers Andy



-- 
PHP General Mailing List (http://www.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] best linux choice for php / mysql ???

2001-10-29 Thread webmaster

I've been using PHP/mySQL on my web host's site for a year or so, and I now
need to create my own installation ...

Given my relatively limited linux background, which distribution woud I find
easiest to install? I'll be needing PHP, mySQL, and PDFlib ...

I've done my homework, I've studied every linux text I could get my hands
on, and I feel like I'm ready to start ... but I don't want to install one
distribution, only to find that it is inappropriate for my needs ... Call me
lazy, but I only want to do this once (this week, anyway).

Any help would be most appreciated.

Thanks,

Kenn



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




[PHP] PHP templates vs XML

2001-10-29 Thread DL Neil

In an on-again-off-again desultory style, I keep trying to find the time to study 
template systems - and quite
separately see if I can find a practical use for XML.

The idea of a template system is that the HTML code/presentation of the final view to 
the user/browser, can be
devised/maintained quite separately from the PHP code required to pull data out of the 
back-end
db/processing/whatever. Correct?

The systems I've looked at do this by allowing you to put 'tags' into the HTML which 
are subsequently
expanded/replaced with 'real data' by the template processor immediately before 
presentation to the browser.

Now, again broadly speaking, XML allows us to define our own tags, which are 
subsequently ... Correct?

So: when would you use a template system and when would you use XML?
(and thus: on which one should I concentrate my research? )

Any all pointers/references to online information sources will be much appreciated.
=dn



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




[PHP] Displaying please wait

2001-10-29 Thread DL Neil

Is there someone 'up' on the way Apache works who can offer some comment please?

Th how do I display 'please wait'  question was asked by someone (else) last week. 
The standard answer is
no - server-side PHP assembles an HTML page, and when it is completed the whole page 
is transmitted from the
web server to the browser. However is this strictly true?

I managed to do something warned about in lesson two of ComSc 101, and put my PHP into 
a never-ending loop (hey,
after all these years, it's just to keep me humble...). What was happening was that a 
database record would be
read in, a whole pile of debug 'echo's sent to the screen to demonstrate the 
processing, then the next record,
and so on... the governor/loop limit code failed and was stuck on 'true' so while true 
loop forever...

What I saw on the screen - particularly the behavior of the scroll bars, was that a 
certain amount of data
(let's call it a 'buffer') was produced within Apache, and then it would be sent to 
the screen, then there would
be a short pause, then another 'buffer' load would be displayed in the browser, then a 
pause... This behavior
similar to response from a long-distance www link or taking stuff down a slow dial-up 
line from an overloaded
server; BUT everything on my machine is local !

Does this mean that Apache retains a certain amount of the page internally, but once 
the volume grows, Apache
relieves storage pressure by transmitting even though the whole HTML page has not yet 
been resolved? If so, any
idea what the 'buffer' size might be? Or is there any way to adjust that 'buffer' size 
HTML page by page?

Enquiring minds and all that...
=dn




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




[PHP] Database tags ala Lasso

2001-10-29 Thread Sverre Johan Tøvik

Hi,

For the futurists around here: Is there any chance that php will 
include database tags ala Lasso? For those who don't know what I 
mean, here's an axample (not quite correct Lasso code, but it should 
get the point across):

[db select=somedb]
[db query=sql]

table

[record]
tr
!-- everything in this tag is repeated for each record
td
[field=name]
/td
td
[field=address]
/td
/tr
[/record]
/table


Err... You get the point... Or, for those of you who have problems 
recognizing simple stuff when you see it (like myself when trying to 
learn applescript when I was used to stuff like C), the point is that 
you don't have to do all that annoying escaping of quotes, and if you 
open the code in a graphical editor, you can edit to your heart's 
delight, cuz the db tags stays put.


Regards,

Sverre Johan Toevik
-- 
disclaimer I speak for myself only! /disclaimer
to be yourself, in a world that tries, night and day, to make you just
like everybody else - is to fight the greatest battle there ever is to
fight, and never stop fighting -- e.e. cummings

-- 
PHP General Mailing List (http://www.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/Oracle db connection

2001-10-29 Thread toni baker

After running openlink.sh and the set command the
following variables or set:

ODBCINI=/usr/local/src/bin/odbc.ini
ODBCINSTINI=/usr/local/src/bin/odbcinst.ini
OLDPWD=/home/httpd/html/ronsdev
OPTERR=1
OPTIND=1
ORACLE_HOME=/home/oracle/OraHome1
ORACLE_SID=data1  

However when odbctest I still get the following error:

Enter ODBC connect string (? shows list):
DSN=[pc963];UID=test;PWD=test
OpenLink: RPC: Unknown host
[OpenLink][ODBC]RPC: Unknown host, SQLSTATE=08004
[OpenLink][ODBC]Connection rejected by data source,
SQLSTATE=08004

Have a nice day.[tbaker@PC963 tbaker]$
/usr/local/src/odbcsdk/examples/odbctest
OpenLink ODBC Demonstration program
This program shows an interactive SQL processor

Enter ODBC connect string (? shows list):
DSN=[pc963];UID=scott;PWD=tiger
OpenLink: RPC: Unknown host
[OpenLink][ODBC]RPC: Unknown host, SQLSTATE=08004
[OpenLink][ODBC]Connection rejected by data source,
SQLSTATE=08004

Any ideas as to what may be the problem. 

--- Andrew Hill [EMAIL PROTECTED] wrote:
 Toni,
 
 You need to enter a string of the syntax:
 
 DSN=[name of your dsn]
 
 Since nothing shows up with a ? I bet you haven't
 set your ODBCINI
 environment variables.
 Running the openlink.sh against the current shell
 should do this:  .
 openlink.sh
 If you are doing it by hand, you need to set:
 ODBCINI (pointing to the odbc.ini)
 ODBCINSTINI (pointitng to the odbcinst.ini)
 LD_LIBARARY_PATH (pointing to the lib directory that
 contains the
 libiodbc.so file)
 
 DSNs need to be configured in the odbc.ini
 
 Best regards,
 Andrew Hill
 Director of Technology Evangelism
 OpenLink Software  http://www.openlinksw.com
 Universal Data Access  Data Integration Technology
 Providers
 
  -Original Message-
  From: toni baker [mailto:[EMAIL PROTECTED]]
  Sent: Friday, October 26, 2001 11:11 AM
  To: [EMAIL PROTECTED];
 [EMAIL PROTECTED]
  Subject: RE: [PHP] php/Oracle db connection
 
 
  When I run odbctest I get the following prompt:
 
  OpenLink ODBC Demonstration program
  This program shows an interactive SQL processor
 
  Enter ODBC connect string (? shows list): ?
 
  DSN| Description
 

---
 
  Enter ODBC connect string (? shows list):
 
  What ODBC connet string should I enter here?
 
  Thanks Toni.
 
  --- Andrew Hill [EMAIL PROTECTED] wrote:
   Toni,
  
   Note the Unknown host.
   Check your odbc.ini for the Host field of the
 DSN
   you are using.
   Ensure it's resolvable.  Try an IP address
 instead
   maybe.
  
   Also, set the variables in the environment and
 see
   if your DSN works in
   odbctest without PHP in the mix.
  
   Best regards,
   Andrew Hill
   Director of Technology Evangelism
   OpenLink Software  http://www.openlinksw.com
   Universal Data Access  Data Integration
 Technology
   Providers
  
-Original Message-
From: toni baker [mailto:[EMAIL PROTECTED]]
Sent: Thursday, October 25, 2001 4:56 PM
To: [EMAIL PROTECTED]
Subject: [PHP] php/Oracle db connection
   
   
I have successfully compiled php with linked
 iODBC
driver manager as an Apache shared module.
   However
when trying to connect php to the Oracle
 database
   I
get an error.  The error and the sample
 connection
code is below.
   
Warning: SQL error: [OpenLink][ODBC]RPC:
 Unknown
   host,
SQL state 08004 in SQLConnect in
/home/httpd/html/ronsdev/putenv.php on line 9
can not connect to DSN: data1.tsl.state.tx.us
   
?
   
  
 

putenv(LD_LIBRARY_PATH=/usr/local/src/odbcsdk/lib);
   
  
 

putenv(ODBCINSTINI=/usr/local/src/bin/odbcinst.ini);
putenv(ODBCINI=/usr/local/src/bin/odbc.ini);
$dsn=data1.tsl.state.tx.us;
$user=scott;
$password=tiger;
$sql=SELECT * FROM scott.emp;
if($conn_id=odbc_connect($dsn,,)) {
  echo connected to DSN: $dsn;
if($result=odbc_do($conn_id, $sql)) {
  echo executing '$sql';
  echo Results: ;
  odbc_result_all($result);
  echo freeing result;
  odbc_free_result($result);
}
else {
  echo can not execute '$sql';
}
  echo closing connection $conn_id;
  odbc_close($conn_id);
}
else {
  echo can not connect to DSN: $dsn;
}
?
   
Can someone help with this?
Thanks Toni
   
   
 __
Do You Yahoo!?
Make a great connection at Yahoo! Personals.
http://personals.yahoo.com
   
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail:
   [EMAIL PROTECTED]
For additional commands, e-mail:
   [EMAIL PROTECTED]
To contact the list administrators, e-mail:
   [EMAIL PROTECTED]
   
   
   
  
  
  
   --
   PHP General Mailing List (http://www.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] fopen for ftp transfers

2001-10-29 Thread Scott

Hi-

I am attempting to transfer files from one server to another via ftp.  I 
am wondering if this is the best method to transfer files within PHP or
should I seek other methods.  Here is the way I am doing it now:

$sendfile =
fopen(ftp:user:[EMAIL PROTECTED]/testfile, w);

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

2001-10-29 Thread WebDev

Hi

what is the script that was mentioned a while back that you use to
allow apache access to a directory that has all world/group access
turned off.  It think the discussion was protecting mysql information
on a shared server.

I know this is a popular topic, sorry.  I did check the archives but
could not find that script name that was mentioned.

Thanks,
-Merle



-- 
PHP General Mailing List (http://www.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] parsing XML turorials, suggestions

2001-10-29 Thread bill

Need to get started parsing XML documents.  I've developed a program to
write them XML a database, but now I need to read them to obtain, for
example, the (cdata) value of title which is nested inside book,
etc.

What's the best place to start?  Does DOMXML have a future?

Tutorials?

Suggestions?

kind regards,

bill hollett


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




[PHP] I cannot figure this one out! I'm going crazy! :)

2001-10-29 Thread Richard Marks

mebbe you can figure out why this dont work! :)

Parse error: parse error, expecting `')'' in /(PATH NOT SHOWN TO PUBLIC,SORRY) 
/www.gzmsoftware.f2s.com/php/fractal.php on line 2



?
function box( int $im,int $x,int $y,int $x2,int $y2,int $color )
{
 imageline( $im,$x,$y,$x2,$y,$color );
 imageline( $im,$x,$y2,$x2,$y2,$color );
 imageline( $im,$x,$y,$x,$y2,$color );
 imageline( $im,$x2,$y,$x2,$y2,$color );
}
function Square(int $x,int $y,int $size,int $pcolor )
{
 if ($size  50)
  break;
 box($img,$x,$y,$x+$size,$y-$size,$pcolor );
 Square($x-$size/4,$y+$size/4,$size/2,$pcolor );
 Square($x+$size-$size/4,$y+$size/4,$size/2,$pcolor );
 Square($x-$size/4,$y-$size+$size/4,$size/2,$pcolor );
 Square($x+$size-$size/4,$y-$size+$size/4,$size/2,$pcolor );
}
Header (Content-type: image/png);
$img = imagecreate ($width,$height);
$color = imagecolorallocate ($img,$tx_r,$tx_g,$tx_b);
$pixel_color = imagecolorallocate ($img,$px_r,$px_g,$px_b);
imagerectangle($img,0,0,$width,$height,$color);
Square ( -1000,1000,2000,$pixel_color );
imagepng($img);
?



Please give me a hand.
thanks,
Sincerely,
GZM Software® WebMaster
[EMAIL PROTECTED]
http://www.gzmsoftware.f2s.com




Re: [PHP] I cannot figure this one out! I'm going crazy! :)

2001-10-29 Thread Rasmus Lerdorf

You don't put type declarations in PHP functions.  ie. get rid of all the 
int things there on line two.

-Rasmus

On Mon, 29 Oct 2001, Richard Marks wrote:

 mebbe you can figure out why this dont work! :)
 
 Parse error: parse error, expecting `')'' in /(PATH NOT SHOWN TO PUBLIC,SORRY) 
/www.gzmsoftware.f2s.com/php/fractal.php on line 2
 
 
 
 ?
 function box( int $im,int $x,int $y,int $x2,int $y2,int $color )
 {
  imageline( $im,$x,$y,$x2,$y,$color );
  imageline( $im,$x,$y2,$x2,$y2,$color );
  imageline( $im,$x,$y,$x,$y2,$color );
  imageline( $im,$x2,$y,$x2,$y2,$color );
 }
 function Square(int $x,int $y,int $size,int $pcolor )
 {
  if ($size  50)
   break;
  box($img,$x,$y,$x+$size,$y-$size,$pcolor );
  Square($x-$size/4,$y+$size/4,$size/2,$pcolor );
  Square($x+$size-$size/4,$y+$size/4,$size/2,$pcolor );
  Square($x-$size/4,$y-$size+$size/4,$size/2,$pcolor );
  Square($x+$size-$size/4,$y-$size+$size/4,$size/2,$pcolor );
 }
 Header (Content-type: image/png);
 $img = imagecreate ($width,$height);
 $color = imagecolorallocate ($img,$tx_r,$tx_g,$tx_b);
 $pixel_color = imagecolorallocate ($img,$px_r,$px_g,$px_b);
 imagerectangle($img,0,0,$width,$height,$color);
 Square ( -1000,1000,2000,$pixel_color );
 imagepng($img);
 ?
 
 
 
 Please give me a hand.
 thanks,
 Sincerely,
 GZM Software® WebMaster
 [EMAIL PROTECTED]
 http://www.gzmsoftware.f2s.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] I cannot figure this one out! I'm going crazy! :)

2001-10-29 Thread Mark Roedel

 -Original Message-
 From: Richard Marks [mailto:[EMAIL PROTECTED]] 
 Sent: Monday, October 29, 2001 9:49 AM
 To: [EMAIL PROTECTED]
 Subject: [PHP] I cannot figure this one out! I'm going crazy! :)
 
 
 mebbe you can figure out why this dont work! :)
 
 Parse error: parse error, expecting `')'' in /(PATH NOT SHOWN 
 TO PUBLIC,SORRY) /www.gzmsoftware.f2s.com/php/fractal.php on line 2
 
 --
 --
 
 ?
 function box( int $im,int $x,int $y,int $x2,int $y2,int $color )

Try changing this to

  function box ($im, $x, $y, $x2, $y2, $color)

(Also in your other function definition.)


---
Mark Roedel   | Blessed is he who has learned to laugh
Systems Programmer|  at himself, for he shall never cease
LeTourneau University |  to be entertained.
Longview, Texas, USA  |  -- John Powell 

--
PHP General Mailing List (http://www.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] Where does mysql keep the records data

2001-10-29 Thread PHP Mail

On my system the mysql and test databases are created in /var/db/mysql/

I created a database called publish and it likewise was stored in 
/var/db/mysql/publish.

I needed to start over with the work on publish so I deleted the publish 
directory. #rm -R /var/db/mysql/publish.

BUT after re-creating the tables all the records still existed, so the 
records weren't in /var/db/mysql/publish. Where is it?

# rm -R /var/db/mysql/publish
# mysqladmin create publish
# mysql
mysql use publish
mysql CREATE TABLE eZAddress_AddressType (
   ID int(11) NOT NULL,
   Name varchar(50),
   ListOrder int(11) DEFAULT '0' NOT NULL,
   Removed int(1) DEFAULT '0' NOT NULL,
   PRIMARY KEY (ID)
);

mysql INSERT INTO eZAddress_AddressType VALUES (1,'Home address',1,0);
ERROR 1062: Duplicate entry '1' for key 1

Where dat data at?


-- 
PHP General Mailing List (http://www.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[2]: [PHP-DB] Performance problems in NC

2001-10-29 Thread WebDev

Hello,

Andy I have been trying to solve the same problem.

But after some testing I have found that it is not only db access that
causes the lag, it seems to be when submitting forms.
I wrote a very simple test script have a form reload itself.  In IE it
happens almost instantly, but in NC it takes up to 5 secs (this is a
lot since it is running locally, no network involved at all).

And the script does have html and body tags (open and close) in
there.

Does NC process forms more vigorously before submitting than IE does??
I don't know.
-Merle


Monday, October 29, 2001, 11:43:27 AM, you wrote:

MN This could be due to missing tags such as /body and /html

 -Original Message-
 From: Andy [mailto:[EMAIL PROTECTED]]
 Sent: Monday, October 29, 2001 6:41 AM
 To: [EMAIL PROTECTED]
 Subject: [PHP-DB] Performance problems in NC
 
 
 Hi there,
 
 I have problems with the performance while using NC. It 
 workes fine with IE.
 As soon as I access the db. It takes aproximatelly 1 -2 min 
 till I see the
 page.
 
 Does anybody know some help?
 
 Thank you
 
 Andy
 
 
 
 -- 
 PHP Database Mailing List (http://www.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] hmm, thanks, but now i have even more troubles :\

2001-10-29 Thread Richard Marks

thanks, but go here, and see what it does now.

http://www.gzmsoftware.f2s.com/php/fractal.html

can ya help mee?

thanks,
Sincerely,
GZM Software® WebMaster
[EMAIL PROTECTED]
http://www.gzmsoftware.f2s.com



Re: [PHP] Where does mysql keep the records data

2001-10-29 Thread Kurt Lieber

On Monday 29 October 2001 07:51 am, you wrote:
 I needed to start over with the work on publish so I deleted the publish
 directory. #rm -R /var/db/mysql/publish.

Um, not that it's PHP-related, but...

You should use drop database instead of manually removing the file.

mysql drop database databasename

--kurt

-- 
PHP General Mailing List (http://www.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] arg, this is crazy :\ - i dont get it, is the variable, uhm, NOT GLOBAL or something?

2001-10-29 Thread Richard Marks

what in the world is wrong here?



?
Header (Content-type: image/png);
$img = imagecreate ($width,$height);
$color = imagecolorallocate ($img,$tx_r,$tx_g,$tx_b);
$pixel_color = imagecolorallocate ($img,$px_r,$px_g,$px_b);
function box( $img, $x, $y, $x2, $y2, $color )
{
 imageline( $img,$x,$y,$x2,$y,$color );
 imageline( $img,$x,$y2,$x2,$y2,$color );
 imageline( $img,$x,$y,$x,$y2,$color );
 imageline( $img,$x2,$y,$x2,$y2,$color );
}
function Square( $x, $y, $size, $pcolor )
{
 if ($size  50)
  break;
 box($img,$x,$y,$x+$size,$y-$size,$pcolor );
 Square($img,$x-$size/4,$y+$size/4,$size/2,$pcolor );
 Square($img,$x+$size-$size/4,$y+$size/4,$size/2,$pcolor );
 Square($img,$x-$size/4,$y-$size+$size/4,$size/2,$pcolor );
 Square($img,$x+$size-$size/4,$y-$size+$size/4,$size/2,$pcolor );
}
imagerectangle($img,0,0,$width,$height,$color);
Square ($img, -1000,1000,2000,$pixel_color );
imagepng($img);
?



thanks,
Sincerely,
GZM Software® WebMaster
[EMAIL PROTECTED]
http://www.gzmsoftware.f2s.com



Re: [PHP] protecting files

2001-10-29 Thread Kurt Lieber

On Monday 29 October 2001 07:37 am, you wrote:

 what is the script that was mentioned a while back that you use to
 allow apache access to a directory that has all world/group access
 turned off.  I

php-cgiwrap.

--kurt

-- 
PHP General Mailing List (http://www.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] and now i get

2001-10-29 Thread Richard Marks

hmm I found out that I had to add global $img; in my functions,
but dangit now I get this error!



br
bFatal error/b:  Cannot break/continue 1 levels
 in b/(MY PATH)/www.gzmsoftware.f2s.com/php/fractal.php/b on line b18/bbr

any clue?
thanks,
Sincerely,
GZM Software® WebMaster
[EMAIL PROTECTED]
http://www.gzmsoftware.f2s.com



Re: [PHP] Where does mysql keep the records data

2001-10-29 Thread Henrik Hudson

To delete a database, the best thing to do is login to your mysql DB 
directly, ie:  mysql -u root -p (the root user is the MySQL root, not the 
sytem root) and supply the password at the prompt. Then do:

DROP DATABASE publish;

This will delete it correctly.  Something that I do is put all my table 
creations into a file and at the top I put DROP DATABASE name and then 
recreate it and all my tables. This will reset your database nicely and you 
can pipe this script into your mysql above, ie:

mysql -u root -p  scriptname

Hope that helps.

Henrik

On Monday 29 October 2001 09:51, PHP Mail wrote:
  On my system the mysql and test databases are created in /var/db/mysql/

  I created a database called publish and it likewise was stored in
  /var/db/mysql/publish.

  I needed to start over with the work on publish so I deleted the publish
  directory. #rm -R /var/db/mysql/publish.

  BUT after re-creating the tables all the records still existed, so the
  records weren't in /var/db/mysql/publish. Where is it?

  # rm -R /var/db/mysql/publish
  # mysqladmin create publish
  # mysql
  mysql use publish
  mysql CREATE TABLE eZAddress_AddressType (
 ID int(11) NOT NULL,
 Name varchar(50),
 ListOrder int(11) DEFAULT '0' NOT NULL,
 Removed int(1) DEFAULT '0' NOT NULL,
 PRIMARY KEY (ID)
  );

  mysql INSERT INTO eZAddress_AddressType VALUES (1,'Home address',1,0);
  ERROR 1062: Duplicate entry '1' for key 1

  Where dat data at?

-- 

Henrik Hudson
[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] arg, this is crazy :\ - i dont get it, is the variable,uhm, NOT GLOBAL or something?

2001-10-29 Thread Rasmus Lerdorf

Please read http://us.php.net/manual/en/language.variables.scope.php

On Mon, 29 Oct 2001, Richard Marks wrote:

 what in the world is wrong here?
 
 
 
 ?
 Header (Content-type: image/png);
 $img = imagecreate ($width,$height);
 $color = imagecolorallocate ($img,$tx_r,$tx_g,$tx_b);
 $pixel_color = imagecolorallocate ($img,$px_r,$px_g,$px_b);
 function box( $img, $x, $y, $x2, $y2, $color )
 {
  imageline( $img,$x,$y,$x2,$y,$color );
  imageline( $img,$x,$y2,$x2,$y2,$color );
  imageline( $img,$x,$y,$x,$y2,$color );
  imageline( $img,$x2,$y,$x2,$y2,$color );
 }
 function Square( $x, $y, $size, $pcolor )
 {
  if ($size  50)
   break;
  box($img,$x,$y,$x+$size,$y-$size,$pcolor );
  Square($img,$x-$size/4,$y+$size/4,$size/2,$pcolor );
  Square($img,$x+$size-$size/4,$y+$size/4,$size/2,$pcolor );
  Square($img,$x-$size/4,$y-$size+$size/4,$size/2,$pcolor );
  Square($img,$x+$size-$size/4,$y-$size+$size/4,$size/2,$pcolor );
 }
 imagerectangle($img,0,0,$width,$height,$color);
 Square ($img, -1000,1000,2000,$pixel_color );
 imagepng($img);
 ?
 
 
 
 thanks,
 Sincerely,
 GZM Software® WebMaster
 [EMAIL PROTECTED]
 http://www.gzmsoftware.f2s.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] and now i get

2001-10-29 Thread Rasmus Lerdorf

You can't 'break' out of a function.  You need to use 'return'.  You might 
want to try one of the many irc channels instead.  This mailing list 
really isn't for line-by-line debugging of your scripts.

-Rasmus

On Mon, 29 Oct 2001, Richard Marks wrote:

 hmm I found out that I had to add global $img; in my functions,
 but dangit now I get this error!
 
 
 
 br
 bFatal error/b:  Cannot break/continue 1 levels
  in b/(MY PATH)/www.gzmsoftware.f2s.com/php/fractal.php/b on line b18/bbr
 
 any clue?
 thanks,
 Sincerely,
 GZM Software® WebMaster
 [EMAIL PROTECTED]
 http://www.gzmsoftware.f2s.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 templates vs XML

2001-10-29 Thread php

On Mon, 29 Oct 2001 14:02:32 -, you wrote:

The idea of a template system is that the HTML code/presentation of the final view to 
the user/browser, can be
devised/maintained quite separately from the PHP code required to pull data out of 
the back-end
db/processing/whatever. Correct?

The systems I've looked at do this by allowing you to put 'tags' into the HTML which 
are subsequently
expanded/replaced with 'real data' by the template processor immediately before 
presentation to the browser.

Now, again broadly speaking, XML allows us to define our own tags, which are 
subsequently ... Correct?

So: when would you use a template system and when would you use XML?
(and thus: on which one should I concentrate my research? )

I tend to use FastTemplate or similar systems to template most of my
output - be that output HTML, Javascript - or XML.  That, and the way
a program is structured (collecting, processing and only then
outputting it in whatever format) makes adding in different
assortments of data in a variety of output formats truely trivial.  

In the current case, it's book information, so I collect ISBN data,
which gets output.  In an upcoming project, it will be news snippets -
press releases and the like, where the templates will be updated and
added to at will for different styles of output, as well as serialised
(PHP/WDDX) and XML/RDF/Javascript output .


The XML related templates of which you speak are generally XSL
Templates, which are a programming language in themselves, and the XML
parsing  into XSL is an extensive overhead to carry.

Alister

-- 
PHP General Mailing List (http://www.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 with very big array !

2001-10-29 Thread Nicolas Guilhot

Hi guys,

I have an sql query returning a result of nearly 150 000 rows. I use the
PEAR DB::getAll method to retrieve this result as an array which is very big
indeed (about 300Mb). I can't use the MySQL LIMIT statement because I need
to do sorting stuff on the result array.
My concern is that even after processing the last line of the script, the
process continue running for about 20~30 minutes (I am watching running
processes using the unix command 'top'). For information, querying the
database, sorting the array and displaying results with a pager system only
takes 3 minutes.

I have made a short example that reproduces the problem. If you could test
it (IT WILL USE ABOUT 120Mb OF RAM) and tell me if you've got the same
problem it would be nice. You need to create a test database with the
following table :

CREATE TABLE test (
  id mediumint(20) NOT NULL,
  text varchar(255) NOT NULL default '',
  PRIMARY KEY  (id)
)

Then populate it with 150 000 rows using the populate.php script.
Finally, execute the query.php script and use top to see if the process
stops running quickly. For me it takes a lot of time to end (more than 20
minutes).
If you empty the database table, remove one character from the string in the
insertInto function and populate it again, it should work correctly.

Thanks for any answer !!

PS : I am using PHP 4.06, MySQL 3.23.41 and Apache on a bi-processor linux
box with 1Gb RAM.


//--
// populate.php
//--
?php
require_once(DB.php);

function getmicrotime()
{
  list($usec, $sec) = explode( ,microtime());
  return ((float)$usec + (float)$sec);
}

function insertInto($db)
{
  for ($cpt = 0; $cpt  15; $cpt++)
  {
$result = $db-query(INSERT INTO test VALUES('$cpt', 'This is the very
big test n° $cpt. With more text. This time it will take more memory, and
more time to execute. This is very strange. I do not understand why
???'));
  }
}


$db = DB::connect(mysql://user:password@localhost/test);
$time_start = getmicrotime();

insertInto($db);

$time_end = getmicrotime();
$time = $time_end - $time_start;
echo Execution time : $time seconds;
?
//-
//End of populate.php
//-



//-
//query.php
//-
?php
require_once(DB.php);

function getmicrotime()
{
  list($usec, $sec) = explode( ,microtime());
  return ((float)$usec + (float)$sec);
}

$db = DB::connect(mysql://user:password@localhost/test);
$time_start = getmicrotime();

$result = $db-getAll(SELECT * from test);

$time_end = getmicrotime();
$time = $time_end - $time_start;
echo Execution time : $time seconds;
?
//--
//End of query.php
//--


-- 
PHP General Mailing List (http://www.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: Excel to MySQL

2001-10-29 Thread Mike Frazer

Dump the Excel DB to a text file and use the string parsing functions.
Working with two large databases will suck up most of your system resources;
working with a large text file one line at a time and one database one
record of a time may be a little slower but it is going to be a million
times easier on your system.

Mike Frazer



Daniel Harik [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Hello guys

 Thank You very much for your previous replies, could u help me with 1
 more thing?

 You see i have huge(for me) 100 000 record access table, i wanted to
 convert it to mysql, i thought of making php convertor that uses odbc
 and mysql, but maybe there is faster way?

 And other thought was also read in RAW format excel file with perl,
 and take advantage of DBI?

 Anyways how would u do it?

 Thank You very much




-- 
PHP General Mailing List (http://www.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] is there a way of using fnctl locks from php?

2001-10-29 Thread Richard Hollis

flock does not work because works differently.

is there a way to access fnctl locking directly from php?





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




[PHP] how to pass true/false or no argument

2001-10-29 Thread John A. Grant

I've written several functions with optional string parameters.
They work fine. But I've never written one that accepts an optional
bool parameter and I'm now confused.

I would like to have this:
somefunction(hello);
somefunction(hello,false);
somefunction(hello,true);

function somefunction($text,$xxx=)
{
if($xxx){
$xxx parameter was passed as true or false
}else{
$xxx parameter was not passed
}
}

Which is correct for the default initialization of $xxx:
$xxx=false;
$xxx=null;
$xxx=;

How do I distinguish between false and $xxx parameter not
passed? Do I use isset()? Do I use ===?

Thanks.

--
John A. Grant  * I speak only for myself *  (remove 'z' to reply)
Radiation Geophysics, Geological Survey of Canada, Ottawa
If you followup, please do NOT e-mail me a copy: I will read it here




-- 
PHP General Mailing List (http://www.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 appending data in a file with fopen(ftp://...,a)

2001-10-29 Thread Dave Létourneau

I got the same error message when i opened it with w...  A append
operation opens the file in r/w?  I'm not sure...  I though it needed a +
: a+, w+...  anyway, I think I'm gonna use a database (mysql) and it will be
easy to to what I need but this problem is very strange.

Thanks!

 Aha -- I understand.  I also didn't see the first time that you're using
FTP.
  You can't fopen() a file for read/write through FTP.  You can do one, or
the
 other, but not both.

 http://www.php.net/manual/en/function.fopen.php



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




[PHP] Re: PHP changing my JavaScript??

2001-10-29 Thread Moloko

sounds like that's the problem - I am using session_start() as well so will
give your idea a try!

many thanks

Moloko

_lallous [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 it happened to me when i enter the page for the very first time and I use
 session_start()



-- 
PHP General Mailing List (http://www.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: Absolute #$#$ silliness

2001-10-29 Thread Mike Frazer

Exactly.  Java borrows from C/C++ a great deal, and they tend to look
similar overall, but they are totally different languages.

PHP and Perl are much easier to learn if you already knew the other one
fairly well, but the differences are vast.  After learning at least the
basics of seven languages, I'm ready to suggest we make one universal one :)

Mike Frazer



Cc Zona [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 In article [EMAIL PROTECTED],
  [EMAIL PROTECTED] (Jtjohnston) wrote:

   RTM http://www.php.net/manual/en/language.variables.php:
  
   Variable names follow the same rules as other labels in PHP. A valid
   variable name starts with a letter or underscore, followed by any
number of
   letters, numbers, or underscores.
 
  So $_1a is legal?! Confusing given $_ in Perl.

 shrug PHP isn't Perl, Perl isn't PHP.  Approaching one language with the
 expectation that it will follow the conventions of another will only give
 you a headache.

 --
 CC



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




[PHP] Using php to verify fields in form...

2001-10-29 Thread Jason

I am new to php and I have been using a book to learn a bit about it and
well I could not find a chapter on how to use php to verify a form is filled
out properly, for instance I have a form with 3 fields... name, email and
words. once the user clicks the submit button i want it to verify those 3
fields before running the php script to pass the info to a database. I have
used java-script for this function in the past but would like to use php.
Anyone know how i can accomplish this? Thanks in advance, 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]




[PHP] apache1.3.22 won't start with php4.0.6

2001-10-29 Thread edward . quick

Hi,

Does anyone know how to get round this problem? I have just installed Apache 1.3.22 
but when I load php4.0.6 it won't run. 

Please email me at [EMAIL PROTECTED]

Thanks,

Ed.

-- 
PHP General Mailing List (http://www.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: Database tags ala Lasso

2001-10-29 Thread l0t3k

 For the futurists around here: Is there any chance that php will
 include database tags ala Lasso?

highly unlikely, but you can achieve similar ends with one of the template
engines for PHP. with a little work, you should be able to accomplish the
same ends. check out Smarty (dont remeber the URL - check Hotscripts.com)
and see what you come up with.

Sverre Johan Tøvik [EMAIL PROTECTED] wrote in message
news:a05101004b8031706353a@[193.215.214.144]...
 Hi,

For those who don't know what I
 mean, here's an axample (not quite correct Lasso code, but it should
 get the point across):

 [db select=somedb]
 [db query=sql]

 table

 [record]
 tr
 !-- everything in this tag is repeated for each record
 td
 [field=name]
 /td
 td
 [field=address]
 /td
 /tr
 [/record]
 /table


 Err... You get the point... Or, for those of you who have problems
 recognizing simple stuff when you see it (like myself when trying to
 learn applescript when I was used to stuff like C), the point is that
 you don't have to do all that annoying escaping of quotes, and if you
 open the code in a graphical editor, you can edit to your heart's
 delight, cuz the db tags stays put.


 Regards,

 Sverre Johan Toevik
 --
 disclaimer I speak for myself only! /disclaimer
 to be yourself, in a world that tries, night and day, to make you just
 like everybody else - is to fight the greatest battle there ever is to
 fight, and never stop fighting -- e.e. cummings



-- 
PHP General Mailing List (http://www.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 start error

2001-10-29 Thread André Castanheira

Hi, 
I use php 4.0.6 and I would like to do the following : 

teste_classe1.php 
? 
require (classes.inc); 
session_start(); 
echo(html); 
echo(body); 
session_register($tb); 
$tb = new tabela(tb_area_interesse, Área de Interesse); 
? 

a href=teste_classe2.phpteste_classe2/a 
/body 
/html 


teste_classe2.php 

? 
require (classes.inc); 
session_start(); 
echo(html); 
echo(body); 
$result = $tb-qual_tabela(); 
echo $result; 
session_unregister($tb); 
session_destroy(); 
? 
/body 
/html 


When I load teste_classe1.php, its ok, but when I click on teste_classe2 link I 
receive : 

Fatal error: Call to a member function on a non-object 
in /home/httpd/html/curriculum/adm/teste_classe2.php on line 6 


any ideas ???

Obrigado,
André Castanheira
Carioca Engenharia S.A.
+55 21 3891-2200 r; 2325

-- 
PHP General Mailing List (http://www.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] fopen for ftp transfers

2001-10-29 Thread Frewuill Rodriguez

what about using ftp functions from PHP?

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


- Original Message - 
From: Scott [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, October 29, 2001 10:58 AM
Subject: [PHP] fopen for ftp transfers


 Hi-
 
 I am attempting to transfer files from one server to another via ftp.  I 
 am wondering if this is the best method to transfer files within PHP or
 should I seek other methods.  Here is the way I am doing it now:
 
 $sendfile =
 fopen(ftp:user:[EMAIL PROTECTED]/testfile, w);
 
 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]




[PHP] Re: how to pass true/false or no argument

2001-10-29 Thread John A. Grant

John A. Grant [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
[...]
 How do I distinguish between false and $xxx parameter not
 passed? Do I use isset()? Do I use ===?

Well, I guess I should have done some homework first. This
code seems to work fine:

function somefunction($text,$xxx=null)
{
if(isset($xxx)){
echo $xxx ? true : false;
}else{
echo null;
}
echo \n;
}

somefunction(hello);
somefunction(hello,true);
somefunction(hello,false);


It prints:
null
true
false

which is what I want.

--
John A. Grant  * I speak only for myself *  (remove 'z' to reply)
Radiation Geophysics, Geological Survey of Canada, Ottawa
If you followup, please do NOT e-mail me a copy: I will read it here




-- 
PHP General Mailing List (http://www.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] security

2001-10-29 Thread Zeev Suraski

My opinion differs from Rasmus in this case - I think that most of the 
points he makes in his study are quite accurate and well analyzed.  Be sure 
to keep current when the next release of PHP comes out - it's going to 
provide infrastructure to handle some of the more dangerous issues that 
Shaun pointed out.

Zeev

At 08:49 26/10/2001, Joseph Blythe wrote:
ok thanks, think I fall in that category too, but doing my best to change it
:)

-Original Message-
From: Rasmus Lerdorf [mailto:[EMAIL PROTECTED]]
Sent: Friday, 26 October 2001 4:05 PM
To: Joseph Blythe
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] security


Has been around for quite a while and pretty much all the points are
address right in the PHP documentation at http://php.net/security which is
a much more informed source to study.  The guy who wrote that scarlet
report only had a very thin grasp of the concepts.

-Rasmus

On Fri, 26 Oct 2001, Joseph Blythe wrote:

  just stummbled across this great study by Shaun Clowes on php security,
this
  is just the kind of information I have been looking for, thought others
  could also benefit from it.
 
  http://www.securereality.com.au/studyinscarlet.txt
 
  found during google search: PHP Security
 
  cheers,
 
  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 General Mailing List (http://www.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] Mailing list

2001-10-29 Thread Nikola Karovi

Hi,
Im looking for some mailing list script that would have option to send mails
in batch mode, to prevent server overloading and to sent all mails in
personal mode, not to send them in bcc, or anything.
I have looked allready on hotscripts.com ang phpresourceindex etc, but all
e-mails with that options aren't free.

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] Re: how to pass true/false or no argument

2001-10-29 Thread Richard Hollis

yeah, but i wanted to know the answer... so it wasn't a total waste of time
:)

John A. Grant [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 John A. Grant [EMAIL PROTECTED] wrote in message
 [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 [...]
  How do I distinguish between false and $xxx parameter not
  passed? Do I use isset()? Do I use ===?

 Well, I guess I should have done some homework first. This
 code seems to work fine:




-- 
PHP General Mailing List (http://www.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: session start error

2001-10-29 Thread Richard Hollis

try:

session_register(tb);

$tb = new tabela(tb_area_interesse, Área de Interesse);

then after using sesion_start() in the next script $tb should contain your
object.

Richard

Cdré «góvîj érg [EMAIL PROTECTED] wrote in
message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Hi,
 I use php 4.0.6 and I would like to do the following :

 teste_classe1.php
 ?
 require (classes.inc);
 session_start();
 echo(html);
 echo(body);
 session_register($tb);
 $tb = new tabela(tb_area_interesse, Área de Interesse);
 ?

 a href=teste_classe2.phpteste_classe2/a
 /body
 /html


 teste_classe2.php

 ?
 require (classes.inc);
 session_start();
 echo(html);
 echo(body);
 $result = $tb-qual_tabela();
 echo $result;
 session_unregister($tb);
 session_destroy();
 ?
 /body
 /html


 When I load teste_classe1.php, its ok, but when I click on teste_classe2
link I
 receive :

 Fatal error: Call to a member function on a non-object
 in /home/httpd/html/curriculum/adm/teste_classe2.php on line 6


 any ideas ???

 Obrigado,
 André Castanheira
 Carioca Engenharia S.A.
 +55 21 3891-2200 r; 2325



-- 
PHP General Mailing List (http://www.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: Using php to verify fields in form...

2001-10-29 Thread Richard Hollis

form passes to your php file

your php file checks the variables with the same name of that of the form
fields.

you can then test htey have all been set accordingly

e.g.

$FieldName etc.


Jason [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 I am new to php and I have been using a book to learn a bit about it and
 well I could not find a chapter on how to use php to verify a form is
filled
 out properly, for instance I have a form with 3 fields... name, email and
 words. once the user clicks the submit button i want it to verify those 3
 fields before running the php script to pass the info to a database. I
have
 used java-script for this function in the past but would like to use php.
 Anyone know how i can accomplish this? Thanks in advance, 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]




[PHP] Re: Using php to verify fields in form...

2001-10-29 Thread Mike Frazer

I believe he was asking how to actually verify them, but I could be wrong...

There are two ways to do it that are quick and painless.  One involves
matching with a regular expression (and since my regular expression
knowledge is no longer up to snuff I won't even attempt to explain it in
depth).  The other is with the String functions.  There are about 900 ways
to do it with string functions.  Here is a for-instance:

To verify that there is a @ in an email address:

$test = strpos($email, @);// Test = 0 if true, FALSE if false


You can also tokenize the string using the strtok() function and then
compare both the user ID and the domain/host information to your desired
conditions.

All in all. the best way is with a regular expression.  However, you'll need
to get help from someone else on that as I've forgotten most of the stuff
about regex's.  Spent too much time progrmaming other things :)

Mike Frazer



Richard Hollis [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 form passes to your php file

 your php file checks the variables with the same name of that of the form
 fields.

 you can then test htey have all been set accordingly

 e.g.

 $FieldName etc.


 Jason [EMAIL PROTECTED] wrote in message
 [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
  I am new to php and I have been using a book to learn a bit about it and
  well I could not find a chapter on how to use php to verify a form is
 filled
  out properly, for instance I have a form with 3 fields... name, email
and
  words. once the user clicks the submit button i want it to verify those
3
  fields before running the php script to pass the info to a database. I
 have
  used java-script for this function in the past but would like to use
php.
  Anyone know how i can accomplish this? Thanks in advance, 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] downloading images

2001-10-29 Thread Richard S. Crawford

With some of the newer broswers, you may be able to re-define the 
functionality of the context menu via JavaScript.  Visit 
http://www.dynamicdrive.com; I think that there are some examples there, 
and you might be able to redirect the save image as... functionality 
there (I wouldn't count on it, though).

Another option might be to zip up the larger image as a zip file and create 
a link to that zip file through the thumbnail image.  That way, when the 
user clicks on the thumbnail, they are prompted with a save as... 
dialogue box and they can then save the document on their own 
computer.  They still have to unzip it though.

Other than that, I think you're out of luck.  The problem is that saving an 
image onto a computer is a client-side function, which you can have no 
control over with server-side programs such as PHP or Perl.  If you can 
come up with a way for a web page to mess around with the source code of 
Netscape or IE, then you might be able to do things like control the save 
image as... functionality, or disable the back button, but that seems 
pretty unlikely to me.


At 10:47 AM 10/29/2001, you wrote:
Hey,
I'd like users to be able to download images from on
my site.  The images are pretty big, so i've made
thumbnails for each.  I can display each thumbnail,
but how can i get it so that once the user clicks on
the thumbnail, they get to download the whole image.
I'd like it to work without having the user to right
click and choose 'save image as'.
Any ideas?!
Thanks,
Heidi


Sliante,
Richard S. Crawford

http://www.mossroot.com
mailto:[EMAIL PROTECTED]
AIM: Buffalo2K   ICQ: 11646404  Y!: rscrawford
It is only with the heart that we see rightly; what is essential is 
invisible to the eye.  --Antoine de Saint Exupéry

Push the button, Max!


--
PHP General Mailing List (http://www.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 handling with cookies??

2001-10-29 Thread Olexandr Vynnychenko

Hello Andy,

Monday, October 29, 2001, 3:39:51 PM, you wrote:

A So... does anybody know how...

A 1) I get the system to delete the cookie as soon as I leave the site, or
A close it

Use logout with setcookie(name, 0, ...)

A 2) How to work on the same time.

Pass information about date/time via GET or better POST variable(s).



-- 
Best regards,
 Olexandrmailto:[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] apache1.3.22 won't start with php4.0.6

2001-10-29 Thread Mark Roedel

 -Original Message-
 From: [EMAIL PROTECTED] 
 [mailto:[EMAIL PROTECTED]] 
 Sent: Monday, October 29, 2001 11:29 AM
 To: [EMAIL PROTECTED]
 Subject: [PHP] apache1.3.22 won't start with php4.0.6
 
 
 Does anyone know how to get round this problem? I have just 
 installed Apache 1.3.22 but when I load php4.0.6 it won't run. 

Does it give you any messages when it fails to run?  Put anything useful
in your Apache error logs?


---
Mark Roedel |  Blessed is he who has learned to laugh
Systems Programmer  |   at himself, for he shall never cease
LeTourneau University   |   to be entertained.
Longview, Texas, USA|   -- John Powell 

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




Re: [PHP] how to pass true/false or no argument

2001-10-29 Thread Henrik Hudson

If $xxx isn't defined at all, its default is NULL, so your if statement 
should work as is. If $xxx is not defined, then you should get thrown down to 
the else. There is a difference between false and NULL.

On Monday 29 October 2001 10:50, John A. Grant wrote:
  I've written several functions with optional string parameters.
  They work fine. But I've never written one that accepts an optional
  bool parameter and I'm now confused.

  I would like to have this:
  somefunction(hello);
  somefunction(hello,false);
  somefunction(hello,true);

  function somefunction($text,$xxx=)
  {
  if($xxx){
  $xxx parameter was passed as true or false
  }else{
  $xxx parameter was not passed
  }
  }

  Which is correct for the default initialization of $xxx:
  $xxx=false;
  $xxx=null;
  $xxx=;

  How do I distinguish between false and $xxx parameter not
  passed? Do I use isset()? Do I use ===?

  Thanks.

-- 

Henrik Hudson
[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] Using php to verify fields in form...

2001-10-29 Thread Henrik Hudson

Assuming you know what your field names are, they get passed in to the PHP 
script as variables.

Using regular expressions you can check your variables for values you 
want/don't want. If they aren't what you want print an error message and tell 
the user to go back or something similar.

It's the same process as doing it with Javascript, except its after the user 
hits submit.

Henrik

On Monday 29 October 2001 11:44, Jason wrote:

  I am new to php and I have been using a book to learn a bit about it and
  well I could not find a chapter on how to use php to verify a form is
 filled out properly, for instance I have a form with 3 fields... name,
 email and words. once the user clicks the submit button i want it to verify
 those 3 fields before running the php script to pass the info to a
 database. I have used java-script for this function in the past but would
 like to use php. Anyone know how i can accomplish this? Thanks in advance,
 Jason

-- 

Henrik Hudson
[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] Streaming context

2001-10-29 Thread James Webb

I'm trying to find a way to make streaming context for an internet game web site, like 
continual updates from the game and game info for players, I was looking around but 
can't find a function to help me, if you can point me in the right direction please 
drop me a line

- James



Re: [PHP] HELP: Syntax Needed

2001-10-29 Thread Christian Reiniger

On Sunday 28 October 2001 20:53, jtjohnston wrote:
 Jokes aside, I still don't get it.

*g*

 This works:
 mysql_pconnect($host,AccountName,beep);

 Why doesn;'t this?

  $myconnection = mysql_pconnect($host,$MyTable,$MyPassword);

Compare what arguments you pass. Especially the second one. In the first 
example you supply your account name. That's fine. mysql_pconnect expects 
it in that place.
The second time you use the table name instead of the acctname, so it 
tries to log in with username $MyTable, passwd $MyPassword

And unless you have a very weird setup this will always fail :)

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

This is JohnC IMHO, I compaired tri-word groupings here and in his plan
and got a good match.

- /. posting discussing the likelihood that an AC post that claimed to be
posted by John Carmack during his honeymoon (and having the login info at
home) was actually from him.

--
PHP General Mailing List (http://www.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] switch-statement overrides use of global arrays?

2001-10-29 Thread Christian Reiniger

On Sunday 28 October 2001 22:17, Imar de Vries wrote:
 Hi all,

 a very frustrating problem. For some reason I am not able to pass on an
 array between two functions, although I declare it global in both of
 them. I suspect my use of a switch statement to control the flow of the

[...]

 switch ($action) {
  default:
  main();
  break;
  case test_one:
  test_one();
  break;
 }

[...]

  print (pform method=\post\ action=\arraytest.php\
 enctype=\multipart/form-data\);
  ?
  input type=hidden name=action value=test_one
  input type=submit value=Test tabindex=6
  /form
  ?
 }


So you want to share the array across *requests*
That doesn't have *anything* to do with global.

Have a look at how HTTP works - each request is an isolated execution of 
a PHP script. it doesn't have any idea of what other pages the user 
already looked at. To archieve your stuff you need session management 
(phpbuilder.com has a nice tutorial on this)

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

This is JohnC IMHO, I compaired tri-word groupings here and in his plan
and got a good match.

- /. posting discussing the likelihood that an AC post that claimed to be
posted by John Carmack during his honeymoon (and having the login info at
home) was actually from him.

--
PHP General Mailing List (http://www.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] Mailing list

2001-10-29 Thread Frewuill Rodriguez

you mean like majordomo? it's not php but perl

www.majordomo.com

- Original Message -
From: "Nikola Karovi" [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, October 29, 2001 12:34 PM
Subject: [PHP] Mailing list


 Hi,
 Im looking for some mailing list script that would have option to send
mails
 in batch mode, to prevent server overloading and to sent all mails in
 personal mode, not to send them in bcc, or anything.
 I have looked allready on hotscripts.com ang phpresourceindex etc, but all
 e-mails with that options aren't free.

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

2001-10-29 Thread Nikola Karovi

no, not like majordomo, like octeth mailing list manager
http://www.octeth.com/, only some thats free


- Original Message -
From: Frewuill Rodriguez [EMAIL PROTECTED]
To: Nikola Karovi [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: 29. listopad 2001 21:21
Subject: Re: [PHP] Mailing list


 you mean like majordomo? it's not php but perl

 www.majordomo.com

 - Original Message -
 From: "Nikola Karovi" [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Monday, October 29, 2001 12:34 PM
 Subject: [PHP] Mailing list


  Hi,
  Im looking for some mailing list script that would have option to send
 mails
  in batch mode, to prevent server overloading and to sent all mails in
  personal mode, not to send them in bcc, or anything.
  I have looked allready on hotscripts.com ang phpresourceindex etc, but
all
  e-mails with that options aren't free.
 
  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]


-- 
PHP General Mailing List (http://www.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] Speeding up program

2001-10-29 Thread Emile Bosch

wrote some code..

?
function test($testid) {
 echo called from $testid!br;
 return 4;
}


echo DOING THE FIRST TESTBR;
for ($i = 0; $i  test('first'); $i++) {
 //doStuff
};
echo br;
echo DOING THE SECOND EMILE COMPACT BLAH TESTBR;
for ($i = 0; $i  ($num?$num:($num = test('second')));  $i++) {
 //doStuff
};

//for ($i = 0; $i  ($num?$num:($num = mysql_num_rows($Results))); $i++) {

//};
?

tralalal good luck


David Robley [EMAIL PROTECTED] schreef in bericht
01091910452903.15278@www">news:01091910452903.15278@www...
 On Tue, 18 Sep 2001 20:56, Niklas Lampén wrote:
  How big difference does it make in speed in these:
 
  ?
  for ($i = 0; $i  mysql_num_rows($Results); $i++) {
  blah
  };
  ?
 
  or
 
  ?
  $n = mysql_num_rows($Results);
  for ($i = 0; $i  $n; $i++) {
  blah
  };
  ?
 
  So actually I'm asking how much more/less it takes time to do the
  comparing against mysql_num_rows() insted of comparing against a
  variable.
 
 
  Niklas

 Will deppend on the environment in which you are running it. to test it
 on your environment, try running each say ten thousand times in a loop,
 and use a timer like microtime to check how long it takes.\

 Then you can let us all know the answer.

 --
 David Robley  Techno-JoaT, Web Maintainer, Mail List Admin, etc
 CENTRE FOR INJURY STUDIES  Flinders University, SOUTH AUSTRALIA

Why can't we just spell it orderves?



-- 
PHP General Mailing List (http://www.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] parsing XML turorials, suggestions

2001-10-29 Thread Christian Reiniger

On Monday 29 October 2001 16:25, bill wrote:
 Need to get started parsing XML documents.  I've developed a program to
 write them XML a database, but now I need to read them to obtain, for
 example, the (cdata) value of title which is nested inside book,
 etc.

 What's the best place to start?  Does DOMXML have a future?

Sure. But it's a bit overkill if you just want to read XML (sequentially).
http://php.net/manual/en/ref.xml.html

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

This is JohnC IMHO, I compaired tri-word groupings here and in his plan
and got a good match.

- /. posting discussing the likelihood that an AC post that claimed to be
posted by John Carmack during his honeymoon (and having the login info at
home) was actually from him.

--
PHP General Mailing List (http://www.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] User Authentication against remote authentication server

2001-10-29 Thread Zhu George-CZZ010


   sorry, this might be a little bit off the topic, but I really hope you could help 
anwering this question.

   It's pretty clear how to use web server to authenticate the users/groups, for 
example, if we are using Apache, the userID and password will be stored in the 
browser's cache, and be sent  to the web server to do the authentiation whenenver a 
page is requested.

   However, if the authentication server is not the web server, instead, it is a 
remote independent server. How can we manage the user authentications at the web 
server side?

   Thank you very much 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] Problem with very big array !

2001-10-29 Thread Matthew Loff



What prevents you from doing this iteratively, (not loading all 150,000
rows into memory, but processing each row sequentially)?


-Original Message-
From: Nicolas Guilhot [mailto:[EMAIL PROTECTED]] 
Sent: Monday, October 29, 2001 11:44 AM
To: Php General MailingList
Subject: [PHP] Problem with very big array !


Hi guys,

I have an sql query returning a result of nearly 150 000 rows. I use the
PEAR DB::getAll method to retrieve this result as an array which is very
big
indeed (about 300Mb). I can't use the MySQL LIMIT statement because I
need
to do sorting stuff on the result array.
My concern is that even after processing the last line of the script,
the
process continue running for about 20~30 minutes (I am watching running
processes using the unix command 'top'). For information, querying the
database, sorting the array and displaying results with a pager system
only
takes 3 minutes.

I have made a short example that reproduces the problem. If you could
test
it (IT WILL USE ABOUT 120Mb OF RAM) and tell me if you've got the same
problem it would be nice. You need to create a test database with the
following table :

CREATE TABLE test (
  id mediumint(20) NOT NULL,
  text varchar(255) NOT NULL default '',
  PRIMARY KEY  (id)
)

Then populate it with 150 000 rows using the populate.php script.
Finally, execute the query.php script and use top to see if the process
stops running quickly. For me it takes a lot of time to end (more than
20
minutes).
If you empty the database table, remove one character from the string in
the
insertInto function and populate it again, it should work correctly.

Thanks for any answer !!

PS : I am using PHP 4.06, MySQL 3.23.41 and Apache on a bi-processor
linux
box with 1Gb RAM.


//--
// populate.php
//--
?php
require_once(DB.php);

function getmicrotime()
{
  list($usec, $sec) = explode( ,microtime());
  return ((float)$usec + (float)$sec);
}

function insertInto($db)
{
  for ($cpt = 0; $cpt  15; $cpt++)
  {
$result = $db-query(INSERT INTO test VALUES('$cpt', 'This is the
very
big test n° $cpt. With more text. This time it will take more memory,
and
more time to execute. This is very strange. I do not understand why
???'));
  }
}


$db = DB::connect(mysql://user:password@localhost/test);
$time_start = getmicrotime();

insertInto($db);

$time_end = getmicrotime();
$time = $time_end - $time_start;
echo Execution time : $time seconds;
?
//-
//End of populate.php
//-



//-
//query.php
//-
?php
require_once(DB.php);

function getmicrotime()
{
  list($usec, $sec) = explode( ,microtime());
  return ((float)$usec + (float)$sec);
}

$db = DB::connect(mysql://user:password@localhost/test);
$time_start = getmicrotime();

$result = $db-getAll(SELECT * from test);

$time_end = getmicrotime();
$time = $time_end - $time_start;
echo Execution time : $time seconds;
?
//--
//End of query.php
//--


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


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




[PHP] Re: fopen for ftp transfers

2001-10-29 Thread CC Zona

In article [EMAIL PROTECTED],
 [EMAIL PROTECTED] (Scott) wrote:

 I am attempting to transfer files from one server to another via ftp.  I 
 am wondering if this is the best method to transfer files within PHP or
 should I seek other methods.  Here is the way I am doing it now:
 
 $sendfile =
 fopen(ftp:user:[EMAIL PROTECTED]/testfile, w);

http://php.net/ftp

-- 
CC

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




[PHP] Architecture : Handling timezones in a web application

2001-10-29 Thread l0t3k

we have developed an application that in use at institutions throughout the
U.S and hosted centrally, and we need to figure out how to handle timezone
issues for time related data in the database. how have others handled the
issue ?
our thought is to associate a timezone with the institution and store all
times in the DB as UTC. conversions from UTC to local time would happen only
as data is displayed in the browser.

any thoughts ?



-- 
PHP General Mailing List (http://www.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] separating lines in a text area field

2001-10-29 Thread Don

Hi,

I've look at the PHP Faq, poked around the www.php.net site and searched the mailing 
list archive but could not come up with an answer.  However, I'm sure this question 
has been asked before on more than one occasion.

I have a form that calls a PHP function which sends the contents off as an e-mail.  
Within the form, I have a text area field.  My e-mail looks like:

field1 = value1
field2 = value2
etc...

For the text area field, it does NOT wrap the lines but puts everything on one line.  
Is there a PHP routine that can split the lines in a textarea object?  Does this 
depend on whether the machine is Windows or UNIX?  If so, is there a system 
independent routine?

Thanks,
Don



RE: [PHP] Architecture : Handling timezones in a web application

2001-10-29 Thread Erik H. Mathy

 we have developed an application that in use at institutions
 throughout the U.S and hosted centrally,

Sweet!

 and we need to figure out how to handle timezone
 issues for time related data in the database. how have others handled the
 issue ?
 our thought is to associate a timezone with the institution and store all
 times in the DB as UTC. conversions from UTC to local time would
 happen only as data is displayed in the browser.

That'll work.

 any thoughts ?

What you've thought of is fine. Or you can do a small clientside Javascript
function that's put into your pages via an include();.

- Erik

P.S. That's if you like or use Javascript. Many folks here and in other
places don't like Javascript for anything except for pretty image
switches...hey, whatever floats your boat!! :)


-- 
PHP General Mailing List (http://www.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] spaces vs nbsp; in form fields

2001-10-29 Thread Greg

I have a function which takes an integer (the id field for a record) and
returns the corresponding full name of the person whose id matches the
integer.

The function constructs the full name by querying a table for the row which
matches the id and then concatenating firstname, middlename, and lastname
with a   (space) between each. The name value is called $name.

Once $name is gotten, it may appear under 2 conditions: as an uneditable
displayed value, or as an editable value appearing on a form in an input
text box. Whenever I simply display the value, it appears correctly, e.g.,
John Paul Smith.

However, when I display the value in an input text box on a form, only
John appears. The odd thing is that when I view source, the full name
appears in the HTML; it just doesn't render that way in IE/Opera.

If I concatenate nbsp; instead of  , the full name appears correctly in
the form field. That's fine but I have an inverse function which takes the
full name and returns the id. This inverse function works when I use   to
concatenate names but it doesn't work when I use nbsp;!

Ugh! What's up with that?

Please REMOVE -NOSPAM from my email address when replying to me. 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] curl and HTTPS

2001-10-29 Thread Gerard Onorato

Hello all,

Okay I have figured out that I will not be able to use fsockopen with https
to submit a form. Now I am on to using CURL with openssl. Does anyone know
of a sample of how to do this? I have seen mentions of it being done but can
not find any examples.

Thanks in advance.

Gerard


-- 
PHP General Mailing List (http://www.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] spaces vs nbsp; in form fields

2001-10-29 Thread Richard S. Crawford

The problem is that you have special characters that are interfering with 
the output.  I had exactly the same problem a few weeks ago.

Try this:

$fixedOutputValue = htmlspecialchars($outputValue);
print (input type=\text\ value=\$fixedOutputValue\ /);

This is how I solved it.

Note that putting htmlspecialchars($outputValue) in the value attribute 
will give you undesirable results.

At 01:32 PM 10/29/2001, Greg wrote:
However, when I display the value in an input text box on a form, only
John appears. The odd thing is that when I view source, the full name
appears in the HTML; it just doesn't render that way in IE/Opera.


Sliante,
Richard S. Crawford

http://www.mossroot.com
mailto:[EMAIL PROTECTED]
AIM: Buffalo2K   ICQ: 11646404  Y!: rscrawford
It is only with the heart that we see rightly; what is essential is 
invisible to the eye.  --Antoine de Saint Exupéry

Push the button, Max!


--
PHP General Mailing List (http://www.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] Mailing list

2001-10-29 Thread p.whiter

Hi

For an excellent perl solution try mojo mail at:

http://mojo.skazat.com/

This has all you want and more, and it is open source...

FYI I use this and currently have approx 1300 subscribers, this has not let
me down yet.

Regards
Paul

- Original Message -
From: "Nikola Karovi" [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, October 29, 2001 4:34 PM
Subject: [PHP] Mailing list


: Hi,
: Im looking for some mailing list script that would have option to send
mails
: in batch mode, to prevent server overloading and to sent all mails in
: personal mode, not to send them in bcc, or anything.
: I have looked allready on hotscripts.com ang phpresourceindex etc, but all
: e-mails with that options aren't free.
:
: 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] separating lines in a text area field

2001-10-29 Thread Nikola Karovi

Maybe you could try to put Content-Type: text/plain; without quotes into
your message header.


- Original Message -
From: Don [EMAIL PROTECTED]
To: php list [EMAIL PROTECTED]
Sent: 29. listopad 2001 22:16
Subject: [PHP] separating lines in a text area field


Hi,

I've look at the PHP Faq, poked around the www.php.net site and searched the
mailing list archive but could not come up with an answer.  However, I'm
sure this question has been asked before on more than one occasion.

I have a form that calls a PHP function which sends the contents off as an
e-mail.  Within the form, I have a text area field.  My e-mail looks like:

field1 = value1
field2 = value2
etc...

For the text area field, it does NOT wrap the lines but puts everything on
one line.  Is there a PHP routine that can split the lines in a textarea
object?  Does this depend on whether the machine is Windows or UNIX?  If so,
is there a system independent routine?

Thanks,
Don



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




[PHP] PHP and Wget

2001-10-29 Thread fragman_dk

Do enybody no how to use wget on at website as a downloadmanager so i just
can enter the url at wget on my linux server download it for me ?



-- 
PHP General Mailing List (http://www.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] counting sheeps

2001-10-29 Thread Nikola Karovi

Hi,
i have two tables uniqueid and table2. In table2 are names that can be
the same. How can i make output on my web page that would count number of
same names by one name in url like index.php?id=name1 to produce eg number
3.

-
volim popit, volim zagalamit


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




Re: [PHP] PHP and Wget

2001-10-29 Thread Mark

On Mon, 29 Oct 2001 23:15:38 +0100, fragman_dk wrote:
Do enybody no how to use wget on at website as a downloadmanager so
i just
can enter the url at wget on my linux server download it for me
?




?
`wget $url`
?
--
Mark, [EMAIL PROTECTED] on 10/29/2001



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




Re: [PHP] User Authentication against remote authentication server

2001-10-29 Thread Frewuill Rodriguez

may be you can write a  script (perl/php/*) which try to check/log/whatever
on the remote user sending a login/password, so if it returns ok yo can use
it to deny/allow the access to your local webserver.. it's like a kind of
authentication proxy



- Original Message -
From: Zhu George-CZZ010 [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, October 29, 2001 4:39 PM
Subject: [PHP] User Authentication against remote authentication server



sorry, this might be a little bit off the topic, but I really hope you
could help anwering this question.

It's pretty clear how to use web server to authenticate the
users/groups, for example, if we are using Apache, the userID and password
will be stored in the browser's cache, and be sent  to the web server to do
the authentiation whenenver a page is requested.

However, if the authentication server is not the web server, instead,
it is a remote independent server. How can we manage the user
authentications at the web server side?

Thank you very much 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] apache1.3.22 won't start with php4.0.6

2001-10-29 Thread Michael A. Peters

On Mon, 29 Oct 2001 17:28:39 + (GMT)
[EMAIL PROTECTED] wrote:

 Hi,
 
 Does anyone know how to get round this problem? I have just installed Apache 1.3.22 
but when I load php4.0.6 it won't run. 

The error you are receiving when you try to start apache would be of assistance.

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


-- 
-=-=-=-=-=-=-=-=-=-=-=-=-
Michael A. Peters
http://24.5.29.77:10080/

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




Re: [PHP] User Authentication against remote authentication server

2001-10-29 Thread Kurt Lieber

 However, if the authentication server is not the web server, instead,
 it is a remote independent server. How can we manage the user
 authentications at the web server side?

Use LDAP.  

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

-- 
PHP General Mailing List (http://www.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] Fatcow and MySQL-Front

2001-10-29 Thread René Fournier

Hi All,

Little problem:  I want to transfer my MySQL database--a collection of 10 or
so tables, with data--to my Fatcow account.  They provide some lame MySQL
tools, but nothing to faciliate moving an existing database, full of data,
to their server.  I tried using MySQL-Front to connect to their server, but
it was rejected for some reason (their tech support acknowledged that
MySQL-Front doesn't work with Fatcow (?)).  Can anyone recommend a way for
me to get my database and data onto Fatcow?  I have asked their Tech
Support, but they weren't very supportive...

Much appreciated.

...Rene


-- 
PHP General Mailing List (http://www.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] Function not found

2001-10-29 Thread David Robley

On Mon, 29 Oct 2001 21:19, De Necker Henri wrote:
 Where can i find the code for the array_search() function in php4.I
 do have php4 but the function isnt found.The in_array() function is
 found.

According to the docs, that wasn't introduced unntil 4.05, so if you have 
an earlier version you need to upgrade to get the function.

-- 
David Robley  Techno-JoaT, Web Maintainer, Mail List Admin, etc
CENTRE FOR INJURY STUDIES  Flinders University, SOUTH AUSTRALIA  

   Swap read error. You lose your mind.

-- 
PHP General Mailing List (http://www.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] apache1.3.22 won't start with php4.0.6

2001-10-29 Thread Fotwun

uhhh... the php psychic says she needs your birthdate and name first. =P

but really, give some useful info. what OS? how is PHP compiled... are you
using the CGI style standalone, or is it compiled into Apache, or is it a
apache module? Whats the error it gives you on the console when trying to
run it. Whats the error produced in the apache log? etc...


 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
 Sent: Monday, October 29, 2001 10:29 AM
 To: [EMAIL PROTECTED]
 Subject: [PHP] apache1.3.22 won't start with php4.0.6


 Hi,

 Does anyone know how to get round this problem? I have just
 installed Apache 1.3.22 but when I load php4.0.6 it won't run.

 Please email me at [EMAIL PROTECTED]

 Thanks,

 Ed.

 --
 PHP General Mailing List (http://www.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] User Authentication against remote authentication server [ LDAP ]

2001-10-29 Thread Johnson, Kirk

Thanks for the link, Kurt. Can you also point to any authentication code
examples, or further discussion? The user comments in the manual suggest
there are at least a couple ways to code stuff, ldap_compare vs ldap_bind.
Any additional help appreciated.

TIA

Kirk

 -Original Message-
 From: Kurt Lieber [mailto:[EMAIL PROTECTED]]
 Sent: Monday, October 29, 2001 3:58 PM
 To: PHP General List
 Subject: Re: [PHP] User Authentication against remote authentication
 server [ LDAP ]
 
 
  However, if the authentication server is not the web 
 server, instead,
  it is a remote independent server. How can we manage the user
  authentications at the web server side?
 
 Use LDAP.  
 
 http://www.php.net/manual/en/ref.ldap.php

-- 
PHP General Mailing List (http://www.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] apache1.3.22 won't start with php4.0.6

2001-10-29 Thread Brian Clark

Hi Edward,

@ 4:25:53 PM on 10/29/2001, Edward Quick wrote:

 Absolutely nothing.

Don't take this as my assuming you're incompetent. It's just that we
need more information about your system in order to help you.

You wrote:

 I have just installed Apache 1.3.22 but when I load php4.0.6 it
 won't run

Define load php4.0.6 exactly. Did you build PHP as a DSO
(--with-apxs) or did you build it into httpd (--with-apache)? Did you
install from an RPM?

Assuming Apache is installed in one of the usual places, and assuming
you're on a Unix or Linux system..

What happens when you run:

$ `which apachectl` configtest

Does it say Syntax OK?

What do you get when you run:

$ updatedb

followed by:

$ locate libphp4 | grep so

If nothing there, do you see mod_php4.c when you run this:

$ `which httpd` -l | grep php

Find your apache error_log, do this:

$ tail -f /path/to/apache/error_log

Then in another shell start apache:

$ `which apachectl` start

Does the tail window say anything at _all_?

We need more information..

--
 -Brian Clark | PGP is spoken here: 0xE4D0C7C8
  Please, DO NOT carbon copy me on list replies.


-- 
PHP General Mailing List (http://www.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   >