[PHP] AD authentication

2003-01-23 Thread Michael Hall
-- 

I was wondering if anyone had any experience, suggestions, advice or pointers 
regarding the use of Win 2000 Active Directory servers to authenticate users in 
PHP scripts hosted on Linux. Are PHP's LDAP functions of use here?

TIA 
Mick



MICHAEL HALL Web Development Officer
Batchelor Institute of Indigenous Tertiary Education
W: [EMAIL PROTECTED](08) 8951 8352
H: [EMAIL PROTECTED](08) 8953 1442


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




Re: [PHP] PHP RTF

2003-01-14 Thread Michael Hall
I don't know how much use this is for your needs, but I have found Openjade and 
DocBook to be excellent tools for creating RTF files  from XML sources. PHP can 
be the scripting language used to tie things together, manipulate HTML/XML etc, 
but basically this solution is outside of PHP I suppose. 

Mick

Quoting [-^-!-%- [EMAIL PROTECTED]:

 
 For those of you with experience in using php for RTF documents.
 
 I need help generating RTF Style tags from PHP. I can convert regular text
 to an RTF document, but the document will
 display RTF Style tags as regular text (in the RTF document).
 
 How do I make the RTF document recognize the RTF Style tags.
 
 Any help with code samples, tutorials and/or references, will be greatly
 appreciated.
 
 -john
 
 =P e p i e  D e s i g n s
  www.pepiedesigns.com
  Providing Solutions That Increase Productivity
 
  Web Developement. Database. Hosting. Multimedia.
 
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 


-- 

MICHAEL HALL Web Development Officer
Batchelor Institute of Indigenous Tertiary Education
W: [EMAIL PROTECTED](08) 8951 8352
H: [EMAIL PROTECTED](08) 8953 1442


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




RE: [PHP] class inside class

2003-01-13 Thread Michael Hall
Thankyou Nilaab and Hatem for the replies.

I can see that extending classes is probably the way to go. I was kind of 
aware of how it works, but didn't see it as an obvious solution. But looking 
at it more closely, I think I should be able to put most common stuff in a 
basic class. Different kinds of pages can then be created by extension classes
with one or two unique functions, and the rest inherited ... pretty obvious 
really :)

Mick


Quoting @ Nilaab [EMAIL PROTECTED]:

 If these two classes are in separate files then you will need to include
 one
 of the classes in with the other class using the include() or require()
 functions. Have you also used the extends keyword to extend the main class?
 When you use inheritance properties, you can use the $this- mechanism
 within the classes to reference all functions of both classes. Read about
 inheritance of classes for more information. If you already knew the above
 and it doesn't help you, then just ignore it. I'm just trying to narrow
 down
 your problem. Good luck.
 
 
  -Original Message-
  From: Michael Hall [mailto:[EMAIL PROTECTED]]
  Sent: Monday, January 13, 2003 12:20 AM
  To: [EMAIL PROTECTED]
  Subject: [PHP] class inside class
 
 
  --
 
  G'day:
 
  I am using a 'wrapper' class to create all the boilerplate HTML
  on a website,
  plus do stuff like authentication and print menus etc according
  to properties
  set dynamically within the class.
 
  The actual content of each page is generated by seperate
  'content' classes.
  These classes are 'embedded' within and instantiated within the
  wrapper class,
  but are otherwise independent of it.
 
  This system allows for something approaching a PHP object publishing
  application, which is where I'm heading.
 
  My problem is that now I need to get at the values of some wrapper class
  properties from within a content class: in other words, I need to
  access the
  dynamically assigned values of the properties of one class, from
  inside another
  class (which is embedded within the first, though I'm not sure
  that really
  matters).
 
  I can't use the $this- mechanism because the value is inside a different
  class.
  I can't use the first class's handle (eg $page , from $page = new
  WebPage())
  because the embedded class doesn't know about it.
  I have been playing around with declaring globals, and with PHP's
  class/object
  functions, but have got nowhere yet.
 
 
  Is this possible, and if so, does anyone have any pointers? Hope
  my description
  of the problem makes sense.
 
  TIA
  Mick
 
  
  MICHAEL HALL Web Development Officer
  Batchelor Institute of Indigenous Tertiary Education
  W: [EMAIL PROTECTED](08) 8951 8352
  H: [EMAIL PROTECTED](08) 8953 1442
  
 
  --
  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
 



