[PHP] TAR Error - 'Invalid block size'

2003-09-23 Thread Tohar Trabinovitch
I use the TAR.php file for extract tar.gz file. The tar file extracted
fine, but the tar class raises the 'Invalid block size 351'. Why? And
how can I discard this error.
 
Thanks,
===
Tohar Trabinovitch
Software Engineer
[EMAIL PROTECTED]
Tel: 972-3-9008200
Ext: 269
 


php-general Digest 23 Sep 2003 07:13:39 -0000 Issue 2313

2003-09-23 Thread php-general-digest-help

php-general Digest 23 Sep 2003 07:13:39 - Issue 2313

Topics (messages 163514 through 163550):

Re: PHP Editor - which to use?
163514 by: jsWalter
163525 by: Jason Sheets
163526 by: Chris W. Parker
163535 by: Ray Hunter
163537 by: NukedWeb.aol.com
163540 by: Robert Cummings
163541 by: Dan Anderson
163542 by: NukedWeb.aol.com

POST Parameters
163515 by: Stephan Becker
163516 by: Brent Baisley
163517 by: Chris Shiflett

Re: Problem's addign a script to my web page.
163518 by: Marek Kilimajer
163531 by: Stratis Aftousmis

Shopping Cart Solutions
163519 by: Charles Kline
163521 by: Ray Hunter
163522 by: Adrian Teasdale
163523 by: Henrik Hudson
163524 by: Chris W. Parker

bugs.php.net
163520 by: Amith Varghese

speaking of php editors
163527 by: Chris W. Parker
163529 by: Curt Zirzow
163534 by: Ray Hunter

Re: Subcategories in php
163528 by: Chris W. Parker

PHP5 interfaces?
163530 by: Javier Muniz

Auto load data
163532 by: ascll

Calling PHP shell scripts with exec from within PHP goes awry?
163533 by: uvm
163536 by: Ray Hunter
163538 by: Robert Cummings

Re: Calling PHP shell scripts with exec from within PHP goes
163539 by: uvm

passing parameters to a script doesn't work
163543 by: Sol
163544 by: John Nichel

Formatting a string for entry into MySQL
163545 by: James Johnson

javascript open window and a PHP script...
163546 by: jsWalter

CAN I CASH the output of PHP SCRIPT?
163547 by: Nabil
163548 by: Curt Zirzow
163549 by: Becoming Digital

TAR Error - 'Invalid block size'
163550 by: Tohar Trabinovitch

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]


--
--- Begin Message ---
I use Homesite.

It has plug-ins for PHP so you have tps and cose completion.

I just modified another plug it has so I can see then entire list of methods
a script has in a window, which can then jump to, scroll to, insert here.

And I can hit F-12 and it will talk to my apache server and run the script
right there!

All in one!

Thee is CVS integration for Homesite, I just never got around to it.

I just use WinCVS, I'm just lazy.

Walter
--- End Message ---
--- Begin Message ---
PHP eclipse is also nice, you need eclipse from http://www.eclipse.org 
and then you install the PHP Eclipse module 
http://phpeclipse.sourceforge.net.  Very easy to install, I am a big fan 
of Komodo, I also like Vim, Kate and Eclipse.  I tried Zend Studio 1 and 
2 but it didn't live up to the expectations that I had for the price.



Becoming Digital wrote:

I'm a big fan of ActiveState Komodo, largely because it handles PHP, Perl, Python, and others.  While most of my work is done in PHP, it's nice not having to switch editors when trying to port code to or from another language.  

I must agree with Ryan that there is no 1 app to use.  Dreamweaver MX is a staple in anyone's software library, especially for visual development, and Zend Studio is another great app.  However, what I like about either, you may not so you'll really just have to try out the numerous demos and find what works for you.

Edward Dudlik
Becoming Digital
www.becomingdigital.com
wishes | www.amazon.com/o/registry/EGDXEBBWTYUU

- Original Message - 
From: "Ryan A" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, 22 September, 2003 05:07
Subject: Re: [PHP] PHP Editor - which to use?

Hey
Personally I dont think any 1 is good for all purposes...I use a combination
of Dreamweaver MX, Zend and PHPEdit.
HTH.
Cheers,
-Ryan
We will slaughter you all! - The Iraqi (Dis)information ministers site
http://MrSahaf.com
- Original Message - 
From: "Ruessel, Jan" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, September 22, 2003 11:00 AM
Subject: RE: [PHP] PHP Editor - which to use?

well, i like to use dreamweaver mx or textpad with the syntax highlighting
file you additionally have to download. i dunno if there are special
"php-must-have-editors".
grtz
jan
-Original Message-
From: Binay [mailto:[EMAIL PROTECTED]
Sent: Montag, 22. September 2003 10:58
To: [EMAIL PROTECTED]
Subject: [PHP] PHP Editor - which to use?
Hi everybody!

Please suggest me  a good PHP editor like ( Microsoft's Interdev for ASP) to
write my php programs/scripts and get a visual feel.
Thanks
Binay
 

--- End Message ---
--- Begin Message ---
Binay 
on Monday, September 22, 2003 1:58 AM said:

> Please suggest me  a good PHP editor like ( Microsoft's Interdev for
> ASP) to write my php programs/scripts and get a visual feel. 

Doesn't fit in 

[PHP] Re: Recursive class trouble

2003-09-23 Thread Christoffer Enedahl
I had to rewrite my class so it parsed all data in the constructor. I'm
still wondering about this though. I't seems like a bug, however I don't
know enough about PHP to report bugs yet.

I'm used to program in ASP. I'm very pleased with PHP so far, this quirk is
the
first negative issue I've found about PHP.
The top advantages over asp so far:
require(file)   --in asp, the file is always
included even if the logic seems to hide it.
$str = "string with a $variable"   --No more "INSERT INTO [table]
(name,name2) VALUES ('"& name &"','"& name2 &"')"
$var++ --why o why doesn't asp got this?
class inheritance--no comment

/Christoffer

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



Re: [PHP] Mail problem

2003-09-23 Thread Trevor Dowling
All,

Many thanks for you thoughts, I will take a look at your suggestions, I hope
they fix the issue, others suggested the same things so I think we can
assume your all correct, (I hope so!)

Once again, thanks

Trevor

"Curt Zirzow" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> * Thus wrote Trevor Dowling ([EMAIL PROTECTED]):
> > PHP Version 4.3.2
> > I am having problems sending a large number of emails from a mail list
held
> > in a database. I don't belive that the database has anything to do with
the
> > problem.
> >
> > I have about 9000 addresses and can only successfully send about 2000
mails
> > before the page say complete/done.
>
> see set_time_limit().
> http://php.net/set_time_limit
>
> Also the webserver will disconnect after a certain amount of time,
> you can search the archives to see how people resolved this in the
> past.
>
> >
> >  while (odbc_fetch_row ($result))
> >  {
> >
> >   $EmailAddress = trim (odbc_result ($result, 'email'));
> >
> > flush();
>
> flush isn't necessary here, doesn't have anything to do with your
> issue though.
>
> oh, and also add a few lines that say:
>   if(preg_match('[EMAIL PROTECTED]', $EmailAddress) ) {
> continue;
>   }
> > @mail ($EmailAddress, "Support", $Message);
> >
>
> HTH,
>
> Curt
> --
> "I used to think I was indecisive, but now I'm not so sure."

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



[PHP] RE : [PHP] Start php-script with exec()?

2003-09-23 Thread BENARD Jean-philippe
Maybe you'll need to add " >/dev/null &" at the end of your execution
command. Adding this will put your script to background and php wouldn't
wait for this script end before terminate http process (=> no browser
timeout).

For example : exec("/logiciel/php/bin/php /tmp/toto.php >/dev/null &");

Cordialement,
Jean-Philippe BENARD
Consultant STERIA Infogérance
([EMAIL PROTECTED])

-Message d'origine-
De : Victor Spång Arthursson [mailto:[EMAIL PROTECTED] 
Envoyé : lundi 22 septembre 2003 14:16
À : [EMAIL PROTECTED]
Objet : [PHP] Start php-script with exec()?

Is it possible?

I have a file that takes 5 minutes to run, and I would like to be able 
to start it when loading a page. But I can't include it because it 
forces the browser to timeout…

exec("script.php") doesn't seem to work…

Sincerely

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

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



[PHP] php4ts.dll and Win2000 IIS server

2003-09-23 Thread Astron of BrOnX
Dear Marek Kilimajer and others,

I have done all thing that you told me.. In my local (winXP, IIS5.1) SSL is
working fine now.. I have replaced php4ts.dll Manuzhai suggested to use
php4ts.dll from http://ftp.proventum.net/pub/php/win32/misc/openssl/  and it
is okay now..

But, windows2000 IIS gives an error when i have replaced php4ts.dll with new
one (Manuzhai dll), it says,

CGI Error
The specified CGI application misbehaved by not returning a complete set of
HTTP headers. The headers it did return are:


is there any problem with win2000 IIS? I have been doing all things to
enable SSL,like copying dlls from c:\php\dlls  to c:\winnt\system and
replace php4ts.dll ..
Thanks,
Astron

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



Re: [PHP] speaking of php editors

2003-09-23 Thread Eugene Lee
On Tue, Sep 23, 2003 at 12:28:12AM +, Curt Zirzow wrote:
: * Thus wrote Chris W. Parker ([EMAIL PROTECTED]):
: > 
: > I am looking for an editor that will highlight the string
: > "{$array['index']['index']}" within a string.
: > 
: > For example:
: > 
: > +- gray +
: > |   |
: > |  +-- red ---+ |
: > |  |  | |
: > $variable = "The amount is {$amount[0]}.";
:    ^^ ^^ +*%%#^#+^^
:   |  ||  |    |
: Green <---'---'---'
:  ||  |   | ||
: Red +'--'
:   |  |   | |
: Dk. Red #'-'
:   |  |
: Yellow *--'  |
:  |
: Blue %---'
: 
: Thats vi's coloring :)

Plain vi does not do syntax highlighting.  Perhaps you are using a
vi-derivative, like Vim.

http://www.vim.org/

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



Re: [PHP] PHP Editor - which to use?

2003-09-23 Thread Gal
The Best is the GTK verstion of the classic VI editor (latest VI 6.2 - 
uses GTK 2 on Linux) and there is also a Windows version.

It's the best and you don't have to pay for licenses.
http://www.vim.org/index.php
Notepad - is very poor. you can not controle tabs spaces, see white 
space and syntax color.

[EMAIL PROTECTED] wrote:
You must either be insane, a genius, or joking.
Some of the most gifted people in the world are all three! Not that I'm 
claiming to be one, but yes I'm all three. :-D


I couldn't imagine writing code without context sensitive highlighting -- 
there are so many bugs that would be overlooked. - Huh? What's that? Context 
hightlighting? Like built-in colorful magic markers? Ehh. Bugs can NEVER go 
overlooked as long as PHP's parse-errors are always right there to rub it in that 
we fudged up... ;) I swear...all PHP error msgs should end with "you 
loser!" :-D


And not being able to use M-g to goto aline number?  (I use Emacs)  I'd go 
bonkers.
Notepad as well. ctrl+G -- only found out about that a year into 
PHPdammit. coulda really used it when I was learning...beat the hell outta using the 
down arrow and counting in my head!

Hope ya don't think I'm tryin to poke fun Dan. I meant well ;) Quite frankly 
I dont think I'd ever learn an "editor", I've used Notepad so long, it's like 
an 85 year old man learning how to use a DVD player. ;) 

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


[PHP] determine resolution that client is running

2003-09-23 Thread Angelo Zanetti
Hi ppl,

how do you determine the resolution that a client is running? because if I
make a webpage for 800 X 600 then a user is running a res. of 1024 X 768
then the page will be smaller in his browser, therefore how do I determine
what resolution its being run at, therefore the appropriate sized webpage
will be visible?

thanx in advance
angelo

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



[PHP] Running system commands

2003-09-23 Thread Nitin
Hi all, 

I was wondering, if anyone can help me with running system commands from within php. 
Actually I have a script which deletes users from my database (which is of course 
MySQL), now I want to delete those users from system level also, as they are 
authenticated users of my OS also.

Now, the problem is, that I'm running my MySQL server and web server on different 
machines. I can do whatever on remote DB server but how to run a system command on 
another machine. I know, it's possible to run system commands on local server by 
system(), but what about remote server?

Any help will be highly appreciated.

Thanx in advance
Nitin

Re: [PHP] determine resolution that client is running

2003-09-23 Thread Becoming Digital
This is something probably best handled by Javascript.  There are many resolution 
re-direct scripts out there that will, at the very least, give you an idea of what you 
need to do.  A link to those available at HotScripts is below.
http://www.hotscripts.com/JavaScript/Scripts_and_Programs/Redirection/Resolution_Based/index.html

Edward Dudlik
Becoming Digital
www.becomingdigital.com



- Original Message - 
From: "Angelo Zanetti" <[EMAIL PROTECTED]>
To: "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
Sent: Tuesday, 23 September, 2003 04:58
Subject: [PHP] determine resolution that client is running 


Hi ppl,

how do you determine the resolution that a client is running? because if I
make a webpage for 800 X 600 then a user is running a res. of 1024 X 768
then the page will be smaller in his browser, therefore how do I determine
what resolution its being run at, therefore the appropriate sized webpage
will be visible?

thanx in advance
angelo

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

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



[PHP] RE : [PHP] Redirect URL

2003-09-23 Thread Youri B .
Thank you very much,

This was the reason I figured it out now. Thank you for good advise.

Yury

On 22 Sep 2003 at 14:39, BENARD  Jean-philippe wrote:

> Headers must be sent before anything else (text, html ...). If you put
> somewhere something like : echo "test";, php will send standard HTML
> header and you'll not be able to sent another headers.
> Be sure that nothing is sent before your header or put this test on top
> of the executed script.
> 
> Cordialement,
> Jean-Philippe BENARD
> Consultant STERIA Infogйrance
> ([EMAIL PROTECTED])
> 
> -Message d'origine-
> De═: Yury B. [mailto:[EMAIL PROTECTED] 
> Envoyй═: dimanche 21 septembre 2003 22:00
> А═: [EMAIL PROTECTED]
> Objet═: [PHP] Redirect URL
> 
> Hi 
> 
> I have form in file register.php. The action of this form is the same 
> - register.php the form validation script is included in this file 
> like include("mail.php") In mail.php there is two sections - one is 
> working if user didn't complete form properly another if everything 
> okay. So, I need form to show the different page (let's say 
> success.htm) if everything was filled right. I include the following 
> in the mail.php file if everything is okay: header("Location: 
> http://test.my/success.htm";); But it doesn't work even though all the 
> files are in 
> the same directory. 
> it shows:
> Warning: Cannot modify header information - headers already sent by 
> (output started at z:\home\test.my\www\register.php:5) in 
> z:\home\test.my\www\mail.php on line 41
> 
> What is wrong?
> 
> Yury
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 
> 
> 
> 

<>< <>< <>< <>< God is our provider ><> ><> ><> ><> 
http://www.body-builders.org/

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



Re: [PHP] Shopping Cart Solutions

2003-09-23 Thread pete M
loads  at hotscripts.com
http://www.hotscripts.com/PHP/Scripts_and_Programs/E-Commerce/index.html
Adrian Teasdale wrote:
Charles

Try oscommerce.org - it's an open source app written in PHP that has a
fantastic community and is incredibly feature-rich.  I'm not associated
with the project, but I have used it
Best regards

Ade
Sourceguardian.com

-Original Message-
From: Charles Kline [mailto:[EMAIL PROTECTED] 
Sent: 22 September 2003 21:10
To: [EMAIL PROTECTED]
Subject: [PHP] Shopping Cart Solutions

Anyone have suggestions for open source shopping cart apps in PHP?

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



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


Re: [PHP] CAN I CASH the output of PHP SCRIPT?

2003-09-23 Thread nabil
thanks for the spell correction :))

"Becoming Digital" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
The correct spelling is "cache."  I'm not trying to be a spelling and
grammar freak (though I am), simply aiding your future searches on the
topic.

PEAR has a very nice output caching class.  I haven't used it myself, but
I've heard good things.  I believe it was discussed recently on this very
list, though it may have been in PHP Architect.  I read too many things to
keep track! :)

Edward Dudlik
Becoming Digital
www.becomingdigital.com



- Original Message -
From: "Nabil" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, 23 September, 2003 11:11
Subject: [PHP] CAN I CASH the output of PHP SCRIPT?


Hi all;

I would like to cash all the output of PHP files on my apache .. to increase
the performance. To prevent PHP to work all the time to interpret and
connect to myself which is slow the performance and use the CPU .. as I have
very heavy loaded server.. I thought there might be a way to store all the
HTML output from my PHP pages,  that will apache serve instead of calling
the PHP file every.. and should be a way to time the update ...

Any idea ??
Nabil

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

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



[PHP] Creating Objects!

2003-09-23 Thread Webmaster

HI,

let us say there is Class A.
In the constructor of this class I create an Object B of Class B.

Now what is the difference between these two ?

this->B = new B;

and

B = new B;


Thank you very much!

Wenmaster

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



[PHP] Creating objects

2003-09-23 Thread Webmaster
Hi,

let us say there is Class A.
In the constructor of this class I create an Object B of Class B.

Now what is the difference between these two ?

this->B = new B;

and

B = new B;


Thank you very much!

Wenmaster

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



Re: [PHP] Shopping Cart Solutions

2003-09-23 Thread Becoming Digital
I'll give a big "+2" to all of this.  I spent a great deal of time writing a program 
for customizing various aspects of osCommerce.  After a while, I just dropped the 
project because it was becoming a tangled web of code and not at all my style.

Edward Dudlik
Becoming Digital
www.becomingdigital.com



- Original Message - 
From: "Chris W. Parker" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>; "Charles Kline" <[EMAIL PROTECTED]>; 
<[EMAIL PROTECTED]>
Sent: Monday, 22 September, 2003 18:21
Subject: RE: [PHP] Shopping Cart Solutions


Henrik Hudson 
on Monday, September 22, 2003 3:09 PM said:

> My 2 cents. OSCommerce is great if you want to use it out of the box,
> but we tried to extend it and alter some of it's functions and the
> code is very obtuse and making changes in one spot can lead to
> problems in others.

+1

I messed around with it for a few days just trying to add two fields to
the product table but it so difficult to find where all the mysql db
errors were being generated I just gave up and decided to write my own
cart from scratch. ;)

