RE: [PHP] Re: [PHP-DB] Cross site authentication

2001-09-19 Thread Hoover, Josh

A combonation of IP restriction and basic authentication over SSL, while not
ideal, would probably be better than most alternatives I can think of.

Josh Hoover
KnowledgeStorm, Inc.
[EMAIL PROTECTED]

Searching for a new IT solution for your company? Need to improve your
product marketing? 
Visit KnowledgeStorm at www.knowledgestorm.com to learn how we can simplify
the process for you.
KnowledgeStorm - Your IT Search Starts Here 

 SSL avoids the problem of someone sniffing the plain text data.  We
 still have the problem: what data do we send?  Anyone can forge
 credentials and send them over SSL. How does B know it came 
 from A?  I'm
 thinking of some key exchange method, but portability between the
 Microsoft and UNIX worlds makes this even trickier.
 
 -- 
 Bill Lubanovic
 Mad Scheme Limited



RE: [PHP] re: array question

2001-09-18 Thread Hoover, Josh

If you want to store all the values in the array in one variable (just as a
string with delimiters maybe?) Try this:

foreach ($array as $value) {
$temp .= $value . |;
}

Josh Hoover
KnowledgeStorm, Inc.
[EMAIL PROTECTED]

Searching for a new IT solution for your company? Need to improve your
product marketing? 
Visit KnowledgeStorm at www.knowledgestorm.com to learn how we can simplify
the process for you.
KnowledgeStorm - Your IT Search Starts Here 

 
 foreach ($array as $value) {
  print $value;
 }
 
 if you wanted the key names, as well as the value, you could 
 use this:
 
 foreach ($array as $key = $value) {
  print $key of \$array = $value;
 }



RE: [PHP] Handling sessions between servers?

2001-09-17 Thread Hoover, Josh

You can use NFS shares, but I've read that it is too slow for most
situations.  My suggestion would be to use a database and use a custom PHP
session handler.  A really good tutorial (including working code) on how to
write custom PHP session handlers utilizing a database can be found at the
following URL:

http://www.phpbuilder.com/columns/ying2602.php3

I've tested this code and it worked fine utilzing MySQL.  You can apply the
same concepts to just about any datasource you want.

Josh Hoover
KnowledgeStorm, Inc.
[EMAIL PROTECTED]

Searching for a new IT solution for your company? Need to improve your
product marketing? 
Visit KnowledgeStorm at www.knowledgestorm.com to learn how we can simplify
the process for you.
KnowledgeStorm - Your IT Search Starts Here 

 From: Michael Champagne [mailto:[EMAIL PROTECTED]]
 
 Is it possible to handle sessions with PHP between separate 
 web servers?  We
 have 2 Apache servers and would like to share session data 
 between them.  If
 we keep the session data on an NFS mounted drive -- will this 
 work?  Would it
 be better to write custom session handlers to store session 
 data in a database
 accessible from both servers?  It seems like this should be 
 possible, but I'm
 not quite sure how to go about doing it.  Also, this is on 2 separate
 platforms.  One is RedHat Linux 7.1 and the other server is 
 on AIX 4.3.3.
 
 Thanks in advance for any replies,
 Mike



RE: [PHP] PHP on Win NT , IIS

2001-08-28 Thread Hoover, Josh


 What web server is better on NT with PHP?

I'm sure everyone has their own opinion, but if you're using NT, then you're
probably just as well using IIS until Apache 2.0 has a final release out.

 What PHP installation mode performs better i.e. CGI,  SAPI 
 Module , build or
 not build etc ?

SAPI modules are going to typically be faster, but you don't want to use
ISAPI on IIS/NT due to stability issues.  Setup PHP as a CGI with IIS.

 What 'S' in SAPI?
 Any suggestions on PHP configuration for Oracle, IIS, and LDAP?

Server API I believe.

 Also I am planning to use PHP scripts to run some jobs from 
 scheduler. Is it
 a bad idea?  If not what need to be considered while installing PHP.

It's not a bad idea.  You just have to have PHP installed, which you will
with your setup anyway.

Josh Hoover
KnowledgeStorm, Inc.
[EMAIL PROTECTED]