Michael Hall Web Development Officer
Batchelor Institute of Indigenous Tertiary Education
Work: [EMAIL PROTECTED] (08) 8951 8352
Home: [EMAIL PROTECTED]  (08 8953 1442



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




[PHP] class inside class

2003-01-12 Thread Michael Hall
-- 

G'day:

I am using a 'wrapper' class to create all the boilerplate HTML on a website, 
plus do stuff like authentication and print menus etc according to properties 
set dynamically within the class.

The actual content of each page is generated by seperate 'content' classes. 
These classes are 'embedded' within and instantiated within the wrapper class, 
but are otherwise independent of it.

This system allows for something approaching a PHP object publishing 
application, which is where I'm heading.

My problem is that now I need to get at the values of some wrapper class 
properties from within a content class: in other words, I need to access the 
dynamically assigned values of the properties of one class, from inside another 
class (which is embedded within the first, though I'm not sure that really 
matters).

I can't use the $this- mechanism because the value is inside a different 
class.
I can't use the first class's handle (eg $page , from $page = new WebPage()) 
because the embedded class doesn't know about it.
I have been playing around with declaring globals, and with PHP's class/object 
functions, but have got nowhere yet. 


Is this possible, and if so, does anyone have any pointers? Hope my description 
of the problem makes sense.

TIA
Mick


MICHAEL HALL Web Development Officer
Batchelor Institute of Indigenous Tertiary Education
W: [EMAIL PROTECTED](08) 8951 8352
H: [EMAIL PROTECTED](08) 8953 1442


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




[PHP] Site Search

2002-07-28 Thread Michael Hall


I'm wondering what is a good general approach to enabling site-wide
searches on any topic on a 100% PHP-powered portal-type site for a
tertiary institution (yet to be built). Most if not all content will be
contained in a database, spread across potentially many different
tables. 

How can all this stuff be searched efficiently and effectively to
hopefully find the punter what they're looking for? Searching the
sometimes lengthy main content fields (eg. an academic paper) in every
table of the entire database for every search doesn't seem like the way to
go. But apart from attempting to add some kind of subjective search
term fields to the data, I can't see how else it can be done.

TIA


MICHAEL HALL Web Development Officer
Batchelor Institute of Indigenous Tertiary Education
Work: [EMAIL PROTECTED] (08) 8951 8314
Home: [EMAIL PROTECTED] (08) 8953 1442



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




Re: [PHP] include files and global variables

2002-07-21 Thread Michael Hall


I think that you need to call the checkMaster() function AFTER you declare
it, not before. Try moving checkMaster(); beneath the function
definition.

Mick


On Sun, 21 Jul 2002, Jon Wyatt wrote:

 
 I have some pages which include a number of files.
 In one of the include files I have a function which I wish to be executed 
 everytime the include file is loaded.
 
 Therefore I place the function name in the include file at the top.
 
 However, this function uses a session variable to decide whether to call 
 another function and it appears that this variable is not being carried 
 across. For example, the start of the include file might look like this:-
 
 
 ?php
 
 checkMaster();
 
 
 function checkMaster()
 {
 global $master_session;
 if ($master_session[db_host])
 {
 connectToDB();
 }
 }
 
 
 function connectToDB()
 {
   ...
   
 
 
 The master_session variable is not set and hence connectToDB is never 
 called.
 If I place the checkMaster code in each page that includes this file then it 
 all works fine. How do I get round this?
 
 Thanks.
 
 jon.
 
 Better than having your body rubbed vigorously with a cheese grater.
 http://www.samuri.co.uk.
 
 
 _
 MSN Photos is the easiest way to share and print your photos: 
 http://photos.msn.com/support/worldwide.aspx
 
 
 

-- 

n   i   n   t   i  .   c   o   m
php-python-perl-mysql-postgresql

Michael Hall [EMAIL PROTECTED]



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




Re: [PHP] Password in script

2002-07-19 Thread Michael Hall


Actually, there is Banother way and you should consider it.

Sensitive information like passwords should be kept in a file stored
outside the live web content directory (ie, outside DocumentRoot on
Apache). This file can then be included in your main file.

This way, you can be sure that a misconfigured Apache (accidentally or
otherwise) will never send your php scripts out as plain text.

This doesn't solve the problem of other users on the same system snooping
around your filesystem, though.

All the MySQL advice is good advice.

Michael


On Thu, 18 Jul 2002, Tyler Longren wrote:

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




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




Re: [PHP] Password in script

2002-07-19 Thread Michael Hall


The GRANT USAGE statement creates a user with no priveleges ... the user
exists but can't do anything.

See MySQL Manual section 6.13

Michael



On Fri, 19 Jul 2002, Sailom wrote:

 I just checked grant and it said something like...
 GRANT USAGE ON *.* TO 'X'@'%' IDENTIFIED BY .
 Does this means user named 'X' can log in from any server?  This may be
 a silly question.
 
 
 Jonathan Rosenberg [EMAIL PROTECTED] wrote in message
 [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
  Yes, but if you're on a shared server, other users of the user will likely
  be able to read your PHP files  get the password.
 
   -Original Message-
   From: Tyler Longren [mailto:[EMAIL PROTECTED]]
   Sent: Thursday, July 18, 2002 23:10 PM
   To: Sailom
   Cc: [EMAIL PROTECTED]
   Subject: Re: [PHP] Password in script
  
  
   It's fine.  There's no other way to do it really.  Somebody would have
   to be able to see the source to the php file before they could see the
   password for mysql.  They won't get it just by viewing the webpage
   that's already been parsed by php.
  
   --
   Tyler Longren
   Captain Jack Communications
   [EMAIL PROTECTED]
   www.captainjack.com
  
  
  
   On Fri, 19 Jul 2002 10:03:02 +0700
   Sailom [EMAIL PROTECTED] wrote:
  
I am new to PHP and MySQL and never have experience in this area.  I
am writing a PHP script that connects to MySQL server.  I have to put
a password of MySQL into the PHP script.  I think it may not be
secured.  What do you think?  How can I make it more secure?  Thanks.
   
   
   
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
  
   --
   PHP General Mailing List (http://www.php.net/)
   To unsubscribe, visit: http://www.php.net/unsub.php
  
  
 
 
 
 
 

-- 

n   i   n   t   i  .   c   o   m
php-python-perl-mysql-postgresql
----
Michael Hall [EMAIL PROTECTED]



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




[PHP] Sablotron confusion

2002-07-19 Thread Michael Hall


I've just downloaded a bunch of stuff from www.gingerall.org, which I hope
will set up Sablotron on my RH7.2/Apache1.3.24/PHP4.2.1 box.

Can I just use the rpms?:

sablotron-0.95-1.i386.rpm
sablotron-devel-0.95-1.i386.rpm

There is also a Sablot-0.95-PHP.patch in there, plus a
Sablot-0.95.tar.gz package that won't untar which I guess is the source.

I found the directions about what packages I needed pretty confusing.
Any advice anyone?

I know I need to recompile PHP when Sablotron is installed.

TIA


Michael Hall [EMAIL PROTECTED]



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




Re: [PHP] Re: get line from file

2002-07-19 Thread Michael Hall


I think more info is probably needed here. Is it always the literal string
line3 that you want to catch, or always the second last line?

Some kind of regular expression solution is probably what you need.

Michael


On Fri, 19 Jul 2002, Peter wrote:

 You can try this.
 
 ?PHP
 
 $datafile = file(...); // Here comes your filename
 
 for ($k=0; $k=count($datafile)-1; $k++) {
 
   echo $datafile[$k]br; // Display each line read from datafile
 
 }
 
 ?
 
 
 Yamin Prabudy [EMAIL PROTECTED] schreef in bericht
 [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
  I got a file line like this
 
  !-- START --
  This is a line1
  this is a line2
  this is a line3
  this is a line4
  !-- END --
 
 
 
  how can i grep out the line1,line2,line3 ??
  do anyone out there have any idea ?
 
 
 
 
 

-- 

n   i   n   t   i  .   c   o   m
php-python-perl-mysql-postgresql
----
Michael Hall [EMAIL PROTECTED]



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




Re: [PHP] Classes Constructor syntax

2002-07-17 Thread Michael Hall


PHP does not support multiple constructors.

Michael

On Wed, 17 Jul 2002, David Russell wrote:

 Hi all,
 
 I am finally spending some time converting a million and one functions 
 into a class - this is for a software issue tracking system.
 
 I have:
 
 class issue {
var
var
...
 
function issue() { //default constructor
  //initialise all variables to defaults, and start getting the stuff 
 from forms
}
 
function issue($number) { //1 variable constructor
  // Query database and populate variables accordingly
}
 }
 
 My question is: will this work? does PHP OOP support more than one 
 constructor? If my syntax is wrong, please let me know the correct syntax.
 
 Thanks
 
 David R
 
 
 

-- 

n   i   n   t   i  .   c   o   m
php-python-perl-mysql-postgresql

Michael Hall [EMAIL PROTECTED]



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




Re: [PHP] Classes Constructor syntax

2002-07-17 Thread Michael Hall


I'm no guru, but here goes anyway ...

default variable values can simply be set with a var statement:

var $somevar1 = value1;
var $somevar2 = value2;

or with a set function:

var $somevar1;
var $somevar2;

function setsomevar1()
{
$this-somevar1 = value1;
}

function setsomevar2()
{
$this-somevar2 = value2;
}

One set function could probably query a database and set all your vars
in one go:

function setallvars()
{
// query db, get values
$this-somevar1 = value1;
$this-somevar2 = value2;
}

Amyway, you could then call the set var functions from within your
constructor:

function issue()
{
setallvars();
or
setsomevar1();
setsomevar2();
}

Just a suggestion. No doubt someone will correct me if I'm wrong ... I'm
new to OOP myself.

Michael



On Wed, 17 Jul 2002, David Russell wrote:

 Hi all,
 
 I am finally spending some time converting a million and one functions 
 into a class - this is for a software issue tracking system.
 
 I have:
 
 class issue {
var
var
...
 
function issue() { //default constructor
  //initialise all variables to defaults, and start getting the stuff 
 from forms
}
 
function issue($number) { //1 variable constructor
  // Query database and populate variables accordingly
}
 }
 
 My question is: will this work? does PHP OOP support more than one 
 constructor? If my syntax is wrong, please let me know the correct syntax.
 
 Thanks
 
 David R
 
 
 

-- 

n   i   n   t   i  .   c   o   m
php-python-perl-mysql-postgresql

Michael Hall [EMAIL PROTECTED]



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




Re: [PHP] Of Jobs and Certs

2002-07-17 Thread Michael Hall


In my opinion, certification doesn't count for much. The Microsoft certs
are proof enough of this, but even many of the Linux certs are pretty
shallow when you look at what they cover and how they're tested.
Most employers know that you can either do it or you can't.

Anecdote: I once asked a networking/hardware professional whether a RedHat
certificate would make me more employable in his eyes. No way was his
answer, he was more interested in what I could demonstrably do (and had
already done) than in the paper.

I don't have any advice about how to get into the industry. I have only
just joined it after working 10 years as a teacher. I started building
sites for community groups, built web apps for schools, got a few paid
commercial jobs, built up a portfolio, and finally got a fulltime web
development job at a tertiary institution.

The ease/difficulty of getting into the industry probably depends greatly
on economic circumstances. But I know that in my case, knowing Linux,
Apache and PHP/MySQL (plus demonstrable experience, not necessarily
commercial) was what clinched it for me. Where I live (NT, Australia),
Linux really is making inroads into the mainstream.

One thing that might look good on a CV is involvement in an open source
project, at whatever level.

Michael 


On Wed, 17 Jul 2002, Martin Clifford wrote:

 Howdy everyone,
 
 I'd like to get everyone's input on Jobs and Certs.  I know there are a couple 
Certifications for web developers out there, such as the CIW and CWP certifications.
 
 Here are my questions:
 
 1.  What is the best method to go about becoming certified?
 2.  What is the best way to go about getting into the web development industry?
 3.  If you have ever taken online courses relating to web development, what is your 
opinion on them?  Good, bad, ugly?
 4.  Which certification is most beneficial?  I know that CWP requires work 
experience before becoming certified past certain points, and CIW does not require 
this.
 5.  Why can't I remember what question five was? Doh.
 
 At any rate, I'm current a data entry clerk, but have quite a bit of web experience 
(none at a job, though), and I know that I have TONS more to learn, but I am very 
passionate about it and want to be able to do it as a career.  I just don't know 
where the hell to start, and I know that some of you might be able to offer some 
advice in this area.
 
 Thanks in advance!  This is very important to me, so I thought I'd ask the people 
that would know best :o)
 
 Martin Clifford
 Homepage: http://www.completesource.net
 Developer's Forums: http://www.completesource.net/forums/
 
 
 
 

-- 

n   i   n   t   i  .   c   o   m
php-python-perl-mysql-postgresql

Michael Hall [EMAIL PROTECTED]



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




Re: [PHP] activating php scripts via cron

2002-07-16 Thread Michael Hall


The most important difference is, I believe, whether you use apxs during
compilation or not.

Using ./configure --with-apxs will build a DSO module, leaving --with-apxs
out will build a standalone module.

There may be more to it than that, though.

Michael


On Tue, 16 Jul 2002, Andy wrote:

 sounds logical, but what happens with my other php version, where I need the
 flags? will it still be working? And where is this standalone php version
 gonna be installed?
 
 Andy
 
 
 Jason Wong [EMAIL PROTECTED] schrieb im Newsbeitrag
 [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
  On Tuesday 16 July 2002 23:36, Andy wrote:
   so how do you install a second php version?? If you compile it (besides
   with what kind of flags) and then do a make and a make install the
 original
   version will be replaced, right?
 
  Just doing:
 
  ./configure; make; make install
 
  will compile and install the standalone php binary by default.
 
  Add whatever other options you need to the ./configure command. It's all
 in
  the manual.
 
  --
  Jason Wong - Gremlins Associates - www.gremlins.com.hk
  Open Source Software Systems Integrators
  * Web Design  Hosting * Internet  Intranet Applications Development *
 
  /*
 THE DAILY PLANET
 
  SUPERMAN SAVES DESSERT!
  Plans to Eat it later
  */
 
 
 
 
 

-- 

n   i   n   t   i  .   c   o   m
php-python-perl-mysql-postgresql
----
Michael Hall [EMAIL PROTECTED]



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




Re: [PHP] Using index.php instead of index.html

2002-07-16 Thread Michael Hall


The only security consideration here is whether you want to advertise the
fact that you're using PHP or not. If not:

DirectoryIndex index.html

AddType application/x-httpd-php .html

This is OK if most/all your pages use PHP. Otherwise, normal html gets
parsed as well with unnecessary performance costs.

Security through obscurity is not a good standalone policy, but every
little bit can help.

Michael




On Wed, 17 Jul 2002, Mark Gallagher wrote:

 Sailom wrote:
 
I am a novice on PHP and web programming.  Can any one suggest me if I can
  use index.php in place of index.html?  I really need to concern about
 
 Sure you can!
 
 If you're using an Apache webserver, create a file named .htaccess 
 containing the following:
 
 DirectoryIndex index.php index.html
 Redirect index.html http://www.bar.net/index.php
 
 The first line says the directory index file is index.php, not 
 index.html.  The second line says whenever you get a request for 
 index.html, send them index.php instead.
 
  security issue too.
 
 Umm... *what*?
 
 
 
 

-- 

n   i   n   t   i  .   c   o   m
php-python-perl-mysql-postgresql

Michael Hall [EMAIL PROTECTED]



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




[PHP] Apache 2.0 + PHP

2002-07-15 Thread Michael Hall


I've had a hunt through the mail archives but can't find a definite
answer:

Is Apache 2.0.x and PHP 4.2.x/4.3.x on Linux a viable proposition yet in a
production environment? 

I guess the diversity of experiences described in the archives probably
means no, but what is the current opinion? Some of the archive messages
I read are quite old now.



Michael Hall [EMAIL PROTECTED]



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




Re: [PHP] Re: Can not delete files that were uploaded

2002-07-14 Thread Michael Hall

 Be warned that if PHP can delete them, so can anybody else on the shared
 server who wants to write a PHP script to delete them, unless you've
 configured PHP specially to run as a specific user, which is unlikely for
 most ISP setups.

How can PHP be configured to run as a specific user? I'm referring to a
DSO installation, where I assume that because PHP is 'part' of Apache, it
would be the same user as Apache.



Michael Hall [EMAIL PROTECTED]



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




Re: [PHP] Restricting access using IPs

2002-07-13 Thread Michael Hall


$substring = substr($localip,0,9);

if ($substring == '192.168.0')
{
// you're in
}


On Sat, 13 Jul 2002, Liam MacKenzie wrote:

 If I enter 192.168.0.13 (My IP) it works, I'm allowed in and any other IP
 isn't.
 However, I need to grant access to this whole network, not just me.  So I
 need 192.168.0.* to be able to access it, everyone else should get Access
 Denied
 
 So I need to know how to write this bit:
 $localip = 192.168.0.13;
 so that it's the network, not just me.
 
 I tried these but they didn't work:
 $localip = 192.168.0.0;
 $localip = 192.168.0.*;
 $localip = 192.168.0.0/24;
 
 
 Any other ideas?
 
 Cheers
 
 
 
 - Original Message -
 From: Jason Wong [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Saturday, July 13, 2002 3:49 PM
 Subject: Re: [PHP] Restricting access using IPs
 
 
  On Saturday 13 July 2002 13:10, Liam MacKenzie wrote:
   Hey all, I'm looking to deny access to all IPs except those that fall
 into
   a specific IP range.  192.168.0.* in this case.
   Am I missing something out of this code, it don't work too well  ;-)
 
  HOW doesn't it work too well? It displays a picture of a naked guy instead
 of
  the naked girl that you was expecting?
 
   ?
   $localip = 192.168.0.13;
   if ($REMOTE_ADDR == $localip) {
   ?
  
   Allowed!
  
   ?
   }
   else {
   ?
  
   Denied!
  
   ?
   }
  
   ?
 
 
  --
  Jason Wong - Gremlins Associates - www.gremlins.com.hk
  Open Source Software Systems Integrators
  * Web Design  Hosting * Internet  Intranet Applications Development *
 
  /*
  GOOD-NIGHT, everybody ... Now I have to go administer FIRST-AID to my
  pet LEISURE SUIT!!
  */
 
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php
 
 
 
 
 
 

-- 

n   i   n   t   i  .   c   o   m
php-python-perl-mysql-postgresql

Michael Hall [EMAIL PROTECTED]



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




Re: [PHP] Restricting access using IPs

2002-07-13 Thread Michael Hall


Oops, wrong variable. That should be:

 $substring = substr($REMOTE_ADDR,0,9);
 
 if ($substring == '192.168.0')
 {
// you're in
 }

Michael

 On Sat, 13 Jul 2002, Liam MacKenzie wrote:
 
  If I enter 192.168.0.13 (My IP) it works, I'm allowed in and any other IP
  isn't.
  However, I need to grant access to this whole network, not just me.  So I
  need 192.168.0.* to be able to access it, everyone else should get Access
  Denied
  
  So I need to know how to write this bit:
  $localip = 192.168.0.13;
  so that it's the network, not just me.
  
  I tried these but they didn't work:
  $localip = 192.168.0.0;
  $localip = 192.168.0.*;
  $localip = 192.168.0.0/24;
  
  
  Any other ideas?
  
  Cheers
  
  
  
  - Original Message -
  From: Jason Wong [EMAIL PROTECTED]
  To: [EMAIL PROTECTED]
  Sent: Saturday, July 13, 2002 3:49 PM
  Subject: Re: [PHP] Restricting access using IPs
  
  
   On Saturday 13 July 2002 13:10, Liam MacKenzie wrote:
Hey all, I'm looking to deny access to all IPs except those that fall
  into
a specific IP range.  192.168.0.* in this case.
Am I missing something out of this code, it don't work too well  ;-)
  
   HOW doesn't it work too well? It displays a picture of a naked guy instead
  of
   the naked girl that you was expecting?
  
?
$localip = 192.168.0.13;
if ($REMOTE_ADDR == $localip) {
?
   
Allowed!
   
?
}
else {
?
   
Denied!
   
?
}
   
?
  
  
   --
   Jason Wong - Gremlins Associates - www.gremlins.com.hk
   Open Source Software Systems Integrators
   * Web Design  Hosting * Internet  Intranet Applications Development *
  
   /*
   GOOD-NIGHT, everybody ... Now I have to go administer FIRST-AID to my
   pet LEISURE SUIT!!
   */
  
  
   --
   PHP General Mailing List (http://www.php.net/)
   To unsubscribe, visit: http://www.php.net/unsub.php
  
  
  
  
  
  
 
 

-- 

n   i   n   t   i  .   c   o   m
php-python-perl-mysql-postgresql

Michael Hall [EMAIL PROTECTED]



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




[PHP] compiling with mysql

2002-07-11 Thread Michael Hall


Another PHP compilation question ...

I've just compiled PHP 4.2.1 --with-mysql. I added no path to mysql, and
it worked fine as it always does. However, I'm keen to add mod_python as a
DSO to Apache as well, and noticed in PHP's INSTALL notes that I'll
probably need to recompile PHP with a path to mysql:

--with-mysql=/somewhere/or/other/

1. Is this always the case?

2. Where would the path be likely to be on RedHat 7.2 with MySQL rpms?

TIA


Michael Hall [EMAIL PROTECTED]



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




[PHP] compiling and php.ini

2002-07-11 Thread Michael Hall


I've just compiled PHP 4.2.1 with Apache 1.3.24 on RedHat 7.2. Everything
works just fine as usual. I've got a couple of queries, however.

I compiled with the --enable-magic-quotes option, then figured this was a
bad move as I've been caught out before with scripts that assume it is
on. So, I copied the php.ini-recommended file to php.ini, and now
phpinfo() tells me that magic_quotes_gpc and magic_quotes_runtime are off.

So, does compiling with --enable-magic-quotes have any effects if magic
quotes are turned off in php.ini? Are they really off?

Can all --enable-whatever options be turned on/off in php.ini,
regardless of ./configure options?

Does the -with-config-file-path option set the expected path to php.ini
(I always thought it was to Apache)? How come PHP still works whether the
file is there or not?

TIA  



Michael Hall [EMAIL PROTECTED]




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




Re: [PHP] compiling with mysql

2002-07-11 Thread Michael Hall

On Thu, 11 Jul 2002, Tyler Longren wrote:

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

Yeah, me too, but the INSTALL file (or was it the message at the end of
the compile/make) was pretty clear about needing to provide a path if PHP
was going to share access to MySQL with things like mod_perl, mod_python,
etc.

I guess all will become clear when I unpack mod_python and have a go.



Michael Hall [EMAIL PROTECTED]



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




Re: [PHP] compiling with mysql

2002-07-11 Thread Michael Hall


OK, thanks for that. I'm about to start a full-time job developing
a portal/intranet and what have you for a tertiary education institution,
and after 'mucking about' with PHP for a couple of years and developing a
few web apps, I realise that there is a lot of detail that I need
to get clear before I start, especially config and security-related stuff. 

I guess there are a lot of people in my situation, who have used PHP for
years without having a good grip on some pretty fundamental stuff. The
difference now is that it matters - my reputation (and that of PHP I
suppose, in my employer's mind at least) is on the line if I muck up.

BTW, I've had some people trying to push me in the direction of Zope for
this job, but I've had a look at it and simply don't get it's 'Zen'. I'm
not knocking it, but I don't see how it betters good, clean OO PHP.

Anyway, thanks again.

Michael

On Thu, 11 Jul 2002, Rasmus Lerdorf wrote:

 The difference between adding a path and not is that without a path the
 bundled mysql client library will be used, whereas if you add a path then
 your system's mysql client libs will be used.  It is usually a good idea
 to use the system libaries if you have them because they are more likely
 to match your server version, and if you are linking against other things
 that might be linked against the mysql client libraries, then using the
 system libraries is a better idea.
 
 -Rasmus
 
 On Thu, 11 Jul 2002, Tyler Longren wrote:
 
  I've never compiled php with the path to mysql.  I've done this on lots
  of different servers, and it always works.  I don't know if it's the
  proper way of doing things, but it does work.
 
  --
  Tyler Longren
  Captain Jack Communications
  [EMAIL PROTECTED]
  www.captainjack.com
 
 
 
  On Fri, 12 Jul 2002 10:02:40 +0930 (CST)
  Michael Hall [EMAIL PROTECTED] wrote:
 
  
   Another PHP compilation question ...
  
   I've just compiled PHP 4.2.1 --with-mysql. I added no path to mysql,
   and it worked fine as it always does. However, I'm keen to add
   mod_python as a DSO to Apache as well, and noticed in PHP's INSTALL
   notes that I'll probably need to recompile PHP with a path to mysql:
  
 --with-mysql=/somewhere/or/other/
  
   1. Is this always the case?
  
   2. Where would the path be likely to be on RedHat 7.2 with MySQL rpms?
  
   TIA
  
   
   Michael Hall [EMAIL PROTECTED]
   
  
  
   --
   PHP General Mailing List (http://www.php.net/)
   To unsubscribe, visit: http://www.php.net/unsub.php
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php
 
 
 
 

-- 

n   i   n   t   i  .   c   o   m
php-python-perl-mysql-postgresql

Michael Hall [EMAIL PROTECTED]



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




Re: [PHP] Removing ^M

2002-06-09 Thread Michael Hall


As a result of my original request, I now have half a dozen ways of doing
this using php, perl, python and tr :)

I guess this is sort of on topic because there may be PHP
programmers who want to do this without writing a PHP script that
probably has to be run by a web server.

Anyway, someone on the Python list suggested this variety of tr:

tr -d '\015' infile outfile

I haven't tested this. 015 is the numeric code for \r.

Mick


On Sat, 8 Jun 2002, Steve Buehler wrote:

 I get this when running that command:
 tr: only one string may be given when deleting without squeezing repeats
 
 
 I looked at the tr man pages and it didn't help much.  I also tried using 
 '\r' and `\r` and just \r , but always get the same result.
 
 Steve
 
 At 11:07 PM 6/8/2002 +0200, you wrote:
 why not just run
  tr -d \r htmlfile.htm
 
 
 - Original Message -
 From: Michael Hall [EMAIL PROTECTED]
 To: PHP List [EMAIL PROTECTED]
 Sent: Sunday, June 09, 2002 2:40 AM
 Subject: [PHP] Removing ^M
 
 
  
  
   I am trying remove ^M characters (some kind of newline character) from an
   HTML file. I've tried all sorts of ereg_replace and sed possibilities
   but the
   things just won't go away. Does anyone have a way of removing such
   characters?
  
   TIA
  
   Mick
  
  
  
  
   --
   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
 
 
 --
 This message has been scanned for viruses and
 dangerous content by MailScanner, and is
 believed to be clean.
 ow3
 
 
 
 

-- 

n   i   n   t   i  .   c   o   m
php-python-perl-mysql-postgresql

Michael Hall [EMAIL PROTECTED]



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




[PHP] Removing ^M

2002-06-08 Thread Michael Hall



I am trying remove ^M characters (some kind of newline character) from an
HTML file. I've tried all sorts of ereg_replace and sed possibilities
but the
things just won't go away. Does anyone have a way of removing such
characters?

TIA 

Mick




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




Re: [PHP] MySQL - Creating The Database

2002-06-04 Thread Michael Hall


If your site is hosted in a *nix machine with shell access, another option
might be to create a database and write up the SQL you need to structure
it in a text file, then just feed it straight into MySQL like this:

mysqladmin -uusername -ppassword create yourdatabase
mysql -uusername -ppassword yourdatabase  yoursqlfile

Provided you have the access and permissions, it's that simple.

Michael

On Tue, 4 Jun 2002, Jason Wong wrote:

 On Tuesday 04 June 2002 19:03, Jason Teagle wrote:
 
   Ummm, not sure exactly what you're asking but you can use mysql_query to
   issue the relevant sql commands to create your database and tables and
 
  Am I correct in saying that none of the SQL functions in PHP can actually
  create a database file when no file existed before? In other words, an
  empty database file must exist before SQL functions can be called on it?
 
 As the guy said, use mysql_query() to issue the sql commands to create the 
 database:
 
  CREATE DATABASE my_database;
 
  This is the problem - how _do_ you create it? What does your install script
  do? Copy a blank template of a DB from a file in your installation package,
  or literally create a new file? I have no existing databases to work
  with... (what's the file extension for a MySQL-type database anyway [i.e.,
  MS Access = .MDB, MySQL = ?] ?)
 
 The problem is that you haven't read the (mysql) manual. Either read the 
 manual or search out (and read) the numerous tutorials that are available.
 
 

-- 

n   i   n   t   i  .   c   o   m
php-python-perl-mysql-postgresql

Michael Hall [EMAIL PROTECTED]



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




Re: [PHP] process php script at regular intervals

2002-06-03 Thread Michael Hall


One way of doing this is to set up a cronjob that has Lynx call the
script.

There is a flag that is usually added as well ... I'm not sure right now
but it could be '-dump':

lynx -dump http://your/script/url.php

This has been covered a few times in the archive if you want to check the
details there.

This assumes that you are on a Linux/UNIX server, and that PHP is an
Apache module, not a standalone CGI installation (where you could call
the script directly without using Lynx).

Michael Hall

On Mon, 3 Jun 2002, daniel cozzolino wrote:

 I want to have a php script processed on a daily (eg 9am) interval.  is
 there some way to automate this from within the script or do i need to
 schedule this with an external app?
 
 has anyone had any experience with this previously?
 
 thanks
 Daniel
 
 
 
 

-- 

n   i   n   t   i  .   c   o   m
php-python-perl-mysql-postgresql

Michael Hall [EMAIL PROTECTED]



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




Re: [PHP] Alguine me puede Ayudar...S.O.S...mi PHP no sube .....

2002-06-02 Thread Michael Hall


Hola:

Tienes la misma version de PHP en el servidor Win98?

Sabes que hay diferencias importantes en versiones de PHP mas de 4.1.0
(creo ... seguramente, mas de 4.2.0)? Estas diferencias tienen que ver con 
'arrays' superglobales y 'register globals' etc.

Puede ser que una programa PHP que se escribio con version 4.0.1 por
ejemplo no funcionara con version 4.2.1 sin cambios al codigo o al
servidor.

Miguel 


On Sun, 2 Jun 2002 [EMAIL PROTECTED] wrote:

 Hola
  Resulta que tengo problemas para que funcione PHP en un
 servidor NT 4.0 con IIS 3.0 y este no funciona PHP ver. 4.2.1) ya que al
 hacer alguno de los ejemplos que adjunte (codigos) ninguno funciona.
 Hicela prueba con Apache/Win98/PHP y ahí me funciono.
 No entinedo que es lo que pasa?; ademas segui instruciones de
 la pagina Web http://www.php.net/manual/fi/configuration.php y aun asi no
 Funciono.
   Si alguien me puede Ayudar se lo agradecería, ya que esto me tiene
 muy complicado.
 
 Saludos.
 Oscar Mora
 
 PD: Con este codigo, hago test con una pagina llamada prueba.php y me di
 cuenta de que en NT no funcionó, pero si en W98.
 
 ?php $myvar = Hola. Este es mi primer script en PHP \n;
 //es mi primer script en PHP \n;
 echo $myvar; ?
 BR
 trtdForma 1/a/td
 ? echo Hola, este es un mensaje de Prueba con PHP; ?
 BR
 trtdForma 2/a/td
 ?php echo Hola, este es un mensaje de Prueba con PHP;?
 BR
 trtdForma 3/a/td
 script language=php echo Hola, este es un mensaje de
 Prueba
 con PHP; /script
 BR
 trtdForma4/a/td
 % echo Hola, este es un mensaje de Prueba con PHP; %
 BRBR
 ? php phpinfo() ?
 
 
 

-- 

n   i   n   t   i  .   c   o   m
php-python-perl-mysql-postgresql

Michael Hall [EMAIL PROTECTED]



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




[PHP] Post 4.1.0 PHP

2002-05-30 Thread Michael Hall


I've been using PHP 4.0.1 for ages now, and have decided to upgrade one of
my machines to 4.2.1 and get used to working under the new security
arrangements.

I understand that older scripts are fully compatible with 4.1.0+, or can
be made
so with minimal fuss. I am assuming that scripts written using the new
$_GET and $_POST (etc) arrays simply won't run under pre-4.1.0 versions of
PHP. 

So, where does this leave us with regard to ISPs that still run older
versions of PHP (so that users' scripts won't break)? Is there some way to
write code using the new arrays, but that will run under older versions of
PHP. Would including something like this at the top of a script work:

$_POST = $HTTP_POST_VARS;

while inside the code reference is made only to $_POST ? 

Sorry if this has been covered repeatedly, I've only just rejoined the
list after a break from the relentless volume (of great, useful info).

TIA

Michael Hall [EMAIL PROTECTED]



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




Re: [PHP] HTML Checkboxes and PHP variables

2002-05-29 Thread Michael Hall


I've been wrestling with the same issue. I had some code loop through and
create an arbitrary number of checkbox inputs with the name 'foo[]'

I then attempted to access the array using:

foreach ($foo as $bar)
{
echo $bar;
}

but I got error messages telling me that $foo is not an array :-(

I'm using Netscape 4.7 something on Red Hat 6.2 ... could this be an
issue? I know Netscape can be pretty buggy and fussy at the best of times.

Michael


On Wed, 29 May 2002, 1LT John W. Holmes wrote:

 If you name the form elements as arrays, then yeah, they are pretty much the
 same.
 
 input type=checkbox name=foo[] value=oneOne
 input type=checkbox name=foo[] value=twoTwo
 input type=checkbox name=foo[] value=threeThree
 
 When submitted, $foo will be an array containing the values that were
 checked. If a box was not checked, it won't have any value in the array.
 
 i.e. If you check One and Three, then you'll have a $foo array like this:
 
 $foo[0]='one';
 $foo[1]='three';
 
 ---John Holmes...
 
 - Original Message -
 From: Brad Harriger [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Wednesday, May 29, 2002 8:56 AM
 Subject: [PHP] HTML Checkboxes and PHP variables
 
 
  Are HTML Checkbox values handled the same way as Select Multiple tags?
 
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php
 
 
 
 

-- 

n   i   n   t   i  .   c   o   m
php-python-perl-mysql-postgresql

Michael Hall [EMAIL PROTECTED]



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




[PHP] arrays

2002-05-26 Thread Michael Hall


A couple of simple ones here ... the usual references don't appear to give
a straightforward answer on these:

Can arrays be passed to functions just like a simple variable?

Can arrays be passed as values in hidden form fields just like a
simple variable?

I've been playing around with these and getting inconsistent results.
I've been trying things like serialize and urlencode, but still haven't
worked out a straightforward 'rule' or policy.

Can someone throw some light on this? 

TIA
Michael


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




Re: [PHP] Uploaded Image display problems

2001-12-07 Thread Michael Hall


I can't help you with the problem described below, but I can tell you
this:

I, like many others, do not store images as BLOBs in a database. I store
them in a regular directory (/images), and just store the image name, path
or URL in the database. This generally creates less hassles.

Mick

On Fri, 7 Dec 2001, phantom wrote:

 With thanks to you who have helped me, I have constructed a PHP script
 that allows the client to upload an image (jpg or gif) that is stored in
 a MySQL Blob field.
 
 And I have a PHP script that will pull the binary data out of the MySQL
 database and display the upload image for the client.
 
 THE PROBLEM: HALF MY GIF AND JPG FILES DO NOT DISPLAY PROPERLY WHEN
 VIEWING THE DISPLAY.PHP SCRIPT (see below).  Half display fine, half do
 not.
 
 Has anyone else had this problem or know what I can do to remedy it?
 Thank you.
 
 Source code below * form.htm, insert.php, display.php *
 
  FORM HTM =
 
 HTML
 HEAD
 TITLEInsert Binary Data in a Database/TITLE
 /HEAD
 
 BODY
 H1Upload a File:/H1
 
 FORM enctype=multipart/form-data method=post action=insert.php
 input type=hidden name=MAX_FILE_SIZE value=20
 INPUT type=file name=img1 size=30
 brbr
 INPUT type=submit name=submit value=Use This File
 
 /FORM
 /BODY
 /HTML
 
  INSERT PHP =
 
 ?
 if (!isset($img1)) {
  header(Location: insert_file.htm?Msg=EmptyUpload);
  exit();
 }
 
 $db = mysql_connect(localhost, $DB_Username, $DB_pass)
  or die (Unable to connect to server.);
 mysql_select_db($DB_name)
  or die (Unable to select DB);
 
 $binary_junk  = mysql_escape_string(fread(fopen($img1, r),
 filesize($img1)));
 // original file used addslashes but here I used mysql_escape_string;
 
 $insert_data = INSERT INTO ImageTable (ImgName,ImgSize,ImgType,ImgData)
 VALUES ('$img1_name', '$img1_size', '$img1_type', '$binary_junk');
 
 mysql_query($insert_data)
  or die (Unable to insert data: .mysql_error());
 
 $PKey = mysql_insert_id();
 
 ?
 
 HTML
 HEAD
 TITLESuccessful File Insertion!/TITLE
 
 H1Success!/H1
 
 PYou have inserted the following into your database:br
   ? echo $img1_name;?
   a
   ? echo $img1_size;?
   byte file with a mime type of
   ?
   echo $img1_type; ?./P
 View Your Image a href=display.php?PKey=?=$PKey?HERE/a
 /BODY
 /HTML
 
  DISPLAY PHP =
 
 ?
 $db = mysql_connect(localhost, $DB_Username, $DB_pass)
  or die (Unable to connect to server.);
 mysql_select_db($DB_name)
  or die (Unable to select DB);
 
 $get_image = SELECT ImgType, ImgData FROM ImageTable WHERE PKey=$PKey;
 
 $get_image_result = mysql_query($get_image)
  or die (Unable to get image.);
 
 $binary_junk = mysql_result($get_image_result,0,ImgData);
 $file_type = mysql_result($get_image_result,0,ImgType);
 
 header(Content-Type: $file_type);
 header(Content-Length:  . strlen($binary_junk));
 echo $binary_junk;
 
 ?
 
 
 

-- 

Michael Hall
[EMAIL PROTECTED]
[EMAIL PROTECTED]
http://openlearningcommunity.org



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




Re: [PHP] Re: session_id()

2001-12-07 Thread Michael Hall



That NN value looks like a UNIX timestamp.

Mick

On Fri, 7 Dec 2001, Yasuo Ohgaki wrote:

  This is a simple autentification script using session
  I try to echo the session_id().
  But to my surprise, the value of session_id() is different - in
  configuration -
  if I use difference browser.
  
  IE :
  9ff68d81039d9ece3ba9840328b91488
  
  Opera :
  7aa4895172b5a4785c9fb754eaf792aa
  
  NN :
  1007630964
 
 

-- 

Michael Hall
[EMAIL PROTECTED]
[EMAIL PROTECTED]
http://openlearningcommunity.org



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




Re: [PHP] Getting started - what do I need?

2001-12-07 Thread Michael Hall


Yes indeed, PHP and MySQL are free ... welcome to the world of open source
software!

What type of computer operating system are you using? Does it have a web
server? You may want to consider downloading Apache as well (also
free).

There are lots of helpful tutorials on the net that can get you going if
you don't want to buy a book right away.

Mick

On Fri, 7 Dec 2001, Indera wrote:

 Hello,
 
 I have never used php or mysql before and want to know what tools I should use so 
that I can start
 learning php and mysql. I would like to build basic things like a login page and 
forms that append
 the data to a database. I went to the bookstore and think the book PHP fast and easy 
web development
 is something that I could handle. I've read through some of the posts on this news 
group and
 realized that there are tools that I can use as front ends for these packages. I 
went to mysql.com
 and php.net and it seems that i can download both of these packages to my computer 
for free. Any
 help would be greatly appreciated.
 
 Thanks
 Indera
 
 
 
 

-- 

Michael Hall
[EMAIL PROTECTED]
[EMAIL PROTECTED]
http://openlearningcommunity.org



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




Re: [PHP] Dynamically created dropdowns

2001-12-04 Thread Michael Hall


You can certainly do what you want in straight PHP if you include a form
submission after selecting the manufacturer. There is probably a way of
doing it in JavaScript without a form submission, but not one that will
read data from a MySQL database on a remote machine. JavaScript can't do
that.

Michael

On Tue, 4 Dec 2001, Michael Egan wrote:

 Hope this isn't an inappropriate message to send to this list. I suspect
 the response will largely concern JavaScript.
 
 Is there a way of altering the contents of one drop down menu according
 to the item selected in another? 
 
 I'm creating a page allowing users to identify the make and model of
 computers received by our charity for refurbishment. Ideally I'd like to
 allow them to select a manufacturer from a drop down menu and for a
 separate drop down menu to then be populated by the models produced by
 that manufacturer. 
 
 I have two separate tables in a MySQL database, one for manufacturers
 and one for models with the latter containing a field for the
 manufacturer ID.
 
 Is this possible?
 
 Michael Egan
 
 

-- 

Michael Hall
[EMAIL PROTECTED]
[EMAIL PROTECTED]
http://openlearningcommunity.org



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




Re: [PHP] php vbulletin and postgres

2001-12-04 Thread Michael Hall


Well, they're both use SQL ...

Problems? It's all relative, isn't it? You would have to change code
relating to db connections and queries, etc, but not program logic, so it
all depends how much code changing you have to do to get it working. That
would depend on how the program was written in the first place.

Michael


On Tue, 4 Dec 2001, shaun murphy wrote:

 hey,
 
 me again. I am going to set up a vbulletin site and I understand it uses php
 along with mysql. I can get php and postgres hosting so I was wondering what
 the differences are in postgres as opposed to mysql.
 
 are they different enough to cause any problems?
 
 
 
 

-- 

Michael Hall
[EMAIL PROTECTED]
[EMAIL PROTECTED]
http://openlearningcommunity.org



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




Re: [PHP] Query Help Needed

2001-11-29 Thread Michael Hall


Do those field names need single quotes too? Can't remember right now ...
Are there any datatype problems (wrong kind of datatype for a field)?
What about a semi-colon at the end?

Mick

On Thu, 29 Nov 2001, Payzillee wrote:

 Hi, could anyone tell me what is wrong with this Insert query?   I get an
 'Invalid query' error but I can't see the problem at all.  All the fields
 match exactly what is in my database, it's all in lowercase too.
 
 Cheers.
 
 mysql_query (INSERT INTO listserve (title, surname, forename, job_title,
 org_name, address1, address2, address3, address4, city, region, postal_code,
 country, email, mob_phone, tel_number, fax_number, org_web_address,
 personal_web_address, special_interests, date, time)
 
 VALUES ('$title', '$surname', '$forename', '$job_title', '$org_name',
 '$address1', '$address2', '$address3', '$address4', '$city', '$region',
 '$postal_code', '$country', '$email', '$mob_phone', '$tel_number',
 '$fax_number', '$org_web_address', '$personal_web_address',
 '$special_interests', '$date','$time'))
 
 
 
 
 
 

-- 

Michael Hall
[EMAIL PROTECTED]
[EMAIL PROTECTED]
http://openlearningcommunity.org



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




[PHP] database question

2001-11-29 Thread Michael Hall


How can I search a MySQL database field that contains sentences (VARCHAR
datatype) or entire texts (TEXT datatype) for single words?

Let's say I want to search 100 articles stored in a database field as TEXT
for the word bingo, is there any SQL or PHP way of doing that?

Mick

-- 

Michael Hall
[EMAIL PROTECTED]
[EMAIL PROTECTED]
http://openlearningcommunity.org



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




[PHP] color problems when resizing image with GD

2001-11-29 Thread Michael Hall

We run on a Windows platform.  If a client uploads an image to my script
that is too wide, I want to use GD to resize the image down to the proper
dimensions.

The problem I'm having is that the resized image drops huge chunks of the
color pallette, creating what is basically a monochromatic image.

Is there any way around this?  Am I doing something wrong?  I'm not very
familiar at all with the graphics part of things, so I'm hoping there's
something glarinly obvious that I'm missing.

The code follows.

$src_img =
ImageCreateFromJpeg(../images/property/property_.$id.tmp.jpg);

#[...]

$dst_img = ImageCreate ($new_w,$new_h);


ImageCopyResampled($dst_img,$src_img,0,0,0,0,$new_w,$new_h,ImageSX($src_img)
,ImageSY($src_img));

ImageJpeg($dst_img,../images/property/property_.$id..jpeg);



Michael Hall
Web Development Manager / Sr. Programmer
Prairie Fire Internet Technologies
[EMAIL PROTECTED]
605.357.9700 ext. 14


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




Re: [PHP] Apache 2.0.28 and PHP 4.0.6

2001-11-27 Thread Michael Hall



I haven't read the original message, so this is only a guess.

--with-apxs2

Mick


On Wed, 28 Nov 2001, Larz wrote:

 Is it possible to compile and make it work under linux
 without any changes?
 I mean is there a --with-apache2 or something?
 
 
 --
 -
 Lars
 When mailing me, remember there is no truth in my mail!
 
 
 
 

-- 

Michael Hall
[EMAIL PROTECTED]
[EMAIL PROTECTED]
http://openlearningcommunity.org



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




Re: [PHP] Infomation wanted

2001-11-26 Thread Michael Hall


If you want to stop people logging on more than every, say, 24 hours, you
could record the most recent log-on time in a database and then check that
24hrs has passed before another log-on is allowed.

I don't know where you can find a script that does this exactly, but it
wouldn't be hard to hack one up.

Michael

On Mon, 26 Nov 2001, De Necker Henri wrote:

 I want to know where can i find a script that will allow a user to login
 every certain time period! 
 I just cant get it right!
 
 

-- 

Michael Hall
[EMAIL PROTECTED]
[EMAIL PROTECTED]
http://openlearningcommuntiy.org



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




[PHP] Frames and Sessions

2001-11-13 Thread Michael Hall

Hi All

I have a client who has presented me with a near finished website that uses
frames. She would like me to build a simple PHP cart into it. I've built simple
carts before without drama, but this one has me baffled. I have avoided using
frames in almost everything I've done to date and don't understand them that
well. I can't figure out how I'm going to maintain a session across the three
seperate HTML files in the frameset. 

Is there a way of doing this, or do I need to pull it all apart and have all
the parts just included into one PHP-generated HTML file?

I have tried starting a session in the main frameset file, then adding ?=SID?
to the URLs of the frame files, which sort of works but breaks where JavaScript
is used for buttons in one of the frames. JavaScript doesn't seem to cope with
the PHP tags.

Thanks
Michael



-- 
##
Michael Hall
Web: http://openlearningcommunity.org
Mail1: [EMAIL PROTECTED]
Mail2: [EMAIL PROTECTED]
Ph/Fax: (+61 8) 8953 1442
##

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




[PHP] A way to simulate modem speeds?

2001-10-31 Thread Michael Hall

I apologize for the only-vaguely-PHP-related nature of this, but I'm
endlessly impressed with the knowledge here.

I'm looking for a way to clamp down a network machine (we're on a T1) to
modem speeds (28 to 52 K) for testing purposes.

Is there software (preferably for Windows) that would do this?  Better yet,
would this software be free?

I don't want much, do I?

Thanks.


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




[PHP] bizarre problems with php_gd.dll and IIS

2001-08-14 Thread Michael Hall

I am running sites that use both PHP4 and ASP.

Both types of sites are running on IIS4.

I've just recently started using the php_gd.dll to resize images in PHP.  It
appears to run fine, until the gd library generates any sort of error.

As soon as that happens, all ASP pages on the entire server become
inaccessible.  HTML and PHP pages are still fine, as is everything else, but
ASP just hangs.  The only fix I've found is a complete reboot of the system.

Needless to say, I am finding this incredibly frustrating.  Has anyone seen
similar behavior to this before, and does anyone have a solution.

Thanks.

Michael Hall
Lead Web Developer / Database Engineer
Prairie Fire Internet Technologies
[EMAIL PROTECTED]


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




Re: [PHP] How to ?

2001-08-05 Thread Michael Hall

Alawi:

Generally speaking, this is a friendly list and people like to help if they can.
But it is not clear what you are asking for.  
You need to give more detail or ask your question in another way. 
Is this a PHP question?

Mick


On Sun, 05 Aug 2001, Alawi Albaity wrote:
 how can i to make my page as a browser for another
 pages 
 
 i mean i want as a proxy 
 
 how can i do that ?
 
 
 __
 Do You Yahoo!?
 Make international calls for as low as $.04/minute with Yahoo! Messenger
 http://phonecard.yahoo.com/
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]

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




Re: [PHP] spell checker

2001-08-05 Thread Michael Hall

Justin:

IMHO it would be very difficult to build/use a reliable
spell checker that worked automatically. Natural languages are just too complex
and ambiguous. Look at how often something like Word or Star Office gets things
wrong. 'Hare' is not spelled wrong unless you meant to write 'hair', for
example. And spell checkers can't deal with scrambled syntax, etc.

Go for a human editor if you want something approaching 100% reliability.

Mick


On Mon, 06 Aug 2001, Justin French wrote:
 Hi,
 
 I know this is a biggie, but has anyone attempted to write a 
 spell check (preferably english) in PHP?
 
 I'd LOVE something that can spell-check user-submitted text 
 somehow, becuase I'm writing a fully dynamic news-based site, 
 and the only downfall to the site could be bad content, since 
 it's being supplied by writers world-wide, submitted dynamically.
 
 My other option is to have an editor approve each article 
 before publishing, but I thought i'd at least ASK if nyone's 
 attempted it.
 
 Justin French
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]
-- 
Michael Hall
mulga.com.au
[EMAIL PROTECTED]
ph/fax (+61 8) 8953 1442
ABN 94 885 174 814

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




Re: [PHP] Form call a function on submit

2001-08-05 Thread Michael Hall

AFAIK the function would always need to exist inside a php file.
That file doesn't necessarily need to be a `page' (ie. print any HTML).
Just make the ACTION of the form point to the file with your function in it (or
a call to the function).

Mick


On Mon, 06 Aug 2001, Richard Kurth wrote:
 Is it possible to have a form submit button call a function. Like for
 updating a record in a database or for deleting data. Rather than a
 new page or with PHP_SELF
 
 
 
 
 
 
 
 
 
 
 
 Best regards,
  Richard  
 mailto:[EMAIL PROTECTED]
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]
-- 
Michael Hall
mulga.com.au
[EMAIL PROTECTED]
ph/fax (+61 8) 8953 1442
ABN 94 885 174 814

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




Re: [PHP] php date

2001-07-28 Thread Michael Hall

Do you mean something like:

$date = date(Y-m-d);
echo $date;

Mick


On Sat, 28 Jul 2001, colin wrote:
 can anyone give me a work around for a PHP date function when used in
 conjunction with a PHP include.
 The code inside the include is printed but I do not know how to echo the
 date as the document has already been parsed once.
 Any help would be appreciated. Please reply to [EMAIL PROTECTED]
 many thanks
 Colin
 
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]
-- 
Michael Hall
mulga.com.au
[EMAIL PROTECTED]
ph/fax (+61 8) 8953 1442
ABN 94 885 174 814

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




Re: [PHP] mkdir

2001-07-28 Thread Michael Hall

This type of problem usually turns out to be a permissions issue.
Can Apache/nobody write to the parent directory?

Mick

On Sat, 28 Jul 2001, Jerry Lake wrote:
 when using mkdir
 I cant seem to make subdirectories
 ?
 $oldumask = umask(0); 
 mkdir('test/test', 0777);
 umask($oldumask);
 ?
 
 is there any way to do this ?
 
 Jerry Lake 
 Interface Engineering Technician
 Europa Communications - http://www.europa.com
 Pacifier Online   - http://www.pacifier.com
 
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]
-- 
Michael Hall
mulga.com.au
[EMAIL PROTECTED]
ph/fax (+61 8) 8953 1442
ABN 94 885 174 814

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




RE: [PHP] Stripping single quotes

2001-07-28 Thread Michael Hall

I'd have a look at those double equals signs ... I think they should be single:

$fldemail = stripslashes($fldemail);
$fldemail = ereg_replace(',,$fldemail);

Mick

On Sat, 28 Jul 2001, Matt Stone wrote:
 Darn, it still 'aint working. Ok, let's say $fldemail contains
 o\'[EMAIL PROTECTED]
 I then run these:
 $fldemail == stripslashes($fldemail);
 $fldemail == ereg_replace(',,$fldemail);
 And I get o\'[EMAIL PROTECTED] ... damn.
 
 Any ideas? Thanks,
 
 Matt Stone
 
 -Original Message-
 From: Chris Fry [mailto:[EMAIL PROTECTED]]
 Sent: Saturday, 28 July 2001 2:15 PM
 To: Matt Stone
 Cc: PHP list
 Subject: Re: [PHP] Stripping single quotes
 
 
 Matt,
 
 Try ereg_replace:-
 
 $fldemail == ereg_replace(',,$fldemail);
 
 Chris
 
 
 Matt Stone wrote:
 
  Hi all,
  I am trying to validate some email addresses before they are entered into
  the database.
  The problem is, some thick or malicious people are entering single quotes
  into their email addresses.
  I need to strip out all these single quotes but a little ole' str_replace
  doesn't seem to be working.
  Here it is:
 
  $fldemail == str_replace(',,$fldemail);
 
  Nice and basic :)
  Can anyone please enlighten me on this?
  Thanks in advance,
 
  Matt Stone
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  To contact the list administrators, e-mail: [EMAIL PROTECTED]
 
 --
 
 Chris Fry
 Quillsoft Pty Ltd
 Specialists in Secure Internet Services and E-Commerce Solutions
 10 Gray Street
 Kogarah
 NSW  2217
 Australia
 
 Phone: +61 2 9553 1691
 Fax: +61 2 9553 1692
 Mobile: 0419 414 323
 eMail: [EMAIL PROTECTED]
 http://www.quillsoft.com.au
 
 You can download our Public CA Certificate from:-
 https://ca.secureanywhere.com/htdocs/cacert.crt
 
 **
 
 This information contains confidential information intended only for
 the use of the authorised recipient.  If you are not an authorised
 recipient of this e-mail, please contact Quillsoft Pty Ltd by return
 e-mail.
 In this case, you should not read, print, re-transmit, store or act
 in reliance on this e-mail or any attachments, and should destroy all
 copies of them.
 This e-mail and any attachments may also contain copyright material
 belonging to Quillsoft Pty Ltd.
 The views expressed in this e-mail or attachments are the views of
 the author and not the views of Quillsoft Pty Ltd.
 You should only deal with the material contained in this e-mail if
 you are authorised to do so.
 
 This notice should not be removed.
 
 
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]
 
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]
-- 
Michael Hall
mulga.com.au
[EMAIL PROTECTED]
ph/fax (+61 8) 8953 1442
ABN 94 885 174 814

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




Re: [PHP] Install problems

2001-07-19 Thread Michael Hall


I think that --config-file-path needs to be the path to apache, not php.

--config-file-path=/usr/local/apache

Check in the README.configure file in the Apache source directory.

Mick

On Thu, 19 Jul 2001, Chetan Ganpati wrote:
 Hello,
 
 I am trying to install PHP4 on a redhat 6.2 box.
 I have got mysql-3.23-39 and apache-1.3.14-2.6.2
 installed.
 I did a 
 ./configure --prefix=/usr/local/php
 ---with-config-file-path=/usr/loca/php
 --with-apxs=/usr/sbin/apxs
 --with-mysql=/usr/local/mysql  --enable-track-vars
 --enable-magic-quotes --enable-debugger
 
 and then a make and make install
 
 when i try to restart apache i get this error:-
 Starting httpd: Syntax error on line 873 of
 /etc/httpd/conf/httpd.conf:
 Cannot load /etc/httpd/modules/libphp4.so into server:
 /etc/httpd/modules/libphp
 4.so: undefined symbol: uncompress
 
 line 873 is this
 LoadModule php4_modulemodules/libphp4.so and
 the next is
 AddModule mod_php4.c
 
 Would be grateful if someone could help me
 Thanks 
 Chetan
 
 
 
 __
 Do You Yahoo!?
 Get personalized email addresses from Yahoo! Mail
 http://personal.mail.yahoo.com/
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]
-- 
Michael Hall
mulga.com.au
[EMAIL PROTECTED]
ph/fax (+61 8) 8953 1442
ABN 94 885 174 814

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




Re: [PHP] Sessions and linking

2001-07-19 Thread Michael Hall


Try using theinbox.php??=SID?

Adding ?=SID? to all your URLs will maintain session data if cookies are
turned off. The session ID  (a random 32 character
string) is available in $PHPSESSID, so if you really wanted to you could do:

theinbox.php?PHPSESSID=$PHPSESSID

but ?=SID? is easier.

Mick

On Fri, 20 Jul 2001, Jome wrote:
 I'm programming an easy webmail and I've tried to use sessions. It works perfectly 
with cookies activated in the browser but I want it to be able for people which 
doesn't like cookies. 
 
 If I've understood this correctly I should be able to fetch the sessiondata if I 
link something like theinbox.php?PHPSESSID=thesessionid - it won't work tho. I use 
session_start() in theinbox.php
 
 Anyone who has any idea about what I'm doing wrong? Should I define the session id 
for session_start or something?
 
 Best regards,
 
 Jome
 
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]
-- 
Michael Hall
mulga.com.au
[EMAIL PROTECTED]
ph/fax (+61 8) 8953 1442
ABN 94 885 174 814

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




Re: [PHP] note to PHP developers

2001-07-17 Thread Michael Hall


Me too. I've never had a problem with Postfix. It just dropped in in Sendmail's
place and has worked wonderfully ever since. Great piece of software.

Mick

On Wed, 18 Jul 2001, Christopher Allen wrote:
 Also, postfix works fine for me...
 
 
  On a side note, qmail has a wrapper that pretends to be sendmail. You can
  overwrite the /bin/mail with it and it will behave and accept mail just
 like
  sendmail, but send it through qmail-smtp.
 
   - changed php.ini path - qmail path
 
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]


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