I should clarify a little. I gave up after only trying to add two fields
because the other features that I needed in a shopping cart were WAY
more complicated than the two fields and I reasoned that if it was that
difficult to add two fields it's going to be near impossible to add what
I wanted. So I decided my time would be better spent developing my own
cart (what learning experience it's been!!). I would be able to extend
my own cart much more quickly and efficiently than I could anyone elses
code.

> Also, it tries to throw in the kitchen-sink worth
> of options and if you need something slimmer or more easily
> configured you might be better off starting from another codebase.

+1



Chris.

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

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



Re: [PHP] PHP Editor - which to use?

2003-09-23 Thread Evan Nemerson
In you php.ini, set error_append_string to "... you loser!"


On Monday 22 September 2003 07:56 pm, [EMAIL PROTECTED] wrote:
 > >You must either be insane, a genius, or joking.
>
> Some of the most gifted people in the world are all three! Not that I'm
> claiming to be one, but yes I'm all three. :-D
>
> > I couldn't imagine writing code without context sensitive highlighting --
>
> there are so many bugs that would be overlooked. - Huh? What's that?
> Context hightlighting? Like built-in colorful magic markers? Ehh. Bugs can
> NEVER go overlooked as long as PHP's parse-errors are always right there to
> rub it in that we fudged up... ;) I swear...all PHP error msgs should end
> with "you loser!" :-D
>
> > And not being able to use M-g to goto aline number?  (I use Emacs)  I'd
> > go
>
> bonkers.
> Notepad as well. ctrl+G -- only found out about that a year into
> PHPdammit. coulda really used it when I was learning...beat the hell
> outta using the down arrow and counting in my head!
>
> Hope ya don't think I'm tryin to poke fun Dan. I meant well ;) Quite
> frankly I dont think I'd ever learn an "editor", I've used Notepad so long,
> it's like an 85 year old man learning how to use a DVD player. ;)

-- 
[cli]
"To think is to differ."

-Clarence Darrow

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



Re: [PHP] javascript open window and a PHP script...

2003-09-23 Thread Marek Kilimajer
You should use:
Add or Update 
Your Event

Propably won't fix your problem but this will help javascript disabled 
browsers.

jsWalter wrote:
I have a link on a page...


   Add or Update Your Event

This open the PHP file just fine and passes the vars fine.

But I need a new window to open via JavaScript. Why? Because I have a
"RETURN" link on the opening page that closes the child page, and if this
new window is not opened via JavaScript I get the "Close Window OK?" dialog.
The only way to not get that annoying dialog is to have that child window
opened via JavaScript.
So I did this...


   Add or Update Your Event

A child window opens, I get 1 error dialog and a Download dialog, and then
the page opens fine.
error:
  IE cannot download calendar.php from window.open('...
  IE was not able to open this Internet site. The requested site is
either
  unavailable or cannot be found. Please try again.
I hit OK and both the error dialog and the download page goes away.

But the desired page is displayed in the child window!

And the "RETURN" link closes the window without complaint!

So, I've solved one issue to raise another.

Anyone have any idea on this?

Thanks

Walter

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


Re: [PHP] PHP5 interfaces?

2003-09-23 Thread Marek Kilimajer
Javier Muniz wrote:

interface BoardMember
{
function position(); // used to set board position of board member
}
interface Employee
{
function position();  // used to set job title of employee
}
 
class BusyBoardMember implements Employee, BoardMember 
{
function position();  // what does this function do? ambiguous unless I
am missing something
}
It is not ambiguous, you should implement the function here.

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


Re: [PHP] Creating Objects!

2003-09-23 Thread Evan Nemerson
Well in the first one the property of A named "B" will be an instance of B. In 
the second one a local variable in the constructor function named "B" which 
is an instance of B, and that variable will not be accessible from any 
function other than the constructor (unless you're playing w/ the reflection 
api, which i sincerely doubt)

look up variable scope in the manual. maybe php.net/variable-scope, but im too 
lazy to check (its 4am here)



On Tuesday 23 September 2003 03:44 am, Webmaster wrote:
> HI,
>
> let us say there is Class A.
> In the constructor of this class I create an Object B of Class B.
>
> Now what is the difference between these two ?
>
> this->B = new B;
>
> and
>
> B = new B;
>
>
> Thank you very much!
>
> Wenmaster

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



Re: [PHP] Running system commands

2003-09-23 Thread Evan Nemerson
google for openssh or lsh. I dunno if you'd be able to input the password 
through PHP, but if not you could telnet over an SSH encrypted tunnel... Or 
if you have absolutely no worries about security you could use telnet, but 
that would be, IMHO, a Bad Idea(TM).


On Tuesday 23 September 2003 02:06 am, Nitin wrote:
> Hi all,
>
> I was wondering, if anyone can help me with running system commands from
> within php. Actually I have a script which deletes users from my database
> (which is of course MySQL), now I want to delete those users from system
> level also, as they are authenticated users of my OS also.
>
> Now, the problem is, that I'm running my MySQL server and web server on
> different machines. I can do whatever on remote DB server but how to run a
> system command on another machine. I know, it's possible to run system
> commands on local server by system(), but what about remote server?
>
> Any help will be highly appreciated.
>
> Thanx in advance
> Nitin

-- 
"Who controls the past controls the future. Who controls the present controls 
the past."

-George Orwell

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



Re: [PHP] php4ts.dll and Win2000 IIS server

2003-09-23 Thread Marek Kilimajer
Check these out for solutions:
http://bugs.php.net/bug.php?id=13383
http://bugs.php.net/bug.php?id=12358
And other suggestions will come up if you google:
http://www.google.com/search?q=The%20specified%20CGI%20application%20misbehaved%20by%20not%20returning%20a%20complete%20set%20of%20php
Astron of BrOnX wrote:

Dear Marek Kilimajer and others,

I have done all thing that you told me.. In my local (winXP, IIS5.1) SSL is
working fine now.. I have replaced php4ts.dll Manuzhai suggested to use
php4ts.dll from http://ftp.proventum.net/pub/php/win32/misc/openssl/  and it
is okay now..
But, windows2000 IIS gives an error when i have replaced php4ts.dll with new
one (Manuzhai dll), it says,
CGI Error
The specified CGI application misbehaved by not returning a complete set of
HTTP headers. The headers it did return are:
is there any problem with win2000 IIS? I have been doing all things to
enable SSL,like copying dlls from c:\php\dlls  to c:\winnt\system and
replace php4ts.dll ..
Thanks,
Astron
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] bugs.php.net

