php-general Digest 27 Jan 2002 02:33:30 -0000 Issue 1135

Topics (messages 82211 through 82262):

Banner agencies - OT
        82211 by: Boaz Yahav

Using HTTP Post variables with multiple domains and scripts
        82212 by: Dreamriver.com

Re: break statement usage
        82213 by: DL Neil
        82215 by: Nick Wilson

Calculate Directory Size
        82214 by: Simon H
        82216 by: Alan McFarlane
        82221 by: Jeff Sheltren

phplib
        82217 by: Kunal Jhunjhunwala
        82218 by: Nick Wilson
        82220 by: Kunal Jhunjhunwala

Variables Limit
        82219 by: Philip J. Newman
        82225 by: Craig Vincent
        82232 by: Nick Wilson
        82234 by: Philip J. Newman
        82235 by: Nick Wilson
        82236 by: Kurth Bemis
        82237 by: Philip J. Newman
        82241 by: Michael Kimsal
        82247 by: scott

Changeing Dates.
        82222 by: Philip J. Newman
        82223 by: Jeff Sheltren

Re:[PHP] Changeing Dates.
        82224 by: Rafael Perazzo B Mota
        82229 by: DL Neil

Javascript Parser?
        82226 by: saif
        82227 by: Richard S. Crawford

Re: I'm not sure how to do some simple code...
        82228 by: Philip Olson

getenv() replacement when running as ISAPI ???
        82230 by: Christian Blichmann

Error: symbol _erealloc not found, PHP 4.0.6 under Solaris/Sparc
        82231 by: Arcady Genkin

Re: using a text file for variables in a form?
        82233 by: qartis

Any Ideas
        82238 by: Philip J. Newman
        82239 by: qartis
        82260 by: Steve Edberg

Re: Printing JPEG images generated with ImageJPEG with IE/WIN
        82240 by: David_Bourne

Re: Passing objects
        82242 by: Michael Kimsal

Re: [PHP-DB] PHP + Postgresql + Linux = Frustration
        82243 by: Miles Thompson

start
        82244 by: El Ucalito
        82245 by: Duncan Hill

Hints & Feedback
        82246 by: Philip J. Newman
        82250 by: Michael Kimsal
        82252 by: Nick Wilson

PHP and XHTML
        82248 by: ,,,
        82249 by: Frans Englich
        82251 by: Nick Wilson
        82253 by: Jeff Sheltren
        82254 by: Nick Wilson
        82256 by: Frans Englich

Re: Viral Marketing PHP (was Re: [PHP] Computer Science and PHP)
        82255 by: Manuel Lemos

File open with 4.1
        82257 by: Floyd Baker

Re: getting a LAMP job in this economy
        82258 by: Manuel Lemos

Get FILE NAME and EXTENSION??
        82259 by: Dani

Problems with Parent Child References
        82261 by: Kevin Morris

Control Panel
        82262 by: karthikeyan

Administrivia:

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

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

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


----------------------------------------------------------------------
--- Begin Message ---
Hi

Most of us that have sites use some kind of ad agencies. It's small
change but it helps. In recent months, many ad agencies closed down,
many stopped paying etc...
I was wondering if anyone is happy with his ad agency.

thanks

berber

--- End Message ---
--- Begin Message ---

Hi Folks,
I use the regular form POST method to send variables from Domain A to Domain B. On 
domain B I run a short script. The script does it's thing and then sends the posted 
variables back to Domain A with 

header("Location: http://www.domainA.com/folder/script.php";);

The problem is that the variables disappear at this point - after the domain B script 
is run - and do not appear to go any further. I have tried this code, which works:


header("Location: http://www.domainA.com/folder/script.php?var1=foo&var2=bar";);
... but for security reasons I should not use the GET method for passing the 
originally posted variables.


I do not want to stop the form post process, I just want to run my own script routine 
and then continue with the original form request.


How do I accomplish the posting of variables from Domain A to Domain B and back again 
to Domain A without reposting them in an additional form post submission?


Thanks!


Kind Regards,

Richard Creech
[EMAIL PROTECTED]
Phone 250.744.3350 Pacific Time, Canada
Easily create your own Yellow Pages with phpYellow Pages
http://www.dreamriver.com



--- End Message ---
--- Begin Message ---
Private note: heard the one about throwing stones and living in glass houses?

> <tip>
>     Try to keep your posts a little shorter
>     if only for the sake of the dialup users ;)
> </tip>

this said by someone who:
- pushes MIME messages into a discussion list/newsgroup (instead of simple text format 
which is
almost-universally preferred/required/recommended on lists),
- has a (unnecessary) PGP addendum on every msg sent,
- frequently ends up sending msgs which open as blank screens, until certain email 
client users make the extra
effort of opening an attachment (a virus risk in most 'warnings/good practices' 
descriptions)

but whose contributions are often much appreciated!

Regards,
=dn
(whose 'crimes' include the use of (some) M$ products)



----- Original Message -----
From: "Nick Wilson" <[EMAIL PROTECTED]>
To: "PHP" <[EMAIL PROTECTED]>
Sent: 25 January 2002 21:24
Subject: Re: [PHP] break statement usage


> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
>
> * and then Erik Price blurted....
> > So what I'm wondering is,
> >
> > Is it bad coding practice to make heavy use of "break" statements in
> > switch() flow control?
>
> That's exactly the point of the break statement, it was designed to be
> used in a switch statement to 'break' from the statement.
> It replaces the need for complex and untidy 'if else' monsters.
>
> <tip>
>     Try to keep your posts a little shorter
>     if only for the sake of the dialup users ;)
> </tip>
>
> Cheers
> - --
>
> Nick Wilson
>
> Tel: +45 3325 0688
> Fax: +45 3325 0677
> Web: www.explodingnet.com
>
>
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.0.6 (GNU/Linux)
>
> iD8DBQE8Uc0PHpvrrTa6L5oRAvcAAJ9Z67PVwgyNN7WFpf/R0wvN97IMkgCgm53O
> 1TbPTWhwyl8FNEhtLRRYv/c=
> =UDbQ
> -----END PGP SIGNATURE-----
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>

--- End Message ---
--- Begin Message ---
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


* and then DL Neil blurted....
> Private note: heard the one about throwing stones and living in glass houses?
> 
> > <tip>
> >     Try to keep your posts a little shorter
> >     if only for the sake of the dialup users ;)
> > </tip>

> this said by someone who:
> - pushes MIME messages into a discussion list/newsgroup (instead of simple text 
>format which is
> almost-universally preferred/required/recommended on lists),

er... I'm only sending text.

> - has a (unnecessary) PGP addendum on every msg sent,

That's a matter of opinion only.

> - frequently ends up sending msgs which open as blank screens, until certain email 
>client users make the extra
> effort of opening an attachment (a virus risk in most 'warnings/good practices' 
>descriptions)

