[PHP] openssl_csr_sign issues

2002-12-31 Thread Larry
Wondering if anyone else has run into the following problem (or if I'm missing
something totally obvious). I've got a program that basically generates a key
and certificate for a user who enters all the associated information (common
name, passphrase, etc). So I've created a dummy CA cert and key that I keep on
my server. Here's some example code:

$cacert = "file://caselfsigncert.pem";
$cakey = array("file://caselfsignkey.pem", "insecureselfsignkey");

if ($privkey = openssl_pkey_new()) {

openssl_pkey_export($privkey, $pkeyout, $passphrase);
print "priv key$pkeyout";
}
if ($csr = openssl_csr_new($dn, $privkey)) {

openssl_csr_export($csr, $csrout);
print "CSR:$csrout";
}
if ($cert = openssl_csr_sign($csr, $cacert, $cakey, 365)) {

openssl_x509_export($cert, $certout);
print "x509:$certout";
}

My problem is that the last stanza ($cert = openssl_csr_sign...) doesn't work.
I know that the certificate and key file are loaded and that passphrase is
working (if I change either of the three variables I get openssl and/or PHP
errors complaing the files are not found or the passphrase is invalid).

When it does seemingly work, my program ceases all output and terminates. I
originally didn't have each step enclosed in _if_ statements and that resulted
in null output from the entriee program (even that parts that were working). 

So it seems like either openssl_csr_sign is broken, or that I'm using it in
the wrong way (though the docs on php.net imply this is proper). One other
note, if I use NULL instead of $cacert as the signing certificate it works
fine (i.e. self signed certs). 

Anyone have any ideas?

openssl0.9.6h
php4.2.3

Thanks


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




[PHP] Variables are empty only in fwrite

2012-03-15 Thread Larry
Hello, when I pass a variable whose value originally came from $_GET
or $_REQUEST to fwrite, fwrite behaves as if it was passed an empty
string. Note that the file is successfully opened and written to by
the script, but the variable that originally came from $_GET does not
have its value interpolated in the text file, even though it does get
interpolated in the echo().

 Code 


 Request 

/search.php?q=meh123

 Response --- ( expected )

:meh123:6 string(10) ":meh123:6 "

 Contents of /tmp/wtf.log 
::0

Some sort of security setting in php.ini maybe? If so, I'm not only
curious in how to fix it but also how this actually happens. Does the
value assigned to $writeline not get immediately evaluated? I mean,
does $writeline "know" it contains variables from elsewhere, instead
of just containing a string of chars?

Thanks!

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



Re: [PHP] Variables are empty only in fwrite

2012-03-15 Thread Larry
On Thu, Mar 15, 2012 at 11:53 AM, Daniel P. Brown
 wrote:
> On Thu, Mar 15, 2012 at 11:30, Larry  wrote:
>> Hello, when I pass a variable whose value originally came from $_GET
>> or $_REQUEST to fwrite, fwrite behaves as if it was passed an empty
>> string. Note that the file is successfully opened and written to by
>> the script, but the variable that originally came from $_GET does not
>> have its value interpolated in the text file, even though it does get
>> interpolated in the echo().
>>
>>  Code 
>> > $meh = $_GET["q"];
>> $writeline = ":" . $meh . ":" . strlen($meh) . PHP_EOL;
>> echo ( $writeline );
>>
>> $fp = fopen("/tmp/wtf.log","w+");
>> fwrite($fp, $writeline );
>> fclose($fp);
>>
>> var_dump($writeline);
>> ?>
>
>    Are you sure it's not a permissions-based issue, perhaps when
> writing as the normal user, then the user as which the web server
> runs, et cetera?  What happens if you completely remove /tmp/wtf.log
> and re-run your script with the appended query string?

I have removed the wtf.log file between runs, just did it once more.
Same thing happens. A new file is created, and the contents are "::0"

So I'm sure its not a permissions issue ( However I'm also sure that
this shouldn't be happening so... ) Thanks.

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



Re: [PHP] Variables are empty only in fwrite

2012-03-15 Thread Larry
On Thu, Mar 15, 2012 at 12:21 PM, Matijn Woudt  wrote:
> On Thu, Mar 15, 2012 at 4:59 PM, Larry  wrote:
>> On Thu, Mar 15, 2012 at 11:53 AM, Daniel P. Brown
>>  wrote:
>>> On Thu, Mar 15, 2012 at 11:30, Larry  wrote:
>>>> Hello, when I pass a variable whose value originally came from $_GET
>>>> or $_REQUEST to fwrite, fwrite behaves as if it was passed an empty
>>>> string. Note that the file is successfully opened and written to by
>>>> the script, but the variable that originally came from $_GET does not
>>>> have its value interpolated in the text file, even though it does get
>>>> interpolated in the echo().
>>>>
>>>>  Code 
>>>> >>> $meh = $_GET["q"];
>>>> $writeline = ":" . $meh . ":" . strlen($meh) . PHP_EOL;
>>>> echo ( $writeline );
>>>>
>>>> $fp = fopen("/tmp/wtf.log","w+");
>>>> fwrite($fp, $writeline );
>>>> fclose($fp);
>>>>
>>>> var_dump($writeline);
>>>> ?>
>>>
>>>    Are you sure it's not a permissions-based issue, perhaps when
>>> writing as the normal user, then the user as which the web server
>>> runs, et cetera?  What happens if you completely remove /tmp/wtf.log
>>> and re-run your script with the appended query string?
>>
>> I have removed the wtf.log file between runs, just did it once more.
>> Same thing happens. A new file is created, and the contents are "::0"
>>
>> So I'm sure its not a permissions issue ( However I'm also sure that
>> this shouldn't be happening so... ) Thanks.
>
> The code is working fine here, of course, it should. Is it really
> because of the $_GET?, have you tried setting $q = "meh123";?
> Also, try using file_put_contents('/tmp/wtf.log', $writeline); instead.
>
> - Matijn

Yes I have tried to set a variable explicitly with a string, and that
variable does end up interpolated into the file. I just tried using
file_put_contents with the same result.

Here is a modified version, showing another variable that does work,
and file_put_contents():



Here the response/stdout:
:meh123:6:Yay I go in the File string(31) ":meh123:6:Yay I go in the File "

But the file is the same:
root@prime:/tmp# rm wtf.log
root@prime:/tmp# ls wtf.log
ls: cannot access wtf.log: No such file or directory
[ I make the request ]
root@prime:/tmp# cat wtf.log
::0:Yay I go in the File

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



Re: [PHP] Variables are empty only in fwrite

2012-03-15 Thread Larry
On Thu, Mar 15, 2012 at 2:57 PM, Matijn Woudt  wrote:
> On Thu, Mar 15, 2012 at 7:51 PM, Larry  wrote:
>> On Thu, Mar 15, 2012 at 12:21 PM, Matijn Woudt  wrote:
>>> On Thu, Mar 15, 2012 at 4:59 PM, Larry  wrote:
>>>> On Thu, Mar 15, 2012 at 11:53 AM, Daniel P. Brown
>>>>  wrote:
>>>>> On Thu, Mar 15, 2012 at 11:30, Larry  wrote:
>>>>>> Hello, when I pass a variable whose value originally came from $_GET
>>>>>> or $_REQUEST to fwrite, fwrite behaves as if it was passed an empty
>>>>>> string. Note that the file is successfully opened and written to by
>>>>>> the script, but the variable that originally came from $_GET does not
>>>>>> have its value interpolated in the text file, even though it does get
>>>>>> interpolated in the echo().
>>>>>>
>>>>>>  Code 
>>>>>> >>>>> $meh = $_GET["q"];
>>>>>> $writeline = ":" . $meh . ":" . strlen($meh) . PHP_EOL;
>>>>>> echo ( $writeline );
>>>>>>
>>>>>> $fp = fopen("/tmp/wtf.log","w+");
>>>>>> fwrite($fp, $writeline );
>>>>>> fclose($fp);
>>>>>>
>>>>>> var_dump($writeline);
>>>>>> ?>
>>>>>
>>>>>    Are you sure it's not a permissions-based issue, perhaps when
>>>>> writing as the normal user, then the user as which the web server
>>>>> runs, et cetera?  What happens if you completely remove /tmp/wtf.log
>>>>> and re-run your script with the appended query string?
>>>>
>>>> I have removed the wtf.log file between runs, just did it once more.
>>>> Same thing happens. A new file is created, and the contents are "::0"
>>>>
>>>> So I'm sure its not a permissions issue ( However I'm also sure that
>>>> this shouldn't be happening so... ) Thanks.
>>>
>>> The code is working fine here, of course, it should. Is it really
>>> because of the $_GET?, have you tried setting $q = "meh123";?
>>> Also, try using file_put_contents('/tmp/wtf.log', $writeline); instead.
>>>
>>> - Matijn
>>
>> Yes I have tried to set a variable explicitly with a string, and that
>> variable does end up interpolated into the file. I just tried using
>> file_put_contents with the same result.
>>
>> Here is a modified version, showing another variable that does work,
>> and file_put_contents():
>>
>> > $meh = $_GET["q"];
>> $good = "Yay I go in the File" . PHP_EOL;
>> $writeline = ":" . $meh . ":" . strlen($meh) . ":" . $good;
>> echo ( $writeline );
>> file_put_contents("/tmp/wtf.log", $writeline );
>> var_dump($writeline);
>> ?>
>>
>> Here the response/stdout:
>> :meh123:6:Yay I go in the File string(31) ":meh123:6:Yay I go in the File "
>>
>> But the file is the same:
>> root@prime:/tmp# rm wtf.log
>> root@prime:/tmp# ls wtf.log
>> ls: cannot access wtf.log: No such file or directory
>> [ I make the request ]
>> root@prime:/tmp# cat wtf.log
>> ::0:Yay I go in the File
>
> Have you checked apache log files for any warnings/errors?
> How about writing $_GET['q'] directly? eg.
> file_put_contents('/tmp/wtf.log', $_GET['q']);?

Yes I tried using $_GET['q'] directly to no avail. However, you found
a clue! apache error.log is giving this:
PHP Notice:  Undefined index: q in /var/www/test/search.php on line 2

Strange b/c I am obtaining and using that value successfully in echo()!

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



Re: [PHP] Variables are empty only in fwrite

2012-03-15 Thread Larry
On Thu, Mar 15, 2012 at 4:03 PM, Matijn Woudt  wrote:
> On Thu, Mar 15, 2012 at 8:41 PM, Larry  wrote:
>> On Thu, Mar 15, 2012 at 2:57 PM, Matijn Woudt  wrote:
>>> On Thu, Mar 15, 2012 at 7:51 PM, Larry  wrote:
>>>> On Thu, Mar 15, 2012 at 12:21 PM, Matijn Woudt  wrote:
>>>>> On Thu, Mar 15, 2012 at 4:59 PM, Larry  wrote:
>>>>>> On Thu, Mar 15, 2012 at 11:53 AM, Daniel P. Brown
>>>>>>  wrote:
>>>>>>> On Thu, Mar 15, 2012 at 11:30, Larry  wrote:
>>>>>>>> Hello, when I pass a variable whose value originally came from $_GET
>>>>>>>> or $_REQUEST to fwrite, fwrite behaves as if it was passed an empty
>>>>>>>> string. Note that the file is successfully opened and written to by
>>>>>>>> the script, but the variable that originally came from $_GET does not
>>>>>>>> have its value interpolated in the text file, even though it does get
>>>>>>>> interpolated in the echo().
>>>>>>>>
>>>>>>>>  Code 
>>>>>>>> >>>>>>> $meh = $_GET["q"];
>>>>>>>> $writeline = ":" . $meh . ":" . strlen($meh) . PHP_EOL;
>>>>>>>> echo ( $writeline );
>>>>>>>>
>>>>>>>> $fp = fopen("/tmp/wtf.log","w+");
>>>>>>>> fwrite($fp, $writeline );
>>>>>>>> fclose($fp);
>>>>>>>>
>>>>>>>> var_dump($writeline);
>>>>>>>> ?>
>>>>>>>
>>>>>>>    Are you sure it's not a permissions-based issue, perhaps when
>>>>>>> writing as the normal user, then the user as which the web server
>>>>>>> runs, et cetera?  What happens if you completely remove /tmp/wtf.log
>>>>>>> and re-run your script with the appended query string?
>>>>>>
>>>>>> I have removed the wtf.log file between runs, just did it once more.
>>>>>> Same thing happens. A new file is created, and the contents are "::0"
>>>>>>
>>>>>> So I'm sure its not a permissions issue ( However I'm also sure that
>>>>>> this shouldn't be happening so... ) Thanks.
>>>>>
>>>>> The code is working fine here, of course, it should. Is it really
>>>>> because of the $_GET?, have you tried setting $q = "meh123";?
>>>>> Also, try using file_put_contents('/tmp/wtf.log', $writeline); instead.
>>>>>
>>>>> - Matijn
>>>>
>>>> Yes I have tried to set a variable explicitly with a string, and that
>>>> variable does end up interpolated into the file. I just tried using
>>>> file_put_contents with the same result.
>>>>
>>>> Here is a modified version, showing another variable that does work,
>>>> and file_put_contents():
>>>>
>>>> >>> $meh = $_GET["q"];
>>>> $good = "Yay I go in the File" . PHP_EOL;
>>>> $writeline = ":" . $meh . ":" . strlen($meh) . ":" . $good;
>>>> echo ( $writeline );
>>>> file_put_contents("/tmp/wtf.log", $writeline );
>>>> var_dump($writeline);
>>>> ?>
>>>>
>>>> Here the response/stdout:
>>>> :meh123:6:Yay I go in the File string(31) ":meh123:6:Yay I go in the File "
>>>>
>>>> But the file is the same:
>>>> root@prime:/tmp# rm wtf.log
>>>> root@prime:/tmp# ls wtf.log
>>>> ls: cannot access wtf.log: No such file or directory
>>>> [ I make the request ]
>>>> root@prime:/tmp# cat wtf.log
>>>> ::0:Yay I go in the File
>>>
>>> Have you checked apache log files for any warnings/errors?
>>> How about writing $_GET['q'] directly? eg.
>>> file_put_contents('/tmp/wtf.log', $_GET['q']);?
>>
>> Yes I tried using $_GET['q'] directly to no avail. However, you found
>> a clue! apache error.log is giving this:
>> PHP Notice:  Undefined index: q in /var/www/test/search.php on line 2
>>
>> Strange b/c I am obtaining and using that value successfully in echo()!
>
> Well.. That seems pretty buggy, I guess it's a bug in PHP. Try
> changing q in something else, and maybe you want to submit a bug
> report to PHP?

Changing the index name didn't help. I think I will submit a bug,
after a bit more scrutiny of my php.ini to make sure there isn't some
restriction in there. This is a default ubuntu apache/php.ini though.
Thanks again.

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



[PHP] rounding test fails when I try to "make test"

2005-03-24 Thread Larry
Hi,

 

I am trying to build the latest stable release of php (4.3.10)

I've successfully compiled but when I run "make test"

the following are the two bugs that fail.

 

FAILED TEST SUMMARY

-

Bug #24142 (round() problems) [ext/standard/tests/math/bug24142.phpt]

Bug #25694 (round() and number_format() inconsistency)
[ext/standard/tests/math/bug25694.phpt]

 

I've been searching for the past few days and haven't been able find any
resolution.

>From looking at the Changelog for 4.3.10 http://www.php.net/ChangeLog-4.php

it shows that both of these bugs were fixed in the 4.3.10 release.

But still the tests fail?  

Are the bugs fixed and the test case hasn't been updated?

My PHP app relies heavily on round().

Any insight into this issue is much appreciated.

 

Thanks,

 

Larry

 



[PHP] PHP_AUTH_USER failing, please help me...