2003-09-23 Thread Marek Kilimajer
http://cvs.php.net/cvs.php/php-bugs-web?login=2

Amith Varghese wrote:
Can anyone tell me where I can download the bug tracking system used for
bugs.php.net?  I don't see any links on the PHP site (or i'm probably missing
something quite obvious)
Thanks
Amith
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] How to update url on server side...php header func?

2003-09-23 Thread Mike Klein
I have written a database explorer/update program and when the user 
successfully updates/inserts a new record I would like to have the url 
updated to reflect new query (in addition to returning form w/new values).

I am using url/get for all data transfer rather than post. Maybe this is 
a problem.

Basically original url is (pseudo) "select * from table where rec=5"

This url returns an editable detail form from server. User changes rec=5 
to 6 in the form, and additional url parms are added via javascript so I 
can create an update (or insert) statement which the server then processes.

If server has success with this, I want to return editable detail w/new 
values and additionally change original url to "select * from table 
where rec=6".

I need to change url as if the user changes returned form values and 
hits update again, since I'm working off url for query and not form 
data, it still keys off the original query...not a modified one, which I 
want.

I guess I could be using only posted form data for communication between 
client and server, right?...as server could return updated query string 
in hidden form fields. But before switching all my code, I thought I 
might be able to change/forward the url to something else (new query 
string). When I try to do this via header() php complains that header 
already sent.

any ideas of how to better go about this?

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


Re: [PHP] Formatting a string for entry into MySQL

2003-09-23 Thread Burhan Khalid
James Johnson wrote:
Hi,

I'm trying to generate a string that contains a , to insert into a MySQL
table. It appears the  is being stripped out either just before or
during the update.
http://www.php.net/mysql-escape-string

--
Burhan Khalid
phplist[at]meidomus[dot]com
http://www.meidomus.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


RE: [PHP] Calling PHP shell scripts with exec from within PHP goes awry?

2003-09-23 Thread Jay Blanchard
[snip]
The example that I'm really trying to do might be too complicated for 
presentation here, but here's a simplified version.

Take the shell script "helloWorld.php":

#!/usr/local/bin/php -q

[/snip]

I could not replicate your problem on a 4.2.n or 4.3.n box but I will
say this concerning shell scripts (although the rpoblem only occured on
the 4.3.n box)...you should always have at least one blank line between
the bash and the start of the code. As long as that blank line existed I
had no problems on either box. I know that this is not much help, but I
did attempt to replicate your problem (only the paths were changed) and
these were my results.

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



RE: [PHP] Calling PHP shell scripts with exec from within PHP goes awry?

2003-09-23 Thread Robert Cummings
On Tue, 2003-09-23 at 07:47, Jay Blanchard wrote:
> [snip]
> The example that I'm really trying to do might be too complicated for 
> presentation here, but here's a simplified version.
> 
> Take the shell script "helloWorld.php":
> 
>   #!/usr/local/bin/php -q
>   
> [/snip]
> 
> I could not replicate your problem on a 4.2.n or 4.3.n box but I will
> say this concerning shell scripts (although the rpoblem only occured on
> the 4.3.n box)...you should always have at least one blank line between
> the bash and the start of the code. As long as that blank line existed I
> had no problems on either box. I know that this is not much help, but I
> did attempt to replicate your problem (only the paths were changed) and
> these were my results.

I've never had a problem with not putting an extra blank line between
binary path and the actual script. Actually I would say that would break
the output since an extra line would be printed in the case of a PHP
script.

Cheers,
Rob.
-- 
..
| InterJinn Application Framework - http://www.interjinn.com |
::
| An application and templating framework for PHP. Boasting  |
| a powerful, scalable system for accessing system services  |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for   |
| creating re-usable components quickly and easily.  |
`'

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



RE: [PHP] How to update url on server side...php header func?

2003-09-23 Thread Jay Blanchard
[snip]
Basically original url is (pseudo) "select * from table where rec=5"
...
any ideas of how to better go about this?
[/snip]

The query is in the URL? Really? You have just asked for a security
problem (google for "sql injection" and you'll see what I am talking
about). If you have anything that looks like
http://www.yourserver.com/script.php?sql=select you need to stop what
you are doing.

Honestly, I believe that you need to change your code, and without
seeing your current code I couldn't make any further recommendations.

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



RE: [PHP] Calling PHP shell scripts with exec from within PHP goesawry?

2003-09-23 Thread Jay Blanchard
[snip]
I've never had a problem with not putting an extra blank line between
binary path and the actual script. Actually I would say that would break
the output since an extra line would be printed in the case of a PHP
script.
[/snip]

Very true Robert, it can break the output. I generally avoid this by
invoking php the long way.
Examples;
(cron)

* * * * * /usr/local/bin/php -q /the/path/to/the/script.php > /dev/null 

(exec)
$strExecScript = "/usr/local/bin/php -q /the/path/to/the/script.php";
exec($strExecScript);

Habits! What would we do without them?

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



RE: [PHP] How to update url on server side...php header func?

2003-09-23 Thread Mike Klein
The word (pseudo) implied that my url metadata effectively generates a sql
statement. Query metadata in the url on the server side is generated as sql.

This is exactly what phpMyAdmin does...my app presents no more a security
problem than theirs.

The script runs as guest/guest against mysql unless realm authentication has
been setup on the web server, in which case it runs with credentials of
whose already authenticated.

Unless someone's auth'd with my personal credentials, all they can do is
query a stupid quotations table in a database of mine. No deletes, inserts,
or updates.


mike

-Original Message-
From: Jay Blanchard [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 23, 2003 4:53 AM
To: Mike Klein; [EMAIL PROTECTED]
Subject: RE: [PHP] How to update url on server side...php header func?


[snip]
Basically original url is (pseudo) "select * from table where rec=5"
...
any ideas of how to better go about this?
[/snip]

The query is in the URL? Really? You have just asked for a security
problem (google for "sql injection" and you'll see what I am talking
about). If you have anything that looks like
http://www.yourserver.com/script.php?sql=select you need to stop what
you are doing.

Honestly, I believe that you need to change your code, and without
seeing your current code I couldn't make any further recommendations.

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



[PHP] php and checkboxes

2003-09-23 Thread Angelo Zanetti
Hi all,

I have a table that gets populated from records of a DB. every row in the
table has a checkbox and the items desc. I want the user to select the items
they want and then they click on a link which registers the items they've
selected in a session variable. Firstly I am not sure if this can be done on
that same page or on the page to which the link calls. IE: if php can
determine which checkboxes have been selected. All the checkboxes are all
part of an array.

this is the way it should work:

1. the user selects the items they want
2. then clicks a link to another page
3. this page then displays what was selected
4. this info must be sent in a session variable.
5. must not use a submit button as I want the info to be saved in session
variable.

I hope that this makes sense.
TIA

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



[PHP] problem passing variable between forms.

2003-09-23 Thread Angelo Zanetti
Hi John,

therefore I can register this variable on the same page as the checkboxes?
So therefore is it posssible for php to determine which checkboxes have been
selected (or are the ones that are selected added to the array)?

TIA



-Original Message-
From: CPT John W. Holmes [mailto:[EMAIL PROTECTED]
Sent: Tuesday, August 26, 2003 4:00 PM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: Re: [PHP] problem passing variable between forms.



- Original Message -
From: "Angelo Zanetti" <[EMAIL PROTECTED]>
> I have a form in which I have a table with dynamic checkboxes, they are in
a
> checkbox array ( name = chk[]...), I pass this variable to the next page
> using POST I receive the variable and use it, no problem, but then when I
> try to pass it to the next form in the URL (using an A HREF:
>
>   )

You need to serialize() the array in order to pass all of it's values.

$ser = urlencode(serialize($chk));

$url = "confirmrequest.php?requested=$ser";

Then on the receiving side...

$chk = unserialize($_GET['requested']);

You could also just add it to the session and make it easy...

$_SESSION['chk'] = $chk;

and on the receiving page:

$chk = $_SESSION['chk'];

---John Holmes...

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

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



RE: [PHP] How to update url on server side...php header func?

2003-09-23 Thread Jay Blanchard
[snip]
Unless someone's auth'd with my personal credentials, all they can do is
query a stupid quotations table in a database of mine. No deletes,
inserts,
or updates.
[/snip]

OK.

[quote]
This url returns an editable detail form from server. User changes rec=5

to 6 in the form, and additional url parms are added via javascript so I

can create an update (or insert) statement which the server then
processes.
[/quote]

Passing the param rec (5 for first, 6 for second) has to be done via a
form GET to be placed in the URL. 

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



Re: [PHP] php and checkboxes

2003-09-23 Thread Robert Cummings
On Tue, 2003-09-23 at 08:17, Angelo Zanetti wrote:
> Hi all,
> 
> I have a table that gets populated from records of a DB. every row in the
> table has a checkbox and the items desc. I want the user to select the items
> they want and then they click on a link which registers the items they've
> selected in a session variable. Firstly I am not sure if this can be done on
> that same page or on the page to which the link calls. IE: if php can
> determine which checkboxes have been selected. All the checkboxes are all
> part of an array.
> 
> this is the way it should work:
> 
> 1. the user selects the items they want
> 2. then clicks a link to another page

Link can have javascript in it to either build a target URL or to submit
the form. I'd personally go for the form solution since the URL will be
ugly.

> 3. this page then displays what was selected

Form submits to the same page in which it is presented.

> 4. this info must be sent in a session variable.

Why? Set up the session variable using the data submitted by the form.

> 5. must not use a submit button as I want the info to be saved in session
> variable.

Once again why? Sure I can see not using a submit button, but I don't
see how that relates to the info being saved in a session variable.

> 
> I hope that this makes sense.

Somewhat :)

Cheers,
Rob.
-- 
..
| InterJinn Application Framework - http://www.interjinn.com |
::
| An application and templating framework for PHP. Boasting  |
| a powerful, scalable system for accessing system services  |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for   |
| creating re-usable components quickly and easily.  |
`'

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



Re: [PHP] problem passing variable between forms.

2003-09-23 Thread CPT John W. Holmes
From: "Angelo Zanetti" <[EMAIL PROTECTED]>
> therefore I can register this variable on the same page as the checkboxes?
> So therefore is it posssible for php to determine which checkboxes have
been
> selected (or are the ones that are selected added to the array)?

The ones that are selected are added to the array.

---John Holmes...

> - Original Message -
> From: "Angelo Zanetti" <[EMAIL PROTECTED]>
> > I have a form in which I have a table with dynamic checkboxes, they are
in
> a
> > checkbox array ( name = chk[]...), I pass this variable to the next page
> > using POST I receive the variable and use it, no problem, but then when
I
> > try to pass it to the next form in the URL (using an A HREF:
> >
> >   )
>
> You need to serialize() the array in order to pass all of it's values.
>
> $ser = urlencode(serialize($chk));
>
> $url = "confirmrequest.php?requested=$ser";
>
> Then on the receiving side...
>
> $chk = unserialize($_GET['requested']);
>
> You could also just add it to the session and make it easy...
>
> $_SESSION['chk'] = $chk;
>
> and on the receiving page:
>
> $chk = $_SESSION['chk'];
>
> ---John Holmes...
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>

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



Re: [PHP] speaking of php editors