Re: [PHP] passing variables from forms to the same page repetatively

2001-07-17 Thread Michael Hall

What about registering some session variables? Sessions use cookies and/or URLs
to propagate info across multiple pages. Not really secure, though, but they
are easy to use.

Mick


On Wed, 18 Jul 2001, Tim Olsen wrote:
 Yeah, I had thought about using hidden inputs, but hidden inputs are not 
 really hidden. They still exist on the HTML page, and although not visible 
 in the browser, are visible in the code. This may not be cool if you have 
 sensitive information that is passed, also if you have a lot of variables to 
 pass, thats just a lot of hidden inputs to pass.
 Is there no other way to accomplish this? No built in function? I guess it 
 makes sense that there is not, b/c the form submits the form and only the 
 form variables. Thanks.
 -Tim
 
 
 Original Message Follows
 From: David Robley [EMAIL PROTECTED]
 Reply-To: [EMAIL PROTECTED]
 To: Tim Olsen [EMAIL PROTECTED], [EMAIL PROTECTED]
 Subject: Re: [PHP] passing variables from forms to the same page 
 repetatively
 Date: Tue, 17 Jul 2001 16:13:41 +0930
 
 On Tue, 17 Jul 2001 15:41, Tim Olsen wrote:
   People,
   I have 4 forms in four seperate html pages included directly (no links
   to includes) in the same .php file, i have it so all the form actions
   is php.self, so when each form is submitted it goes on to display the
   next form in line, using if and else statements, of course. I want to
   be able to use variables created by the first form in the html part of
   the last form. What is the best way to do this?
  
   So far, I can only use variables on the next page (form) that is
   written out. After that those variables have no value.  Is there some
   way to submit all variables present and assigned with the submission of
   each form?  If I make the forms a seperate include file, instead of
   having them in-line, how does this change the ways variables are passed
   or submitted by each form? Thanks, - Tim
   _
 
 
 If I understand what you are saying: those variables don't exist until
 you SUBMIT the form. You can demonstrate this by looping through and
 displaying your POST or GET vars at the beginning of the form and see
 what happens when you first open the page, and when it calls itself.
 
 And re-reading, I think what you may want is hidden fields. You want part
 one to call part 2, and retain values from part 1, etc? Echo the values
 into hidden fields in each step of the process.
 
 INPUT TYPE=hidden NAME=whatever VALUE=?php echo $whatever ?
 
 --
 David Robley  Techno-JoaT, Web Maintainer, Mail List Admin, etc
 CENTRE FOR INJURY STUDIES  Flinders University, SOUTH AUSTRALIA
 
 I always lie. In fact, I'm lying to you right now!
 
 _
 Get your FREE download of MSN Explorer at http://explorer.msn.com
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]
-- 
Michael Hall
mulga.com.au
[EMAIL PROTECTED]
ph/fax (+61 8) 8953 1442
ABN 94 885 174 814

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