I'd be very interested to hear if anybody is getting this from me. As
far as I know There is *nothing* wrong with my messages. Perhaps there
is somthing wrong with 'Outhouse' on your machine :-)

 
> but whose contributions are often much appreciated!

er.... Thanks, I think?

- -- 

Nick Wilson

Tel:    +45 3325 0688
Fax:    +45 3325 0677
Web:    www.explodingnet.com



-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)

iD8DBQE8UsxnHpvrrTa6L5oRAs1rAJ9jLdFD3CaJ/FtKT5oW1/aJwcANdQCbBO8l
raX1o6ZBDirdcUpqo9C6+mA=
=yAGV
-----END PGP SIGNATURE-----
--- End Message ---
--- Begin Message ---

Attachment: smime.p7m
Description: application/pkcs7-mime

--- End Message ---
--- Begin Message ---
I suggest using an external tool - using PHP would probably be too slow esp.
if you're hitting 1000+ users. (Plus, I think you would have to run a lot of
clearstatcache()'s which may cause all sorts of problems)...

If you do an ls or dir or similar then you could parse the output, however
there must be a decent tool out there somewhere that runs nice and fast.


Simon H <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> On advice, I've moved this from the Pear list.  I have a
> problem...hopefully someone can help, because I've no idea where
> to even start!
>
> I have a user database, with a table called Users, and fields as so:
>
> (it would be cool if this would work on both Linux and Windows)
>
> -------------------------------------------------------------
> User DiskUsage (Mb) Quota (Mb) HomeDirectory
> -------------------------------------------------------------
> jim 50 100 F:\users\jim \\ In Windows
>
> jim 50 100 /users/jim \\ In Linux
> -------------------------------------------------------------
>
>
> The database wouldn't be shared between Windows and Linux, just 1 or the
> other.
>
> What I would like to be able to do is, press a button on a php page, and
> scan the (MySQL or ODBC through Pear DB) database, and for each user,
> calculate the size of their HomeDirectory, and Update the DiskUsage in the
> DB accordingly.
>
> I'm wondering tho how this would work with say 1000's of users each with
> several hundred Mb's or even several Gb's each.  The users will have
> subfolders too, so the function would have to recurse the dirs, if
> possible.
>
> Is this even possible with PHP?
>
> I appreciate any help I can get on this, because its waaaaaay beyond me
> presently.
>
> Thanks
>
> Simon H
>


--- End Message ---
--- Begin Message ---
I'm sorry, but I won't be much help on the windows side of things, but for
UNIX, the job is already done for you!  There is a utility called 'du',
which will tell you the disk usage of a file (or a folder and its contents).
Specifically, you would want to use the -s flag to specify only to show the
grand total, and not the size of each file...  type 'du --help' or 'man du'
at the command line to find out more.  But an example:

du -s -m /path/to/users/home/dir/

that will tell you in MB how much disk space they are using.  Careful
though, this is checking all their files recursively, so this can get
cpu/hdd intense if you are using it for lots of users.  My advice would be
to run your script when there is a low load on the server.

I hope that helps get you started.

Jeff

> Simon H <[EMAIL PROTECTED]> wrote in message
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > On advice, I've moved this from the Pear list.  I have a
> > problem...hopefully someone can help, because I've no idea where
> > to even start!
> >
> > I have a user database, with a table called Users, and fields as so:
> >
> > (it would be cool if this would work on both Linux and Windows)
> >
> > -------------------------------------------------------------
> > User DiskUsage (Mb) Quota (Mb) HomeDirectory
> > -------------------------------------------------------------
> > jim 50 100 F:\users\jim \\ In Windows
> >
> > jim 50 100 /users/jim \\ In Linux
> > -------------------------------------------------------------
> >
> >
> > The database wouldn't be shared between Windows and Linux, just 1 or the
> > other.
> >
> > What I would like to be able to do is, press a button on a php page, and
> > scan the (MySQL or ODBC through Pear DB) database, and for each user,
> > calculate the size of their HomeDirectory, and Update the DiskUsage in
the
> > DB accordingly.
> >
> > I'm wondering tho how this would work with say 1000's of users each with
> > several hundred Mb's or even several Gb's each.  The users will have
> > subfolders too, so the function would have to recurse the dirs, if
> > possible.
> >
> > Is this even possible with PHP?
> >
> > I appreciate any help I can get on this, because its waaaaaay beyond me
> > presently.
> >
> > Thanks
> >
> > Simon H
> >
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>


--- End Message ---
--- Begin Message ---
hey... im tryint to lay some conditions for the html output... example :
if ($check  == 1) {
<some html>
                            }
else {
    <some other html>
    }

The problem here is, I want the html in both cases to be customisable by the
user... so I would have to make it a part of the template file... and if i
do that, even if the conditions fail, the html will show up..any ideas on a
fix for this?

Regards,
Kunal Jhunjhunwala

--- End Message ---
--- Begin Message ---
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


* and then Kunal Jhunjhunwala blurted....
> hey... im tryint to lay some conditions for the html output... example :
> if ($check  == 1) {
> <some html>
>                             }
> else {
>     <some other html>
>     }
> 
> The problem here is, I want the html in both cases to be customisable by the
> user... so I would have to make it a part of the template file... and if i
> do that, even if the conditions fail, the html will show up..any ideas on a
> fix for this?

I'm not 100% certain I understand your Q. but how about this:
I take it from the subject you are using a PHPLib template so if you
were to have a teplate var called {htmlOutput} you could do this, 

if($check=1) {
    $htmlOutput=<<<EOF
    <your html here>
    EOF;
} elseif($check=2) {  
    $htmlOutput=<<<EOF
    <your altenate html here>
    EOF;
} else { 
    $htmlOutput=<<<EOF
    <your default html here>
    EOF;
}

and then in your template code.....

$t->set_var("htmlOutput", $htmlOutput);

Hope that's what you mean
- -- 

Nick Wilson

Tel:    +45 3325 0688
Fax:    +45 3325 0677
Web:    www.explodingnet.com



-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)

iD8DBQE8UtA5HpvrrTa6L5oRAr/TAJ0RBC3OzWQashl7fFc0e9wcrow6LgCdFjY1
xjqg6qEwLRKI+R4g0NWYRoM=
=haum
-----END PGP SIGNATURE-----
--- End Message ---
--- Begin Message ---
Hi Nick,
I found the solution. Thanks for your reply though. Basically, what I wanted
to do was simple :
the admin of my program can decided wether they want a feature on or off.
Now, depending on that, a lil section of the html would change. Using
phplib, I have seperated all my html from the php. The problem comes up,
when the html changes dependin on wether the feature is on or off. How does
one alter the html content in the template file? one cant...