2003-09-23 Thread Curt Zirzow
* Thus wrote Eugene Lee ([EMAIL PROTECTED]):
> On Tue, Sep 23, 2003 at 12:28:12AM +, Curt Zirzow wrote:
> : * Thus wrote Chris W. Parker ([EMAIL PROTECTED]):
> : > 
> : > I am looking for an editor that will highlight the string
> : > "{$array['index']['index']}" within a string.
> : > 
> : > For example:
> : > 
> : > +- gray +
> : > |   |
> : > |  +-- red ---+ |
> : > |  |  | |
> : > $variable = "The amount is {$amount[0]}.";
> :    ^^ ^^ +*%%#^#+^^
> : 
> : Thats vi's coloring :)
> 
> Plain vi does not do syntax highlighting.  Perhaps you are using a
> vi-derivative, like Vim.
> 
>   http://www.vim.org/

yeah, I suppose I should clarify that.  I sometimes use vi/vim
interchangably, which I shouldn't do.  Thanks for noting this.

Curt
-- 
"I used to think I was indecisive, but now I'm not so sure."

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



Re: [PHP] TAR Error - 'Invalid block size'

2003-09-23 Thread Ray Hunter

> I use the TAR.php file for extract tar.gz file. The tar file extracted
> fine, but the tar class raises the 'Invalid block size 351'. Why? And
> how can I discard this error.

Basically, tar writes in block sizes of 512 bytes so you are receiving
an invalid block size smaller than 512 which has a size of 351. Not sure
how you can suppress these messages via TAR.php. However, if you get a
new tar files that has the blocking correct you will not receive that
error.

--
BigDog

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



Re: [PHP] Mail problem

2003-09-23 Thread Trevor Dowling
Fixed!

Thanks

Trevor


"Trevor Dowling" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> All,
>
> Many thanks for you thoughts, I will take a look at your suggestions, I
hope
> they fix the issue, others suggested the same things so I think we can
> assume your all correct, (I hope so!)
>
> Once again, thanks
>
> Trevor
>
> "Curt Zirzow" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
> > * Thus wrote Trevor Dowling ([EMAIL PROTECTED]):
> > > PHP Version 4.3.2
> > > I am having problems sending a large number of emails from a mail list
> held
> > > in a database. I don't belive that the database has anything to do
with
> the
> > > problem.
> > >
> > > I have about 9000 addresses and can only successfully send about 2000
> mails
> > > before the page say complete/done.
> >
> > see set_time_limit().
> > http://php.net/set_time_limit
> >
> > Also the webserver will disconnect after a certain amount of time,
> > you can search the archives to see how people resolved this in the
> > past.
> >
> > >
> > >  while (odbc_fetch_row ($result))
> > >  {
> > >
> > >   $EmailAddress = trim (odbc_result ($result, 'email'));
> > >
> > > flush();
> >
> > flush isn't necessary here, doesn't have anything to do with your
> > issue though.
> >
> > oh, and also add a few lines that say:
> >   if(preg_match('[EMAIL PROTECTED]', $EmailAddress) ) {
> > continue;
> >   }
> > > @mail ($EmailAddress, "Support", $Message);
> > >
> >
> > HTH,
> >
> > Curt
> > --
> > "I used to think I was indecisive, but now I'm not so sure."

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



Re: [PHP] TAR Error - 'Invalid block size'

2003-09-23 Thread Ray Hunter

> > I use the TAR.php file for extract tar.gz file. The tar file extracted
> > fine, but the tar class raises the 'Invalid block size 351'. Why? And
> > how can I discard this error.
> 
> Basically, tar writes in block sizes of 512 bytes so you are receiving
> an invalid block size smaller than 512 which has a size of 351. Not sure
> how you can suppress these messages via TAR.php. However, if you get a
> new tar files that has the blocking correct you will not receive that
> error.

You might be able to use the -B option to tar to suppress the block size
error. However, I have not tested that out before and I am not 100% sure
of the results that you will see. But possibly an option.

example:

tar -xvfB file.tar


--
BigDog

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



[PHP] PHP class and extends

2003-09-23 Thread BENARD Jean-philippe
Hi !

I've got a problem with class extends. I've a "top" class which
name is cl_app. xxx_cl_app is an extend of cl_app. Cl_app define a
function called "ExecuteQuery". xxx_cl_app define this function too but
this one is obsolete. Now, I want to use the cl_app "ExecuteQuery"
function in my app but there is a problem :

In the cl_app class, "ExecuteQuery" function return 2 object : 
$return = array($nb_lines, $array_results)
and the xxx_cl_app defined this function as :
$return = array($array_results, $nb_lines)

I don't want to recode all others scripts and I don't want to put the
new function code in xxx_cl_app. So here is my question :

Is there something to do in order that when I use
xxx_cl_app->ExecuteQuery(), there's a function ExecuteQuery() in
xxx_cl_app that do something like this :

(xxx_cl_app.php)
function ExecuteQuery(x,y) {
$tmpResult = [herited_class]->ExecuteQuery(x,y);
return array($tmpResult[1], $tmpResult[0]);
}

Thanks in advance !

(o_   BENARD Jean-Philippe - Consultant STERIA Infogérance
(o_   (o_   //\ RENAULT DTSI/ODPS/[EMAIL PROTECTED] * ALO * API : MLB 02C 1 14
(/)_  (\)_  V_/_   2 Av du vieil étang * 78181 MONTIGNY-LE-BRETONNEUX
   Tél : +33 1-30-03-47-83 * Fax : +33 1-30-03-42-10

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



[PHP] $_SERVER['UNIQUE_ID'] question

2003-09-23 Thread Susan Ator
I have looked and cannot find any information on this particular variable.
How unique is this id and when does it get generated? I'm looking to use
this as a session identifier.

Susan

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



Re: [PHP] $_SERVER['UNIQUE_ID'] question

2003-09-23 Thread Curt Zirzow
* Thus wrote Susan Ator ([EMAIL PROTECTED]):
> I have looked and cannot find any information on this particular variable.
> How unique is this id and when does it get generated? I'm looking to use
> this as a session identifier.
 
This is a variable created by the webserver, it is unique per page
request.  

Curt
-- 
"I used to think I was indecisive, but now I'm not so sure."

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



Re: [PHP] when clients go bad

2003-09-23 Thread Raditha Dissanayake
Hi Jay and everyone,

Sorry about the belated reply but i do believe that "Work product for 
the customer belongs to the customer unless specifically stated 
differently in the contract" does not apply to source code. Obviously we 
are all programmers and not lawyers in this group but i stand by this 
(until a lawyer corrects me ;-) )

Jay Blanchard wrote:

[snip]
...
[/snip]
Work product for the customer belongs to the customer unless
specifically stated differently in the contract. It is their
intellectual property. I have coded both as an employee contractor for
several years and it is always understood (unless the contract states
differently) that the customer owns the work product. I have a couple of
tools which I have developed over time, and I specifically exclude these
from the work product in the contract if I expect to use them. If the
customer chooses to argue on those I just do not use them on their
project.
Have you done anything special with regards to their site that you
should have copyrighted?
 



--
http://www.radinks.com/upload
Drag and Drop File Uploader.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


RE: [PHP] Formatting a string for entry into MySQL

2003-09-23 Thread James Johnson
Ok, thanks. It took a little bit of experimenting with printf(), sprintf()
and quotes, but I got it to work.

mysql_select_db($database_CCB, $CCB);
$ad_contact = "[EMAIL PROTECTED]909-555-1212";
$esAdContact = mysql_escape_string($ad_contact);
$q = sprintf("UPDATE subscriber_ads SET ad_contact = '%s' WHERE subid = 43",
$esAdContact);
$r = mysql_query($q, $CCB) or print(mysql_error()); 

Thanks,
James

-Original Message-
From: Burhan Khalid [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, September 23, 2003 4:45 AM
To: James Johnson; [EMAIL PROTECTED]
Subject: Re: [PHP] Formatting a string for entry into MySQL


James Johnson wrote:
> Hi,
> 
> I'm trying to generate a string that contains a , to insert into a 
> MySQL table. It appears the  is being stripped out either just 
> before or during the update.

http://www.php.net/mysql-escape-string

-- 
Burhan Khalid
phplist[at]meidomus[dot]com
http://www.meidomus.com

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

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



[PHP] SEssion error

2003-09-23 Thread Stephen Schneider
I am getting the following error:

SESS: [TID: 5F0],.\src\tp0tcp_s.c:668: TP0: tp0tcp_conn_req() Connect
Socket# [2700] is too high. The supported socket range is 0-1024 
 
It only appears on one page on our web site.  I am using sessions for
login tracking.  If they aren't logged in we get the message.  If they
are logged in we don't.  This is the only page that we get the error.
Not sure if it's some bad code, but I didn't see anything.  MOst of the
code is shared on other pages.
 
The only thing different about this page is that we have an odbc
connection to an rs/6000 database.
 
If anyone has any ideas I'd appreciate some insight.
 
Stephen
 


Re[2]: [PHP] CAN I CASH the output of PHP SCRIPT?

2003-09-23 Thread Tom Rogers
Hi,

Wednesday, September 24, 2003, 1:36:26 AM, you wrote:
RR> On Tue, 23 Sep 2003 05:27:12 +
RR> Curt Zirzow <[EMAIL PROTECTED]> wrote:

>> * Thus wrote Nabil ([EMAIL PROTECTED]):
>> > Hi all;
>> > 
>> > I would like to cash all the output of PHP files on my apache ..
>> > to increase the performance. To prevent PHP to work all the time
>> > to interpret and connect to myself which is slow the performance
>> > and use the CPU .. as I have very heavy loaded server.. I
>> > thought there might be a way to store all the HTML output from
>> > my PHP pages,  that will apache serve instead of calling the PHP
>> > file every.. and should be a way to time the update ...
>> > 
>> > Any idea ??
>> 
>> I just installed mmcache, real simple to do too.
>> 
>> http://www.turcksoft.com/en/e_mmc.htm
>> 
>> 
>> Curt

RR> You know, I have tried several times to access that site.  Each time
RR> I've been greeted by a "500 Internal Server Error" message.

RR> --
RR> Raquel
RR> 
RR> Nobody is free until everybody is free.
RR>   --William T. Atkins


you can download it from here
http://sourceforge.net/project/showfiles.php?group_id=69426

-- 
regards,
Tom

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



[PHP] Logged Out of Seesion, Then use back button

2003-09-23 Thread Roger Spears
Hello,

I've googled to try to find an answer to this.  I've also checked the 
php.net site.  Perhaps I'm not using the correct search parameters.  The 
only suggestion I've found is the following code:


But this doesn't seem to solve my problems.

My problem/question is as follows.

I have an email script that works in the following steps:

1) Login (if success then "FROM" and a personal email signature are 
properly populated)

2) Choose specifics for the email (this populates the "TO" variable and 
the other "BODY" variables)

3) Then click on preview (this creates the email with all the current 
variables, on the screen for viewing)

4) Then send the email

5) Prompted to create another or logout (if create another, then some 
session variables are unset) (if logout then session is destroyed)

Everything works as intended.  

One user, however, has created a glitch.  He/she logged out and later 
returned to their still opened browser and used the "back" button to 
return to step 2 in the process.  Every email they created after using 
the back button has the following problems:
1) The reply to address and the from address are both default server 
address's and not the users personal email address.
2) Their is no personal signature.

Here's my questions
1) How can I prevent the use of the browser "back" button after someone 
logs out?
2) If, after a user has attained step 3, they use their back button to 
change a variables value in step 2, the new value is never saved by the 
session and their original entry is used in the email.  How can I adjust 
for people using their "back" buttons during the individual steps of the 
script?
3) Should the header calls appear before the session_start or after?

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


Re: [PHP] Logged Out of Seesion, Then use back button

2003-09-23 Thread Didier McGillis
http://www.php.net/manual/en/function.header.php


// always modified
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
// HTTP/1.1
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Cache-Control: post-check=0, pre-check=0", false);
// HTTP/1.0
header("Pragma: no-cache");
?>


From: Roger Spears <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Subject: [PHP] Logged Out of Seesion, Then use back button
Date: Tue, 23 Sep 2003 11:51:40 -0400
Hello,

I've googled to try to find an answer to this.  I've also checked the 
php.net site.  Perhaps I'm not using the correct search parameters.  The 
only suggestion I've found is the following code:


But this doesn't seem to solve my problems.