RE: [PHP] note to PHP developers

2001-07-17 Thread Michael Hall

No, they're two seperate things. In addition to being incredibly easy to
install and configure, Postfix can be made fairly secure and it has a better
(=more 'open') license of some kind. 

Mick

On Wed, 18 Jul 2001, Jason Murray wrote:
  Me too. I've never had a problem with Postfix. It just 
  dropped in in Sendmail's place and has worked wonderfully 
  ever since. Great piece of software.
 
 I was led to believe Postfix is what Qmail evolved into?
 
 Jason
 (running Postfix from day 1, no problems at all with it...)
 
 -- 
 Jason Murray
 [EMAIL PROTECTED]
 Web Developer, Melbourne IT
 Work now, freak later!
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]
-- 
Michael Hall
mulga.com.au
[EMAIL PROTECTED]
ph/fax (+61 8) 8953 1442
ABN 94 885 174 814

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




[PHP] Getting extensions to load in Win32

2001-07-09 Thread Michael Hall

I am having a devil of a time getting any extensions to load on my Windows
machines.

I have the php.ini set up as follows:

[...]
extension_dir = C:\PHP\extensions
[...]
;extension=php_fdf.dll
extension=php_gd.dll

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.

Any suggestions?

Thanks.


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




Re: [PHP] Running PHP as a cron job....