The solution I found is, add a open comment tag above and and close comment
tag under the dynamic html code... commenting it out depending on wether the
feature is on or off...simple eh? :)

Regards,
Kunal Jhunjhunwala
----- Original Message -----
From: "Nick Wilson" <[EMAIL PROTECTED]>
To: "php-list" <[EMAIL PROTECTED]>
Sent: Saturday, January 26, 2002 9:20 PM
Subject: Re: [PHP] phplib


> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
>
> * and then Kunal Jhunjhunwala blurted....
> > hey... im tryint to lay some conditions for the html output... example :
> > if ($check  == 1) {
> > <some html>
> >                             }
> > else {
> >     <some other html>
> >     }
> >
> > The problem here is, I want the html in both cases to be customisable by
the
> > user... so I would have to make it a part of the template file... and if
i
> > do that, even if the conditions fail, the html will show up..any ideas
on a
> > fix for this?
>
> I'm not 100% certain I understand your Q. but how about this:
> I take it from the subject you are using a PHPLib template so if you
> were to have a teplate var called {htmlOutput} you could do this,
>
> if($check=1) {
>     $htmlOutput=<<<EOF
>     <your html here>
>     EOF;
> } elseif($check=2) {
>     $htmlOutput=<<<EOF
>     <your altenate html here>
>     EOF;
> } else {
>     $htmlOutput=<<<EOF
>     <your default html here>
>     EOF;
> }
>
> and then in your template code.....
>
> $t->set_var("htmlOutput", $htmlOutput);
>
> Hope that's what you mean
> - --
>
> Nick Wilson
>
> Tel: +45 3325 0688
> Fax: +45 3325 0677
> Web: www.explodingnet.com
>
>
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.0.6 (GNU/Linux)
>
> iD8DBQE8UtA5HpvrrTa6L5oRAr/TAJ0RBC3OzWQashl7fFc0e9wcrow6LgCdFjY1
> xjqg6qEwLRKI+R4g0NWYRoM=
> =haum
> -----END PGP SIGNATURE-----
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>
>

--- End Message ---
--- Begin Message ---
Is there any limit on the amount of variables that you can use?

Philip J. Newman
Philip's Domain - Internet Project.
http://www.philipsdomain.com/
[EMAIL PROTECTED]
Phone: +64 25 6144012
--- End Message ---
--- Begin Message ---
>Is there any limit on the amount of variables that you can use?

I can't say for certain as I don't know the insides of PHP *that* well...but
I would guess your limitation on variables would be based on your
server/user memory allowances and/or your memory limitations for PHP
scripts.

Sincerely,

Craig Vincent

--- End Message ---
--- Begin Message ---
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


* and then Philip J. Newman blurted....
> Is there any limit on the amount of variables that you can use?

Well I certainly agree with Craig, but I'm interested to know why you
ask? Is it just idle curiosity or some interesting project you're
involved in?
- -- 

Nick Wilson

Tel:    +45 3325 0688
Fax:    +45 3325 0677
Web:    www.explodingnet.com



-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)

iD8DBQE8UvbrHpvrrTa6L5oRAtrWAJwLocc8/xRHK5kTN2S1HY3BXmQ2NQCdELrK
FfZO6YoOZUEXonb6fNz3Z10=
=wuoa
-----END PGP SIGNATURE-----
--- End Message ---
--- Begin Message ---
I have to exchage over 304 different names, codes, and dates ...

----- Original Message ----- 
From: "Nick Wilson" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, January 27, 2002 7:35 AM
Subject: Re: [PHP] Variables Limit


> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> 
> * and then Philip J. Newman blurted....
> > Is there any limit on the amount of variables that you can use?
> 
> Well I certainly agree with Craig, but I'm interested to know why you
> ask? Is it just idle curiosity or some interesting project you're
> involved in?
> - -- 
> 
> Nick Wilson
> 
> Tel: +45 3325 0688
> Fax: +45 3325 0677
> Web: www.explodingnet.com
> 
> 
> 
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.0.6 (GNU/Linux)
> 
> iD8DBQE8UvbrHpvrrTa6L5oRAtrWAJwLocc8/xRHK5kTN2S1HY3BXmQ2NQCdELrK
> FfZO6YoOZUEXonb6fNz3Z10=
> =wuoa
> -----END PGP SIGNATURE-----
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
> 
> 
> 



--- End Message ---
--- Begin Message ---
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


* and then Philip J. Newman blurted....
> I have to exchage over 304 different names, codes, and dates ...

305? :-)
Doesn't sound like it would be a problem.
- -- 

Nick Wilson

Tel:    +45 3325 0688
Fax:    +45 3325 0677
Web:    www.explodingnet.com



-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)

iD8DBQE8UwiwHpvrrTa6L5oRAkQrAJ492AZqZdf03jBAWSgw+AF+um3PFwCglfGg
kRF7wnfQD7eICNfD+siLqLw=
=Y3QF
-----END PGP SIGNATURE-----
--- End Message ---
--- Begin Message ---
Unless your getting the values through a POST or a GET...both of these
have limites....i forget what it is...maybe 1024 bytes?  you'd jave to
read the http rfc

~kurth

On Sat, 2002-01-26 at 14:51, Nick Wilson wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> 
> * and then Philip J. Newman blurted....
> > I have to exchage over 304 different names, codes, and dates ...
> 
> 305? :-)
> Doesn't sound like it would be a problem.
> - -- 
> 
> Nick Wilson
> 
> Tel:  +45 3325 0688
> Fax:  +45 3325 0677
> Web:  www.explodingnet.com
> 
> 
> 
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.0.6 (GNU/Linux)
> 
> iD8DBQE8UwiwHpvrrTa6L5oRAkQrAJ492AZqZdf03jBAWSgw+AF+um3PFwCglfGg
> kRF7wnfQD7eICNfD+siLqLw=
> =Y3QF
> -----END PGP SIGNATURE-----
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
> 
> 


--- End Message ---
--- Begin Message ---
cool
----- Original Message ----- 
From: "Nick Wilson" <[EMAIL PROTECTED]>
To: "PHP-General" <[EMAIL PROTECTED]>
Sent: Sunday, January 27, 2002 8:51 AM
Subject: Re: [PHP] Variables Limit


> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> 
> * and then Philip J. Newman blurted....
> > I have to exchage over 304 different names, codes, and dates ...
> 
> 305? :-)
> Doesn't sound like it would be a problem.
> - -- 
> 
> Nick Wilson
> 
> Tel: +45 3325 0688
> Fax: +45 3325 0677
> Web: www.explodingnet.com
> 
> 
> 
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.0.6 (GNU/Linux)
> 
> iD8DBQE8UwiwHpvrrTa6L5oRAkQrAJ492AZqZdf03jBAWSgw+AF+um3PFwCglfGg
> kRF7wnfQD7eICNfD+siLqLw=
> =Y3QF
> -----END PGP SIGNATURE-----
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
> 
> 
> 



