[PHP] activex and PHP on linux

2003-07-14 Thread Jeremy
I'm running a website (www.revitcity.com) on linux/PHP/MySQL and the site is
for architecture components. The compenents or objects called famlies are
uploaded by users and shared freely. The program these objects are used in
is Revit, a windows only program. So here's my question.

Currenly users must render the object and upload an image along with the
object itself. However using activex controls, windows can access an
imbedded thumbnail in the files. Can I access these imbedded thumbnails on a
PHP/Linux system so that our users don't have to render and upload the
images as well?

Jeremy



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



[PHP] incrementing string value

2003-07-25 Thread Jeremy
writing some client side javascript with some dynamic php, and I need to be
able to print a dynamic number of variables to the javascript.

I need to print:
var a="";
var b="";
...etc.

Is there a way to increment a php $var much like $var++ would work?

Jeremy



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



Re: [PHP] incrementing string value

2003-07-25 Thread Jeremy
let me make sure I understand...

$var = 'a';
$var++
print($var);

would print "b" to the screen?

Jeremy

"Carl Furst" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Yep that should work as does $var--
>
>
> -Original Message-
> From: Jeremy [mailto:[EMAIL PROTECTED]
> Sent: Friday, July 25, 2003 12:28 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] incrementing string value
>
> writing some client side javascript with some dynamic php, and I need to
be
> able to print a dynamic number of variables to the javascript.
>
> I need to print:
> var a="";
> var b="";
> ...etc.
>
> Is there a way to increment a php $var much like $var++ would work?
>
> Jeremy
>
>
>
> --
> 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] Windows NT Server, FORK, SOCKETS, and seperate processe s

2002-07-22 Thread Jeremy

That's basically what happens in forking and threading. More "PHP.EXE"
processes appear, even on *nix.

- Original Message -
From: "David Buerer" <[EMAIL PROTECTED]>
To: "'Evan Nemerson'" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Tuesday, July 23, 2002 6:35 AM
Subject: RE: [PHP] Windows NT Server, FORK, SOCKETS, and seperate processe s


> I thought about this and it's actually not such a bad idea.  I struggle
with
> it a little though because it seems like kind of a brute force method.
I'll
> end up with an awful lot of PHP.EXE processes going at the same time.
> Although it would get the job done, I'm not certain that it's the right
> solution. I was hoping for something a little more elegant.  I really like
> the pcntl_xxx() functions, but they are only available on UNIX platforms.
> And no, UNIX is not an option for this client...they are on Windows and
> that's where they're going to stay.
>
> Anyone else have any other ideas?
>
> -Original Message-
> From: Evan Nemerson [mailto:[EMAIL PROTECTED]]
> Sent: Monday, July 22, 2002 3:47 PM
> To: David Buerer; [EMAIL PROTECTED]
> Subject: Re: [PHP] Windows NT Server, FORK, SOCKETS, and seperate processe
s
>
>
> Either exec(), system(), or one of the functions like them (check the
> manual)
> doesn't wait for anything to return- it just begins executing a new
process
> and sends it on its way. Perhaps you could use this and just make whatever
> you want to do a seperate file?
>
>
>
> On Monday 22 July 2002 15:09 pm, David Buerer wrote:
> > Yes, that's exactly what I want to do.  But HOW do I do it?
> >
> > i.e.  I'm sitting in my accept connectinos loop in the chat daemon
> >
> > While(true)
> > {
> > //waitforenwconnection
> > $new_connection_id=socket_accept();
> >
> > //got a new connection, go process it
> > go_do_this_in_a_new_thread($new_connection_id);
> > }
> >
> > What do I put in place of go_do_this_in_a_new_thread()
> >
> > -Original Message-
> > From: Demitrious S. Kelly [mailto:[EMAIL PROTECTED]]
> > Sent: Monday, July 22, 2002 3:01 PM
> > To: 'David Buerer'; [EMAIL PROTECTED]
> > Subject: RE: [PHP] Windows NT Server, FORK, SOCKETS, and seperate
> > processes
> >
> >
> > Yes. Write a daemon which listens on a socket and manages the
> > communications it gets from the satellite scripts and works the
> > database for them...
> >
> > The scripts send off data, and process replies. They don't do the
> > heavy work...
> >
> > -Original Message-
> > From: David Buerer [mailto:[EMAIL PROTECTED]]
> > Sent: Monday, July 22, 2002 2:30 PM
> > To: '[EMAIL PROTECTED]'
> > Subject: RE: [PHP] Windows NT Server, FORK, SOCKETS, and seperate
> > processes
> >
> > How to I inovoke a new Thread from the middle of a PHP script?
> >
> > -Original Message-
> > From: Paul Maine [mailto:[EMAIL PROTECTED]]
> > Sent: Monday, July 22, 2002 10:08 AM
> > To: David Buerer; [EMAIL PROTECTED]
> > Subject: RE: [PHP] Windows NT Server, FORK, SOCKETS, and seperate
> > processes
> >
> >
> > You can use threads with NT to accomplish what you are asking.
> >
> > -Original Message-
> > From: David Buerer [mailto:[EMAIL PROTECTED]]
> > Sent: Monday, July 22, 2002 11:29 AM
> > To: '[EMAIL PROTECTED]'
> > Subject: [PHP] Windows NT Server, FORK, SOCKETS, and seperate
> > processes
> >
> >
> > I've got effectivly a glorified chat server which upon the arrival of
> > a message thorugh a socket connection goes off and runs a bunch of
> > database processed.  My questions is this:  How can I seperate the
> > database processing into a seperate processor process?  I really don't
> > want the chat server to have to wait until after the database
> > processing is done to go intercept and process another request--this
> > just doesn't seem right.  I want the chat server process to be able to
> > deal with getting and receiving messages, and another process to deal
> > with the database processing. That way if one of the processes get's
> > slow, the other isn't affected. Something like the fork command would
> > work really well, but fork doesn't exist in NT.
> >
> > Anyone have any ideas?
> >
> > I'm running Windows NT4.0 sp6a
> > Apache Server 1.3.xx
> > MySQL
> > and of course, PHP 4.2.1
>
> --
> Man discovers truth by reason only, not by faith.
>
> Leo Nikolaevich Tolstoy
>
>


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




Re: [PHP] Formating datevariables...

2002-07-22 Thread Jeremy

Is the timestamp in UNIX format?
if yes, try date() http://www.php.net/manual/en/function.date.php
if no, try substr()

hope that helps :)
- Jeremy

- Original Message -
From: "Ragnar" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, July 23, 2002 7:42 AM
Subject: [PHP] Formating datevariables...


> I have a column in a mysql table with a timestamp. The value of this
column
> is for instance:
>
> 20020722185242
>
> How do i change the format on this to "DDMM" (22072002) in php?
>
> Thanx
>
> -R
>
>
>
> --
> 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] Help with sockets

2002-07-18 Thread Jeremy

How can I do the following with PHP?

1) Accept more than 1 connections without forking
2) socket_read and fgets from 2 connections at the same time

please help!
thanks in advance





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




RE: [PHP] Syntax Error -> This is WEIRD!

2004-01-16 Thread Jeremy
Did the script accidently get saved in MS-DOS text format?

