[PHP] mysql_affected_rows() function

2004-01-06 Thread Tyler Longren
Hi,

I don't think mysql_affected_rows() is working like it should for me. 
In the manual for mysql_affected_rows() it has this (Example 1):

/* this should return the correct numbers of deleted records */
   mysql_query(DELETE FROM mytable WHERE id  10);
   printf(Records deleted: %d\n, mysql_affected_rows());

However, when I do this:
$delete_assignment = mysql_query(DELETE FROM consultingprojectassign
WHERE workerid='$assigned[$i]');
printf(Records deleted: %d\n, mysql_affected_rows());

It always says Records deleted: 0.  Even though the record was,
indeed, deleted.  I have an if statement also that says if
mysql_affected_rows()  1, then print an error message.  Well, since
it always returns 0, no matter what, the error is always shown, even
when the record is deleted.

As I understand it, if no WHERE clause is in the query, then it will
automatically return a 0.  As you can see, my query above does have a
WHERE clause.  Can anyone help me out?

Thanks!!!

Best Regards,
--
Tyler Longren
J.D. Web Services, L.C.

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



Re: [PHP] counting charactors

2004-01-06 Thread Tyler Longren
Hi Philip,

strlen() will work.
http://www.php.net/manual/en/function.strlen.php

Best Regards,
--
Tyler Longren
J.D. Web Services, L.C.

On Wed, 2004-01-07 at 01:25, Philip J. Newman wrote:
 can someone point me to the right place for a thing that would count charactors in a 
 string?
 
 ---
 Philip J. Newman
 Master Developer
 PhilipNZ.com [NZ] Ltd.
 [EMAIL PROTECTED]

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



Re: [PHP] mysql_affected_rows() function

2004-01-06 Thread Tyler Longren
Hi Cpt,

That's not the exact code.  The exact code is below.  Multiple workers
are being selected from a MULTIPLE select form field.  I just use a
while loop do go through the selected ones to delete them individually.

PHP Version: 4.3.4
MySQL Version: 4.0.17

$i=0;
while ($i = $selected) {
$delete_assignment = mysql_query(DELETE FROM webprojectassign WHERE
workerid='$assigned[$i]');
$i++;
}
if (mysql_affected_rows($delete_assignment)  1) {
$tpl-newBlock('message');
$tpl-assign(message,bERROR:/b There was an error deleting those
workers from the project.);
}
else {
$tpl-newBlock('message');
$tpl-assign(message,The workers have been deleted from the
project.);
}

If you (or anyone else) know of another way I should be doing this,
please let me know.  I'm open to any suggestions.

Best Regards,
--
Tyler Longren
J.D. Web Services, L.C.


On Tue, 2004-01-06 at 15:14, CPT John W. Holmes wrote:
 From: Tyler Longren [EMAIL PROTECTED]
 
  I don't think mysql_affected_rows() is working like it should for me.
  In the manual for mysql_affected_rows() it has this (Example 1):
 
  /* this should return the correct numbers of deleted records */
 mysql_query(DELETE FROM mytable WHERE id  10);
 printf(Records deleted: %d\n, mysql_affected_rows());
 
  However, when I do this:
  $delete_assignment = mysql_query(DELETE FROM consultingprojectassign
  WHERE workerid='$assigned[$i]');
  printf(Records deleted: %d\n, mysql_affected_rows());
 
  It always says Records deleted: 0.  Even though the record was,
  indeed, deleted.  I have an if statement also that says if
  mysql_affected_rows()  1, then print an error message.  Well, since
  it always returns 0, no matter what, the error is always shown, even
  when the record is deleted.
 
 I can't see a reason why that wouldn't work. Is that your exact code, i.e.
 you're not doing anything else between the mysql_query() call and the
 mysql_affected_rows() call? What versions of PHP/MySQL are you using?
 
 ---John Holmes...
 

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



[PHP] Getting results from Select Multiple HTML tag

2004-01-05 Thread Tyler Longren
Hi,

http://www.php.net/manual/en/faq.html.php#faq.html.select-multiple

I read that.  Doesn't work in php since the whole register_globals
thing.  Now, when I get the results from a form, they're all in a
$_POST[] array.  Example.

When I have a select name=test MULTIPLE
I would have to access the values of the test field like this:
count($_POST['test']);

But since I have to have the [] in the name=select name=test[]
MULTIPLE ()part, I get parse errors when trying to read it:
ex: count($_POST['test[]']);

That doesn't even look right.  Anyone understand what I'm tryin to get
at?  Any help would be great.

Best Regards,
--
Tyler Longren
J.D. Web Services, L.C.

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



Re: [PHP] Getting results from Select Multiple HTML tag

2004-01-05 Thread Tyler Longren
Oh yea, I also searched the archives at
http://marc.theaimsgroup.com/?l=php-general

There were quite a few releated postings, but no answers!  Mostly it was
dick heads telling people that need help to RTFM.  So, if you don't have
any real help for me, then disregard my question.  Telling me to RTFM
won't help cuz I've red that section.  Don't tell me to STFA (search the
fuckin archives???), cuz I've done that also.

Thanks for your understanding!

tyler

On Mon, 2004-01-05 at 22:05, Tyler Longren wrote:
 Hi,
 
 http://www.php.net/manual/en/faq.html.php#faq.html.select-multiple
 
 I read that.  Doesn't work in php since the whole register_globals
 thing.  Now, when I get the results from a form, they're all in a
 $_POST[] array.  Example.
 
 When I have a select name=test MULTIPLE
 I would have to access the values of the test field like this:
 count($_POST['test']);
 
 But since I have to have the [] in the name=select name=test[]
 MULTIPLE ()part, I get parse errors when trying to read it:
 ex: count($_POST['test[]']);
 
 That doesn't even look right.  Anyone understand what I'm tryin to get
 at?  Any help would be great.
 
 Best Regards,
 --
 Tyler Longren
 J.D. Web Services, L.C.

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



Re: [PHP] Getting results from Select Multiple HTML tag

2004-01-05 Thread Tyler Longren
Hi Tom,

$_POST['test'][] doesn't work.  I thought I had tried $test =
$_POST['test'] before and it didn't work.  I just tried it though and it
seemed to work.

Thanks Tom!

Tyler

On Mon, 2004-01-05 at 22:20, Tom Rogers wrote:
 Hi,
 
 Tuesday, January 6, 2004, 2:05:47 PM, you wrote:
 TL Hi,
 
 TL http://www.php.net/manual/en/faq.html.php#faq.html.select-multiple
 
 TL I read that.  Doesn't work in php since the whole register_globals
 TL thing.  Now, when I get the results from a form, they're all in a
 TL $_POST[] array.  Example.
 
 TL When I have a select name=test MULTIPLE
 TL I would have to access the values of the test field like this:
 TL count($_POST['test']);
 
 TL But since I have to have the [] in the name=select name=test[]
 MULTIPLE ()part, I get parse errors when trying to read it:
 TL ex: count($_POST['test[]']);
 
 TL That doesn't even look right.  Anyone understand what I'm tryin to get
 TL at?  Any help would be great.
 
 TL Best Regards,
 TL --
 TL Tyler Longren
 TL J.D. Web Services, L.C.
 
 
 try $_POST['test'][]
 or copy it to another array
 
 $test = $_POST['test'];
 
 print_r($test);

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



[PHP] Parse error in mysql_query()