--- End Message ---
--- Begin Message ---
Philip J. Newman wrote:

> I have to exchage over 304 different names, codes, and dates ...
> 



Instead of hundreds of discrete variables, would you not be
better served by dividing them up into arrays of some sort?

instead of $name1, $name2, etc

$name[1]
$name[2]

or
$name["first"]
$name["last"]

and so on...

I'd think memory usage would be about the same, but if there was some 
limit on the number of discrete simultaneous variable names, this should 
get around that.

Michael Kimsal
http://www.tapinternet.com/php/
PHP Training Courses
734-480-9961




--- End Message ---
--- Begin Message ---
Check out arrays... especially if you're going to be
dealing with 304 individual variables.  your code
will be MUCH happier :)

> -----Original Message-----
> From: Philip J. Newman [mailto:[EMAIL PROTECTED]]
> Subject: Re: [PHP] Variables Limit
> 
> I have to exchage over 304 different names, codes, and dates ...
> 
> ----- Original Message ----- 
> From: "Nick Wilson" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Sunday, January 27, 2002 7:35 AM
> Subject: Re: [PHP] Variables Limit
> 
> 
> > -----BEGIN PGP SIGNED MESSAGE-----
> > Hash: SHA1
> > 
> > 
> > * and then Philip J. Newman blurted....
> > > Is there any limit on the amount of variables that you can use?
> > 
> > Well I certainly agree with Craig, but I'm interested to know why you
> > ask? Is it just idle curiosity or some interesting project you're
> > involved in?
> > - -- 
> > 
> > Nick Wilson
> > 
> > Tel: +45 3325 0688
> > Fax: +45 3325 0677
> > Web: www.explodingnet.com
> > 
> > 
> > 
> > -----BEGIN PGP SIGNATURE-----
> > Version: GnuPG v1.0.6 (GNU/Linux)
> > 
> > iD8DBQE8UvbrHpvrrTa6L5oRAtrWAJwLocc8/xRHK5kTN2S1HY3BXmQ2NQCdELrK
> > FfZO6YoOZUEXonb6fNz3Z10=
> > =wuoa
> > -----END PGP SIGNATURE-----
> > 
> > -- 
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> > 
> > 
> > 
> 
> 
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
> 
> 

--- End Message ---
--- Begin Message ---
I have had no luck changing:

20020124020555

into

24 01 2002 @ 0205h 55s

Can anyone put some light on this, I'm going nuts

Philip J. Newman
Philip's Domain - Internet Project.
http://www.philipsdomain.com/
[EMAIL PROTECTED]
Phone: +64 25 6144012
--- End Message ---
--- Begin Message ---
Hi, provided that your initial string will always be in the same format
(same # of numbers) I would use the substr function.  substr(string, start,
[length])
Ex:
$mystring = "20020124020555";
$year = substr($mystring,0,4);
$month = substr($mystring,4,2);
$day = substr($mystring,6,2);

etc...

Hope this helps.

Jeff

----- Original Message -----
From: "Philip J. Newman" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, January 26, 2002 8:35 AM
Subject: [PHP] Changeing Dates.


I have had no luck changing:

20020124020555

into

24 01 2002 @ 0205h 55s

Can anyone put some light on this, I'm going nuts

Philip J. Newman
Philip's Domain - Internet Project.
http://www.philipsdomain.com/
[EMAIL PROTECTED]
Phone: +64 25 6144012



--- End Message ---
--- Begin Message ---
function ChangeDate ($date) { 

   $day=substr($date,6,2);  //get the day
   $month=substr($date,4,2); //get the month
   $year=substr($date,0,4); //get the year
   $time=substr($date,8,4);  //get the time
   $secs=substr($date,12,2); //get the seconds
   $ret="$day $month $year @ $time h $secs s"; //var to be returned
   return ret; 

}

This funcion gets the date in the format you have and converts into a string the way 
you want. 
I hope this help. 

Rafael Perazzo 

"Philip J. Newman" <[EMAIL PROTECTED]> wrote on 26/01/02 14:35:30:
>
>I have had no luck changing:
>
>20020124020555
>
>into
>
>24 01 2002 @ 0205h 55s
>
>Can anyone put some light on this, I'm going nuts
>
>Philip J. Newman
>Philip's Domain - Internet Project.
>http://www.philipsdomain.com/
>[EMAIL PROTECTED]
>Phone: +64 25 6144012



_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com

--- End Message ---
--- Begin Message ---
Or if you are retrieving the data from a database, use the SQL Date-Time functions 
(RTFM).
=dn

----- Original Message ----- 
From: "Rafael Perazzo B Mota" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: 26 January 2002 16:38
Subject: [PHP] Re:[PHP] Changeing Dates.


> function ChangeDate ($date) { 
> 
>    $day=substr($date,6,2);  //get the day
>    $month=substr($date,4,2); //get the month
>    $year=substr($date,0,4); //get the year
>    $time=substr($date,8,4);  //get the time
>    $secs=substr($date,12,2); //get the seconds
>    $ret="$day $month $year @ $time h $secs s"; //var to be returned
>    return ret; 
> 
> }
> 
> This funcion gets the date in the format you have and converts into a string the way 
>you want. 
> I hope this help. 
> 
> Rafael Perazzo 
> 
> "Philip J. Newman" <[EMAIL PROTECTED]> wrote on 26/01/02 14:35:30:
> >
> >I have had no luck changing:
> >
> >20020124020555
> >
> >into
> >
> >24 01 2002 @ 0205h 55s
> >
> >Can anyone put some light on this, I'm going nuts
> >
> >Philip J. Newman
> >Philip's Domain - Internet Project.
> >http://www.philipsdomain.com/
> >[EMAIL PROTECTED]
> >Phone: +64 25 6144012
> 
> 
> 
> _________________________________________________________
> Do You Yahoo!?
> Get your free @yahoo.com address at http://mail.yahoo.com
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
> 
> 

--- End Message ---
--- Begin Message ---
hi,
is there any site from where i can get the php scripts which can parse the
javascript or at lest document.write(ln) part into php echo variable so that
i dont need to implement javascript in my web documents(i have some
documents writen in javascript so that i can insert them in any doc but now
im moving from javascript to php.)

thanks in advance.
saif




--- End Message ---
--- Begin Message ---
I'm not entirely sure I understand your question.  Are you asking if 
there's an easy way to convert programs from JavaScript to PHP?

saif wrote:

> hi,
> is there any site from where i can get the php scripts which can parse the
> javascript or at lest document.write(ln) part into php echo variable so that
> i dont need to implement javascript in my web documents(i have some
> documents writen in javascript so that i can insert them in any doc but now
> im moving from javascript to php.)
> 
> thanks in advance.
> saif
> 
> 
> 
> 
> 
> 


