Re: [PHP] checking if e-mail address and syntax are valid

2001-04-24 Thread Szii

Actually, you can check the validity of the SMTP port to semi-validate the
domain.  The name of the recipient would be harder, but again, through
your standard user does not exist error messages/codes, you could
tell if the domain is valid, but the user is not.

Checking to see if it's syntactically correct is trivial.  Validating the
domain
is rather simple as well (check the retcode on a whois lookup.)  Validating
the user would require interpretation of the return mail message(s).

Again, it's not real-time validation of anything except the
existance/validity
of the domain - not the user.

'Luck

-Szii


- Original Message -
From: christopher hamilton [EMAIL PROTECTED]
To: Martin Skjoldebrand [EMAIL PROTECTED];
[EMAIL PROTECTED]
Sent: Tuesday, April 24, 2001 1:39 PM
Subject: RE: [PHP] checking if e-mail address and syntax are valid



 I'd like to add to that, before someone spends a lifetime searching for an
 answer ...

 Solution: There isn't one. You cannot do real-time validation of mail
 addresses. You must pick from a number of compromises.

 The section goes on describing how many RFC-valid addresses are
 undeliverable and on the opposite side of the coin, some RFC-invalid
 addresses are perfectly deliverable.

 Our best advice for verifying a person's mail address is to have them
enter
 their address twice, just as you would when changing a password.

 - Chris

   I would like to know if anyone has or know any PHP code to verify if a
   form entered e-mail address is valid?
  
   I would like that things like 4$%^%$@@.com.br could not be sent. I
only
   has to verify the syntax of it, the existance I believe should be
harder
   to verify but if it is possible I would be glad if anyone could point
me
   the way.
 
  This is taken from PHP Developers Cookbook. Don't ask me exactly what it
  does, because I don't know. I think I can grasp the basics of it though.

  It isn't fool proof tho.
 
 
  if (!eregi (^([a-z0-9_]|\\-|\\.)+@(([a-z0-9_]|\\-)+\\.)+[a-z]{2,4}$,
  $users)) die (Invalid email);


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

2001-04-19 Thread Szii

Did you remember to base64 it?  Perhaps some embedded chars
in the binary file are messing with you.

'Luck
-Szii