My problem/question is as follows.

I have an email script that works in the following steps:

1) Login (if success then "FROM" and a personal email signature are 
properly populated)

2) Choose specifics for the email (this populates the "TO" variable and the 
other "BODY" variables)

3) Then click on preview (this creates the email with all the current 
variables, on the screen for viewing)

4) Then send the email

5) Prompted to create another or logout (if create another, then some 
session variables are unset) (if logout then session is destroyed)

Everything works as intended.

One user, however, has created a glitch.  He/she logged out and later 
returned to their still opened browser and used the "back" button to return 
to step 2 in the process.  Every email they created after using the back 
button has the following problems:
1) The reply to address and the from address are both default server 
address's and not the users personal email address.
2) Their is no personal signature.

Here's my questions
1) How can I prevent the use of the browser "back" button after someone 
logs out?
2) If, after a user has attained step 3, they use their back button to 
change a variables value in step 2, the new value is never saved by the 
session and their original entry is used in the email.  How can I adjust 
for people using their "back" buttons during the individual steps of the 
script?
3) Should the header calls appear before the session_start or after?

Thanks in advance,
Roger
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
_
MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*.  
http://join.msn.com/?page=features/virus

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


Re: RE: [PHP] PHP Editor - which to use?

2003-09-23 Thread jeffrey pearson
I like to use Edit Plus. www.editplus.com

It has the syntax highlighting for php, perl, java, and many others through modules 
that are downloadable from their web site, DOESNT change code like dreamweaver does 
and its cheap ($25). 

Jeff Pearson

- Original Message -
From: "Ruessel, Jan" <[EMAIL PROTECTED]>
Date: Monday, September 22, 2003 2:00 am
Subject: RE: [PHP] PHP Editor - which to use?

> well, i like to use dreamweaver mx or textpad with the syntax highlighting 
> file you additionally have to download. i dunno if there are special "php-
> must-have-editors".
> grtz
> jan
> 
> -Original Message-
> From: Binay [EMAIL PROTECTED]
> Sent: Montag, 22. September 2003 10:58
> To: [EMAIL PROTECTED]
> Subject: [PHP] PHP Editor - which to use?
> 
> 
> Hi everybody!
> 
> Please suggest me  a good PHP editor like ( Microsoft's Interdev for ASP) 
> to write my php programs/scripts and get a visual feel.
> 
> 
> Thanks 
> Binay
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 

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



Re: [PHP] Logged Out of Seesion, Then use back button

2003-09-23 Thread Roger Spears
Sorry Didier, your suggestion did not solve the problem.  I appreciate 
the information though!

I'm still having the "back" button problem in the middle of using the 
script.

Thanks,
Roger
Didier McGillis wrote:

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


// always modified
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
// HTTP/1.1
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Cache-Control: post-check=0, pre-check=0", false);
// HTTP/1.0
header("Pragma: no-cache");
?>


From: Roger Spears <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Subject: [PHP] Logged Out of Seesion, Then use back button
Date: Tue, 23 Sep 2003 11:51:40 -0400
Hello,

I've googled to try to find an answer to this.  I've also checked the 
php.net site.  Perhaps I'm not using the correct search parameters.  
The only suggestion I've found is the following code:


But this doesn't seem to solve my problems.

My problem/question is as follows.

I have an email script that works in the following steps:

1) Login (if success then "FROM" and a personal email signature are 
properly populated)

2) Choose specifics for the email (this populates the "TO" variable 
and the other "BODY" variables)

3) Then click on preview (this creates the email with all the current 
variables, on the screen for viewing)

4) Then send the email

5) Prompted to create another or logout (if create another, then some 
session variables are unset) (if logout then session is destroyed)

Everything works as intended.

One user, however, has created a glitch.  He/she logged out and later 
returned to their still opened browser and used the "back" button to 
return to step 2 in the process.  Every email they created after 
using the back button has the following problems:
1) The reply to address and the from address are both default server 
address's and not the users personal email address.
2) Their is no personal signature.

Here's my questions
1) How can I prevent the use of the browser "back" button after 
someone logs out?
2) If, after a user has attained step 3, they use their back button 
to change a variables value in step 2, the new value is never saved 
by the session and their original entry is used in the email.  How 
can I adjust for people using their "back" buttons during the 
individual steps of the script?
3) Should the header calls appear before the session_start or after?

Thanks in advance,
Roger
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
_
MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*.  
http://join.msn.com/?page=features/virus

--
Roger Spears
Technology Project Coordinator
College of Arts and Sciences
Bowling Green State University
205 Administration Bldg.
Bowling Green, OH 43403
419-372-2015
419-372-8548 fax
"The best accelerator available for a Mac is one that causes it to go at 9.81 m/s2."
(The rate at which objects fall to earth)
"It would be just like programmers to shorten 'the year 2000 problem' to 'Y2K'... exactly 
the kind of thinking that created this situation in the first place."
- Steven C. Meyer
"The significant problems we face cannot be solved at the same level of thinking we were at 
when we created them."
- Albert Einstein
"If a cluttered desk is a sign of a cluttered mind, of what then, is an empty desk?"
- Albert Einstein
"It is well to remember that the entire universe, with one trifling exception, is composed 
of others."
- John Andrew Holmes
"The only thing more dangerous than a hardware guy with a code patch is a programmer with a soldering iron."

"3 Biggest Computer Room Lies:
1) As long as you remember to 'SAVE' your input, you'll never lose any files.
2) We run the stuff through as fast as it comes in the door.
3) The new machines are in order."
Murphy's Laws of Computing
--
  1. When computing, whatever happens, behave as though you meant it to happen.
  2. When you get to the point where you really understand your computer, it's 
probably obsolete.
  3. The first place to look for information is in the section of the manual where you 
least expect to find it.
  4. When the going gets tough, upgrade.
  5. For every action, there is an equal and opposite malfunction.
  6. To err is human... to blame your computer for your mistakes is even more human, 
it is downright natural.
  7. He who laughs last probably made a back-up.
  8. If at first you do not succeed, blame your computer.
  9. A complex system that does not work is invariably found to have evolved from a 
simpler system that worked just fine.
 10. The number one cause of computer problems is computer solutions.
 11. A computer program will always do what you tell it to do, but rarely what you 
want to do.


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


RE: [PHP] Logged Out of Seesion, Then use back button

2003-09-23 Thread Jay Blanchard
[snip]
1) How can I prevent the use of the browser "back" button after someone 
logs out?
[/snip]

Set a cookie on login, unset the cookie on logout. Check for cookie, if
it doesn't exist display login mechanism.

[snip]
2) If, after a user has attained step 3, they use their back button to 
change a variables value in step 2, the new value is never saved by the 
session and their original entry is used in the email.  How can I adjust

for people using their "back" buttons during the individual steps of the

script?
[/snip]

You would have to disable the back button.

[snip]
3) Should the header calls appear before the session_start or after?
[/snip]

before

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



[PHP] GD problem

2003-09-23 Thread Ignacio Correa
Hi, I´m new in PHP+GD.
I have install all library (PHP4-gd2, libgd2, etc, etc, etc.) and when I use gd 
functions no errors or warning are displayed, but when I use imagepng() or imagejpeg() 
no images are displayed in my browser, and in this place extrage symbols are displayed.
You can see my bad result here: http://www.drivingconsultancy.com/ide/testi.php

If somebody can helpme, I´ll be very thanks

(sorry, my eglish isn´t good, I´m from Argentine)

[PHP] XQL module ?

2003-09-23 Thread Gal
Does anyone know if PHP has module for XQL - XML Queary Language ?

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


Re: RE: [PHP] PHP Editor - which to use?

2003-09-23 Thread Jim Lucas
I like NoteTab from www.notetab.com

It doesn't do syntax highlighting, but if you need that, then you need to
learn to code better.

And best of all, there is a free version that does most everything the full
priced copy does.

Plus, one added feature is, is that it will allow you to do internal
scripting.


Jim Lucas

- Original Message - 
From: "jeffrey pearson" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, September 23, 2003 8:59 AM
Subject: Re: RE: [PHP] PHP Editor - which to use?


> I like to use Edit Plus. www.editplus.com
>
> It has the syntax highlighting for php, perl, java, and many others
through modules that are downloadable from their web site, DOESNT change
code like dreamweaver does and its cheap ($25).
>
> Jeff Pearson
>
> - Original Message -
> From: "Ruessel, Jan" <[EMAIL PROTECTED]>
> Date: Monday, September 22, 2003 2:00 am
> Subject: RE: [PHP] PHP Editor - which to use?
>
> > well, i like to use dreamweaver mx or textpad with the syntax
highlighting
> > file you additionally have to download. i dunno if there are special
"php-
> > must-have-editors".
> > grtz
> > jan
> >
> > -Original Message-
> > From: Binay [EMAIL PROTECTED]
> > Sent: Montag, 22. September 2003 10:58
> > To: [EMAIL PROTECTED]
> > Subject: [PHP] PHP Editor - which to use?
> >
> >
> > Hi everybody!
> >
> > Please suggest me  a good PHP editor like ( Microsoft's Interdev for
ASP)
> > to write my php programs/scripts and get a visual feel.
> >
> >
> > Thanks
> > Binay
> >
> > -- 
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
>
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

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



Re: [PHP] GD problem

2003-09-23 Thread Pete James
You're outputting a blank PNG image, in binary form.  In order to 
display it (not that you'd see anything since it's blank), you need to 
output a Content-Type header first, like so:

header("Content-Type: image/png");

THis will instruct the browser to treat the incoming data as image data.

HTH.

Ignacio Correa wrote:

Hi, I´m new in PHP+GD.
I have install all library (PHP4-gd2, libgd2, etc, etc, etc.) and when I use gd 
functions no errors or warning are displayed, but when I use imagepng() or imagejpeg() 
no images are displayed in my browser, and in this place extrage symbols are displayed.
You can see my bad result here: http://www.drivingconsultancy.com/ide/testi.php
If somebody can helpme, I´ll be very thanks

(sorry, my eglish isn´t good, I´m from Argentine)
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


RE: RE: [PHP] PHP Editor - which to use?

2003-09-23 Thread Chris W. Parker
Jim Lucas 
on Tuesday, September 23, 2003 9:56 AM said:

> Plus, one added feature is, is that it will allow you to do internal
> scripting.

What are you able to do with "internal scripting"?



chris.

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



Re: [PHP] GD problem

2003-09-23 Thread Andrew Brampton
ImagePNG() ouputs to the browser unless you specify the filename parameter
So those funny symbols you are seeing is the PNG file but displayed as text.
To fix this you need to add a

Header("Content-type: image/png");

somewhere in your PHP (preferably before ImagePNG), and it will tell your
browser that the data being sent is a PNG file, not normal text/html.

You may see the funny characters, or a red cross if you decide to use echo,
print, print_r or similar functions, since these will output to the browser
along with the PNG file, thus corrupting the image.

Oh My I just noticed you have HTML in there as well :/ If you are doing
something like:
echo '';
ImagePNG(); //I want the image to appear here
echo '';

Then you will need to do:
echo '';
echo '
echo '';

and in somephpfile.php you will have the code to generate the image
including the ImagePNG();

Andrew

- Original Message -
From: "Ignacio Correa" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, September 23, 2003 5:43 PM
Subject: [PHP] GD problem


Hi, I´m new in PHP+GD.
I have install all library (PHP4-gd2, libgd2, etc, etc, etc.) and when I use
gd functions no errors or warning are displayed, but when I use imagepng()
or imagejpeg() no images are displayed in my browser, and in this place
extrage symbols are displayed.
You can see my bad result here:
http://www.drivingconsultancy.com/ide/testi.php

If somebody can helpme, I´ll be very thanks

(sorry, my eglish isn´t good, I´m from Argentine)

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



Re: [PHP] PHP Editor - which to use?

2003-09-23 Thread Jason Wong
On Wednesday 24 September 2003 00:56, Jim Lucas wrote:

> I like NoteTab from www.notetab.com
>
> It doesn't do syntax highlighting, but if you need that, then you need to
> learn to code better.

Does that mean php shouldn't have any error reporting whatsoever, because it 
encourages bad incompetent coders who rely on being mollycoddled? 