--- End Message ---
--- Begin Message ---

Have a look around:
  http://www.php.net/strip_tags

Regarding simple matches, consider:
  http://uk.php.net/stristr

And who knows, maybe you want:
  http://us.php.net/htmlspecialchars

Learn about if/else:
  http://au.php.net/else

Regards,
Philip Olson


On Fri, 25 Jan 2002, Leif K-Brooks wrote:

> I know this is probably a stupid question, but how do I make it so that if a
> string contains the word "script" (I'm banning javascript) it does
> something? 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
> 

--- End Message ---
--- Begin Message ---
Hi there!
Anybody knows a replacement for the built-in
getenv()-function since it's not supported when
running as an ISAPI-module under Internet
Information Server 5.0 on Windows 2000
Professional (well, at least according to the
manual).
I've created a small counter that looks up the
user's IP in a database in order to prevent
duplicate hits when user is reloding the page
and to track how many users are "currently
online".

Suggestions welcome....

BTW, this is the code I'm using now
(temporarily running the CGI version):

=== CUT HERE ===
   // ...
   // Get user's IP and user agent (-->>> problem arises here <<<--)
   $ip = ip2long(($tmp = getenv("HTTP_X_FORWARD_FOR")) ? $tmp :
getenv("REMOTE_ADDR"));

   // -->>> and here <<<--
   $useragent = getenv("HTTP_USER_AGENT");

   // Check if visit already counted
   $id = 0;
   $counted = false;
   $r = mysql_query("SELECT visitor.id, visitor.ip, visitor.useragent,
visits.timestamp FROM visitor, visits WHERE visitor.id = visits.visitor_id
ORDER BY visitor.id DESC");
   // ...
=== CUT HERE ===

Christian Blichmann

_____________________________________________
don't hesitate - email me with your thoughts:
e-mail: [EMAIL PROTECTED]
 - please remove the ".nospam" from address.
_____________________________________________
do you want to know more?
web:    http://www.blichmann.de


--- End Message ---
--- Begin Message ---
When trying to load Zend optimizer, the following error gets logged:

Failed loading /var/www/lib/ZendOptimizer.so: ld.so.1:             \
  /opt/apache/bin/httpd: fatal: relocation error: file             \
  /var/www/lib/ZendOptimizer.so: symbol _erealloc: referenced      \
  symbol not found

It seems from whatever little bits I could find on the Net, that the
_erealloc symbol should be defined in the PHP itself.  The PHP is
installed as a module with Apache 1.3.22, compiled from sources, and
is (otherwise) working perfectly fine.

Any ideas on how to overcome this problem?
Many thanks,
-- 
Arcady Genkin
Don't read everything you believe.
--- End Message ---
--- Begin Message ---
The HTML would be having problems because PHP would compile this:

--
<?
print '<INPUT TYPE="TEXT" NAME="savings" VALUE="' .
$data["SAVINGS"] . "'>";
?>
--

as:

--
<INPUT TYPE="TEXT" NAME="savings" VALUE="'>
--

Note VALUE's quotes: " and '. Try with this:

--
<?
print '<INPUT TYPE="TEXT" NAME="savings" VALUE="' .
$data["SAVINGS"] . '">';
?>
--

"Alexis N. Mueller" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Dan,
>
> Thanks for replying so fast.. I tried it out right away.
>
> The script part of it didn't seem to give me much grief, however the html
> part of it seems to be having issues
> with the combination of single quotes (') and double qouotes ("), or maybe
> it's the order, or a linebreak in the email... i don't know...
>
> <?
> print '<INPUT TYPE="TEXT" NAME="savings" VALUE="' .
> $data["SAVINGS"] . "'>";
> ?>
>
> --------


--- End Message ---
--- Begin Message ---
Any Ideas how I can remove   !@#$%^&*()_+=-';:"/.,<>? charactors from a string?

Philip J. Newman
Philip's Domain - Internet Project.
http://www.philipsdomain.com/
[EMAIL PROTECTED]
Phone: +64 25 6144012
--- End Message ---
--- Begin Message ---
I'm guessing something along the lines of:

--
$string=str_replace("!","",$string);
$string=str_replace("@","",$string);
$string=str_replace("#","",$string);
$string=str_replace("$","",$string);
$string=str_replace("%","",$string);
$string=str_replace("^","",$string);
--

etc.


"Philip J. Newman" <[EMAIL PROTECTED]> wrote in message
003d01c1a6a5$fa7d60e0$0401a8c0@philip">news:003d01c1a6a5$fa7d60e0$0401a8c0@philip...
Any Ideas how I can remove   !@#$%^&*()_+=-';:"/.,<>? charactors from a
string?

Philip J. Newman
Philip's Domain - Internet Project.
http://www.philipsdomain.com/
[EMAIL PROTECTED]
Phone: +64 25 6144012



--- End Message ---
--- Begin Message ---
Or do it all in one line:

        $string = ereg_replace('[!@#$%^&*()_+=-';:"/.,<>?]', '', $string);

If you want to remove non-alphanumeric characters from a string, you can do:

        $string = ereg_replace('[^[:alnum:]]', '', $string);

Perl-compatible regular expressions would work as well, and be 
slightly faster. For more info, see:

        http://www.php.net/manual/en/function.ereg.php
        http://www.php.net/manual/en/ref.regex.php
        http://www.php.net/manual/en/ref.pcre.php

-steve


At 12:21 PM -0800 1/26/02, "qartis" <[EMAIL PROTECTED]> wrote:
>I'm guessing something along the lines of:
>
>--
>$string=str_replace("!","",$string);
>$string=str_replace("@","",$string);
>$string=str_replace("#","",$string);
>$string=str_replace("$","",$string);
>$string=str_replace("%","",$string);
>$string=str_replace("^","",$string);
>--
>
>etc.
>
>"Philip J. Newman" <[EMAIL PROTECTED]> wrote in message
>003d01c1a6a5$fa7d60e0$0401a8c0@philip">news:003d01c1a6a5$fa7d60e0$0401a8c0@philip...
>Any Ideas how I can remove   !@#$%^&*()_+=-';:"/.,<>? charactors from a
>string?
>
>Philip J. Newman
>Philip's Domain - Internet Project.
>http://www.philipsdomain.com/
>[EMAIL PROTECTED]
>Phone: +64 25 6144012


-- 
+------------------------------------------------------------------------+
| Steve Edberg                                      [EMAIL PROTECTED] |
| University of California, Davis                          (530)754-9127 |
| Programming/Database/SysAdmin               http://pgfsun.ucdavis.edu/ |
+------------------------------------------------------------------------+
| "Restriction of free thought and free speech is the most dangerous of  |
| all subversions. It is the one un-American act that could most easily  |
| defeat us."                                                            |
|                 - Supreme Court Justice (1939-1975) William O. Douglas |
+------------------------------------------------------------------------+
--- End Message ---
--- Begin Message ---
>>Hm, it could be that IE tries to reload the picture (which isn't there
>>anymore because the form-data has been expired). Perhaps saving the
>>picture temporarly on the server will prevent the problem.
>>
>
>That could be what is happening. I'm generating data for students to 
>analyze on one page with the hidden form and generating a graph of 
>the data with the next page. The only thing generated is the image. 
>If I date/time stamp the image file I could serve that up on the 
>next page...it would be good to get the right graph to the right 
>student. Might be worth a try.

To answer my own post. That works, i.e. creating a jpeg file and then 
accessing in the next php page. I end up with extra image files 
created for each student/access but a cron entry should get rid of 
them...and they aren't all that big. Extra flexibility with a html 
page instead of just the image. Haven't tested it with Win IE yet 
though...leave that for Monday

David
-- 
David Bourne
OUHSC College of Pharmacy
[EMAIL PROTECTED]
--- End Message ---
--- Begin Message ---
Dean Householder wrote:

> How can you pass an object from one page to another?  Is there any convenient way to 
>do it with PHP?
> 
> Dean
> 
> 


You've had some suggestions to use 'sessions' but you can't really pass 
an object between pages with sessions - UNLESS...

Unless both pages have the class definition for that object.  Only the 
values for the object would be passed, not the methods of the class 
which the object is based on.

Basically, make sure the class the object is based on is used in any 
page you want to use that object in.

Good luck...




--------------------------------
Michael Kimsal
http://www.tapinternet.com/php/
PHP Training Courses
734-480-9961



--- End Message ---
--- Begin Message ---
Mike,

This can be a bit frustrating, but all in all it's not too bad. I usually 
make up my own configuration file just to avoid re-typing everything, 
because I generally don't get it right the first time. I then chmod +x them 
so that they will execute. They're quite simple, just scripts that call 
configure with all the various parameters.

I arrived at the choices below after reading the LAMP documents, the 
"Soothingly Seamless Installation of Linux, Apache, MySQL and PHP" and the 
various configuration options for each of MySQL, PHP, PostgreSQL and Apache.

Before building from source I tried working with RPMs on my older Red Hat 
systems, and with dselect on two Debian boxes. These are all well-debugged 
software packages, and aside from taking some time to compile on the oldest 
box, a P 133, everything went smoothly.

Here's the one for PostgreSQL, locating PostgreSQL in a very non-standard 
location. Can't remember why I wanted w-odbc.
-------start of script ----------
#!/bin/sh
./configure \
--with-prefix=/drv2/bin/pgsql \
--with-odbc
---------- end of script --------

For Apache I wanted a whole bunch of stuff, thus "enable-shared=max". If I 
remember correctly that let me load all the modules dynamically.
-------start of script ----------
#!/bin/sh
./configure \
--with-layout=Apache\
--prefix=/usr/local/apache \
--enable-shared=max
---------end of script -----------

And finally PHP. "with apxs" allows Apache to load PHP dynamically, and the 
parameter has to be specific. "with-mysql" points to my non-standard 
location of mysql, similarly I told it explicity where PostgreSQL was 
installed.
------- start of script --------
#! /bin/sh
./configure \
--with-apxs=/usr/local/apache/bin/apxs \
--with-mysql=/drv2/bin/mysql \
--with-pgsql=/usr/local/pgsql \
--enable-track-vars
------------- end of script --------

Pay attention to the line in the PHP  INSTALL doc refers to relocating 
php-ini-dist (think that's the name) and to the changes you have to make to 
Apache's httpd.conf file.

When all configuring, making and installing is done, you may get an error 
from Apache that it can't find the .so modules for PostgreSQL (and in my 
case, MySQL). If so, locate the modules and edit /etc/ld.so.conf, adding 
the paths to these modules. On my system I added these two lines,
    /usr/local/pgsql
    /drv2/bin/mysql/lib/mysql

Save the file and run ldconfig. Apache should then run OK.

As to your question "Why doesn't PHP have support for PostgreSQL built in 
..", have a look at all the different databases PHP supports and consider 
how immense the program would be if everything was compiled in by default.

Hope this is helpful. If you have more problems, there is a php-install 
list which deals with specific installation problems.

Regards - Miles Thompson

PS These 4 programs were my first experience building on Linux systems, and 
initially it was a bit daunting. I hope you find this helpful. /mt

At 12:15 PM 1/26/2002 -0500, you wrote:
>Hello,
>
>I am rather new to Linux but an old timer at software development.  I am
>investigating alternate platforms for future development for my company.
>Linux is at the top of the list.
>
>I am trying to get a server setup with a db (PostgreSQL), web server
>(Apache), and some sort of web scripting language (PHP).  I can not make
>everything work together.  PHP4 won't work out-of-the-box with PostgreSQL
>because PHP doesn't have support for PosgreSQL built in at compile time (why
>not just build everything into when it was initially built?).
>
>So I get the sources to PHP and try to build.  However, it wants the sources
>(header files) for Apache.
>
>At this point I don't want to go any further.  Eventually, I'll probably
>need the sources for everything.
>
>Is there an easy way to do this sort of stuff on Linux or is it better to
>just buy off the shelf products that work?
>
>Thanks,
>Mike
>
>
>
>
>--
>PHP Database Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: [EMAIL PROTECTED]

--- End Message ---
--- Begin Message ---
Hello, 

im introducing to php and i need to know (under windows98)
if are free /and where can i download it/ the software needed to 
program and test php4


Thanks everybody,
Pablo.

--- End Message ---
--- Begin Message ---
On Fri, 3 Jan 1997, El Ucalito wrote:

> im introducing to php and i need to know (under windows98) if are free
> /and where can i download it/ the software needed to program and test
> php4

www.php.net will answer all.

--- End Message ---
--- Begin Message ---
I know this isn't the right place to add this, but can someone check this out ...

http://www.philipsdomain.com/hyperlinks/search.php

... and gimme some tips of what I could do ... 

Philip J. Newman
Philip's Domain - Internet Project.
http://www.philipsdomain.com/
[EMAIL PROTECTED]
Phone: +64 25 6144012
--- End Message ---
--- Begin Message ---
Philip J. Newman wrote:

> I know this isn't the right place to add this, but can someone check this out ...
> 
> http://www.philipsdomain.com/hyperlinks/search.php
> 
> ... and gimme some tips of what I could do ... 


What are you asking for?

--- End Message ---
--- Begin Message ---
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


* and then Michael Kimsal blurted....
> What are you asking for?

Yeah, a little detail please :)
I don't even wana click it unless I know why, but then I'm just
paranoid!


- -- 

Nick Wilson

Tel:    +45 3325 0688
Fax:    +45 3325 0677
Web:    www.explodingnet.com



-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)

iD8DBQE8UzXmHpvrrTa6L5oRApumAKCo4NTiFZtX5z3zdXy+qgWplO4u3wCgrudv
/J9lB1J6bRmqeN3NXtDsMr0=
=zVmC
-----END PGP SIGNATURE-----
--- End Message ---
--- Begin Message ---
When I have an <? xml version=1.0 ?> inside my php script it wont work since 
php parses it as php code.

Will short_open_tag = Off solve it? I would really like to use <? ?> for the 
rest of my php code...there must be a better solution than Short_open_tag


regards,
Cyth


--- End Message ---
--- Begin Message ---
When I have an <? xml version="1.0" ?> inside my php script it wont work since 
php parses it as php code.

 Will short_open_tag = Off solve it? I would really like to use <? ?> for the 
rest of my php code...there must be a better solution than Short_open_tag


 regards,
 Cyth
--- End Message ---
--- Begin Message ---
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


* and then ,,, blurted....
> When I have an <? xml version=1.0 ?> inside my php script it wont work since 
> php parses it as php code.
> 
> Will short_open_tag = Off solve it? I would really like to use <? ?> for the 
> rest of my php code...there must be a better solution than Short_open_tag

Hmm... I had that problem too, the only I solved it was by using
templates. I know that may not help, sorry, just wanted to let you know
that it can be done. I'll follow this thread closely as *proper* XHTML
is a subject close to my heart :)
- -- 