2001-07-08 Thread Michael Hall


This looks like a good place for me to step in and maybe clear up
something I've been wondering about ...

With all the advice that has been offered so far, has it been assumed that
php is installed in the CGI rather than DSO manner? Can PHP as a DSO
interpret shell script-like files with a shebang at the top?

Alternatively, I've read somewhere about using lynx to run a .php cron
job. Does this apply to DSO setups? For example, would James put something
like this in his crontab:

*   *   *   *  lynx mail.php


TIA
Mick


On Mon, 9 Jul 2001, Chris Fry wrote:

 Check the path to your php cgi executable - which php - you'll probably find that
 it's #!/usr/local/bin/php
 
 This is what the no such file or directory is referring to.
 
 Chris
 
 Don Read wrote:
 
  On 08-Jul-01 James, Yz wrote:
   Hi Ben,
  
   When running it as a normal PHP file, I get the cron daemon emailing me
   stuff like:
  
   automation/mail.php: ?: No such file or directory
   automation/mail.php: =: command not found
   automation/mail.php: =: command not found
   automation/mail.php: line 7: syntax error near unexpected token
   `mail(emailaddress@takenout,'
   automation/mail.php: line 7: `mail(emailaddress@takenout, mail test,
   $mailcontent, $sender);'
  
  
 
  try a wrapper
 
   When running it with the Perl style line at the top (as you suggested) I
   get, no such file or directory.
  
   The script is Chmodded to 755 in both cases.  And I saved it as a .php and
   .cgi file (with the root to bin/php in it).  God knows what I'm doing wrong
   ;)
  
   James.
  
   How are you executing the script?  Does it come by and run 'php
   yourscript.php' or does the script have a shebang ('#!/usr/bin/php') in
   it?  I've found that works well... just put that as the first line, and
   it behaves as a shell script (after you make it executable, of course)
  
   Ben
  
   -Original Message-
   From: James, Yz [mailto:[EMAIL PROTECTED]]
   Sent: Sunday, July 08, 2001 3:39 PM
   To: [EMAIL PROTECTED]
   Subject: [PHP] Running PHP as a cron job
  
   Hi all,
  
   This is probably going to sound incoherant, but
  
   Do I have to do anything (other than change the permissions of a php
   file)
   to get it to run as part of a cron job?  I created an extremely simple
   file
   that should just send a blank email to me (using mail()).  I got an
   email
   from the cron daemon saying, bad token, or something like that, yet
   when
   executed through a browser, the script behaves as it should.
  
   Do I have to write the php scripts differently to how I would if they
   were
   to be displayed in a browser?
  
   Neeed...Slp ;)
  
   Cheers,
   James.
  
  
  
   --
   PHP General Mailing List (http://www.php.net/)
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
   To contact the list administrators, e-mail: [EMAIL PROTECTED]
  
  
  
  
  
   --
   PHP General Mailing List (http://www.php.net/)
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
   To contact the list administrators, e-mail: [EMAIL PROTECTED]
 
  --
  Don Read   [EMAIL PROTECTED]
  -- It's always darkest before the dawn. So if you are going to
 steal the neighbor's newspaper, that's the time to do it.
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  To contact the list administrators, e-mail: [EMAIL PROTECTED]
 
 --
 
 Chris Fry
 Quillsoft Pty Ltd
 Specialists in Secure Internet Services and E-Commerce Solutions
 10 Gray Street
 Kogarah
 NSW  2217
 Australia
 
 Phone: +61 2 9553 1691
 Fax: +61 2 9553 1692
 Mobile: 0419 414 323
 eMail: [EMAIL PROTECTED]
 http://www.quillsoft.com.au
 
 You can download our Public CA Certificate from:-
 https://ca.secureanywhere.com/htdocs/cacert.crt
 
 **
 
 This information contains confidential information intended only for
 the use of the authorised recipient.  If you are not an authorised
 recipient of this e-mail, please contact Quillsoft Pty Ltd by return
 e-mail.
 In this case, you should not read, print, re-transmit, store or act
 in reliance on this e-mail or any attachments, and should destroy all
 copies of them.
 This e-mail and any attachments may also contain copyright material
 belonging to Quillsoft Pty Ltd.
 The views expressed in this e-mail or attachments are the views of
 the author and not the views of Quillsoft Pty Ltd.
 You should only deal with the material contained in this e-mail if
 you are authorised to do so.
 
 This notice should not be removed.
 
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]
 
 


-- 
PHP 

RE: [PHP] Running PHP as a cron job....

2001-07-08 Thread Michael Hall



On Sun, 8 Jul 2001, Ben Bleything wrote:

 Interesting method, with the lynx... I imagine that if you've only built
 the DSO, then that would be the way to do it.. if it worked.  My guess
 would be, you would have to do lynx
 'http://localhost/path/to/script/script.php' to force it to go through
 the server.

Yes, I was a bit lazy with my example, you would certainly need to include
a proper URL. Apart from that though, a script called in this manner
should output whatever it is supposed to, whether a text file or an email
or whatever.

 TO be totally honest with you, I'm too lazy to learn bash scripting, so
 I've been using php (it's fast and easy and does everything I need!
 Honest!) so when I build a new version of php, I make both... =P