2003-12-22 Thread Tyler Longren
Error:
Parse error: parse error, expecting `']'' in
/usr/local/apache/htdocs/UP/index.php on line 871

Line 871:
mysql_query(INSERT INTO domainregistrations (domain,type,years,price)
VALUES
('$_POST[domainregister_domain$i]','$_POST[domainregister_type$i]','$_POST[domainregister_years$i]','$_POST[domainregister_price$i]'));

Anyone know why that parse error is happening?  I can't find a missing
] anywhere.

Any help would be greatly appreciated.

Thanks,
Tyler Longren

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



RE: [PHP] Parse error in mysql_query()

2003-12-22 Thread Tyler Longren
Sorry, should have mentioned that I tried quoting them already.  That
gives a T_VARIABLES parse error.

Thanks for the reply,
Tyler

On Mon, 2003-12-22 at 12:30, Sam Masiello wrote:
 Perhaps it doesn't like the fact that you don't have quotes around your
 array keys?
 
 --Sam
 
 
 Tyler Longren wrote:
  Error:
  Parse error: parse error, expecting `']'' in
  /usr/local/apache/htdocs/UP/index.php on line 871 
  
  Line 871:
  mysql_query(INSERT INTO domainregistrations
  (domain,type,years,price) VALUES
 
 ('$_POST[domainregister_domain$i]','$_POST[domainregister_type$i]','$_PO
 ST[domainregister_years$i]','$_POST[domainregister_price$i]'));
  
  Anyone know why that parse error is happening?  I can't find a
  missing ] anywhere. 
  
  Any help would be greatly appreciated.
  
  Thanks,
  Tyler Longren

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



RE: [PHP] Parse error in mysql_query()

2003-12-22 Thread Tyler Longren
Hi Matt,

I put this right above like 871:
print brbr$_POST[domainregister_domain$i]brbr;

So now that print line is 871.  It produces the exact same error as
the mysql_query() line.

The reason I'm doin it like this is cuz I'm dynamically generating
forms, and lots of the fields are the same, just with different numbers
at the end:
ex:
domainregister_domain1
domainregister_domain2

Those field names are generated by PHP for the form, and now I'm doing
the page to process that form.  Would doing
$_POST['domainregister_domain'][$i] get the correct value from my
domainregister_domain1 field if $i=1?

Thanks,
Tyler

Thanks,
Tyler

On Mon, 2003-12-22 at 12:47, Matt Matijevich wrote:
 [snip]
 Sorry, should have mentioned that I tried quoting them already.  That
 gives a T_VARIABLES parse error.
 
 Thanks for the reply,
 Tyler
 [/snip]
 
 What happens if you comment out the mysql statement and just echo the
 variables?
 
 echo $_POST[domainregister_domain$i]
 $_POST[domainregister_type$i];

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



Re: [PHP] Parse error in mysql_query()

2003-12-22 Thread Tyler Longren
Doing this fixed it:
mysql_query(INSERT INTO domainregistrations (domain,type,years,price)
VALUES
('$_POST[domainregister_domain]$i','$_POST[domainregister_type]$i','$_POST[domainregister_years]$i','$_POST[domainregister_price]$i'));

I just moved the $i to the outside of the [] and it works now.

Thanks for everyone's input..helped me open my eyes a bit.

Tyler

On Mon, 2003-12-22 at 12:51, John W. Holmes wrote:
 Tyler Longren wrote:
  Error:
  Parse error: parse error, expecting `']'' in
  /usr/local/apache/htdocs/UP/index.php on line 871
  
  ('$_POST[domainregister_domain$i]',
 
 If you're going to be creating array keys like that, break out of the 
 string to do it.
 
 (' . $_POST['domainregister_domain' . $i] . ', ...
 
 Having a key like that kind of begs the question of why you're not just 
 using $_POST['domainregister_domain'][$i], though...
 
 -- 
 ---John Holmes...
 
 Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/
 
 php|architect: The Magazine for PHP Professionals  www.phparch.com

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



Re: [PHP] mysql_error() problem?

2003-08-14 Thread Tyler Longren
hmmm...perhaps that was it.  When I had this issue before, someone told me
to check mysql_affected_rows() when using issuing an UPDATE query.  I'll
give that a shot.

Thanks!
Tyler

- Original Message - 
From: CPT John W. Holmes [EMAIL PROTECTED]
To: Tyler Longren [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Wednesday, August 06, 2003 3:35 PM
Subject: Re: [PHP] mysql_error() problem?


 From: Tyler Longren [EMAIL PROTECTED]
  I'm running an UPDATE query on my table.  After executing the query, I
 check
  mysql_error() to see if there's any errors:
  if (mysql_error() == ) {
  // success
  }
  else {
  // failure
  }
 
  mysql_error() is always empty even if the query didn't succeed.  So it
  always thinks it succeeds.  I remember having this problem once quite a
  while ago.  I remember somebody telling me that it had something to do
 with
  UPDATE.  Is there a better way to check for errors?

 Please define didn't succeed... There is a difference between the query
 generated an error which is caught with mysql_error() and the query did
 not affect any rows which is caught by mysql_affected_rows().

 ---John Holmes...


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





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



[PHP] Templates, custom functions, mysql

2003-08-14 Thread Tyler Longren
Hi list,

I'm using TemplatePower (http://templatepower.codocad.com/) as my template
engine.  There will be multiple rows of results, and the data is stored in
the $tpl-assign(); parts.  The function gets projects for a given employee.
My function is at the bottom of this e-mail.

The problem is that I can't get the results to be printed to my $template,
or $home_tpl.  $home_tpl is named home.tpl, and that's where the html code
is that displays the results from worker_projects();

Can anyone help me out here?  If you need more info, just let me know.

Tyler Longren
[EMAIL PROTECTED]

CODE BELOW

function worker_projects() {
 $template = $home_tpl;
 $tpl = new TemplatePower($template);
 $tpl-prepare();
 // Begin getting consulting projects.
 $consultingproject_sqltext = SELECT
customer.custid,customer.ownorgname,customerorder.custid,consultingproject.p
rojectid,consultingproject.description,consultingproject.startdate,consultin
gproject.enddate,consultingprojectassign.workerid,consultingprojectassign.pr
ojectid
 FROM consultingproject,consultingprojectassign, customerorder, customer
 WHERE consultingprojectassign.workerid='$_COOKIE[workerid]'
 AND consultingproject.projectid=consultingprojectassign.projectid
 AND consultingproject.ordid = customerorder.ordid
 AND customer.custid = customerorder.custid
 ORDER BY enddate ASC;
 $consultingproject_sql = mysql_query($consultingproject_sqltext);
 if (mysql_num_rows($consultingproject_sql)  1) {
  $tpl-newBlock('no_consulting_projects');
  $tpl-assign(no_consulting_projects,You don't have any consulting
projects.);
 }
 else {
  $alternate = 1;
  $tpl-newBlock('consulting_projects');
  while ($row = mysql_fetch_array($consultingproject_sql)) {
   $tpl-newBlock('consulting_projects_data');
   $tpl-assign(consulting_projectid,$row[projectid]);
   $tpl-assign(consulting_company,$row[ownorgname]);
   $tpl-assign(consulting_startdate,$row[startdate]);
   $tpl-assign(consulting_enddate,$row[enddate]);
   if ($alternate == 1) {
$color = #ff;
$tpl-assign(row_color,$color);
$alternate = 2;
   }
   else {
$color = #cecece;
$tpl-assign(row_color,$color);
$alternate = 1;
   }
  }
 }
   mysql_close($connection);
   $tpl-printToScreen();
   return $tpl;
 // End getting consulting projects.
}



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



[PHP] mysql_error() problem?

2003-08-07 Thread Tyler Longren
Hi,

I'm running an UPDATE query on my table.  After executing the query, I check
mysql_error() to see if there's any errors:
if (mysql_error() == ) {
// success
}
else {
// failure
}

mysql_error() is always empty even if the query didn't succeed.  So it
always thinks it succeeds.  I remember having this problem once quite a
while ago.  I remember somebody telling me that it had something to do with
UPDATE.  Is there a better way to check for errors?

Thanks,
Tyler



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



[PHP] Using link to submit a form

2003-07-30 Thread Tyler Longren
Hi everyone,

Can I replace Submit buttons on forms with a text button?
I need to be able to click on a link:
a href=index.php?option=editEdit/a

and have it submit the form.  The form only contains one field...does anyone
know how to do this?  I've been searching google for an answer, but couldn't
find any info that really applies to my question.  This isn't exactly a PHP
related question, but php is hugely involved in this project.

Thanks!
Tyler Longren



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



Re: [PHP] PHP5?

2003-07-23 Thread Tyler Longren
the latest stable version of PHP works just fine with Apache 2.0.47.

tyler

- Original Message - 
From: Jonathan Villa [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, July 23, 2003 11:47 AM
Subject: [PHP] PHP5?


 Has anyone installed PHP 5 on Apache 2.0.47?  What version of Apache 2
 works best with PHP 5? 
 On both Windows and Linux?
 


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



[PHP] uploading images

2003-06-23 Thread Tyler Longren
Hi,

I'm trying to upload a small image via a form.  This code worked with php
versions prior to 4.1.0.  I assume it would still work if register_globals
was turned on.

Here's the error:
Warning: fread(): supplied argument is not a valid stream resource in
/home/sites/site2/users/tyler/web/upload.php on line 28

And here's line 28:
$data = fread(fopen($_POST['binFile'], r), filesize($_POST['binFile']));

Am I doing that correctly?  If you need to see more code, let me know.

Thanks everyone!
Tyler Longren


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



Re: [PHP] Sessions?

2003-06-18 Thread Tyler Longren
Did you try taking a look at the manual?

Tyler

- Original Message -
From: Lee Elenbaas [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, June 18, 2003 1:06 PM
Subject: [PHP] Sessions?


 Hi,

 I have failed to find the information I am looking for on session
management
 by PHP - do they use cookies? Is there a way to use URL rewriting? How do
I
 find the timeout time? is there a way to close a session manually?
 It seem to me like all those questions got to have answers for them
 somewhere, I just look in the wrong place
 Help is appreciated :-)

 lee

 ---
 Outgoing mail is certified Virus Free.
 Checked by AVG anti-virus system (http://www.grisoft.com).
 Version: 6.0.490 / Virus Database: 289 - Release Date: 16/06/2003




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



Re: [PHP] Duplicate records

2003-06-06 Thread Tyler Longren
why not just make the 'id' field in the table auto_increment?

tyler

- Original Message - 
From: Steve Marquez [EMAIL PROTECTED]
To: MySQL List [EMAIL PROTECTED]
Cc: PHP eMail List [EMAIL PROTECTED]
Sent: Friday, June 06, 2003 2:40 PM
Subject: [PHP] Duplicate records


 Hello.

 I am adding a record to a MySQL Database using PHP. I have the records
 listed by the field: $id_num.

 I want the DB to be updated only with new id numbers, and return an error
if
 there is a duplicate number already in the DB.

 Here is the code I am using:

 ?php

 $insert_data = INSERT into articles

 Values ( 'a href=\upload_form.php?id_num=$id_num\edit/a', 'a
 href=\delete.php?id_num=$id_num\delete/a', '$id_num', '$title',
 '$author', '$article_contents', '$start_date', '' );;

 $response = mysql_query( $insert_data, $dbh );


 $get_table_data = SELECT * FROM ccfs;
 $response = mysql_query( $get_table_data, $dbh );

 ?

 Can anyone help me? Hope this makes sense.

 Thanks!

 Steve Marquez
 Marquez Design
 [EMAIL PROTECTED]

 www.marquez-design.com


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





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



[PHP] What do these errors mean?

2003-02-21 Thread Tyler Longren
Hi,

I was looking through php.ini and noticed that show_error was set to Off.  I
turned it On, and now I see these errors on one of my pages:
Notice: Use of undefined constant option - assumed 'option' in
/usr/local/apache/htdocs/tyler/encodeDecode.php on line 37

Notice: Undefined index: option in
/usr/local/apache/htdocs/tyler/encodeDecode.php on line 37

Here's line 37-42:
if ($_GET[option] == ) {
 print font face=Arial size=4bAdd Credit Card/b/fontbr;
 print form method=POST action=encodeDecode.php?option=encrypt
 font face=Arial size=2bCredit Card Number:/b/font input type=text
name=ccbr
 input type=submit value=Add/form;
}

What's wrong with that?

Thanks,
Tyler


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




Re: [PHP] Cannot find php.ini

2003-02-21 Thread Tyler Longren
Default location is:
/usr/local/lib/php.ini

You can also do a:
locate php.ini

Good luck,
Tyler

- Original Message - 
From: Kevin Paz [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, February 21, 2003 1:03 PM
Subject: [PHP] Cannot find php.ini


 
 I've taken over a redhat server with apache/php4.1.  I need to enable
 register_argc_argv but I can't find the php.ini file (I've searched the
 entire system).
 
 Would creating a new php.ini file with only register_argc_argv line work?
 Where's the default location for php.ini?
 
 
 Thanks in advance,
 
 Kevin
 
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 

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




Re: [PHP] What do these errors mean?

2003-02-21 Thread Tyler Longren
The actual name of the variable in that message is display_errors, not
show_error.

tyler

- Original Message -
From: Tyler Longren [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, February 21, 2003 1:01 PM
Subject: [PHP] What do these errors mean?


 Hi,

 I was looking through php.ini and noticed that show_error was set to Off.
I
 turned it On, and now I see these errors on one of my pages:
 Notice: Use of undefined constant option - assumed 'option' in
 /usr/local/apache/htdocs/tyler/encodeDecode.php on line 37

 Notice: Undefined index: option in
 /usr/local/apache/htdocs/tyler/encodeDecode.php on line 37

 Here's line 37-42:
 if ($_GET[option] == ) {
  print font face=Arial size=4bAdd Credit Card/b/fontbr;
  print form method=POST action=encodeDecode.php?option=encrypt
  font face=Arial size=2bCredit Card Number:/b/font input
type=text
 name=ccbr
  input type=submit value=Add/form;
 }

 What's wrong with that?

 Thanks,
 Tyler


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




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




[PHP] mcrypt not fully decrypting?

2003-02-21 Thread Tyler Longren
Hi,

I'm going to start encrypting credit cards with the mcrypt functions.  I
encrypted the credit cards like so:
$key = 'test';
  $cc = 1234567890123456;
  $td = mcrypt_module_open ('tripledes', '', 'ecb', '');
  $key = substr ($key, 0, mcrypt_enc_get_key_size ($td));
  $iv_size = mcrypt_enc_get_iv_size ($td);
  $iv = mcrypt_create_iv ($iv_size, MCRYPT_RAND);

  // Initialize encryption handle
  if (mcrypt_generic_init ($td, $key, $iv) != -1) {
   // Encrypt data
   $ciphertext = mcrypt_generic ($td, $cc);
   mcrypt_generic_deinit ($td);

   // Reinitialize buffers for decryption
   mcrypt_generic_init ($td, $key, $iv);
   $plaintext = mdecrypt_generic ($td, $ciphertext);

   // Clean up
   mcrypt_generic_deinit ($td);
   mcrypt_module_close ($td);
print font face=Arial size=2bCiphertext:/b $ciphertextBr;
 print bPlaintext:/b $plaintext/font;
  }

Sometimes, when I decrypt a cc it contains binary data...it's not fully
decrypted.  There's some plaintext in it and there's also binary.  Does
anyone know why this happens or how I can fix it?

Thanks,
Tyler


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



[PHP] getting result from mysql decode() function

2003-02-18 Thread Tyler Longren
Hi,

I have this query:
$decode = mysql_query(SELECT decode(\$data\, \$password\));

It decodes the $data using the $password.  How do I go about printing the
result?

Thanks,
Tyler


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




Re: [PHP] Redirect without header or javascipt

2003-02-18 Thread Tyler Longren
no

tyler

- Original Message - 
From: Daniel Guerrier [EMAIL PROTECTED]
To: php user group [EMAIL PROTECTED]
Sent: Tuesday, February 18, 2003 4:59 PM
Subject: [PHP] Redirect without header or javascipt


 Is there any to redirect in php with using header()
 and without the use of javascript?
 
 __
 Do you Yahoo!?
 Yahoo! Shopping - Send Flowers for Valentine's Day
 http://shopping.yahoo.com
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 

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




Re: [PHP] PHP 4.3 Apache 2

2003-01-01 Thread Tyler Longren
Yup, still experimental.  But from what I've experienced, they work just
fine together.  I run Apache 2.0.43 and PHP 4.3.0 together without any
problems what so ever.  When you compile php with apache 2, remember to:
./configure --with-axps2
instead of
./configure --with-apxs

tyler

- Original Message -
From: Rasmus Lerdorf [EMAIL PROTECTED]
To: Scott Seidl [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Wednesday, January 01, 2003 10:59 PM
Subject: Re: [PHP] PHP 4.3  Apache 2


 It is still experimental.

 On Wed, 1 Jan 2003, Scott Seidl wrote:

  Does the new release of PHP 4.3 have official support with Apache 2.x or
is
  it still considered developmental?
 
  Thanks
 
 
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php
 

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




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




Re: [PHP] Missing logos

2002-12-31 Thread Tyler Longren
- Original Message -
From: Richard A Downing [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, December 31, 2002 5:54 AM
Subject: [PHP] Missing logos


 I have just installed 4.3.0 with apache2.0.43.
 Running a standard test.php file consisting solely of:

 ?phpinfo(); ?

 results in incorrect html with the image sources of the logo incorrectly
 formed.  See below.  The src=d/public_html/test.php?=PHP... should, I
 think be  src=~/public_html/test.php?=PHP.

 I regret I'm neither an html expert nor, yet, a PHP user, the objective as
 to get a system to learn with.

 As I can't find this reported here or in the bugs database, I suspect I
have
 made in installation error.  Can anyone enlighten me?

 Thanks,
 Richard

Nothing is wrong with your installation.  The image is just being pulled
from a non-traditional location.

tyler


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




Re: [PHP] problem including a file

2002-12-30 Thread Tyler Longren
- Original Message - 
From: Omar [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, December 30, 2002 1:32 PM
Subject: [PHP] problem including a file


 I have an include line in all the php files i write
 something like -- include('connection.inc');
 The include path is d:\includes. (win nt 4, php 3.0.11) It worked fine
 before but today failed to open the include file.
 Does anyone has a clue about what could cause this problem?
 Thank you.
 

Hello Omar,

What error did you recieve?

Tyler

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




Re: [PHP] Multiple forms

2002-12-30 Thread Tyler Longren
- Original Message -
From: Doug Coning [EMAIL PROTECTED]
To: php-general [EMAIL PROTECTED]
Sent: Monday, December 30, 2002 3:26 PM
Subject: [PHP] Multiple forms


 Hi all,

 I have an update page that has a form in it.

 However, I want to add another form in the same page.  My current form
acts
 upon itself (i.e. Action = the same page).  If I set up another form to do
 the same, how would my PHP determine with action submit button was acted
 upon?

 Currently, for the single form here is how it knows a form was submitted:

 if ((isset($HTTP_POST_VARS[MM_update]))  ($HTTP_POST_VARS[MM_update]
 == form1)) {

 How would I test which form submitted the action?

 Thanks and if I didn't make myself clear, I apologize.

 Doug


Hi Doug,

I handle it like this (I think):

Then, to process your form:
?
if ($_POST[option] == ) {
// the form code should go here
}

else if ($_POST[option] == form1) {
print This will parse form1;
}

else if ($_POST[option] == form2) {
print This will parse form2;
}
?

I haven't done this in a while though, so this may not work for you.

Good luck,
Tyler


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




Re: [PHP] PHPTriad on Windows XP?

2002-10-01 Thread Tyler Longren

Did you even try to find the answer by yourself?  You could have found
the answer to this on the PHPTriad(now called Sokkit) homepage:
http://www.phpgeek.com/sokkit/

The answer is listed under Sokkit Requirements.

tyler

On Tue, 1 Oct 2002 17:19:13 -0500
Stephen [EMAIL PROTECTED] wrote:

 Just wondering but is it possible to install and use PHPTriad on
 Windows XP Professional? I had it on my Windows 98 machiene but then
 formatted and went up to Windows XP Pro.
 
 Thanks,
 Stephen

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




Re: [PHP] PHP version

2002-10-01 Thread Tyler Longren

yes, that would work much better.

tyler

On Tue, 01 Oct 2002 20:11:21 -0400
Brad Bonkoski [EMAIL PROTECTED] wrote:

 Sorry...
 I think:
 http://www.php.net/manual/en/function.phpversion.php
 will be more inline with what you want...
 -Brad
 
 Alex Shi wrote:
 
  Is there any way to report PHP version?
 
  --
  ---
  TrafficBuilder Network:
  http://www.bestadv.net/index.cfm?ref=7029
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php

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




Re: [PHP] PHP version

2002-10-01 Thread Tyler Longren

You can get it out of this variable:
_SERVER[SERVER_SOFTWARE]

tyler

On Tue, 1 Oct 2002 20:03:25 -0400
Alex Shi [EMAIL PROTECTED] wrote:

 Is there any way to report PHP version?
 
 
 -- 
 ---
 TrafficBuilder Network: 
 http://www.bestadv.net/index.cfm?ref=7029
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php

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




Re: [PHP] The latest PHP version??? NOT Ver7.2??

2002-10-01 Thread Tyler Longren

latest version is:
4.2.3

not 7.2

tyler

On Wed, 2 Oct 2002 10:36:08 +0800 (CST)
¼ÒÎÄ ·½ [EMAIL PROTECTED] wrote:

 thanks.
 
 Can you email me???
 
 _
 Do You Yahoo!? 
 ·¢¶ÌÐÅÓ®ÊÖ»ú,¿ìÀ´²Î¼ÓÑÅ»¢¾ÞÐÇÐã!
 http://cn.ent.yahoo.com/star/midautumn/index.html
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php

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




Re: [PHP] strange bug(?) when opening lots of files

2002-09-17 Thread Tyler Longren

How long does the script tend to run before it just quits?  Perhaps
a timeout is set too low in php.ini.

Take a look at max_execution_time in php.ini

tyler

On Tue, 17 Sep 2002 23:14:46 +0100
Shane Wright [EMAIL PROTECTED] wrote:

 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1
 
 Hi
 
 One of my pages opens ~100 files, reads from them, and closes them,
 (only one file open at a time).
 
 The problem is that the page just dies mid-way through execution - no
 errors, no segfault, it just dies and returns a blank page to the
 user.  the problem goes away if I reduce the number of files accessed.
 
 its a build of PHP 4.1.2 on Linux running as an Apache module,  (if it
 makes any odds, the configure line is below).
 
 I can't see anything on bugs.php.net about this - has anyone seen this
 before (and, of course, the crucial question; what can I do to fix
 it?)
 
 Any help appreciated,
 
 Thanks
 
 - -- 
 Shane
 http://www.shanewright.co.uk/
 Public key: http://www.shanewright.co.uk/files/public_key.asc
 
 
  './configure' '--with-gd' '--enable-gd-native-ttf'
  '--enable-track-vars' 
 '--enable-sysvsem' '--enable-sysvshm' '--enable-calendar'
 '--with-zlib' '--prefix=/opt/php-4.1'
 '--with-config-file-path=/usr/local/etc/httpd/conf'
 '--enable-memory-limit' '--with-db2=/usr' '--with-db3=/usr'
 '--with-gdbm=/usr' '--with-ndbm=/usr' '--with-dbase' '--with-xml'
 '--with-expat-dir=/usr' '--enable-debugger' '--enable-ftp'
 '--with-ttf' '--with-jpeg-dir=/usr' '--enable-bcmath' '--with-openssl'
 
 '--enable-trans-sid' '--with-mysql=/usr' '--with-xpm-dir=/usr/X11R6' 
 '--with-png' '--with-png-dir=/usr' '--with-imap' '--with-dom=/usr' 
 '--with-bz2' '--with-curl' '--with-mhash=/usr' '--with-mcrypt=/usr' 
 '--with-pgsql' '--with-gmp' '--with-gettext' '--with-iconv'
 '--with-kerberos' '--enable-xslt' '--with-xslt-sablot'
 '--with-freetype-dir=/usr' '--with-apxs=/usr/sbin/apxs'
 -BEGIN PGP SIGNATURE-
 Version: GnuPG v1.0.7 (GNU/Linux)
 
 iD8DBQE9h6lW5DXg6dCMBrQRAhhiAKCIo1xdyyDtx7fT8SO8Xz4bfWOg7QCfdjE3
 STUVeNEID6bzu4+hq+PqCI4=
 =zZqL
 -END PGP SIGNATURE-
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php

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




Re: [PHP] subdomain

2002-09-10 Thread Tyler Longren

Try this:
$subdomain = $_SERVER[SERVER_NAME];

And then get all the text before the first ..

Tyler

On Wed, 11 Sep 2002 10:55:56 +1000
Liam MacKenzie [EMAIL PROTECTED] wrote:

 G'day everyone,
 
 I have a dilemma...
 I'm running BIND locally, with a wildcard A record.
 That means that if someone goes to http://somebullshit.mydomain.com/
 they'll get my page up.
 
 What I want to do is catch that subdomain into a variable...  Is there
 a PHP global that can get that?
 So, if someone goes to http://liam.mydomain.com/, the page will echo
 Hello Liam
 
 Any ideas guys?
 
 Cheers,
 Liam
 
 
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 

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




Re: [PHP] Don't read if easily offended...

2002-09-10 Thread Tyler Longren

You should check to make sure the variable isn't empty.  And if it is
put some other name in there (like Bill Clinton).

Cuz if you go to just http://fuckedyourmum.com, you just get:
fucked your Mum!!! for text.

Just a suggestion,
Tyler

On Wed, 11 Sep 2002 12:08:03 +1000
Liam MacKenzie [EMAIL PROTECTED] wrote:

 Give a man a day at home sick with nothing to do, and you get some...
 Interesting results...
 
 http://bill.clinton.fuckedyourmum.com/
 
 Try your mate's name in there...  =)
 
 Thank's for everyone's help in producing this absolutely useless
 masterpiece!
 
 Cheers,
 Liam
 
 
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php

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




Re: [PHP] Count in PHP

2002-09-09 Thread Tyler Longren

$sql = mysql_query(SELECT * FROM table ORDER BY whatever);
echo(mysql_num_rows($sql));

that should do it.

tyler

On Tue, 10 Sep 2002 00:58:26 -0400
Chuck \PUP\ Payne [EMAIL PROTECTED] wrote:

 I am wanting to do a count in PHP. I want to be able to count the
 number of records from a given database and display this count on the
 page. Can this be done using PHP or is the sql thing?
 
 Chuck Payne
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php

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




Re: [PHP] Re: Hardware Address

2002-09-05 Thread Tyler Longren

using exec() or system() will only be able to execute commands on the
machine php is installed on.  I sometimes wonder how universities and
broadband isp's do this.  I'd be interested in seeing how it works.

Sorry, I'm not much help anymore.

tyler

On Fri, 6 Sep 2002 01:24:07 +0200
[EMAIL PROTECTED] wrote:

 Hi,
 
 The best way I think is to use exec() or system() to ask that to the
 system. May be someone knows something better too.
 
 --
 
 Nicos - CHAILLAN Nicolas
 [EMAIL PROTECTED]
 www.WorldAKT.com - Hébergement de sites Internet
 
 Chris Cook [EMAIL PROTECTED] a écrit dans le message de news:
 [EMAIL PROTECTED]
  Hello all,
 
  I am working on a LAN application and am interested in obtaining the
 user's
  network card address to limit usage of the program. Is there a way
  to do this in PHP?
 
  I am on a network that uses DHCP so using the IP address probably
  wont
 work
  and I am also worried about IP spoofing.
 
  Thanks for any help you can provide,
  Chris
 
 
  _
  Send and receive Hotmail on your mobile device:
  http://mobile.msn.com
 
 
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 

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




Re: [PHP] Proxy taking me to localhost.com

2002-08-28 Thread Tyler Longren

This is the greatest php related question I have ever seen.

tyler

On Wed, 28 Aug 2002 15:23:48 -0400
[EMAIL PROTECTED] wrote:

 
 Hey,
 I am on a cable connection...and to connect to the net my provider
 gave me an address where my browser would get automatically
 configured...maybe because of that I am goint to localhost.com? I may
 be way off track here coz I dont know the first thing about what the
 heck a proxy itself is but.
 
 
 Please reply,
 -Ryan.
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php

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




Re: [PHP] Hacker?

2002-08-11 Thread Tyler Longren

block his ip at the router.

tyler

On Sun, 11 Aug 2002 16:21:07 -0600
RPS Internet [EMAIL PROTECTED] wrote:

 My server is getting odd request form an outside computer. Upon
 looking into the requests I have found his PHP Config file is point to
 my server as the HTTP_VIA and other vars. I am wondering how I can
 deny him access since he is forwarding all request through my server
 with these settings. My server is only running ports 22, 25 and 110 so
 will his requests still run php since it is installed?
 
 
 Thanks,
 Josh Thomas
 
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 

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




Re: [PHP] Hacker?

2002-08-11 Thread Tyler Longren

So what?  You don't want him using your stuff anyway do you?

tyler

On Sun, 11 Aug 2002 16:33:17 -0600
RPS Internet [EMAIL PROTECTED] wrote:

 What about all the users of his web site that are requesting his php
 scrpts that are compiling through my server?
 
 -Original Message-
 From: Tyler Longren [mailto:[EMAIL PROTECTED]]
 Sent: Sunday, August 11, 2002 4:15 PM
 To: RPS Internet
 Cc: [EMAIL PROTECTED]
 Subject: Re: [PHP] Hacker?
 
 
 block his ip at the router.
 
 tyler
 
 On Sun, 11 Aug 2002 16:21:07 -0600
 RPS Internet [EMAIL PROTECTED] wrote:
 
  My server is getting odd request form an outside computer. Upon
  looking into the requests I have found his PHP Config file is point
  to my server as the HTTP_VIA and other vars. I am wondering how I
  can deny him access since he is forwarding all request through my
  server with these settings. My server is only running ports 22, 25
  and 110 so will his requests still run php since it is installed?
 
 
  Thanks,
  Josh Thomas
 
 
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php
 
 
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 

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




Re: [PHP] My SQL speed.

2002-08-02 Thread Tyler Longren


 Should this be asked in a mysql list ? Please suggest a NNTP server!

You could always take this to the mysql mailing list
[EMAIL PROTECTED]

tyler


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




Re: [PHP] still need help with crash on make

2002-07-31 Thread Tyler Longren

Use apache 1.3.26 and it'll work.  Just change the configure line:
./configure --with-mysql --with-apxs=/path/to/apxs

Apache 2 is troublesome.

tyler

On Wed, 31 Jul 2002 17:27:30 -0500
Kirk Babb [EMAIL PROTECTED] wrote:

 Could somebody help me with this?.I posted yesterday with only one
 reply...please read the following and let me know where I'm going
 wrong. THANKS!!!
 
 -Kirk
 
 BEGIN MESSAGE
 
 
  Yes, I configured apache with mod_so enabled and the
  module is there.  Still crashes on make.
 
 -Kirk
 
 You chose to compile PHP as a DSO this requires apache to have the
 mod_so module, you can check this by doing a
 httpd -l in your apache's bin directory.
  I'm attempting to compile php 4.2.2 and apache 2.0.39 (both of which
  I downloaded today) on mandrake 8.1.  I've followed the generic
  unix directions on php.net and at these steps
 
  $root ./configure --with-mysql --with-apxs2=/www/bin/apxs
 
  followed by
 
  $root make
 
  the process crashes with errors at the end of the make:
 
   -DTHREAD=1 -g -O2 -pthread -DZTS -prefer-pic  -c php_functions.c
  php_functions.c:93:27: missing binary operator before '!'
  make[3]: *** [php_functions.lo] Error 1
  make[3]: Leaving directory `/usr/local/php-4.2.2/sapi/apache2filter'
  make[2]: *** [all-recursive] Error 1
  make[2]: Leaving directory `/usr/local/php-4.2.2/sapi/apache2filter'
  make[1]: *** [all-recursive] Error 1
  make[1]: Leaving directory `/usr/local/php-4.2.2/sapi'
  make: *** [all-recursive] Error 1
 
  Can somebody point out what I need to do to correct this?  It
  doesn't make sense that the code I downloaded from php.net would
  have a problem since that's a stable release.
 
  TIA!
 
  -Kirk
 
  --
  K.B. BABB
  email: [EMAIL PROTECTED]
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php
 
 
 -Pushkar S. Pradhan
 
 
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 

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




Re: [PHP] toolbar.google.com

2002-07-31 Thread Tyler Longren

It's called Google Magic.

I don't really know the answer to your question.  Google does a lot of
really neat things (like converting pdf to html).

tyler

On Thu, 1 Aug 2002 08:17:35 +0100
Lord Loh. [EMAIL PROTECTED] wrote:

 Google uses php to make a software download and installs it through
 the browser!
 
 How does this work ?
 
 Lord Loh.
 
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php

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




Re: [PHP] PHP Installation Problem

2002-07-30 Thread Tyler Longren

I'm not sure exactly what you're saying, but it sounds to me like you
didn't configure --with-mysql for the new server.  You MUST do that.
./configure --with-apxs=/blah/blah --with-mysql

If you don't have --with-mysql compiled into the php binary, mysql
functions won't work.

Tyler

On Tue, 30 Jul 2002 09:34:04 +0100
Mark Colvin [EMAIL PROTECTED] wrote:

 I have a development web server php 4.0.6 apache and mysql and
 everything works OK. I installed the same software onto a new server
 that will be the production server but I hit problems when my scripts
 try and hit the db on the new server. Comparing the phpinfo details
 for both, the new server does not have a mysql section it. I copied
 the original php.ini onto the new server and restarted apache after
 the installation. Where have I missed this in the installation process
 and how should I resolve it? As an aside question, is there any
 glaring issues I may encounter if I upgrade php to 4.2.2 from 4.0.6?
 
 
 
 This e-mail is intended for the recipient only and
 may contain confidential information. If you are
 not the intended recipient then you should reply
 to the sender and take no further ation based
 upon the content of the message.
 Internet e-mails are not necessarily secure and
 CCM Limited does not accept any responsibility
 for changes made to this message. 
 Although checks have been made to ensure this
 message and any attchments are free from viruses
 the recipient should ensure that this is the case.
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php

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




[PHP] pdf to html

2002-07-25 Thread Tyler Longren

Hi,

I've been searching around for ways to convert pdf to html.  I haven't
had much luck.

I have a client that has a bunch of pdf's stored in a mysql table. 
They don't want their users to have to download the pdf file, they want
the pdf to be displayed in the web browser all the time.  Google has
something that allows them to convert pdf to html, so, is it possible
for me to do the same?

These pdf's are graphic intensive...there's not much plain text.

Thanks everyone,
Tyler

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




Re: [PHP] Paying Job...

2002-07-25 Thread Tyler Longren

Charge by which ever will get you the most money.

tyler

On Thu, 25 Jul 2002 11:46:38 -0400
Gerard Samuel [EMAIL PROTECTED] wrote:

 Basically, someone is looking to get a database driven site built,
 and Ive never written code for money before.
 Im looking for advice, as to how the experienced coders in here charge
 
 for their work.
 Do you charge by the page, script or by the hour (that would be nice).
 
 Thanks for any input you may provide...
 
 -- 
 Gerard Samuel
 http://www.trini0.org:81/
 http://dev.trini0.org:81/
 
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 

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




Re: [PHP] Paying Job...

2002-07-25 Thread Tyler Longren

Why even bother charging money if you aren't out to make as much as you
can?  That's just my point of view.

tyler

On Thu, 25 Jul 2002 11:59:28 -0400
Martin Clifford [EMAIL PROTECTED] wrote:

 resists the urge to debate ethics
 
 Why didn't you just say, Charge by whichever will screw the client
 the worst.?  Jesus.
 
 Martin
 
  Tyler Longren [EMAIL PROTECTED] 07/25/02 11:44AM 
 Charge by which ever will get you the most money.
 
 tyler
 
 On Thu, 25 Jul 2002 11:46:38 -0400
 Gerard Samuel [EMAIL PROTECTED] wrote:
 
  Basically, someone is looking to get a database driven site built,
  and Ive never written code for money before.
  Im looking for advice, as to how the experienced coders in here
  charge
  
  for their work.
  Do you charge by the page, script or by the hour (that would be
  nice).
  
  Thanks for any input you may provide...
  
  -- 
  Gerard Samuel
  http://www.trini0.org:81/ 
  http://dev.trini0.org:81/ 
  
  
  
  -- 
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php 
  
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php 
 
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 

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




Re: [PHP] Image upload into database

2002-07-24 Thread Tyler Longren

Are you trying to upload the same image as you did at home?  If so,
size isn't the problem if you can do it from home.  It might be a
timeout issue.  There might be something in php.ini you can set for
timeout.  You can specify the max filesize to upload in php.ini also.

Good luck,
Tyler


On Wed, 24 Jul 2002 19:43:37 -0400 (EDT)
Jesse Lawrence [EMAIL PROTECTED] wrote:

 I've setup an image upload feature on a site, which
 uploads images into a mysql database.
 
 The uploads are working absolutely as expected on my
 local computer (the server), but when someone else
 tried to upload, only 1/3 of the image was uploaded. 
 Could it be a matter of size?  I was originally using
 just a Blob, and have since switched to a Long Blob.
 Any thoughts or comments on this would be greatly
 appreciated. 
 
 Thanks a bunch,
 
 Jesse 
 
 __
 
 Post your ad for free now! http://personals.yahoo.ca
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php

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




Re: [PHP] php 4.2.1 and MySQL

2002-07-22 Thread Tyler Longren

No extra parameters have been added to the mysql_connect() function. 
The error you're seeing is straight from mysql...so it's really not
php.  Mysql says Using password: YES because you're trying to login
in with a password.  If you took out password in the mysql_connect()
function, it'd say Using password: NO.

Go into mysql and make sure the username/password haven't been changed
and make sure the machine that php is on is allowed to connect to the
mysql server.

Good luck,

-- 
Tyler Longren
Captain Jack Communications
[EMAIL PROTECTED]
www.captainjack.com

On Mon, 22 Jul 2002 08:32:35 -0700
Brian McLaughlin [EMAIL PROTECTED] wrote:

 We recently upgraded to php 4.2.1 with Apache and our scripts that
 access MySQL now fail in mysql_connect().Apache shows the
 following:
 
 Warning: Access denied for user: '[EMAIL PROTECTED]' (Using
 password: YES) in /var/apache/share/scripts/ais/itweb/projects.php on
 line 40
 
 Warning: MySQL Connection Failed: Access denied for user:
 '[EMAIL PROTECTED]' (Using password: YES) in
 /var/apache/share/scripts/ais/itweb/projects.php on line 40
 Sorry... Could not connect to database
 
 Not sure why it says it's using password: YES.  The call is
 mysql_connect(host, fred, password) as it always has been.  I
 thought that perhaps the function call has changed to include an extra
 parameter or something, but haven't found anything that says that's
 true.
 
 Can someone tell me what I can do to get these scripts working again? 
 All of my scripts that use MySQL are failing in this same way.
 
 Thanks,
 
 Brian McLaughlin
 [EMAIL PROTECTED]
 
 
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php

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




Re: [PHP] PHP Security Advisory: Vulnerability in PHP versions 4.2.0 and 4.2.1

2002-07-22 Thread Tyler Longren

I actually enjoy all the security releases.  They give me something to
do at work!

tyler

On Mon, 22 Jul 2002 11:55:31 -0500 (CDT)
Greg Donald [EMAIL PROTECTED] wrote:

 On Mon, 22 Jul 2002, Marko Karppinen wrote:
 
PHP Security Advisory: Vulnerability in PHP versions 4.2.0 and
4.2.1
 
 Not only did I get to re-write all my apps the past few months because
 of the new register_globals default that was imposed by `the php
 group`...
 
 Now I get to upgrade my PHP install once a month or so cause of new 
 security holes..  Yay!
 
 Wasn't this new register_globals setting supposed to enhance security?
 
 How would you like to be a sys admin with dozens of machines to
 upgrade before you can proceed with anythign else?
 
 Can anyone say Ruby?
 
 
 -- 
 Greg Donald
 http://destiney.com
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 

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




Re: [PHP] Password in script

2002-07-18 Thread Tyler Longren

It's fine.  There's no other way to do it really.  Somebody would have
to be able to see the source to the php file before they could see the
password for mysql.  They won't get it just by viewing the webpage
that's already been parsed by php.

-- 
Tyler Longren
Captain Jack Communications
[EMAIL PROTECTED]
www.captainjack.com



On Fri, 19 Jul 2002 10:03:02 +0700
Sailom [EMAIL PROTECTED] wrote:

 I am new to PHP and MySQL and never have experience in this area.  I
 am writing a PHP script that connects to MySQL server.  I have to put
 a password of MySQL into the PHP script.  I think it may not be
 secured.  What do you think?  How can I make it more secure?  Thanks.
 
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php

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




Re: [PHP] Password in script

2002-07-18 Thread Tyler Longren

Yes, good point Anas.  Make sure that you have mysql set up right.  Make
sure the root mysql user has a password set and that people can't
connect from %.

tyler

On Thu, 18 Jul 2002 20:19:05 -0700 (PDT)
Anas Mughal [EMAIL PROTECTED] wrote:

 
  Also, allow MySQL connections only from your server.
  
   Tyler Longren [EMAIL PROTECTED] wrote: It's fine. There's no
   other way to do it really. Somebody would have
 to be able to see the source to the php file before they could see the
 password for mysql. They won't get it just by viewing the webpage
 that's already been parsed by php.
 
 -- 
 Tyler Longren
 Captain Jack Communications
 [EMAIL PROTECTED]
 www.captainjack.com
 
 
 
 On Fri, 19 Jul 2002 10:03:02 +0700
 Sailom wrote:
 
  I am new to PHP and MySQL and never have experience in this area. I
  am writing a PHP script that connects to MySQL server. I have to put
  a password of MySQL into the PHP script. I think it may not be
  secured. What do you think? How can I make it more secure? Thanks.
  
  
  
  -- 
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 
 
 -
 Do You Yahoo!?
 Yahoo! Autos - Get free new car price quotes

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




Re: [PHP] Apache 2.0 + PHP

2002-07-15 Thread Tyler Longren

In a production environment: no
for fun: yes

-- 
Tyler Longren
Captain Jack Communications
[EMAIL PROTECTED]
www.captainjack.com



On Tue, 16 Jul 2002 09:13:41 +0930 (CST)
Michael Hall [EMAIL PROTECTED] wrote:

 
 I've had a hunt through the mail archives but can't find a definite
 answer:
 
 Is Apache 2.0.x and PHP 4.2.x/4.3.x on Linux a viable proposition yet
 in a production environment? 
 
 I guess the diversity of experiences described in the archives
 probably means no, but what is the current opinion? Some of the
 archive messages I read are quite old now.
 
 
 
 Michael Hall [EMAIL PROTECTED]
 
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 

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




Re: [PHP] PHP 4.3.x..

2002-07-15 Thread Tyler Longren

You could have found the answer to this question right on the front page
of php.net.  4.3.x is indeed the current development version.

-- 
Tyler Longren
Captain Jack Communications
[EMAIL PROTECTED]
www.captainjack.com


On Mon, 15 Jul 2002 14:00:26 -0230
Kondwani Spike Mkandawire [EMAIL PROTECTED] wrote:

 One of the threads above Speak of PHP 4.3  I was not
 aware that it existed...  Is it still in its Testing stages?
 How come its not on the PHP Website?  Are there any
 great modifications to it?
 
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 

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




Re: [PHP] php4apache.dll...

2002-07-11 Thread Tyler Longren

Use this file instead:
php4apache2.dll

It's supposedly in the sapi directory.  Did you search the internet for
this subject before you posted?  If not, you should have.  There's lots
of info on this missing file.  if you can't find a working version
anywhere, mail the php-dev mailing list, they can probably help you out
more.

-- 
Tyler Longren
Captain Jack Communications
[EMAIL PROTECTED]
www.captainjack.com



On Thu, 11 Jul 2002 16:22:27 +1000
Peter [EMAIL PROTECTED] wrote:

 Howdy
 
 can any one remember where to get the apache2 ver of php4apache.dll?
 
 Cheers 
 
 Peter 
 the only dumb question is the one that wasn't asked 
  

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




Re: [PHP] Table Making

2002-07-11 Thread Tyler Longren

I'm not sure if you can do that because you have to go row by row when
writing html, not column by column.  I could be mistaken though.

-- 
Tyler Longren
Captain Jack Communications
[EMAIL PROTECTED]
www.captainjack.com



On Wed, 10 Jul 2002 22:34:15 -0800
Jason Soza [EMAIL PROTECTED] wrote:

 Thanks for the code improvement, but that will still print results
 from left to right, top to bottom, i.e. the items ascend left to right
 in the rows. I'm not concerned with the actual order that they come
 out of MySQL in, just how they're displayed.
 
 Basically, instead of this:
 1  2  3  4  5
 6  7  8  9  10
 11  12  13  14  15
 
 I want this:
 1  6  11
 2  7  12
 3  8  13
 4  9  14
 5  10  15
 
 Thanks again for the help, though.
 
 Jason Soza
 
 -Original Message-
 From: Analysis  Solutions [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, July 10, 2002 10:13 PM
 To: PHP List
 Subject: Re: [PHP] Table Making
 
 
 Jason:
 
 On Wed, Jul 10, 2002 at 10:04:45PM -0800, Jason Soza wrote:
 
  I have this nice piece of code to take my SQL result and organize it
  into
 a
  nice 5 column table:
 
 Nice is in the eye of the beholder...  Here's what I think is nice:
 
   echo table width=\100%\ border=\0\ align=\center\\n;
   echo  tr\n;
 
   while ($row = mysql_fetch_array($sql, MYSQL_ASSOC)) {
  echo '  td align=centera href=year.asp?year=';
  echo $row['grad_year'] . '' . $row['grad_year'] .
  /a/td\n;
   }
 
   echo  /tr\n;
   echo /table\n\n;
 
 If you want to reverse the order, use an ORDER BY clause in your query
 string.
 
 --Dan
 
 --
PHP classes that make web design easier
 SQL Solution  |   Layout Solution   |  Form Solution
 sqlsolution.info  | layoutsolution.info |  formsolution.info
  T H E   A N A L Y S I S   A N D   S O L U T I O N S   C O M P A N Y
  4015 7 Av #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 

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




Re: [PHP] compiling with mysql

2002-07-11 Thread Tyler Longren

I've never compiled php with the path to mysql.  I've done this on lots
of different servers, and it always works.  I don't know if it's the
proper way of doing things, but it does work.

-- 
Tyler Longren
Captain Jack Communications
[EMAIL PROTECTED]
www.captainjack.com



On Fri, 12 Jul 2002 10:02:40 +0930 (CST)
Michael Hall [EMAIL PROTECTED] wrote:

 
 Another PHP compilation question ...
 
 I've just compiled PHP 4.2.1 --with-mysql. I added no path to mysql,
 and it worked fine as it always does. However, I'm keen to add
 mod_python as a DSO to Apache as well, and noticed in PHP's INSTALL
 notes that I'll probably need to recompile PHP with a path to mysql:
 
   --with-mysql=/somewhere/or/other/
 
 1. Is this always the case?
 
 2. Where would the path be likely to be on RedHat 7.2 with MySQL rpms?
 
 TIA
 
 
 Michael Hall [EMAIL PROTECTED]
 
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php

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




Re: [PHP] compiling and php.ini

2002-07-11 Thread Tyler Longren

If you do:
--with-mysql, it can't be disabled in php.ini, however you can change
options in php.ini that deal with connecting to a mysql server.  If you
had copied the php.ini-dist file, your magic_quotes would probably have
been set to on.  I'm not sure if the php.ini-recommended gets updated
after running the configure script.

-- 
Tyler Longren
Captain Jack Communications
[EMAIL PROTECTED]
www.captainjack.com



On Fri, 12 Jul 2002 09:56:52 +0930 (CST)
Michael Hall [EMAIL PROTECTED] wrote:

 
 I've just compiled PHP 4.2.1 with Apache 1.3.24 on RedHat 7.2.
 Everything works just fine as usual. I've got a couple of queries,
 however.
 
 I compiled with the --enable-magic-quotes option, then figured this
 was a bad move as I've been caught out before with scripts that assume
 it is on. So, I copied the php.ini-recommended file to php.ini, and
 now phpinfo() tells me that magic_quotes_gpc and magic_quotes_runtime
 are off.
 
 So, does compiling with --enable-magic-quotes have any effects if
 magic quotes are turned off in php.ini? Are they really off?
 
 Can all --enable-whatever options be turned on/off in php.ini,
 regardless of ./configure options?
 
 Does the -with-config-file-path option set the expected path to
 php.ini(I always thought it was to Apache)? How come PHP still works
 whether the file is there or not?
 
 TIA  
 
 
 
 Michael Hall [EMAIL PROTECTED]
 
 
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 

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




[PHP] uploads work sometimes

2002-07-11 Thread Tyler Longren

Hi,

I have a form:
input type=file name=pdfFile

And the code that processes the form:
if ($_FILES['pdfFile']['name'] == ) {
print You must select a file to upload;
}
else {
// code to add data to db
}

This works on my server at home (when I select a file to upload, it sees
the filename in $_FILES['pdfFile']['name'], but on a server at work,
it's blank so I see the error You must select a file to upload.

Any ideas on why this might happen?  Is there anything in php.ini that
could be wrong (it works here at home when register_globals is set to on
or off)?

Thanks everyone,
Tyler

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




Re: [PHP] SQL field problem

2002-07-10 Thread Tyler Longren

I think you want to use group by:
SELECT * FROM table GROUP BY kat;

-- 
Tyler Longren
Captain Jack Communications
[EMAIL PROTECTED]
www.captainjack.com



On Wed, 10 Jul 2002 19:40:11 +0200
[EMAIL PROTECTED] wrote:

 Hello
 
 I have a problem with mysql.I create a table with a field kat.In
 this field are entries like this : 
 
 Light
 Dark
 Dark
 Light
 Robot
 Find
 Dark
 Light
 
 You see that all entries are not unique.So i want to list as output
 all entries but only once.If the word Dark is in the table 6 times
 php should output dark only 1 time. How should i solve this problem ?
 
 Thanks!
 chris
 

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




Re: [PHP] HTTP_USER_AGENT?

2002-07-10 Thread Tyler Longren

It works for you because you have register_globals set to on in
php.ini.  If you set it to off it won't work any longer.

-- 
Tyler Longren
Captain Jack Communications
[EMAIL PROTECTED]
www.captainjack.com



On Thu, 11 Jul 2002 08:07:48 +0530
Balaji Ankem [EMAIL PROTECTED] wrote:

 It is working fine for me!!!
 
 
 -Original Message-
 From: George Hester [mailto:[EMAIL PROTECTED]] 
 Sent: Thursday, July 11, 2002 8:03 AM
 To: [EMAIL PROTECTED]
 Subject: [PHP] HTTP_USER_AGENT?
 
 
 I have this in my web site not in an executable folder:
 
 HTML
 HEAD
 TITLEMy First PHP Program/TITLE
 /HEAD
 BODY
 ?php echo Hello World!; ?
 /BODY
 /HTML
 
 No problem.  I then put this in the same folder:
 
 HTML
 HEAD
 TITLEMy Second PHP Program/TITLE
 /HEAD
 BODY
 ?php echo $HTTP_USER_AGENT; ?
 /BODY
 /HTML
 
 Nothing appears.  What's wrong?
 
 
 --
 George Hester
 _
 
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 

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




Re: [PHP] need help about this

2002-07-10 Thread Tyler Longren

Table 'book_auth' already exists means that you're trying to create
the 'book_auth' table again, even though it already exists.  Remove the
old 'book_auth' table to create the new one.

-- 
Tyler Longren
Captain Jack Communications
[EMAIL PROTECTED]
www.captainjack.com



On Thu, 11 Jul 2002 13:51:43 +0700
[EMAIL PROTECTED] wrote:

 MySQL Error : Database Error
 Error Number: 1050 Table 'book_auth' already exists
   ---
   -
 what this meant?
 what should i do for correct this
 thaank you for your help
 
 sincerly your
 -- tjandra
 
 
 ==
 This email is confidential and may also be privileged.
 If you are not the intended recipient, please notify me immediately
 and delete the original message.  You should not copy or use it for
 any other purpose, nor disclose its
 contents to any other person.  Thank you.
 
 

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




Re: [PHP] Stupid install ???

2002-07-09 Thread Tyler Longren

I'll assume you're using Apache.  Did you add (or uncomment) the
relavent lines in httpd.conf?  Check the php installation manual for the
lines to add.

-- 
Tyler Longren
Captain Jack Communications
[EMAIL PROTECTED]
www.captainjack.com



On Tue, 9 Jul 2002 12:02:27 -0500
Hopp3r [EMAIL PROTECTED] wrote:

 I have installed PHP4.2.1 and when I open a browser to look at a test
 php page? all I see is the php code, not the output of phpinfo(). I
 know it is something small that I have overlooked. Can someone help?
 Please???
 
 Thanks in advance,
 RC Hopp3r
 
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php

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




[PHP] forms and files

2002-07-02 Thread Tyler Longren

Hi,

I have a form kinda like this:
form action=$PHP_SELF?option=Massaction=add method=POST
enctype=multipart/form-data
input type=file name=passcodeFile

the rest of the form is there too.  And $PHP_SELF is set to $PHP_SELF =
$_SERVER[PHP_SELF] at the top of the page.

When I select a passcodeFile file to upload and click the upload
button, I am presented with this on the next page:
You need to specify a file to use.

Here's what I did:
if ($_POST[passcodeFile] == ) {
print You need to specify a file to use.;
}

Any ideas why it does that even if I do select a file?

Thanks,
tyler

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




Re: [PHP] forms and files

2002-07-02 Thread Tyler Longren

On Tue, 2 Jul 2002 23:45:56 +0800
Jason Wong [EMAIL PROTECTED] wrote:

 On Tuesday 02 July 2002 23:34, Tyler Longren wrote:
  Hi,
 
  I have a form kinda like this:
  form action=$PHP_SELF?option=Massaction=add method=POST
  enctype=multipart/form-data
  input type=file name=passcodeFile
 
 You really should use  around your tag values. What you have is
 invalid HTML.
 
  the rest of the form is there too.  And $PHP_SELF is set to
  $PHP_SELF =$_SERVER[PHP_SELF] at the top of the page.
 
  When I select a passcodeFile file to upload and click the upload
  button, I am presented with this on the next page:
  You need to specify a file to use.
 
  Here's what I did:
  if ($_POST[passcodeFile] == ) {
  print You need to specify a file to use.;
  }
 
  Any ideas why it does that even if I do select a file?
 
 1) print_r($_POST) to see what you have, while you're at it, do the
 same for $_FILES.
 
 2) Use the example(s) in the manual, once you have them working modify
 to suit.
 
 -- 
 Jason Wong - Gremlins Associates - www.gremlins.com.hk
 Open Source Software Systems Integrators
 * Web Design  Hosting * Internet  Intranet Applications Development
 *
 
 /*
 Nature always sides with the hidden flaw.
 */

that worked.  I had to use _FILES instead of _POST

I still get these errors though:
Warning: fopen(, r) - Success in
/usr/local/apache/htdocs/cj/aanr/admin/passcode_admin.php on line 151

Warning: stat failed for (errno=2 - No such file or directory) in
/usr/local/apache/htdocs/cj/aanr/admin/passcode_admin.php on line 151

Warning: fread(): supplied argument is not a valid File-Handle resource
in /usr/local/apache/htdocs/cj/aanr/admin/passcode_admin.php on line
151

And here's the line that produces them:
$data = fread(fopen($_FILES[passcodeFile_name], r),
filesize($_FILES[passcodeFile]));

any ideas on that one?  This is the problem I have been working on for a
few days now.

Thanks,
Tyler

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




Re: [PHP] Help - I'm New

2002-07-02 Thread Tyler Longren

you must be tired from searching the manual all day for your answer. :)