;-)

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
--
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
--
/*
Every task takes twice as long as you think it will take
-- Fundamental Law of Thermodynamics n„1¤75
*/

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



RE: [PHP] PHP Editor - which to use?

2003-09-23 Thread Jay Blanchard
[snip]
> It doesn't do syntax highlighting, but if you need that, then you need
to
> learn to code better.

Does that mean php shouldn't have any error reporting whatsoever,
because it 
encourages bad incompetent coders who rely on being mollycoddled? 
[/snip]

Mollycoddled indeed! I remember when I had to punch holes in cards. Talk
about syntax highlighting! 

He should have said "It doesn't do syntax highlighting, but if you need
that, then you need to learn to type better."

No wonder hanging chads are lost on some.

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



Re: [PHP] PHP5 interfaces?

2003-09-23 Thread Javier Muniz
What I meant was not the implementation, what I meant was that there was no
way for the compiler/parser to know whether I was implementing position()
from the Employee interface or the BoardMember interface, the declaration
was ambiguous.

If I implement the function there, then (from what I can tell) it becomes
the position member for both the BoardMember interface AND the Employee
interface.  While this might be desired in some cases, it's definitely not
desired in all cases, so there needs to be some other identifier (such as
the implements keyword followed by which interface(s) this function should
be used for).

PHP5 may have such an identifier, but I have not found any documentation at
this point...

-Javier

Marek Kilimajer wrote:

> interface BoardMember
> {
> function position(); // used to set board position of board member
> }
> interface Employee
> {
> function position();  // used to set job title of employee
> }
>  
> class BusyBoardMember implements Employee, BoardMember 
> {
> function position();  // what does this function do? ambiguous unless
I
> am missing something
> }

It is not ambiguous, you should implement the function here.

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

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



[PHP] preg_match_all

2003-09-23 Thread Floris
hi,
I have this piece of code. but the problem is that he also links parts of
words (like: credits) and i wnat only standalone words (like: edit)
Does someone have i idea to correct this piece of code?

Floris





--
function link_search($search_words,$string,$id)
{
$word_no=0;
foreach($search_words as $search_word)
{
$regex1 = ">[^<]*(";
$regex2 = ")[^<]*<";
preg_match_all("/".$regex1.$search_word.$regex2."/i", $string, $matches,
PREG_PATTERN_ORDER);
foreach($matches[0] as $match)
{
preg_match("/$search_word/i", $match, $out);
$case_sensitive_search_word = $out[0];
$chan = "$case_sensitive_search_word";
$newtext = str_replace($case_sensitive_search_word, $chan, $match);
$string = str_replace($match, $newtext, $string);
}
$word_no++;
}
return $string;
}

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



Re: [PHP] PHP Editor - which to use?

2003-09-23 Thread Ryan A

> It doesn't do syntax highlighting, but if you need that, then you need to
> learn to code better.

O holy genius coder, we bow to you, forgive uswhy did we take the
straight and easy path instead of the rough and true path...



-Ryan

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



Re: [PHP] preg_match_all

2003-09-23 Thread Curt Zirzow
* Thus wrote Floris ([EMAIL PROTECTED]):
> hi,
> I have this piece of code. but the problem is that he also links parts of
> words (like: credits) and i wnat only standalone words (like: edit)
> Does someone have i idea to correct this piece of code?
> 
> Floris
> 
> {
> $regex1 = ">[^<]*(";
> $regex2 = ")[^<]*<";
> preg_match_all("/".$regex1.$search_word.$regex2."/i", $string, $matches,

Use the word boundry character:

$regex1 = ">[^<]*\b(";
$regex2 = ")\b[^<]*<";


Curt
-- 
"I used to think I was indecisive, but now I'm not so sure."

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



RE: [PHP] PHP Editor - which to use?

2003-09-23 Thread Chris W. Parker
Ryan A 
on Tuesday, September 23, 2003 11:10 AM said:

> O holy genius coder, we bow to you, forgive uswhy did we take the
> straight and easy path instead of the rough and true path...

Because we are not ereet.

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



Re: [PHP] PHP Editor - which to use?

2003-09-23 Thread Curt Zirzow
* Thus wrote Chris W. Parker ([EMAIL PROTECTED]):
> Ryan A 
> on Tuesday, September 23, 2003 11:10 AM said:
> 
> > O holy genius coder, we bow to you, forgive uswhy did we take the
> > straight and easy path instead of the rough and true path...
> 
> Because we are not ereet.
> 

heh.. all I know is all these trojan attachments i'm getting are
really pissing me off now.

Curt
-- 
"I used to think I was indecisive, but now I'm not so sure."

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



Re: [PHP] PHP5 interfaces?

2003-09-23 Thread Robert Cummings
On Tue, 2003-09-23 at 14:01, Javier Muniz wrote:
> What I meant was not the implementation, what I meant was that there was no
> way for the compiler/parser to know whether I was implementing position()
> from the Employee interface or the BoardMember interface, the declaration
> was ambiguous.

I would imagine priority would be based on the order of the named
interfaces. Thus in your example it would use the Employee position()
method.

Cheers,
Rob.

> 
> If I implement the function there, then (from what I can tell) it becomes
> the position member for both the BoardMember interface AND the Employee
> interface.  While this might be desired in some cases, it's definitely not
> desired in all cases, so there needs to be some other identifier (such as
> the implements keyword followed by which interface(s) this function should
> be used for).
> 
> PHP5 may have such an identifier, but I have not found any documentation at
> this point...
> 
> -Javier
> 
> Marek Kilimajer wrote:
> 
> > interface BoardMember
> > {
> > function position(); // used to set board position of board member
> > }
> > interface Employee
> > {
> > function position();  // used to set job title of employee
> > }
> >  
> > class BusyBoardMember implements Employee, BoardMember 
> > {
> > function position();  // what does this function do? ambiguous unless
> I
> > am missing something
> > }
> 
> It is not ambiguous, you should implement the function here.
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 
-- 
..
| InterJinn Application Framework - http://www.interjinn.com |
::
| An application and templating framework for PHP. Boasting  |
| a powerful, scalable system for accessing system services  |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for   |
| creating re-usable components quickly and easily.  |
`'

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



RE: [PHP] PHP5 interfaces?

2003-09-23 Thread Javier Muniz
So does this mean that I can then do:

Class BusyBoardMember implements Employee, BoardMember
{
function position() {
// code for Employee implementation;
  }
function position() {
// code for BoardMember implementation;
  } 
}

And if I only implement position() once then it will return an error?

This seems more than a little confusing, and like it could cause serious
mistakes down the road (during maintenance, etc)

-Javier


-Original Message-
From: Robert Cummings [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, September 23, 2003 11:23 AM
To: Javier Muniz
Cc: '[EMAIL PROTECTED]'
Subject: Re: [PHP] PHP5 interfaces?


On Tue, 2003-09-23 at 14:01, Javier Muniz wrote:
> What I meant was not the implementation, what I meant was that there 
> was no way for the compiler/parser to know whether I was implementing 
> position() from the Employee interface or the BoardMember interface, 
> the declaration was ambiguous.

I would imagine priority would be based on the order of the named
interfaces. Thus in your example it would use the Employee position()
method.

Cheers,
Rob.

> 
> If I implement the function there, then (from what I can tell) it 
> becomes the position member for both the BoardMember interface AND the 
> Employee interface.  While this might be desired in some cases, it's 
> definitely not desired in all cases, so there needs to be some other 
> identifier (such as the implements keyword followed by which 
> interface(s) this function should be used for).
> 
> PHP5 may have such an identifier, but I have not found any 
> documentation at this point...
> 
> -Javier
> 
> Marek Kilimajer wrote:
> 
> > interface BoardMember
> > {
> > function position(); // used to set board position of board 
> > member } interface Employee
> > {
> > function position();  // used to set job title of employee
> > }
> >  
> > class BusyBoardMember implements Employee, BoardMember
> > {
> > function position();  // what does this function do? ambiguous
unless
> I
> > am missing something
> > }
> 
> It is not ambiguous, you should implement the function here.
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 
-- 
..
| InterJinn Application Framework - http://www.interjinn.com |
::
| An application and templating framework for PHP. Boasting  | a 
| powerful, scalable system for accessing system services  | such as 
| forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for   |
| creating re-usable components quickly and easily.  |
`'

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



RE: [PHP] PHP5 interfaces?

2003-09-23 Thread Jay Blanchard
[snip]
So does this mean that I can then do:

Class BusyBoardMember implements Employee, BoardMember
{
function position() {
// code for Employee implementation;
  }
function position() {
// code for BoardMember implementation;
  } 
}

And if I only implement position() once then it will return an error?

This seems more than a little confusing, and like it could cause serious
mistakes down the road (during maintenance, etc)
[/snip]

Why don't you (pretend the following is emphasized) test it (/emph) to
find out?

[ALERT - NEWBIE GUIDE ADDITION]

10. Testing yields results - rather than speculate over potential code
chunks write a small test bed and then apply vigorous automated or
manual testing.

[/ALERT]

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



[PHP] Document Management App

2003-09-23 Thread Jay Blanchard
Howdy & Good Afternoon!

I am about to run off to a project's development group meeting (the
general audience kind, requestors and developers) and this question came
up this morning for a potential answer in this afternoon's meeting. I
have googled, searched, poked and prodded...but I need to see if I can
find something more specific than I have overturned.

I was asked about a doc mgmt system that would allow users spread over
disparate systems to upload docs of all types, have them scanned for
content, cataloged, and finally searchable. All sorts of doc types,
spreadheets, pdf's, word docs, word perfect docs, xml, html, etc. etc.
etc. The system would need to be installed, configured, and then sent on
a search of existing docs to scan and catalog.

Does anyone have a favorite application like this or near this? Is
anyone familiar with an app that would not require too much front end
noodling to accomplish this? Or should I clean the white board and get
started?

TVMIA!

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



[PHP] IP to Postal Code CSV? anyone messed around with this and PHP

2003-09-23 Thread Joe Harman
Is there a CSV file out there for this

Does anyone know where I can aquire a file that has IP address with the
corresponding Postal Code?

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



Re: [PHP] javascript open window and a PHP script...

2003-09-23 Thread jsWalter
That's it!

It works like a charm!

Thank you very, very much!

Walter

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



Re: RE: [PHP] PHP Editor - which to use?

2003-09-23 Thread Jim Lucas
you can create so-called assistants...

You can create a loop that asks in a table how many rows and columns do you
want in that table.

Then you can have it create the table with all your favorite default table
settings, but while it is generating it, you could have it prompt you for
any additional settings that you would like to have in the new table.

Jim Lucas


- Original Message - 
From: "Chris W. Parker" <[EMAIL PROTECTED]>
To: "Jim Lucas" <[EMAIL PROTECTED]>; "jeffrey pearson"
<[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Tuesday, September 23, 2003 10:06 AM
Subject: RE: RE: [PHP] PHP Editor - which to use?


Jim Lucas 
on Tuesday, September 23, 2003 9:56 AM said:

> Plus, one added feature is, is that it will allow you to do internal
> scripting.

What are you able to do with "internal scripting"?



chris.

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

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



Re: [PHP] PHP Editor - which to use?

2003-09-23 Thread Jim Lucas
Who did I say was incompetent?  I don't think I said that.
Maybe you took it that way, but that I did not say.

I never said that I was better at writing code then anybody else, as a
matter a fact I get stumped on many things.  I love this list because
without having to ask any questions, all my questions get answered.

Anyways, I feel that not having syntax highlighting forces you to pay
attention to writing your code correctly the first time.

If you are more aware of what you are writing then you know how it should be
writen, and what it will take to write it correctly.

Proper planning will help in this, but it is practice that make you perfect,
not something to point it out to you.

I have always liked doing things the hard way.  I feel that I learn more and
retain more that way.  So in the future if I am working on-site and have to
modify something, then I will better understand what is going on, rather
then having to rely on some program to point it out to me.

The mind is a terrible thing to waste!

My apologies to anybody that I might have offended.

Jim Lucas

- Original Message - 
From: "Jason Wong" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, September 23, 2003 10:08 AM
Subject: Re: [PHP] PHP Editor - which to use?


> On Wednesday 24 September 2003 00:56, Jim Lucas wrote:
>
> > I like NoteTab from www.notetab.com
> >
> > It doesn't do syntax highlighting, but if you need that, then you need
to
> > learn to code better.
>
> Does that mean php shouldn't have any error reporting whatsoever, because
it
> encourages bad incompetent coders who rely on being mollycoddled?
>
> ;-)
>
> -- 
> Jason Wong -> Gremlins Associates -> www.gremlins.biz
> Open Source Software Systems Integrators
> * Web Design & Hosting * Internet & Intranet Applications Development *
> --
> Search the list archives before you post
> http://marc.theaimsgroup.com/?l=php-general
> --
> /*
> Every task takes twice as long as you think it will take
> -- Fundamental Law of Thermodynamics n„1¤75
> */
>
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

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



Re: [PHP] Logged Out of Seesion, Then use back button

2003-09-23 Thread CPT John W. Holmes
From: "Roger Spears" <[EMAIL PROTECTED]>

> 1) How can I prevent the use of the browser "back" button after someone
> logs out?