Nick Wilson

Tel:    +45 3325 0688
Fax:    +45 3325 0677
Web:    www.explodingnet.com



-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)

iD8DBQE8UzTuHpvrrTa6L5oRAku3AKCJ4SdFzo9g2lcoeFwY6uJ/tkOzQgCgpNiq
Lr+KMndWgO4PF/fkpmcR8G8=
=LNVw
-----END PGP SIGNATURE-----
--- End Message ---
--- Begin Message ---
Hi.  Have you tried something like:

<? echo("<? xml version=\"1.0\" ?>\n"); ?>

I've not tried using xml & php, but that may work...

Jeff
----- Original Message -----
From: "Frans Englich" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, January 26, 2002 2:53 PM
Subject: [PHP] PHP and XHTML


When I have an <? xml version="1.0" ?> inside my php script it wont work
since
php parses it as php code.

 Will short_open_tag = Off solve it? I would really like to use <? ?> for
the
rest of my php code...there must be a better solution than Short_open_tag


 regards,
 Cyth




--- End Message ---
--- Begin Message ---
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


* and then Jeff Sheltren blurted....
> Hi.  Have you tried something like:
> 
> <? echo("<? xml version=\"1.0\" ?>\n"); ?>

*Good* idea, tell us if it works!

- -- 