Check here:
http://www.php.net/manual/en/install.apache.php

There's a section on installing with Win32

-- 
Tyler Longren
Captain Jack Communications
[EMAIL PROTECTED]
www.captainjack.com



On Tue, 2 Jul 2002 17:14:32 -0400
admin [EMAIL PROTECTED] wrote:

 Hi,  first let me introduce myself...
 
 My name is Kit, and I own the domain below
 and host sites from off that domain.
 
 I'm new to using PHP...and need some help.
 
 1. I have apache for win32 1.3.26 setup
 on my w2k pro at home, and need to know
 how to enable PHP in the config.
 
 2. I also have a PHP website, and need to know
 how to include FORMS for subscribing to newletters
 in a file called header.php
 
 *** http://www.myispnet.net ***
Administrator
My ISP Network
[EMAIL PROTECTED]
 *** http://www.myispcentral.net ***
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php

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




[PHP] Uploading files

2002-06-27 Thread Tyler Longren

Hello,

I usually use this code to upload files when I have a form with input
type=file name=passcodeFile

It no longer works for some reason:
$data = fread(fopen($_POST[passcodeFile], r),
filesize($_POST[passcodeFile]));

Here are the errors that it produces:
Warning: fopen(, r) - Success in
/usr/local/apache/htdocs/cj/aanr/admin/passcode_admin.php on line 146