2002-11-25 Thread Larry Brown
I just built a new server and loaded with RH8.  I copied my php files over
to the new apache server and modified the links.  I couldn't find any
mention of php in the httpd.conf so I figured it must me compiled into httpd
so I tested it.  The PHP files load, however, the php_auth_user and
php_auth_pw don't work.  They prompt the user yet with :


if (isset( $PHP_AUTH_USER ) && isset($PHP_AUTH_PW)) {

echo $PHP_AUTH_USER;
echo $PHP_AUTH_PW;
} if ( ! $auth )
{
  header( 'WWW-Authenticate: Basic realm="Private"' );
  header( 'HTTP/1.0 401 Unauthorized' );
  echo 'Authorization Required.';
  echo $PHP_AUTH_USER;
  echo $PHP_AUTH_PW;
  echo "OK?";
  exit;

}
else
{
  echo $PHP_AUTH_USER;
  echo $PHP_AUTH_PW;
}

The prompt comes up and asks for a password three times.  After the three it
prints... Authorization Required.OK?
So it appears as though it is not returning the variables.  The php version
is 4.2.2 and apache is 2.0.4 (redhat).





Larry S. Brown
Dimension Networks, Inc.





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




[PHP] RE: PHP_AUTH_USER failing, please help me...

2002-11-25 Thread Larry Brown
Phil,

You da man!  It just doesn't get any sweeter.  Register_globals is off.

Thank you,

Larry S. Brown
Dimension Networks, Inc.


-Original Message-
From: Philip Hallstrom [mailto:[EMAIL PROTECTED]]
Sent: Monday, November 25, 2002 7:40 PM
To: Larry Brown
Cc: PHP List
Subject: Re: PHP_AUTH_USER failing, please help me...

Just a quick guess that register_globals is probably turned off (check
with a phpinfo() to be sure) and therefore $PHP_AUTH_USER and $PHP_AUTH_PW
are not being set.

Or, try $_SERVER[PHP_AUTH_USER], etc...

On Mon, 25 Nov 2002, Larry Brown wrote:

> I just built a new server and loaded with RH8.  I copied my php files over
> to the new apache server and modified the links.  I couldn't find any
> mention of php in the httpd.conf so I figured it must me compiled into
httpd
> so I tested it.  The PHP files load, however, the php_auth_user and
> php_auth_pw don't work.  They prompt the user yet with :
>
>
> if (isset( $PHP_AUTH_USER ) && isset($PHP_AUTH_PW)) {
>
>   echo $PHP_AUTH_USER;
>   echo $PHP_AUTH_PW;
> } if ( ! $auth )
> {
>   header( 'WWW-Authenticate: Basic realm="Private"' );
>   header( 'HTTP/1.0 401 Unauthorized' );
>   echo 'Authorization Required.';
>   echo $PHP_AUTH_USER;
>   echo $PHP_AUTH_PW;
>   echo "OK?";
>   exit;
>
> }
> else
> {
>   echo $PHP_AUTH_USER;
>   echo $PHP_AUTH_PW;
> }
>
> The prompt comes up and asks for a password three times.  After the three
it
> prints... Authorization Required.OK?
> So it appears as though it is not returning the variables.  The php
version
> is 4.2.2 and apache is 2.0.4 (redhat).
>
>
>
>
>
> Larry S. Brown
> Dimension Networks, Inc.
>
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>



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




[PHP] apache httpd-2.0.40-8 and scanning alternate extensions for php

2002-12-01 Thread Larry Brown
I just moved to a machine with RH8 that has their latest version of apache.
On prior versions httpd.conf had a section that I could set to have the
server scan .html extensions for php tags.  There is no longer such a
section even though the server does appropriately scan .php files.  Does
anyone know how I can have it scan different extensions?

Larry S. Brown
Dimension Networks, Inc.
(727) 723-8388




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




RE: [PHP] apache httpd-2.0.40-8 and scanning alternate extensions for php

2002-12-01 Thread Larry Brown
That's what I'm saying, there is absolutely no mention of php in httpd.conf.
That line does not exist.  It does in previous versions of RedHat / Apache.
Is it possible that this is some kind of RedHat modification?

Larry S. Brown
Dimension Networks, Inc.
(727) 723-8388

-Original Message-
From: Evan Nemerson [mailto:[EMAIL PROTECTED]]
Sent: Sunday, December 01, 2002 4:53 PM
To: Larry Brown; [EMAIL PROTECTED]
Subject: Re: [PHP] apache httpd-2.0.40-8 and scanning alternate extensions
for php

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Find the line that looks like "AddType application/x-httpd-php .php", and
change it to "AddType application/x-httpd-php .php .html"


On Sunday 01 December 2002 01:34 pm, Larry Brown wrote:
> I just moved to a machine with RH8 that has their latest version of
apache.
> On prior versions httpd.conf had a section that I could set to have the
> server scan .html extensions for php tags.  There is no longer such a
> section even though the server does appropriately scan .php files.  Does
> anyone know how I can have it scan different extensions?
>
> Larry S. Brown
> Dimension Networks, Inc.
> (727) 723-8388
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.0.7 (GNU/Linux)

iD8DBQE96oTZ/rncFku1MdIRAlXQAJ9lV5cmg2MLXnnSIVsFWW157+puBQCfTzya
TGBEeaXx+9XlBxHbzEtWwos=
=Ajqh
-END PGP SIGNATURE-



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




RE: [PHP] apache httpd-2.0.40-8 and scanning alternate extensions for php

2002-12-01 Thread Larry Brown
Perhaps the new version doesn't need the AddType for the default extension
of php because it worked without this declaration.  However, the declaration
works as I added it and restarted the server.  It now works as I needed.  I
thank you for your help.  I suppose I should have tried this before posting
the question.  Sorry to have wasted your time.  Hopefully someone else will
fail to test it first and find my question before posting and save everyone
time in the future.

Larry S. Brown
Dimension Networks, Inc.
(727) 723-8388

-Original Message-
From: Evan Nemerson [mailto:[EMAIL PROTECTED]]
Sent: Sunday, December 01, 2002 4:53 PM
To: Larry Brown; [EMAIL PROTECTED]
Subject: Re: [PHP] apache httpd-2.0.40-8 and scanning alternate extensions
for php

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Find the line that looks like "AddType application/x-httpd-php .php", and
change it to "AddType application/x-httpd-php .php .html"


On Sunday 01 December 2002 01:34 pm, Larry Brown wrote:
> I just moved to a machine with RH8 that has their latest version of
apache.
> On prior versions httpd.conf had a section that I could set to have the
> server scan .html extensions for php tags.  There is no longer such a
> section even though the server does appropriately scan .php files.  Does
> anyone know how I can have it scan different extensions?
>
> Larry S. Brown
> Dimension Networks, Inc.
> (727) 723-8388
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.0.7 (GNU/Linux)

iD8DBQE96oTZ/rncFku1MdIRAlXQAJ9lV5cmg2MLXnnSIVsFWW157+puBQCfTzya
TGBEeaXx+9XlBxHbzEtWwos=
=Ajqh
-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




[PHP] Disable refresh?

2002-12-01 Thread Larry Brown
Anyone know of a method of preventing a user from refreshing a page.  I get
multiple updates with the same information in my database...

Larry S. Brown
Dimension Networks, Inc.
(727) 723-8388




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




RE: [PHP] Disable refresh?

2002-12-01 Thread Larry Brown
If not, is there a variable that provides information that a refresh
occurred to load the page?

Larry S. Brown
Dimension Networks, Inc.
(727) 723-8388

-Original Message-
From: Larry Brown [mailto:[EMAIL PROTECTED]]
Sent: Sunday, December 01, 2002 8:23 PM
To: PHP List
Subject: [PHP] Disable refresh?

Anyone know of a method of preventing a user from refreshing a page.  I get
multiple updates with the same information in my database...

Larry S. Brown
Dimension Networks, Inc.
(727) 723-8388




--
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] Disable refresh?

2002-12-01 Thread Larry Brown
Thanks guys this forum is going to get me in trouble.  It is so convenient I
keep asking questions too soon.  After submitting the amendment to the
original question I thought of the solution of setting a session variable
and then clearing it before and after the submittal page.  I'll work the
gray matter a little harder next time before asking.  Thanks again.


Larry S. Brown
Dimension Networks, Inc.
(727) 723-8388

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Sunday, December 01, 2002 8:58 PM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] Disable refresh?

> Anyone know of a method of preventing a user from refreshing a page.  I
> get multiple updates with the same information in my database...

Hello!

You can prevent it multiple ways. Two common solution:

 - When creating form, add a unique id to it in a hidden field.
   After succesful insert put that id into a container table,
   what stores used ids. Before inserting, check the presence of
   that id in that container. You can make unique ids with
   php's uniquid() function, or if mod_unique_id compiled into
   Apache, you can use $_SERVER['UNIQUE_ID'] too. Store expire
   dates too with that ids to be able delete old ids with a
   cronjob.

 - Another way: this is easier, but not too elegant. After
   inserting data, send a location header to browser to
   redirect it from that form-processor page to an another.
   After that, refreshing affects that page.

Heilig (Cece) Szabolcs
[EMAIL PROTECTED] - http://phphost.hu




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




RE: [PHP] PDF Help Please

2002-12-02 Thread Larry Brown
I know this is probably a day late and a dollar short but I was curious
myself whether this would be a good outlet to use for reports for a client
and wondered if there was such a thing.  After seeing your post I went to
there site and it looks like you have to have the PDI side to be able to
modify existing ones.  The $1,000.  Was there a reason you thought there was
some other solution?

Larry S. Brown
Dimension Networks, Inc.
(727) 723-8388

-Original Message-
From: Ryan Smaglik [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 02, 2002 5:14 PM
To: [EMAIL PROTECTED]
Subject: [PHP] PDF Help Please

I need to figure out by tonight how to:
1. open a .pdf file using php.
2. add text to certain parts of it.
3. save it and output to browser.
4. Then delete the temp file so the process can be done over again.

I have PDFlib but not the $1000 PDI addition

Please help,

Ryan



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




[PHP] hiding php

2002-12-02 Thread Larry Brown
This should bump up my popularity here...can you run asp on apache?  The
reason I ask is that I understand you can use a php option to hide the fact
that you are running php.  This sounds like a good idea to keep people
guessing, but I also want to use .asp extensions and have them parsed for
the php tags.  I thought this would be nice if someone wanted to screw with
a site they wouldn't even be trying tools that would apply.  However, if you
can't run asp on apache nobody would be fooled.  Any thoughts?

Larry S. Brown
Dimension Networks, Inc.
(727) 723-8388




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




RE: [PHP] hiding php

2002-12-02 Thread Larry Brown
Because its better to have someone waste time trying known hacks for a
platform I don't have than to have the same person not know the platform and
start spending time figuring out what it is right off the bat.

Larry S. Brown
Dimension Networks, Inc.
(727) 723-8388

-Original Message-
From: Justin French [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, December 03, 2002 12:39 AM
To: Larry Brown; PHP List
Subject: Re: [PHP] hiding php

Why not just make up an extension, like your initials (.lsb) or your
business name (.dim or .dni), and set-up apache to pipe all those files
through PHP...??

That way they'll have no clue at all (if used in conjunction with the "hide
PHP" stuff, etc etc).


Justin

on 03/12/02 4:13 PM, Larry Brown ([EMAIL PROTECTED]) wrote:

> This should bump up my popularity here...can you run asp on apache?  The
> reason I ask is that I understand you can use a php option to hide the
fact
> that you are running php.  This sounds like a good idea to keep people
> guessing, but I also want to use .asp extensions and have them parsed for
> the php tags.  I thought this would be nice if someone wanted to screw
with
> a site they wouldn't even be trying tools that would apply.  However, if
you
> can't run asp on apache nobody would be fooled.  Any thoughts?
>
> Larry S. Brown
> Dimension Networks, Inc.
> (727) 723-8388
>
>
>

Justin French

http://Indent.com.au
Web Development &
Graphic Design




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




[PHP] paging through results of mysql query

2002-12-05 Thread Larry Brown
I know I'm trying to re-invent the wheel, but it is because I don't know how
they do it.  I set up a script to pull a ruleset from mysql and then loop
through each row in the set.  I then check each row as it loops until I get
to the row number I want and start echoing rows.  I create the row numbers
by a $m=0; outside the loop; $m++; inside the loop.  Then I stop echoing
rows when it reaches 50 iterations.  The total iterations achieved is passed
on to the next script that does the same thing but starting where the total
left off.  This causes a lot of overhead as all of the resultset are pulled
for each script.  Does anyone have a magic bullet for this?  This
functionality is what I take search engines to be demonstrating.  If anyone
can help, I could wipe the sweat of my processors brow!  (and mine for that
matter)

Larry S. Brown
Dimension Networks, Inc.
(727) 723-8388




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




RE: [PHP] paging through results of mysql query

2002-12-05 Thread Larry Brown
Much Gratefulness on my part!  Finally, my server and I can catch our
breath.

Larry S. Brown
Dimension Networks, Inc.
(727) 723-8388

-Original Message-
From: John W. Holmes [mailto:[EMAIL PROTECTED]]
Sent: Thursday, December 05, 2002 12:47 PM
To: 'Larry Brown'; 'PHP List'
Subject: RE: [PHP] paging through results of mysql query

> I know I'm trying to re-invent the wheel, but it is because I don't
know
> how
> they do it.  I set up a script to pull a ruleset from mysql and then
loop
> through each row in the set.  I then check each row as it loops until
I
> get
> to the row number I want and start echoing rows.  I create the row
numbers
> by a $m=0; outside the loop; $m++; inside the loop.  Then I stop
echoing
> rows when it reaches 50 iterations.  The total iterations achieved is
> passed
> on to the next script that does the same thing but starting where the
> total
> left off.  This causes a lot of overhead as all of the resultset are
> pulled
> for each script.  Does anyone have a magic bullet for this?  This
> functionality is what I take search engines to be demonstrating.  If
> anyone
> can help, I could wipe the sweat of my processors brow!  (and mine for
> that
> matter)

SELECT * FROM tbl WHERE ... LIMIT $start, $per_page;

Adjust $start and $per_page accordingly to get your "paging"...

---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] window size and setting other properties

2002-12-11 Thread Larry Brown
Does PHP have any commands to set the size of the window to be loaded?  For
that matter are there any methods for hiding buttons etc. from PHP?

Larry S. Brown MCSE
Dimension Networks, Inc.
(727) 723-8388




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




[PHP] running perl script via su

2002-12-20 Thread Larry Brown
I am getting a lot of information about running the web server as root and
the associated problems and so on as I've been looking for a quick solution.
I have a perl script that is run by cron that executes sequence of events
via sftp.  The sftp client has no option that I know of to denote a
different user than the one executing the command using rsa so I set up a
user with the same name as the user needed to log into the remote server and
run it under cron for that user.  I want to place a simple button on my web
site that executes that script but it has to be run by that user.  Since
there will be no interface on the site for which commands can be sent using
this page I'm not too worried about any kind of exploit.  I also don't want
to have to go through the process of installing and learning the methods of
use for apache suExec.  I also don't want the entire web server running as
this user.  Does anyone know of a quick and dirty solution for this

Larry S. Brown
Dimension Networks, Inc.
(727) 723-8388




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




[PHP] running perl script via su

2002-12-21 Thread Larry Brown
I am getting a lot of information about running the web server as root and
the associated problems and so on as I've been looking for a quick solution.
I have a perl script that is run by cron that executes sequence of events
via sftp.  The sftp client has no option that I know of to denote a
different user than the one executing the command using rsa so I set up a
user with the same name as the user needed to log into the remote server and
run it under cron for that user.  I want to place a simple button on my web
site that executes that script but it has to be run by that user.  Since
there will be no interface on the site for which commands can be sent using
this page I'm not too worried about any kind of exploit.  I also don't want
to have to go through the process of installing and learning the methods of
use for apache suExec.  I also don't want the entire web server running as
this user.  Does anyone know of a quick and dirty solution for this

Larry S. Brown
Dimension Networks, Inc.
(727) 723-8388



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




RE: [PHP] No tshowing url in title bar....

2002-12-21 Thread Larry Brown
Before the  tag you have the   tags.  Place Title
of the page and it will show up on the title bar instead of the url.
If you want to get rid of the address bar of the browser window, let me know
and I can post the javascript for creating that window.

Larry S. Brown
Dimension Networks, Inc.
(727) 723-8388

-Original Message-
From: Alexander Guevara [mailto:[EMAIL PROTECTED]]
Sent: Saturday, December 21, 2002 12:54 PM
To: [EMAIL PROTECTED]
Subject: [PHP] No tshowing url in title bar

Dont know if this concerns to php genral.. but i want to know how can i do
for preventing showing the url in the title bar of the browser.. for example
i click a link that goes to a php page called verify.php and in the windows
browser title bar is show this.. http://www.server.com/verify.php

It is posssible to not show the url..  i mena show a title i dont know.

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] Problem with the List?