Searching for a new IT solution for your company? Need to improve your
product marketing? 
Visit KnowledgeStorm at www.knowledgestorm.com to learn how we can simplify
the process for you.
KnowledgeStorm - Your IT Search Starts Here 



RE: [PHP] Re: PHP and SOAP/XML-RPC

2001-08-27 Thread Hoover, Josh

Checkout the following list of SOAP implementations:

http://www.soapware.org/directory/4/implementations

You should find at least two implementations for PHP there.  

Josh Hoover
KnowledgeStorm, Inc.
[EMAIL PROTECTED]

Searching for a new IT solution for your company? Need to improve your
product marketing? 
Visit KnowledgeStorm at www.knowledgestorm.com to learn how we can simplify
the process for you.
KnowledgeStorm - Your IT Search Starts Here 

 Sean McCormack wrote:
  
  Does PHP currently support SOAP? If so, where is the 
 documentation on it
  (couldn't find it on the site)? If not, when will it be 
 supported? Thanks!



RE: [PHP] FTP

2001-07-26 Thread Hoover, Josh

You could try this for the sake of simplicity:

$fp = fopen (ftp://user:[EMAIL PROTECTED]/;, w);

http://www.php.net/manual/en/function.fopen.php

Josh Hoover
KnowledgeStorm, Inc.
[EMAIL PROTECTED]

Searching for a new IT solution for your company? Need to improve your
product marketing? 
Visit KnowledgeStorm at www.knowledgestorm.com to learn how we can simplify
the process for you.
KnowledgeStorm - Your IT Search Starts Here 

 Can i make a FTP connection to other server and download a file?
 How can i do this



RE: [PHP] sql query successful

2001-07-18 Thread Hoover, Josh

I believe you should use the error function for the database you're using to
check for failed queries.  If you're using MySQL (which it appears that you
are), you would do something like this:

$sql = mysql_query(SELECT * FROM table ORDER BY rand());

if(mysql_error())
echo SQL not executed successfully.;
else
print SQL executed successfully.;


Josh Hoover
KnowledgeStorm, Inc.
[EMAIL PROTECTED]

Searching for a new IT solution for your company? Need to improve your
product marketing? 
Visit KnowledgeStorm at www.knowledgestorm.com to learn how we can simplify
the process for you.
KnowledgeStorm - Your IT Search Starts Here 


 This works:
 if ($connection = mysql_connect(host,username,password)) {
 print Successful connection:
 }
 else {
 print No connection;
 }
 
 But this won't work:
 
 if ($sql = mysql_query(SELECT * FROM table ORDER BY rand())) {
 print SQL executed successfully.;
 }
 else {
 print SQL not executed successfully.;
 }
 
 Can anyone tell me how I can tell if the SQL executed 
 successfully?  Is
 there any method besides OR DIE? 



RE: [PHP] Getting extensions to load in Win32

2001-07-09 Thread Hoover, Josh

Michael,

First, try running php.exe from the command line.  When you do that, it will
probably give you a message about not being able to find certain dll's it
needs.  I believe most, if not all, of the dlls you need are in your PHP
directory under a dll directory.  The best thing to do is to add this path
(PHP_DIRECTOR\dlls\) to the System path.  You may have to restart to get
this new entry to be recognized.  Once you do that, run php.exe on the
command line again and see if it still gives you errors.

Hope that helps,

Josh Hoover
KnowledgeStorm, Inc.
[EMAIL PROTECTED]

Searching for a new IT solution for your company? Need to improve your
product marketing? 
Visit KnowledgeStorm at www.knowledgestorm.com to learn how we can simplify
the process for you.
KnowledgeStorm - Your IT Search Starts Here 

 I'm trying to load the php_gd.dll, but I get the same problem 
 with any of
 the extensions listed in php.ini.  The files are present, I have the
 directory set up in php.ini, but php won't work at all until 
 I comment out
 the extension line again.



RE: [PHP] A universal Database Class

2001-05-17 Thread Hoover, Josh

There are several database abstraction classes out there.  There are three
that come to my mind right away:

ADODB - http://php.weblogs.com/ADODB 
Metabase - http://phpclasses.upperdesign.com/browse.html/package/20/
PearDB - Not sure of the URL, but you can look in the PEAR directory of a
PHP install to see the code

Josh Hoover
KnowledgeStorm, Inc.
[EMAIL PROTECTED]

Searching for a new IT solution for your company? Need to improve your
product marketing? 
Visit KnowledgeStorm at www.knowledgestorm.com to learn how we can simplify
the process for you.
KnowledgeStorm - Your IT Search Starts Here 

 I am making a suite of online tools.  Right Now I am 
 connecting to a MS SQL
 2000 database.  Is there any class out there that will let 
 you send a query
 to more than just one type of databases?  Like someone could 
 run it off a
 MSSQL server and another could run it off a MySQL database.



RE: [PHP] PHP4 and MySQL on Macintosh

2001-05-14 Thread Hoover, Josh

Andy,

I believe you can run PHP on Mac OS with the use of WebTen by Tenon
(http://www.tenon.com/products/webten/).  MySQL does not run on Mac OS.  You
can run both PHP 4 and MySQL on Mac OS X.  Since it sounds like you're a Mac
developer, I would suggest you check out the AMP mailing list which is full
of Mac developers using technologies like PHP, MySQL, Mac OS X, etc.  The
URL is http://www.developersplace.com/  

Hope that helps out.

Josh Hoover
KnowledgeStorm, Inc.
[EMAIL PROTECTED]

Searching for a new IT solution for your company? Need to improve your
product marketing? 
Visit KnowledgeStorm at www.knowledgestorm.com to learn how we can simplify
the process for you.
KnowledgeStorm - Your IT Search Starts Here 

 does anybody know if it is possible to run these applications 
 on MAC 0S?



RE: [PHP] Script invocation similar to ASP %= %

2001-05-04 Thread Hoover, Josh

I believe you want something like this:

?
$PAGE_TITLE = My Page;

?

html
head
title ?=$PAGE_TITLE? /title
/head

...
/html

For the short cut syntax on echo checkout:
http://www.php.net/manual/en/function.echo.php  This assumes that you have
shortags on in your php.ini file.


Josh Hoover
KnowledgeStorm, Inc.
[EMAIL PROTECTED]

Searching for a new IT solution for your company? Need to improve your
product marketing? 
Visit KnowledgeStorm at www.knowledgestorm.com to learn how we can simplify
the process for you.
KnowledgeStorm - Your IT Search Starts Here 


 Hi there,
 
 pedantic as it might seem, ..., but is there a way to implement the
 following ASP snippet in PHP
 
 %
 Dim PAGE_TITLE
 PAGE_TITLE = My Page
 %
 html
 head
  title %=PAGE_TITLE% /title
 /head
 
 ...
 /html



RE: [PHP] Are calling COM applications a trojan?

2001-04-11 Thread Hoover, Josh

And, I read a book saying that you can open a word document on the client
side and insert words in it.

Are you sure this was done on the client side and not on the server side?
Here is a common example used to show a simple use of COM and PHP:

$word=new COM("word.application") or die("Cannot start word for you"); 
print "Loaded word version ($word-Version)\n"; 
$word-visible =1 ; 
$word-Documents-Add(); 
$word-Selection-Typetext("Dit is een test"); 
$word-Documents[1]-SaveAs("burb ofzo.doc"); 
$word-Quit();

This does not work on the client.  PHP is on the server side.  COM is used
to access local objects, not remote ones.  So, in the example, PHP is using
word on the server and opening a document and saving it on the server.  This
has nothing to do with a client.  The use of COM and PHP would mainly be for
PHP to access COM objects that a business has currently in other
applications.  Many times it would be nice for PHP to utilize objects
already written, and in the Windows world right now those objects are
normally accessible via COM if they're accessible at all.

Josh Hoover
KnowledgeStorm, Inc.
[EMAIL PROTECTED]

Searching for a new IT solution for your company? Need to improve your
product marketing? 
Visit KnowledgeStorm at www.knowledgestorm.com to learn how we can simplify
the process for you.
KnowledgeStorm - Your IT Search Starts Here 



RE: [PHP] How to convert '2001032018' - '2001 03 20 18' ? (Fomating Date)

2001-03-20 Thread Hoover, Josh

You could try this:

function convertTimeStamp($yourTimeStamp)
{
$strTime[0] = substr($yourTimeStamp, 0,4);
$strTime[1] = substr($yourTimeStamp, 4,2);
$strTime[2] = substr($yourTimeStamp, 6,2);
$strTime[3] = substr($yourTimeStamp, 8,2);

return $strTime;
}

Josh Hoover
KnowledgeStorm, Inc.
[EMAIL PROTECTED]

Searching for a new IT solution for your company? Need to improve your
product marketing? 
Visit KnowledgeStorm at www.knowledgestorm.com to learn how we can simplify
the process for you.
KnowledgeStorm - Your IT Search Starts Here 

 I'm trying to convert the timestamp '2001032018' into '2001 
 03 20 18' or an
 Array which I can easily format. Do you remember any date or 
 string function
 I can use?



RE: [PHP] Text and formating

2001-03-07 Thread Hoover, Josh

You need to do a str_replace() on any fields that need to have breaks in
them.  Try something like this:

echo str_replace ("\n", "BR", $fieldvariable)

Josh Hoover
KnowledgeStorm, Inc.

Searching for a new IT solution for your company? Need to improve your
product marketing? 
Visit KnowledgeStorm at www.knowledgestorm.com to learn how we can simplify
the process for you.
KnowledgeStorm - Your IT Search Starts Here 

 IN the "add news form" they enter the info in like this:
 --
 This is a test.
 
 How are you today.
   Laddi da, Laddi da
 --
 
 
 The output on the news page comes as:
 --
 --
 This is a test. How are you today.Laddi da, Laddi da
 --
 --
 
 Is there a way between php and mysql to ensure that format of 
 the date is
 same going in and out?
 



RE: [PHP] passing variables

2001-03-06 Thread Hoover, Josh

Do you mean you want them to be able to say how long a text field should be?
If so, try this:

for ($i=0; $i  $fields; $i++)
{ 
$fieldName = "field$i";

echo "trtdinput type=text name=\"$fieldName\"
value=\"${$fieldName}\" size=\"$size\"\n";
}

$size would be a form parameter that you allow the user to set along with
the field name and value.

Josh Hoover
KnowledgeStorm, Inc.

Searching for a new IT solution for your company? Need to improve your
product marketing? 
Visit KnowledgeStorm at www.knowledgestorm.com to learn how we can simplify
the process for you.
KnowledgeStorm - Your IT Search Starts Here 

 I am trying to build a dynamic form, and I am using the code 
 below to let
 the user ,name the fields that are generated,but i want to 
 give the user the
 option of changing the field size but I cant get it to work.



RE: [PHP] help parsing data files

2001-03-02 Thread Hoover, Josh

Try putting this in your config in place of what you currently have:

AddType application/x-httpd-php phtml
AddType application/x-httpd-php php
AddType application/x-httpd-php php3
AddType application/x-httpd-php data

Then restart Apache and see if that does it for you.

Josh Hoover
KnowledgeStorm, Inc.

Searching for a new IT solution for your company? Need to improve your
product marketing? 
Visit KnowledgeStorm at www.knowledgestorm.com to learn how we can simplify
the process for you.
KnowledgeStorm - Your IT Search Starts Here 


 Php is not parsing .data files, I have the following in Apache config.
  
 AddType application/x-httpd-php phtml php php3 data 



RE: [PHP] Odd PHP/MySQL Question

2001-03-01 Thread Hoover, Josh

You could try something like this:

SELECT year, count(studentID) FROM students GROUP BY year

...where studentID is the primary key column/field in your students table.

Josh Hoover
KnowledgeStorm, Inc.

Searching for a new IT solution for your company? Need to improve your
product marketing? 
Visit KnowledgeStorm at www.knowledgestorm.com to learn how we can simplify
the process for you.
KnowledgeStorm - Your IT Search Starts Here


 I have a user database where a year has to be put in.
 
 Now, I want to compile a list of each different year and how 
 many users are in that year.
 
 Is there a way to do this beyond coding for each year:
 
 SELECT * FROM students WHERE year = '1983' ?
 
 - Kath
 



RE: [PHP] Hiding php Code

2001-03-01 Thread Hoover, Josh

If you don't want the admin or web server user to see your code, you may
want to consider Zend's Encode product
(http://www.zend.com/zend/products.php#encoder) which encodes your PHP code
for you.  BUT, this can be rather expensive (depending on your use) and you
probably still need your Administrator to install it for you, so I'm not
sure if this does you any good or not.

Josh Hoover
KnowledgeStorm, Inc.

Searching for a new IT solution for your company? Need to improve your
product marketing? 
Visit KnowledgeStorm at www.knowledgestorm.com to learn how we can simplify
the process for you.
KnowledgeStorm - Your IT Search Starts Here 

 That's the problem, I don't want the web server user or 
 administrator to see
 the code.
 
 Rene



RE: [PHP] PHP / Filemaker?

2001-02-23 Thread Hoover, Josh

Someone said it already, ODBC would be the best way to go.  BUT, keep in
mind that ODBC support in FileMaker is not by any means complete.  Also
remember that FileMaker is always going to be your bottleneck - not PHP.  I
would suggest looking at MySQL (http://www.mysql.com/) and/or PostgreSQL
(http://www.postgresql.org/) as alternatives to FileMaker Pro. 

I think you may also be interested in joining the AMP list at
http://www.developersplace.com/  This list has a lot of Mac people on it
doing Apache, MySQL, PHP, etc. stuff.  There are people there with good
Lasso/FileMaker Pro backgrounds, so they can help you out with any
problems/questions you may run into.

Josh Hoover
KnowledgeStorm, Inc.

Searching for a new IT solution for your company? Need to improve your
product marketing? 
Visit KnowledgeStorm at www.knowledgestorm.com to learn how we can simplify
the process for you.
KnowledgeStorm - Your IT Search Starts Here

  Hey
 
  This is my first question and mail to this list...hope u 
 treat me decent =)
  My earlier work have been lasso/filemaker (mac)
  Ive been heard that PHP is coming strongly and I have no 
 reason not to
  join. How is the relation between PHP/Filemaker?
 
  --*
  [knaSen]
  icq #23830427



RE: [PHP] Header (location: test.php);

2001-02-20 Thread Hoover, Josh

The answer is yes, you need to pass along your form variables.  You could do
this with the following:


?php

$formVars = "";

//Use $HTTP_GET_VARS if form is a get type
while(list($name,$value)=each($HTTP_POST_VARS)) 
{
$formVars .= $name . "=" . $value . "";
}

if($submit == 2)
Header("Location: test2.php?" . $formVars);

?

Hope that helps you out some.

Josh Hoover
KnowledgeStorm, Inc.

Searching for a new IT solution for your company? Need to improve your
product marketing? 
Visit KnowledgeStorm at www.knowledgestorm.com to learn how we can simplify
the process for you.
KnowledgeStorm - Your IT Search Starts Here


 if ($submit ==2)
 {
 Header(location: test2.php);
 }
 
 Should not the form varaibles be passed along to each of these pages
 respectively? I have about 30 variables that should be passed to each
 different page...none of these variables are showing up. Do I 
 need to attach
 these to the url for each different header?
 such as:
 Header ("Location: test1.php?add=1name=juan");



RE: [PHP] Help me! What is wrong?

2001-02-20 Thread Hoover, Josh

I think this might be a problem...

IfDefine SSL
AddModule   mod_php3.c
/IfDefine

Shouldn't the IfDefine SSL be say PHP3 rather than SSL?

Josh Hoover
KnowledgeStorm, Inc.

Searching for a new IT solution for your company? Need to improve your
product marketing? 
Visit KnowledgeStorm at www.knowledgestorm.com to learn how we can simplify
the process for you.
KnowledgeStorm - Your IT Search Starts Here



RE: [PHP] validating an e-mail address entry

2001-02-16 Thread Hoover, Josh

Sorry about that last E-mail!  Here is what I meant:

if (preg_match ("/(@.*@)|(\.\.)|(@\.)|(\.@)|(^\.)/", $emailaddress) ||
preg_match
("/^.+\@(\[?)[a-zA-Z0-9\-\.]+\.([a-zA-Z]{2,3}|[0-9]{1,3})(\]?)$/",$emailaddr
ess)) 
{
print "That is a valid e-mail.BR\n";
}
else 
{
print "Not a valid e-mail.BR\n";
}

The PHP archive can be found at:
http://marc.theaimsgroup.com/?l=php-generalr=1w=2

Josh Hoover
KnowledgeStorm, Inc.

Searching for a new IT solution for your company? Need to improve your
product marketing? 
Visit KnowledgeStorm at www.knowledgestorm.com to learn how we can simplify
the process for you.
KnowledgeStorm - Your IT Search Starts Here


 Does anyone know of a way to validate an e-mail address that 
 was entered
 and submitted from a form?  I would like to trap invalid syntax.
 Perhaps there exists a script that does just that?
 
 I assume valid syntax is the following:
 
 One or more characters before the @ sign, followed by an optional '[',
 then any number of letters, numbers,  dashes or periods 
 (valid domain/IP
 characters) ending in a period and then 2 or 3 letters (for domain
 suffixes) or 1 to 3 numbers  (for IP addresses).  An ending bracket is
 also allowed as it is valid syntax to have an email address like:
 user@[255.255.255.0].
 
 Thanks,
 Don



RE: [PHP] How to make text BOLD (OFF: Netscape issues)

2001-02-16 Thread Hoover, Josh

Speaking of stylesheets, has anyone had problems with Netscape 4.x,
stylesheets, and javascript breaking HTML tags every 4K characters?  It
seems like Netscape 4.x puts a newline character after 4K characters when
using stylesheets and javascript.  Has anyone else seen this behavior?  An
example of the problem would be something like this:

HTML
HEAD
TITLEtest/TITLE
BODY
BThis is a test right here.  Let's assume 4K characters have been sent /
B

The bold tag in this case gets broken up.  It seems like it happens every 4K
characters when using CSS and Javascript on Netscape 4.x.  It's a crazy
problem because it will break a page in so many different places since PHP
pages are typically very dynamic and the length changes quite often.  Anyone
else seen this behavior?

Thanks,

Josh Hoover
KnowledgeStorm, Inc.

Searching for a new IT solution for your company? Need to improve your
product marketing? 
Visit KnowledgeStorm at www.knowledgestorm.com to learn how we can simplify
the process for you.
KnowledgeStorm - Your IT Search Starts Here

 All my output scripts use stylesheets, that way they can be easily
 customized.
 
 - John Vanderbeck
 - Admin, GameDesign



RE: [PHP] PHP Editors

2001-02-16 Thread Hoover, Josh

I think BBEdit can get that percentage because so many people doing web
development use Macs.  Even though the overall marketshare for Macs is
small, there is a high concentration in the web/graphics development areas.
Still, those numbers Allaire shows seem a bit out of whack to me too :)

Josh Hoover
KnowledgeStorm, Inc.

Searching for a new IT solution for your company? Need to improve your
product marketing? 
Visit KnowledgeStorm at www.knowledgestorm.com to learn how we can simplify
the process for you.
KnowledgeStorm - Your IT Search Starts Here

 how does BBEdit garner 42.6% of the share when the Mac 
 has only a
 3-5% share of the worldwide computer market?
 
 J



RE: [PHP] counting files

2001-02-16 Thread Hoover, Josh

Try this bit of code and see if it works.  (I don't know if there's a less
taxing (on the server) way to get a count of files in a directory or not.)

$myDirectory = dir("yourdirectory");
while($entry=$myDirectory-read()) 
{
$filecount++;
}
$myDirectory-close();

$number = rand(1, $filecount); 
$file = $number . "." . "gif";
 
echo"img src = 'random_images/$file'";


Josh Hoover
KnowledgeStorm, Inc.

Searching for a new IT solution for your company? Need to improve your
product marketing? 
Visit KnowledgeStorm at www.knowledgestorm.com to learn how we can simplify
the process for you.
KnowledgeStorm - Your IT Search Starts Here
  

 I have a web page that displays an image.  I would like to randomize
 which image it displays when the page loads.  Every possible 
 image will
 be the same dimensions and file format.  Each image will be named a
 consecutive number begining with 1.
 
 The code I am using is:
 
 $number = rand(1, 10);
 
 $file = $number . "." . "gif";
 
 echo"img src = 'random_images/$file'";
 
 I'm wondering if there is a way to count how many files are in the
 random_images directory, so I can dynamically set the range of my
 rand().  This way I can add images to the random_images directory
 without having to increase the range in the php code.
 
 Thanks!
 
 Nick