Warning: stat failed for (errno=2 - No such file or directory) in
/usr/local/apache/htdocs/cj/aanr/admin/passcode_admin.php on line 146

Warning: fread(): supplied argument is not a valid File-Handle resource
in /usr/local/apache/htdocs/cj/aanr/admin/passcode_admin.php on line 146

The $data = line is line number 146.  Does anyone seen anything wrong
with this?

Thanks,

-- 
Tyler Longren
Captain Jack Communications
[EMAIL PROTECTED]
www.captainjack.com


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




Re: [PHP] Security problem?

2002-06-25 Thread Tyler Longren

No.  The only way they can get your source is by ftping or having shell
access to your server.  And even then, they'd have to have read perms on
your web folder/files.  If you were to have a lot of unknown people
jacking around on your server, you have a lot of other stuff to worry
about that who's gonna steal your mysql username/password.

They can't just say:
Download http://yoursite.com/file_with_good_info.php

and get the php-source, all they'd get is the HTML source.

-- 
Tyler Longren
Captain Jack Communications
[EMAIL PROTECTED]
www.captainjack.com



On Tue, 25 Jun 2002 20:46:04 +0100
Peter [EMAIL PROTECTED] wrote:

 When you have the standard
 
 $link = mysql_connect(localhost,username,secretpassword);
 
 Would it not be possible for someone to use PHP from another server to
 download your source and find out your MySQL details including
 password?
 
 
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 

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