2002-12-21 Thread Larry Brown
Are my posts getting through?  They appear to come back on the list but I
also get this response...

Sorry. Your message could not be delivered to:

php-list,emc (The name was not found at the remote site. Check that the
name has been entered correctly.)


Larry S. Brown
Dimension Networks, Inc.
(727) 723-8388




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




[PHP] printing documents on printer

2002-12-30 Thread Larry Brown
Does anyone know where I might find specific information on methods of
sending documents to a printer from the web server to an attached printer.
My PHP and Perl books don't even touch on the capability for some reason.

Larry S. Brown
Dimension Networks, Inc.
(727) 723-8388




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




RE: [PHP] printing documents on printer

2002-12-30 Thread Larry Brown
My apologies, this is Linux RH8 to be exact.

Larry S. Brown
Dimension Networks, Inc.
(727) 723-8388

-Original Message-
From: John W. Holmes [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, December 31, 2002 12:05 AM
To: 'Larry Brown'; 'PHP List'
Subject: RE: [PHP] printing documents on printer

> Does anyone know where I might find specific information on methods of
> sending documents to a printer from the web server to an attached
printer.
> My PHP and Perl books don't even touch on the capability for some
reason.

On windows you can use the Printer Functions...

http://www.php.net/manual/en/ref.printer.php

On, *nix... I have no idea.

---John W. Holmes...

PHP Architect - A monthly magazine for PHP Professionals. Get your copy
today. http://www.phparch.com/



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



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




[PHP] web visitor viewing a script?

2003-01-04 Thread Larry Brown
This came up in another group and I just wanted to know from the experts
whether this is possible.  Being someone well versed in PHP can you visit a
web site, hit a script in PHP and be able to view the script on the page
rather than just the html it generates.  Is it true that the only way to
view the script itself is to have some problem with the web server or have a
local login for the server?

Larry S. Brown
Dimension Networks, Inc.
(727) 723-8388




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




RE: [PHP] web visitor viewing a script?

2003-01-04 Thread Larry Brown
Thank you guys for the confirmation and ...yes I got it. :(

Larry S. Brown
Dimension Networks, Inc.
(727) 723-8388

-Original Message-
From: Michael J. Pawlowsky [mailto:[EMAIL PROTECTED]]
Sent: Saturday, January 04, 2003 8:52 PM
To: Larry Brown; [EMAIL PROTECTED]
Subject: Re: [PHP] web visitor viewing a script?

or rename the file to .phps
for PHP source. Many servers recognize this mime type as source and send you
the file.

But if you are thinking about security...  the script is compiled and
executed on the server.
What you see are the results of the application.

Get it?

This is good and bad...  Because it means you can only run each application
once and then you have to call it again.
Possibly with different parameters etc.

It's why I also use JavaScript. The application resides on the client.
Meaning the client can interact with it,
So lets say you have 2 select boxes. You want to populate the second one
with data depending on the selection of the first
with out reloading the page. This can be done in JavaScript. Not in PHP.
When doing something like that I use PHP to populate
my javaScript arrays and JS handle the interaction with the client.


Mike




*** REPLY SEPARATOR  ***

On 04/01/2003 at 7:17 PM Larry Brown wrote:

>This came up in another group and I just wanted to know from the experts
>whether this is possible.  Being someone well versed in PHP can you visit a
>web site, hit a script in PHP and be able to view the script on the page
>rather than just the html it generates.  Is it true that the only way to
>view the script itself is to have some problem with the web server or have
>a
>local login for the server?
>
>Larry S. Brown
>Dimension Networks, Inc.
>(727) 723-8388
>
>
>
>
>--
>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] frustrating problem

2003-01-06 Thread Larry Brown
I'm not sure what syntax would work for you with one query.  You might try
the mysql list.  I personally make two queries.  One would be a query to the
foo table to get the name and the second would be a loop to iterate through
each contact info entry.  For each iteration you will get the array with the
individual FooContactID and when you post from that looped result you can do
your update if it needs to be done etc.  I hope that makes sense.

$query = "select FooLName from foo where FooID=$id";
$queryr = mysql_query($query) or die("Failed Foo");

$frow = mysql_fetch_row($queryr);

echo $frow[0].": ";

$query2 = "select FooPhone, FooEmail from foocontact where FooID=$id";
$query2r = mysql_query($query2) or die("Failed FooContact");

$n = 0;

while ($fcrow = mysql_fetch_row($query2r))
{
$n++;
echo $n.". ".$fcrow[0]." ".$fcrow[1]."";
}

That's off the top of my head.  I think that's how I'd do it.  I would
imagine you wanted separate tables so that one person could have multiple
addresses.  Again I might have a typo or two in there.  Just to give you an
idea.



Larry S. Brown
Dimension Networks, Inc.
(727) 723-8388

-Original Message-
From: Matthew K. Gold [mailto:[EMAIL PROTECTED]]
Sent: Monday, January 06, 2003 4:26 PM
To: [EMAIL PROTECTED]
Subject: [PHP] frustrating problem

I hope that I can explain this problem in a logical and clear way.

In MySQL, I have two tables for information::

foo, which contains
FooID, FooLName, FooFName

and

foocontact, which contains
FooID, FooContactID, FooEmail, FooPhone, FooAddress1, etc.

Honestly, I can't remember why I split up the names and contact info into
two separate tables, but that's the way it is...

In the first hundred or so entries of foocontact, FooID and FooContactID are
identical (both columns are auto-increment).  But because I've occasionally
had problems loading data into the database, and have had to reload some
entries while delete or forgetting to delete others, the numbers are now out
of synch.  For some entries, that doesn't seem to be a problem (I might have
fixed them by hand at an earlier date, but I can't remember), but for
others, it might be.

That may not matter, though.  What I'd like to do is call up info from both
foo and foocontact using only the FooID, which is passed in the url.

I can't understand, though, why the where clause in the folllowing line
isn't working the way I want it to:

SELECT FooLName, FooPhone, FooEmail
FROM foo, foocontact
WHERE foocontact.FooID=$FooID and foo.FooID=$FooID;


I've also tried:

WHERE foocontact.FooID=$FooID and foo.FooID=foocontact.FooID;

any idea why that doesn't work?  does any of this make sense?  sorry if it
doesn't, and thanks in advance for your help.

Matt




--
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] Forwarding POST info from a PHP script

2003-01-07 Thread Larry Brown
There is probably a better way but what I do is create hidden fields in the
form of the first page and populate it with the variable I need to go on to
the next one. Ie for variable a, b, c, d coming to the first page...



[Do something with some or all of those variables here]

echo "";
echo "";
echo "";
echo "";
echo "
echo "

That is what I usually do because I don't know of a better way.  So if you
don't find one you can always resort to that.  And if you need these to move
on automatically by telling another frame window what the variables are
while this one is still visible, you can use javascript to send variables to
other frames.  That is out of the scope of this message and I'd have to look
up the syntax for that, but it is definitely possible.



Larry S. Brown
Dimension Networks, Inc.
(727) 723-8388

-Original Message-
From: David Barrett [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, January 07, 2003 9:30 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Forwarding POST info from a PHP script

I want to be able to retrieve POST variable in one PHP script (which is
straight-forward) and then send these from the script to another one
returning the processed input.

I have written a script that will parse a frames-based page and render it as
a flat page (i.e. all frames displayed as a table in one HTML file) - this
is so that I can create a website using frames, and still let browsers that
don't support frames to access it without my having to create a separate
version of the site.

e.g.:
http://www.redradish.co.uk/rr/index.htm (frames based site)
http://www.redradish.co.uk/php/framesprocessor.php?Frameset=http://www.redra
dish.net/rr/index.htm&RenderMethod=1&MainFrame=main&AllHead=1
(the same site
rendered as single page).

The problem is that if in the frames-based site one of the frames is a form
submission, I need to be able to send this data to the original form and
retrieve the output to display in the rendered page.

e.g.
http://www.redradish.co.uk/php/framesprocessor.php?Frameset=http://www.redra
dish.net/rr/index.htm&TargetName=main&Target=http://www.redradish.net/rr/con
tact/contactF.htm&MainFrame=main&RenderMethod=1&LinkSearch=1&AllHead=1&Debug
=1
(this is a page that has a contact form).

I can't find any information on how to forward such a request.

The script in question is located at:
http://www.redradish.co.uk/php/framesprocessor.php

It uses these variables (passed using GET or POST):
  Frameset   frameset page.  This needs to be parsed and a static HTML page
created.
  Target   (optional) full URL of page to be displayed in frmae named
TargetName.
  TargetName  (optional) name of the frame that $Target should appear in.
  MainFrame   (optional) is the frame from which header info, etc. is
taken.
  Default is first frame.
  AllHead  (optional) If set (is 1 or more), copies  content from all
frames.
  RenderMethod  (optional) defines how the frameset is to be represented:
1 - All frames dumped into new page in order they appear in
frameset.
2 - tables are used to attempt to recreate original format
  Default is 1.
  LinkSearch  (optional) how links are replaced:
   1 - Only specific tags are replaced
   2 - Anything within quotes (' or ") that contains document path is
replaced
  Default is 1.
  Debug   If set (greater than 0), debug info is added in comments.

It works to a good degree on most frames-based sites, but does have a couple
of failings (such as the one mentioned) that I would like to overcome.

The other problem is handling JavaScript in e.g. .  There is no way to process JavaScript in
PHP that I am aware of - does anyone have a workaround for this?  i.e. so
that my script can process the JavaScript function and retrieve the relevant
page for inclusion in the rendered page.


Hope someone can help!

Thanks.

Dave




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

2003-01-07 Thread Larry Brown
Can anyone give any suggestions on the best/most intuitive tools or
libraries for generating graphs with PHP?

Larry S. Brown
Dimension Networks, Inc.
(727) 723-8388




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




RE: [PHP] restrictions

2003-01-07 Thread Larry Brown
Just use the smtp server you use for mail.  Oh you might not use smtp for
corporate environment?  Just use something like outlook express or some
other smtp enabled client to send to these various smtp servers you are
trying to use for the php scripts first.  Then if it works with the mail
client then you should reasonably expect the php to work.

Larry S. Brown
Dimension Networks, Inc.
(727) 723-8388

-Original Message-
From: Bruce Levick [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, January 07, 2003 6:19 PM
To: [EMAIL PROTECTED]
Subject: [PHP] restrictions

I find that my the company that I work for is a little over protective.
My machine is quite restricted (as in firewall and accessability) when
it comes to ftp and telnet. Well basically my hands are tied in that
sense.

I am testing my database build on my local machine which runs fine and
all. I am curious though as to how these restrictions may affect my
attempts to send "mail()" I have tried various external SMTP srervers (i
am running off winxp pro) in my php.ini file and I get nothing. Just the
error code I have placed in (below).



Warning: Failed to connect to mailserver, verify your "SMTP" setting in
php.ini in c:\inetpub\wwwroot\_tasks\email.php on line 21
Mail could not be sent...


Would my local machines restrictions be stopping the mail function from
communicating with the SMTP server??

Cheers



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




RE: [PHP] Re: Need a suggestion on developing a php-related system

2003-01-07 Thread Larry Brown
>From the remark about the arrival and departure time scenario, it sounds
like you want to show whether the updates occurred and when they
began/ended.  If this is accurate, you should find out whether the scripts
used to populate those databases record that information for the database it
is updating.  If so you need to create a script that opens each database and
queries that data.  If they do not record these things you could either
modify them to do so or you could have them also connect to a central db
that you create to store this collection of data to show beginning and
ending of the scripts.  I think either way you should store this in your own
db.  Is this along the lines of what you had in mind?

Larry S. Brown
Dimension Networks, Inc.
(727) 723-8388




On 01/08/2003 03:40 AM, Kelvin Poon wrote:
> HI, I am new to PHP and I am just wondering if anyone could give me some
> help.
>
> I am currently working for infomart.ca, it is basically a company that
> sells articles (news/business).  MY employer require me to develop a
> system using Perl and PHP, and the assignment is as follow:
>
> To develop a system that collects, stores, processes and disseminates
> internally the updating status of our databases.
>
> We currently have over 200 databases from various daily newspapers,
> magazines, TV transcripts and other periodicals.  Most of them are
> updated every weekday between 4a.m. and 7a.m..  Others are updated on a
> weekly or monthly basis.  THe update schedule Tv. the actual status need
> to be captured and made available to internal staff.  This is similar to
> the flight departure/arrival information in an airport.








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




RE: [PHP] graph libs

2003-01-08 Thread Larry Brown
This is by no means an advertisement, just one of the results I got looking
around for charts.  The following link lists a few viable solutions.

http://www.hotscripts.com/PHP/Scripts_and_Programs/Graphs_and_Charts/

Jpgraph renders an excellent image from the examples but the prerequisite
packages were many and ultimately the install/readme didn't work for
compiling the package.  I could have looked further and found a solution,
but with the number of prerequisites I dropped it looking for a faster
install.  The next one I came across that gave a reasonable looking chart
was phplot which only requires GD which is stock on my RH distro.  I got it
up and working without any installation (not to mention dependencies).  So I
am up and running quickly and smoothly with phplot.  It's a shame jpgraphs'
dependencies aren't packaged with the distro. The transparent option on the
colors is really smooth and I just don't have the time.  Thanks to all for
suggestions, I still want to look at one other site that was recommended
here on the list.


Larry S. Brown
Dimension Networks, Inc.
(727) 723-8388

-Original Message-
From: Marek Kilimajer [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 08, 2003 9:10 AM
To: Larry Brown
Cc: PHP List
Subject: Re: [PHP] graph libs

http://www.aditus.nu/jpgraph/

Larry Brown wrote:

>Can anyone give any suggestions on the best/most intuitive tools or
>libraries for generating graphs with PHP?
>
>Larry S. Brown
>Dimension Networks, Inc.
>(727) 723-8388
>
>
>
>
>
>


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

2003-01-08 Thread Larry Brown
My extreme apologies to jpgraphs.  They are more in line with phplot.  I
might even end up using them instead.  Vagarant is the more difficult
package.  Again, their graph examples are pretty smooth but required a lot
of package/dependency updates to RH.

>This is by no means an advertisement, just one of the results I got looking
around for charts.  The following link lists a few viable
> solutions.

>http://www.hotscripts.com/PHP/Scripts_and_Programs/Graphs_and_Charts/

>Jpgraph renders an excellent image from the examples but the prerequisite
packages were many and ultimately the install/readme didn't work
 >for compiling the package.  I could have looked further and found a
solution, but with the number of prerequisites I dropped it looking for a
 >faster install.  The next one I came across that gave a reasonable looking
chart was phplot which only requires GD which is stock on my RH
 >distro.  I got it up and working without any installation (not to mention
dependencies).  So I am up and running quickly and smoothly with
 >phplot.  It's a shame jpgraphs' dependencies aren't packaged with the
distro. The transparent option on the colors is really smooth and I
 just >don't have the time.  Thanks to all for suggestions, I still want to
look at one other site that was recommended here on the list.



Larry S. Brown
Dimension Networks, Inc.
(727) 723-8388





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




RE: [PHP] Newbee observation

2003-01-09 Thread Larry Brown
Better yet a script should be run to have all the e-mails listed by the time
they were received at the server instead of what time the e-mail was
submitted.  That should take care of it I would think.

Larry S. Brown
Dimension Networks, Inc.
(727) 723-8388

-Original Message-
From: Tom Ray [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 09, 2003 12:07 PM
To: Hendrik van Niekerk; [EMAIL PROTECTED]
Subject: Re: [PHP] Newbee observation

Mail servers play a part in this too. Maybe the admins should pack up
their servers and send them back too :)

-Original Message-
From: "Hendrik van Niekerk" <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Date: Thu, 9 Jan 2003 11:11:30 -0600
Subject: [PHP] Newbee observation

> Why does the webmaster not reject messages that are dates > today's
> date eq
> there are numerous messages that have dates with year 2010 and up. A
> moron
> who does not have the correct computer date on his machine should pack
> it up
> and send it back to the company that sold it to them.
>
> JMHO
>
>
>
>
> --
> 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] newbee

2003-01-09 Thread Larry Brown
Just a thought, set your form to use the get method so that you can see
exactly what the php page is receiving.  Then before any of your existing
code put the first line to "echo $variable;" without the quotes and using
one of the variables being sent and visible in the url.  The page should
then at least show that one variable.  If that doesn't work there is some
problem with the install I would imagine.

Larry S. Brown
Dimension Networks, Inc.
(727) 723-8388

-Original Message-
From: Hendrik van Niekerk [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 09, 2003 12:58 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] newbee

Joseph

I can get the errors to go away but then my example just shows a blank page!
The variable are not being passed through to the .php doc

hendrik

"Joseph W. Goff" <[EMAIL PROTECTED]> wrote in message
003201c2b803$ada54f60$bdcaa8c0@jg42000">news:003201c2b803$ada54f60$bdcaa8c0@jg42000...
> This is because of the default error reporting setting in the newer
version
> of php.  This was not the case when your book was written.
> In your php.ini file set error reporting = E_ALL & ~E_NOTICE and you will
> quit getting the 'Undefined Variable' notices.
> - Original Message -
> From: "Hendrik van Niekerk" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Thursday, January 09, 2003 10:50 AM
> Subject: [PHP] newbee
>
>
> > Hi
> >
> > I'm very new to PHP. (have just bought the book "PHP and MySQL Web
> > Deelopment") SAMS authors Luke Welling and Laura Thompson
> >
> > I working with the examples in the book.
> >
> > I have loaded MySQL, Apache and PHP onto a NT server. All the test
passed
> as
> > per the examples in the book.
> >
> > Working with the the first example in chapter one.
> >
> > I have the HTML document that when the quantities are entered the
> > "processorder.php" should be called to show the results and do some
calcs.
> >
> > what happens is that the php file is called but I get an error message:
> >
> > "Warning: Undefined variable typeqty in C:\apache
> > group\apache\htdocs\processorder.php on line 23"
> >
> > this varialbe is defined in the html document exactly as in the php
> > document.
> >
> > now this warning is repeated for all the variables that should have been
> > passed to the php for processing.
> >
> > What am I missing ?
> >
> >
> > thank you in advance
> >
> >
> > Hendrik van Niekerk
> >
> >
> >
> > --
> > 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] session_destroy problem

2003-01-10 Thread Larry Brown
Javascript has a function for performing actions on window close.  You could
have a submit action on the page that is sent when the window closes.  I've
not used it yet but it should work I would think.

Larry S. Brown
Dimension Networks, Inc.
(727) 723-8388

-Original Message-
From: Scott Fletcher [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 10, 2003 10:58 AM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] session_destroy problem

Session Destroy will work if you provide the user a way to log out of the
website.  But if the user closed the browser then that's it.  Session
Destory can't be used because the browser is a client side and Session
Destroy is a server side.  So, once the browser close, it doesn't contact
the server before closing.

You're only option is to clean up the session data from the webserver as I
usually have done.  I also use the database to find out about the session id
and the timestamp it was updated.  That way, I will know which session not
to delete if it is active.

"Ken Nagorski" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hi there,
>
> So it is the browsers problem. I tested what you said and Mozilla acts as
> you stated and IE does as well. I guess my question is. Is there no way to
> close clear out the session when the user logs out?
>
> The way I set things up the class that I wrote just gets the current
> sessionid and does a select from the database to see if it has been
logged.
> The problem this creates is that someone could sit down and reopen a
> browser and have access to the site as if they where logged because the
> session is not gone.
>
> Hmm - Like a said I have never used sessions before so I am learning about
> them. Thank you for your input...
>
> Ken
>
>
> > What browser are you running?  I find that IE drops the session when
> > you close the browser window actively working the site.  On Mozilla I
> > have to close every instance of Mozilla regardless of the site before
> > it drops the session.  Pretty aggravating so I'm going to have to start
> > working on a method based on responses to your post.
> >
> > Larry S. Brown
> > Dimension Networks, Inc.
> > (727) 723-8388
> >
> > -Original Message-
> > From: Ken Nagorski [mailto:[EMAIL PROTECTED]]
> > Sent: Thursday, January 09, 2003 1:35 AM
> > To: [EMAIL PROTECTED]
> > Subject: [PHP] session_destroy problem
> >
> > Hi there,
> >
> > I have written a class that manages sessions. I have never used
> > sessions before so all this is new to me. Everything works fine as far
> > as starting the session and logging in however when I call sessoin
> > destroy it doesn't seem to work the function returns 1 as it should if
> > all goes well however if I go to another page and do some other
> > browsing even if I close the browser the session still hangs around. Is
> > there something I don't know about sessions? I have read the
> > documentation on the session_destroy function, I don't think that I am
> > missing anything...
> >
> > Anyone have any suggestions? I am totally confused.
> >
> > Thanks
> > Ken
> >
> >
> >
> >
> > --
> > 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] checking status of a HTML checkbox

2003-01-10 Thread Larry Brown
Also look at empty().  I don't know if the $_POST array will send the key if
it as no variable.  I know on a regular post it does send the variable, but
it has no value.  I have used isset with just receiving post data and got
strange results.  On one I had an isset statement that ran a result that
bypassed some code.  When is submitted the form I got results as if the
isset was being executed and the code was skipped.  Just to make sure this
was the case, I added echo "hello"; on the first line of the isset bypass
coding and after running the script I got the results without the bypass.  I
took the hello back out and it bypassed!  So adding the hello statement
affected whether isset gave a positive or negative response.  The variable
isset was checking in this case was not being sent with a value.  I changed
to empty() and got the result I was looking for.  If $_POST sends the key
but not a value when you submit the form without a value assigned to the
variable then isset may not always work.

Larry S. Brown
Dimension Networks, Inc.
(727) 723-8388

-Original Message-
From: Shams [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 10, 2003 4:36 AM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] checking status of a HTML checkbox

thanks a lot, thats what I was looking for

:o)