I've just recently got a bit more serious with learning bash scripting and
am surprised at how powerful it really is, in conjunction with the usual
UNIX commands and other tools. PHP is the only choice for most things web
related, but I'm finding that bash is making my server admin tasks easier
and quicker. In fact, I'm currently working on a PHP code snippet manager
written in bash! If the idea has any legs, I might convert it over to
Python or something later ... 

Anyway,

Mick.


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




RE: [PHP] how can i use postfix instead of sendmail???

2001-06-25 Thread Michael Hall

  Is postfix more efficient than sendmail?

I don't know about efficient but it is certainly more secure and *way*
easier to configure.

  Can you give me the url which describes how to use it or write here ?
 www.google.com/linux  postfix
 and you get:
 http://www.redhat.com/support/docs/faqs/RH-postfix-FAQ/book1.html
 Which seems pretty much like what you want.
 (PS: this took me 15 seconds, couldn't you try a web search?)

Yeah ... apart from that, www.postfix.org is also a winner. Why not
download it and have a look?

Basically, you need to replace sendmail with postfix. Its really easy and
all described in the docs that come with it.

Mick


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




Re: [PHP] php still not working

2001-06-25 Thread Michael Hall


Do you restart Apache after making changes to httpd.conf?

You can use 'path/to/apache/bin/apachectl restart' to do this.

Just a thought.

Mick

On Mon, 25 Jun 2001, brent wrote:

 Trying a re-post from yesterday...
 
 My setup is as follows:
 
 RH Linux 7.0
 PHP 4.0.5
 Apache 1.3.20
 
 I've either added or uncommented the following lines from httpd.conf:
 
 AddType application/x-httpd-php .php
 AddType application/x-httpd-php-source .phps
 
 and to mime.types:
 
 application/x-httpd-php  php phtml pht
 
 Adding a LoadModule won't work because I didn't compile as a module.
 
 I've seen some posts about AddHandler for PHP3, so I tried adding the
 following to the .conf file:
 
 AddHandler php-script  .php
 
 having no idea whether this syntax was correct or not since the only
 example I found
 in the archuves refered to v. 3.
 
 So I still get the html/php code showing up in my browser with no
 interpretation by PHP.
 Any suggestions (with the exception of Hey, maybe you should stick with
 Windows)
 are greatly appreciated.
 
 TIA
 
 Brent
 
 
 
 
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]
 
 


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




Re: [PHP] variables / reading files

2001-06-23 Thread Michael Hall


OK, thanks for that Chris.

I did get it in the end, with something very similar to what you
suggested:

$message = ;

while (  )
{
$var1 = $row[1];
... etc

$item = $var1 $var2 $var3 etc;
$message = $message . $item . \n;
}

Your solution is cleaner so I'll change it over. I'd written the whole
cart in one sitting up to then, and was fairly cross-eyed by that stage.


On Sat, 23 Jun 2001, Christopher Ostmo wrote:

 Michael Hall pressed the little lettered thingies in this order...
 
  
  I'm stuck on a piece of code for a shopping cart.
  
  I'm on the final page where the buyer clicks BUY and several things
  happen. I want to loop through the table that stores the session info and
  extract details such as item, price, quantity, subtotal and assign all this
  info to one variable:
  
  $var = the output of a while($row = mysql_fetch_array($query)) statement
  A
  Why I'm trying to do this is I'd like to store all the purchase details in
  one variable for inclusion in an email:
  
  $message = $var;   // (from above)
  mail($address,$subject,$message);
  
  I'd also like to put the info in that same variable into a table that
  records actual sales data:
  
  $details = $var;
  insert into table ('details') values ('$details');
  
  I know there must be a (probably very easy) way, but just can't crack it.
  
 
 $result = mysql(DBName,QUERY);
   while ($row = mysql_fetch_row($result)) {
   $var = $row[0];
 
   $message .= $var;
   }
 $details = $message
 
 The period and equal sign cause $message to prepend itself to $var.  
 This is the same thing as writing:
   $message = $message.$var;
 
 In either case, $message is preserved and added to on each loop. That 
 being the case, if you are puting this into an e-mail message, you 
 probably want to add line breaks after each line:
   $message .= $var.\n;
 
 Check out string operators:
 http://www.php.net/manual/en/language.operators.string.php
 and assignement operators:
 http://www.php.net/manual/en/language.operators.assignment.php
 
 Good luck...
 
 Christopher Ostmo
 a.k.a. [EMAIL PROTECTED]
 AppIdeas.com
 Meeting cutting edge dynamic
 web site needs
 
 For a good time,
 http://www.AppIdeas.com/
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]
 
 


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




Re: [PHP] Sessions vs Cookies?

2001-06-22 Thread Michael Hall


As I understand it, PHP's session management uses cookies anyway unless
they are turned off by the browser, in which case session info is attached
to the URL.

So I'd use sessions rather than cookies alone.

Mick

 On Thu, 21 Jun 2001, Chris Anderson wrote:

 I am about to write a new admin system for a website I do and it will have many 
different logins. I was wondering overall which most of you thought would be better 
for such a thing? Wants really a pro about sessions over cookies?
 


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




Re: [PHP] Pregunta

2001-05-07 Thread Michael Hall


Hombre, necesitamos un poco mas de informacion para ayudarte. Cuales
versiones de PHP y IIS, por ejemplo, y cual version de Windows?
Como lo instalaste? Como modulo o como CGI?

La pagina de prueba, tiene todos los tags que necesita? (es decir, ?php
y ?. Tiene el archivo la extension .php?

Como has escrito Este es un ejemplo de php? Has utilizado print o
echo o printf?

Yo no se mucho de IIS, pero acaso tienes que configurarlo para que
reconoce la extension .php. Acaso ya reconoce solo las extensiones
.htm y .asp.

Bueno, espero que este sea util.

Mick

On Mon, 7 May 2001, Lic. Santa Ortiz Rodriguez wrote:

 Estoy apenas en la instalacion, baje el archivo el cual me indica que 
 configura automaticamente el iis, lo corro y trato de hacer la pagina de 
 prueba, Este es un ejemplo de php, lo copia igual pero al abrir la pagina 
 no se ve nada, aparece en blanco, no se que es lo que me hace falta algo de 
 hacer.
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]
 
 


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




Re: [PHP] Programming PHP in a modular way

2001-04-30 Thread Michael Hall