Nick Wilson

Tel:    +45 3325 0688
Fax:    +45 3325 0677
Web:    www.explodingnet.com



-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)

iD8DBQE8UzhFHpvrrTa6L5oRAtEiAJ0b1D5tHcQMSpWCitYvIbmiHpkvpgCgkONa
lBx9rwVVindWYbIifw4EyVs=
=WHxj
-----END PGP SIGNATURE-----
--- End Message ---
--- Begin Message ---

This works just perfectly:

 <?echo("<?xml version=\"1.0\"?>"); ?>


 regards,
 Cyth

 ---------------------------

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


* and then Jeff Sheltren blurted....

> Hi.  Have you tried something like:
>
> <? echo("<? xml version=\"1.0\" ?>\n"); ?>

*Good* idea, tell us if it works!

- --

Nick Wilson

Tel:    +45 3325 0688
Fax:    +45 3325 0677
Web:    www.explodingnet.com



-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)

iD8DBQE8UzhFHpvrrTa6L5oRAtEiAJ0b1D5tHcQMSpWCitYvIbmiHpkvpgCgkONa
lBx9rwVVindWYbIifw4EyVs=
=WHxj
-----END PGP SIGNATURE-----

--- End Message ---
--- Begin Message ---
Hello,

Dl Neil wrote:
> > One good point about what you said is that one budgetless what to
> > promote PHP is to use 'viral marketing'. Viral marketing is a way to
> > market something by using a technique that spreads by itself, ie, no
> > additional effort or money needed to be spent by the originator to have
> > the notice of what you want to market spread like crazy.
> ...
> > sort what ideas can become viral. With that topic in the mind, if you
> > ever figure a viral idea to promote PHP, just share it here to prove the
> > concept as well! :-)
> 
> I had intended that the 'institutional approach' be seen as the seeds of a viral 
>marketing campaign. If students
> learn the tool, when they 'go out to work' they want to use it. Even if the student 
>is a 'hobbyist' then it
> still spreads the 'word' around...

That is not viral enough because it is not smooth. When it is not
smooth, not only it will propagate slowly but also it may stop
propagating at all because word of mouth is not always convincing. To
make it work smoothly it should not be hard to convince anybody that PHP
is a good idea.


 
> Your point earlier, if statistics say x million dynamic web sites are held together 
>by PHP, IT managers/decision
> makers tend to feel they should take notice, eg Apache and the Netcraft surveys. The 
>same will apply to PHP,
> numbers need to build to some 'critical mass' for corporate credibility to follow 
>(as wrong as that sounds).

Yes, but you only establish credibility when you manage to put your
arguments in favour of PHP in the mouths of opinion makers. Statistics
of PHP usage in the PHP site will never be credible enough. It is like
when parents tell everybody how smart their kids are, see what I mean?

 
> How to get PHP into the institutions? You'd think it would be easy, wouldn't you - 
>it's 'free', and that sounds

Being 'free' may be good for budgetless individuals but is the wrong
argument for institutions and companies in particular. You need to pick
up other argument.


> great! However you need competent/trained teachers/training staff. You need teaching 
>materials and supporting
> text books. You need sample exercises and databases. Look at what SuSE are doing 
>with email servers (etc) and
> RedHat with Linux distributions. Perhaps a distribution of LAMPS or the 'PHP Triad', 
>especially configured for
> an educational environment could be considered? Finally you need people to be 
>convinced that there's a demand
> for the teaching, and conversely students convinced that it is a valuable skill to 
>acquire...

That is the core of the problem. You can only demonstrate there is
demand for teaching if you spread that there is demand for qualified
professionals. The PHP situation could be improved if there was an
officially certificated training, like some Linux distributions have and
even MySQL. The effect of spreading about official certification is that
it passes a good impression to those that are not aware that Linux and
MySQL is something being taken seriously to the point of having official
certifications like for certified Microsoft and Sun Java trainings.