Shams

"- Edwin" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> "Shams" <[EMAIL PROTECTED]> wrote:
>
> [snip]
> > At the moment I am doing this:
> >
> > if ( $_POST["insurance"] == "yes" )
> > {
> > }
> >
> > But is there a more "accurate" way of checking the exsistence of
> > "insurance"?
> [/snip]
>
> I think you're looking for isset():
>
>   http://www.php.net/manual/en/function.isset.php
>
> - E
>
> __
> Do You Yahoo!?
> Yahoo! BB is Broadband by Yahoo!  http://bb.yahoo.co.jp/
>



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

2003-01-10 Thread Larry Brown
Question...Do you know if Mozilla runs a browser instance that might handle
the process after one of the browser windows is closed?  Right now the
situation is that IE closes the session when the window that opened it
closes.  I have a site that is authenticated and then runs sessions on the
authenticated user.  If you close the browser window and open another one,
you are prompted for the login and password and have your new
identity/session.  On Mozilla if I close the window actively on the site and
have other windows up on other sites I can open another Mozilla instance and
return to the site and it still has my session open and identity.  I have to
close every Mozilla instance for the session to close.  If Mozilla is run by
one central process I would think maybe it could do this onwindowclose
behaviour?  Maybe a good question for the Javascript list but since it
sounds like you guys have seen this tried before maybe you already know.

Larry S. Brown
Dimension Networks, Inc.
(727) 723-8388

-Original Message-
From: Scott Fletcher [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 10, 2003 12:02 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] session_destroy problem

Yes, the JavaScript code can run before the browser is closed but it would
not be finish running because the browser closing had been executed.
Someone had tried it before and struggled with it.   But that is a good
advice, thanks for jumping in.

"Tamas Arpad" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
On Friday 10 January 2003 17:39, Scott Fletcher wrote:
> > Javascript has a function for performing actions on window close
> That would work only if the webserver IP address is '127.0.0.1' (local
> machine), but not any other IP address.  Because of the ACK synchrious
> communication that get interrupted as result of the browser closing.
I think the javascrit code runs before the browser is closed, other way what
would run it?

Arpi



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

2003-01-10 Thread Larry Brown
It helps for me being able to re-login as a different user.  It's a good
idea but it still leaves a bit to be desired for security.  I'm going to
also post this to the js list and see if they've worked with it before.

Larry S. Brown
Dimension Networks, Inc.
(727) 723-8388

-Original Message-
From: Scott Fletcher [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 10, 2003 12:35 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] session_destroy problem

You meant the tab browers.  Like 2 tabs...  I haven't tried it but now that
you mentioned it, I'm going to have to look at it soon.  I do noticed one
thing, the status bar, if it have comments, it will show up on other tabs
even though it is a completely a different website.  I get the impression
that it doesn't seem to be as independent of each other, know what I meant?

What I did with the php script is to expire the session first, at the
beginning of hte webpage before the login page showed up and before
attempting to create a session.  Maybe this will help a little bit.

"Larry Brown" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Question...Do you know if Mozilla runs a browser instance that might
handle
> the process after one of the browser windows is closed?  Right now the
> situation is that IE closes the session when the window that opened it
> closes.  I have a site that is authenticated and then runs sessions on the
> authenticated user.  If you close the browser window and open another one,
> you are prompted for the login and password and have your new
> identity/session.  On Mozilla if I close the window actively on the site
and
> have other windows up on other sites I can open another Mozilla instance
and
> return to the site and it still has my session open and identity.  I have
to
> close every Mozilla instance for the session to close.  If Mozilla is run
by
> one central process I would think maybe it could do this onwindowclose
> behaviour?  Maybe a good question for the Javascript list but since it
> sounds like you guys have seen this tried before maybe you already know.
>
> Larry S. Brown
> Dimension Networks, Inc.
> (727) 723-8388
>
> -Original Message-
> From: Scott Fletcher [mailto:[EMAIL PROTECTED]]
> Sent: Friday, January 10, 2003 12:02 PM
> To: [EMAIL PROTECTED]
> Subject: Re: [PHP] session_destroy problem
>
> Yes, the JavaScript code can run before the browser is closed but it would
> not be finish running because the browser closing had been executed.
> Someone had tried it before and struggled with it.   But that is a good
> advice, thanks for jumping in.
>
> "Tamas Arpad" <[EMAIL PROTECTED]> wrote in message
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> On Friday 10 January 2003 17:39, Scott Fletcher wrote:
> > > Javascript has a function for performing actions on window close
> > That would work only if the webserver IP address is '127.0.0.1' (local
> > machine), but not any other IP address.  Because of the ACK synchrious
> > communication that get interrupted as result of the browser closing.
> I think the javascrit code runs before the browser is closed, other way
what
> would run it?
>
> Arpi
>
>
>
> --
> 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] checking status of a HTML checkbox

2003-01-10 Thread Larry Brown
My apologies for deficient terminology.  I define a "regular post" as the
original   with globals on and the
somewebpage.php using the variable sent without using $_POST.  But I bet you
already knew that :)  You asked for the code...

My first page has ...
...
echo "";
  echo "";
?>

 -  - 

...
my second page has...
...
if(isset($SSN1) )
{
   header( "Location:
".$site."newplace.html?SSN1=".$SSN1."&SSN2=".$S
SN2."&SSN3=".$SSN3."");
}
...

End result being that if they used the text input they would continue with
the second page, skipping the new header.  I could put a value in the text
and leave SSN alone and get sent to the new header.  If I put a value in
SSN1 I would go to the new header.  If I put the echo "hello"; before the
header line and leave use the search text box leaving SSN1 blank I would not
get the new header.  If I used the SSN1 I would get hello and then an error
message that the header had already been sent which is what I expected.
However, upon removing the hello line again, it went right back to sending
the new header whether SSN1 was used or not.  Changing the if to reflect
if($SSN1 > 0) it works as intended except that some SSN's have leading 0's
for their first 3 digits so I am about to use empty().  The > 0 was a quick
fix since they needed to use it immediately.

PS you'll have to contend with "..." as these scripts 242 and  409 lines
long respectively.  I can assure you that the form is properly closed on the
sending page though.


Larry S. Brown
Dimension Networks, Inc.
(727) 723-8388

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of - Edwin
Sent: Friday, January 10, 2003 1:00 PM
To: Larry Brown; Shams
Cc: [EMAIL PROTECTED]
Subject: RE: [PHP] checking status of a HTML checkbox

"Larry Brown" <[EMAIL PROTECTED]> wrote:
> Also look at empty().  I don't know if the $_POST array will send the
> key if it as no variable.  I know on a regular post it does send the
> variable, but it has no value.

What's a "regular post" anyway?

Well, the key is passed even when there's even though the field might be
empty.

> I have used isset with just receiving post data and got
> strange results.  On one I had an isset statement that ran a result
> that

Maybe you can post the code--I'm sure somebody here can fix it...

...[snip]...

> then isset may not always work.

At least not in my experience--it always served its purpose ;)

- E

...[snip]...
__
Do You Yahoo!?
Yahoo! BB is Broadband by Yahoo!  http://bb.yahoo.co.jp/



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




RE: [PHP] session_destroy problem

2003-01-10 Thread Larry Brown
You da man.  Unload is perfect.  If the problem he mentioned before prevents
the browser from finishing its communication with the server you can always
send a wait command with sufficient time for things to finish up.  I'll
start testing in a live environment with it now.  Thank you for the help.

Larry S. Brown
Dimension Networks, Inc.
(727) 723-8388