Use include();

Mick

On Mon, 30 Apr 2001, Andreas Pucko wrote:

 Hello,
 
 I am a newi in PHP. Currently I am creating my first site.
 
 I would like to programm it modularly. I tryed it, but I came to the point,
 that I have everything in one file with a huge amount of tables.
 
 What would be the best way to build a site with a navigation on the left and
 content on the right.
 
 The question is.. what is the proper syntax to open the next content from
 the menu. Open it in
 the same file, or open a new one??
 
 Thanks
 
 Andy
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]
 
 


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




Re: [PHP] php suck

2001-04-29 Thread Michael Hall


 i found this when surfing this morning
 http://www.phpsucks.net/

Looks like someone just spent a fortune on getting and learning M$
products then lost work to a PHP/open source alternative, or maybe they 
just can't get Red Hat installed. Either way, who cares?

Mick


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




Re: [PHP] Best Practice-HTML In Database

2001-04-29 Thread Michael Hall


If you ever need to update the HTML, option 2 will be a lot easier.

Mick

On Sun, 29 Apr 2001, John Monfort wrote:

 
   Hello everyone,
 
   I'm curious. Which is the better practice?
1) Insert the HTML page (...HTML code) in the database ?
 
or
 
2) Insert a URL in the database field, that points to the HTML page?
 
 
   why?
 
   Any help will be appreciated.
 
   Btw, thank you all for helping with my previous questions.
 
  ==FOLLOW-UP ==-
  = PHP Ultradev Browser Model ==
  ===
 
  FYI
   For those who care about the PHP-Ultradev Server Model (PHAKT).
   I finally got it to work. Everything works for MySQL.
   However, you have to make some manual changes for it to work with MS
   Access. The changes are as follow:
 
1) You have to add the 'Access' or 'ODBC' Connection Type, in the
   server model's CONNECTION File
   (accessed via Modify-Connection-New).
 
   To do so:
a) open (from the Ultradev Configuration folder)
Connection-PHP-Win-Connection_php_adodb.htm
 
b) add the value pairs  access/access, and/or odbc/odbc, to the
   dropdown list for 'Connection Type'.
 
Without this, you can only select MySQL as the connection type.
This means that ADOBD will use the wrong drivers to connect to
your DB.
 
   2) There is an ERROR in the ADODB ODBC configuration file. The ODBC
  file has a format error in the ODBC connection call.
  (Site Root Folder -ADODB-adodb-odbc.inc.php)
 
The file tries to connect (to the DB) with
 
$dbh = odbc_connect ('$hostname', $username,$password);
 
That is an error. The correct format is
 
$dbh = odbc_connect ('$DSN_NAME', $username, $password);
 
You do not need to specify the host, for an ODBC connection. That
information is already listed in the DSN description.
 
 
Once that's done. You'll be able to use Ultradev with PHP.
 
I hope that helped.
 
-John
 
Again, thanks to everyone who helped me find this extension.
Don't forget my new question :)  see above.
 
 
 
 
 __John Monfort_
 _+---+_
  P E P I E  D E S I G N S
www.pepiedesigns.com
 The world is waiting, are you ready?
 -+___+-
 
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]
 
 


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




Re: [PHP] IP Chains

2001-04-24 Thread Michael Hall


I don't understand why you want to connect IPCHAINS to your PHP script.
Normally your IPCHAINS (or IPTABLES) firewall would be running anyway,
wouldn't it? Maybe I've missed something, but I don't see how the two are
linked. 

I'd have the PHP script check username and password, and if valid, go
ahead and do whatever the script determines. I'd also have IPCHAINS
running the whole time and configured to let any authorised user out/in.
But there would be no direct link between the two.

Mick

On Tue, 24 Apr 2001, Faryal wrote:

 Hi
 I wanted o ask u about a problem regarding my project. The project is related to 
Cyber Cafe Authentication. Here we have to chk whether a set of user name  
password is valid and if valid allow this user access to internet. All the scripitng 
has been done in PHP and the operating system is linux. Now we just have to link IP 
CHAINS to our php script. That is  when the user is allowed to access internet, ip 
chains should start running through the script. However we are stuck at this problem 
 cannot find a sound solution. Can u plz help us? That would be very nice :)
 Waiting anxiuosly for ur reply.
 Regards
 Faryal
 
 


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




Re: [PHP] web page grab

2001-04-22 Thread Michael Hall


In other words ...

 $grab = eregi("wish(.*)numbers .");
 
 the (.*) is what you're grabbing.

You don't need to include the entire file up to 'wish' and beyond
'numbers', just enough to make a unique portion.

Mick


  I'm trying to grab content from another web page.  After having browsed 
  through the mailing list archives and such, it looks like I'll need to use 
  the eregi_replace function, but I'm not sure how to properly format the 
  command.  The goal is to get rid of everything from the start of the page 
  up to the word "Wish" and everything after the word "numbers".  Or, another 
  way of phrasing it, I'm wanting to get a web page and only use the content 
  between the words "Wish" and "numbers".  What would be the best way of 
  going about this?
  
  Thanks,
  
  -Ed
  
  
  -- 
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  To contact the list administrators, e-mail: [EMAIL PROTECTED]
  
  
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]
 
 


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




Re: [PHP] php.ini

2001-04-12 Thread Michael Hall


I did, but got Internal Server Errors for several different
command formats using = and " ".
In the end, this format appears to work (no error message anyway, and the 
files upload) ...

php_value max_execution_time 60

Mick

  Is it possible to override the maximum script execution time as set in
  php.ini using an Apache directive like this in an .htaccess file?:
 
  php_value max_execution_time = 60
 
 What about simply trying it? :)



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




RE: [PHP] sending mail.. PLEASE HELP!

2001-04-12 Thread Michael Hall


Are you doing a bulk mail out or something like that?
Your script is timing out. The max_execution_time can be changed in
php.ini

Mick

On Thu, 12 Apr 2001, Jude Sanglitan wrote:

 Oops! How can I prevent this?
 
 Fatal error: Maximum execution time of 30 seconds exceeded in
 C:\Inetpub\wwwroot\TFC Survey Form\mailform.php on line 17
 
 
 -JS
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]
 
 


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




[PHP] php.ini

2001-04-10 Thread Michael Hall


Is it possible to override the maximum script execution time as set in
php.ini using an Apache directive like this in an .htaccess file?:

php_value max_execution_time = 60

Thanks

Mick


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




[PHP] php site down?

2001-04-10 Thread Michael Hall

I've been trying to get to the annotated manual all afternoon but can't
get through to www.php.net. Anyone else have the same problem?

Mick


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




Re: [PHP] Inserting time + date entry into mySQL DB

2001-04-10 Thread Michael Hall



Create a field in your table called something like 'date' and make its
data type TIMESTAMP. MySQL will automatically add a timestamp with each
new entry ... assuming you're using UNIX, I don't know about windows.

Mick

 I know this has been brought up repeatedly but I couldn't find the archives website.
 I'm doing a news publishing script (something like newsphp \ php-nuke) but uses 
mySQL to store all the data instead of flat files.
 I would like to make it such that everytime I submit an news entry, the time\date 
will automatically be inserted in that row.
 Could someone give me some suggestions?


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




Re: [PHP] L?

2001-04-10 Thread Michael Hall

Yep ...

I unit
V 5
X 10
L 50
C 100
D 500
M 1000

no zero ... try doing maths with this system.

Mick

 I think L is 50.
 
 bill
 
 Kurth Bemis wrote:
 
  what does the roman numeral L mean?


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




Re: [PHP] MySql: Default values

2001-04-10 Thread Michael Hall


Mumkin ya elias, ana ma afhamsh su'aalak mnih!

Not exactly sure what you mean elias.
TIMESTAMP in MySQL is a datatype more than a function, but I'm not
absolutely sure about that.

Mick


On Tue, 10 Apr 2001, elias wrote:

 Can a default field value in MySql be a function?
 
 Like default value of a date field should be the built-in function NOW()?
 
 anything like what i'm asking for?
 
 -elias
 http://www.kameelah.org/eassoft
 
 
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]
 
 


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




Re: [PHP] Inserting time + date entry into mySQL DB

2001-04-10 Thread Michael Hall


This is all explained in the PHP manual under dates.
Assuming you have a field called 'date' with a timestamp in it,
you can format the date like this:

$date = date("l jS F Y", $date);

But there are a lot of options so read the manual.

Mick

 I want it such that when a user reads the news, he sees something like
 
 ---
 Saturday 25th March 2001
 New mirror up on PHP - posted by Zeus @ 00:00 GMT +8
 
 news news news news news news news news news news news news news
 ---
 
 That sort of thing, how can I go about?
 
 
 
 
 - Original Message -
 From: elias [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Wednesday, 11 April, 2001 7:23 AM
 Subject: Re: [PHP] Inserting time + date entry into mySQL DB
 
 
  No under windows doesn't work.
  you have to enter a value in that field with value NOW()
 
  -elias
  http://www.kameelah.org/eassoft
 
  "Michael Hall" [EMAIL PROTECTED] wrote in message
  [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
  
  
   Create a field in your table called something like 'date' and make its
   data type TIMESTAMP. MySQL will automatically add a timestamp with each
   new entry ... assuming you're using UNIX, I don't know about windows.
  
   Mick
  
I know this has been brought up repeatedly but I couldn't find the
  archives website.
I'm doing a news publishing script (something like newsphp \ php-nuke)
  but uses mySQL to store all the data instead of flat files.
I would like to make it such that everytime I submit an news entry,
 the
  time\date will automatically be inserted in that row.
Could someone give me some suggestions?
  
  
   --
   PHP General Mailing List (http://www.php.net/)
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
   To contact the list administrators, e-mail: [EMAIL PROTECTED]
  
 
 
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  To contact the list administrators, e-mail: [EMAIL PROTECTED]
 
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]
 
 


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




Re: [PHP] Commercial sites that use PHP

2001-04-10 Thread Michael Hall


GoEureka, one of Australia's biggest search engines, uses php on at least
part of its site:

see http://www.goeureka.com.au

Mick

On Tue, 10 Apr 2001, Phil Labonte wrote:

 Can anyone send me a list of large commercial web sites that use PHP?
 
 I am trying to move to PHP here at work but I need some examples to impress
 the boss!!!
 
 Thanks
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]
 
 


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




Re: [PHP] Script FLOW-- branching and subroutines/functions

2001-04-09 Thread Michael Hall


Here's what I'd do (pseudocode):

?php

if ($submit) {
check for duplicate;
if (everything OK) {
commit to db;
}
}
else {
display form with submit button named 'submit';
}

?

Mick

 how do I do this
 
 call form
   wait there until it is completed
 call check
   look for duplicate
 
 then if ok
   I then commit to database after entereing data




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




Re: [PHP] Script FLOW-- branching and subroutines/functions

2001-04-09 Thread Michael Hall


Lets try that again:

 ?php
 
 if ($submit) {
   if (data already in db) {
reject data;
}
else {
   commit data to db;
   }
 }
 else {
   display form with submit button named 'submit';
 }
 
 ?
 
 

A bit of a mud map ... hope it helps

Mick


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




Re: [PHP] Upload file from my local C:

2001-04-09 Thread Michael Hall


Is the file on your win machine on C: or D: ? There seems to be some
confusion about that. Also, how are you using 'copy' to upload the file?
Are you using a form with a 'file' input type and
ENCTYPE="multipart/form-data" in the FORM tag, etc?

Just some ideas.

Mick

On Mon, 9 Apr 2001, HK Woo wrote:

 Hi, Johnson
 
 The file is located at my local WIN ME machine. The file is set to R/W
 
 HK Woo
 ""Johnson, Kirk"" [EMAIL PROTECTED] wrote in message
 [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
  Are the permissions set OK?
 
  Kirk
 
   -Original Message-
   From: HK Woo [mailto:[EMAIL PROTECTED]]
   Sent: Monday, April 09, 2001 9:01 AM
   To: [EMAIL PROTECTED]
   Subject: [PHP] Upload file from my local C:
  
  
   Hi,
  
   I use a command "copy" to upload a file from my local win machine to
   webserver. However, it is not successful. It prompts that
   "Warning: Unable
   to open 'D:\\PHP\\upload1.php' for reading:". I would like to
   know what is
   the problem
  
   Thank You!
  
   HK  Woo
  
  
  
   --
   PHP General Mailing List (http://www.php.net/)
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
   To contact the list administrators, e-mail:
   [EMAIL PROTECTED]
  
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  To contact the list administrators, e-mail: [EMAIL PROTECTED]
 
 
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]
 
 


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




Re: [PHP] recording time of entry

2001-04-09 Thread Michael Hall


Yes ... 100 entries or 100 x 100 entries! :-)

Mick

On Mon, 9 Apr 2001, george wrote:

 
   Will that work if I have for instance 100 entries, each entry recording
 the time it was made then I would be able to pull that info out of the db
 and display the record and time made  at a later date.
 george
 
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]
 
 


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




Re: [PHP] while loop

2001-04-09 Thread Michael Hall


$query = mysql_query("some SQL here");
while ($row = mysql_fetch_array($query)) {
do stuff;
}