Re: [PHP] display_error=Off in php.ini

2002-06-21 Thread Tyler Longren

Did you restart your webserver after you made the change in php.ini?  If
you didn't, make sure you restart it now.  Restarting your webserver
should fix it.

-- 
Tyler Longren
Captain Jack Communications
[EMAIL PROTECTED]
www.captainjack.com



On Fri, 21 Jun 2002 12:57:34 -0400
Anil Garg [EMAIL PROTECTED] wrote:

 Hi,
 
 In php.ini file i have set:
 display_errors = Off
 log_errors = /var/log/php-errors.log
 
 but i cant see anything coming in to php-errors.log file.
 I have tried to change the query in my php code...but it dispays error
 on the gui( the display errors doesnt seem to get off).
 
 I hope someone can help me with this.
 
 thanx
 anil
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 

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




Re: [PHP] increasing max size to upload

2002-06-20 Thread Tyler Longren

Change upload_max_filesize in php.ini to the value you desire.

-- 
Tyler Longren
Captain Jack Communications
[EMAIL PROTECTED]
www.captainjack.com



On Thu, 20 Jun 2002 12:12:33 -0400
Anil Garg [EMAIL PROTECTED] wrote:

 hi,
 
 how can i change the maximum size of the file being uploaded??
 The line below does not seem to help me:
 input type=hidden name=MAX_FILE_SIZE value=25000
 
 Do  i need to make some more changes??
 php ver i am using is mod_php4-4.1.2
 
 I dont have a php.ini file anywhere!! i just have a file php.ini-dist
 in/usr/local/etc/ ...but i dont think it is being used.
 
 thanx
 anil
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php

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