-Original Message-
From: Tamás Árpád [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 10, 2003 8:03 PM
To: Larry Brown; Scott Fletcher; PHP List
Subject: Re: [PHP] session_destroy problem

> Yes, the JavaScript code can run before the browser is closed but it would
> not be finish running because the browser closing had been executed.
> Someone had tried it before and struggled with it.   But that is a good
> advice, thanks for jumping in.
I really doubt that browsers doesn't run the code that is in unload event of
the page because the window is closed. That would be a very bad thing. Isn't
it what the unload event is for? I mean to run code when the page is
unloaded, it doesn't matter if the window is being closed or the user is
going to another page. I think the browser should finish all the opened
window's unload code and only after that close the application really.
I made a quick test for it:



function wait(msec){
 var enter_date = new Date();
 var enter_time = enter_date.getTime();

 var leave_date = new Date();
 var leave_time = leave_date.getTime();

 while (enter_time + msec > leave_time)
 {
  leave_date = new Date();
  leave_time = leave_date.getTime();
 }
 alert('unload test');
}




 unload test

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

2003-01-14 Thread Larry Brown
For those who don't mind working with Javascript I have found a method of
maintaining the sessions to a minimum length.  According to the Javascript
list there is no way to get the url of the site the user is going to next so
there is no way to tell if the onunload is due to a site change or the
movement from one page on your site to another.  So here is my solution...

When the user logs on they are given a code that is derived from the time of
login.  Each pages checks that the decoded number results in a time of less
than 8 hours from login.  If it is greater than 8 they are just prompted to
re-login.  There will be a database entry for each time a page is loaded by
the same user.  This time is checked periodically, every 5 minutes should
do.  If they have not loaded a page in the last 5 minutes the session is
removed.  Now, each page that does not post anything will have a refresh set
to 3 minutes so that people that have their browser set to the site in the
background while they work on other programs etc. won't get kicked off.

This has just been arrived at to solve the session destroy problem but it
looks like it will work.  I also don't know what this would do to a high
volume site either but for me it should be workable.  I hope this helps
some.

Larry S. Brown
Dimension Networks, Inc.
(727) 723-8388





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




[PHP] emacs and php markup

2003-01-15 Thread Larry Brown
Does anyone out there use emacs and are proficient in customizing it?  I
love the highlighting it does while working on .php files.  However, I
usually use different extensions on my files than .php so is there a way to
tell emacs to treat certain extensions as php?  This would help out
immensely!

TIA

Larry S. Brown
Dimension Networks, Inc.
(727) 723-8388




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




RE: [PHP] PDF

2003-01-17 Thread Larry Brown
According to pdflib their commercial version gives you the ability to edit
pdf files using the PDI library.  Have you looked at this?

Larry S. Brown
Dimension Networks, Inc.
(727) 723-8388

-Original Message-
From: Brian McGarvie [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 17, 2003 7:23 AM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: [PHP] PDF

I'm looking to find out if PHP has the ability to do this...

OK I'm looking for a solution that could do the following.

We require to generate PDF files that can then be emailed or printed &
posted to clients.

I can create PDF Files from scratch using PDFLib.

What we will require to do though is, we presently have paper copies of
forms from various parties we deal with, our present Access-based system
simply prints on top of these, I am presently developing in PHP a system to
replace the Access database, we will want it to create these as PDF files
(we can get the printed forms in PDF format) based on supplied PDF files...
for example, generate a PDF for Customer X based on Supplier Z's PDF file.

Any solutions in PHP (open source, free, commercial etc etc.) would be very
much appreciated, or if we need to look at another Language to perform this
part of the solution (i.e. ASP).

The solution I'm developing is PHP, running on a Windows 2000 Server as we
require use of some windows-only software too. So if *cough* ASP is what's
needed to do the above then so be it :\ - really hope not though!!!

Thanks in advance!


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.438 / Virus Database: 246 - Release Date: 07/01/03



--
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 Encoders and GPL License

2003-01-19 Thread Larry Brown
I just want to clarify this for myself.  My impression was that the affects
of GPL requiring software developed from the original GPL to also be free
was only applicable to modifications of the program itself.  So if php was
GPL and I modified the source and built my own customized version of php I
couldn't sell it but could only give it away, but if I used php to develop
some other software that runs on php I could sell it without a problem.
Similar to creating software that runs on Linux, the software can be sold
but if I modify Linux itself and turn around and sell it, it would be
against the license.  Is this accurate?

Larry S. Brown
Dimension Networks, Inc.
(727) 723-8388

-Original Message-
From: Zeev Suraski [mailto:[EMAIL PROTECTED]]
Sent: Sunday, January 19, 2003 6:40 AM
To: [-^-!-%-
Cc: PHP general list
Subject: Re: [PHP] PHP Encoders and GPL License

At 02:45 18/01/2003, [-^-!-%- wrote:

>Food for thought:
>
>As I look through the Zend website, and applaud their efforts to create
>'protected' php applications, I can't help but wonder about the impact
>(or lagality) or their efforts.  Doesn't the use of the Zend Encoder (or
>any other PHP Encoders out there) violate the GPL License or the whole Open
>Source Concept?
>
>As far as I understand it, the GPL License states that the source code
>of any product created from an open source solutions, or is derived from
>the work of an open solutions, must be made availabe to all users.
>
>Since PHP itself is open source, then wouldn't that prohibit a developer
>from encoding any PHP product?
>
>Please correct me, if I'm wrong. I'm just curious.

You're wrong for two reasons:
[1] As other people mentioned here, PHP (or in that case, the Zend Engine,
PHP's core) is not under the GPL license.  Since it is under a BSD style
license, people are free to use it for commercial ventures in any and all
levels.
[2] Even if the Zend Engine was under the GPL, the authors of the software
always have the right to use their software in whatever way they see fit,
and relicense it under any other licenses.  In this case, the author of the
Zend Engine is the same as one that publishes the Zend Encoder, so there's
really no problem at all.

Zeev


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

2003-01-21 Thread Larry Brown
I hope this is not too far OT, however, you are the best resource I have for
PHP and if anyone would know, it would be you guys.  I have been writing
scripts off and on for the past year and have an application written in PHP
for a business' internal use.  I have used snippets of Object oriented code
from other people here and there to get by and I have read information on
OOP in a couple of different places.  However, my mind apparently works
different and I keep trying to relate the OOP structure to what I already
know which equates an object to a function.  I am resolving to purchase a
book dedicated to instruction in the inns and outs of OOP.  Specifically at
it relates to PHP would be great but my emphasis is towards something that
teaches someone that is stubborn in his reliance on previously learned
methods.  I hope this makes sense and I'm not alone on this. :)  Any
suggestions would be greatly appreciated!

Larry S. Brown
Dimension Networks, Inc.
(727) 723-8388




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




RE: [PHP] dreading OOP

2003-01-21 Thread Larry Brown
The only reason I feel the need to expand my understanding is that I have to
learn other concepts to produce my client's solutions.  For instance I am
now being asked to use SOAP to communicate with a vendor of his.  Now I am
reading about SOAP and frequently the descriptions rely on the reader's
understanding of OOP.  I can individually scrutinize a description and break
it down to its elements.  Then I can picture what is being said, but without
having used those methods in my code, it is frustrating reading.  I don't
know that SOAP is in and of itself OOP but people that write about it use
OOP based consepts to exlain what is happening.  And this is one example.
Don't let me go into the Java and Javascript world!

Larry S. Brown
Dimension Networks, Inc.
(727) 723-8388

-Original Message-
From: Johnson, Kirk [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, January 21, 2003 10:40 AM
To: PHP List
Subject: RE: [PHP] dreading OOP


> -Original Message-
>
>However, my mind apparently works different and I keep trying to relate the
OOP structure to
> what I already know which equates an object to a function.  I am resolving

> to purchase a book dedicated to instruction in the inns and outs of OOP.
> Specifically at it relates to PHP would be great but my emphasis is
towards
> something that teaches someone that is stubborn in his reliance on
previously learned
> methods.  I hope this makes sense and I'm not alone on this. :)

My only suggestion is that you re-consider why you want to take up OOP. If a
procedural approach works for you, go with it. It's not like we're building
air traffic control systems here ;)

Kirk

--
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:[PHP] dreading OOP

2003-01-21 Thread Larry Brown
Thank you, I'll check this book out.

Larry S. Brown
Dimension Networks, Inc.
(727) 723-8388

-Original Message-
From: Sukrit [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, January 21, 2003 12:39 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Re:[PHP] dreading OOP

>>>>> "Larry" == Larry Brown <[EMAIL PROTECTED]> writes:

Larry> places.  However, my mind apparently works different and I
Larry> keep trying to relate the OOP structure to what I already
Larry> know which equates an object to a function.  I am resolving

This happens a lot with me too :)

Larry> to purchase a book dedicated to instruction in the inns and
Larry> outs of OOP.  Specifically at it relates to PHP would be
Larry> great but my emphasis is towards something that teaches
Larry> someone that is stubborn in his reliance on previously
Larry> learned methods.  I hope this makes sense and I'm not alone
Larry> on this. :) Any suggestions would be greatly appreciated!

i am having a hard time with OOP too. i did buy a book Object Oriented
Analysis and Design Andrew Haigh. Well, it doesn't have PHP but it's
otherwise very lucid and clear. It also covers UML. Haven't read much
of it till now but i think it might help you.

Learning to think in terms of object is really diffucult imho, for
someone who is still stuck in the older procedural paradigm like
us. It'll take time.

Wishing us all OO enlightenment :)
regards
sukrit


--
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] mysql query manipulation vs php results manipulation

2003-02-19 Thread Larry Brown
How do you determine whether or not it is faster/more efficient to run a
complicated query or to run multiple simple queries and join / manipulate
the results with PHP?

Larry S. Brown
Dimension Networks, Inc.
(727) 723-8388




RE: [PHP] mysql query manipulation vs php results manipulation

2003-02-19 Thread Larry Brown
My apologies for the prior html version, I forgot to change back to txt.

Larry S. Brown
Dimension Networks, Inc.
(727) 723-8388



On Wed, 19 Feb 2003, Larry Brown wrote:

> How do you determine whether or not it is faster/more efficient to run a
> complicated query or to run multiple simple queries and join / manipulate
> the results with PHP?

 



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




RE: [PHP] MAC address user recognition?

2003-02-21 Thread Larry Brown
One other thing you could do is simply set up SSL with your own certificate
so that it will encrypt the connection and then run code via JAVA or some
other client side applet that will get the MAC address from the client
machine directly.  You can then check the MAC against the addresses allowed.
Since the connection is encrypted nobody knows that that is what you are
checking.  Of course there is still a potential for someone that you
previously allowed access to find out how you are identifying them and use
it against you later on, but there are also problems with identifying
someone by their computer unless they keep the computer locked in a closet
while they are away.  I guess it depends on what you are protecting.
National secrets etc.  By the way, open SSL with self signed certs is a free
method but it is not a good idea if you are needing to verify your
credentials to the person coming in.

Larry S. Brown
Dimension Networks, Inc.
(727) 723-8388

-Original Message-
From: Leo Spalteholz [mailto:[EMAIL PROTECTED]
Sent: Friday, February 21, 2003 12:59 AM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] MAC address user recognition?

On February 20, 2003 08:13 pm, Jason Sheets wrote:
> MAC addresses are used for on a LAN and not the Internet.  Using a
> MAC address might work for identification on a LAN BUT in most
> operating systems you can easily change the effective MAC address
> on the card.

Good call.  I thought there was some fundemental problem I just
couldn't remember enough from my networking class to put my finger on
it.

> It would probably be better to look for some other form of
> identification like SSL certificates or a cookie with the secure
> bit on so it will only be sent over an SSL connection.

Yeah I'm not super concerned about security and such, this is only a
personal page so something simple will do the job.  I think I'll just
end up hacking together my own encryption algorithm and then storing
encrypted passwords in a cookie.
Hehe.  Security through obscurity, everyones favorite way :)

Thanks,
Leo

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

2003-02-19 Thread Larry Rosenman


--On Wednesday, February 19, 2003 19:42:00 + Joachim Krebs 
<[EMAIL PROTECTED]> wrote:

PHP seems to automatically be escaping quotes on my $_POST variables.

Am I talking rubbish, or is this some setting? It is annoying me
greatly.
check the smart_quotes_gpc stuff.




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


--
Larry Rosenman http://www.lerctr.org/~ler
Phone: +1 972-414-9812 E-Mail: [EMAIL PROTECTED]
US Mail: 1905 Steamboat Springs Drive, Garland, TX 75044-6749


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


RE: [PHP] and

2003-02-23 Thread Larry Brown
The onClick should be onClick=window.location("newpage.php") and this has
nothing to do with php.

Larry S. Brown
Dimension Networks, Inc.
(727) 723-8388

-Original Message-
From: Leif K-Brooks [mailto:[EMAIL PROTECTED]
Sent: Monday, February 24, 2003 12:15 AM
To: Sunfire
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP]  and 

This has nothing to do with PHP, but a button is used to submit a form.
 You'll have to create a form with its action set to the page to direct to.

Sunfire wrote:

>hi..
>
>i have a button on a web page that is supposted to go to another web page
>when either clicked with a mouse or when someone presses enter on it.. :
>
>post a prayer
>
>that is my basic code for the button... my problem is the fact that when
you
>click the button or hit enter on it all it does is refresh the page if it
>even does that.  how would i actually make this button load another page
>using php??
>
>tnx
>
>
>
>
>---
>Outgoing mail is certified Virus Free.
>Checked by AVG anti-virus system (http://www.grisoft.com).
>Version: 6.0.443 / Virus Database: 248 - Release Date: 1/11/2003
>
>
>
>

--
The above message is encrypted with double rot13 encoding.  Any unauthorized
attempt to decrypt it will be prosecuted to the full extent of the law.




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

2003-02-26 Thread Larry Brown
25

Larry S. Brown
Dimension Networks, Inc.
(727) 723-8388

-Original Message-
From: Sascha Braun [mailto:[EMAIL PROTECTED]
Sent: Tuesday, February 25, 2003 12:00 PM
To: PHP General list
Subject: [PHP] Emacs?

How many Persons in this List are using Emacs as there default Editor?

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

2003-02-27 Thread Larry Brown
Oops...I stand corrected.

Larry S. Brown
Dimension Networks, Inc.
(727) 723-8388

-Original Message-
From: Matt Giddings [mailto:[EMAIL PROTECTED]
Sent: Thursday, February 27, 2003 12:26 AM
To: 'Larry Brown'; 'PHP List'
Subject: RE: [PHP] Emacs?

Don't you mean 42?

> -Original Message-
> From: Larry Brown [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, February 26, 2003 7:55 PM
> To: PHP List
> Subject: RE: [PHP] Emacs?
>
> 25
>
> -Original Message-
> From: Sascha Braun [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, February 25, 2003 12:00 PM
> To: PHP General list
> Subject: [PHP] Emacs?
>
> How many Persons in this List are using Emacs as there default Editor?
>

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.459 / Virus Database: 258 - Release Date: 2/25/2003



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

2003-03-03 Thread Larry Brown
Can someone who is used to using php oop help me figure out why this fails?
I know there are probably a thousand classes already designed to do this and
probably 100 times more efficient, but this is how I learn.  From what I've
read this should work but there is obviously something I'm missing.

Quick problem description:
Trying to set up class to connect to mysql db.  Already used a procedural
test successfully connecting to db.  Error is displayed as...

Warning: mysql_select_db(): supplied argument is not a valid MySQL - Link
resource in /var/www/html/oop.php on line 67
Database Selection to main failed.

Code:

Class dbConnect
{
var $machine;
var $port;
var $user;
var $password;
var $query;
var $result;
var $dbase;
var $db;
var $sel;

function dbConnect($machine,$port,$user,$password)
{
$this->machine = $machine;
$this->port = $port;
$this->user = $user;
$this->password = $password;

$db = mysql_pconnect ("$machine","$user","$password")
if (!$db)
{
die ("Initial connection to DB failed.")
}
$this->db = $db;
}
function setDbase($dbase)
{
$this->dbase = $dbase;

$sel = mysql_select_db("$dbase",$db);
if(!$db)
{
die ("Database Selection to $dbase failed.");
}
}
}

$dbn = new dbConnect("localhost","3306","bob","hjhyt4kl5");

$dbn->setDbase("main");






So why can't I use $db?  Isn't the statement $this->db=$db making it
available to the setDbase function?

Larry S. Brown
Dimension Networks, Inc.
(727) 723-8388




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



RE: [PHP] deciperhing oop

2003-03-03 Thread Larry Brown
Thank you everyone for helping.  I didn't know you have to put $this-> in
front of all variables in the class.  You learn something new every day ( I
thought you only needed to use that once to make the variable available
everywhere in the class up till now).

Larry S. Brown
Dimension Networks, Inc.
(727) 723-8388

-Original Message-
From: Jim Lucas [mailto:[EMAIL PROTECTED]
Sent: Monday, March 03, 2003 6:50 PM
To: Larry Brown; PHP List
Subject: Re: [PHP] deciperhing oop

the second argument in the mysql_select_db call in not in scope.

you should be using $this->db instead of $db

Jim
- Original Message -----
From: "Larry Brown" <[EMAIL PROTECTED]>
To: "PHP List" <[EMAIL PROTECTED]>
Sent: Monday, March 03, 2003 2:52 PM
Subject: [PHP] deciperhing oop


> Can someone who is used to using php oop help me figure out why this
fails?
> I know there are probably a thousand classes already designed to do this
and
> probably 100 times more efficient, but this is how I learn.  From what
I've
> read this should work but there is obviously something I'm missing.
>
> Quick problem description:
> Trying to set up class to connect to mysql db.  Already used a procedural
> test successfully connecting to db.  Error is displayed as...
>
> Warning: mysql_select_db(): supplied argument is not a valid MySQL - Link
> resource in /var/www/html/oop.php on line 67
> Database Selection to main failed.
>
> Code:
>
> Class dbConnect
> {
> var $machine;
> var $port;
> var $user;
> var $password;
> var $query;
> var $result;
> var $dbase;
> var $db;
> var $sel;
>
> function dbConnect($machine,$port,$user,$password)
> {
> $this->machine = $machine;
> $this->port = $port;
> $this->user = $user;
> $this->password = $password;
>
> $db = mysql_pconnect ("$machine","$user","$password")
> if (!$db)
> {
> die ("Initial connection to DB failed.")
> }
> $this->db = $db;
> }
> function setDbase($dbase)
> {
> $this->dbase = $dbase;
>
> $sel = mysql_select_db("$dbase",$db);
> if(!$db)
> {
> die ("Database Selection to $dbase failed.");
> }
> }
> }
>
> $dbn = new dbConnect("localhost","3306","bob","hjhyt4kl5");
>
> $dbn->setDbase("main");
>
>
>
>
>
>
> So why can't I use $db?  Isn't the statement $this->db=$db making it
> available to the setDbase function?
>
> Larry S. Brown
> Dimension Networks, Inc.
> (727) 723-8388
>
>
>
>
> --
> 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] Version 5?

2003-03-06 Thread Larry Brown
Someone mentioned a facet of version 5 to be expected that I am really
looking forward to.  Does anyone know what the release target date is?  I
didn’t see any mention of it on php.net.

Larry S. Brown
Dimension Networks, Inc.
(727) 723-8388



[PHP] table cell space under image in IE

2003-03-13 Thread Larry Brown
Has anyone had to address this problem before?  I've created a table and
placed an image inside.  The image is around 12 pxl high and when the table
is displayed in Mozilla the cell border is up against the image on all
sides.  On IE however, the top of the image is up against the cell border
but the bottom has aprox 10pxl of space.  It is only there with the images,
only under the image, and only in IE (I've only checked v6).  If anyone has
seen this and has an idea of how to fix it, PLEASE let me know.  I've tried
setting cellspacing=0, cellpadding=0, and setting spacing to a range of
sized to see the effect and the smallest size it will move to is approx
10pxls below the bottom of the image.  Very frustrating!

I know this is not exactly on topic but I produce all html by php and I
don't want to go out and add myself to an html list (if there is such a
thing).

TIA

Larry S. Brown
Dimension Networks, Inc.
(727) 723-8388




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



RE: [PHP] table cell space under image in IE

2003-03-13 Thread Larry Brown
Here is essentially what view source yields.  I have to use 

1 - 50
https://website/file.php"; METHOD="post">










Larry S. Brown
Dimension Networks, Inc.
(727) 723-8388

-Original Message-
From: CPT John W. Holmes [mailto:[EMAIL PROTECTED]
Sent: Thursday, March 13, 2003 12:07 PM
To: Larry Brown; PHP List
Subject: Re: [PHP] table cell space under image in IE

> Has anyone had to address this problem before?  I've created a table and
> placed an image inside.  The image is around 12 pxl high and when the
table
> is displayed in Mozilla the cell border is up against the image on all
> sides.  On IE however, the top of the image is up against the cell border
> but the bottom has aprox 10pxl of space.  It is only there with the
images,
> only under the image, and only in IE (I've only checked v6).  If anyone
has
> seen this and has an idea of how to fix it, PLEASE let me know.  I've
tried
> setting cellspacing=0, cellpadding=0, and setting spacing to a range of
> sized to see the effect and the smallest size it will move to is approx
> 10pxls below the bottom of the image.  Very frustrating!

Do you have your code like  with no other whitespace? IE might
be displaying a space or whitespace for some reason, whereas other browsers
will ignore it.

> I know this is not exactly on topic but I produce all html by php and I
> don't want to go out and add myself to an html list (if there is such a
> thing).

Oh man... How horrible would that be?!? an HTML list???

---John Holmes...



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



RE: [PHP] Re: table cell space under image in IE

2003-03-13 Thread Larry Brown
I just posted the code and have the tags on separate lines for clarity, but
in the source they are on the same line with no space between the tags.

Larry S. Brown
Dimension Networks, Inc.
(727) 723-8388

-Original Message-
From: Roman Sanchez [mailto:[EMAIL PROTECTED]
Sent: Thursday, March 13, 2003 12:11 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Re: table cell space under image in IE

If you write




the CR-LF before  counts as an space wich wraps to the next line. It
might be helpful to write

 (in the same line)

instead.

> I know this is not exactly on topic but I produce all html by php and I
> don't want to go out and add myself to an html list (if there is such a
> thing).

Frankly, it´s not on topic at all and no matter how you produce the final
html output you should know how to deal with 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] table cell space under image in IE

2003-03-13 Thread Larry Brown
What kind of @%#$%#! is that?  Why would they have  take up visible
space? Hmm, I guess I'll have to find a new angle or hide the closing form
beyond the table.  Thanks...

Larry S. Brown
Dimension Networks, Inc.
(727) 723-8388

-Original Message-
From: Roman Sanchez [mailto:[EMAIL PROTECTED]
Sent: Thursday, March 13, 2003 12:40 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] table cell space under image in IE

> 
> 
> 1 - 50
> https://website/file.php"; METHOD="post">
> 
> 
> 
> 
>  onClick=document.Second.submit(); onMouseOver="change_it('pic3')"
> onMouseOut="change_back('pic3')">
> 
> 
> 

You don'y say which cell has the problem but, apart from placing the closing
td right after the image try to move the closing form tag out from the
table. At least in IE,  _allways_ produces that extra space no matter
what you do unless you use style sheets to set the form's bottom-margin
yourself.



--
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] php mysql array question

2003-07-11 Thread Larry Brown
Is there any php function to pull a query into an array?  I know there is a
way to get the first row of the results in an array, but I'm having to loop
through each row pushing the row onto an array to get the result I'm looking
for and it seems like a lot of code for something that I would think is used
a lot.

Larry S. Brown
Dimension Networks, Inc.
(727) 723-8388



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



[PHP] Client script opensource plea

2003-07-13 Thread Larry Brown
This, most certainly OT, is a plea for fellow developers oriented in
OpenSource solutions to help resolve a problem in case you have dealt with
it before.  I have written a PHP app that uses function keys at times to
help speed data processing for my client VIA javascript.  This app works
fine when the client is using IE or Netscape on the windows platform.
However, when the client is on Linux, the function keys are not being
captured on Mozilla or Netscape.  I presented this problem in my Javascript
mailing list and on the RedHat mailing list and no one seems to have had any
experience dealing with it and consequently I haven't a work around.  My
apologies for presenting a clearly OT question, but I know there are a ton
of experienced developers here and I reaching for someone who might have
dealt with this.

Larry S. Brown
Dimension Networks, Inc.
(727) 723-8388




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



[PHP] console script html tags?

2003-07-14 Thread Larry Brown
How can I rid myself of the html tags around error messages when writing
console scripts?  (Besides avoiding errors)

Larry S. Brown
Dimension Networks, Inc.
(727) 723-8388




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



[PHP] else needed?

2003-07-19 Thread Larry Brown
On if statements, I periodically don't want anything to happen if the
requisite is not met.  In most cases just writing the statement in the
format if (this) { do that; } and nothing more will work.  However, I
periodically get weird results with this and found the only fix was to do
a... if (this) {do that;}else{"echo "";}

I try using continue in the else but get errors about using continue on
level 1 or something to that affect.  I'm assuming that continue is only
used in loops.

It's amazing how far I can code things without these little "foundation
level" bits of information ;-)

Larry S. Brown
Dimension Networks, Inc.
(727) 723-8388




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



[PHP] MIME decoder for use as the target of an Alias?

2003-07-21 Thread Larry Rosenman
I've got a strange request, maybe one of the experts here can help?

I need to be able to take a mail message on stdin, bust it up into headers, 
and the constituent mime-parts if any, and be able to parse the headers, 
and get at any
text/plain (or only) part, and shove the headers and
text/plain into a database.

I really don't feel like reinventing the wheel on the mime side.

PHP 4.3.x, if it matters.

Thanks!

LER

--
Larry Rosenman http://www.lerctr.org/~ler
Phone: +1 972-414-9812 E-Mail: [EMAIL PROTECTED]
US Mail: 1905 Steamboat Springs Drive, Garland, TX 75044-6749
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] IE Pagelength issue

2003-06-07 Thread Larry Brown
I am running into a strange problem.  I have a script that parses a database
for results.  It cycles through the data one record at a time looking for
matches to the query.  Up til now I haven't had any problems as the results
have been limited in length.  Now I have one that has a significant length
and the bottom is cut off on IE6.  I haven't tried any earlier versions of
IE but Mozilla loads the entire page without this problem.  Has anyone run
across this?  Is there a way around it?

Larry S. Brown
Dimension Networks, Inc.
(727) 723-8388




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



RE: [PHP] IE Pagelength issue

2003-06-07 Thread Larry Brown
Just as an additional note:  the page has one continuous table so another
potential problem would be a limit to the length of a table?

Larry S. Brown
Dimension Networks, Inc.
(727) 723-8388

-Original Message-
From: Larry Brown [mailto:[EMAIL PROTECTED]
Sent: Saturday, June 07, 2003 1:55 PM
To: PHP List
Subject: [PHP] IE Pagelength issue

I am running into a strange problem.  I have a script that parses a database
for results.  It cycles through the data one record at a time looking for
matches to the query.  Up til now I haven't had any problems as the results
have been limited in length.  Now I have one that has a significant length
and the bottom is cut off on IE6.  I haven't tried any earlier versions of
IE but Mozilla loads the entire page without this problem.  Has anyone run
across this?  Is there a way around it?

Larry S. Brown
Dimension Networks, Inc.
(727) 723-8388




--
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] mysql field getting cut off

2003-05-30 Thread Larry Brown
If anyone can help I seem to be stuck on a problem getting a mysql field
inserted correctly.  For instance the first page would have a field such
as...



info that is placed into the field is "St. Petersburg, FL" (without the
quotes)

the php code for the statement...

$query = "insert into table values( $variable, '$field', $variable2 )";

This is where there are 3 fields in the "table" and the second is the one I
want populated with "St. Petersburg, FL".  It ends up with "St." (I'm not
sure if the period makes it).  I have verified that the entire statement
arrives at the php script in the variable $field and I have used the mysql
client to give the same command with "St. Petersburg, FL" as the value and
it accepts it without a problem.

Larry S. Brown
Dimension Networks, Inc.
(727) 723-8388




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



RE: [PHP] mysql field getting cut off

2003-05-30 Thread Larry Brown
That, indirectly, is exactly what happened.  I have a subsequent screen for
modifying the results.  I must have gone back into that screen to change
something else and since it only pulled the St. when I applied it it changed
the field in the database.  Thanks a lot.  It seemed weird.

Larry S. Brown
Dimension Networks, Inc.
(727) 723-8388

-Original Message-
From: John W. Holmes [mailto:[EMAIL PROTECTED]
Sent: Thursday, May 29, 2003 9:44 PM
To: 'Larry Brown'; 'PHP List'
Subject: RE: [PHP] mysql field getting cut off

> If anyone can help I seem to be stuck on a problem getting a mysql
field
> inserted correctly.  For instance the first page would have a field
such
> as...
>
> 
>
> info that is placed into the field is "St. Petersburg, FL" (without
the
> quotes)
>
> the php code for the statement...
>
> $query = "insert into table values( $variable, '$field', $variable2
)";
>
> This is where there are 3 fields in the "table" and the second is the
one
> I
> want populated with "St. Petersburg, FL".  It ends up with "St." (I'm
not
> sure if the period makes it).  I have verified that the entire
statement
> arrives at the php script in the variable $field and I have used the
mysql
> client to give the same command with "St. Petersburg, FL" as the value
and
> it accepts it without a problem.

When you run a SELECT from the command line, do you only see "St." in
the column? What kind of column is it?

Are you sure it's not fine in the database and you're just showing it
like:



which will end up like



and will only show "St." in the text box...

---John W. Holmes...

Amazon Wishlist: http://www.amazon.com/o/registry/3BEXC84AB3A5E

PHP Architect - A monthly magazine for PHP Professionals. Get your copy
today. http://www.phparch.com/



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



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



RE: [PHP] IE Pagelength issue

2003-06-07 Thread Larry Brown
Example is a page that displays the concerts and bands at each concert for a
given spectator. Table one gives information on the spectator and has a
field that lists the concert events he/she has been to.  Table two lists
concerts along with location information and date along with bands and then
another table that lists band information.  There are several loops, the
first one is "while $spectator..." and within it a "while $concert..." and
within it a "while $band..."  So the resulting page can have user
information then a list with concert bands, concert bands, concert bands,
for each he/she has been to.  The one we are having a problem with has 27
concerts and IE stops at 25 and Mozilla goes all the way to the 27th.  I
will try and split each concert into its own table.  Just as a not each
concert listed gives the option to edit the concert information and a way to
edit the band information in addition to removing any one of them.  So there
are various buttons throughout.

Larry S. Brown
Dimension Networks, Inc.
(727) 723-8388

-Original Message-
From: John W. Holmes [mailto:[EMAIL PROTECTED]
Sent: Saturday, June 07, 2003 6:08 PM
To: 'Larry Brown'; 'PHP List'
Subject: RE: [PHP] IE Pagelength issue

> I am running into a strange problem.  I have a script that parses a
> database
> for results.  It cycles through the data one record at a time looking
for
> matches to the query.  Up til now I haven't had any problems as the
> results
> have been limited in length.  Now I have one that has a significant
length
> and the bottom is cut off on IE6.  I haven't tried any earlier
versions of
> IE but Mozilla loads the entire page without this problem.  Has anyone
run
> across this?  Is there a way around it?

> Just as an additional note:  the page has one continuous table so
another
> potential problem would be a limit to the length of a table?

Probably and IE "feature" of only being able to handle a certain table
size.

The "way around" it would be to end the table and start another every so
many rows... or split your rows up into Prev/Next pages...

Did I read correctly that you're selecting an entire database and then
using PHP to match criteria? Are you using a WHERE clause to do the
sorting? Sounds like you may be going about this the wrong way... if
not, carry on.

---John W. Holmes...

Amazon Wishlist: http://www.amazon.com/o/registry/3BEXC84AB3A5E

PHP Architect - A monthly magazine for PHP Professionals. Get your copy
today. http://www.phparch.com/



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



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



RE: [PHP] IE Pagelength issue

2003-06-08 Thread Larry Brown
Yes, the entire page is visible when selecting view source.  And again, it
does view ok in Mozilla.  I will try breaking the table into smaller tables
and see if that is it.  I won't have access till Tuesday.  If anyone has any
other ideas feel free to throw in.

Larry S. Brown
Dimension Networks, Inc.
(727) 723-8388

-Original Message-
From: John W. Holmes [mailto:[EMAIL PROTECTED]
Sent: Saturday, June 07, 2003 9:37 PM
To: 'Larry Brown'; 'PHP List'
Subject: RE: [PHP] IE Pagelength issue

If you "view source" in IE, do you see the entire page? If so, then it's
an IE display issue.

---John W. Holmes...

Amazon Wishlist: http://www.amazon.com/o/registry/3BEXC84AB3A5E

PHP Architect - A monthly magazine for PHP Professionals. Get your copy
today. http://www.phparch.com/

> -Original Message-
> From: Larry Brown [mailto:[EMAIL PROTECTED]
> Sent: Saturday, June 07, 2003 7:30 PM
> To: [EMAIL PROTECTED]; PHP List
> Subject: RE: [PHP] IE Pagelength issue
>
> Example is a page that displays the concerts and bands at each concert
for
> a
> given spectator. Table one gives information on the spectator and has
a
> field that lists the concert events he/she has been to.  Table two
lists
> concerts along with location information and date along with bands and
> then
> another table that lists band information.  There are several loops,
the
> first one is "while $spectator..." and within it a "while $concert..."
and
> within it a "while $band..."  So the resulting page can have user
> information then a list with concert bands, concert bands, concert
bands,
> for each he/she has been to.  The one we are having a problem with has
27
> concerts and IE stops at 25 and Mozilla goes all the way to the 27th.
I
> will try and split each concert into its own table.  Just as a not
each
> concert listed gives the option to edit the concert information and a
way
> to
> edit the band information in addition to removing any one of them.  So
> there
> are various buttons throughout.
>
> Larry S. Brown
> Dimension Networks, Inc.
> (727) 723-8388
>
> -Original Message-
> From: John W. Holmes [mailto:[EMAIL PROTECTED]
> Sent: Saturday, June 07, 2003 6:08 PM
> To: 'Larry Brown'; 'PHP List'
> Subject: RE: [PHP] IE Pagelength issue
>
> > I am running into a strange problem.  I have a script that parses a
> > database
> > for results.  It cycles through the data one record at a time
looking
> for
> > matches to the query.  Up til now I haven't had any problems as the
> > results
> > have been limited in length.  Now I have one that has a significant
> length
> > and the bottom is cut off on IE6.  I haven't tried any earlier
> versions of
> > IE but Mozilla loads the entire page without this problem.  Has
anyone
> run
> > across this?  Is there a way around it?
>
> > Just as an additional note:  the page has one continuous table so
> another
> > potential problem would be a limit to the length of a table?
>
> Probably and IE "feature" of only being able to handle a certain table
> size.
>
> The "way around" it would be to end the table and start another every
so
> many rows... or split your rows up into Prev/Next pages...
>
> Did I read correctly that you're selecting an entire database and then
> using PHP to match criteria? Are you using a WHERE clause to do the
> sorting? Sounds like you may be going about this the wrong way... if
> not, carry on.
>
> ---John W. Holmes...
>
> Amazon Wishlist: http://www.amazon.com/o/registry/3BEXC84AB3A5E
>
> PHP Architect - A monthly magazine for PHP Professionals. Get your
copy
> today. http://www.phparch.com/
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>




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



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



RE: [PHP] IE Pagelength issue

2003-06-09 Thread Larry Brown
I found the problem.  The script was creating each table within the previous
table.  Apparently there is a limit of 25 nested levels for IE.  I separated
each table and it loads all of them ok.

Thanks John,

Larry S. Brown
Dimension Networks, Inc.
(727) 723-8388

-Original Message-
From: Larry Brown [mailto:[EMAIL PROTECTED]
Sent: Sunday, June 08, 2003 8:48 PM
To: PHP List
Subject: RE: [PHP] IE Pagelength issue

Yes, the entire page is visible when selecting view source.  And again, it
does view ok in Mozilla.  I will try breaking the table into smaller tables
and see if that is it.  I won't have access till Tuesday.  If anyone has any
other ideas feel free to throw in.

Larry S. Brown
Dimension Networks, Inc.
(727) 723-8388

-Original Message-
From: John W. Holmes [mailto:[EMAIL PROTECTED]
Sent: Saturday, June 07, 2003 9:37 PM
To: 'Larry Brown'; 'PHP List'
Subject: RE: [PHP] IE Pagelength issue

If you "view source" in IE, do you see the entire page? If so, then it's
an IE display issue.

---John W. Holmes...

Amazon Wishlist: http://www.amazon.com/o/registry/3BEXC84AB3A5E

PHP Architect - A monthly magazine for PHP Professionals. Get your copy
today. http://www.phparch.com/

> -Original Message-
> From: Larry Brown [mailto:[EMAIL PROTECTED]
> Sent: Saturday, June 07, 2003 7:30 PM
> To: [EMAIL PROTECTED]; PHP List
> Subject: RE: [PHP] IE Pagelength issue
>
> Example is a page that displays the concerts and bands at each concert
for
> a
> given spectator. Table one gives information on the spectator and has
a
> field that lists the concert events he/she has been to.  Table two
lists
> concerts along with location information and date along with bands and
> then
> another table that lists band information.  There are several loops,
the
> first one is "while $spectator..." and within it a "while $concert..."
and
> within it a "while $band..."  So the resulting page can have user
> information then a list with concert bands, concert bands, concert
bands,
> for each he/she has been to.  The one we are having a problem with has
27
> concerts and IE stops at 25 and Mozilla goes all the way to the 27th.
I
> will try and split each concert into its own table.  Just as a not
each
> concert listed gives the option to edit the concert information and a
way
> to
> edit the band information in addition to removing any one of them.  So
> there
> are various buttons throughout.
>
> Larry S. Brown
> Dimension Networks, Inc.
> (727) 723-8388
>
> -Original Message-
> From: John W. Holmes [mailto:[EMAIL PROTECTED]
> Sent: Saturday, June 07, 2003 6:08 PM
> To: 'Larry Brown'; 'PHP List'
> Subject: RE: [PHP] IE Pagelength issue
>
> > I am running into a strange problem.  I have a script that parses a
> > database
> > for results.  It cycles through the data one record at a time
looking
> for
> > matches to the query.  Up til now I haven't had any problems as the
> > results
> > have been limited in length.  Now I have one that has a significant
> length
> > and the bottom is cut off on IE6.  I haven't tried any earlier
> versions of
> > IE but Mozilla loads the entire page without this problem.  Has
anyone
> run
> > across this?  Is there a way around it?
>
> > Just as an additional note:  the page has one continuous table so
> another
> > potential problem would be a limit to the length of a table?
>
> Probably and IE "feature" of only being able to handle a certain table
> size.
>
> The "way around" it would be to end the table and start another every
so
> many rows... or split your rows up into Prev/Next pages...
>
> Did I read correctly that you're selecting an entire database and then
> using PHP to match criteria? Are you using a WHERE clause to do the
> sorting? Sounds like you may be going about this the wrong way... if
> not, carry on.
>
> ---John W. Holmes...
>
> Amazon Wishlist: http://www.amazon.com/o/registry/3BEXC84AB3A5E
>
> PHP Architect - A monthly magazine for PHP Professionals. Get your
copy
> today. http://www.phparch.com/
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>




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



--
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] Ticketing System?

2003-06-25 Thread Larry Rosenman


--On Wednesday, June 25, 2003 18:34:10 +0200 Andreas Cahen <[EMAIL PROTECTED]> 
wrote:

Hello List :)

Is there any usefull ticketing system (Hotline/Support/etc.) written in
PHP?
I have found some on hotscripts.com, but I don't know which one is
really got or not..

Any suggestions?
not in PHP, but look at RT:Request Tracker, at http://www.bestpractical.com/


Cheers,

Andreas Cahen



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


--
Larry Rosenman http://www.lerctr.org/~ler
Phone: +1 972-414-9812 E-Mail: [EMAIL PROTECTED]
US Mail: 1905 Steamboat Springs Drive, Garland, TX 75044-6749


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


Re: [PHP] Re: Getting information of a client

2002-08-09 Thread Larry Rosenman

On Sat, 2002-08-10 at 01:38, radio x wrote:
> how can i get a variable posted from a form by a user whitout having
> register_globals set On?
> 
$_POST["variable"]
or
$HTTP_POST_VARS["variable"]


> Nick
> 
> 
> - Original Message -
> From: "Saci" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Friday, August 09, 2002 1:08 PM
> Subject: [PHP] Re: Getting information of a client
> 
> 
> >  > $mensagem = $mensagem."Remote_addr  : ".$_SERVER['REMOTE_ADDR']."\n";
> > $mensagem = $mensagem."Remote_host  : ".$_SERVER['REMOTE_HOST']."\n";
> > $mensagem = $mensagem."Remote_agent : ".$_SERVER['HTTP_USER_AGENT']."\n";
> > $mensagem = $mensagem."Host : ".$_SERVER['HTTP_HOST']."\n";
> > echo $mensagem;
> > ?>
> >
> >
> >
> > "Jan Souman" <[EMAIL PROTECTED]> escreveu na mensagem
> > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > > I would like to get information of a person who is browsing my site.
> Does
> > > anyone know how to get this information?
> > >
> > > Kind regards,
> > >
> > > Jan
> > >
> > >
> >
> >
> >
> > --
> > 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
> 
-- 
Larry Rosenman http://www.lerctr.org/~ler
Phone: +1 972-414-9812 E-Mail: [EMAIL PROTECTED]
US Mail: 1905 Steamboat Springs Drive, Garland, TX 75044-6749


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




Re: [PHP] Line Breaks in dynamic Download

2002-09-06 Thread Larry Irwin

Here's what your file contains:

ccadev:/# od -c TEST.txt
000L   I   N   E   O   N   E  \r   L   I   N   E   T   W
020O  \n   L   I   N   E   T   H   R   E   E
034

Wordpad handles it. Notepad does not.
But you have different line terminators for each line
Later,
Larry Irwin

- Original Message -
From: "Kevin Stone" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, September 06, 2002 2:48 PM
Subject: [PHP] Line Breaks in dynamic Download


> I have a script that allows clients to download their email lists from a
> database.  However I can not get the 'new line' characters (\n \r) to do
> their job in Notepad when the download is prompted and the file saved to
> disk.  I've simplified the problem with the code below.  Both \n and \r
> display as 'null' or undefined characters in Notepad.  What am I doing
> wrong?
>
>  $file = "LINE ONE\nLINE TWO\rLINE THREE\n\r";
>
> header("Cache-control: private");
> header("Content-type: application/octet-stream");
> header("Content-Disposition: attachment; filename=TEST.txt");
> echo $file;
> ?>
>
> http://www.helpelf.com/texttest.php Click here to run this code.  You
should
> be prompted to save the file.  Open the resulting file in Notepad on your
> PC.  Tell me if the newlines show as 'null' characters or if each LINE
ONE,
> LINE TWO, etc. shows up on their own lines.  Mac users also welcome to try
> in Simpletext/BBedit.
>
> Much thanks,
> Kevin Stone
> [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] Why $ on variable names?

2002-11-12 Thread Larry Rosenman
How about:

   That's the way the language designers did it, and there's LOTS of 
PRODUCTION code out
there that uses it.

   See also the precedence of PERL.

LER


--On Tuesday, November 12, 2002 16:40:46 -0500 "Jonathan Rosenberg (Tabby's 
Place)" <[EMAIL PROTECTED]> wrote:

In an earlier message, Marco Tabini [mailto:marcot@;inicode.com] saidf ...


If I can venture a comment, what you think
"clutters" the code others may find a quick and
easy way to identify a variable in it.


I guess this could be true.  But I don't understand why someone would need
an "easy" way to identify variables?  Why not an easy way to identify
function names?  Or constants?

In any case, I don't recall anyone complaining that they had trouble
"identifying variables" in C, C++, Modula, Pascal, Java, etc.


Marco


--
JR



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





--
Larry Rosenman http://www.lerctr.org/~ler
Phone: +1 972-414-9812 E-Mail: [EMAIL PROTECTED]
US Mail: 1905 Steamboat Springs Drive, Garland, TX 75044-6749




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




RE: [PHP] Why $ on variable names?

2002-11-12 Thread Larry Rosenman


--On Tuesday, November 12, 2002 16:53:07 -0500 "Jonathan Rosenberg (Tabby's 
Place)" <[EMAIL PROTECTED]> wrote:

In an earlier message, Larry Rosenman [mailto:ler@;lerctr.org] said ...


How about:



That's the way the language designers did it, and
there's LOTS of PRODUCTION code out there that uses it.


Because "that's the way it is"?  Well, that's good enough for me.  I'll
never question anything else again & I trust you won't, either.

You can't change the language at this date, and still call it PHP.  There 
is a LOT
of PHP code out there.  I can question, but expecting it to change is not 
realistic.




 See also the precedence of PERL.


Huh?  What does the "precedence of PERL" mean?

PERL has all it's variables (scalar at any rate) prefixed with Dollar 
Signs.




LER


--
JR





--
Larry Rosenman http://www.lerctr.org/~ler
Phone: +1 972-414-9812 E-Mail: [EMAIL PROTECTED]
US Mail: 1905 Steamboat Springs Drive, Garland, TX 75044-6749




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




[PHP] Pause for user input?

2002-11-20 Thread Larry Brown
Does anyone know of a method to pause during the processing of a script to
prompt a user for information and then incorporate the user's response for
the remainder of the script?

Larry S. Brown
Dimension Networks, Inc.
(727) 723-8388




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




RE: [PHP] Pause for user input?

2002-11-20 Thread Larry Brown
The idea is to have the script start to load, prompt for a question or more,
then use the data from the response to complete loading the page and avoid
having to post all of the variables from page to page to get all of the
responses back.  A lot of the questions are formed based on the answers to
previous questions so I'm trying to keep the number of separate pages to a
minimum by using such a technique.  I understand that Java can provide this
function, but I want to do as much with PHP and as little as possible with
Java.

Larry S. Brown MCSE
President/CEO
Dimension Networks, Inc.
Member ICCA
(727) 723-8388

-Original Message-
From: @ Edwin [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, November 20, 2002 11:29 AM
To: Larry Brown
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] Pause for user input?

Hello,

"Larry Brown" <[EMAIL PROTECTED]> wrote:

> Does anyone know of a method to pause during the processing of a script to
> prompt a user for information and then incorporate the user's response for
> the remainder of the script?

... in addition to what the others already said, let me just ask a couple of
questions:

1. Do you really need to "pause"? What did you exactly mean by "pause"?
2. Is it even necessary to "pause"?

Just wondering...

- E



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




RE: [PHP] Pause for user input?

2002-11-20 Thread Larry Brown
I understand that the Javascript will not pause the page from loading;
however, it should, like you stated, modify the page and hence change what
the client is seeing interactively which could include hiding/revealing
different questions based on their input.  This should ultimately present a
form with answers to those customized questions without traversing a number
of pages.  I only asked the question hoping there was a method of
accomplishing this that I wasn't aware of in PHP.  It is understandable that
it would not be possible server-side, but I figured I would check with the
gurus.

Thanks,

Larry S. Brown
Dimension Networks, Inc.
(727) 723-8388

-Original Message-
From: @ Edwin [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, November 20, 2002 2:39 PM
To: Larry Brown
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] Pause for user input?


"Larry Brown" <[EMAIL PROTECTED]> wrote:

> The idea is to have the script start to load, prompt for a question or
more,
> then use the data from the response to complete loading the page and avoid
> having to post all of the variables from page to page to get all of the
> responses back.  A lot of the questions are formed based on the answers to
> previous questions so I'm trying to keep the number of separate pages to a
> minimum by using such a technique.  I understand that Java can provide
this
> function, but I want to do as much with PHP and as little as possible with
> Java.

I think you're referring to JavaScript and NOT Java.

But, whether it's Java or Javascript, you cannot really pause/stop the
browser then do something to "complete loading the page." (Unless you press
"stop"--but this would require you to reload.)

Anyway, Javascript (if you're referring to it) doesn't have that kind of
function (AFAIK). Javascript can hide/unhide element on your form. It can
also enable/disable a checkbox, for example. But those functions would only
work AFTER the page is already loaded--and _not_ while it is loading. (Also,
*after* the Javascript file--if you're using and external one--is already
downloaded inside the your visitors' disk, etc.)

- E

PS
BTW, Javascript (support) can be turned off by your visitors--maybe you
already know that...

And... not all browsers supports Java. (But then again, you don't even need
a browser to run Java! What am I saying here?...)

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



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




RE: [PHP] How do I initialize a page to do something ONCE

2002-11-22 Thread Larry Brown
Your first post stated..
> The only problem is that it is not processing the second if block --
if($start_over == 1) -- unless I actually set start_over=1 in the get
string.
>

Your second sounds like it is executing the second block...

>The variable $initialize contains "int(1)", so it does set itself within
the last if statement.

If the second block is being executed...

Did you check out php.net and the comments about session_unset()?

If it is not, are you closing the browser between tests?  The session
information stays open even after leaving the site and coming back.

Larry S. Brown
Dimension Networks, Inc.
(727) 723-8388





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




Re: [PHP] function for size of array

2002-07-05 Thread Larry Rosenman

On Fri, 2002-07-05 at 11:45, Scott Fletcher wrote:
> What is RTFM??
Read The Fine Manual

 
> "Jason Wong" <[EMAIL PROTECTED]> wrote in message
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > On Friday 05 July 2002 22:20, Scott Fletcher wrote:
> > > Ah!  Thanks!  By the way, it's "count()" with a "n".  :-)
> >
> > That was to trick you into RTFM! Hey you were lucky that the 'o' wasn't
> left
> > out instead :)
> >
> > --
> > Jason Wong -> Gremlins Associates -> www.gremlins.com.hk
> > Open Source Software Systems Integrators
> > * Web Design & Hosting * Internet & Intranet Applications Development *
> >
> > /*
> > The shortest distance between two points is under construction.
> > -- Noelie Alito
> > */
> >
> 
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
-- 
Larry Rosenman http://www.lerctr.org/~ler
Phone: +1 972-414-9812 E-Mail: [EMAIL PROTECTED]
US Mail: 1905 Steamboat Springs Drive, Garland, TX 75044-6749


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




Re: [PHP] ./configure with register_globals turned on?

2002-07-05 Thread Larry Rosenman

On Fri, 2002-07-05 at 10:04, Scott Fletcher wrote:
> What is the configure option that will turn on the register_globals?  This
> is for ./configure option in UNIX / LINUX.
It's in php.ini.  Look at the phpinfo() output, and modify to include
the register_globals=ON, then restart Apache (assuming it's in an apache
module).



-- 
Larry Rosenman http://www.lerctr.org/~ler
Phone: +1 972-414-9812 E-Mail: [EMAIL PROTECTED]
US Mail: 1905 Steamboat Springs Drive, Garland, TX 75044-6749


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




Re: [PHP] Does the AOL browser break any standards?

2003-09-29 Thread Larry Rosenman


--On Monday, September 29, 2003 12:43:06 -0400 Dan Anderson 
<[EMAIL PROTECTED]> wrote:

AOL uses IE libraries, so yes, it breaks as many standards as it can.
What specific symptoms are users reporting?
Users can't access the web page at all.  They are getting some kind of
error.
and that error would be?


-Dan

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


--
Larry Rosenman http://www.lerctr.org/~ler
Phone: +1 972-414-9812 E-Mail: [EMAIL PROTECTED]
US Mail: 1905 Steamboat Springs Drive, Garland, TX 75044-6749


pgp0.pgp
Description: PGP signature


RE: [PHP] Tracking IP Addresses

2003-10-03 Thread Larry Rosenman
IP's are not locked to a geographical area.

Period.

LER

--On Friday, October 03, 2003 15:46:46 -0500 Stephen Craton 
<[EMAIL PROTECTED]> wrote:

So I'm going to have to use a 3rd party script? Is there not a way to make
the IP tracker on your own in any way?
Thanks,
Stephen Craton
http://www.melchior.us -- http://www.melchior.us/portfolio
-Original Message-
From: Duncan [mailto:[EMAIL PROTECTED]
Sent: Friday, October 03, 2003 3:31 PM
To: Stephen Craton
Cc: PHP List
Subject: RE: [PHP] Tracking IP Addresses
Thanks, but how would I get the results in PHP? What I'm trying to do
involves getting the user's IP address then finding where they are, like
what country, and then showing content specific stuff.
Good luck tracking AOL IPs :)  They seem to use a common pool across the
world.  That said, I recall that the mysql folks use some kind of
commercial system from a company called MaxMind...
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



--
Larry Rosenman http://www.lerctr.org/~ler
Phone: +1 972-414-9812 E-Mail: [EMAIL PROTECTED]
US Mail: 1905 Steamboat Springs Drive, Garland, TX 75044-6749


pgp0.pgp
Description: PGP signature


[PHP] php temp table question

2003-10-27 Thread Larry Brown
Does anyone know whether the use of persistent connections with php will
allow a temp table created by a script to linger around and cause a problem
with the next execution of the script when it tries to create the temp table
again?  Also if it does present a problem with the next script execution
trying to create the temp table again, if I drop the temp table at the end
of the script will I still have problems if the script is run by two client
in tandem?  For instance two people connect, both hit the script at about
the same time.  One script creates the temp table and before it can drop the
table the second script tries to create the table.  Will it see the table
created by the other script?  Again the use of persistent connections would
be a the heart of this I would think.

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



[PHP] php temp table question (for mysql)

2003-10-27 Thread Larry Brown
Does anyone know whether the use of persistent connections with php will
allow a temp table created by a script to linger around and cause a problem
with the next execution of the script when it tries to create the temp table
again?  Also if it does present a problem with the next script execution
trying to create the temp table again, if I drop the temp table at the end
of the script will I still have problems if the script is run by two client
in tandem?  For instance two people connect, both hit the script at about
the same time.  One script creates the temp table and before it can drop the
table the second script tries to create the table.  Will it see the table
created by the other script?  Again the use of persistent connections would
be a the heart of this I would think.

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



RE: [PHP] PHP with Frames (cont.)

2003-10-27 Thread Larry Brown
Are you trying to access variables between frames or just get a php script
to run when it is one frame.  I have php pages running in frames in a number
of places.  You could not access variables between the frames though.  You
would have to use a client side script to do that.  You could have something
like javascript deal with passing variable around on the client's browser
and then ultimately post the result back to the server in a form etc.

-Original Message-
From: rich [mailto:[EMAIL PROTECTED]
Sent: Monday, October 27, 2003 2:23 PM
To: [EMAIL PROTECTED]
Subject: [PHP] PHP with Frames (cont.)


No, he's right - this is an issue.

Do variables persist between PHP files?

In the attached scripts I have a login page which directs the user, on a
sucessful login, to a front page which is a frameset.

The login.php opens a connection to a MySQL database ($connection) but once
the browser has been re-directed to the frame-root.html page this variable
is no longer available.

Kb wrote:

> Hi,
>
> Does anyone know why my PHP pages won't work in Frames?  I have 5 frames,
> each of which are displaying PHP pages.and none of the PHP code works.
>
> If I run the code outside of Frames it works fine!
>
> I've can't find any decent references for PHP in Frames.
>
> Your help would be appreciated.
>
> Thanks
>
> Kevin

--
UEA/MUS::Record Library
--
UEA/MUS::Record Library

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



[PHP] PDFlib not working with explorer based on PHP created file in memory

2003-10-29 Thread Larry Brown
If anyone can help, please...

I have a page that points to a PHP page that dynamically creates a pdf file
using PDFlib.  The page uses a link such as
site.com/page.php?variable=value.  That in turn executes the script that
uses the variable/value to pull info from the db and generate the page.  The
result is that when you click the link you are prompted to save or open the
document.  By openning the document you are presented with the pdf by
acrobat.  This is seemless with Mozilla.  However, on IE it hangs with the
message "Getting File information:".  If you try to save it you get another
error.  I have read some information indicating that the problem is with the
length parameter not being sent.  However, the page I'm using was off an
example someone provided and it already has what seems to be the fix for
page length.  The code that creates the file is as follows...


$p = PDF_new();
if(PDF_open_file($p, "") == 0) {
die("Error: ".PDF_get_errmsg($p));
}

...body goes here...

PDF_end_page($p);
PDF_close($p);

$buf = PDF_get_buffer($p);
$len = strlen($buf);

header("Content-type: application/pdf");
header("Content-Length: $len");
header("Content-Disposition: inline; filename=filename.pdf");
print $buf;

PDF_delete($p);

Again, this is only a problem with m$ IE.  I know this is one of the largest
toolkits (PDFlib) in use for creating well defined printable documents so I
can't believe that this is not a common problem or that I am doing something
really wrong.

Someone on PDFlib's mailing list once mentioned sending the document for
download via "chunks" instead of getting the length except he wrote
something in C/C++ to accomplish it in his app.  Is there some way to tell
the browser to accept via "chunks" in php?  Does the above header look right
for IE?

Any help would be greatly appreciated...

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



RE: [PHP] PDFlib not working with explorer based on PHP created file in memory

2003-10-29 Thread Larry Brown
My apologies for waisting anyone's time.  I found the posting in the
archives that had the correct code to use.

-Original Message-
From: Larry Brown [mailto:[EMAIL PROTECTED]
Sent: Wednesday, October 29, 2003 3:39 PM
To: PHP List
Subject: [PHP] PDFlib not working with explorer based on PHP created
file in memory


If anyone can help, please...

I have a page that points to a PHP page that dynamically creates a pdf file
using PDFlib.  The page uses a link such as
site.com/page.php?variable=value.  That in turn executes the script that
uses the variable/value to pull info from the db and generate the page.  The
result is that when you click the link you are prompted to save or open the
document.  By openning the document you are presented with the pdf by
acrobat.  This is seemless with Mozilla.  However, on IE it hangs with the
message "Getting File information:".  If you try to save it you get another
error.  I have read some information indicating that the problem is with the
length parameter not being sent.  However, the page I'm using was off an
example someone provided and it already has what seems to be the fix for
page length.  The code that creates the file is as follows...


$p = PDF_new();
if(PDF_open_file($p, "") == 0) {
die("Error: ".PDF_get_errmsg($p));
}

...body goes here...

PDF_end_page($p);
PDF_close($p);

$buf = PDF_get_buffer($p);
$len = strlen($buf);

header("Content-type: application/pdf");
header("Content-Length: $len");
header("Content-Disposition: inline; filename=filename.pdf");
print $buf;

PDF_delete($p);

Again, this is only a problem with m$ IE.  I know this is one of the largest
toolkits (PDFlib) in use for creating well defined printable documents so I
can't believe that this is not a common problem or that I am doing something
really wrong.

Someone on PDFlib's mailing list once mentioned sending the document for
download via "chunks" instead of getting the length except he wrote
something in C/C++ to accomplish it in his app.  Is there some way to tell
the browser to accept via "chunks" in php?  Does the above header look right
for IE?

Any help would be greatly appreciated...

--
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 temp table question (for mysql)

2003-10-31 Thread Larry Brown
I'm now finding that persistent connections is allowing the temp table to
remain.  I have a sql query that creates the table and another that joins
the temp table to another for a result set that I use. If I press refresh on
the browser window I get an error that the sql query creating the table
fails.  I prepend a query that removes the table before the sql that creates
it and then hit refresh and the query works.  If I close the browser thus
ending the session and reopen the browser and log in, the script fails to
remove the temp table since it hasn't been created yet (and must have been
removed).  I changed my method of connecting to use mysql_connect instead of
mysql_pconnect and removed the drop temp sql and it loads and reloads fine.
Perhaps it is the combination of mysql_pconnect with sessions that creates
this problem.

-Original Message-
From: CPT John W. Holmes [mailto:[EMAIL PROTECTED]
Sent: Monday, October 27, 2003 4:43 PM
To: Larry Brown; PHP List
Subject: Re: [PHP] php temp table question (for mysql)


From: "Larry Brown" <[EMAIL PROTECTED]>

> Does anyone know whether the use of persistent connections with php will
> allow a temp table created by a script to linger around

No, the table will still be removed at the end of the script whether you use
persistant connections or not.

> and cause a problem
> with the next execution of the script when it tries to create the temp
table

Temporary tables are unique for that specific question. So you can have the
same script creating the "same" temporary table and 100 people hit it
without issues. Each script creates it's own temporary table with a unique
name that only that connection has access to.

---John Holmes...

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



[PHP] nusoap

2003-11-11 Thread Larry Brown
Does anyone here have any solid experience with nusoap?  Their list has
low volume and I am finding it difficult to find any useable examples or
descriptions of real life uses and how to configure the server/client.

In particular I'm currently trying to figure out the correct syntax to
produce wsdl using "$server->wsdl->addComplexType(..." to describe an
array of the form...

array([0]=>343454[1]=>SMITH[2]=>BOB[3]=>1969-03-17[4]=>234343444[5]2003-11-11 13:23:02)

where data types are string,string,string,date,string,datetime

It appears that the complexType would be a struct although this is
actually an array.  I just need someone who has had experience with this
toolkit for a couple of issues.

Thanks for any assistance,

Larry

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



RE: [PHP] File upload problem

2003-12-20 Thread Larry Brown
According to the documentation you have to have the maxfilesize tag before
the input tag.

-Original Message-
From: Dino Costantini [mailto:[EMAIL PROTECTED]
Sent: Wednesday, December 17, 2003 6:34 PM
To: [EMAIL PROTECTED]
Subject: [PHP] File upload problem


i'm trying to write a page which allows user to upload file. theese are my
sources but they didn't work, anyone could help me?
-form.html





upload.php---

---
upload.php doesn't upload anything and doesn't output any error message. i
don't think it's an apache problem, because this is the only page that
doesn't work.

--
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] mysql load_file retreival

2003-12-20 Thread Larry Brown
I have set up a script to recieve a pdf file and store it in a mysql db
using "update db set field=load_file('fileIncludingFile') where id=$id".
Afterwards I can see the file has been uploaded into the blob field
successfully and without errors.  Now I want to get the file back out.  I
set up a script with "select field from db where id=$id" and used
mysql_query followed by mysql_fetch_row and did echo header("Content-type:
application/pdf"); and then echo result[0]; where result was the row
fetched.  I get the prompt to open with pdf but pdf fails.  I have
magicquotes on but I understand that the load_file() function within mysql
does the escaping etc.  How can I "un-escape" the data?  The only thing I
saw on the mysql manual is on how to use load_file_infile/load_file_outfile
which does not apply to this.  Can someone lend a hand here?

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



RE: [PHP] sessions problem

2003-12-20 Thread Larry Brown
Make sure you have session_start(); at the beginning of each script you run
from the time you start inserting variables to the time you want the session
to end.

-Original Message-
From: Nitin [mailto:[EMAIL PROTECTED]
Sent: Saturday, December 20, 2003 10:48 AM
To: PHP-General
Subject: [PHP] sessions problem


hi all,

i'm just starting to use sessions.
i've a problem,

i started session and assigned variables to $HTTP_SESSION_VARS
i can very well see these vars in my next script, but i need to get back to
first script for some working, and strangely i dont find these vars there.

any help or suggestions

Nitin

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



  1   2   3   4   5   6   7   8   9   >