-Original Message-
From: Donald Tyler [mailto:[EMAIL PROTECTED]
Sent: Friday, January 16, 2004 8:53 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Syntax Error -> This is WEIRD!


There could be something you're not seeing and assuming it's correct.
But
typing your code into the email we aren't getting the full story.

Can you actually attach your scripts to an email and send that? Copying
and
pasting then into the email won't necessarily provide all the info
needed to
solve your problem.

For example: I once uploaded a PHP script to the server and for some
reason
on the way up extra character were placed in the document that did not
show
up in most text editors. I had to use a very basic terminal text editor
to
see the added characters.

-Original Message-
From: Nick Wilson [mailto:[EMAIL PROTECTED] 
Sent: Friday, January 16, 2004 8:17 AM
To: php-general
Subject: [PHP] Syntax Error -> This is WEIRD!

if a script calls antohter like 'include('http://site.com/index.php');

Why would I get a syntax error on line 1 of index.php when it looks like
this:

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] odd and even numbers

2004-01-16 Thread Jeremy
function isOdd ($value) {
return (int)$value % 2 ? true : false;
}

Returns true/false if the value is odd. Also rounds down floating point numbers given 
as the test value.

-Jeremy

-Original Message-
From: Jake McHenry [mailto:[EMAIL PROTECTED]
Sent: Friday, January 16, 2004 2:18 PM
To: [EMAIL PROTECTED]
Subject: [PHP] odd and even numbers


I have a random number being generated from 1 to 501, is there an easy way for me to 
tell if the result is an odd or even number?

Thanks,
Jake

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



RE: [PHP] Generating an Excel file?

2004-01-19 Thread Jeremy
Google is your friend ;-)

-J

-Original Message-
From: Ben Ramsey [mailto:[EMAIL PROTECTED]
Sent: Monday, January 19, 2004 5:41 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Generating an Excel file?


I'm pretty sure I know how to use header() create a CSV file for a 
client to download data from a database, but I think it would really 
impress this client if I could generate a Microsoft Excel file instead 
of a CSV file.  Anyone know how to do this?

-Ben

-- 
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] Question concerning performance

2001-01-17 Thread jeremy

Greetings all.

I've got a quick question, and please forgive me if this is off topic,
but...

I've got several applications that I'm trying to do some general
tweaking on, and I've got a question, as well as a general purpose
coding style for php.

Is it faster to remain within _parsing mode_ while grinding through a
script, or faster to drop in and out of parse vs html?  I know this is
kind of a mute point next to things such as database queries, etc. But,
I'm just trying to make sure that if it can be improved, that I'm trying
to do so.

I'm sure my terms are incorrect, but, I think you all understand my
question.

I'll give some examples below.


Example ONE:  (in just parse mode)
[cut]---
blah blah blah blah blah blah blah";
print "" . $Var1 . "" . $Var2 . "";
?>
[/cut]--

Example TWO:  (in html && parse mode)
[cut]---
blah blah blah blah blah blah blah

[/cut]--

Now, let me elaborate. I'm quite aware that the above 2 code segments
will both be fast enough for me not to care.  BUT, within an application
that has 1000 lines of code per page (hypothetically), everything begins
to matter, and the more cpu-clicks I can save, the happier I'll be.

The 2 examples will turn out the same results to the browser, but which
will do it faster?

Thanks for any comments/suggestions you can provide on this.

jeremy

--
Jeremy Kelley <[EMAIL PROTECTED]>  pgp keyid 0xAECBA355
Phil 1:21  www.ganooz.com
Car pour moi, la vie c'est le Christ, et la mort est un gain.


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




RE: [PHP] refresh Browser

2001-01-17 Thread jeremy


> what do I have to do, to guarentee that the client has got the actual
> page?
>  - or does the browser know - ordering a .php page means
> "really fetch it,
> and don't take the cached one!
> but what about proxy-server out there???

Try using headers that expire your page if you're really worried about
the browser getting a cached version.

But, even then, I've seen browsers ignore this for some odd reason
(you've got to love the internet and the rules it plays by.)

--
Jeremy Kelley <[EMAIL PROTECTED]>  pgp keyid 0xAECBA355
Phil 1:21  www.ganooz.com
Car pour moi, la vie c'est le Christ, et la mort est un gain.


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




RE: [PHP] how do i hide my .inc files in apache??

2001-01-17 Thread jeremy

don't name them .inc files.


Name them blahblah.inc.php or something that will be parsed, and
therefore not just gurped up by the server.


blest,
jeremy

--
Jeremy Kelley <[EMAIL PROTECTED]>  pgp keyid 0xAECBA355
Phil 1:21  www.ganooz.com
Car pour moi, la vie c'est le Christ, et la mort est un gain.

> -Original Message-
> From: Jamie Burns [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, January 17, 2001 13:48
> To: [EMAIL PROTECTED]
> Subject: [PHP] how do i hide my .inc files in apache??
>
>
> hi..
>
> can anyone tell me how i get apache to never send out the
> contents of my include files (*.inc) to users?
>
> i dont want my source sode to be visible to browsers.
>
> thanks,
>
> jamie.
>


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




RE: [PHP] how do i hide my .inc files in apache??

2001-01-17 Thread jeremy

Yes,

Making .inc parsable is a _potential_ solution.  The problem is that why
should we as app programmers expect sysadmins to modify their default
apache installation to get around a problem that we can fix?

My vote is still just for include files to have a standard (already
accepted) extension.


--
Jeremy Kelley <[EMAIL PROTECTED]>  pgp keyid 0xAECBA355
Phil 1:21  www.ganooz.com
Car pour moi, la vie c'est le Christ, et la mort est un gain.

> -Original Message-
> From: Sebastian Stadtlich [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, January 17, 2001 14:10
> To: 'Jamie Burns'; 'Php-General (E-Mail)
> Subject: AW: [PHP] how do i hide my .inc files in apache??
>
>
> why don't you rename your include files to
> *.inc.php
>
> so they are parsed by php and no valuable information would
> be given out.
> also you could use folowing lines in a .htaccess
>
>
> # .inc-files not readable:
> 
> Order allow,deny
> Deny from all
> 
>
> sebastian
>
>
>
> > -Ursprüngliche Nachricht-
> > Von: Jamie Burns [mailto:[EMAIL PROTECTED]]
> > Gesendet: Mittwoch, 17. Januar 2001 13:48
> > An: [EMAIL PROTECTED]
> > Betreff: [PHP] how do i hide my .inc files in apache??
> >
> >
> > hi..
> >
> > can anyone tell me how i get apache to never send out the
> > contents of my include files (*.inc) to users?
> >
> > i dont want my source sode to be visible to browsers.
> >
> > thanks,
> >
> > jamie.
> >
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail:
> [EMAIL PROTECTED]
>


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




RE: Re[2]: [PHP] how do i hide my .inc files in apache??

2001-01-17 Thread jeremy

> j> Name them blahblah.inc.php or something that will be parsed, and
> j> therefore not just gurped up by the server.
>
> I think, more secure is move inc file out www tree.
>

I agree with this completely.  The only thing about that is that some
admins want a quick and dirty install.  And, so it's just been my
experience that you can limit your vulnerabilities by renaming them to
.php.

If you can do both, it's ideal.  I've seen (and found) some security
holes where it was possible to read files on the file system by using
the webserver process.  If that file is just a list of $var="blah" or
function definitions, and does not end with a parsable extension (.php)
then the file is presented to the browser in completely readable format.
If it is parsed, then all the browser gets is a blank page.

That's kind of what I was saying.

You're right though, that out of the webserver tree is better.

jeremy

--
Jeremy Kelley <[EMAIL PROTECTED]>  pgp keyid 0xAECBA355
Phil 1:21  www.ganooz.com
Car pour moi, la vie c'est le Christ, et la mort est un gain.

> -Original Message-
> From: Andrew Sitnikov [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, January 17, 2001 15:39
> To: jeremy
> Cc: Jamie Burns; [EMAIL PROTECTED]
> Subject: Re[2]: [PHP] how do i hide my .inc files in apache??
>
>
> Hello jeremy,
>
> j> don't name them .inc files.
>
>
> j> Name them blahblah.inc.php or something that will be parsed, and
> j> therefore not just gurped up by the server.
>
> I think, more secure is move inc file out www tree.
>
> /home/user/public_html/index.php
> /home/user/include/lib.inc
>
> index.php
>include('/home/user/include/lib.inc');
> ?>
>
>
> Best regards,
>  Andrew Sitnikov
>
>


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




RE: [PHP] Question concerning performance

2001-01-17 Thread jeremy

Now THAT's the kind of answer I was looking for. Thanks very much for
checking that out.

Mind if I ask what you used for your benchmarking/timing software-wise?

blest,
jeremy


--
Jeremy Kelley <[EMAIL PROTECTED]>  pgp keyid 0xAECBA355
Phil 1:21  www.ganooz.com
Car pour moi, la vie c'est le Christ, et la mort est un gain.

> -Original Message-
> From: Toby Butzon [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, January 17, 2001 16:55
> To: jeremy; [EMAIL PROTECTED]
> Subject: Re: [PHP] Question concerning performance
>
>
> > Example ONE:  (in just parse mode)
> > [cut]---
> >  > print "blah blah blah blah blah blah blah";
> > print "" . $Var1 . "" . $Var2 .
> "";
> > ?>
> > [/cut]--
>
> Ran a pretty rough benchmark: 10040 lines of code (5020
> repetitions of the
> above example) 10 times with an average execution time of
> 6.07904628515244
> seconds.
>
>
> > Example TWO:  (in html && parse mode)
> > [cut]---
> > blah blah blah blah blah blah blah
> > 
> > [/cut]--
>
> Same benchmark, except these two lines were used instead of
> the two lines
> in the above case (obviously). Again, 10 executions; this
> time the average
> execution time was 6.40339350700379 seconds.
>
> There are 100 ways error could've been introduced into this
> test; even so,
> the results seem to lean towards not switching between html &
> php modes...
> although, you're talking about 1000 lines of code, and the
> test used 10
> times that, and the resulting difference was a little more
> than 3 tenths of
> a second... if you compared it with 1/10th of the code (your 1000 line
> file), you'd probably have a difference in the hundredths-of-a-second
> range.
>
> It's up to you, but I agree with what Christian said - I'd
> probably shoot
> for being able to maintain the code; with such a little speed
> difference
> you might as well set up more servers than optimize for 1/5th
> of a second
> in execution time.
>
> --Toby
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail:
> [EMAIL PROTECTED]
>


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




RE: [PHP] I love/hate FrontPage - need another HTML editor.

2001-01-17 Thread jeremy

I also find that ultraedit (forgive the goofy name, it's a _great_ app)
works really well if I've got to code in a windows world.

It's very flexible and fast on just any machine I've ever tried it on,
while also doing syntax highlighting and compiling if you want it to.

check it out at

www.ultraedit.com

It's actually the first piece of shareware that I had payed for, it's
that good --something like $40 US, it's been a couple of years since I
bought a license for it.  Hmm, maybe I should go upgrade.

jeremy



--
Jeremy Kelley <[EMAIL PROTECTED]>  pgp keyid 0xAECBA355
Phil 1:21  www.ganooz.com
Car pour moi, la vie c'est le Christ, et la mort est un gain.

> -Original Message-
> From: Matthew Aznoe [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, January 17, 2001 17:21
> To: Php-General-Digest; Chris Aitken
> Subject: RE: [PHP] I love/hate FrontPage - need another HTML editor.
>
>
> Have any of you tried using EditPlus?  (www.editplus.com)
> This is a great
> little editor for HTML, JavaScript, and PHP.  You can
> download extra modules
> for color syntax hilighting of practically any language you
> can think of
> including many different databases.  It has some nice useful
> HTML features
> and good handling of multiple documents... and most
> importantly, you don't
> have to worry about it mangling your code.  It is helpful
> while also staying
> out of your way.  The more I use it, the more I like it.  It
> is simple,
> elegant, and it gives me all the control that I want.  Its
> inexpensive and
> comes with a thirty day trial.  Check it out.
>
> BTW, I do not work for EditPlus or have any association with
> them other than
> that of a satisfied customer.
>
> Matthew Aznoe
>
>


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




RE: [PHP] Homepage

2001-01-17 Thread jeremy

Actually,

You need to set this up in your httpd.conf file (if you're using
apache).

look for this line in your httpd.conf

-[cut]-
 DirectoryIndex index.html index.php
--[/cut]


and if index.php isn't listed there, then add it.

--jeremy

--
Jeremy Kelley <[EMAIL PROTECTED]>  pgp keyid 0xAECBA355
Phil 1:21  www.ganooz.com
Car pour moi, la vie c'est le Christ, et la mort est un gain.

> -Original Message-
> From: S Bey [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, January 17, 2001 22:35
> To: [EMAIL PROTECTED]
> Subject: [PHP] Homepage
>
>
> Just a small (and hopefully easy) question.
>
> Is there a PHP equivalent of index.html? I want to be able to
> go straight
> to a PHP script without the user specifying the filename.
>
> Thanks, Steve.
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail:
> [EMAIL PROTECTED]
>


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




RE: [PHP] phpwebhosting.com

2001-01-18 Thread jeremy

I've had good experience with he.net

They've got good prices, and I've been content with their speed and
support.

Unix, apache, php, etc.



--
Jeremy Kelley <[EMAIL PROTECTED]>  pgp keyid 0xAECBA355
Phil 1:21  www.ganooz.com
Car pour moi, la vie c'est le Christ, et la mort est un gain.

> -Original Message-
> From: Toby Butzon [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, January 18, 2001 00:04
> To: Egan; [EMAIL PROTECTED]
> Subject: Re: [PHP] phpwebhosting.com
>
>
> > 125 users at $10 per month, is a maximum revenue of $1,250 per month
> > per server.  From that meager revenue, they are able to
> provide their
> > customers with an OC-12.  I would like to meet the genius
> who is able
> > to pull that financial rabbit out of a hat!
>
> ...and one machine is chewing up a whole OC-12?
>
> Who says they don't have multiple machines on the same OC-12?
>
> Just thought I'd throw in a comment; sounds to me like a wise
> choice would
> be to pick another host. I've personally had a good experience with
> Abhost.net, and their hosting pricing is similarly affordable
> but not quite
> as unbelievable.
>
> --Toby
>
> - Original Message -
> From: "Egan" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Wednesday, January 17, 2001 4:46 PM
> Subject: Re: [PHP] phpwebhosting.com
>
>
> > I was curious so I looked at their site.
> >
> > They shout "unlimited" as loud as they can, for every
> service you can
> > imagine.  But their FAQ says:
> >
> > > Though we do not have any pre-set limits, you will not be allowed
> > > to and/or over five GB of bandwidth/month.
> >
> >
> > "Yes there is NO limit. Read our lips. There is really NO
> limit.  But
> > even though there is NO limit, you still can't have more
> than 5GB per
> > month for our competition killing price of $9.95"
> >
> > "Anyone should be able to understand that, right?"
> >
> > They also claim they will limit each server to a max of 125
> users.  So
> > let's do a little math ...
> >
> > 125 users at $10 per month, is a maximum revenue of $1,250 per month
> > per server.  From that meager revenue, they are able to
> provide their
> > customers with an OC-12.  I would like to meet the genius
> who is able
> > to pull that financial rabbit out of a hat!
> >
> >
> > Egan
> >
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail:
> [EMAIL PROTECTED]
> >
> >
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail:
> [EMAIL PROTECTED]
>


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




RE: [PHP] below10host.com as webhost?

2001-01-18 Thread jeremy

Alright, so here's my question on the whole phpwebhosting.blah thing...

If they are extremely pro-PHP for hosting, how come they haven't
responded to some of the _slams_ they've received on this list?  I'd be
surprised to hear that no-one working for PHPwebhosting wasn't at least
lurking on this list.

I went to their site at the onset of the conversation and it did look
_very_ promising.  I'd like to hear something of a rebuttal from an
employee of them.  And preferably a tech of somekind.  -Gray people make
me nervous-

--jeremy

--
Jeremy Kelley <[EMAIL PROTECTED]>  pgp keyid 0xAECBA355
Phil 1:21  www.ganooz.com
Car pour moi, la vie c'est le Christ, et la mort est un gain.

> -Original Message-
> From: Egan [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, January 18, 2001 09:32
> To: [EMAIL PROTECTED]
> Subject: Re: [PHP] below10host.com as webhost?
>
>
> On Thu, 18 Jan 2001 01:54:28 -0600, "Jeff Lacy"
> <[EMAIL PROTECTED]> wrote:
>
> >anyone had thought/opinions on below10host.com as a web host?
>
> I'm speaking as a budding competitor, so keep that in mind. :-)
>
> According to their web page, below10host.com gives you 6GB per month
> for $9.95.  By way of comparison, webservpro charges $49.95 per month
> for the same 6GB.
>
> My analysis of costs tells me that at $49.95 for 6GB, webservpro does
> not have a large margin of profit in their price.  How can any hosting
> company sell the same 6GB per month for $9.95 and make enough profit
> to stay in business?
>
> At such a low price, I don't know how it's possible, unless a large
> majority of their customers consume so little of their quota so as to
> offset the loss incurred from customers who consume it all.
>
> 6GB per month is a fairly active site.  If you really have that much
> traffic, to me at least, $49.95 would seem affordable.  OTOH, if you
> have much less traffic, you could choose a lower priced plan.
>
> I believe in the adage of getting what you pay for.  Value is a
> balance between low price on the one hand, vs. high quality on the
> other.  The lowest price is not necessarily the best value.
>
> Egan
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail:
> [EMAIL PROTECTED]
>


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




[PHP] php and apache 2.0

2001-02-24 Thread jeremy


will php 4.0.4 build as a module with apache 2.0?

- jeremy


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




[PHP] PHP in HTML

2002-05-16 Thread Jeremy

Hi Folks,

A simple question that has me puzzled, obviously I have a config file wrong
somewhere..

Why does a filename.php file run as php and a filename.html with php code
embedded not produce a php result?

cheers,

Jeremy Burton
Senior Consultant
PERTH TOURIST LOUNGE

Level 2 Carillon City
Murray Street, Perth
Ph: +618 9229 2238
Fax: +618 9229 2220
Email: [EMAIL PROTECTED]




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




[PHP] bitwise AND is acting strange

2001-07-22 Thread Jeremy

The users on my website all have an "access" number that is used to give
them access to different parts of the site. Each bit represents a different
part of the site. So, if a user has an access of 10, which is 1010 in
binary, they have access to the parts of the site that are represented by
the second and fourth bit. You know, standard bit masking stuff.

So the part of the site that is represented by the second bit has a value of
2 (0010), and the part that is represented by the fourth bit has a value of
8 (1000)

BUT, for some reason when I do (2 & 10) its giving me a result of zero, when
I believe it should be doing (0010 & 1010) and giving me an answer of 0010
which is 2 in decimal.

With users with an access other than 10, say 9, or 8, or 7, it seems to
behave normally. What is going on? Is it treating the 10 as a binary 2?
These access values are stored in a mysql table as a standard INT, and they
are not UNSIGNED or BINARY.

Am I missing something?

Jeremy







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




[PHP] Sending Pictures to Cell Phones

2007-11-14 Thread jeremy
Hey list,

I'm doing some R&D for a project at my job and my boss wants the ability
to send pictures to cell phones. I was wondering if anyone had any
experience with this or could point me in the right direction to get
started.

Thanks,
Jeremy

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



RE: [PHP] Tip For The Day

2004-01-27 Thread Jeremy
[snip]
>Its all good, it's like inline braces versus dropped braces and every
>other coding style debate :) There's no winner.
[/snip]

pfft. Inline braces wins hands down ;p

-J

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



php-general@lists.php.net

2004-01-28 Thread Jeremy
[snip]
>[snip]
>> is there any function that will always replace a "&" with a "&" in
>a
>> string?
>
>$string = str_replace('&', ' ', $string);
>[/snip]
>
>Shouldn't this be 
>
>$string = str_replace('&', '&', $string);
>
>?
[/snip]

I tried this and amazingly it worked! The robustness of php defies all
logic and comprehension! When did they sneak in this new feature to read
the mind of the programmer? Keep up the good work guys!

-J

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

RE: [PHP] creating file links on linux (ln) with php

2004-02-28 Thread Jeremy
RTFM.

http://us2.php.net/manual/en/function.symlink.php

-Original Message-
From: Merlin [mailto:[EMAIL PROTECTED]
Sent: Saturday, February 28, 2004 3:24 PM
To: [EMAIL PROTECTED]
Subject: [PHP] creating file links on linux (ln) with php


Hi there,

I do have a couple of hundred file links to create. I am wondering if 
this could be automated with php.

On a linux shell it would look like this:
ln united-states-map.jpg vereinigte-staaten-karte.jpg

Are there php commands to execute this ln command?

Thanx for any help on that,

Merlin

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

2004-03-04 Thread Jeremy
Of *course* you can do that with php! When the user clicks a link, with
PHP respond like this:

...

...

And voila! PHP closes the window!

-J

-Original Message-
From: Richard Davey [mailto:[EMAIL PROTECTED]
Sent: Thursday, March 04, 2004 9:58 AM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] Executing JavaScript


Hello Todd,

Thursday, March 4, 2004, 6:52:33 PM, you wrote:

TC> How can I execute "window.close()" with php?

You can't, PHP is a server side language. You can echo out the above
JS using PHP, but you can't "force" it to happen.

-- 
Best regards,
 Richard Davey
 http://www.phpcommunity.org/wiki/296.html

-- 
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] magic_quotes_sybase - Windows MSSQL

2004-03-10 Thread Jeremy
My ISP has the following settings in their php.ini file:

magic_quotes_gpc = ON
magic_quotes_sybase = OFF

I am using a Windows Server and a SQL Server database.

I need to set magic_quotes_sybase to ON so that quotes will be escaped
with another quote instead of a slash.  However, I do not have access
to the php.ini file.  Is there something like the .htaccess file that
can be used on a Windows server?

My ISP is using PHP v4.3.0.

Thank you!

Jeremy Markman

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



[PHP] Column count doesn't match value count at row 1?

2003-02-07 Thread Jeremy Bowen
Hey,

I can't seem to figure this out. I am modifying some else's script I added
some rows to the myself database and no I get this error when I try to add
information to the database.

I am searching the docs but I can't seem to find the answer.

Thanks,

Jeremy



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




Re: [PHP] Class not working after PHP 4.2.3

2003-07-01 Thread Jeremy Thibeaux
It would probably be much easier to help you if you just stated exactly what data was 
being fed to mail() when it fails (try to make a simple case).  In fact, just 
determining that might help you determine if the problem actually has anything to do 
with mail(), or something else in the code.
 
Jeremy

Mário_Gamito <[EMAIL PROTECTED]> wrote:
Hi,

I have this class for sending mail, which worked until PHP 4.2.3
Since 4.3.0 it stops functioning. No error message. The mail is simply 
not send.
I've searched everywhere and found no explanation for this behaviour.

Any help would be appreciated.

Warm regards,
Mário Gamito




[PHP] How to run PHP from a MySQL DB

2003-08-06 Thread Jeremy Darling
I have a database of code pages and was wondering if their is a way to
actually run the code from the Database as if it was part of a page.

Thanks,
Jeremy



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



[PHP] Re: How to run PHP from a MySQL DB

2003-08-07 Thread Jeremy Darling
Thanks Alexandru,
  I just picked PHP back up and am quite a bit rusty on where to find
information these days.

Jeremy

"Alexandru Costin" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hi,
> Please take a look at http://php.weblogs.com/ their first article is
> exactly about this (both PostgreSQL and something about MySQL - see the
> comment)
>
> Alexandru
>
> --
> Alexandru COSTIN
> Chief Operating Officer
> http://www.interakt.ro/
> +4021 312 5312
> "Jeremy Darling" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
> > I have a database of code pages and was wondering if their is a way to
> > actually run the code from the Database as if it was part of a page.
> >
> > Thanks,
> > Jeremy
> >
> >
>
>



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



Re: [PHP] Edit a page in PHP

2003-08-07 Thread Jeremy Darling
Thanks greatly thats exactly what I was looking for.

"John W. Holmes" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Jeremy Darling wrote:
> > This is driving me nuts.  I know it can be done, cuz I've seen it done
> > before, but I can't figure it out.
> >
> > I would like to have a php file that allows me to edit an HTML/PHP file
thru
> > my browser.
> >
> > Currently I have something that looks like:
> >
> > 
> >  > $filename = "/usr/local/something.txt";
> > $handle = fopen ($filename, "r");
> > $contents = fread ($handle, filesize ($filename));
> > fclose ($handle);
> > print $contents;
>
> print htmlentities($contents);
>
> > ?>
> > 
> >
> > This works fine unless the page that I'm editing has a TextArea tag in
it,
> > witch throws everything off.  I know that this is more of an HTML
question,
> > but I couldn't find the answer in my quick searches (too many pages to
go
> > thru).
>
> --
> ---John Holmes...
>
> Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/
>
> PHP|Architect: A magazine for PHP Professionals – www.phparch.com
>
>
>
>



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



[PHP] Edit a page in PHP

2003-08-11 Thread Jeremy Darling
This is driving me nuts.  I know it can be done, cuz I've seen it done
before, but I can't figure it out.

I would like to have a php file that allows me to edit an HTML/PHP file thru
my browser.

Currently I have something that looks like:





This works fine unless the page that I'm editing has a TextArea tag in it,
witch throws everything off.  I know that this is more of an HTML question,
but I couldn't find the answer in my quick searches (too many pages to go
thru).

Anyone have an idea on how to do this, or a pointer on what to put into
GOOGLE to get back what I'm looking for.

Thanks,
Jeremy



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



[PHP] Re: How to run PHP from a MySQL DB

2003-08-14 Thread Jeremy Darling
This is actually for a personal web portal, so very little will be eval'd
out of the database most of the time.

I'm not sure what a PHP accelerator is, but I'm guessing that if I wanted to
use it I could get away with doing something like:

Export the php file from the db to an actual tmp file.  require it and call
it from inside of my dbpage.php file.


"Alexandru Costin" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Oopps, sorry for my previous reply.
> Actually I've missunderstood your question - I've understood it better
> now.
>
> The "eval" is indeed the key - but there is one major performance
> issue - when eval-ing code from the database, you won't be able to use a
PHP
> accelerator - as they can't optimize dynamically eval-ed code.
> What we regularily use is to cache the PHP code in some PHP files that
> are actually "required" when you need to execute them
>
> Alexandru
>
> --
> Alexandru COSTIN
> Chief Operating Officer
> http://www.interakt.ro/
> +4021 312 5312
> "Jeremy Darling" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
> > I have a database of code pages and was wondering if their is a way to
> > actually run the code from the Database as if it was part of a page.
> >
> > Thanks,
> > Jeremy
> >
> >
>
>



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



[PHP] Apache environment variables

2003-03-24 Thread Jeremy Russell
Hello list.. I have an issue..

I have users athenticating to apache using the ldap_mod_auth module,
when they authenticate it populates the LDAP_USER variable.  What I need
is to also populate the REMOTE_USER variable for some other CGI's,  I
know I could change them, but there are several written I C so I would
actually like to avoid this.

I want to use php for most of my content.  The CGI I have refered to
will be php in the future.  

I have tried to use the apache_setenv function to no avail.  My syntax
is 
apache_sentenv(REMOTE_USER,$user) $user contains the value of LDAP_USER.
$user DOES contain the correct value.  I have also trie the putenv()
function, but it didn't work as well.  I may be misusing the
apache_setenv function since it has yet to be documented.  Any examples,
advice, or a different procedure would be well appreciated.

Thanks in advance!

jrmy

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



RE: [PHP] redirect using header

2003-03-27 Thread Jeremy Russell
Use ---> header("Location:http://newwebpage.com";);

-Original Message-
From: David Banning [mailto:[EMAIL PROTECTED] 
Sent: Thursday, March 27, 2003 1:15 PM
To: [EMAIL PROTECTED]
Subject: [PHP] redirect using header


I have been trying to do a redirect with header;



   Optex Staging and Services Inc. 


http://newwebpage.com');
?>

Stand By For Terminal...




I keep getting the error;

Warning: Cannot modify header information - headers already sent by
(output started at /usr/hosting/optex/goterm/temp.html:8) in
/usr/hosting/optex/goterm/temp.html on line 

I have tried the header statement in different postions, and also tried
eliminating the existing  section with no difference. What am
doing wrong 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



RE: [PHP] Internet Explorer toolbar

2003-03-27 Thread Jeremy Russell
Use javascript --> window.open("url","toolbar=no");

-Original Message-
From: Manuel Ochoa [mailto:[EMAIL PROTECTED] 
Sent: Thursday, March 27, 2003 2:32 PM
To: PHP General
Subject: [PHP] Internet Explorer toolbar


Is there any way of using php to launch a new browser without the IE
toolbars?

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



Re: [PHP] Refreshing

2003-06-30 Thread Jeremy Thibeaux
> [snip]
> I have a chat script. I want it to refresh the chat
> display area
> whenever there is a new message posted, but not
> every 10 seconds or so.
> How could I get the script to refresh only when
> there is a new entry
> into the database table?
> [/snip]
 
I have implemented something along these lines for an
online chess game (so the board would only refresh
when the other player moves).  It did require a loop,
as suggested.  I used a hidden IFRAME to check the
data.  Basically, I would refresh the page referred to
by the IFRAME every 10 seconds or so, and this page
contained JavaScript that invoked a function on the
containing page.  The JavaScript function on the
containing page would then refresh the page when the
parameter passed to it indicated that the other player
had moved.  I did implement the site using PHP, but
this really isn't a PHP specific approach.  

I imagine you would do something very similar for chat
(in fact, I had been considering implementing it for
the online chess site so that the users could send
messages to each other during the course of the game).

And there is a performance issue if you are going to
support a lot of users at one time; however, at least
it is not as bad as refreshing the entire page every
10 seconds (this would be particularly disastrous for
my chess board, which contained many images).

There are a number of references that talk about this
trick if you search on "iframe rpc javascript" in
google:

http://www.google.com/search?hl=en&ie=UTF-8&oe=UTF-8&q=iframe+rpc+javascript

You will still get the clicking, tho.  But users' can
disable it if it annoys them -- sometimes it is nice
to know that something is going on.

Hope this helps.

Jeremy


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



Re: [PHP] Geting information from XML

2003-06-30 Thread Jeremy Thibeaux
Have you tried using the DOM XML functions?

http://us3.php.net/manual/en/ref.domxml.php



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



Re: [PHP] Refreshing

2003-06-30 Thread Jeremy Thibeaux
The only problem I have with the image idea is that it
is not particularly generic and a bit unusual (i.e.
kindof a hack).  

The IFRAME would need only contain a simple JavaScript
function call, so it would be pretty small (the data
would probably be less than the HTTP header
information), and this would basically represent the
framework for implementing RPCs via JavaScript.  Once
you go down this path, you don't have to worry about
figuring out what image size means what or how to
generate these images, you just pass a meaningful
parameter to your RPC response handler.

But, I admit, I can get religious about these kind of
things.  In the end, sometimes practical realities
justify hacks.  And, really, it is all a matter of
degrees (I am not sure IFRAMES were designed for what
I am proposing you use them for either).

Jeremy

--- Marco Tabini <[EMAIL PROTECTED]> wrote:
> The image should take care of the click, and also
> reduce the amount of
> information transmitted somewhat (although not
> necessarily, depending on
> what you send to your iframe).
> 
> Cheers,
> 
> 
> Marco
> 

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



Re: [PHP] php-general as REPLY TO

2003-06-30 Thread Jeremy Thibeaux
I just read this FAQ, and I still don't see a good
reason why not to change the REPLY-TO.  The primary
reason offered is that it will prevent people from
sending messages in private, but that is not really
the case (the FROM field will still contain the
sender's address and it can simply be cut & paste).  I
just don't see anything "evil."

I am with Doug -- it is better to have something set
up to where people don't have to think about
performing the normal operation, and and it is
acceptable that the exception (when you want to write
someone privately) might require a little more work
(cut & paste).  I wonder how often the answers to
questions don't make it on the list because somebody
forgot to press "reply-all".

My two cents.

Jeremy 

--- Derick Rethans <[EMAIL PROTECTED]> wrote:
> On Mon, 30 Jun 2003, Doug Essinger-Hileman wrote:
> 
> > On 30 Jun 2003 at 21:23, Derick Rethans wrote:
> > 
> > > > I'm wondering why the listed "Reply To"
> address is not 
> > > > "[EMAIL PROTECTED]" 
> > > > Thing would be so much easier to just reply
> than cut-n-paste when
> > > > reply to the entire list on a subject (which
> is the norm).
> > > 
> > > That's an evil thing, and misusing e-mail.
> E-mail clients have the
> > > "reply-all" function for this.
> > 
> > I disagree with you Derick. In many (most? all?)
> programs, the reply-
> > all function will send an email back to the list
> **and** one to the 
> > author. This wastes bandwidth needlessly, in my
> opinion. I receive 
> > the messages to the list and do not need to
> receive a message sent 
> > directly to me. 
> 
> You have procmail for that. There is some very good
> explanation for 
> this, see 
>
http://www.math.fu-berlin.de/~guckes/faq/maillist.html#munge_reply-to
> 
> Derick
> 
> 
> -- 
> "Interpreting what the GPL actually means is a job
> best left to those
> that read the future by
> examining animal entrails."
>
-
>  Derick Rethans
> http://derickrethans.nl/ 
>  International PHP Magazine 
> http://php-mag.net/
>
-
> 
> 
> -- 
> 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] Yahoo Stuff.

2003-06-30 Thread Jeremy Thibeaux
I am getting the same message, but I hadn't made the
connection.  Is anyone else seeing this?

Jeremy

--- Daryl Meese <[EMAIL PROTECTED]> wrote:
> Does anyone know why I get an email from Yahoo
> Groups everytime I submit to
> this list?
> 
> The email comes from: Yahoo! Grupos
>
[EMAIL PROTECTED]
> .com.br]
> 
> and the body is:
> 
> Olá [EMAIL PROTECTED],
> 
> Recebemos sua solicitação para entrar no grupo
> BUNDAS2003
> do Yahoo! Grupos, um serviço de comunidades online
> gratuito e
> super fácil de usar.
> 
> Este pedido expirará em 21 dias.
> 
> PARA ENTRAR NESTE GRUPO:
> 
> 1) Vá para o site do Yahoo! Grupos clicando neste
> link:
> 
> 
>
http://br.groups.yahoo.com/i?i=JahBLwdWc4CuYfaEw-x7X8UMS3Y&e=darylm%40magias
> oftware%2Ecom
> 
>   (Se não funcionar, use os comandos para cortar e
> colar o link acima na
>barra de endereço do seu navegador.)
> 
> -OU-
> 
> 2) RESPONDA a este e-mail clicando em "Responder" e
> depois em "Enviar",
>no seu programa de e-mail.
> 
> Se você não fez esta solicitação ou se não tem
> interesse em entrar no grupo
> BUNDAS2003, por favor, ignore esta mensagem.
> 
> Saudações,
> 
> Atendimento ao usuário do Yahoo! Grupos
> 
> 
> O uso que você faz do Yahoo! Grupos está sujeito aos
> http://br.yahoo.com/info/utos.html
> 
> 
> 
> -- 
> 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] New commercial software needs beta testers

2002-11-13 Thread Jeremy Wilson
Intravative Software Corporation will be releasing a new commercial
software
application in January 2003 called iIPN. The software enables paypal
sellers
to sell and automatically deliver digital and non-digital products from
their web site. The software is currently the most robust out of any
other
commercial grade pay pal software and was designed with software
publishers
and music producers in mind for distributing their goods and services.
 
We are performing consumer based beta testing for the month of December
2002
and are accepting applications for people who would like to participate
in
the beta program.
 
Accepted Beta testers receive a free domain license and fully functional
software for this product to test with. You must provide your own server
and
equipment to do the beta testing with.
 
At the end of the beta testing period for this program, beta testers
will
receive a free copy of the final release software and a single domain
license for using the software.
 
Application URL: http://www.intravative.com/v2/iipn_betatester.php



[PHP] RE: running php as cgi script

2002-11-18 Thread Jeremy Wilson
Change your ISP. For an ISP to be forcing you under this way is
unrealistic. There are plenty of really good ISP's listed on the php
site that all have the latest versions of php and have good setup
packages.

-Original Message-
From: Scott [mailto:[EMAIL PROTECTED]] 
Sent: Friday, November 15, 2002 7:53 PM
To: php-general
Subject: running php as cgi script

I'm trying to run a simple test php script as a cgi script on my ISP's
server 
and haven't been able to get it to work, although according them it is 
possible.

I have an example from a book  which gives the following steps:

1. Put the script in the cgi-bin
2. run chmod 755
3. include "#!/usr/bin/php" at the top. (I have checked that this is the

correct location of php on the server)

The test script they give looks like this:

#!/usr/bin/php

echo "This is a small CGI program."

Doesn't look like the usual php syntax to me, but I guess this is
different.
Anyway I've tried it a bunch of different ways and it hasn't worked and
I 
haven't been able to find much on the subject from Google. 
Can someone tell me where I'm going wrong?

Thanks,
SW









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




[PHP] Web Crawler

2002-11-18 Thread Jeremy Wilson
Does anyone know of a really good web crawler built in php using mysql
for the database?
 
I am looking to setup a php app that I can setup to crawl my own web
site so I can have people search the site. I know there are plenty out
there, but out of the ones I have tried, the results they return are
always lame.
 



RE: [PHP] New commercial software needs beta testers

2002-11-18 Thread Jeremy Wilson
Well fine... by reading a bunch of your other posts when you talk to
people, it looks like you are just a rude SOB... so I am really not
offended.

 

-Original Message-
From: Rasmus Lerdorf [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, November 13, 2002 2:20 PM
To: Jeremy Wilson
Cc: [EMAIL PROTECTED]
Subject: RE: [PHP] New commercial software needs beta testers

You spammed 6 different lists with the same message.  What in the world
does it have to do with PHP Installation issues, for example?  It's
spam,
and your domain has been blocked.

-Rasmus

On Wed, 13 Nov 2002, Jeremy Wilson wrote:

> Hey it isn't spam. This is php specific
>
> -Original Message-
> From: Rasmus Lerdorf [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, November 13, 2002 2:15 PM
> To: [EMAIL PROTECTED]
> Cc: Jeremy Wilson
> Subject: Re: [PHP] New commercial software needs beta testers
>
> Argh!  That's the second commercial spam message to hit multiple php
> lists
> in a couple of days.
>
> This company has been blocked from further posting as well now.
>
> -Rasmus
>
> On Wed, 13 Nov 2002, Jeremy Wilson wrote:
>
> > Intravative Software Corporation will be releasing a new commercial
> > software
> > application in January 2003 called iIPN. The software enables paypal
> > sellers
> > to sell and automatically deliver digital and non-digital products
> from
> > their web site. The software is currently the most robust out of any
> > other
> > commercial grade pay pal software and was designed with software
> > publishers
> > and music producers in mind for distributing their goods and
services.
> >
> > We are performing consumer based beta testing for the month of
> December
> > 2002
> > and are accepting applications for people who would like to
> participate
> > in
> > the beta program.
> >
> > Accepted Beta testers receive a free domain license and fully
> functional
> > software for this product to test with. You must provide your own
> server
> > and
> > equipment to do the beta testing with.
> >
> > At the end of the beta testing period for this program, beta testers
> > will
> > receive a free copy of the final release software and a single
domain
> > license for using the software.
> >
> > Application URL: http://www.intravative.com/v2/iipn_betatester.php
> >
>
>
>





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




[PHP] Date?

2002-06-08 Thread Jeremy Bowen

Hello,

I am having nothing but trouble with the date function. I want it to print
out a date like this: Saturday June 8, 2002 but as soon as I put spaces or
comma's in the string I get parse errors. I can get it to print
SaturdayJune082002 with   I have tried escaping with
\ but it seems to make no difference.

Any ideas?

Thanks,

Jeremy


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




[PHP] Fw: Excel Spreadsheet

2002-06-09 Thread Jeremy Bowen

Hello All,

I was working on a little php today and I remembered that I had another
project that I wanted to do. I have a fairly complicated excel spreadsheet
that helps me price a service I provide and I would like to be able to have
fields on my website that can be filled in and the data passed throught the
spreadsheet (through whatever manner) and the pricing info delivered back to
the client.

I have no idea how to do this and I thought that maybe some of you have done
projects like this and would have an idea of where I should start.

 Thanks,

Jeremy
>


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




[PHP] Possible MSSQL error PHP4.2.0?

2002-06-11 Thread Jeremy Coates

Hi All,

I'm not sure if this is a bug or not:

Using MSSQL Server 2000 on WinNT (fully patched).
PHP 4.2.0 using ini_set('mssql.datetimeconvert',0)

Date fields get returned with an extra character on the end output from
var_dump:

string(20) "2002-08-06 11:45:02---^ Extra character seems 
to be ASCII 00

This is obviously mucking about with other date related functions.

Any ideas?

Regards,
Jeremy Coates
-- 

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




[PHP] Re: Possible MSSQL error PHP4.2.0?

2002-06-11 Thread Jeremy Coates

In message <[EMAIL PROTECTED]>
  [EMAIL PROTECTED] (Jeremy Coates) wrote:
> 
> string(20) "2002-08-06 11:45:02@"
> ---^ Extra character seems to be ASCII 00

Forgot that would screw up in an email! I've placed an @ sign where the ASCII
00 is appearing.

Ideas?

Regards,
Jeremy
-- 

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




[PHP] Mailing all the elements of a form

2002-07-06 Thread Jeremy Bowen

Hey,

I have looked in PHP manual but I cannot seem to find what I am looking for.

I have a very large form that I need to be able to mail. I just don't want
to have to code all of the field into my mail() function.

Thanks,

Jeremy


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




[PHP] Updated PayPal IPN class for PHP

2003-09-15 Thread Jeremy Johnstone
Unfortunately it seems PayPal has broke IPN processing for PHP users
recently. This is important news because a good majority of the people
using IPN with a PHP script are no longer able to automatically process
payments, and PayPal offers nothing to help PHP users who are having
trouble. In fact they claim that they changed nothing and that it is the
user's fault that it suddenly stopped working one day. The problem
actually is that PayPal now seems to require your IPN script to follow a
http redirection. After trying almost everything, within reason, to
avoid this redirection, it seems no matter whether you use GET or POST
and HTTP or HTTPS they force you to follow the redirect. The solution to
this problem is to use cURL so PHP can follow the redirection and thus
get the VERIFIED or INVALID response from PayPal. A new PHP class which
works perfectly with the current PayPal IPN (and should always work even
if they fix the bug) is available at http://www.scriptdevelopers.net. It
is a modified version of the class by Pineapple Technologies which is
commonly used all over the Internet and is a drop in replacement for
their paypal_ipn.php class. If you use a class named paypal_ipn.php,
then most likely you will need to get this updated version. The script
is licensed under the GPL.

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



Re: [PHP] PHP|Con insane pricing

2003-09-15 Thread Jeremy Johnstone
Actually the $495 is the conference fee only... It does not include the
$160 a night for the hotel room (price of the hotel the conference is
at), or food, or transportation. That is just your ticket into the
conference. Factor in everything else, and your easily up to
$1500-$2000. Using the average salary which was posted in this thread,
that is about a months pay after taxes for an average programmer.

Jeremy

On Mon, 2003-09-15 at 17:12, Dan Anderson wrote:
> > The pricing seems insane, and geared towards people with lots of 
> > spare money...
> ::snip::
> > but I'm not going to shell out $495 (the cheapest non-student 
> 
> If you consider the average salary for a computer programmer is probably
> $40k - $50k (at least in the US) this is not insane.  (Heck, it's less
> then a weeks pay -- even with the plane tickets).  I assume this covers
> hotel rooms (pricey), food (pricey), speakers (very pricey), etc.
> 
> -Dan

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



Re: [PHP] PHP|Con insane pricing

2003-09-15 Thread Jeremy Johnstone
Let me also say, that I fully think their price is fair. It's right in
line with most other conferences (if not cheaper). I was just clarifying
that the $495 price is not all inclusive. I wish I would be able to
attend, but unfortunately money is tight right now for me, and I can't
afford it. I most likely will be speaking at the next one (assuming they
accept my submission when it comes time) and money won't be an issue. 

Jeremy

P.S. - In regards to the email below, if you did that you would have to
factor in extra gas money, and $10 a day for WIFI access from the hotel.

On Mon, 2003-09-15 at 21:23, John W. Holmes wrote:
> Jeremy Johnstone wrote:
> 
> > Actually the $495 is the conference fee only... It does not include the
> > $160 a night for the hotel room (price of the hotel the conference is
> > at), or food, or transportation. That is just your ticket into the
> > conference. Factor in everything else, and your easily up to
> > $1500-$2000. Using the average salary which was posted in this thread,
> > that is about a months pay after taxes for an average programmer.
> 
> What are you talking about? You sleep in your car and have a hot plate 
> running off the cigarette lighter to make Raman noodles! Bring extra 
> spray deodorant.
> 
> -- 
> ---John Holmes...
> 
> Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/
> 
> php|architect: The Magazine for PHP Professionals – www.phparch.com

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



Re: [PHP] Re: PHP|Con insane pricing

2003-09-16 Thread Jeremy Johnstone
I apologize I couldn't help more, but if I knew a solution to your
problem I would be going to! 

;-)

Jeremy

On Tue, 2003-09-16 at 02:17, Jeremy Brand, B.S. wrote:
> Thanks again to all who at least had a mature answer.
> 
> Cheers :)
> Jeremy
> 
> 
> Jeremy Brand, B.S. wrote:
> > Does anyone know a way to attend the PHP|con west as an observer in 
> > Santa Clara, CA, US on Oct. 23rd without spending tons of ca$h?
> > 
> > The pricing seems insane, and geared towards people with lots of spare 
> > money...
> > 
> > I would love to hear specifically the Advanced track on Oct. 23 (Michael 
> > Radwin, Sterlin, Thies, George Schlossnagle and JimW), but I'm not going 
> > to shell out $495 (the cheapest non-student rate) for it.
> > 
> > Thanks,
> > Jeremy
> > 
> 
> 
> -- 
> "Prediction is very difficult, especially of the future."
> Niels Bohr
> http://www.nirvani.net

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



[PHP] problem with external command.

2003-09-22 Thread Jeremy Russell
Hello list... Im fighting a losing battle here..

I'm needing help!

Everything seems to work fine with this function except that when the
command runs and is to populate the "$scan_result" field.  It doesn't Im
not sure why either.  I also get an "End of file unexepected" error in
my apache logs as well.  

Anybody have any advice.

On top of the exec() function I've also tried shell_exec(), system(),
and even backtic's ``.  I'm stumped...  I'm not sure where to go with
this.


$nmap = "/usr/local/bin/nmap"; /* path to nmap program */
$nmap_opt = "-sT -sU -sR -O ";/* Nmap command line options */
$scan_log = "/usr/local/pub/tftp/scan.log";   /* scanner log file */



if( $attempts == 4 )
scanner($nmap,$nmap_opt,$ipaddr,$scan_log,$echo,$mail);


function scanner($scan,$opt,$ip,$log,$echo,$mail) {

$cmd = "$scan  $opt $ip ";
print "This is the command:  $cmd\n";
$scan_result =  exec("$cmd");
print "This should be the scan :  $scan_result";

$filename = "$log";
$fileid = fopen("$filename","a");

fputs($fileid,"$scan_result\n");
fclose($fileid);

//$mail_result =`$echo $scan_result | $mail -s "Hostile Node"
$admin`;

 } /* end scanner() */





Jeremy Russell
Network Administrator, CNI
580.235.2377

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



[PHP] Select form dynamic creation.

2003-09-24 Thread Jeremy Russell
Hello list,

I've spent a little time looking to see if this has been done
before, and haven't found it, though I'm certain it has been done.  What
I want to do is build a page by first having a selection form.  This
select statement will have a number of items within it.  When a use
scrolls and clicks an item I want a text box to popup in place of the
list, with an id of the select item name.  I then want a new list to pop
up with all the items except for the one that was last chosen.  The user
should be able to select another item and a text box pop up, and so on
and so forth until all items have either been selected or the user is
ready to stop selecting.  This is a sort of searching tool and the lists
of items are "attributes" the use can search by.  This seems like it
could be done, but the way I'm seeing it now it loss like it would
require about 1000 "if" statements.  Can a php guru shed some light and
point me in the right direction if there is one??

Thanks!


jrmy

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



RE: [PHP] Select form dynamic creation.

2003-09-24 Thread Jeremy Russell
Yes, that would probably work just as well, but I still am having
trouble seeing how to handle things, without having 1000 if's.

I now I probably need an array of the list items and then remove the
item from the array when it is selected but that's as far as I've been
able to think it through. 

> -Original Message-
> From: Marek Kilimajer [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, September 24, 2003 12:35 PM
> To: Jeremy Russell
> Cc: [EMAIL PROTECTED]
> Subject: Re: [PHP] Select form dynamic creation.
> 
> Have you considered using multiselect?
> 
> Jeremy Russell wrote:
> > Hello list,
> >
> > I've spent a little time looking to see if this has been done
> > before, and haven't found it, though I'm certain it has been done.
What
> > I want to do is build a page by first having a selection form.  This
> > select statement will have a number of items within it.  When a use
> > scrolls and clicks an item I want a text box to popup in place of
the
> > list, with an id of the select item name.  I then want a new list to
pop
> > up with all the items except for the one that was last chosen.  The
user
> > should be able to select another item and a text box pop up, and so
on
> > and so forth until all items have either been selected or the user
is
> > ready to stop selecting.  This is a sort of searching tool and the
lists
> > of items are "attributes" the use can search by.  This seems like it
> > could be done, but the way I'm seeing it now it loss like it would
> > require about 1000 "if" statements.  Can a php guru shed some light
and
> > point me in the right direction if there is one??
> >
> > Thanks!
> >
> >
> > jrmy
> >

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



RE: [PHP] 3 mins of your time please...logic problem

2003-09-24 Thread Jeremy Russell
You might try to perform bother queries first then check then by

If ($result1 || $result2) {
echo "You have already voted";
} else {
 ...

}

This means that if either the username or ip or both exists in the db,
then the user is denied...

Hope this is along the lines of what your needing to do.

> -Original Message-
> From: Ryan A [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, September 24, 2003 12:38 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] 3 mins of your time please...logic problem
> 
> Hi all,
> Am having a bit of a problem understanding this, can anybody tell me
where
> i'm going wrong please?
> 
> Basically trying to limit the "vote" to just 1 per person, first am
> checking
> if the the person with username has voted, if that comes back as false
> then
> am checking his ip (because i dont know if  the person changed his
> username
> and is trying to vote again) now its allowing me to vote twice and on
the
> third time its restricting me.
> 
> *code*
> $check="select vote_date from site_rateing where user='".$username."'
and
> sitenumber=".$n;
> $res = mysql_query($check) or die("Error: " . mysql_error());
> $check_result = mysql_num_rows($res);
> 
>  if($check_result !=1)
>   { $oneVote=1;
> 
>   $check2="select count(*) from site_rateing where ipno='".$theIP."'
and
> sitenumber=".$n;
>   $check_result2 = mysql_result(mysql_query($check2),0);
> 
> if($check_result2 >=1)
> { $oneVote=2;}else{$oneVote=1;}
> 
>   }// end of first "if"
> 
> 
> if($oneVote ==2)
> {
>  $row = mysql_fetch_row($res);
>  print("Sorry, You have already voted on ".$row[0].". Only one
> vote
> is allowed");
>  exit;
> }
> else
> //continue with the program.
> *code*
> 
> Any ideas?
> 
> Thanks,
> -Ryan
> 
> --
> 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] Apache API support?

2003-10-04 Thread \[ASDF\] Jeremy
Hi All,

I've been thinking of developing an Apache module to ease my job, but I
don't have a clue of C. I know that mod_perl and mod_tcl provides module
programming support for Apache, are there any implementations of PHP in
programming Apache modules?

Thanks
- Jeremy

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



[PHP] Apache API?

2003-10-04 Thread \[ASDF\] Jeremy
Hi All,

I've been thinking of developing an Apache module to ease my job, but I
don't have a clue of C. I know that mod_perl and mod_tcl provides module
programming support for Apache, are there any implementations of PHP in
programming Apache modules?

Thanks
- Jeremy

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



Re: [PHP] OO parent/child relationship

2003-10-05 Thread Jeremy Johnstone
What I would do is pass the handles to the objects in the class
constructor by reference. For example create one db object similar to
this:

class database
{
   ...
}

$db = new database();

and then pass the reference to all other classes like this:

class smarty
{
   var $db;

   function smarty(&$db) 
   {
   $this->db = &$db;
   }
}

This way you don't have the wasted memory of duplicate class instances.
Of course PHP5 will make this easier as it passes objects by reference
by default.

Jeremy   


On Sun, 2003-10-05 at 12:20, Gerard Samuel wrote:
> Dan Anderson wrote:
> 
> >Out of curiousity, what exactly are you trying to do?  Are you sure this
> >type of framework is most appropriate (and easiest to implement?)
> >
> In my current setup, the more classes Im adding to the code, the more 
> complex things seem to get.
> For example.
> I have a smarty object that has a reference to a DB object.
> I plan on converting a file of user management functions to a class.
> If I do, then that new class, is going to need a reference to the DB object.
> Then on top of that, the smarty object is going to need a reference to 
> the user management object.
> By the time we are here, the smarty object contains a reference to the 
> DB object, *and*
> a reference to the user management object which contains a reference to 
> the DB object.
> And thats just the beginning.  There are other classes that intertwine 
> in this manner.
> So what I would I forsee as a better playing ground would be
> 1.  child classes being capable of talking to each other
> For example, the smarty class capable of calling the DB class and the 
> user management class
> without the need for all those redundant *large* references.
> 
> 2.  The parent class capable of talking to the child classes.
> 
> In this context, parent and child is not to be thought of as in normal 
> class structures where children *extends* parents.
> All the *parent* class is, a means to provide wrappers around other 
> *child* classes,
> and act as a controller.  The *child* methods/variables, 
> aren't/shouldn't be called directly.
> 
> Also, if I can work it out, the class mm would only intially contain a 
> constructor, and maybe a
> class loader.
> The class loader provides the additional class method wrappers on demand 
> when needed.
> 
> This is merely an first rate idea.  Nothing is remotely concrete about it.
> 
> Thanks for looking.

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



Re: [PHP] OO parent/child relationship

2003-10-05 Thread Jeremy Johnstone
I would have to see your code, but maybe you don't need to be passing
the references your doing. Why does your Smarty class need to access the
database? Why does your Smarty class need a reference to the user
management class inside it? Personally, I see your user class being the
only one which needs to access either one. Your user class should have
am instance of both because your user class should be what pulls the
data from the database, and then pushes it to the Smarty class for
display. Maybe I am way off here, but essentially that is how it should
be done IMHO. 

Jeremy

On Sun, 2003-10-05 at 17:57, Gerard Samuel wrote:
> Jeremy Johnstone wrote:
> 
> >What I would do is pass the handles to the objects in the class
> >constructor by reference. For example create one db object similar to
> >this:
> >
> >class database
> >{
> >   ...
> >}
> >
> >$db = new database();
> >
> >and then pass the reference to all other classes like this:
> >
> >class smarty
> >{
> >   var $db;
> >
> >   function smarty(&$db) 
> >   {
> >   $this->db = &$db;
> >   }
> >}
> >
> >This way you don't have the wasted memory of duplicate class instances.
> >Of course PHP5 will make this easier as it passes objects by reference
> >by default.
> >
> This is currently how Im doing things.
> And this is what Im trying to get away from.
> In addition to passing smarty the $db object by reference, Im going to 
> be passing
> the user management object to smarty by reference, which in turn has a 
> copied reference to the $db object.
> So in the end the smarty object is going to have 2 references to the $db 
> object.
> That is what I want to get away from...
> $smarty <- $db (by reference)
> $smarty <- $user_management (by reference) <- $db (by reference)

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



Re: [PHP] php classes

2003-10-06 Thread Jeremy Johnstone
I don't know if these will help you, but maybe take a look here:

phpclasses.org (code samples to read over)
hotscripts.com (complete programs to read over)
devshed.com (heard they had good articles, never really been there)

Jeremy

On Mon, 2003-10-06 at 07:13, Cameron Metzke wrote:
> Anybody know of any real world php class tutorials?, so far ive read ones
> about building car and cake classes but i tend to learn better from actually
> follow a tutorial and building something though it and i done know jack
> about building cars lol.

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



RE: [PHP] File upload meter

2003-10-08 Thread Jeremy Johnstone
I can not say for sure, but the last time I saw it mentioned on the
PHP-DEV list (besides today), the comments about it weren't that great.
If memory serves me correctly, the code (although functional) is really
bad and doesn't follow PHP standards. I may be wrong here and if so I
apologize, but before bashing PHP's core team for not incorporating
something you should check all the facts at hand.

Jeremy

On Wed, 2003-10-08 at 09:06, Steve Murphy wrote:
> David Enderson also developed an upload meter and contacted PHP about
> including it.
> http://www.mail-archive.com/[EMAIL PROTECTED]/msg02155.html
> Long and short, PHP never included it. This functionality is requested and
> can be included easily. I'm in the process of developing documentation and
> rpm packaging for Dave's meter and I've already had 7 clients call me about
> it, (IMO) I think its time more projects like this are needed and PHP should
> do a better job of incorporating them and less time holding conferences.
> 
> Murph
> 
> Oh go here (http://www.pfohlsolutions.com/projects/upload) to see what's
> available (not much right now) from Enderson's project. Note this is not the
> official site.
> 
> 
> 
> 
> -Original Message-
> From: Hardik Doshi [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, October 08, 2003 9:47 AM
> To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
> Subject: [PHP] File upload meter
> 
> 
> Hi Group,
> 
> It's really nice to see the file upload meter
> developed by Doru Theodor Petrescu
> (http://pdoru.from.ro/). He did a nice job. He created
> serveral patches for the php 4 to enable the file
> upload meter.
> 
> I was just wondering what will happen to the file
> upload meter once the php 5.0 will release? Is PHP
> community planning to put file upload meter code
> permanently in every distributions of the php?
> 
> Please let me know about my queries. I really want to
> use this feature but worrying for the future php
> releases.
> 
> Thanks
> 
> Regards,
> Hardik Doshi
> 
> __
> Do you Yahoo!?
> The New Yahoo! Shopping - with improved product search
> http://shopping.yahoo.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



Re: [PHP] Re: (native) linux-php-editor with some advanced features?

2003-10-08 Thread Jeremy Johnstone
That is really odd. From what I heard Zend Studio runs faster in Linux
than Windows. I have only experienced the Windows version over someone's
shoulder, but with similar machines mine seems to load faster and run
better and I use Linux. Try upgrading to the new ZS3 if you haven't
already. It is faster and better than 2.6. Well worth the money. I still
find myself using vi/pico though more often than not. I guess it is all
a matter of preference.

Jeremy


On Wed, 2003-10-08 at 09:57, Kirk Babb wrote:
> As a amateur PHP user, I have really enjoyed Komodo 2.5 (been using it since
> 1.3).  Buy the non-commercial license, it's cheap (I think I paid $24.95)
> and ActiveState backs up their products well.  Not a plug for them, but my
> experience with them has been good.
> 
> Plus, if you want to switch back and forth from Windows to Linux, the
> license still applies (I have a dual-boot machine), and the functionality is
> the same.
> 
> HTH
> -Kirk
> 
> 
> "Thomas Seifert" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
> > Hey folks,
> >
> > I know this topic comes up again and again but I couldn't find
> > any usefull php-editor for linux which is NOT written in java AND
> > has some advanced features like a "file navigation" (listing all functions
> > in a file with direct jump to them) or tooltips with the function
> definition
> > or similar.
> >
> > I liked the features of the Zend IDE but its just to aching slow on linux
> > (don't know why, but its much faster on windows), while other native
> editors
> > are not made for php or just contain its syntax-highlightning without any
> further
> > special features.
> > Did I miss one of the available editors which provides these features?
> >
> > Thanks,
> >
> > Thomas

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



[PHP] Need advice, hopefully on topic.

2003-10-10 Thread Jeremy Russell
Hello list,
I got this project, I'm writing it in PHP of course.  What I
would like to do is create a simple an efficient way to work on it from
a couple different locations/workstations.  I'm throwing around the idea
of a CVS repository, but am not sure if this is the best way.  Does
anyone have suggestions or advice on how to setup a CVS or RCCS or
something like this?  Web based would be even better.  Just need some
direction on this.  Thanks!!

Jeremy Russell
Network Administrator, CNI
580.235.2377

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



RE: [PHP] Need advice, hopefully on topic.

2003-10-10 Thread Jeremy Russell
I a newbie to cvs itself.  I'll take a look at the link Thanks!

> -Original Message-
> From: Mike Migurski [mailto:[EMAIL PROTECTED]
> Sent: Friday, October 10, 2003 2:41 PM
> To: Jeremy Russell
> Cc: [EMAIL PROTECTED]
> Subject: Re: [PHP] Need advice, hopefully on topic.
> 
> > I got this project, I'm writing it in PHP of course.  What I
would
> >like to do is create a simple an efficient way to work on it from a
> >couple different locations/workstations.  I'm throwing around the
idea of
> >a CVS repository, but am not sure if this is the best way.  Does
anyone
> >have suggestions or advice on how to setup a CVS or RCCS or something
> >like this?  Web based would be even better.  Just need some direction
on
> >this.  Thanks!!
> 
> CVS rocks the house.
> If you're completely new to it, I have a quick introduction to it at
> http://www.evolt.org/article/A_brief_introduction_to_CVS/21/60153/
> 
> If you've used it before, I can write more about how it can be used in
> specific circumstances. I never start a project without starting a
> repository someplace, and a combination of CVS and Make have really
helped
> me out with a lot of projects.
> 
> -mike.
> 
> -
> 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 General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] controlling cvs from php

2003-10-10 Thread Jeremy Andrews
Hello,

  I'm trying to login to a cvs repository and upload/download files from a
php script utilizing the 'cvs' command.  I'm trying to avoid the use of
external libraries, etc...

  Is it possible to do this with popen, or more likely with proc_open? 
I'd prefer to do it with the former so as to not require PHP 4.3+, but in
my testing I've been unable to do it with either command.

  I've looked through the examples of using proc_open at php.net, but have
been unable to translate these into a script that simply logs into cvs. 
The return code from proc_close is always 1, and the best I've gotten is
an error saying "used empty password; try 'cvs login' with a real
password".

  Any pointers into how I can make this work would be greatly
appreciated!!

Here's roughly what I'm trying to do:

--

  $dspec = array(
0 => array("pipe", "r"), // standard in
1 => array("pipe", "w"), // standard out
  );

  $proc = proc_open("/usr/local/bin/cvs -d pserver:@my.server:/home/cvs
login 2>&1", $dspec, $pipes);

  if(is_resource($proc)) {
$output .= fgets($pipes[1], 1024);
$output .= fgets($pipes[1], 14);
fclose($pipes[1]);

if (!fwrite($pipes[0], "cvspassword")) {
  echo "Error...";
  exit;
    } 
fclose($pipes[0]);

echo proc_close($proc);
$output .= "command returned $return_value\n";
  }

--

Thanks,
 -Jeremy

-- 
 Jeremy Andrews<mailto:[EMAIL PROTECTED]>
 PGP Key ID: 8F8B617A  http://www.kerneltrap.org/

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



[PHP] SQL security

2003-10-17 Thread Jeremy Russell
Hello list,

   I was just sitting here thinking how to secure my php code and
thought I would run it by the pros.  I don't know what the standard
practice is to secure against sql injection and malformed information
passed from forms.  This probably has been done several times I just
would like to know if I should do it this way or if there is a better
way.

What I though to do is create a function that simply went through a
variable and removed the quotes.  Something that could be used when
pulling the variables from the form right of the bat. i.e.

$form_var = secure($_POST['var'];

after that just do everything else as normal.

So I just really looking for advice on securing my web app.

BTW:  any body heard of or use Cisco's VMPS?

Jeremy Russell
Network Administrator, CNI
580.235.2377

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



RE: [PHP] What's a good regex to validate an email address? ;)

2003-10-17 Thread Jeremy Russell
[EMAIL PROTECTED](net|com|org|gov|...)

or

[EMAIL PROTECTED]

Will get nearly everything that resembles an email address.  

[EMAIL PROTECTED]  would even go through the second one.

Best thing to do maybe is try to send a email to the address to verify
it.

> -Original Message-
> From: Daevid Vincent [mailto:[EMAIL PROTECTED]
> Sent: Thursday, October 16, 2003 9:19 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] What's a good regex to validate an email address? ;)
> 
> Not PHP, but in js, I use this:
> 
> function emailCheck(str) {
>   var at="@"
>   var dot="."
>   var lat=str.indexOf(at)
>   var lstr=str.length
>   var ldot=str.indexOf(dot)
>   if (str.indexOf(at)==-1){
>  return false
>   }
> 
>   if (str.indexOf(at)==-1 || str.indexOf(at)==0 ||
> str.indexOf(at)==lstr){
>  return false
>   }
> 
>   if (str.indexOf(dot)==-1 || str.indexOf(dot)==0 ||
> str.indexOf(dot)==lstr){
>   return false
>   }
> 
>if (str.indexOf(at,(lat+1))!=-1){
>   return false
>}
> 
>if (str.substring(lat-1,lat)==dot ||
> str.substring(lat+1,lat+2)==dot){
>   return false
>}
> 
>if (str.indexOf(dot,(lat+2))==-1){
>   return false
>}
> 
>if (str.indexOf(" ")!=-1){
>   return false
>}
> 
>return true
> }
> 
> Daevid Vincent
> http://daevid.com
> 
> 
> > -Original Message-
> > From: John W. Holmes [mailto:[EMAIL PROTECTED]
> > Sent: Wednesday, October 15, 2003 9:29 PM
> > To: php list
> > Subject: [PHP] What's a good regex to validate an email address? ;)
> >
> > Heh... I was adding a note to the PHP Manual and I thought it
> > was really
> > funny they had to include this note in the "rules":
> >
> >   (And if you're posting an example of validating email addresses,
> > please don't bother. Your example is almost certainly wrong for some
> > small subset of cases. See this information from O'Reilly Mastering
> > Regular Expressions book for the gory details.)
> >
> > lol...
> >
> > The link is http://examples.oreilly.com/regex/readme.html in
> > case anyone
> > is interested...
> >
> > --
> > ---John Holmes...
> >
> > Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/
> >
> > php|architect: The Magazine for PHP Professionals - www.phparch.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



RE: [PHP] What's a good regex to validate an email address? ;)

2003-10-17 Thread Jeremy Russell
No...  I replied to a  reply think it was the original... :/

Doh!!

> -Original Message-
> From: CPT John W. Holmes [mailto:[EMAIL PROTECTED]
> Sent: Friday, October 17, 2003 2:48 PM
> To: Jeremy Russell; Daevid Vincent; [EMAIL PROTECTED]
> Subject: Re: [PHP] What's a good regex to validate an email address?
;)
> 
> From: "Jeremy Russell" <[EMAIL PROTECTED]>
> 
> 
> > Will get nearly everything that resembles an email address.
> 
> Holy crap, batman... did you even read the original message?
> 
> ---John Holmes...
> 
> > > -Original Message-
> > > From: John W. Holmes [mailto:[EMAIL PROTECTED]
> > > Sent: Wednesday, October 15, 2003 9:29 PM
> > > To: php list
> > > Subject: [PHP] What's a good regex to validate an email address?
;)
> > >
> > > Heh... I was adding a note to the PHP Manual and I thought it
> > > was really
> > > funny they had to include this note in the "rules":
> > >
> > >   (And if you're posting an example of validating email addresses,
> > > please don't bother. Your example is almost certainly wrong for
some
> > > small subset of cases. See this information from O'Reilly
Mastering
> > > Regular Expressions book for the gory details.)
> > >
> > > lol...

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



RE: [PHP] removing all duplicate values from an array

2003-10-30 Thread Jeremy Russell


> -Original Message-
> From: Mike Migurski [mailto:[EMAIL PROTECTED]
> Sent: Thursday, October 30, 2003 1:37 PM
> To: Allowee
> Cc: [EMAIL PROTECTED]
> Subject: Re: [PHP] removing all duplicate values from an array
> 
> >>I'm looking for a function that does almost the same as
array_unique()
> >>
> >>But it must also delete the other duplicate entry.
> >
> >
> >Untested pseudo-PHP follows -
> >
> > $encountered_elements = array();
> > foreach($original_array as $key => $val)
> > if(in_array($val, $encountered_elements)) {
> > unset($original_array[$key]);
> > } else {
> > $encountered_elements[$key] = $val;
> > }
> 
> Oops, that should have been:
> 
>$encountered_elements = array();
>foreach($original_array as $key => $val)
>if(in_array($val, $encountered_elements)) {
>   unset($original_array[$encountered_elements[$val]]);
>} else {
>$encountered_elements[$val] = $key;
>}
> 
> 

I was running Allowee's example array..

array(
'a' => 'one',
'b' => 'one',
'c' => 'zero',
'd' => 'two'
);

through this and am having a hind time with then logic...  Could you
explain how the output would be array('c' => 'zero', 'd' => 'two')??

Thanks

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



[PHP] Re: Issues with Mysql 4.0 and PHP in a production environment

2003-11-06 Thread Jeremy Zawodny
On Thu, Nov 06, 2003 at 02:10:27PM -0600, Luis Lebron wrote:
> Are there any issues with running PHP 4.3.X and Mysql 4.0 in a production
> environment?

What sort of "issues" are you looking for?

Jeremy
-- 
Jeremy D. Zawodny |  Perl, Web, MySQL, Linux Magazine, Yahoo!
<[EMAIL PROTECTED]>  |  http://jeremy.zawodny.com/

MySQL 4.0.15-Yahoo-SMP: up 53 days, processed 2,012,977,736 queries (432/sec. avg)

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



[PHP] RE: Changing case

2003-11-14 Thread Jeremy Shovan


Use the strtoupper() function

$var = strtoupper($var);

-Original Message-
From: Robert Sossomon [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, November 12, 2003 8:29 AM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: Changing case

I have a form that allows for an item to be entered, the other pieces
have been fixed so far that were bogging me down, but now I am looking
for a way to convert any entry in the form to be UPPER case so that when
the quote is listed, they are alphabetical.  

The problem is if someone enters aa-1234 and the other items in the
quote are FF-2345 and QQ-3456 then the aa-1234 is UNDER them, instead of
on top.

/
//
//   Store.php
//
/
/*
  The following code allows for the addition of a non-stock item.  All
information is added automatically to the quoter for the salesman.
*/

$display_block .= "Input a new item: Item ID:Description:Quantity: ";
$display_block .= "01";
for ($i=2; $i < 301; $i++){
 $display_block .= "$i";
}
$display_block .= "Price:";


/
//
//  addspec.php
//
/
if ($_POST[sel_item_qty] != "0")
{
 if($_POST[sel_item_id] != "")
 {   
   //add info to cart table
   $addtocart = "insert into store_shoppertrack
values('','$_POST[SESSID]','$_POST[sel_item_id]','$_POST[sel_item_qty]',
'$_POST[sel_item_price]','$_POST[sel_item_desc]', now())";
  
   mysql_query($addtocart);
  
   //redirect to showcart page
   header("Location:$_POST[url]");
   exit;
 } else {
  //send them somewhere else
  header("Location:ohcrud.php");
  exit;
 }
} else {
  //print message
  $display_block .= "You must select a Quantity. Please continue to shop!";
 } 


TIA!!

Robert

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



Re: [PHP] Re: progress in PHP

2003-12-23 Thread Jeremy Johnstone
FWIW, here is a link to a PHP extension which enables the ability to
track the progress of a PHP upload. I did not write the extension, so if
it breaks something I am not responsible. It was previously discussed on
the php-dev mailing list ([EMAIL PROTECTED]) a month or two ago,
but it was never decided if it would be officially added into PHP.

http://pdoru.from.ro/

-Jeremy

On Tue, 2003-12-23 at 23:15, Manuel Lemos wrote:

> Hello,
> 
> On 12/23/2003 03:56 PM, Larry Brown wrote:
> > How does perl show progress of the upload if it is a server side scripting
> > language and php can't do it because it is server side?
> 
> The problem is not showing progress but rather tracking progress.
> 
> What you seem to not be understanding is that PHP handles uploads 
> internally. So, by the time a PHP script that gets the submitted upload 
> form starts running, the upload was already ended and the uploaded files 
> were copied to some temporary files.
> 
> PHP itself does not give you a chance to track the progress of the 
> upload because that is something handled at the HTTP request level.
> 
> The Perl solution is based on a script that handles and tracks the 
> upload and another that shows the progress. That is why you need to show 
> progress in a popup or a separate frame.
> 
> 
> > -Original Message-
> > From: Manuel Lemos [mailto:[EMAIL PROTECTED]
> > Sent: Tuesday, December 23, 2003 12:46 PM
> > To: [EMAIL PROTECTED]
> > Subject: Re: [PHP] Re: progress in PHP
> > 
> > 
> > Hello,
> > 
> > On 12/23/2003 03:31 PM, James Kaufman wrote:
> > 
> >>>>Join the 11,000 people who use megaupload progress bar (with a little
> >>>>help from perl)
> >>>>http://www.sourceforge.net/projects/megaupload/
> >>>
> >>>I tried. It wasn't worth all the perl mods I would to have had to
> >>>install to make it work.
> >>
> >>
> >>Check out http://pear.laurent-laville.org/HTML_Progress/. It is a pure
> >>php approach to displaying a progress bar. I haven't used it, but the
> > 
> > demos
> > 
> >>look good.
> > 
> > 
> > This a different thing. This is meant to track progress of server side
> > tasks. File uploading is a client side task.
> > 
> > Unfortunately, AFAIK there is no way to handle streams of HTTP requests.
> > Therefore, there is no way to handle upload progress with a PHP only
> > solution.
> > 
> > The Raditha megaupload solution is based on a combination of Perl with
> > PHP. It is probably the solution that uses more PHP but the hard work is
> > done using Perl.
> 
> 
> -- 
> 
> Regards,
> Manuel Lemos
> 
> Free ready to use OOP components written in PHP
> http://www.phpclasses.org/


Re: [PHP] How New Is <<

2003-12-25 Thread Jeremy Johnstone
AFAIK, it has been in PHP since the beginning of PHP4. I could be wrong,
but I think it was one of the new features added when 4.0 came out. Here
is a little reference material for you on it.

http://www.php.net/manual/en/language.types.string.php#language.types.string.syntax.heredoc

Without seeing a code snippet, I can't tell you what your doing wrong.
Probably something simple, but hopefully the document above will help
you. Another resource which gives a decent guide to HEREDOC's is the
fairly new book "Core PHP Programming Third Edition". It's been a while
since I read it, but if memory serves it has atleast a page or two on
it's usage. I also highly recommend that book anyway to any PHP
programmer, beginner all the way to highly advanced. I thought I knew
almost everything about PHP and even I still learned about a new
function or two from the book. Very worthwhile.

Jeremy

On Thu, 2003-12-25 at 12:44, [EMAIL PROTECTED] wrote:
> I'm running PHP version 4.3.0 on a Macintosh PowerBook with OS 10.2.1,
> doing some PHP tutorial exercises. And I've run across something I haven't
> seen before in the sample code I'm seeing:
> 
>print <<[multiple lines of code]
>HERE;
> 
> Now, from what I've read, it seems that the point of "<< to execute all the code between the two "HEREs".
> 
> But when I run this thru my browsers--Netscape 7.02 and IE 5.2--I get the
> following error message:
> 
>Parse error: parse error, unexpected $ in [path to file] [line number]
> 
> Is this "<< I'm just out of luck unless I upgrade?
> 
> Thank you.
> 
> Steve Tiano
> 
> 
> 
> mail2web - Check your email from the web at
> http://mail2web.com/ .

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



Re: [PHP] Re: Can't upload files > then 400K to MySQL

2003-12-29 Thread Jeremy Johnstone
Might want to check the MySQL configuration. The max allowed packet size
might be set extremely low.

-Jeremy

On Mon, 2003-12-29 at 15:25, Chris wrote:
> Have you taken a look at the post below: Can't upload files Greater than
> 11KB?
> We may have the same problem.
> 
> 
> "Ahmetax" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
> > Hi,
> >
> > I have the following PHP code to upload files to a MySQL table.
> >
> > It works fine, but, I can't upload any files greater then 400K.
> >
> > What might be the problem?
> >
> > TIA
> >
> > ahmet
> >
> >  > if (isset($_POST["submit"]))
> > {
> > $fname= $_FILES["user_file"]["name"];
> > $tmp= addslashes($_FILES["user_file"]["tmp_name"]);
> > $size= $_FILES["user_file"]["size"];
> > $type=$_FILES["user_file"]["type"];
> > $tanim=$_FILES["user_file"]["file_desc"];
> > $fd=fopen($tmp,"r") or die("Can't open file!");
> > $fdata=urlencode(fread($fd,filesize($tmp)));
> > $size=filesize($tmp);
> > $tanim=$descript;
> > include("baglan.inc");
> >
> > mysql_select_db("dosyalar");
> > $sql="INSERT INTO files (name,file_type,file_desc,file_data,file_size)".
> > " VALUES('$fname','$type','$descr','$fdata','$size')";
> > mysql_query($sql);
> > }
> > ?>
> > 
> > 
> > 
> > AxTelSoft-Uploading a file 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> >
> > " method="post">
> > 
> >
> > Send this file: 
> > Explanations :  > echo($descr);
> > ?>
> > 
> > 
> >
> > 
> > 

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



[PHP] A hint...

2003-12-30 Thread Jeremy Russell
Hello list..

I was needing  a small hint on how to make a sort of status page...

What I have is a function that takes a few minutes to complete...

It send an snmp signal out then waits a bit and then gets the status via
snmp.   

I would like to have some sort of graphic or page for the status, e.g.
Percent done, a flashing waiting or something.


How might I do this?

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



[PHP] pure PHP implementation of GNU diff/patch functionality

2003-12-31 Thread Jeremy Johnstone
Has anyone ever seen a class which will allow most (if not all) the
functionality of the diff/patch unix tools purely in PHP? I am looking
for the ability to create a standard unified diff of the difference
between two files, and also the ability to take a diff and apply it to a
file. As mentioned previously, I am looking to do this purely in PHP
(and without any custom extensions). If anyone has any sources, I would
greatly appreciate it.

-Jeremy

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



Re: [PHP] Please help on session_destroy error...

2004-01-01 Thread Jeremy Johnstone
You problem is probably right here:

session.gc_maxlifetime = 1800

That sets the garbage collection timeout to 30 minutes... 

Per the manual:

session.gc_maxlifetime specifies the number of seconds after which data
will be seen as 'garbage' and cleaned up.

It is not "strictly" followed, but PHP does it's best to destroy data
after that timeout elapses. This would explain why sometimes you can
last an hour without getting the error. If you want your timeout to be 3
hours, then I would set that value to something like 11,000 (which is
just a little over 3 hours).

-Jeremy

On Thu, 2004-01-01 at 19:30, Tim Meader wrote:
> I'm looking for help trying to do away with an error I get from time to 
> time in my access control session logic. Here is my session setup from the 
> php.ini:
> 
> session.save_handler = files
> session.save_path = /tmp
> session.use_cookies = 1
> session.use_only_cookies = 1
> session.name = PHPSESSID
> session.auto_start = 0
> session.cookie_lifetime = 0
> session.cookie_path = /
> session.cookie_domain = gsfc.nasa.gov
> session.cookie_secure = On
> session.serialize_handler = php
> session.gc_probability = 100
> session.gc_maxlifetime = 1800
> session.bug_compat_42 = 0
> session.bug_compat_warn = 1
> session.referer_check =
> session.entropy_length = 32
> session.entropy_file = /dev/urandom
> session.cache_limiter =
> session.cache_expire = 180
> session.use_trans_sid = 0
> 
> Now, to my understanding, with this setup, the session cookie should be 
> good for as long as the browser is open, the garbage collector will be run 
> on any session startup, and a session should be considered garbage after 3 
> hours.  My problem is that these settings don't always seem to be followed. 
> Even after sitting for only 60 minutes sometimes, if I click on the logout 
> button in my interface (which executes the following code), I get a 
> session_destroy error, about it the session being called for destruction 
> not being found
> 
>  if ((!empty($_GET['action'])) && ($_GET['action'] == "logout")) {
>  session_unset();
>  if (!empty($_SESSION['logged_in'])) {
>  session_destroy();
>  }
>   }
> 
> The only other code is simple HTML output. The session variable "logged_in" 
> is set upon successful login initially. My rationale for that variable is 
> that if the session file gets removed via the garbage collector, then that 
> check above should fail, and the session_destroy function won't be called. 
> But this doesn't seem to ever work. Is there anything I'm missing here? Any 
> help would be appreciated. This is all running on Apache 1.3.29, using 
> Redhat 8 with all current updates, and PHP 4.3.4.
> 
> Thanks in advance for any help you may have.
> 
> 
> 
> 
> ---
> Tim Meader
> CNE ODIN Unix Group
> Lockheed Martin Information Technologies
> [EMAIL PROTECTED]
> (301) 286-8013  

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



RE: [PHP] Is this code right?

2004-01-19 Thread Jeremy Davis

>$query = "SELECT Serial, Password from accounts where
UserName='$UserName'";
>$result = mysql_query($query) or die("Query errort: " . mysql_error());
>$row = mysql_fetch_row($result) or die("User Not found: " . mysql_error());

mysql_fetch_row only pulls data one cell at a time so you would need to call
$row[0] twice to get the two cells before calling the next row.


>$Serial = htmlspecialchars($row[0]);
>
>
mysql_select_db is for selecting the database and NOT the table, the
SELECT statement must be something like this: "select SOMETHING from
TABLE where WHERE_CLAUSE"

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



RE: [PHP] looking for a PHP editor

2001-01-10 Thread jeremy brand

> Now only if a php-tidy existed ...

Agreed.  I've often thought about hacking 'indent' to recognice PHP
syntax, but I never get around to it.  Does anyone know if someone has
done this already?

Jeremy

Jeremy Brand :: Sr. Software Engineer :: 408-245-9058 :: [EMAIL PROTECTED]
http://www.JeremyBrand.com/Jeremy/Brand/Jeremy_Brand.html for more 
Get your own Free, Private email at http://www.smackdown.com/
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
   ""   -- Quoted from Yahoo! homepage, http://www.yahoo.com


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




Re: [PHP] variables not being passes between php pages

2001-01-10 Thread jeremy brand

This is true, but not complete.  You can also do  
> Well if you aren't posting to your add.php page (ie method="post" 
> action="add.php") then you need to pass them via the add.php?var=foo&varb=bar 
> method. 
> 
> --Joe
> 
> 
> On Wed, Jan 10, 2001 at 12:02:54PM -0800, jeff fitzmyers wrote:
> > I am working on the nice tutorial at
> > http://designmagick.50megs.com/postgresql-tutorial/ 
> > 
> > I have my test.php and add.php pages created and just
> > can't seem to pass variables to the add.php page
> > -- not even simple things like $user!
> > 
> > phpinfo() shows HTTP_POST_VARS["firstname"] = Jeff so
> > php knows about the vaariables but
> > doesn't seem to tell the new page.
> > 
> > What am I doing wrong??
> > 
> > __
> > Do You Yahoo!?
> > Yahoo! Photos - Share your holiday photos online!
> > http://photos.yahoo.com/
> > 
> > -- 
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> 
> ---
> Joe Stump
> PHP Programmer
> www.Care2.com
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
> 
> 


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




Re: [PHP] constants inside of a string

2001-01-10 Thread jeremy brand

> define(MAX,2);
> print  "the max is MAX";
> 
> this obv does not work

print "the max is " . MAX;


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




Re: [PHP] constants inside of a string

2001-01-10 Thread jeremy brand

No.

Jeremy Brand :: Sr. Software Engineer :: 408-245-9058 :: [EMAIL PROTECTED]
http://www.JeremyBrand.com/Jeremy/Brand/Jeremy_Brand.html for more 
Get your own Free, Private email at http://www.smackdown.com/
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
   ""   -- Quoted from Yahoo! homepage, http://www.yahoo.com

On Wed, 10 Jan 2001, jeff saenz wrote:

> Date: Wed, 10 Jan 2001 12:21:01 -0800
> From: jeff saenz <[EMAIL PROTECTED]>
> To: Joe Stump <[EMAIL PROTECTED]>
> Cc: [EMAIL PROTECTED]
> Subject: Re: [PHP] constants inside of a string
> 
> what about inside of a here doc
> 
> print << this is the MAX
> HERE
> 
> Joe Stump wrote:
> 
> > print "the max is ".MAX;
> >
> > --Joe
> >
> > On Wed, Jan 10, 2001 at 12:12:08PM -0800, jeff saenz wrote:
> > > how do you use defines inside of a string...
> > >
> > > e.g.
> > >
> > > define(MAX,2);
> > > print  "the max is MAX";
> > >
> > > this obv does not work
> > >
> > > jeff
> > >
> > >
> > > --
> > > PHP General Mailing List (http://www.php.net/)
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> >
> > ---
> > Joe Stump
> > PHP Programmer
> > www.Care2.com
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
> 
> 


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




Re: [PHP] pause

2001-01-10 Thread jeremy brand

You could use custom HTML meta content refresh tags.  This is not a
PHP think, but an HTML thing.

Jeremy Brand :: Sr. Software Engineer :: 408-245-9058 :: [EMAIL PROTECTED]
http://www.JeremyBrand.com/Jeremy/Brand/Jeremy_Brand.html for more 
Get your own Free, Private email at http://www.smackdown.com/
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
   ""   -- Quoted from Yahoo! homepage, http://www.yahoo.com

On Wed, 10 Jan 2001, Robert Ludvik wrote:

> Date: Wed, 10 Jan 2001 21:18:38 +0100
> From: Robert Ludvik <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED]
> Subject: [PHP] pause
> 
> hi
> i know i've noticed somewhere something about how to implement a Pause in PHP -
> I mean, if ie.a user inputs a wrong number, the script says "Oh no, it's
> wrong", waits a few seconds and redirects her back to input form. i know i could
> say to him "hit a Back button...", just wondering if something lika Pause
> exists. i've searched php.net and zend.com but found nothing useful.
> thanks
> Bobe
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
> 
> 


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




RE: [PHP] pause

2001-01-10 Thread jeremy brand

Funny, I would say forget javascript; I don't trust client side
validation.  

:)  Just my two cents.

Jeremy 

Jeremy Brand :: Sr. Software Engineer :: 408-245-9058 :: [EMAIL PROTECTED]
http://www.JeremyBrand.com/Jeremy/Brand/Jeremy_Brand.html for more 
Get your own Free, Private email at http://www.smackdown.com/
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
   ""   -- Quoted from Yahoo! homepage, http://www.yahoo.com


> don't forget javascript!
> 
> you could validate the form before posting to php.
> 
> DanO
> 
> 
> -Original Message-
> From: jeremy brand [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, January 10, 2001 1:18 PM
> To: Robert Ludvik
> Cc: [EMAIL PROTECTED]
> Subject: Re: [PHP] pause
> 
> 
> You could use custom HTML meta content refresh tags.  This is not a
> PHP think, but an HTML thing.
> 
> Jeremy Brand :: Sr. Software Engineer :: 408-245-9058 :: [EMAIL PROTECTED]
> http://www.JeremyBrand.com/Jeremy/Brand/Jeremy_Brand.html for more
> Get your own Free, Private email at http://www.smackdown.com/
> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
>""   -- Quoted from Yahoo! homepage, http://www.yahoo.com
> 
> On Wed, 10 Jan 2001, Robert Ludvik wrote:
> 
> > Date: Wed, 10 Jan 2001 21:18:38 +0100
> > From: Robert Ludvik <[EMAIL PROTECTED]>
> > To: [EMAIL PROTECTED]
> > Subject: [PHP] pause
> >
> > hi
> > i know i've noticed somewhere something about how to implement a Pause in
> PHP -
> > I mean, if ie.a user inputs a wrong number, the script says "Oh no, it's
> > wrong", waits a few seconds and redirects her back to input form. i know i
> could
> > say to him "hit a Back button...", just wondering if something lika Pause
> > exists. i've searched php.net and zend.com but found nothing useful.
> > thanks
> > Bobe
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> >
> >
> 
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
> 
> 


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




Re: [PHP] php binary?

2001-01-11 Thread jeremy brand

> > I would like to have a serer with static pages and recreate them using xml/html 
>every time there is a change...

/.  :)

Yes, just compile PHP4 into your cgi binary.  If you have php 3 on
your system, name the binary php4 (for no better reason that so you
don't over write your php 3 binary).

You would just run it like this:

/usr/local/bin/php4 -q your_script.php > your_output_file.html

Jeremy 

Jeremy Brand :: Sr. Software Engineer :: 408-245-9058 :: [EMAIL PROTECTED]
http://www.JeremyBrand.com/Jeremy/Brand/Jeremy_Brand.html for more 
Get your own Free, Private email at http://www.smackdown.com/
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
   ""   -- Quoted from Yahoo! homepage, http://www.yahoo.com


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




Re: [PHP] PHP3 vs PHP4?

2001-01-11 Thread jeremy brand

PHP3's strenghts:
GPL'ed (or PHP3 license -- at your choice)

PHP4's strengths:
Faster (way faster)
Garbage collection that works
More functions -- bigger language
Actively being developed

These are just of the top of my head...

Jeremy

Jeremy Brand :: Sr. Software Engineer :: 408-245-9058 :: [EMAIL PROTECTED]
http://www.JeremyBrand.com/Jeremy/Brand/Jeremy_Brand.html for more 
Get your own Free, Private email at http://www.smackdown.com/
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
   ""   -- Quoted from Yahoo! homepage, http://www.yahoo.com

On Thu, 11 Jan 2001, ncook wrote:

> Date: Thu, 11 Jan 2001 14:15:56 -0700
> From: ncook <[EMAIL PROTECTED]>
> To: Php List <[EMAIL PROTECTED]>
> Subject: [PHP] PHP3 vs PHP4?
> 
> Which is better php3 or php4?  Why?  Are there pluses and minuses to each?
> 
> Does php4 offer features that are useful for everyday web scripting?
> 
> ---
> .:: Nathan Cook
> office:  208.343.3110
> email:   [EMAIL PROTECTED]
> pager:  208.387.9983
> ---
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
> 
> 


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




Re: [PHP] load balancing with php/apache?

2001-01-13 Thread jeremy brand

> > We use LVS on our website - it works great! We have 2 load balancers with the
> > HA package and 6 PHP webservers running behind it (with a central DB server).
> 
> Yes, I have heard very good things about LVS.  Haven't had a chance to set
> it up myself yet.  Definitely something for the TODO list.

LVS with linux-ha is a win-win situation.  Even if you loose a LVS,
the failover is transparent. The connections hang for about 5-15
seconds, then transfer over to the other machine.

With the traffic that we have, we opted to use direct
routing, this way there is no translation (thus no additional CPU on
the LVS machine) needed for the answers; the web servers talk directly
back to the client themselves.

We were planning on using Local Directors, then cost became a major
issue.  I'm actually glad we did it this way, because personally I
like envesting my knowledge in open solutions rather than learning
proprietary OSs and strategies.

Jeremy

Jeremy Brand :: Sr. Software Engineer :: 408-245-9058 :: [EMAIL PROTECTED]
http://www.JeremyBrand.com/Jeremy/Brand/Jeremy_Brand.html for more 
Get your own Free, Private email at http://www.smackdown.com/
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
   ""   -- Quoted from Yahoo! homepage, http://www.yahoo.com


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




RE: [PHP] load balancing with php/apache?

2001-01-13 Thread jeremy brand

We have a centralized DB server.  Sessions are handled by us, the
programmers, not the cluster.

Jeremy

Jeremy Brand :: Sr. Software Engineer :: 408-245-9058 :: [EMAIL PROTECTED]
http://www.JeremyBrand.com/Jeremy/Brand/Jeremy_Brand.html for more 
Get your own Free, Private email at http://www.smackdown.com/
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
   ""   -- Quoted from Yahoo! homepage, http://www.yahoo.com

On Sat, 13 Jan 2001, Cal Evans wrote:

> Date: Sat, 13 Jan 2001 11:51:01 -0600
> From: Cal Evans <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED]
> Subject: RE: [PHP] load balancing with php/apache?
> 
> How does it deal with sessions? Or do use store sessions in the database?
> 
> Cal
> 
> -Original Message-
> From: Joe Stump [mailto:[EMAIL PROTECTED]]
> Sent: Saturday, January 13, 2001 11:22 AM
> To: Rasmus Lerdorf
> Cc: [EMAIL PROTECTED]
> Subject: Re: [PHP] load balancing with php/apache?
> 
> 
> > http://www.linuxvirtualserver.org/
> 
> We use LVS on our website - it works great! We have 2 load balancers with
> the
> HA package and 6 PHP webservers running behind it (with a central DB
> server).
> 
> In short, it's possible and works quite well. BTW We user FreeBSD for
> webservers
> if that's any help (though linux, NT, solaris, etc would all work)
> 
> --Joe
> 
> 
> 
> 
> > http://linas.org/linux/load.html
> >
> > -Rasmus
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> 
> --
> 
> Joe Stump, PHP Hacker
> [EMAIL PROTECTED]
> http://www.miester.org/
> 
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
> 
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
> 
> 


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




RE: [PHP] load balancing with php/apache?

2001-01-13 Thread jeremy brand

we store the sessions in the DB.

Jeremy Brand :: Sr. Software Engineer :: 408-245-9058 :: [EMAIL PROTECTED]
http://www.JeremyBrand.com/Jeremy/Brand/Jeremy_Brand.html for more 
Get your own Free, Private email at http://www.smackdown.com/
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
   ""   -- Quoted from Yahoo! homepage, http://www.yahoo.com

On Sat, 13 Jan 2001, Cal Evans wrote:

> Date: Sat, 13 Jan 2001 14:43:19 -0600
> From: Cal Evans <[EMAIL PROTECTED]>
> To: jeremy brand <[EMAIL PROTECTED]>
> Cc: [EMAIL PROTECTED]
> Subject: RE: [PHP] load balancing with php/apache?
> 
> When you say "handled by us" do you mean you:
> 
> 1) Write the sess_* files to a shared drive
> 2) Store them in the database
> 3) ignore them totally, who needs users anyhow?
> 4) some other option?
> 
> Cal
> http://www.calevans.com
> 
> 
> -Original Message-
> From: jeremy brand [mailto:[EMAIL PROTECTED]]
> Sent: Saturday, January 13, 2001 2:20 PM
> To: Cal Evans
> Cc: [EMAIL PROTECTED]
> Subject: RE: [PHP] load balancing with php/apache?
> 
> 
> We have a centralized DB server.  Sessions are handled by us, the
> programmers, not the cluster.
> 
> Jeremy
> 
> Jeremy Brand :: Sr. Software Engineer :: 408-245-9058 :: [EMAIL PROTECTED]
> http://www.JeremyBrand.com/Jeremy/Brand/Jeremy_Brand.html for more
> Get your own Free, Private email at http://www.smackdown.com/
> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
>""   -- Quoted from Yahoo! homepage, http://www.yahoo.com
> 
> On Sat, 13 Jan 2001, Cal Evans wrote:
> 
> > Date: Sat, 13 Jan 2001 11:51:01 -0600
> > From: Cal Evans <[EMAIL PROTECTED]>
> > To: [EMAIL PROTECTED]
> > Subject: RE: [PHP] load balancing with php/apache?
> >
> > How does it deal with sessions? Or do use store sessions in the database?
> >
> > Cal
> >
> > -Original Message-
> > From: Joe Stump [mailto:[EMAIL PROTECTED]]
> > Sent: Saturday, January 13, 2001 11:22 AM
> > To: Rasmus Lerdorf
> > Cc: [EMAIL PROTECTED]
> > Subject: Re: [PHP] load balancing with php/apache?
> >
> >
> > > http://www.linuxvirtualserver.org/
> >
> > We use LVS on our website - it works great! We have 2 load balancers with
> > the
> > HA package and 6 PHP webservers running behind it (with a central DB
> > server).
> >
> > In short, it's possible and works quite well. BTW We user FreeBSD for
> > webservers
> > if that's any help (though linux, NT, solaris, etc would all work)
> >
> > --Joe
> >
> >
> >
> >
> > > http://linas.org/linux/load.html
> > >
> > > -Rasmus
> > >
> > >
> > > --
> > > PHP General Mailing List (http://www.php.net/)
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> >
> > --
> >
> > Joe Stump, PHP Hacker
> > [EMAIL PROTECTED]
> > http://www.miester.org/
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> >
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> >
> >
> 
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
> 
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
> 
> 


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




RE: [PHP] load balancing with php/apache?

2001-01-13 Thread jeremy brand

Oh, BTW, we don't use PHP sessions, we use our own.  

Jeremy

Jeremy Brand :: Sr. Software Engineer :: 408-245-9058 :: [EMAIL PROTECTED]
http://www.JeremyBrand.com/Jeremy/Brand/Jeremy_Brand.html for more 
Get your own Free, Private email at http://www.smackdown.com/
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
   ""   -- Quoted from Yahoo! homepage, http://www.yahoo.com

On Sat, 13 Jan 2001, jeremy brand wrote:

> Date: Sat, 13 Jan 2001 13:44:18 -0800 (PST)
> From: jeremy brand <[EMAIL PROTECTED]>
> To: Cal Evans <[EMAIL PROTECTED]>
> Cc: [EMAIL PROTECTED]
> Subject: RE: [PHP] load balancing with php/apache?
> 
> we store the sessions in the DB.
> 
> Jeremy Brand :: Sr. Software Engineer :: 408-245-9058 :: [EMAIL PROTECTED]
> http://www.JeremyBrand.com/Jeremy/Brand/Jeremy_Brand.html for more 
> Get your own Free, Private email at http://www.smackdown.com/
> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
>""   -- Quoted from Yahoo! homepage, http://www.yahoo.com
> 
> On Sat, 13 Jan 2001, Cal Evans wrote:
> 
> > Date: Sat, 13 Jan 2001 14:43:19 -0600
> > From: Cal Evans <[EMAIL PROTECTED]>
> > To: jeremy brand <[EMAIL PROTECTED]>
> > Cc: [EMAIL PROTECTED]
> > Subject: RE: [PHP] load balancing with php/apache?
> > 
> > When you say "handled by us" do you mean you:
> > 
> > 1) Write the sess_* files to a shared drive
> > 2) Store them in the database
> > 3) ignore them totally, who needs users anyhow?
> > 4) some other option?
> > 
> > Cal
> > http://www.calevans.com
> > 
> > 
> > -Original Message-
> > From: jeremy brand [mailto:[EMAIL PROTECTED]]
> > Sent: Saturday, January 13, 2001 2:20 PM
> > To: Cal Evans
> > Cc: [EMAIL PROTECTED]
> > Subject: RE: [PHP] load balancing with php/apache?
> > 
> > 
> > We have a centralized DB server.  Sessions are handled by us, the
> > programmers, not the cluster.
> > 
> > Jeremy
> > 
> > Jeremy Brand :: Sr. Software Engineer :: 408-245-9058 :: [EMAIL PROTECTED]
> > http://www.JeremyBrand.com/Jeremy/Brand/Jeremy_Brand.html for more
> > Get your own Free, Private email at http://www.smackdown.com/
> > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
> >""   -- Quoted from Yahoo! homepage, http://www.yahoo.com
> > 
> > On Sat, 13 Jan 2001, Cal Evans wrote:
> > 
> > > Date: Sat, 13 Jan 2001 11:51:01 -0600
> > > From: Cal Evans <[EMAIL PROTECTED]>
> > > To: [EMAIL PROTECTED]
> > > Subject: RE: [PHP] load balancing with php/apache?
> > >
> > > How does it deal with sessions? Or do use store sessions in the database?
> > >
> > > Cal
> > >
> > > -Original Message-
> > > From: Joe Stump [mailto:[EMAIL PROTECTED]]
> > > Sent: Saturday, January 13, 2001 11:22 AM
> > > To: Rasmus Lerdorf
> > > Cc: [EMAIL PROTECTED]
> > > Subject: Re: [PHP] load balancing with php/apache?
> > >
> > >
> > > > http://www.linuxvirtualserver.org/
> > >
> > > We use LVS on our website - it works great! We have 2 load balancers with
> > > the
> > > HA package and 6 PHP webservers running behind it (with a central DB
> > > server).
> > >
> > > In short, it's possible and works quite well. BTW We user FreeBSD for
> > > webservers
> > > if that's any help (though linux, NT, solaris, etc would all work)
> > >
> > > --Joe
> > >
> > >
> > >
> > >
> > > > http://linas.org/linux/load.html
> > > >
> > > > -Rasmus
> > > >
> > > >
> > > > --
> > > > PHP General Mailing List (http://www.php.net/)
> > > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> > >
> > > --
> > >
> > > Joe Stump, PHP Hacker
> > > [EMAIL PROTECTED]
> > > http://www.miester.org/
> > >
> > >
> > > --
> > > PHP General Mailing List (http://www.php.net/)
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> > >
> > >
> > >
> > > --
> > > PHP General Mailing List (http://www.php.net/)
> > &

Re: [PHP] problem using flock()

2001-01-13 Thread jeremy brand

Hello 10,000 Screaming Monkeys,
(Sorry, I couldn't resist!)

You should test the return value of flock(), not just run it.  It is
designed to tell you whether or not something is safe to do, and since
you are not testing the result, you are simply ignoring what it is
trying to tell you.

I have a small script that uses flock():
http://www.nirvani.net/software/dr-fun/

As you can see, I am testing the result, and taking an action (in this
case, sleeping, then trying again).

Hope this helps.

Jeremy

Jeremy Brand :: Sr. Software Engineer :: 408-245-9058 :: [EMAIL PROTECTED]
http://www.JeremyBrand.com/Jeremy/Brand/Jeremy_Brand.html for more 
Get your own Free, Private email at http://www.smackdown.com/
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
   ""   -- Quoted from Yahoo! homepage, http://www.yahoo.com

On Sat, 13 Jan 2001, 10,000 Screaming Monkeys wrote:

> Date: Sat, 13 Jan 2001 17:54:31 -0600
> From: "10,000 Screaming Monkeys" <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED]
> Subject: [PHP] problem using flock()
> 
> Hi,
> 
> I'm having a problem with one of the PHP scripts I've written and I'm
> hoping someone can point me in the right direction.  The portion of
> the script that is giving me trouble is the locking of, and writing to,
> a logfile (plain text).  I'm using flock() as I understand it and have
> looked at the online manual page for it to no avail...
> 
> What's happening is, under "high" traffic conditions on the website I
> wrote the script for, the logfile is occasionally getting clobbered. I
> tried one of the suggestions on the man page (the one by
> [EMAIL PROTECTED]), but it resulted in the logfile being appended to,
> rather than properly updated as I want.  (better than being clobbered,
> but rather confusing to cleanup after later...)
> 
> Here is an example snippit of the script.  Can anyone tell me what I
> might be doing wrong, or suggest a better/more efficient way to write
> this?
> 
> 
> if (@fopen($dlfile, "r")) {
> 
>$log_entries = file($download_log);
>$total = count($log_entries);
>$dl_time = time();
> 
>for ($i=0; $total>$i; $i++) {
>   $split = explode("||", $log_entries[$i]);
> 
>   if ($stats_url == $split[1]) {
>  // If the file being downloaded is already in the logfile,
>  // increment the download count and update the $dl_time
> 
>  $fp = fopen($download_log, "r");
>  flock($fp,1);
>  $x = fread($fp, filesize($download_log));
>  fclose($fp);
> 
>  $fp = fopen($download_log, "w");
>  flock($fp,2);
> 
>  // Increment download counter
>  $add = $split[0]+1;
> 
>  // Do the actual update of the download count & latest dl time
>  $x = str_replace("$split[0]||$split[1]||$split[2]||$split[3]||$split[4]||", 
>"$add||$split[1]||$split[2]||$dl_time||$split[4]||", $x);
> 
>  fwrite($fp, $x); 
> 
>  fclose($fp);
>  $write = 1;
>   }
> 
>}
>if ($write != 1) {
> 
>   // The file being downloaded is not in the logfile --
>   // add it now and start its counter at 1
> 
>   $fp = fopen($download_log, "a");
>   flock($fp,2);
>   $fw = fwrite($fp, 
>"1||$stats_url||$dl_time||$dl_time||dir2=$dir2&file=$urlfile||\n");
>   fclose($fp);
> 
>}
> }
> 
> 
> Thanks...I'm desperate...
> 
> - Jamie
> 
> --
> The sweetest cherry in an apple pie
> <[EMAIL PROTECTED]>  (Single purpose Email address)
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
> 
> 


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




[PHP] Escape characters

2001-01-13 Thread Jeremy Bowen

Hey All,

I am sending e-mail using the mail() command. My question is whenever
an ' is used in the e-mail it is escaped like this: don\'t. Is there any way to
prevent this??

Thanks,

Jeremy 

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




RE: [PHP] load balancing with php/apache?

2001-01-14 Thread jeremy brand

Like I said, we use our own.  It is home grown, but not opensource --
sorry, if it was my choice it would be ;)

Jeremy

Jeremy Brand :: Sr. Software Engineer :: 408-245-9058 :: [EMAIL PROTECTED]
http://www.JeremyBrand.com/Jeremy/Brand/Jeremy_Brand.html for more 
Get your own Free, Private email at http://www.smackdown.com/
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
   ""   -- Quoted from Yahoo! homepage, http://www.yahoo.com

On Sun, 14 Jan 2001, [EMAIL PROTECTED] wrote:

> Date: Sun, 14 Jan 2001 09:49:03 +0530 (IST)
> From: "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
> To: jeremy brand <[EMAIL PROTECTED]>
> Cc: [EMAIL PROTECTED]
> Subject: RE: [PHP] load balancing with php/apache?
> 
> On Sat, 13 Jan 2001, jeremy brand wrote:
> 
> > Oh, BTW, we don't use PHP sessions, we use our own.  
> That has got me hooked - what do you use?
> do you mean you dont use 
> 1) PHP4 sessions 
> OR
> 2) don't use PHP for session handling at all?
> 
> Tarique
> 
> -- 
> =
>B2B Application Providers
> http://www.sanisoft.com
>  Vortal for Nagpur http://nagpurcity.net
> =
> 
> 


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




  1   2   3   4   >