Re: [PHP] Need help

2002-06-18 Thread Tyler Longren

If you don't have cURL Installed yet, you can get it for Win32 here:
http://curl.haxx.se/download.html

On Tue, 2002-06-18 at 09:30, Barbara wrote:
 I want to know how I have to install cURL on my apache server. My apache server is 
running on Windows ME.
 Thanks for all.
 Barbara Guillen.
 Spain




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




Re: [PHP] Error Reporing Questions with Mac

2002-06-18 Thread Tyler Longren

Perhaps it was a typo, but parse error on line 1 does state the line
number.

tyler

On Tue, 2002-06-18 at 09:57, Kevin Ruiz wrote:
 I'm running php 4 on a unix server and am experiencing a problem with error
 reporting I'm getting on my mac.
 
 When I get a parse error it won't tell me what line the error is on...it
 simply says parse error on line 1.  When I test the page on a pc I get an
 error message that I can use... parse error on line 143.
 
 Does anyone have any ideas?  I get the same error when using IE for both OS
 X and 9.
 
 Thanks in advance,
 Kevin
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 




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




Re: [PHP] linux: how can I check if php/mysql is working properly?

2002-06-18 Thread Tyler Longren

Just for future reference, you don't actually need to put the 'echo'
before the phpinfo().  Calling phpinfo() by itself will print the
desired info.


-- 
Tyler Longren
Captain Jack Communications
[EMAIL PROTECTED]
www.captainjack.com



On Tue, 18 Jun 2002 15:30:38 -0400 (EDT)
Scott [EMAIL PROTECTED] wrote:

 If you told RH to install PHP/MySQL/Apache then everything should be
 ok.  I forget the default document root, but what happens if you put a
 test.php with this in it:
 
 ?php
 
 echo phpinfo();
 
 ?
 
 Other than that it should work out of the box, just make sure you get
 the patches.
 
 
 
 
 On Tue, 18 Jun 2002, Phil Schwarzmann wrote:
 
  i have some php files in /var/www/html/ and none of the php is
  working properly.
   
  all i've done so far is installed Linux Red Hat 7.2 and
  php/mysql/apache is supposedly already installed with Redhat.  How
  do I get this stuff configured?  Anyone have a nice link?
   
   
  
 
 -- 
 -
 Now Playing:  Simple Minds - All The Things She Said
 Server Uptime:  189 days
 
 www.scottah.com
 
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 

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




Re: [PHP] php 4.3 and php_pgsql.dll

2002-06-18 Thread Tyler Longren

Why don't you just use 4.2?  I wouldn't use 4.3 on a linux box, let
alone a windows xp machine.  Give it a try with 4.2.  If it works, then
it is indeed a version conflict.

-- 
Tyler Longren
Captain Jack Communications
[EMAIL PROTECTED]
www.captainjack.com



On Tue, 18 Jun 2002 21:30:22 -0700 (PDT)
Alexander Javier [EMAIL PROTECTED] wrote:

 hello people, i seem to have a little problem here.  I
 hope someone could help.
 
 i have a machine running apache on linux and another
 one with apache on winxp.
 
 i've downloaded and installed the php-4.3-alpha
 version s for linux and windows. mysteriously, the
 php_pgsql.dll is not included in the windows zip file.
  so, i used the one that came with php-4.2 for
 windows.
 
 i used php as a sapi module in apache. apache displays
 an error message that says it fails to load the
 php_pgsql.dll extension.
 
 could it be of the version conflict? or what? please
 help!!!
 
 
 
 
 =
 
 
 
 
 __
 Do You Yahoo!?
 Yahoo! - Official partner of 2002 FIFA World Cup
 http://fifaworldcup.yahoo.com
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php

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




Re: [PHP] Problem with MySQL

2002-06-14 Thread Tyler Longren

you need to put your $myrow in a while loop:

while ($myrow = mysql_fetch_array($result)) {

$title = $myrow[title];
$videoid = $myrow[videoid];
$catergory = $myrow[catergory];
$appraisal = $myrow[appraisal];

// blah blah blah everything else
}

Tyler Longren
Captain Jack Communications
www.captainjack.com
[EMAIL PROTECTED]

- Original Message - 
From: Chuck Payne [EMAIL PROTECTED]
To: PHP General [EMAIL PROTECTED]
Sent: Friday, June 14, 2002 11:03 PM
Subject: [PHP] Problem with MySQL


Hi,

I am working on a movie database I have two database that I am calling from
but the problem I am having when I ask it to go and fetch all the movies
with the same title, it stops and only shows one.

Here is a basic layout...

if($videoid) {

 $result = mysql_query(SELECT * FROM library WHERE videoid=$videoid,$db);

 $myrow = mysql_fetch_array($result);

// The Myrows

$title = $myrow[title];
$videoid = $myrow[videoid];
$catergory = $myrow[catergory];
$appraisal = $myrow[appraisal];

// Some where here it's not working.

 $sql = SELECT concat_ws(' ', fname, lname)as actor FROM actormovie WHERE
title = '$title' ORDER by lname;
$result = mysql_query($sql);
 print $sql;

$actor = ;
while ($myrow = mysql_fetch_array($result)) {
  $actor = $myrow[actor];
  $actor .= A HREF='' . $actor . /ABR\n;

}

What am I doing wrong? It only show one record and it show more.

Chuck Payne




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




Re: [PHP] Best way to store 1000 char in a database

2002-06-06 Thread Tyler Longren

What do you mean the best way?  Do you mean which data type you should
give the field?  A bit more info please.  :-)

Tyler Longren
Captain Jack Communications
www.captainjack.com
[EMAIL PROTECTED]

- Original Message -
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, June 06, 2002 8:50 PM
Subject: [PHP] Best way to store 1000 char in a database


What is the best way to store text with up to 1000 characters in a mySQL
database?

Sorry for the slightly of topic posting but I am not going to join another
mailing list unless I have to.

I am going to create a weekly qoute generator thingy for my site.

JJ Harrison
[EMAIL PROTECTED]
www.tececo.com



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


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




Re: [PHP] redirection

2002-06-05 Thread Tyler Longren

I think that's pretty much your only option.  You could use javascript to
redirect if you wanted.

Tyler Longren
Captain Jack Communications
www.captainjack.com
[EMAIL PROTECTED]