- Original Message -
From: Chris Anderson [EMAIL PROTECTED]
To: Marc Davenport [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Thursday, April 19, 2001 6:36 AM
Subject: Re: [PHP] Advanced Help Needed


 I have seen this before. For me it was a problem with the post
operation.I'd
 give specifics, but frankly I can't remember...sorry :(
 - Original Message -
 From: "Marc Davenport" [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Thursday, April 19, 2001 6:19 PM
 Subject: [PHP] Advanced Help Needed


 I need some help figuring something out that my host denies is his
problem.

 I have a suspicion that only someone who has run into this problem once
 before has the answer.

 I have this form which posts to a PHP file.  Sometimes I pass a file
along.
 This was info for a database and a picture along with it.   This worked
fine
 for the longest time.  Now it does not.
 when I post a file in the form I recieve an "Cannot Find Server".  When
 there isnt a file posted then the form works fine.  I dont understand
 because I recieve no PHP generated error messages, but rather a problem
 finding the site entirely.

 Has anyone ever seen this?

 Help would be much
 Marc Davenport



 --
 PHP General Mailing List (http://www.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] Which is better coding style...

2001-04-19 Thread Szii

IMHO, I like the second.  Too much real-code time to break old
habits.  I don't like returning mid-method.  I -really- don't like it. =)

As for the placement of braces...I like

/* return type */ function PhpFunction(params)
{
}

I'm usually not too worried about whitespace, either, so I'm all about

if (true)
{
  do_something();
}
else
{
  do_something_else();
}

Whitespace, IMHO, LOOKS less efficient but has the advantage of
being easier to follow/read/debug.  Also more space to put in debugging
snippets
in lieu of having a real interactive debugger with a stack trace.  And I've
got LOTS
of diskspace =)

function foo($varArray){foreach($varArray as $element){echo "this is
'tighter'\n";echo "but is it really worth it?\";} if (sizeof($varArray) ==
1){echo "1 element";}else{echo sizeof($varArray);} echo "Know what I mean,
Vern?";}


-Szii

- Original Message -
From: Chris Lee [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, April 19, 2001 3:51 PM
Subject: Re: [PHP] Which is better coding style...


 I would like to see an editor with a built in code beutifier and
un-beutifier. I like the

 if (true)
 {

 } else
 {

 }

 method, but pear standards are

 if (true) {

 } else {

 }

 it would be nice to see ultra edit convert it to the first format for me
and save it as the second for pear.


 --

  Chris Lee
  [EMAIL PROTECTED]



 "Philip Olson" [EMAIL PROTECTED] wrote in message
Pine.BSF.4.10.10104192119590.43248-10@localhost">news:Pine.BSF.4.10.10104192119590.43248-10@localhost...

 coding style?  here's what pear has to say :

   http://www.php.net/manual/en/pear.standards.php
   http://www.php.net/manual/en/pear.standards.control.php

   [ example ]

   switch (condition) {
   case 1:
   action1;
   break;

   case 2:
   action2;
   break;

   default:
   defaultaction;
   break;

   }

   [ /example ]


 variables can be very useful.
 return is cool too.

 :)

 regards,
 philip



 --
 PHP General Mailing List (http://www.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] how do I find out which checkbox is checked when form get submit

2001-04-18 Thread Szii

If a checkbox is NOT checked, the attached PHP variable is NOT set.  Only if
it
is checked will you be able to see/query the variable "id"

Using isset() should allow to you see the boolean state of a checkbox, or
using
the "value" component after you do an isset() call will give you the
specifics.

'Luck
-Szii

- Original Message -
From: Matt Williams [EMAIL PROTECTED]
To: Jacky [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Wednesday, April 18, 2001 2:26 AM
Subject: RE: [PHP] how do I find out which checkbox is checked when form get
submit


 Hi Jacky

 In it's simpliest form try this
 ###
 form action="?= $PHP_SELF; ?" method="get"
 input type="checkbox" name="id"br/
 input type="submit" name="submit" value="submit"

 /form
 ?php
 echo (isset($id)) ? "checked" : "not checked";
 ?
 ##



 
  Hi all,
  Extremely desparate here as I still cannot get my problem sought
  out, so decided
  to post my question again.
  Allow me to repeat my question again:
  I have a form with the checkbox like this
  form
  ?php
  $query="select id from foo";
  $result=($query,$con);
  while ($row = mysql_fetch_array($result))
   {
  print("input type="checkbox" name="$id" value="on"");
   }
  submit button and stuffs here...
  ?
  /form

 input type="checkbox" name="$id" value="on"

 
  After I tried check on few checkboxes and submit to next page, at
  next page, how do I check which check box is
  checked so that I can get value of the checked one to process to
  next step?
  I did try isset() and empty() to check if variable exist ( as shown
below)
  and did not work as the result always turn up to be "off"
 
 if((empty($id))=='true'){
  echo "off";
   }else{
 echo "on";
 }
 
  And I also try
  if(isset($id))
  {
..do echo off here...
  }else{
...do echo on
  }
 
  And the result is always "off" as well.
 
  Somene advice me to use $http_var_gets btu I could not find it
  from manaual,
  is that the solution I need?
  cheers
 
  Jack
  [EMAIL PROTECTED]
  "There is nothing more rewarding than reaching the goal you set
  for yourself"
 


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


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




Re: [PHP] What's XML's Purpose??

2001-04-16 Thread Szii

Do realize, of course, that you can return a dataset from a database in XML,
and store it client side.  Wanna sort by name?  Reorg the dataset.  In HTML
you'll have to make another round trip.  Wanna see your data sorted by time?
Reorg the dataset.  XML, while a little more tricky, does have some cool
features
that HTML just doesn't have.

Also, have you ever done inter-company data transfers?  How about to 8
different
people?  You write an XSL sheet for each one, and and XSLT.  Save yourself
days on import/export/data conversion routines, as well as validation of
"good"
data across the link.

True, XML's not the end-all be-all technology, but just another tool.
You choose not to learn it, that's all good; maybe you'll never use it.
But if you don't know it, at least a little bit, you may end up doing more
work in the long run because you won't recognize the instances where
XML will fit in beautifully and save you time.

Sure, you(generic form) can code PHP without any other programming knowledge
at all.
Sure, you(generic form) can even do it well without any other programming
knowledge.
But I guarantee you that even 1 "C" class, or better yet, a few programming
classes
will make a huge difference in your coding style, your ability, and your
knowledge of
what's "really going on" and how to optimise it.

XML, like the above example, is just another tool - just like a programming
language.
Sure, you may not need it, but once you have it, you'll find uses for it.

Peace, love, code.
-Szii


- Original Message -
From: Jason Caldwell [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Saturday, April 14, 2001 2:44 PM
Subject: Re: [PHP] What's XML's Purpose??


 amen brother!


 ""Plutarck"" [EMAIL PROTECTED] wrote in message
 9baam8$6sh$[EMAIL PROTECTED]">news:9baam8$6sh$[EMAIL PROTECTED]...
  I use to be really enthusiastically pro-XML just as I was getting into
 PHP,
  but now I've basically taken a "XML shmexXML" approach. I get the
initial
  attraction, but I would think the love would fade off a bit.
 
  The key that so many people seem to forget is the best way to do HTML is
  with, *gasp*, HTML!
 
  If you just want a webpage, XML is using a canon to kill a fly. It's
like
  creating classes and objects in PHP for sending text emails.
 
  Sure you can do it...but why?
 
  XML is new. Common society doesn't do well with new. They always manage
to
  screw it up somehow.
 
  XML started as an extensible markup language...that's it. That's all it
 was
  supposed to do! Now people are using it to query databases, and concoct
  entire search engines, and they are trying to use it to control access
to
  restricted data, etc etc.
 
  It's the same thing that happened with Java. People just aren't good
with
  "new".
 
 
  XML is nice, and for some things it's even great. But it's not the death
 of
  plain old HTML, just like ISDN didn't kill POTS (remember when ISDN was
 "the
  future of telecom"?).
 
  I fear that there are too many cooks in the kitchen on XML, all with a
  seasoning all their own that they are dead set on adding to the broth.
 
 
  But for me, I say let people play with their Java and XML and new
fangled
  widgets. I'll take my PHP and plain-old HTML, and I'll create twice as
 much
  material with just as high a quality, and I won't need to spend an extra
  minute learning a bleeding-edge technology.
 
  Life's too short to spend it learning how to live it. Translation:
Better
 to
  program than to learn yet _another_ language.
 
 
  --
  Plutarck
  Should be working on something...
  ...but forgot what it was.
 
 
  ""Chris Anderson"" [EMAIL PROTECTED] wrote in message
  002001c0c506$c70d7f00$0d1012d1@null">news:002001c0c506$c70d7f00$0d1012d1@null...
   thanks that helped
   I stll think it sounds like its more geared for the MS crowd
   - Original Message -
   From: "Brian Clark" [EMAIL PROTECTED]
   To: "PHP is not a drug." [EMAIL PROTECTED]
   Sent: Saturday, April 14, 2001 3:29 PM
   Subject: Re: [PHP] What's XML's Purpose??
  
  
Hi Chris,
   
@ 12:01:45 AM on 4/14/2001, Chris Anderson wrote:
   
 Am I missing something here?
   
This has been discussed many times. There was an extremely long
thread
last year about XML, but I can't find it in the archives.
   
Here's a good start:
   
http://marc.theaimsgroup.com/?l=php-generalm=97969195010857w=2
   
Use the 'next in thread' link to follow the thread.
   
-Brian
--
 PGP is spoken here: 0xE4D0C7C8
 Please, DO NOT carbon copy me on list replies.
   
   
   
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail:
 [EMAIL PROTECTED]
   
  
  
   --
   PHP General Mailing List (http://www.php.net/)
   

Re: [PHP] fwrite not writing

2001-04-16 Thread Szii

 if($force or !file_exists($filepath) or !filesize($filepath))

May I suggest

if ($force || (!file_exists($filepath)) || (!filesize($filepath)))

Probably won't make much difference, but I've never used the "or"
clause and cannot vouch for it's effectiveness.

Also, put a check in after the fopen() call and make sure you're
able to open up the file correctly.

Perhaps and fflush() call before the rewind() call to ensure that
the file buffer's actually written to disk before you try to re-read it?

'Luck

-Szii


- Original Message -
From: CC Zona [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, April 16, 2001 12:06 PM
Subject: Re: [PHP] fwrite not writing


 In article 9bejks$gl6$[EMAIL PROTECTED],
  [EMAIL PROTECTED] ("Plutarck") wrote:

  I'm not sure why it suddenly stopped working, but let's see if you
actually
  need it to work.
 
  First of all, I take it that you have content which you want to write
into a
  file. Correct?
 
  If so, why does it matter if the file you want to write it to has data
  anyway? If you are just going to add data into it, isn't it ok that it
is a
  zerolength file?

 It is needed.  I have a dynamically generated page.  Most of the content
 needs to be re-generated with every request.  But some of it needs to be
 re-generated far less often.  Rather than unnecessarily hit the db every
 time to get the exact same content, that content gets cached to an include
 file.  This function checks whether that file needs to get a content
 refresh, and if so rewrites that content.  (I'm not adding data to the
 file, I'm overwriting it.)

  Or is the problem that the file is _not_ actually zerolength, but PHP
says
  it's zerolength anyway?

 Nope, it's really zero length.  The filesystem agrees with PHP, and when I
 open it in a text editor the file is empty.

  Just try removing the !filesize() part, and then try executing the
function.

 I commented out the entire if() condition, it makes no difference.  Maybe
I
 have not made this clear enough: the problem is not in getting inside the
 loop.  The function *is* executing the loop, and *is* reaching the fwite()
 line as well as continuing without error past that line.  The frustrating
 part is that fwrite() is writing an empty string to the file instead of
 using the $content variable (which, when echoed immediately before that
 line, is definitely not empty/null).

  But maybe I just don't understand what you are trying to write and why.
  Could you be a little more specific what data is being saved in the
file,
  and what is in the file already?

 Sometimes the file has data, sometimes it doesn't; sometimes the file
 exists, sometimes it does.  Right now, unfortunately, the file remains
 empty. I'm trying to fill it with a large block of dynamically generated
 HTML which will then be used as a static include file for current and
 subsequent requests.



  "CC Zona" [EMAIL PROTECTED] wrote in message
  9bebi3$133$[EMAIL PROTECTED]">news:9bebi3$133$[EMAIL PROTECTED]...
 This function suddenly stopped working, and I just can't seem to
  figure
out
 why.  The only change made recently is that now the value of
$force at
 calltime is sometimes true instead of being undefined or null.

 build_file("file_content","/path/to/file.inc","w",TRUE);

 function build_file($func_name,$filepath,$mode="w",$force=FALSE)
{
if($force or !file_exists($filepath) or !filesize($filepath))
  file://echo
 filesize($filepath) shows '0'
   {
   $content=$func_name(); file://echo $content shows it's all
there
$fp=fopen($filepath,$mode);
fwrite($fp,$content);
rewind($fp); #temp test
   $read_back=fread($fp,10); #temp test
   echo "pfile content:/p\n $read_back"; #temp test,
displays
nothing
  fclose($fp);
   }
}

 I've tried putting echoes and "or die('Error on __LINE__')" on
every
  line,
 checked all the variable values, and found no answers from that.
 Everything shows exactly as it should be except that the content
that
 echoes out so nicely *doesn't ever get written to the file*.  The
  function
 runs to the end without error and the file's modification date is
even
 updated.  But the file remains empty. I'm probably missing
something
 ridiculously obvious, but would someone please be kind enough to
point
  out
 what it is?  Thank you!!
  
What is this:
   
!filesize($filepath)
  
   If filesize is zero (which it is groan), then do the rest (which it
   does--except the content it fetches never makes it into the file it
writes
   to.  How that can be, I dunno, but that apparently is what it's
doing...)
  
Add this above your if loop:
   
$filesize = filesize($filepath);
echo $filesize;
  
   Already tried echoing that and all the other va

Re: [PHP] Array Cleansing

2001-03-23 Thread Szii

You assign to $newloop, then do a ++$newloop, and THEN dump
$newloop.

ie, you assign to 0, inc to 1, and dump 1...which isn't filled in yet.

-Szii

- Original Message -
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Friday, March 23, 2001 12:07 PM
Subject: RE: [PHP] Array Cleansing



 This is the code I'm currently using

   /* testing stuff */
   echo "!-- testing for title\n";
   $newloop = 0;
   while ($loop  count($work))
 {
 if ($work[$loop] !== " ")
   {
   $lazy[$newloop] = $work[$loop];
   ++$newloop;
   }
 echo " Slot: $loop Value: $work[$loop] - NewSlot: $newloop
NewValue: $lazy[$newloop] \n";
 ++$loop;
 }
   echo " end testing for title --\n";
   /* end of test */

 And this is the output I'm getting

   !-- testing for title
  Slot:  Value:  - NewSlot: 1 NewValue:
  Slot: 1 Value:  - NewSlot: 2 NewValue:
  Slot: 2 Value:  - NewSlot: 3 NewValue:
  Slot: 3 Value:  - NewSlot: 4 NewValue:
  Slot: 4 Value:  - NewSlot: 5 NewValue:
  Slot: 5 Value:  - NewSlot: 6 NewValue:
  Slot: 6 Value:  - NewSlot: 7 NewValue:
  Slot: 7 Value:  - NewSlot: 8 NewValue:
  Slot: 8 Value: 4285 - NewSlot: 9 NewValue:
  Slot: 9 Value: 10.0 - NewSlot: 10 NewValue:
  Slot: 10 Value:  - NewSlot: 11 NewValue:
  Slot: 11 Value: 0.9 - NewSlot: 12 NewValue:
  Slot: 12 Value:  - NewSlot: 13 NewValue:
  Slot: 13 Value: 6876 - NewSlot: 14 NewValue:
  Slot: 14 Value: 1448 - NewSlot: 15 NewValue:
  Slot: 15 Value:  - NewSlot: 16 NewValue:
  Slot: 16 Value: ?? - NewSlot: 17 NewValue:
  Slot: 17 Value:  - NewSlot: 18 NewValue:
  Slot: 18 Value: S - NewSlot: 19 NewValue:
  Slot: 19 Value:  - NewSlot: 20 NewValue:
  Slot: 20 Value:  - NewSlot: 21 NewValue:
  Slot: 21 Value:  - NewSlot: 22 NewValue:
  Slot: 22 Value: 11:20AM - NewSlot: 23 NewValue:
  Slot: 23 Value:  - NewSlot: 24 NewValue:
  Slot: 24 Value: 22:08.66 - NewSlot: 25 NewValue:
  Slot: 25 Value: mpg123: - NewSlot: 26 NewValue:
  Slot: 26 Value:
08_-_DJ_Mark_Farina_-_Rae__Christian_-_Spellbound.mp3 - NewSlot: 27
NewValue:
  Slot: 27 Value: (mp - NewSlot: 28 NewValue:

 What I'd actually like to get out of it is something similiar to:

   !-- testing for title
  Slot:  Value:  - NewSlot: 1 NewValue: 4285
  Slot: 1 Value:  - NewSlot: 2 NewValue: 10.0
  Slot: 2 Value:  - NewSlot: 3 NewValue: 0.9
  Slot: 3 Value:  - NewSlot: 4 NewValue: 6876
  Slot: 4 Value:  - NewSlot: 5 NewValue: 1448
  Slot: 5 Value:  - NewSlot: 6 NewValue: ??
  Slot: 6 Value:  - NewSlot: 7 NewValue: S
  Slot: 7 Value:  - NewSlot: 8 NewValue: 11:20AM
  Slot: 8 Value: 4285 - NewSlot: 9 NewValue: 22:08.66
  Slot: 9 Value: 10.0 - NewSlot: 10 NewValue: mpg123:
  Slot: 10 Value:  - NewSlot: 11 NewValue:
08_-_DJ_Mark_Farina_-_Rae__Christian_-_Spellbound.mp3
  Slot: 11 Value: 0.9 - NewSlot: 12 NewValue: (mp
  Slot: 12 Value:  - NewSlot: 13 NewValue:
  Slot: 13 Value: 6876 - NewSlot: 14 NewValue:
  Slot: 14 Value: 1448 - NewSlot: 15 NewValue:
  Slot: 15 Value:  - NewSlot: 16 NewValue:
  Slot: 16 Value: ?? - NewSlot: 17 NewValue:
  Slot: 17 Value:  - NewSlot: 18 NewValue:
  Slot: 18 Value: S - NewSlot: 19 NewValue:
  Slot: 19 Value:  - NewSlot: 20 NewValue:
  Slot: 20 Value:  - NewSlot: 21 NewValue:
  Slot: 21 Value:  - NewSlot: 22 NewValue:
  Slot: 22 Value: 11:20AM - NewSlot: 23 NewValue:
  Slot: 23 Value:  - NewSlot: 24 NewValue:
  Slot: 24 Value: 22:08.66 - NewSlot: 25 NewValue:
  Slot: 25 Value: mpg123: - NewSlot: 26 NewValue:
  Slot: 26 Value:
08_-_DJ_Mark_Farina_-_Rae__Christian_-_Spellbound.mp3 - NewSlot: 27
NewValue:
  Slot: 27 Value: (mp - NewSlot: 28 NewValue:

 Any clue what I'm doing wrong? I mostly jsut can't figure out why all the
new fields keep coming up blank.

 --
 PHP General Mailing List (http://www.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] Should this work?

2001-02-08 Thread szii


foreach($some2DArray as $refToArrayRow)
{
}

It won't even parse with an error of
bParse error/b:  parse error, expecting `T_VARIABLE' or `'$'' in
b./myFile.php/b on line b473/bbr


Can you not use a reference within a foreach loop?  With the  removed,
it works fine but then when I update the $refToArrayRow it's (obviously)
not updating the original $some2DArray

-Szii

-- 
PHP General Mailing List (http://www.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] Creating Directorys (slightlyOT)

2001-02-07 Thread szii

Definately check the umask and uid/gid/eid.  Log in as that user and 
try to create it.  Most likely the server is running as "nobody" or
as another user and simply doesn't have access to it.
Run a ps -aux (on Linux - for other OS's your milage may vary) and 
see who that server is running as.  Make sure that the scripts executed
by process (x) aren't running as yet ANOTHER persona.  I know of a 
few programs which'll run as "nobody" and then run as "personX" for
all "userspace scripts."  That particular case is redundant, yes - many
programs that run as root will employ this to help quarantine userscripts
for security reasons though.

'Luck!

-Szii

At 12:11 AM 2/8/2001 -0700, Michael Dearman wrote:


[EMAIL PROTECTED] wrote:
 
 Hi,
 
 I am trying to install a free mailing list manager for a mate, I have spent
 numerous hours trying to figure out why it won`t setup properly. I
installed
 it on one of my own servers and it worked fine but not on his, however I
have
 now dwindled it down to the fact that his server won`t allow the script to
 create directorys. I have checked the chmod and that is fine but I`m
stumped.
 Anyone else have a possible solution??
 

Until someone who might actually know something shows up...

What platforms?
umask?
real uid, gid vs effective(the process running the script) uid, gid?
permissions of the parent directory?

I get all queezy when trying to sort this stuff out.

Mike D.

 Thanks
 Ade
 
 --
 PHP General Mailing List (http://www.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] Cobalt RaQ

2001-02-05 Thread szii

After hearing about "Coalt RaQ" a number of times on the list,
I thought I'd cruise over and check them out.

After doing so, I'm of the opinion that I'm missing something.

$1,200 USD for a 300Mhz 1u box?  $2,699 for a $450 w/256M RAM?
$3,599 for a $450 w/512 RAM and a dual 30G HDs?

What am I missing?  You can get a dual-P3 800 w/ 256 RAM
and a single 15G HD in a 1u for $2400 USD.  With RAM and
HDs being so cheap now, Is there something special about 
the RaQs?  Software?  Support?  I just don't see anything to 
warrant the higher pricing.  Are they RISC based and use the 
more expensive Sun chips with 2M SRAM?

Thanks...

-Szii

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

2001-02-05 Thread szii

1u is 1u.  There's no difference in size between the RaQ and a
standard 1u box, like the ones I described in my previous
post.

-Szii

At 05:32 PM 2/5/2001 -, Julian Morcinek wrote:
I'ts also the small footprint (ideal for racking at large ISP's and Data
Centres:  the prime market positioning of these boxes) and excellent MTBF's
(they just keep on trucking..)

You can also install SSH to maintain an encrypted 'telnet' session.

Julian
- Original Message -
From: "K.M. The" [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, February 05, 2001 5:18 PM
Subject: RE: [PHP] Cobalt RaQ


 The reason they're so expensive is not the hardware, it's the complete
 webbased administration tool you're paying for. The users these products
are
 targeted at, are those who can't administrate a server through a standard
 SSH/Telnet connection.

 Vincent The

 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
 Sent: Monday, February 05, 2001 6:12 PM
 To: [EMAIL PROTECTED]
 Subject: [PHP] Cobalt RaQ


 After hearing about "Coalt RaQ" a number of times on the list,
 I thought I'd cruise over and check them out.

 After doing so, I'm of the opinion that I'm missing something.

 $1,200 USD for a 300Mhz 1u box?  $2,699 for a $450 w/256M RAM?
 $3,599 for a $450 w/512 RAM and a dual 30G HDs?

 What am I missing?  You can get a dual-P3 800 w/ 256 RAM
 and a single 15G HD in a 1u for $2400 USD.  With RAM and
 HDs being so cheap now, Is there something special about
 the RaQs?  Software?  Support?  I just don't see anything to
 warrant the higher pricing.  Are they RISC based and use the
 more expensive Sun chips with 2M SRAM?

 Thanks...

 -Szii

 --
 PHP General Mailing List (http://www.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] Re: [PHP-DB] Connectivity to AS/400

2001-02-04 Thread szii

There's been a lot of talk about this recently.  Check the archives for the
last 2 months, and PHPBuilder.com

Last I heard, you needed DRDA(DB2 Connect) installed, as well as
the runtime client.

Also on the client - DB2 Application Development package.  Use this to
compile PHP --with-ibm-db2=path.  Make sure you run the CATALOG
commands on the client so that it can find the AS400 database.

'Luck!

-Szii

At 10:41 AM 2/4/2001 -0800, Pete Lancashire wrote:
I'm going to be trying to connect to the native DB2 database in a AS/400
So far thats all I know about the IBM side.

Can someone give me a short update on what options I have ?

TIA !!!

-pete

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


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




Re: [PHP] Pricing for PHP programming???

2001-02-02 Thread szii

When in doubt, go low - esp when you're just starting out.  If you're a good
coder, start at USD$20.  You may go from there once you're more comfortable
with the process, have a small list of clientele, and have refined your 
working environment (it's a little different than working for a company.)
If you start too high, you risk prematurely damaging your reputation, as well
as having difficulty finding clients.  Some places, like here in
California, you
need to stay within the "going rate" which is all over the place for a coder.
You'll have to evaluate it on a job-by-job basis.  If you're starting out,
I wouldn't
go above $60/hr, but it's entirely up to you.  If you don't contract on a
per project
basis, and stick to an hourly rate you have the option of raising that rate
at a 
later time.  If you do it on a per project basis, you can simply raise the
rate
between projects.  If you're too high, and have to come down it looks bad.
Tactfully done, it can give the subtle illusion that they're getting a
"good deal"
on you.  It's all about image at the negotiating table, and -percieved- value.
After that it's up to you to make it happen. 

Above all, watch them taxes.  Independent Contractors get hit (in the US)
with a business tax as well as the expected income tax.  1099-MISC 
income (ie, independent contract work) can really be a nasty shock if 
you don't account for the extra tax.  When I was first starting out, my first
year, I didn't know about it and ended up approx $10k in debt, as well as
being penalized for not making quarterly tax payments.  Not a big debt,
but it was definately an unwelcome shock come April 15th.

In this field your reputation is EVERYTHING.  The customer is always right,
and you should do everything you can to make them FEEL good.  Even if
thing's aren't going okay, as soon as they start doubting your skill, your
decisions, they may doubt using you. If they like you they'll return, 
and often times will refer you to other companies.  It's all about great code
and a "warm fuzzy" for the client.

'Luck

-Szii

At 11:23 AM 2/2/2001 -0600, you wrote:
So how do you know what to charge when youre independent and just starting?


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


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


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




Re: [PHP] connecting to AS400 DB2

2001-02-01 Thread szii

To connect to an AS400, you MUST HAVE THE DRDA package installed.
Then you just run the Unified ODBC as usual (which still don't use ODBC but
translate to DB2 CLI under the covers.)

Look for the DRDA stuff in the DB2 Connect area/CD-ROM.

There's stuff on phpbuilder.com about it too.

-Szii


At 01:33 PM 1/31/2001 -0500, Conover, Ryan wrote:
I was wondering if anyone as successfully pulled info from a DB2 Database on
As400. My enviroment is
Win2K server/php4.0.4/ZendOptimizer/IIS5. I was wondering how I could
directly query the AS400. Or would it be wiser to pull the info from the
AS400 into MSSQL Server.  I was wondering how I would do either of these
options.


Ryan Conover

-- 
PHP General Mailing List (http://www.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] Zend hit (Encoder price)

2001-01-25 Thread szii

IMHO, if you want to sell it then it's your right.  You coded it, you own
it, you
get to sell it.  

But I do know that for $6,000 I sure as hell am not buying it.
Maybe for a couple hundred...but $6,000?  No way.  I'd have to have
some seriously proprietary kickass scripts that cost me a huge investment
in time/money to develop to blow $6,000 just on keeping people from 
copying/tweaking them.  Even then, they're just scripts.  It'd be nice for
some encapsulated functionality, say, for database access, but
still, for $6,000 + runtime client?  Nah, PHP code's just not that complex
and for $6,000 I can set up a number of unique users in the database.

-Szii





At 08:56 AM 1/25/2001 -0500, Jim Jagielski wrote:
Sander Pilon wrote:
 
 
 
  Hello,
 
  What do you think about Zend position?
  http://php.weblogs.com/
  http://zend.com/phorum/read.php?num=3id=6277loc=0thread=6277
 
 
 I think that if Zend wants to sell it for $6000, then they have all right
 to. These guys have worked hard, and they deserve some cash for it.
 
 If people can't afford it at $6000, then that's their problem. Software is
 intellectual property, it shouldn't be free, and authors should be able to
 charge any price for it they want to charge for it.
 

There is, of course, the Encoder SE available via the commercial
subscription plan...

The Encoder is designed for (mostly) companies who design, develop
and sell PHP applications. Up to now, PHP has not been a viable
solution for distributed web apps, instead relying on companies
having to either become mini-ASPs, or taking the risk and
distributing the actual PHP scripts. And the sad fact is that
for many companies, they will disregard Licenses or NDAs or
agreements at the drop of a hat. So there has been resistance
to using PHP for apps designed for distro.

The Enocoder solves that.

If the solution that the Encoder provides isn't something you need,
they you don't need to pay :) If you want to distribute your
code for free, then most likely you'll be also sending the
text script, so you don't need the Encoder. If you are a small
shop, and want to dip your toes, the Commercial Subscription
allows you to distributed and sell your encoded apps at a
very reasonable price point... 

By the by, my other hat is [EMAIL PROTECTED], in the interests of
full disclosure. But feedback is always welcome!

-- 
===
   Jim Jagielski   [|]   [EMAIL PROTECTED]   [|]   http://www.jaguNET.com/
  "Casanova will have many weapons; To beat him you will
  have to have more than forks and flatulence."

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