You don't. You never prevent the use of the back button. When someone logs
in, then a session should be started with some content, like you've already
mentioned. So, thoughout the process, you make sure that session is still
there and complete with the appropriate content. When the user logs out, you
get rid of the session and that content. Now, when they hit back, they'll
still have an empty session, so your script should require them to log in
again to get a correct session.

> 2) If, after a user has attained step 3, they use their back button to
> change a variables value in step 2, the new value is never saved by the
> session and their original entry is used in the email.  How can I adjust
> for people using their "back" buttons during the individual steps of the
> script?

Again, you can't (shouldn't) stop people from using the back button. There
is something wrong with your logic if the values are not saved when step 2
is submitted. If shouldn't matter if step 3 has already been completed or
not.

> 3) Should the header calls appear before the session_start or after?

Doesn't matter. Just send them before any output.

---John Holmes...

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



[PHP] date conflict with old news archive

2003-09-23 Thread \[ PAUL FERRIE \]
God i hope this is simple :)
I have news bloggs section on my site.  At present the news is loaded in
from a txt file,  most of the site is now running with most sections being
loaded via mysqldb's.
I would like to add the old entries to the new db that i have setup for the
bloggs.
My problem is converting the date format from 12-08-03 to the time stamp to
be stored int the db.  It has to be done this way as new entries will be
using the time stamp

So in the php file i have
$dateAdded =  time();
but time would then be 1064245532
i need
date=12-08-03
$dateAdded = date(convert) to time stamp

cheers
Paul

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



Re: [PHP] IP to Postal Code CSV? anyone messed around with this and PHP

2003-09-23 Thread Jeremy Johnstone
I doubt you will find such a thing. The closest you will probably find
is doing it in a two step approach:

IP Address to approx Lat/Long
Lat/Long to Zipcode   

The second database is easy to find, the first one you usually have to
pay money for. If you find a good public free resource which is
frequently updated (as it would need to be as the Internet is always
changing) then please let me know. I have been unable to find something
and have looked on multiple occasions. 

Jeremy


On Tue, 2003-09-23 at 13:59, Joe Harman wrote:
> Is there a CSV file out there for this
> 
> Does anyone know where I can aquire a file that has IP address with the
> corresponding Postal Code?

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



Re: [PHP] date conflict with old news archive

2003-09-23 Thread Eugene Lee
On Tue, Sep 23, 2003 at 09:01:19PM +0100, [ PAUL FERRIE ] wrote:
: 
: God i hope this is simple :)

It is.  I think.  :-)

: I have news bloggs section on my site.  At present the news is loaded in
: from a txt file,  most of the site is now running with most sections being
: loaded via mysqldb's.
: I would like to add the old entries to the new db that i have setup for the
: bloggs.
: My problem is converting the date format from 12-08-03 to the time stamp to
: be stored int the db.  It has to be done this way as new entries will be
: using the time stamp
: 
: So in the php file i have
: $dateAdded =  time();
: but time would then be 1064245532
: i need
: date=12-08-03
: $dateAdded = date(convert) to time stamp

$dateAdded = mktime(0, 0, 0, 12, 8, 2003);

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



Re: [PHP] Running system commands

2003-09-23 Thread Mike Migurski
>I was wondering, if anyone can help me with running system commands from
>within php. Actually I have a script which deletes users from my database
>(which is of course MySQL), now I want to delete those users from system
>level also, as they are authenticated users of my OS also.
>
>Now, the problem is, that I'm running my MySQL server and web server on
>different machines. I can do whatever on remote DB server but how to run
>a system command on another machine. I know, it's possible to run system
>commands on local server by system(), but what about remote server?

This is partially dependent on the user your php scripts are running as.
One approach might be to use SSH to talk to the remote machine, and set up
a limited-privilege account there. You can run a copy of ssh-agent[1] as
the apache user, which stores an open copy of a private SSH key in memory,
add the public half of that key to the remote machine's authorized_keys
file[2], and use SSH to access that machine.

[1] http://www.phil.uu.nl/~xges/ssh/
[2] http://www.nevis.columbia.edu/cgi-bin/man.sh?man=ssh

-
michal migurski- contact info and pgp key:
sf/cahttp://mike.teczno.com/contact.html

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



[PHP] help with arrays

2003-09-23 Thread Chris W. Parker
Hey people.

I've got an array like this:


[0] => Array
(
[0] => j
[fname] => j
[1] => j
[lname] => j
[2] => jj
[state] => jj
[3] => [EMAIL PROTECTED]
[email] => [EMAIL PROTECTED]
[4] => 0
[newsletter] => 0
)

Some cells might be empty so i want to replace every empty cell with
" ". I can easily do this with just the numerical index but I can't
figure out how to do the textual indices also.

Someone have a clue?


Thanks,
Chris.

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



RE: [PHP] help with arrays

2003-09-23 Thread Chris W. Parker
Chris W. Parker <>
on Tuesday, September 23, 2003 1:38 PM said:

> Someone have a clue?

Hmm... maybe www.php.net/array_keys will help me out here.


chris.

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



Re: [PHP] help with arrays

2003-09-23 Thread Robert Cummings
It doesn't get much simpler :)

foreach( $data as $key => $value )
{
if( $value == '' )
{
$data[$key] = ' '
}
}

Cheers,
Rob.

On Tue, 2003-09-23 at 16:38, Chris W. Parker wrote:
> Hey people.
> 
> I've got an array like this:
> 
> 
> [0] => Array
> (
> [0] => j
> [fname] => j
> [1] => j
> [lname] => j
> [2] => jj
> [state] => jj
> [3] => [EMAIL PROTECTED]
> [email] => [EMAIL PROTECTED]
> [4] => 0
> [newsletter] => 0
> )
> 
> Some cells might be empty so i want to replace every empty cell with
> " ". I can easily do this with just the numerical index but I can't
> figure out how to do the textual indices also.
> 
> Someone have a clue?
> 
> 
> Thanks,
> Chris.
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 
-- 
..
| InterJinn Application Framework - http://www.interjinn.com |
::
| An application and templating framework for PHP. Boasting  |
| a powerful, scalable system for accessing system services  |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for   |
| creating re-usable components quickly and easily.  |
`'

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



Re: [PHP] date conflict with old news archive

2003-09-23 Thread PAUL FERRIE
Cheers your a star :)

"Eugene Lee" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> On Tue, Sep 23, 2003 at 09:01:19PM +0100, [ PAUL FERRIE ] wrote:
> :
> : God i hope this is simple :)
>
> It is.  I think.  :-)
>
> : I have news bloggs section on my site.  At present the news is loaded in
> : from a txt file,  most of the site is now running with most sections
being
> : loaded via mysqldb's.
> : I would like to add the old entries to the new db that i have setup for
the
> : bloggs.
> : My problem is converting the date format from 12-08-03 to the time stamp
to
> : be stored int the db.  It has to be done this way as new entries will be
> : using the time stamp
> :
> : So in the php file i have
> : $dateAdded =  time();
> : but time would then be 1064245532
> : i need
> : date=12-08-03
> : $dateAdded = date(convert) to time stamp
>
> $dateAdded = mktime(0, 0, 0, 12, 8, 2003);

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



Re: [PHP] Running system commands

2003-09-23 Thread Robert Cummings
On Tue, 2003-09-23 at 16:34, Mike Migurski wrote:
> >I was wondering, if anyone can help me with running system commands from
> >within php. Actually I have a script which deletes users from my database
> >(which is of course MySQL), now I want to delete those users from system
> >level also, as they are authenticated users of my OS also.
> >
> >Now, the problem is, that I'm running my MySQL server and web server on
> >different machines. I can do whatever on remote DB server but how to run
> >a system command on another machine. I know, it's possible to run system
> >commands on local server by system(), but what about remote server?
> 
> This is partially dependent on the user your php scripts are running as.
> One approach might be to use SSH to talk to the remote machine, and set up
> a limited-privilege account there. You can run a copy of ssh-agent[1] as
> the apache user, which stores an open copy of a private SSH key in memory,
> add the public half of that key to the remote machine's authorized_keys
> file[2], and use SSH to access that machine.

Alternatively you could have a simple little PHP daemon on the webserver
and it could check a table in the remote DB every minute or so for
verbatim commands to execute. Depends really on whether these commands
need to occur real time or not.

Cheers,
Rob.
-- 
..
| InterJinn Application Framework - http://www.interjinn.com |
::
| An application and templating framework for PHP. Boasting  |
| a powerful, scalable system for accessing system services  |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for   |
| creating re-usable components quickly and easily.  |
`'

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



RE: [PHP] help with arrays

2003-09-23 Thread Chris W. Parker
Robert Cummings 
on Tuesday, September 23, 2003 1:43 PM said:

> It doesn't get much simpler :)

Doh!!

> foreach( $data as $key => $value )

I don't use that syntax much so I'm not familiar with it. Maybe I should
start eh?


Thanks,
Chris.

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



Re: [PHP] IP to Postal Code CSV? anyone messed around with this and PHP

2003-09-23 Thread Dan Anderson
> If you find a good public free resource which is
> frequently updated (as it would need to be as the Internet is always
> changing) then please let me know. I have been unable to find something
> and have looked on multiple occasions. 

Please let me know too.  I think that the resources required to keep
such a database updated encourage a pay per use system.

-Dan

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



[PHP] Validation: Problems with header(Location) in PHP

2003-09-23 Thread Martin Raychev
Hi!

I am kind of newbie coming from ASP and I came upon some hindrances, which
could be because of not knowing enough of PHP

The problem is:
I am trying to make a form with good and user-friendly validation. After
failure to validate properly some of the fields and going to another page
i.e. the  I need to go back to the previos
page where the form is.
In ASP I would use Response.Redirect and that's it but the

header (Location...) in PHP is said that it must be on top of the HTML page
before anything else. This doesn't seems to work for me.

Does anyone has a solution to this problem?

Many thanks in advance!

Martin.

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



Re: [PHP] help with arrays

2003-09-23 Thread Pete James
Of course, you could do it in a much more cryptic way... just for fun.

:-)

INPUT:



$a = array( '0' => 'j',
'fname' => 'j',
'1' => 'j',
'lname' => 'j',
'2' => 'jj',
'state' => '',
'3' => '[EMAIL PROTECTED]',
'email' => '[EMAIL PROTECTED]',
'4' => '0',
'newsletter' => '0',
);
array_walk($a, create_function('&$v', '$v = ($v=="")?" ":$v;'));
print_r($a);
?>

OUTPUT:

[EMAIL PROTECTED] php -f test.php
Array
(
[0] => j
[fname] => j
[1] => j
[lname] => j
[2] => jj
[state] =>  
[3] => [EMAIL PROTECTED]
[email] => [EMAIL PROTECTED]
[4] => 0
[newsletter] => 0
)
Chris W. Parker wrote:
Hey people.

I've got an array like this:

[0] => Array
(
[0] => j
[fname] => j
[1] => j
[lname] => j
[2] => jj
[state] => jj
[3] => [EMAIL PROTECTED]
[email] => [EMAIL PROTECTED]
[4] => 0
[newsletter] => 0
)
Some cells might be empty so i want to replace every empty cell with
" ". I can easily do this with just the numerical index but I can't
figure out how to do the textual indices also.
Someone have a clue?

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