- Original Message -
From: Renaldo De Silva [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, June 05, 2002 1:45 PM
Subject: [PHP] redirection


 is there any way other than

 header(Location: http://www.php.net/;);

 to redirect to another page.



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



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




[PHP] days between two timestamps

2002-06-05 Thread Tyler Longren

Hi,

I have two different timestamps:
20020603164114
and
20020605054710

Is there a simple way to get the number of days between the two dates?

thanks,
tyler


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




Re: [PHP] days between two timestamps

2002-06-05 Thread Tyler Longren

Hi All,

Yes, they are mysql timestamps.  I'll just use the query John suggested and
modify it to fit my needs.  I was originally going to do something like
Martin suggested, but if I can do it right in MySQL, I'll do it that way.

Thanks all!
tyler

- Original Message -
From: 1LT John W. Holmes [EMAIL PROTECTED]
To: Tyler Longren [EMAIL PROTECTED]; php-general
[EMAIL PROTECTED]
Sent: Wednesday, June 05, 2002 10:09 AM
Subject: Re: [PHP] days between two timestamps


 Since those look like MySQL timestamps, I would suggest you do it in your
 query.

 SELECT TO_DAYS(column1) - TO_DAYS(column2) AS Difference FROM table

 Adapt to your needs.

 Explain what your overall mission is and there is probably a query that'll
 return just that.

 If you want to use PHP, format those timestamps into something strtotime()
 will convert to a unix timestamp, find the difference in seconds, and
 convert the number of seconds into days.

 ---John Holmes...

 - Original Message -
 From: Tyler Longren [EMAIL PROTECTED]
 To: php-general [EMAIL PROTECTED]
 Sent: Wednesday, June 05, 2002 11:01 AM
 Subject: [PHP] days between two timestamps


  Hi,
 
  I have two different timestamps:
  20020603164114
  and
  20020605054710
 
  Is there a simple way to get the number of days between the two dates?
 
  thanks,
  tyler
 
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php
 




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




Re: [PHP] Show an image

2002-05-29 Thread Tyler Longren

Is the image's location on the server saved in 'FIELD' or is the actual
image saved in 'FIELD'?

tyler

- Original Message -
From: Félix García Renedo [EMAIL PROTECTED]
To: php [EMAIL PROTECTED]
Sent: Wednesday, May 29, 2002 12:08 PM
Subject: [PHP] Show an image


Hello everybody,
I want to know how to show an image saved into a field of a database
into a web page.
I tried to print img src=FIELD but it shows ascii codes.

Thanks in advance.



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




Re: [PHP] Not a PHP-Problem ...

2002-05-29 Thread Tyler Longren

Try the geektools w hois proxy at www.geektools.com:
http://www.geektools.com/cgi-bin/proxy.cgi

tyler

- Original Message -
From: Marcel Besancon [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, May 29, 2002 11:38 AM
Subject: [PHP] Not a PHP-Problem ...


 Hi everybody,

 this is not a PHP-problem. I just need ti know the whois-servers for
the
 following tld's.
 .info, .net. As everybody knows the whois question for example .com has to
 be send to whois.networksolutions.com. I hope anybody knows a source
where
 to find some of the adresses.

 Thank all of you

 Marcel



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




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




Re: [PHP] determining where the computer is that posts to a db

2002-05-29 Thread Tyler Longren

Nope, no way to determine a MAC address through a browser.

tyler

- Original Message -
From: Tom Beidler [EMAIL PROTECTED]
To: php list [EMAIL PROTECTED]
Sent: Wednesday, May 29, 2002 12:58 PM
Subject: [PHP] determining where the computer is that posts to a db


 I have a time billing application and I need to determine where people are
 logging in from to make sure they are signing in at work and not at home.

 Currently I'm logging the IP address and hostname but I don't think that's
 the totally sano way to do it. The work sites are using local ISP's that
 register dynamic IP addresses. If one of the workers has the same ISP I
 can't tell whether they are at home or work.

 Any ideas? Is there a var that could get the MAC address of the machine?

 Thanks,
 Tom


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




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




Re: [PHP] Server error when executing mail() function

2002-05-28 Thread Tyler Longren

Is 'Server Error' all you get?
If there's more, please post the whole error message.  ;-)

thanks!
tyler

- Original Message -
From: Paul Cuthbertson [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, May 28, 2002 9:06 AM
Subject: [PHP] Server error when executing mail() function


Hi,

I keep getting a 'Server Error' when executing the mail() function. I
thought the problem was the SMTP server in php.ini, so I've tried several
alternatives (including my Outlook smtp and free smtp servers). I'm starting
to think that it's not that that's causing the problem. Is there anything
else that can cause the same error?

Info:
OS: Win98
PHP Version: 4.1.2
Web Server: Apache/1.3.6 (Win32)
Browser: MSIE 6.0

Regards,

Paul Cuthbertson.



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




Re: [PHP] browscap.ini

2002-05-28 Thread Tyler Longren

I found this in the PHP FAQ:
http://www.cyscape.com/browscap/

http://www.php.net/manual/en/faq.obtaining.php

Tyler Longren
Captain Jack Communications
www.captainjack.com
[EMAIL PROTECTED]

- Original Message - 
From: Stefan Rusterholz [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, May 28, 2002 10:15 AM
Subject: [PHP] browscap.ini


 Hi
 
 Has anyone got an up to date browscap.ini-file or does someone know 
 where to get one?
 The most up to date browscap I found got it's last update in October 9, 
 2001 - since then a lot new browser appeared...
 
 best regards
 Stefan Rusterholz
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 


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




Re: [PHP] Server error when executing mail() function

2002-05-28 Thread Tyler Longren

Try this thread on phpbuilder.com:
http://www.phpbuilder.com/forum/read.php3?num=4id=6681loc=0thread=6681

One person suggests using fewer headers as windows can be picky about which
headers you're trying to send with your e-mail.

Good luck,
Tyler Longren
Captain Jack Communications
www.captainjack.com
[EMAIL PROTECTED]

- Original Message -
From: Paul Cuthbertson
To: [EMAIL PROTECTED] ; Tyler Longren
Sent: Tuesday, May 28, 2002 10:27 AM
Subject: Re: [PHP] Server error when executing mail() function


I'm afraid all I get is:

Warning: Server Error in d:\htdocs\scriptname.php on line 19

Line 19 being the mail() command. The script works fine on a different
server. Any Ideas?

Paul.


- Original Message -
From: Tyler Longren [EMAIL PROTECTED]
To: Paul Cuthbertson [EMAIL PROTECTED];
[EMAIL PROTECTED]
Sent: 28 May 2002 16:14
Subject: Re: [PHP] Server error when executing mail() function


 Is 'Server Error' all you get?
 If there's more, please post the whole error message.  ;-)

 thanks!
 tyler

 - Original Message -
 From: Paul Cuthbertson [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Tuesday, May 28, 2002 9:06 AM
 Subject: [PHP] Server error when executing mail() function


 Hi,

 I keep getting a 'Server Error' when executing the mail() function. I
 thought the problem was the SMTP server in php.ini, so I've tried several
 alternatives (including my Outlook smtp and free smtp servers). I'm
starting
 to think that it's not that that's causing the problem. Is there anything
 else that can cause the same error?

 Info:
 OS: Win98
 PHP Version: 4.1.2
 Web Server: Apache/1.3.6 (Win32)
 Browser: MSIE 6.0

 Regards,

 Paul Cuthbertson.





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




Re: [PHP] Cannot add header infomation

2002-05-28 Thread Tyler Longren

Those errors mean that PHP is trying to send headers to the browser after
something has already been made viewable in the browser.  Make sure that the
header() functions are being used before anything gets output to the
browser.

Tyler Longren
Captain Jack Communications
www.captainjack.com
[EMAIL PROTECTED]

- Original Message -
From: Drew Boillot [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, May 28, 2002 10:26 AM
Subject: [PHP] Cannot add header infomation


 Hello, Anyone in the mood to help someone who doesn't really know what
they
 are doing when it comes to PHP?

 I am tring to get NoCC Mail to work http://nocc.sourceforge.net/ on my
 website, and keep getting the warning, Warning: Cannot add header
 information - headers already sent by (output started at
 D:\Inetpub\wwwroot\imap\noccmail\conf.php:203) in
 D:\Inetpub\wwwroot\imap\noccmail\index.php on line 14

 Warning: Cannot add header information - headers already sent by (output
 started at D:\Inetpub\wwwroot\imap\noccmail\conf.php:203) in
 D:\Inetpub\wwwroot\imap\noccmail\html\header.php on line 3

  I am useing PHP 4.2.1 If you need any more infomation, let me know.. As I
 said i'm new at this..

 Drew



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



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




Re: [PHP] Client user info

2002-05-24 Thread Tyler Longren

What kind of information?  There's a whole bunch:
Browser
IP
Referer

Check phpinfo();

try
print $_SERVER[HTTP_USER_AGENT];
to get the users browser
print $_SERVER[REMOTE_ADDR];
to get the users IP
print $_SERVER[HTTP_REFERER];
to get the users referer.

Tyler Longren
Captain Jack Communications
www.captainjack.com
[EMAIL PROTECTED]

- Original Message -
From: Gary [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, May 24, 2002 10:58 AM
Subject: [PHP] Client user info


 Is there a way to get the user information? I know there must be a
constant
 variable, but I can't seem to find it.

 Thanks



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


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




[PHP] checking session ID's

2002-05-23 Thread Tyler Longren

Hi list, it's been a while.

I want to see how many users are online.  I store the users $PHPSESSID in a
database field (phpsessid) when they login.  When they logout, the
$PHPSESSID value in phpsessid is removed.  I could just see how many rows
have something in the phpsessid field, but if a user doesn't click the
Logout button, then the value stays there, it doesn't get removed.

So, does anyone know how else I could do this?  If I could check to see if
an $PHPSESSID is valid, I could look through the database and check to see
if the value in the phpsessid field is still valid.

Any ideas?

thanks,
Tyler



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




[PHP] the new variables

2002-05-23 Thread Tyler Longren

Hi,

Just to prevent a bunch of non-helpful e-mails, I've already RTMF!

Now, to the point.  When using the new variables in php 4.2.x, how should I
go about handling my variables?

Should I just _print $_GET[var]_ every time I need to print $var to the
screen, or would it be better to just do this in an include file or at the
top of every page:
$var = $_GET[var];

Thanks!
tyler




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




Re: [PHP] MySQL and sorting

2002-05-20 Thread Tyler Longren

The MySQL manual will explain this in great detail.

To sort by date:
SELECT * FROM table ORDER BY date ASC;

for that to work, all the values in date should be a timestamp (ex:
2002052000)

To sort by names:
SELECT  * FROM table ORDER BY name ASC;

If you want reverse the order, replace the 'ASC' with 'DESC'.

Tyler Longren
Captain Jack Communications
www.captainjack.com
[EMAIL PROTECTED]
- Original Message -
From: Cleeker [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, May 20, 2002 9:11 PM
Subject: [PHP] MySQL and sorting


 Is there a way to extract lets say a bunch of dates from a mysql db, and
 the sort them in order from newest to oldest? Also how would you sort
 names in alphabetical order?

 ~Cleeker


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



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




Re: [PHP] A pen pal system with Photo upload feature

2002-05-09 Thread Tyler Longren

This might help you:
http://www.phpbuilder.com/columns/william19990908.php3?page=1

Tyler Longren
Captain Jack Communications
[EMAIL PROTECTED]
www.captainjack.com

- Original Message - 
From: Thomas Edison Jr. [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, May 09, 2002 12:23 PM
Subject: [PHP] A pen pal system with Photo upload feature


 Hi,
 
 I've already built in a penpal system. Now i want to
 add a feature which allows user to upload his/her
 image. When other user's search for penpals, the
 photos should appear next to the record's details.
 
 Can anyone guide me towards such a script/tutorial?
 
 I'm using mySQL as my backend, on an Apache Web Server
 on Linux. 
 
 Thanks,
 T. Edison jr.
 
 
 
 =
 Rahul S. Johari (Director)
 **
 Abraxas Technologies Inc.
 Homepage : http://www.abraxastech.com
 Email : [EMAIL PROTECTED]
 Tel : 91-4546512/4522124
 ***
 
 __
 Do You Yahoo!?
 Yahoo! Shopping - Mother's Day is May 12th!
 http://shopping.yahoo.com
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 


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




Re: [PHP] adding 60 to a date

2002-05-07 Thread Tyler Longren

No, this won't be a problem.  I also suggest using a unix timestamp.  It's
the easiest way of doing it.

tyler

- Original Message -
From: Scott St. John [EMAIL PROTECTED]
To: John S. Huggins [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Tuesday, May 07, 2002 8:55 AM
Subject: Re: [PHP] adding 60 to a date


 Will the fact that the server is on NT be a problem?

 On Tue, 7 May 2002, John S. Huggins wrote:

  On Tue, 7 May 2002, Scott St. John wrote:
 
  -Morning
  -
  -I am working on a password aging system that will force a user to
change
  -their password every 60 days.  Can anyone recommend the best method
for
  -taking the current date and adding 60 days to that number?  Should I
do a
  -unix timestampe and add or strtotime and add 60 days?
 
  Yes, using the unix timestamp is most frequently the wise thing to do -
at
  least for me :-|
 
  Just add 5,184,000 seconds to the current timestamp.
 
  **
 
  John Huggins
  VANet
 
  [EMAIL PROTECTED]
  http://www.va.net/
 
  **
 
 
 

 --



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




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




Re: [PHP] Sorting, sort of

2002-05-06 Thread Tyler Longren

Hi Jason,

I'd just get it over with and make first_name and last_name fields in your
table.  It will be so much easier to sort by last name that way.  I do it
this way everytime.  It won't take much time to implement either.

Good luck,
Tyler Longren
Captain Jack Communications
[EMAIL PROTECTED]
www.captainjack.com

- Original Message -
From: Jason Soza [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, May 06, 2002 2:25 PM
Subject: [PHP] Sorting, sort of


 I have a 'name' field in a MySQL table that contains people's first and
 last names, i.e. John Smith - but some people may choose not to
 include their last name, so they're just John in the table, or they
 may choose to include themselves and someone else, but not the last
 name, John and Jane.

 I'm thinking the easiest way to sort by last name, which is what I want
 to do, is to just go into MySQL and make 'first_name' and 'last_name'
 fields, but if there's a way to do this with PHP that'd be great, so
 then I wouldn't have to mess with the table and data.

 Anyhow, I've looked up sort() and asort() in the PHP manual, but I'm
 not sure how I'd go about this. I assume I'd use some kind of function
 to read the 'name' field to the first space, take what it finds after
 the space and put it into an array, then have some if/else statement to
 deal with the lack of a space or the presence of multiple spaces, then
 use sort() on that array.

 Just looking for some guidance, maybe a specific function or bit of
 code. Anything that'd help. Or if this would be more easily addressed
 by reconfiguring my MySQL table, just let me know.

 Thanks,
 Jason Soza


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




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




Re: [PHP] Parse Error - Help?

2002-04-24 Thread Tyler Longren

Copy and paste the parse error into your e-mail.  Also, try placing another
} at the end of the code.  If you're missing a closing bracket somewhere,
that will take care of it.

Tyler Longren
Captain Jack Communications
www.captainjack.com
[EMAIL PROTECTED]

- Original Message -
From: Jason Soza [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, April 24, 2002 10:20 PM
Subject: [PHP] Parse Error - Help?


 Can someone take a look at this code for me? I'm pretty new to
programming,
 but looking at it I think it should work. I'm not saying there aren't
plenty
 of errors, because I'm sure there are. I'm getting a parse error on the
last
 line, and I can't see any reason for it. All of my ifs and functions are
 closed as far as I see. I guess I'm just looking for an unbiased eye here,
 I've been staring at this for a couple hours now. If you have comments on
to
 how I could simplify this code, that'd be great too. Otherwise, I just
need
 it to get it working. Thanks in advance -

 Jason Soza
 

 ?php

 // general config

 $timestamp = date(mdY);
 $id = time();
 $upload_path = incoming/;  // path to your upload directory
 $extval_use = 1; // turns on/off extension validation

 // mail config

 $xmailer = [EMAIL PROTECTED];
 $xsender = [EMAIL PROTECTED];
 $from = [EMAIL PROTECTED];
 $to = [EMAIL PROTECTED];
 $subject = Form submission;
 $boundary = b.md5(uniqid(time()));

 // form config

 $name = $_POST[name];
 $email = $_POST[email];
 $location = $_POST[location];
 $color = $_POST[color];
 $year = $_POST[year];
 $misc = $_POST[misc];

 // extension config

 $extval = array(php, php3, asp, bat, exe, com, jsp, cfml,
 shtml, dtcl);
 $filesize_limit_use = 1; // turns on/off size check
 $filesize_limit = 2048; // file size limit (in kB)

 // messages
 $message[fileisbig] = File is bigger than upload limit ( .
 $filesize_limit . kB);
 $message[invext] = Files of this type are not allowed, sorry.;
 $message[incomplete] = Upload is incomplete.;
 $message[complete] = Upload succesfully completed.;
 $message[uploadbutton] = Upload;
 $message[uploadtxt] = File for upload: ;
 $message[fileexists] = File already exists;

 // Define functions

 function filesize_check ($filesize) {

   if($filesize_limit  $filesize) {
  echo pfont color='red'center
   . $message[fileisbig]./font/center/p;
  $rc = 1;
   }

 }

 function ext_valid ($filename) {

  $extget = substr( strrchr($filename, .), 1);

  $found = in_array($extget, $extval);

  if ( $found ) {
 echo pfont color='red'center
. $message[invext]./font/center/p;

 $rc = 2;
 }

 function file_upload ($filename) {

   if ( file_exists($upload_path.$timestamp.-.$id.-.$filename) ) {
  echo pfont color='red'center
 . $message[fileexists]./font/center/p;

   } else {
  if( move_uploaded_file($HTTP_POST_FILES['userfile']['tmp_name'],
$upload_path.$timestamp.-.$id.-.$filename) ) {
 echo pcenter . $message[complete]./center/p;
  } else {
 echo pfont color='red'center
. $message[incomplete]./font/center/p;
  }

   }
 }

 function filename_mod ($filename) {
 ereg_replace([^a-z0-9._], ,
 ereg_replace ( , _,
 ereg_replace(%20, _,
 strtolower($orig_name;
 }

 $rc = 0;

 if($filesize_limit_use=1) {
   $filesize1 = $HTTP_POST_FILES['userfile1']['name'] / 1024;
//filesize
 in kB
   $filesize2 = $HTTP_POST_FILES['userfile2']['name'] / 1024;
//filesize
 in kB
   $filesize3 = $HTTP_POST_FILES['userfile3']['name'] / 1024;
//filesize
 in kB
   $filesize4 = $HTTP_POST_FILES['userfile4']['name'] / 1024;
//filesize
 in kB
}


 if ( isset($HTTP_POST_VARS[upload]) ) {


 if ($HTTP_POST_FILES['userfile1']['name']) {
 $orig_name1 = $HTTP_POST_FILES['userfile1']['name'];
 $filename1 = filename_mod ($orig_name1);
 filesize_check ($filesize1);
 if ( $rc == 0 ) {
 if($extval_use=1) {
 ext_valid ($filename1);
 }
   }
 if ( $rc == 0 ) {
 file_upload ($filename1);
 }
 }

 if ($HTTP_POST_FILES['userfile2']['name']) {
 $orig_name2 = $HTTP_POST_FILES['userfile2']['name'];
 $filename2 = filename_mod ($orig_name2);
 filesize_check ($filesize2);
 if ( $rc == 0 ) {
 if($extval_use=1) {
 ext_valid ($filename2);
 }
   }
 if ( $rc == 0 ) {
 file_upload ($filename2);
 }
 }

 if ($HTTP_POST_FILES['userfile3']['name']) {
 $orig_name3 = $HTTP_POST_FILES['userfile3']['name'];
 $filename3 = filename_mod ($orig_name3);
 filesize_check ($filesize3);
 if ( $rc == 0 ) {
 if($extval_use=1) {
 ext_valid ($filename3);
 }
   }
 if ( $rc == 0 ) {
 file_upload ($filename3);
 }
 }

 if ($HTTP_POST_FILES['userfile4']['name']) {
 $orig_name4 = $HTTP_POST_FILES['userfile4']['name'];
 $filename4

Re: [PHP] How do i upgrade from PHP 4.1.2 to 4.2.0?

2002-04-23 Thread Tyler Longren

Just do it like you're installing new.  You don't have to remove the old
one, just:
./configure --blah-blah
make
make install

restart apache.

Tyler Longren
Captain Jack Communications
[EMAIL PROTECTED]
www.captainjack.com

- Original Message -
From: Sebastian A. [EMAIL PROTECTED]
To: PHP General List (PHP.NET) [EMAIL PROTECTED]
Sent: Tuesday, April 23, 2002 9:10 AM
Subject: [PHP] How do i upgrade from PHP 4.1.2 to 4.2.0?


 What do I have to do to upgrade from PHP 4.1.2 to 4.2.0? Do I just
overwrite
 all the old PHP files with the new ones or must I do something else?


 Thanks in advance.


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




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




Re: [PHP] file permissions on counter?

2002-04-23 Thread Tyler Longren

Hi Antonio,

try this for your fopen():
$file=fopen(counter.txt,r+)

Incase you're interested, here's the code I use whenever I need to use a
simple text-file based counter:
?
$file = .count.txt;
$fp = fopen($file,r+);
$counter = fread($fp, filesize($file));
fclose($fp);
$counter +=1;
$fp = fopen($file, w+);
fputs($fp, $counter);
fclose($fp);
include($file);
?

Tyler Longren
Captain Jack Communications
www.captainjack.com
[EMAIL PROTECTED]

- Original Message -
From: Antonio [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, April 23, 2002 8:48 PM
Subject: [PHP] file permissions on counter?


 Hi, I have to read a simple counter on my server, but the server
 responses that I haven't permissions to open the file which contains the
 data in write mode. This file (counter.txt) it has all the permissions
 (777). I don't know how to do, could somebody help me?


 I execute this file on server:


 HTML
 HEAD
 TITLE/TITLE
 BODY


 ?php


 $userip = $REMOTE_ADDR;


 if ($file=fopen(counter.txt,  w)) {
$counter = fread($file, 10);
$counter++;
fwrite($file , $counter);
fclose($file);
 }

 echo $counter;


 ?


 /body
 /html

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



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




Re: [PHP] Submit Form

2002-04-22 Thread Tyler Longren

Are you using method=post in your form tag?  Sometimes, if you leave that
out, some weird stuff will appear in the URL.

Tyler Longren
Captain Jack Communications
[EMAIL PROTECTED]
www.captainjack.com

- Original Message -
From: dengach [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, April 22, 2002 9:10 AM
Subject: [PHP] Submit Form


 I am using php4 on windows and has been serving php files just fine
however,
 once I started creating forms i.e data submition in forms. The browser
 displays /php4/php.exe as part of the url even after I try to refresh the
 page.



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



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




Re: [PHP] MySQL query

2002-04-22 Thread Tyler Longren

I'm not sure how PHP would handle this, but have you tried this:
mysql_query(UPDATE sampcomp SET fg='N', pctd='69', maxpctd='69.1' WHERE
sampcompid='3';UPDATE sampcomp SET fg='N', pctd='69.2', maxpctd='69.3'
WHERE sampcompid='2');
??

I doubt you can put multiple queries in one execution of mysql_query().
It's worth a shot though.

Tyler Longren
Captain Jack Communications
www.captainjack.com
[EMAIL PROTECTED]


- Original Message -
From: Lee P Reilly [EMAIL PROTECTED]
To: PHP List [EMAIL PROTECTED]
Sent: Monday, April 22, 2002 3:07 PM
Subject: [PHP] MySQL query


 Hi,

 Can someone tell me if there is a way to execute multiple MySQL
 statements by passing *one* query containing a number of individual
 statements to MySQL e.g.

 UPDATE sampcomp SET fg=N, pctd=69, maxpctd=69.1 WHERE
 sampcompid=3;UPDATE sampcomp SET fg=N, pctd=69.2, maxpctd=69.3
 WHERE sampcompid=2;

 And just return FALSE if one of the queries cannot be executed? Just
 curious...

 Cheers,
 Lee


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




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




Re: [PHP] PHP 4.2.0?

2002-04-22 Thread Tyler Longren

Give em a few minutes.  They probably just put the PHP 4.2.0 has been
released announcement up on the index page.  They may not have put the
files up yet.

Tyler Longren
Captain Jack Communications
www.captainjack.com
[EMAIL PROTECTED]

- Original Message -
From: Sebastian A. [EMAIL PROTECTED]
To: PHP General List (PHP.NET) [EMAIL PROTECTED]
Sent: Monday, April 22, 2002 3:14 PM
Subject: [PHP] PHP 4.2.0?


 On PHP.net it says that version 4.2.0 of PHP is out, yet on the downloads
 page, I can only find 4.1.2. If anyone has PHP 4.2.0 can you please
provide
 me the URL?

 Thanks in advance.


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




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




Re: [PHP] remove last character in a string

2002-04-22 Thread Tyler Longren

First, you'll need to get the length of the str with the str_len() function.
After you have that, use the substr() function like Rasmus mentioned.

Tyler Longren
Captain Jack Communications
www.captainjack.com
[EMAIL PROTECTED]

- Original Message -
From: Craig Westerman [EMAIL PROTECTED]
To: php-general-list [EMAIL PROTECTED]
Sent: Monday, April 22, 2002 10:26 PM
Subject: [PHP] remove last character in a string


 I have a string that ends in a comma. What is best method to remove the
 comma?

 Craig 
 [EMAIL PROTECTED]



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




  1   2   3   >