Mick

On Tue, 10 Apr 2001, Jacky wrote:

 Hi people
 I am more like ASP programmer and new to PHP, In ASP, when we want to take all 
records in dayabase to display. After we did  do the query, we call " Do while not 
RS.EOF ( mean do while not end of record file) , and display record accroding to the 
query.
 Is there anything that do teh same in PHP??
 cheers
 Jack
 [EMAIL PROTECTED]
 "There is nothing more rewarding than reaching the goal you set for yourself"
 


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




[PHP] image validation

2001-04-07 Thread Michael Hall


I'm wondering if there is any sure way for PHP to determine whether an
uploaded file is definitely an image file.

I have a script that checks for size and mime type ('image/png' or
'image/jpeg'). The script works fine, but I've heard that it is possible
to add those mime type headers to files that aren't images at all, and
possibly something mailicious.

Mick


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




[PHP] ereg

2001-03-31 Thread Michael Hall


I'm using the following expression to check input strings:

if (!ereg("^[[:alnum:]_-]+$", $string)) { get outta here! }

This works fine except for when a string has spaces, as in text. What do I
need to add to the expression to handle spaces (internal, not at the
beginning or end).

Thanks

Mick


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




Re: [PHP] How to send attachment with email with php?

2001-03-27 Thread Michael Hall


Use a mime_mail class. Have a look at the mail() function in the annotated
PHP manual. There are a few mime_mail classes mentioned there with links. 

Mick

On Wed, 28 Mar 2001, Carfield Yim wrote:

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


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




[PHP] equivalent to PERL's qq

2001-03-26 Thread Michael Hall

Hi.  I'm a converted Perl guy.  While I generally like PHP better than Perl,
I do severely miss the Perl operator qq, which allowed statements (in my
case, lengthy SQL statements) to be written on multiple lines.

$this = qq|Select *
From xsdfs
Group by date
Order by id
|;

Is there anything similar to this in PHP?  I've been unable to find it if
there is.

Michael Hall
Prairie Fire Internet Technologies
[EMAIL PROTECTED]


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




Re: [PHP] I need an expert to tell me what I am doing wrong

2001-03-23 Thread Michael Hall


Something else to investigate could be whether you've passed the db name
to the script. If the the name of the db is different to $user, you'll
need to do something like

$dbname = "whatever";
mysql_select_db("$dbname",$db);

Mick


On Sat, 24 Mar 2001, YoBro wrote:

 What could I possibly be doing wrong here. The information just will not
 insert into my database.
 ARGH!
 
 Please help if you can...
 
 ?php
 
 $user = "xyz";
 $pass = "123";
 
 
 //Connect to Database xyz
 $db = mysql_connect("localhost", $user, $pass)OR DIE("Unable to connect to
 database");
 
 mysql_select_db("xyz",$db) OR DIE("Unable to connect to database");
 
 $sql = ("INSERT INTO orders VALUES
 'product,name,email'($product,$name,$email)");
 $result = mysql_query($sql);
  echo "Order for the $product has been sent";
 
 
 ?
 
 --
 Regards,
 
 
 YoBro
 -
 DO NOT REPLY TO THIS VIA EMAIL
 PLEASE USE THE NEWSGROUP
 All emails sent to this address are automatically deleted.
 This is to avoid SPAM!
 -
 
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]
 
 


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




Re: [PHP] Post -vs- Get

2001-03-21 Thread Michael Hall


 abc.com?client_no=5
 
 Now even though if that person emails you that url, you won't gain
 access to it bascause of authentication that is needed, what can happen
 is an authorized user could change the 5 in the url to 8, and then see
 the information that is there which belongs to client 8.
 
 Because of this I am thinking in this case I should be using the post
 method instead of the get method.

Even then a user could save the source code of your form, alter the POST
information, and send it back with the same effect.

You should probably look at having some kind of individualised 
authentication scheme rather than a blanket one, using sessions/cookies
perhaps.
POST alone is not the solution.

Mick


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




Re: [PHP] external data saving

2001-03-08 Thread Michael Hall


Petr:

I'm not exactly clear about what you want to do, but ...

PHP can process user data and save it to databases. This is probably what
PHP does best. Javascript has nothing to do with this process (but you
can use it in your PHP pages if you want).

All I know about ActiveX is that it is a M$ technology that costs $$$ for
the software involved and it is not as easy to use as PHP.

Mick


On Fri, 9 Mar 2001, [iso-8859-2] Petr Jùza wrote:

 Hi,
 I have one question, please. Can anybody  help me with external data saving?
 I require to save the user data (I suppose data will be in the text format)
 from user (from his computer) to a database server. And I want not use
 ActiveX technology because it must run even under Netscape. Are there
 functions for work with files in Javascript?
 
 Thank you very much.
 Lot of regards, PETER
 
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]
 
 


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




Re: [PHP] Help Please: Php configuration

2001-03-04 Thread Michael Hall


I don't know a thing about IIS ... but the archives can be found at
http://www.php.net/support.php

Good Luck

Michael

On Sun, 4 Mar 2001, archana sharma wrote:

 Hi All,
I am new in PHP world. I am trying to configure my php with IIS4. Here is 
 the info what I downloaded and installed:
 
 php version: php4.0.4 for win32 [2000-12-20] (from http://php4win.de site)
 Web server: IIS4
 But as soon as I do the step of "Add/Edit extension mapping " in IIS4, my 
 webserver crashes. I don't know where I am doing wrong. I followed every 
 step written in the book. Please HELP!!!
 
 If you have answered the questions like this, please point me where can I 
 find the solution or clue. Also is there any way where I can archieve the 
 old message of this board.
 
 Your help is highly appreciated.
 
 Thanks.
 ...Archana
 
 
 
 
 
 _
 Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]
 
 


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




Re: [PHP] date

2001-03-04 Thread Michael Hall


Yes you can. Include a field in your db called 'date' or whatever.

Generate the date in your script using:

$today = date("Y-m-d");

Then simply add the date to the db along with everything else.
There are lots of ways to format dates, too many to describe here.
Have a look at the PHP manual.
Also, if you make the data-type of the date field 'date', your options for
formatting are more limited. That stuff is all in the MySQL manual.

Michael


On Sun, 4 Mar 2001, george wrote:

   Can you mark the date when an entry is placed in the db and then get that
 date to display  when the info is pulled out
 
 TIA
 
 george
 
 
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]
 
 


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




Re: [PHP] passing variables

2001-03-03 Thread Michael Hall


One way:

Pull as much info as you need out of the db, including the email id, then
have a select box or check box if you want which sends the id of the email
you want to delete back to a 'DELETE FROM' sql statement.

No need for cookies that I can see.

Mick 

On Sat, 3 Mar 2001, george wrote:

 I have a page which pulls contact information out of a database name, email
 message, and displays it on a page using
 mysql_fetch_array  so my question is how is it possible to delete one of the
 emails, the only way i can think of is to use a checkbox and a hidden field
 giving the id and then place it inside a form so all ticked so that if you
 tick the email and submit the form it deletes the ticked emails.
   However there must be a better way, perhaps using cookies
 
 TIA
 
 george
 
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]
 
 


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




Re: [PHP] Hide Include-Files from the Web

2001-03-03 Thread Michael Hall


Include files do not have to end with '.inc', which is purely a convention
of dubious value. If you use '.php' as the extension for included files,
they will have to be parsed by PHP and can't be read as plain text from
outside.

Mick

On Sat, 3 Mar 2001 [EMAIL PROTECTED] wrote:

 Hi!
 
 I want my include-files not be seen from outside AND not be executed!!!
 I don't have access to a directory outside DOCUMENT_ROOT and I don't have
 .htaccess!!!
 
 I think about something like:
 1.
 name: file.inc.php
 2.
 add code: 
 if ($PHP_SELF==MY_NAME) exit;
 as first line in the inluded script.
 so, if the script is being included from another script, the code will be
 executed - but if the file will be called directly, no code is executed!
 BUT - how do I get the include-file's name?
 
 or is it safe enough, to use something like
 if (substr($SCRIPT_URL,-8)==".inc.php") exit;
 
 thanks
 michi
 
 -- 
 Sent through GMX FreeMail - http://www.gmx.net
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]
 
 


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




Re: [PHP] PHP web based mailing list administrator

2001-03-03 Thread Michael Hall


Yes, they are about. Try hotscripts.com.

Mick

On Sat, 3 Mar 2001, Peter Van Dijck wrote:

 Hi,
 does there exist a web based mailing list administrator in PHP (Tying in 
 with some open source mailing list software)?
 Ideally, something like egroups (now groups.yahoo.com). I just want to be 
 able to easily administrate (or have other people administrate) mailing 
 lists. I have access to my own server (linux, php4, ...)
 thanks!
 Peter
 ~~
 http://liga1.com: building multiple language/culture websites
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]
 
 


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




[PHP] length limit of URL?

2001-03-03 Thread Michael Hall

Does anyone know the practical limit to the length of a URL? Some of mine
are now 100 characters long with heaps of variables packed in, so I'm
wondering what the limits are?

Thanks

Mick


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




Re: [PHP] passing variables

2001-03-03 Thread Michael Hall


OK, sorry, I read your post in a hurry.
Something like this should work:

A HREF="the_next_page.php?id=$row[id]"Do Something/A

On the next page you'd have:

$sql = "Do Something WHERE id = '$id'";

By the way, you don't necessarily have to go to a different page in the
sense of a different file ... all your 'pages' can be part of the one php
script divided up like this:

if ($action == 'delete') { do delete stuff }
elseif ($action == 'full') { do full display }
else { just do the default }

In that case, the line above would be more like:

A HREF="the_same_page.php?action=deleteid=$row[id]"Do
Something/A

Hope this is helpful.

Mick


On Sat, 3 Mar 2001, george wrote:

 
 Thanks Michael,
 
 but what I plan on doing is pulling the name,subject and email
 address out of the db, then giving the option to view the full message, but
 i have had to do this using a form so my code looks like
 
 trform metod=post action=view_enq.phpinput type=hidden name=id
 value=$row[id]td bgcolor=#cc$row[title] $row[name]/tdtd
 bgcolor=#cc$row[subject]/td
 ";
 
 echo
 "td  bgcolor=#cc$row[email]/tdtd align=center
 bgcolor=#ccinput type=submit name=submit value=view/td/form/
 tr";
 }
 echo "/table/td/tr/table/td/tr/table";
 
  I plan to add hidden fields for all the information pulled out the db my
 question is this how do you pass variables into the next page without using
 a form.
 can it be done say instead of a form there was a link next to each message
 which said view, clicking on this takes you to a page where you read the
 full mail, then there are another 2 links on for reply and one for
 delete.How could that be done
 
 Thanks in advance
 
 george
 
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]
 
 





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




[PHP] multiple databases

2001-02-28 Thread Michael Hall

I'd like to run this past anyone who'd care to comment before I get too
far down the track I'm considering taking with a PHP web portal site.

Is it a wise idea to have a PHP web application running on multiple
databases? Everything I've done to date has run off one database, no
matter how large it got. With the current small portal site, the idea is
to break a monolithic database up into around 10 smaller databases, each
of which should be able to be backed up to a floppy. Not all databases are
called on each page, but up to 6 or so could be.

What are the performance implications (slower, obviously, but 10 times
slower?). Performance beyond what the human mind can perceive is not
relevant to me.

Should I use mysql_connect or mysql_pconnect for each db connection ?

Should I be careful to use mysql_close with each connection?

Any advice appreciated.

Mick


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




Re: [PHP] multiple databases

2001-02-28 Thread Michael Hall


 Do you mean 10 different database servers, or 10 databases on the one
 server?

10 databases on the one server.

 As far as I know, separate databases on the one server give the same
 performance as separate tables in one database.

Music to my ears.

 With separate database servers you will run into new problems such as:
 -) can't combine data from servers, e.g. can't JOIN tables

OK ... I didn't realise I could join tables across seperate databases.
Anywhere where joins are necessary, I'm using the one database.

Thanks

Mick


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




[PHP] Stylesheets

2001-02-17 Thread Michael Hall

I'm building a PHP application which uses stylesheets. Stylesheets seem to
be broken in a big way on my system - using Netscape 4 something on Red
Hat 6.1.
Is this Netscape or somehow something to do with PHP? Things work as
they're supposed to viewing the pages on a Windows/IE box.

Mick


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




Re: [PHP] javascript in PHP statement

2001-02-15 Thread Michael Hall


 I am new to php and I am wondering if it is possible to use a javascript
 variable in a php statement for example:
 
 // create sql statement
 
   $sql = "select * from main where businesstype = "consultancy" and
 top.upper.villagename = != "0";";

As far as I know, no. Unless "top.upper.villagename" is a field in your
database and the rest is that field's contents (couldn't be ... too many
unescaped double quotes and semicolons). Nope, SQL statements don't work
like that and can only refer directly to data in a database, not php or
any other variables.

You might consider using if statements something like this:

if ($top.upper.villagename != '0') {
$sql = "SELECT * FROM main WHERE business = 'consultancy'";
}


Hope this helps

Mick


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




  1   2   >