Re: [PHP] help with arrays

2003-09-23 Thread Robert Cummings
On Tue, 2003-09-23 at 17:06, Pete James wrote:
> Of course, you could do it in a much more cryptic way... just for fun.
> 

AKA Perl style ;)

-- 
..
| InterJinn Application Framework - http://www.interjinn.com |
::
| An application and templating framework for PHP. Boasting  |
| a powerful, scalable system for accessing system services  |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for   |
| creating re-usable components quickly and easily.  |
`'

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



RE: [PHP] Validation: Problems with header(Location) in PHP

2003-09-23 Thread Javier Muniz
Hi Martin,

When they say at the top of the page before anything else, they mean before
any other output.  Just make sure that you don't have any HTML/text before
the header("Location: ...") that's outside of your 's, and that you
don't echo anything before your header call.
  
-Javier

-Original Message-
From: Martin Raychev [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, September 24, 2003 1:23 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Validation: Problems with header(Location) in PHP


Hi!

I am kind of newbie coming from ASP and I came upon some hindrances, which
could be because of not knowing enough of PHP

The problem is:
I am trying to make a form with good and user-friendly validation. After
failure to validate properly some of the fields and going to another page
i.e. the  I need to go back to the previos
page where the form is. In ASP I would use Response.Redirect and that's it
but the

header (Location...) in PHP is said that it must be on top of the HTML page
before anything else. This doesn't seems to work for me.

Does anyone has a solution to this problem?

Many thanks in advance!

Martin.

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

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



Re: [PHP] Validation: Problems with header(Location) in PHP

2003-09-23 Thread Robert Cummings
On Wed, 2003-09-24 at 16:22, Martin Raychev wrote:
> Hi!
> 
> I am kind of newbie coming from ASP and I came upon some hindrances, which
> could be because of not knowing enough of PHP
> 
> The problem is:
> I am trying to make a form with good and user-friendly validation. After
> failure to validate properly some of the fields and going to another page
> i.e. the  I need to go back to the previos
> page where the form is.
> In ASP I would use Response.Redirect and that's it but the
> 
> header (Location...) in PHP is said that it must be on top of the HTML page
> before anything else. This doesn't seems to work for me.
> 
> Does anyone has a solution to this problem?

A simple, ignore the real problem, solution is to turn on output
buffering. The real problem is that you probably have output occuring
before the validation occurs, which is why you can't redirect. Solving
this will prevent the need for output buffering. Another solution is,
once you detect an error, to output a javascript redirect. This is
probably the dirtiest IMHO.

Cheers,
Rob.
-- 
..
| InterJinn Application Framework - http://www.interjinn.com |
::
| An application and templating framework for PHP. Boasting  |
| a powerful, scalable system for accessing system services  |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for   |
| creating re-usable components quickly and easily.  |
`'

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



Re: [PHP] Validation: Problems with header(Location) in PHP

2003-09-23 Thread Jason Wong
On Thursday 25 September 2003 04:22, Martin Raychev wrote:

> I am kind of newbie coming from ASP and I came upon some hindrances, which
> could be because of not knowing enough of PHP
>
> The problem is:
> I am trying to make a form with good and user-friendly validation. After
> failure to validate properly some of the fields and going to another page
> i.e. the  I need to go back to the previos
> page where the form is.
> In ASP I would use Response.Redirect and that's it but the
>
> header (Location...) in PHP is said that it must be on top of the HTML page
> before anything else. This doesn't seems to work for me.

What is your *exact* code and *how* does it not work?

> Does anyone has a solution to this problem?

Not unless we know what you're doing wrong.

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
--
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
--
/*
"Is it really you, Fuzz, or is it Memorex, or is it radiation sickness?" 
-- Sonic Disruptors comics
*/

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



Re: [PHP] help with arrays

2003-09-23 Thread Eugene Lee
On Tue, Sep 23, 2003 at 01:49:03PM -0700, Chris W. Parker wrote:
: 
: Robert Cummings  said:
: >
: > foreach( $data as $key => $value )
: 
: I don't use that syntax much so I'm not familiar with it. Maybe I should
: start eh?

Another caveat: it works on a *copy* of the array.  This is fine for
small arrays, but may be a performance killer for larger arrays.

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



[PHP] Php returns wrong content-type (one php, two apaches)

2003-09-23 Thread Jan Vitek
Hello,

I installed Apache 2.0.47 with PHP 4.3.3 (as Apache module). Everything worked fine, 
until I decided that I will install one more Apache. I installed the second apache 
(again Apache 2.0.47 and PHP 4.3.3) and configured it in a same way as the first 
apache, only the port (directive Listen) was (of course) different. From that time, 
strange think is happening. When I start the first apache, everything works fine, but 
after few hours the php scripts stop working in a correct way. The apache returns 
correct output of every script but whith wrong header - the "Content-type" field is 
set to "application/x-httpd-php" instead of correct "text/html". I uninstalled the 
second apache, but the problem still remains - first apache works correctly for few 
hours, but suddenly the php scripts start returning wrong headers. I have made 
following perl script:

#!/usr/bin/perl

while( 1 ) {
$str = `netcat -w 2 [MY IP ADDR] 80 < /root/GET | grep 'x-httpd-php'`;
if( length( $str ) ) {
system( "/usr/local/apache/bin/apachectl stop" );
sleep( 4 );
system( "/usr/local/apache/bin/apachectl start" );
}

sleep( 60 );
}

This script solves the problem, but I would like it to be like it was, before I 
installed the second Apache. Do you have any idea, where the problem might be?

Thanks
JV

Evoluce nekončí! Žijte ve stylu 21. století, žijte na MAX. Vyzkoušejte si jízdu v 
novém Ford Focus C-MAX a vyhrajte. 
http://ad2.bbmedia.cz/please/redirect/126/12/8/7/?param=3152/3830_1http://netmonitor.idot.cz/akcejs.php?c=05"; 
scrolling="No" width="1" height="1" marginwidth="0" marginheight="0" frameborder="No" 
style="border-style: none;">

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



Re: [PHP] help with arrays

2003-09-23 Thread Robert Cummings
On Tue, 2003-09-23 at 17:37, Eugene Lee wrote:
> On Tue, Sep 23, 2003 at 01:49:03PM -0700, Chris W. Parker wrote:
> : 
> : Robert Cummings  said:
> : >
> : > foreach( $data as $key => $value )
> : 
> : I don't use that syntax much so I'm not familiar with it. Maybe I should
> : start eh?
> 
> Another caveat: it works on a *copy* of the array.  This is fine for
> small arrays, but may be a performance killer for larger arrays.

I don't think you have enough knowledge of the PHP internals to make
that claim :) To qualify my statement, PHP doesn't not literally copy
data until you attempt to make a change. So in the above example $key
and $value are virtual copies of relevant data. If I were to try and
change either of these values then an explicit copy would be made at
that time, but not before. Thus since I actually make modifications on
the original $data array structure, my example makes no real copies
except when the new values is set in the original array. My example is
much more optimal than you think, mostly because of the oft unknown
optimizations made in the PHP engine itself.

Cheers,
Rob.
-- 
..
| InterJinn Application Framework - http://www.interjinn.com |
::
| An application and templating framework for PHP. Boasting  |
| a powerful, scalable system for accessing system services  |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for   |
| creating re-usable components quickly and easily.  |
`'

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



Re: [PHP] help with arrays

2003-09-23 Thread Eugene Lee
On Tue, Sep 23, 2003 at 05:44:46PM -0400, Robert Cummings wrote:
: On Tue, 2003-09-23 at 17:37, Eugene Lee wrote:
: > On Tue, Sep 23, 2003 at 01:49:03PM -0700, Chris W. Parker wrote:
: > : 
: > : Robert Cummings  said:
: > : >
: > : > foreach( $data as $key => $value )
: > : 
: > : I don't use that syntax much so I'm not familiar with it. Maybe I should
: > : start eh?
: > 
: > Another caveat: it works on a *copy* of the array.  This is fine for
: > small arrays, but may be a performance killer for larger arrays.
: 
: I don't think you have enough knowledge of the PHP internals to make
: that claim :)

You're right.  I know little of PHP internals.  I'm just going by what
little the official documentation tells me.  :-)

http://www.php.net/manual/en/control-structures.foreach.php

Note: Also note that foreach operates on a copy of the specified
array and not the array itself.

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



[PHP] How can I auto upload a file to the server?

2003-09-23 Thread jane
I have a .txt file on my local Windows 2000 box that i want uploaded to a
remote L.A.M.P. server with only one click.

I want to have a link (shortcut) on my desktop when clicked it launches a
web browser loaded with a remote .php script that automatically goes into
C:\data\upload_me.txt and uploads "upload_me.txt"

I know how to upload files using php with a "browse to file" html form, but
i want to skip the form and have the file just upload automatically when the
script is loaded.

I don't know how to make the .php script automatically grab the file from my
local box and upload it without any user intervention.

Any suggestions?

Thanks for you help,
cheyrl.

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



[PHP] reading files through ssl protocal

2003-09-23 Thread Chris Edwards
Hi

Trying to read a file via ssl.  It seems to read the file ok.  The content
is correct.  But I get this when using the https protocol.

Warning: fgets(): SSL: fatal protocol error
or
Warning: fread(): SSL: fatal protocol error

When I use regular http, I do not get the warning.


Anyone observed this behaviour and fixed it?

Thanks.

-- 
Chris Edwards
Web Application Developer
Outer Banks Internet, Inc.
252-441-6698
[EMAIL PROTECTED]
http://www.OuterBanksInternet.com

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



[PHP] Full view of active sessions

2003-09-23 Thread Ney André de Mello Zunino
Hello.

Is there any facility in PHP's session management library which allows 
one to have a full view of the active sessions? In other words, is it 
possible to check the existance and value of a given session variable in 
any of the active sessions?

My goal is to make sure a user's access information is not used more 
than once to log into the system. So, when a user submits the 
authentication data, I would like to see if that login has already been 
used, i.e., there is a session variable in some session storing the 
login name and which contains the same value.

At present, I can't think of another way of doing it other than directly 
accessing the session files on /tmp (assuming session data is being 
stored in files). But I don't like that idea quite so much. A cleaner 
solution which I have also considered is to have a column in the users 
table which indicates his login state. Before I go for the latter 
approach, I would just like to learn from you whether what I asked is 
possible.

Thanks in advance,

--
Ney André de Mello Zunino
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Full view of active sessions

2003-09-23 Thread Jeremy Johnstone
Here is a possible solution, but I don't know if it will work for your
purposes:

When a user logs in to your site, as part of the session store a random
string (say a logincheck). Also insert this value into the database on
the same row as the username/password is stored. Then on every page load
check and make sure that "logincheck" string is valid. If someone tries
to login again, the new "logincheck" will be stored in the database, and
thus will make the first session invalid. 

The only drawback to this approach is that it logs out the first user,
and doesn't notify the second user they shouldn't be logging in twice.
It still does the job of allowing only one login per user quite
effectively though.

Jeremy

On Tue, 2003-09-23 at 17:38, Ney André de Mello Zunino wrote:
> Hello.
> 
> Is there any facility in PHP's session management library which allows 
> one to have a full view of the active sessions? In other words, is it 
> possible to check the existance and value of a given session variable in 
> any of the active sessions?
> 
> My goal is to make sure a user's access information is not used more 
> than once to log into the system. So, when a user submits the 
> authentication data, I would like to see if that login has already been 
> used, i.e., there is a session variable in some session storing the 
> login name and which contains the same value.
> 
> At present, I can't think of another way of doing it other than directly 
> accessing the session files on /tmp (assuming session data is being 
> stored in files). But I don't like that idea quite so much. A cleaner 
> solution which I have also considered is to have a column in the users 
> table which indicates his login state. Before I go for the latter 
> approach, I would just like to learn from you whether what I asked is 
> possible.
> 
> Thanks in advance,
> 
> -- 
> Ney André de Mello Zunino

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



  1   2   >