Regards,
Manuel Lemos
--- End Message ---
--- Begin Message ---




I'm now using $S_REQUEST to pass things on a win32 with apache and
php4.1.  In touching stuff up on the isp however, things are
incompatible.  I have gone to using $HTTP_POST_VAR, etc. instead, so
when the isp goes to 4.1 we only need to replace them with $_REQUEST.

Is that the way to go?


Now a new thing. I have gotten to this point where everything is on
the page but it doesn't open the file.  Is there some more conversion
needed re 4.1?  It would be nice to know just yes or no.  tks...

        $textfile = fopen($filename,'w');
         
    if(!($textfile))
    {
        print("The File could not be opened.");
        exit;
    }
      
    if($text > "") //  write a line to the file
    {
        fputs($textfile, (stripslashes($text)));
        
    }
     
    fclose($textfile);



Floyd

--

--- End Message ---
--- Begin Message ---
Hello,

Vincent Stoessel wrote:
> 
> On another list that I am on someone made this very bold
> statement:
> 
> "I've seen a lot of jobs for ColdFusion & Oracle or MS SQL server
> experience combinations.  Don't let anyone fool you, PHP/MySQL is not
> going to land you a job  [;)] "
> 
> now, as someone that was making avery good living doing Linux based
> web application development last year and now among the jobless I am beginning
> to question the validity of having all of my eggs in the LAMP  (linux apache mysql 
>php)
> basket.  I just recently built a NT4 to do some win based development on. I still 
>have
> not installed any development enviroment cause it just feels so alien. Has anyone 
>else
> out there feeling the pressure of going to the win32 side  to pay the bills.
> Thoughts?

Since the massive bankrupcy of many Internet companies, LAMP is no
longer so much on demand. What happened is that most of those companies
were technologically aware of the choices and were choosing LAMP
products because they have proven suitability for Internet development
and besides that they are inexpensive.

Many of the technology dependent companies that survived do not depend
on the Internet. Often Web development is for internal consumption. Many
of those companies used Microsoft products. People in charge of those
companies often only know about Microsoft's and other comercial products
that are well marketed. So, it is very hard to penetrate in those
companies with LAMP products.

There are certainly a reasonable number of companies that use LAMP
products, but they do it mostly for economical reasons. Therefore they
don't have a great budget to pay good salaries either.

For bigger companies, one of the main limitations of PHP and other Open
Source products is that, unlike commercial competitor products, they do
not add as much business value to somebody selling PHP solutions because
PHP costs nothing so there is no profit margin to earn by the people
that want to sell it even as a part of something else.

PHP needs to be better marketed or else it will fade from the well paid
job world. As I said, Java jobs are much more well paid, not only
because Java is harder to program and requires better prepared
developers, but also because Sun marketed Java so well that it was
created a demand for Java projects that nobody from the PHP world is
doing anything like that.

Despite PHP can be used for more than just Web applications, many PHP
developers are not making an effort to advertise it for more than just
Web development. This needs to be changed, because the world has changed
and those that don't adapt will not survive.

Java was also advertised initially for browser applets but Sun had to
adapt the strategy to the needs of the real world, they advertised and
made it suitable for mobile computing, server side Web scripting and Web
services. Mobile computing is a closed market. Server side scripting is
the only thing that PHP is advertised for but its position is seriously
threatned. Web services, PHP is not yet quite there nor there is a
perspective if and when it will ever be.

I don't want to be pessimistic, but in a couple of weeks .NET will be
officially released as the big thing that Microsoft will make it echo
everywhere with their raw marketing power. ASP.NET is catching up on the
huge delay that it used to had compared to PHP and other alternatives.
Web Services will be even more hyped than today.

Microsoft will try to make it evident that .NET is the most profitable
way to make money from Web development but only using .NET. It does not
matter how much of that will be effectively true. What matters is many
people that today still fall for LAMP/WAMP will reconsider and move to
.NET world because they will be convinced that is where they can make
money unlike with LAMP.

So, what do you do? For now, I just advise you to stay where you are if
you can live from what you are doing because we have to see how much of
this will become true. Anyway, I am afraid that part of it will become
true as advertised. If you want to stick with LAMP/WAMP, you'd better
check it out to see if you can developed what will be in demand. Here
some buzzwords to pay more attention: Web services, SOAP, WSDL, UDDI.

Regards,
Manuel Lemos
--- End Message ---
--- Begin Message ---
Hi everyone!

I'm trying to put  file names into variables which later I put into my
DB (MySQL) as text (only the filename and the extension).

I tried to use the upload format form before:
<form ENCTYPE=\"multipart/form-data\" ...>

....

<input type = FILE  name =\"file_name\"....>

.....

When I retrived the value of the variables, I did not get the FILE NAME
and the file extension.
What I got is all the path of the file and the file name changed into
.TMP or some sort.

How do I retrived file names and it's extension in this situation?

note: The original file extensions that I want to get are mostly .jpg or
.gif.

thanks for reviewing my email.

regards,
Dani

--- End Message ---
--- Begin Message ---
I've designed an architecture in PHP which is dependent on a class hierarchy
which has a parent class with a member variable which is a child object.
That child object contains a reference back to the parent. The problem I'm
running into is changes to the parent's member variables are not reflected
in the child's reference to the parent. Let me use a code example to
illustrate my point.

Class Parent {
  var $sTest = "apple";
  var $pChild;
  function Parent() {
    $this->pChild = new Child();
    $this->pChild->SetParent($this);
  }
}

Class Child {
  var $pParent;

  function SetParent(&$pParent) {
    $this->pParent = &$pParent;
  }
  function PrintParentData() {
    echo "Parents Test data: ".$this->pParent->sTest."<Br>\n";
  }
}

$pParent = new Parent();
$pParent->sTest = "orange";
echo "pParent->sTest = ".$pParent->sTest."<br>\n";
$pParent->pChild->PrintParentData();

// Prints:
// pParent->sTest = orange
// Parents Test data: apple

// Instead of :
// pParent->sTest = orange
// Parents Test data: orange

I've also tried changing the first line of the Parent constructor to :
    $this->pChild = & new Child();


I think I've coded this correctly as per the docs on references. I'm using
PHP4.1.1. My conclusions are :

1. This is not possible in PHP due to safety mechanisms built into the
language to safeguard against circular references (and infinite recursion).
2. I'm doing something wrong.

Thanks to anyone willing to take a stab...

Kevin Morris


--- End Message ---
--- Begin Message ---
Hi Guys,

  I want a affordable and the best control panel for my website.  Though i can make it 
myself but it make some time to do that.  Do any of you guys and gals know about this 
do let me know.

  Looking forward for yours earliest reponse.

karthikeyan.
--- End Message ---

Reply via email to