Re: [PHP] Weird behaviour with move_uploaded_file on CGI version of PHP.

2007-05-24 Thread Brett Davidson

Richard Lynch wrote:

On Wed, May 23, 2007 3:36 pm, Brett Davidson wrote:
  

Platform : FreeBSD 6.2 Release with Apache 2.0.59 running PHP 5.2.1_3
CGI under SuExec in FastCGI mode.

Issue: move_uploaded_file ALWAYS crfeates uploaded files with Unix
permissions 600 (read and write for user only) regardless of
ownership,
directory or umask settings.



Regardless of all those settings in what context/environment?...

Are you using http://php.net/umask and/or chmod?

PHP runs in the environment you've defined in SuExec and FCGI.  Which
I got NO IDEA how that all works, but presumably there are
configuration settings within those.

  

This works fine with php installed as a module.



Well, yeah, as a Module you're in an entirely different
context/environment.  That's kinda the whole POINT of SuExec in the
first place -- to change the user and their environment for the
execution of the script.

  


Belay all of this!

Problem is not in php - it's in suexec. Just installed Ruby on rails 
under fcgid and am having the same issue. :-(


Thanks for your reply (which came in just as I was typing this). :-)

Brett.

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



[PHP] Weird behaviour with move_uploaded_file on CGI version of PHP.

2007-05-23 Thread Brett Davidson
Platform : FreeBSD 6.2 Release with Apache 2.0.59 running PHP 5.2.1_3 
CGI under SuExec in FastCGI mode.


Issue: move_uploaded_file ALWAYS crfeates uploaded files with Unix 
permissions 600 (read and write for user only) regardless of ownership, 
directory or umask settings.


This works fine with php installed as a module.

Anyone else noticed this? Anything I'm doing wrong?

Cheers,
Brett.

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



[PHP] apache2/php file manager: security suggestions

2005-05-10 Thread brett
Hi,

I've written a web based file manager using PHP and running on
an apache 2 server. Before putting it on a live webserver i'd like to get
some security suggestions.

Desired Goals:

1. Read, write text files from a web browser.
2. Files should be owned by me so as not to be readable\writable to other
webserver users or their scripts.

Will running in safe mode allow my file manager to read\write files as
me and not as apache or the UID of apache?

If i keep my data directory outside of apache's document root, will this
prevent remote viewing of it?

If i keep my PHP scripts out of document root, will they be hidden from
remote viewers?

My likely webtree directory strutcure is this:


Document Root:

/var/www/html/myWebsite

PHP Scripts:

/var/www/php/myWebsite

My data the file manager will access:

/var/www/data/myWebsite

All three directories will be owned by my user id. Apache will be
configured to run scripts from the scripts dir. The data dir will be
opened with open_baseDir. I will set up .htaccess on the data directory.

Combine this with safe mode, and will i have the desired effect?

Thanks,
-brett

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



[PHP] [NEWBIE] PEAR Help

2005-02-21 Thread Brett Patterson
Hello all.  I am new to using PEAR, but not so much to PHP.  I was looking
for a little help.

 

I'm trying to get my contact script to work with the PEAR::Mail extension.
So I followed the tutorial on pear.php.net about using the object =
Mail::factory() and then the object::send() method to send the email.  So
after doing that, I get the following code:

Main.php

$recips = $Recip.'; ';

$recips .= $Email;



require_once('config.php');



$headers['From'] = $Name. .$Email.;

$headers['Subject'] = $Subject;

$headers['To'] = $Recip;

$headers['Cc'] = $Email;

 

require_once('Mail.php');

$mail_object = Mail::factory($method, $params);

$mail_object-send($recips, $headers, $message);

if($mail_object != 'TRUE'){

require_once('PEAR.php');

$error = PEAR_Error::toString();

echo b.$error./b;

$_REQUEST['pageid'] = '23';

}

else{

$_REQUEST['pageid'] = '22';

}

 

Config.php

$method = 'smtp';

 

//$params['sendmail_path'] = /usr/sbin/sendmail;

$params['host'] = localhost;

$params['port'] = 25;

$params['auth'] = TRUE;

$params['username'] = ridgeswi;

$params['password'] = **;

The email is not sent to either recipient, and I don't get an error, or if I
do, it has no values:

i.e. [: message= code=0 mode= level= prefix= info=]

 

Anyone see anything wrong?  Is it perhaps that I'm using tabs instead of
spaces for indentation or what?  Thanks for the help.

 

~Brett



[PHP] [NEWBIE] PEAR::Mail Help Please

2005-02-21 Thread Brett Patterson
Hello all.  I am new to using PEAR, but not so much to PHP.  I was looking
for a little help.

 

I'm trying to get my contact script to work with the PEAR::Mail extension.
So I followed the tutorial on pear.php.net about using the object =
Mail::factory() and then the object::send() method to send the email.  So
after doing that, I get the following code:

Main.php

$recips = $Recip.'; ';

$recips .= $Email;



require_once('config.php');



$headers['From'] = $Name. .$Email.;

$headers['Subject'] = $Subject;

$headers['To'] = $Recip;

$headers['Cc'] = $Email;

 

require_once('Mail.php');

$mail_object = Mail::factory($method, $params);

$mail_object-send($recips, $headers, $message);

if($mail_object != 'TRUE'){

require_once('PEAR.php');

$error = PEAR_Error::toString();

echo b.$error./b;

$_REQUEST['pageid'] = '23';

}

else{

$_REQUEST['pageid'] = '22';

}

 

Config.php

$method = 'smtp';

 

//$params['sendmail_path'] = /usr/sbin/sendmail;

$params['host'] = localhost;

$params['port'] = 25;

$params['auth'] = TRUE;

$params['username'] = ridgeswi;

$params['password'] = **;

The email is not sent to either recipient, and I don't get an error, or if I
do, it has no values:

i.e. [: message= code=0 mode= level= prefix= info=]

 

Anyone see anything wrong?  Is it perhaps that I'm using tabs instead of
spaces for indentation or what?  Thanks for the help.

 

~Brett

 



RE: [PHP] weird mail function problem

2005-02-21 Thread Brett Patterson
First off, this is not the most efficient way to send mail as it closes 
reopens connections to the server for each mail.  Look into using PEAR.

Secondly, I would not loop through everything for each email address.  One
way to do it would be to say:

If($email_to != ){
$to = explode(,, $email_to);
$to_email = ;
$i = 0;
While($i=count($to)){
$to_email .= $to[$i];
}
// Now, just create 1 email, and send it to all the names
  $subject = $email_subject;
  $body .= $HTTP_POST_VARS['message'];
  $body .= \n---\n;
$body .= Article Name :;
$body .= \n---\n;
$body .= $Article_Name;
$body .= \n---\n\n;   
$body .= \nStory :\n\n;
$body .= $TheStory; 
$body .= \n\n\n---\n;
$body .= Sent By: .$HTTP_POST_VARS['email_address'].\n;
$header = From: .$HTTP_POST_VARS['email_address'].
.$HTTP_POST_VARS['email_address'].\n;
$header .= Reply-To: .$HTTP_POST_VARS['email_address'].
.$HTTP_POST_VARS['email_address'].\n;
$header .= X-Mailer: PHP/ . phpversion() . \n;
$header .= X-Priority: 1;
  $header .= To: Some [EMAIL PROTECTED]; // Masks To: field
mail($to_email, $subject, $body, $header);
}

That would make more sense, yet still the server load would be huge because
of all the opening and closing of connections.  Look into PEAR::Mail or
using SMTP.

~Brett

-Original Message-
From: Ahmed Abdel-Aliem [mailto:[EMAIL PROTECTED] 
Sent: Monday, February 21, 2005 2:39 PM
To: php-general@lists.php.net
Subject: [PHP] weird mail function problem

hi
i use this code to send email from mysite
but when it sends to some accounts it repeats the body part twice in
the same email while to other accounts it sends the body one time only
can anyone help in that plz ?


if ($email_to != ) {
$to = array();
$to = explode (,, $email_to);
$to_mum = count($email_to);
for ($i=0; $i$to_mum ; $i++){
$to_email = $to[$i];
$subject = $email_subject;
$body .= $HTTP_POST_VARS['message'];
$body .= \n---\n;
$body .= Article Name :;
$body .= \n---\n;
$body .= $Article_Name;
$body .= \n---\n\n;

$body .= \nStory :\n\n;
$body .= $TheStory; 
$body .= \n\n\n---\n;
$body .= Sent By:  .
$HTTP_POST_VARS['email_address'] . \n;
$header = From:  .
$HTTP_POST_VARS['email_address'] .   .
$HTTP_POST_VARS['email_address'] . \n;
$header .= Reply-To:  .
$HTTP_POST_VARS['email_address'] .   .
$HTTP_POST_VARS['email_address'] . \n;
$header .= X-Mailer: PHP/ . phpversion() . \n;
$header .= X-Priority: 1;
mail($to_email, $subject, $body, $header);

-- 
Ahmed Abdel-Aliem
Web Developer
www.ApexScript.com
0101108551

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

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



RE: [PHP] Sessions and cookies

2005-02-21 Thread Brett Patterson
Well, if you look in your phpinfo() file, you will see a SESSION_TIMEOUT or
SESSION_LENGTH value that is something like 18... different for each
server.

If you hold all your session values in the array, then you can use
session_destory(); as long as session_start() is previous to that.

I am under the impressions that both Sessions and Cookies are stored on the
user end, but I may be wrong.

~Brett

-Original Message-
From: Jacques [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, February 22, 2005 1:20 AM
To: php-general@lists.php.net
Subject: [PHP] Sessions and cookies

When a session object is created - where is it store? (Perhaps on the 
application server - IIS or Appatche?) Or on a cookking on a user's 
computer?

To destroy the session object (widht all session vairables inside the 
particluar session object) can I use session_destroy();

What is also the default life span of a session object? and can this 
bechanged?

Reagrds

Jacques 

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

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



[PHP] PHP crypt now adding $1$ to password

2002-07-02 Thread Brett Hay

Hello,

I've upgraded to Mandrake 8.2 and installed a couple of apps that later un-installed.  
Somewhere along the line I have hosed myself because while running php-nuke I have 
noticed that all of the new passwords that are getting added to the database (mysql) 
have a $1$ in front of them.  These users cannot validate themselves, it throws an 
error on the comparision.

Code from php-nuke;

 $setinfo = mysql_fetch_array($result);
 
 $dbpass=$setinfo[pass];
 
 if(!$system) {
  $pass=crypt($pass,substr($dbpass,0,2));
 }
 if (strcmp($dbpass,$pass)) {
Header(Location: user.php?stop=1);
 return;
 }

I have about 1100 users with no $1$ and 20 with... 

First, what have I done to myself?  Second is there an easy fix to get the new users 
working.

Thank you for all the help.


- Brett
[EMAIL PROTECTED]



[PHP] PHP crypt() now adding $1$ to password

2002-07-02 Thread Brett Hay

Hello,

I've upgraded to Mandrake 8.2 and installed a couple of apps that I later 
un-installed.  Somewhere along the line I have hosed myself because while running 
php-nuke I have noticed that all of the new passwords that are getting added to the 
database (mysql) have a $1$ in front of them.  These users cannot validate themselves, 
it throws an error on the comparison.

Code from php-nuke;

 $setinfo = mysql_fetch_array($result);
 
 $dbpass=$setinfo[pass];
 
 if(!$system) {
  $pass=crypt($pass,substr($dbpass,0,2));
 }
 if (strcmp($dbpass,$pass)) {
Header(Location: user.php?stop=1);
 return;
 }

I have about 1100 users with no $1$ and 20 with... 

First, what have I done to myself?  Second is there an easy fix to get the new users 
working.

Thank you for all the help.


- Brett
[EMAIL PROTECTED]



[PHP] Re: [PEAR] [HTML_Form] cant change values in array after getAll()

2002-05-31 Thread Peter TB Brett

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

In the for loop initialisation try changing:

$i = count($res)

to:

$i  count($res)

Reason: The usual thing that causes that sort of error is an
incorrect iteration condition that causes the loop to run forever and
so make an infinitely large array. I ran the below scripts (using
php-cli) to see what was going on:

--script1.php--
// for loop as in Zachery's example
?php
$res = array();
for( $i=0; $i=count($res); $i++ ) {
echo $i, \n;
}
?

--script2.php--
// modified for loop
?php
$res = array();
for( $i=0; $icount($res); $i++ ) {
echo $i, \n;
}
?

Since the $res array is zero length, if the for loop is correctly
formed the script should output a blank page (no array members,
therefore no iterations).  However, script1.php output a list of
numbers from 0 to when I terminated script execution by pressing
Ctrl-C.

Try checking your iteration conditions and try again. ;-)  Sorry if
I'm barking up the wrong tree...

Peter Brett

- ---
peter:AT:peter-b:DOT:co:DOT:uk
www.peter-b.co.uk

- - Original Message - 
From: Zachery Hostens [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, May 30, 2002 6:16 PM
Subject: [PEAR] [HTML_Form] cant change values in array after
getAll()


 im using PHP 4.1.2 and the stock PEAR with MySQL
 
 i get the array using DB::getAll() fine
 
 but when i try to go
 
 18   for( $i=0; $i=count($res); $i++ ) {
 19   $res[$i]['stamp'] = date( 'l, F dS @ h:i A',
 $res[$i]['stamp'] ); 20   }
 
 i get this error ::
 
 Fatal error: Allowed memory size of 8388608 bytes exhausted (tried
 to allocate 40 bytes) in /home/zacheryh/htdocs/news.php on line 19 
 
 Fatal error: Allowed memory size of 8388608 bytes exhausted (tried
 to allocate 40 bytes) in Unknown on line 0  
 
 
 i have checked that the var is there in the array and it is a
 correct unix epoch.  if i change the for() loop to this it works
 perfectly fine ::  
 
 18   for( $i=0; $i=count($res); $i++ ) {
 19   echo date( 'l, F dS @ h:i A', $res[$i]['stamp'] );
 20   }
 
 it will then work perfectly fine...
 
 i was wondering what maybe causing this and how i can go about
 fixing ???  
 
 thanks in advance.
 ~ Zachery
 
 -- 
 PEAR General Mailing List (http://pear.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php

-BEGIN PGP SIGNATURE-
Version: PGPfreeware 7.0.3 for non-commercial use http://www.pgp.com

iQA/AwUBPPfciBmmzLp5+kKBEQJCWwCgz1fBbbxtOS/26cm4p5pIGYJhdykAoMhB
2UmFRDznRE/YOiBeRGOhqQnu
=QY+n
-END PGP SIGNATURE-



STANDARD DISCLAIMER


E-mail communication is not secure and can easily be forged or tampered with during 
transmission.  This message appears to originate from The Oratory School Association, 
but does not necessarily represent the opinions of the Association, its employees or 
students.  Should you have any concerns regarding the content of this message then 
please contact [EMAIL PROTECTED]

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




[PHP] Re: [PEAR] [HTML_Form] cant change values in array after getAll()

2002-05-31 Thread Peter TB Brett

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Ooops, incorrect scripts. Let's try again:

 --script1.php--
 // for loop as in Zachery's example
 ?php
 $res = array();
 for( $i=0; $i=count($res); $i++ ) {
 $res[$i] = $i;
 echo $i, \n;
 }
 ?
 
 --script2.php--
 // modified for loop
 ?php
 $res = array();
 for( $i=0; $icount($res); $i++ ) {
 $res[$i] = $i;
 echo $i, \n;
 }
 ?

That's much better. ;-)

Peter Brett

- ---
peter:AT:peter-b:DOT:co:DOT:uk
www.peter-b.co.uk

- - Original Message - 
From: Peter TB Brett [EMAIL PROTECTED]
To: Zachery Hostens [EMAIL PROTECTED];
[EMAIL PROTECTED]
Sent: Friday, May 31, 2002 9:26 PM
Subject: Re: [PEAR] [HTML_Form] cant change values in array after
getAll()


 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1
 
 In the for loop initialisation try changing:
 
 $i = count($res)
 
 to:
 
 $i  count($res)
 
 Reason: The usual thing that causes that sort of error is an
 incorrect iteration condition that causes the loop to run forever
 and so make an infinitely large array. I ran the below scripts
 (using
 php-cli) to see what was going on:
 
 --script1.php--
 // for loop as in Zachery's example
 ?php
 $res = array();
 for( $i=0; $i=count($res); $i++ ) {
 echo $i, \n;
 }
 ?
 
 --script2.php--
 // modified for loop
 ?php
 $res = array();
 for( $i=0; $icount($res); $i++ ) {
 echo $i, \n;
 }
 ?
 
 Since the $res array is zero length, if the for loop is correctly
 formed the script should output a blank page (no array members,
 therefore no iterations).  However, script1.php output a list of
 numbers from 0 to when I terminated script execution by pressing
 Ctrl-C.
 
 Try checking your iteration conditions and try again. ;-)  Sorry if
 I'm barking up the wrong tree...
 
 Peter Brett
 
 - ---
 peter:AT:peter-b:DOT:co:DOT:uk
 www.peter-b.co.uk
 
 - - Original Message - 
 From: Zachery Hostens [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Thursday, May 30, 2002 6:16 PM
 Subject: [PEAR] [HTML_Form] cant change values in array after
 getAll()
 
 
  im using PHP 4.1.2 and the stock PEAR with MySQL
  
  i get the array using DB::getAll() fine
  
  but when i try to go
  
  18   for( $i=0; $i=count($res); $i++ ) {
  19   $res[$i]['stamp'] = date( 'l, F dS @ h:i A',
  $res[$i]['stamp'] ); 20   }
  
  i get this error ::
  
  Fatal error: Allowed memory size of 8388608 bytes exhausted
  (tried to allocate 40 bytes) in /home/zacheryh/htdocs/news.php on
  line 19   
  
  Fatal error: Allowed memory size of 8388608 bytes exhausted
  (tried to allocate 40 bytes) in Unknown on line 0  
  
  
  i have checked that the var is there in the array and it is a
  correct unix epoch.  if i change the for() loop to this it works
  perfectly fine ::  
  
  18   for( $i=0; $i=count($res); $i++ ) {
  19   echo date( 'l, F dS @ h:i A', $res[$i]['stamp'] );
  20   }
  
  it will then work perfectly fine...
  
  i was wondering what maybe causing this and how i can go about
  fixing ???  
  
  thanks in advance.
  ~ Zachery
  
  -- 
  PEAR General Mailing List (http://pear.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php
 
 -BEGIN PGP SIGNATURE-
 Version: PGPfreeware 7.0.3 for non-commercial use
 http://www.pgp.com  
 
 iQA/AwUBPPfciBmmzLp5+kKBEQJCWwCgz1fBbbxtOS/26cm4p5pIGYJhdykAoMhB
 2UmFRDznRE/YOiBeRGOhqQnu
 =QY+n
 -END PGP SIGNATURE-
 

-BEGIN PGP SIGNATURE-
Version: PGPfreeware 7.0.3 for non-commercial use http://www.pgp.com

iQA/AwUBPPfdpRmmzLp5+kKBEQIPrQCeIiK+n2ZpukVHVuOx/0RgsPi9jmQAniW/
qVDQBXlXNCiuM7ryRrTTbPxj
=7Cck
-END PGP SIGNATURE-



STANDARD DISCLAIMER


E-mail communication is not secure and can easily be forged or tampered with during 
transmission.  This message appears to originate from The Oratory School Association, 
but does not necessarily represent the opinions of the Association, its employees or 
students.  Should you have any concerns regarding the content of this message then 
please contact [EMAIL PROTECTED]

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




[PHP] Security Alert! PHP CGI cannot be accessed directly. HELP!

2002-05-17 Thread Brett Jenkins

When using xitami with PHP I get the message:


Security Alert! PHP CGI cannot be accessed directly.

This PHP CGI binary was compiled with force-cgi-redirect enabled. This means that a 
page will only be served up if the REDIRECT_STATUS CGI variable is set. This 
variable is set, for example, by Apache's Action directive redirect.

You may disable this restriction by recompiling the PHP binary with the 
--disable-force-cgi-redirect switch. If you do this and you have your PHP CGI binary 
accessible 
somewhere in your web tree, people will be able to circumvent .htaccess security by 
loading files through the PHP parser. A good way around this is to define doc_root in 
your php.ini file to something other than your top-level DOCUMENT_ROOT. This way you 
can separate the part of your web space which uses PHP from the normal part 
using .htaccess security. If you do not have any .htaccess restrictions anywhere on 
your site you can leave doc_root undefined. If you are running IIS, you may safely 
set cgi.force_redirect=0 in php.ini. 


I used the installer i have win 98 and its a test area before i upload to blueyoo.com
Any Ideas The Message Is Confusing!
Thanx In Advance

---
Brett Jenkins
Blueyoo.com Co - Creator, Co - Editor  Co -Moderator
http://www.blueyoo.com


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




[PHP] Re: #!/usr/local ignore option?

2001-11-12 Thread Steve Brett

why not just keep the module and drop the #!/usr/local/bin/php at the
beginning of each script .. ?

I've not heard of an ISP that asked for this b4 ...

Steve

Michael Rice [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Hi All,
 I have a kind of unique problem that I've had trouble finding information
 on around the net. I have a site that I pay a hosting company for that
 expects my php scripts to have #!/usr/local/bin/php at the beginning of
 each script which works fine. Now, I'd like to keep a development server
 at home that uses Apache 22 and the latest php.

 I followed the installation instructions carefully can got php running
 great at home. The only problem is that it serves up the #!/usr... at the
 beginning of file, which wouldn't bother me except that it causes major
 problems with redirects.

 Any ideas on how to tell my development server to ignore that line or to
 reconfigure my apache/php in some such that it won't serve up that line??

 I promise that I did due diligence in looking around but came up empty
 handed... keyword searching has its limitations...

 Thanks very much in advance.

 --
 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] Re: emailing attachments

2001-11-12 Thread Steve Brett

you need:

input type=file/input

{can't remember the exact syntax but it's the file type you're looking for,
opens the file open dialogue so they can choose local file}

Steve

Don [EMAIL PROTECTED] wrote in message
004a01c16b33$b43a2c60$4fad2b18@cr993021a">news:004a01c16b33$b43a2c60$4fad2b18@cr993021a...
Hi,

I have a class that allows me to send e-mail with an attachment.  I have a
form that gathers information and I would like to allow the user to attach a
file from his local drive.  Is there a PHP routine that allows the user to
browse his drive and choose a file?

Thanks,
Don




-- 
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: executing another php.script

2001-11-12 Thread Steve Brett

you don't need a sepaerate script.
define two functions and then loop through calling the second function.

much neater (and easier)

Steve

David Tod Sigafoos [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 I am sure that I am just .. missing this ..

 From one script I wish to 'execute' another script.  How is this done?

 Setting a link and clicking is not the answer .. one script loops
 through all the 'selected' rows and I want to 'execute' another script
 for each row .. can this be done?

 thanks

 DSig
 David



-- 
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] warning eror

2001-11-11 Thread brett

Can someone please tell me what to look for when this error appears:
Warning: Cannot use a scalar value as an array in 
/home/sites/site7/web/admin/repeat.php on line 141

It just came about in a page that has worked fine until now.  But that is how problems 
usually arrive, I think it is fine and leave it alone and all hell breaks loose.  If 
anyone has any input I would appreciate it.

Brett



[PHP] Re: Apostrophes and Textareas

2001-11-09 Thread Steve Brett

have a look at get_html_translation_table htmlspecialchars() ,
htmlentities()  and get_html_translation_table.

these function do all the work for you without reinventing the wheel.

Steve

Joe Van Meer [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]...
 Hi there...I'm new to php coming from an asp background. I have a form
with
 two textarea form elements which is eventually inserted into a sqlServer
db.
 Everything works great, but one small problem How do I work around
 apostrophes within the textareas? I keep getting errors when they are
 present and no errors when I remove all of the apostrophes.

 Thx in advance, Joe





-- 
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] Truncating Lines

2001-10-25 Thread brett




  I have the following code, which reads in an html file
 
  $fd = fopen(somefile.html, r);
  while (!feof($fd)) {
$buffer = fgets($fd, 4096);
$body .= $buffer;
  }
  fclose($fd);
 
  I am then mailing this:
 
   if (mail($username. .$email., $mailsubject, $body, From:
  .$Fromname. .$Fromaddress.\nContent-Type: text/html;
  charset=iso-8859-1
  ))
 
  All works fine, except when a particular line in the html file is
unusually
  long.

hello,

you could use object buffering instead.

ob_start();
include 'your_page';
$body=ob_get_contents();
ob_end_clean();

This is how I send pages from my site in html to a mail address all the
time.

brett


-- 
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: How to update a variable on a other frame.

2001-09-21 Thread Steve Brett

you need to update the page that the frame displays. call the page and then
use 'target=frame' to direct the output to the frame of your choice.

Steve
Hvm [EMAIL PROTECTED] wrote in message
001001c14270$8a563380$0601a8c0@Hans">news:001001c14270$8a563380$0601a8c0@Hans...
Hi all,

Is there a command to update a variable on a other frame generated by a php
script.
This is needed to show the number of records selected in the bottom frame
(this frame is also generated from a php script).

Manny thanks,

Hans.




-- 
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: Legal advice

2001-09-21 Thread Steve Brett

why not just drop access and move to postgresql or mysql.

go on .. make the leap; you know you want to 

Steve

Jon [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Hi,

 We are working with PHP  MYSQL, and we would like to publish some
 information that we have with MS ACCESS and MS EXCEL, and altough I know
 that  it is posible to connect an access database using ODBC from PHP,
 however I don't know if it is legal to do this without having to pay
 licenses to Microsoft for accessing its database through the web.

 On the other hand and if it will be too expensive to use access with ODBC,
I
 would to know if there is an easy way to insert the information in EXCEL /
 ACCESS to a MYSQL database.

 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] Re: php.ini not being read

2001-09-07 Thread Brett

Is php.ini readable?

Any messages in your Apache error log?


No messages in the apache error logs.

Are you 100% sure you really killed Apache and restarted?...  I've
had cases
where I managed to install the new Apache in a different location,
and ended
up with two different sets of httpd's running.  Quite disconcerting.


I am positive.
/etc/rc.d/init.d/httpd stop
/etc/rc.d/init.d/httpd start
I have never touched the apache installation.  I am currently under the
impression that compiling
with --with-config-file-path=/etc/httpd/conf/php.ini has screwed up the
install.  That is unless someone has any other ideas?

My first question really is if the php install doesn't find the php.ini does
it use built in defaults?  That would help explain why my changes aren't
active.

I asked this because I noticed when I made changes to the session
configuration they were never realised in the pages I am running.

brett



-- 
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 not being read

2001-09-06 Thread Brett

Changes made to my php.ini file are not showing up upon a restart of apache.
I compiled php to use the php.ini in a directory of my choosing and this is
the directory which phpinfo() reports the php.ini file to be found.  Yet all
changes are ignored.

Any ideas why?


   brett newman
   [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 index HTML fields for Javascript and PHP at same time?

2001-09-03 Thread Brett


snip
When I write input type=text name=myfield[]...  then I can see values
in PHP sccript, BUT can't see values in javascript mode, thats to say
document.form.myfield[index].value doesnt work.
On the other side, when I make input type=text name=myfield I can
see indexed values in Javascript BUT not in PHP script.
/snip

I use the following in my javascript to work with the field[] values:

this.form.elements['addzone[]']

HTH,
Brett

-- 
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] wildcard redirecting

2001-08-29 Thread Brett

As I believe I mentioned before, I use PHP and MySQL to keep a journal.
all the entries are accessed by /index.phtml?id=23 , where 23 is
replaced by the id of the entry you want.

A problem I'm having is that some search engines' spiders (google, most
notably), won't navigate through all the different ?id= variants, even
though they are all linked together.

There is a really simple solution.  Replace /index.phtml?id=23 with
/index/23 and use the following line of code in your index file:

$path_array = explode('/', $REQUEST_URI);

Apache will find index.phtml if it is in your directory index configuration
line and get that file.  The line of code I gave you will split the uri up
so you can specify $id=$path_array[2]; and retrieve your file that way.  If
index.phtml is not in your directory index line then you must tell apache to
treat any occurance of index in your url as a file with a .htaccess file.
Fore more info see this:
http://phpbuilder.com/columns/tim2526.php3

Brett



-- 
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: konquerer and php

2001-08-24 Thread Steve Brett

konquerer is krap.
:-)

only kidding. i seem to remember that konquerer has specific settings for
script execution - it may be worth checking out the setup...

Steve

Scott [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 I have a database browser that I made with php and mysql.  When I use it
in
 Netscape it behaves normally.  However when I view it using Konquerer, all
 kinds of php code shows up on the screen when I execute a php page.  I
 thought that Konquerer might not be recognizing the ? and ? start and
end
 tags so I tried script language=php and /script.  However if I use
 these nothing at all shows up on the screen.  Can someone tell me what the
 problem is?
 Thanks,
 SW



-- 
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] numrows

2001-08-23 Thread Steve Brett

i'd have a look at the table structure.

also if you're using  to denote inequality then use !=

both of the previous posts are incorrect

Steve

Chris Fry [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Should be ORDER BY ID, DESC

 Chris

 Martin Kampherbeek wrote:

  What's wrong with this? I get the error: Warning: Supplied argument is
not a valid MySQL result resource in
/home/sites/site49/web/vragen/vragen.php on line 42
 
  $query = SELECT * FROM question WHERE answer'1' AND id250 ORDER BY
id DESC;
 
  $result = MYSQL_QUERY($query);
 
  $number = MYSQL_NUM_ROWS($result);

 --

 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]




Re: [PHP] while loop with if statement - here's the attachment

2001-08-20 Thread Steve Brett

did you do it again ?

:-)

pasting you code is ok ...

Steve
[EMAIL PROTECTED] wrote in message
BB6D932A42D6D211B4AC0090274EBB1D2EF0EE@GLOBAL1">news:BB6D932A42D6D211B4AC0090274EBB1D2EF0EE@GLOBAL1...

 Here's the attachment - I hate it when I do that! :)



 -Original Message-
 From: [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: 8/20/01 10:25 AM
 Subject: [PHP] while loop with if statement

 I can't figure out why the if statement isn't working.  The page
 displays
 the same with or without the if statement. Any idea what I'm doing
 wrong?

 I attached the code in a word document.

 Thank you, Shawna


 --
 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 with if statement - here's the code

2001-08-20 Thread Steve Brett

try using mysql_num_rows() to get the number of rows returned by the query.
you need to supply it with the identifier for the query not the sql you sent
to the query. not exactly sure what you're trying to do though ...

Steve

[EMAIL PROTECTED] wrote in message
BB6D932A42D6D211B4AC0090274EBB1D2EF0F0@GLOBAL1">news:BB6D932A42D6D211B4AC0090274EBB1D2EF0F0@GLOBAL1...
 Thanks Steve! :)  Here's the code:

 ?

 $results = mysql_db_query($db, select *  from $table where $query order
 by update_datetime desc limit $offset, 10);

 while($one = mysql_fetch_array($results)){
 $id=$one[id];
 $title=$one[title];
 $description=$one[description];

 print 
 TRTD VALIGN=TOPimg src=/assets/images/bullet.gif width=10
 height=8/TDTDFONT FACE=VERDANA,ARIAL,HELVETICA,SANS-SERIF SIZE=2A
 HREF=/view_top.php3?id=$id$title/ABR$description/TD/TR\n
 TRTD VALIGN=TOP COLSPAN=2img src=/assets/images/spacer.gif
 width=10 height=6/TD/TR\n
 ;
 };

$numrows=mysql_num_rows($one);

 if($numrows= =0)
 {
 print 
 TRTDFONT FACE=VERDANA,ARIAL,HELVETICA,SANS-SERIF SIZE=2NO
 RESULTS/TD/TR\n
 TRTD VALIGN=TOP COLSPAN=2img src=/assets/images/spacer.gif
 width=10 height=6/TD/TR\n
 ;

 }

 ?




-- 
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 with if statement - here's the code

2001-08-20 Thread Steve Brett

okay - read all the code now.

this might be a better way:

?php

$results = mysql_db_query($db, select *  from $table where $query order
by update_datetime desc limit $offset, 10);

$one = mysql_fetch_array($results);

$numrows=mysql_num_rows($one);// get the number of results
if ($numrows0)
{
for ($x=0;$x$numrows;$x++)
{
$id=$one[id];
$title=$one[title];
$description=$one[description];

print 
TRTD VALIGN=TOPimg src=/assets/images/bullet.gif width=10
height=8/TDTDFONT FACE=VERDANA,ARIAL,HELVETICA,SANS-SERIF SIZE=2A
HREF=/view_top.php3?id=$id$title/ABR$description/TD/TR\n
TRTD VALIGN=TOP COLSPAN=2img src=/assets/images/spacer.gif
width=10 height=6/TD/TR\n
;
} // end of for
}
else
{
print 
TRTDFONT FACE=VERDANA,ARIAL,HELVETICA,SANS-SERIF SIZE=2NO
RESULTS/TD/TR\n
TRTD VALIGN=TOP COLSPAN=2img src=/assets/images/spacer.gif
width=10 height=6/TD/TR\n
;
}
?




-- 
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: Multi-Task on PHP by submitting a form!

2001-08-20 Thread Steve Brett

you're there already.

have an if statement on mail.php:

if (isset($posted_info))
{

// send mail here

// do db insert here

} // end of if

Steve


Jack [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Dear all
 I was trying to get a user input form to insert to a mysql_database and
 e-mail to me!
 Is it possible to make php perform two task in one single submit button?

 The form will post the input -- mail.php.

 In the mail.php, i was thinking to add another process just after the mail
 process had finish, which will insert the data from the from to
 mysql_database.

 Thx
 Jack
 [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] Instalation

2001-08-14 Thread Steve Brett

i think pgp has a quick install text file that is superb.
sorta step-by-step simple and complicated.

Steve
Jean-Arthur Silve [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
check de readme or install files provided in each one !

At 15:39 14/08/01 +0200, Roman wrote:
Help me. I have RED HAT Linux 7.0 and I want install Apache web server with
php and mysql support. How ?

I have : apache_1.3.20.tar.gz
php-4.0.6.tar.gz
mysql-3.23.38.tar.gz

thanx


 roman




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


EuroVox
4, place Félix Eboue
75583 Paris Cedex 12
Tel : 01 44 67 05 05
Fax : 01 44 67 05 19
Web : http://www.eurovox.fr





-- 
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: session security issue

2001-08-14 Thread Steve Brett

what about registering a var called loggedin with the session and then
testing on each script to see if it's set to 1 or something ?

then base the access on that ? that's what i use and then register uid with
the session as well so you can use it througout your site ...

ok you've got me worried now, are there any problems with security doing it
that way 

Steve

Christian Dechery [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 I have pages that uses session for security that looks something like
this:

 ?php
 session_start();

 if( !isset($uid) )
 {
 include(include/auth.inc.php);
 auth_user();
 }

 more code...
 ?

 so $uid tells me if the user is logged on or not...

 but what if somebody calls the script directly from the address bar like
 this: http://server/script.php?uid=10

 wouldn't this be a security problem?
 
  Christian Dechery (lemming)
  http://www.tanamesa.com.br
  Gaita-L Owner / Web Developer




-- 
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: it works at last!

2001-08-13 Thread Steve Brett

oh dear.

Steve
[EMAIL PROTECTED] [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]...
 Okay I got it working!

 http://www.futurebird.com/wordstream/index.php3

 go on give it a try!

 Susan


 --
 [EMAIL PROTECTED]
 http://futurebird.diaryland.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]




Re: [PHP] CGI error

2001-08-09 Thread Steve Brett

i tend to get this error when the page being called doesn't exist.

check the link and the file name

Steve

Phil Driscoll [EMAIL PROTECTED] wrote in message
01080909463405.04245@linux">news:01080909463405.04245@linux...
 On Thursday 09 August 2001 09:46, karthik wrote:
  Hi,
 
  In install.txt there seems to be settings on how to install under
various
  web servers.

 Well what about this bit:

   You have installed PHP, but when try to access a php script file via
your
   browser, you get the error:
cgi error:
The specified CGI application misbehaved by not returning a complete
set of
HTTP headers. The headers it did return are:

This error message means that php failed to output anything at all.
From the command line hange to the directory containing php.exe. Run
php.exe -i
If php has any problems running, then a suitable
error message will be displayed which will give you a clue as to what
 needs to
be done next. If you get a screen full of html codes (the output of the
phpinfo() function) then php is working ok.

Once php is working at the command line, try accessing the php script
via
 the browser again.
If it still fails then it could be one of the following:

file permissions on your php script, php.exe, php4ts.dll, php.ini or
any
 php
extensions you are trying to load are such that the anonymous internet
user
ISUR_machinename cannot access them.

The script file does not exist (or possibly isn't where you think it is
relative to your web root directory). Note that for IIS you can trap
this
 error by ticking
the 'check file exists' box when setting up the script mappings in the
 Internet Services
Manager. If a script file does not exist then the server will return a
404
 error instead.
There is also the additional benefit that IIS will do any
authentication
 required for you
based on the NTLanMan permissions on your script file.
 --
 Phil Driscoll



-- 
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: Error using databases

2001-08-03 Thread Steve Brett

check the cache settings in IE and change to check for new version always.

sounds like you're reading a cached version of your page.

Steve

Jorge Fernando Tamez Seceñas wrote in message
news:[EMAIL PROTECTED]...
Hi:

I'm coding my first programs in PHP using MySQL in Windows. I
instaled the Xitami Web Server for Windows.

I have a simple table catalog that includes 3 fields and one php
script that insert records into the table catalog using a the label FORM
and it works ok.

I have another php script that print a the records in a table of
HTML and it doesn't work correctly. The fisrt time I run this code works Ok,
but then I go to add a new record using the fisrt code and then return to
scrip that print the table and it doesn´t consider the last records I added.
I make the consult in mysql.exe and effectively there are the new records. I
have to suthdown the server and start again and the second script work
correclty.

I have been locking how to solve this problem by myself but a
couldn´t. I think that it's a basic problem but I'm beginning in this
programs.

If somebody can help me i would be thankful.

Thanks.
George Tamez





-- 
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] file upload problem - urgent help needed

2001-07-31 Thread Steve Brett

i know this has been posted before but i still haven't figured it out.

the bloke who runs the server for a 'client' of mine has set safe mode on
and therefore the standard file upload scripts fail.

i needed to create a 'dump' of the database in text files whihc i've done by
creating a dir within the httpd dir and chaning the permissions but when i
try to upload files i keep running into the problem whereby php can't write
to the temp dir as it uploads the file.

i get various errors from '. safe mode in operation...' to 'user blah
blah does not have permission to write to /foo/bar/tmp'.

is there ANY way round this ?

Steve



-- 
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: Upgrading to Windows 2000

2001-07-31 Thread Steve Brett

instalation under windows 2000 is very simple. just reinstall php.

Steve

Amarjit Jutley [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 We are presently running PHP on a Windows NT 4.0 platform and all is
working
 correctly, we however want to upgeade to Windows 2000 server platform

 My question is the application compatible with Windows 2000.

 I cannot find the version but listed the size and date of the files
 installed.

 PHP.exe20kb12/10/2000
 PHP.ini24Kb06/10/2000
 php4ts.dll964kb12/10/2000

 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] Re: exec problem

2001-07-31 Thread Steve Brett

if you have a shell account write a batch file and install it in the crontab
of the user whihc mysql runs under.

i did this at work for a postgresql database and it owrks perfectly.

something like this will work.

crontab -u user -e

add:
30 7-19/2,23 * * * /backup/dumpit

which runs /backup/dumpit every 2 hours  at 30 mins past the hour between
7am and 7 pm and then again at 11 pm

dumpit consists of:

#!/bin/sh
backdate=$(date +%Y%m%d%H%M.gz)
/usr/local/pgsql/bin/pg_dump XXX  | gzip  /backup/edb-backup_$backdate
cp /backup/edb-backup_$backdate /var/autofs/misc/ecalnet/

so i effect the file creates a file called edb-backup_date and time which
is a zipped copy of the dump file.

should be simple for you to substitute the mysql dump commands etc.

Steve




[EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Hi I'm trying to create a script which my cron will run once a day to
backup
 my MySQL database, but the exec command doesn't want to work no matter
what I
 try...

 exec(mysqldump -h localhost -u user -p pass --opt DataBase 
 BACKUPS/backup.mysql) or die(Problem);

 I have tried adding the full path to mysqldump, I have tried using my root
 access, I have tried using a different dir to store the files, changed
 permissions all sorts and nothing works. It always returns Problem and
if I
 take out the or die then it just returns a blank screen. I also tried
system
 () and that gave the same results.

 Anyone have any other ideas???

 TIA


 __
 -Ade

 ~~Good things come to those who wait~~



-- 
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: window.open (javascript)

2001-07-31 Thread Steve Brett

ive used a very similar function and found that javascript like single
queted strings passed into it.

i.e. java_function('link/to/file')

just noticed in the original post that double quotes were used

Steve

Dave [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 have used the following on occasion,

 script language=Javascript
 function Popup(page) {
 OpenWin = this.open(page, PopupWindow,

'toolbar=1,location=1,directories=1,status=1,menubar=1,scrollbars=1,resizabl
e=1,
 width=775,height=500');
 }
 /script

 a
href=javascript:Popup('http://mydomain.url/file.php?var=value')link/a

 don't recall any problems

 Dave

 -Original Message-
 From: elias [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, July 31, 2001 9:42 AM
 To: [EMAIL PROTECTED]
 Subject: [PHP] Re: window.open (javascript)
 
 
 can you show us the code that does the window.open('myfile.php?test=hey')
 for example ?
 
 Eduardo Kokubo [EMAIL PROTECTED] wrote in message
 016e01c119b4$d784d920$a102a8c0@cttmar">news:016e01c119b4$d784d920$a102a8c0@cttmar...
 I passed some vars to another page using window.open and it worked fine
(but
 had to hide the toolbar). The problem is that wen I check their values
like
 this:
 ?php
 if ($test){
   print bTest: /b;
   print $test;
   print brbr\n;}
 
 if ($adicionais){
   print bInformações adicionais: /b;
   print $adicionais;
   print brbr\n;}
 
 ?
 This code always prints Teste and a 0 when it shouldn't print anything.
 
 ?php
 if ($test != 0){
   print bTest: /b;
   print $test;
   print brbr\n;}
 
 if ($adicionais != 0){
   print bInformações adicionais: /b;
   print $adicionais;
   print brbr\n;}
 
 ?
 
 This one never prints anything. When I use   or ' ' to check the 0, it
 happens the same thing that the first code.
 The other vars that don't use if are working fine. Can anybody please
 explain this?
 
 
 
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]
 
 
 




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




[PHP] Re: Session life time

2001-07-31 Thread Steve Brett

check this in php.ini

session.gc_maxlifetime specifies the number of seconds after which data will
be seen as 'garbage' and cleaned up

Steve

Sheni R. Meledath [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Hi,

 I am using sessions for user authentication on one of our sites. I want to
 set up a time period for each session, ie, after a particular time period
 the session should automatically expire. How can this be achieved? Could
 you please help me.

 Many thanks
 Sheni R Meledath
 [EMAIL PROTECTED]




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




[PHP] Re: Upgrading to Windows 2000

2001-07-31 Thread Steve Brett

indeed.

i also use the cgi version.

Steve

Bernie Kruger [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Hi,

 I am running PHP 4.0.5 on Win2K.  The ISAPI module gave me lots of
headaches
 and crashed the server every other minute, but the CGI one runs like a
 dream.  I am using IIS5.

 BK

 Amarjit Jutley [EMAIL PROTECTED] wrote in message
 [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
  We are presently running PHP on a Windows NT 4.0 platform and all is
 working
  correctly, we however want to upgeade to Windows 2000 server platform
 
  My question is the application compatible with Windows 2000.
 
  I cannot find the version but listed the size and date of the files
  installed.
 
  PHP.exe20kb12/10/2000
  PHP.ini24Kb06/10/2000
  php4ts.dll964kb12/10/2000
 
  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] Re: declaring variables in PHP???

2001-07-24 Thread Steve Brett

the zend ide @ www.zend.com is a pretty cool debugging env.

Steve

René Moonen [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
Hi,

I'm using PHP for a few weeks now, so you can imagine that I'm making a
lot of typing errors...

Often I make a typing error in one of the variable names ($helo instead
of $hello or worse still $Hello instead of $hello). Since PHP does not
care about declaring variables before using them, it is very easy to
overlook such  small typing error in a large PHP script.

In the old days of ANSI C, there where things like LINT that would help
you with these problems. Of course in ANSI C these things were easier,
because of the fact that variables need to be declared before they could
be used.

My questions:
1. can you configure PHP in such away that variables need to be
declared?
2. are there source code checking tools that could help me locate
problems like described above?


Thanks for your help

René





-- 
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 stand alone

2001-07-24 Thread Steve Brett

i don't think the last post was right, there is some stuff at phpbuilder
about using php with shell access, i guess you could write a shell script
that is called from cron ...

here you go ... http://www.phpbuilder.com/columns/darrell2319.php3

Steve

Adrian D'Costa [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Hi,

 How do I compile php to work as a stand alone.  Right now it is working
 thru the web but need to run it from a cron job.

 TIA

 Adrian




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

2001-07-23 Thread Steve Brett

'order by text asc' will sort in alphabetical order A-Z

.. and your query should be select [campo] from table where campo like 'A%'

... seems like an expensive way of sorting ...

i think mysql has natural order sorting functions in there somewhere ...

Steve

Marisol díaz e. [EMAIL PROTECTED] wrote in message
000e01c1113b$5df255f0$[EMAIL PROTECTED]">news:000e01c1113b$5df255f0$[EMAIL PROTECTED]...
 select [campo] from [tabla] order by [campo]

 if you want for each leter

 select [campo] from [tabla] where  [campo] like 'A'

 Marisol
 - Original Message -
 From: Erich Kolb [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Friday, July 20, 2001 11:32 AM
 Subject: [PHP] PHP  MySQL


  When you query a MySQL Database, how do you set the order
alphabetically?
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  To contact the list administrators, e-mail: [EMAIL PROTECTED]
 




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




[PHP] Re: One2Many Logic Problem - phpMySQL bibliography

2001-07-23 Thread Steve Brett

wouldn't the structure of the database be determined by the fact you have a
many to many relationship ?
i.e. the two tables would decompose into three with a 'link' table defining
the many to may part ?

steve

Mike Gifford [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Hello,

 I'm not sure if anyone else as the need for a php/MySQL based
bibliography, but
 the application that I am developing (which is basically a module for
phpSlash)
 is coming along fairly well.  If anyone is interested in seeing the code I
can
 bundle it up and send it out to them (still a long way from finished
mind).  The
 draft version of it is up and running here:
 http://openconcept.ca/WLP/biblio/index.php3

 I'm running into a couple problems though that I don't have the logic
language
 for and I was hoping folks here could help me (as you have done in the
past).

 The problem is that I've set up a many to many table to ensure that I can
have
 an author be listed as writing many books and a book be written by many
authors.

 However in listing the books as a bibliography (as the URL above), I want
to be
 able to list multiple authors, and do so in a different format for the
first
 author than for all subsequent ones.

 I'm hoping to be able to produce output like this:
 Young, D. and N. Dixon. Helping Leaders Take Effective Action: A Program
 Evaluation. Greensboro, North Carolina: Center for Creative Leadership,
 1996.


 So, I think the first challenge should be to calculate which books have
multiple
 authors by doing something like this (It's using phplib structures,
sorry):

 $q2  = SELECT * FROM WLPbib2profile ORDER BY bibID;
 $this-db-query($q2);  // Performs above query
 while ($this-db-next_record()) {
 if ($this-db-Record[bibID] != $last_bibID) {
 echo br . $this-db-Record[bibID] .  :  .
$this-db-Record[profileID];
 } else { // Multiple Authors
 echo ,  .  $this-db-Record[profileID];
 $multiple_profileID .= array ($this-db-Record[bibID] =
 $this-db-Record[profileID]);
 $multiple_profileID .= array($this-db-Record[bibID] =
 yes);
 }
 $last_bibID = $this-db-Record[bibID];
 }
 }

 With this I can then use the value $multiple_profileID to determine if
this
 record has duplicates or not and use something like this to include both
authors
 and not repeat the bibliography item:

 if ($multiple_profileID[$bibID]==yes) {
 while (list($key, $val) = each($multiple_profileID)) {
 $written_by =  $key .  :  . $val . br;
 if ($this-db-Record[firstName]) {
 $written_by .= stripslashes($this-db-Record[firstName]) .  ;
 }
 if($this-db-Record[lastName]) {
 $written_by .=  stripslashes($this-db-Record[lastName]);
 }
 }
 } else {

 if($this-db-Record[lastName]) {
 $written_by .=  stripslashes($this-db-Record[lastName]) . , ;
 }
 if ($this-db-Record[firstName]) {
 $written_by .= stripslashes($this-db-Record[firstName]);
 }
 }

 But this seems really awkward (at the best of times) and (worst of all) it
isn't
 working.

 I've got another related problem in that I've set up the following fields
in one
 table:
 firstName
 lastName
 organization

 and I need to be able to order them by a combination of lastName 
organization.
   I could list the organization field simply as the lastName, but that
seems
 like it would be confusing the data types...  Must be a way around this..
I
 suspect it is limited by my logic  not PHP's.

 Any ideas would be appreciated.

 Mike
 --
 Mike Gifford, OpenConcept Consulting, http://openconcept.ca
 Offering everything your organization needs for an effective web site.
 Abolish Nuclear Weapons Now!: http://pgs.ca/petition/
 It is a miracle that curiosity survives formal education. - A Einstein




-- 
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: Zipping Output Before Sending To Browser

2001-07-20 Thread Steve Brett

yup.
what you need is ob_start(ob_gzhandler); at the beginning of the bit you
want to compress, usually at the top of the script and //ob_end_flush(); to
send the output to the browser.

bit of a time lag as the browser decompresses but should save you a bomb on
bandwidth.

check out the php manual for the full descriptions.

Steev

Corin Rathbone [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Hi,
 I read a while ago somewhere that is possible in PHP to zip or gzip or
just
 compress the output of a PHP file before sending it to a browser.
Apparently
 the browser can then uncompress this and output the finished page. This
 would be very useful as one of my scripts outputs about 1.5Mb of data.
Does
 anybody know how to do this? Any help most appreciated.

 Regards,
 Corin Rathbone
 [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] Prevent user to close web browser

2001-07-19 Thread Steve Brett

have a javascript function that is fired when you load the index page.

i have a calendar system that i wrote at work that is displayed in a window
with most of the features turned off like toolbars etc.

have a look at 'on load' and window properties.

it's a doddle.

and no i didn't find it on a porn site. ;-)

Steve

Slavomir Slizik [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 So, try to surf some free erotic,porn sites. They're full of that
 window-spawing stuff :(

 slavko


 On Thu, 19 Jul 2001, kath wrote:

  Not with PHP.  Maybe some Javascript could.
 
  But why would you want this?  Planning some infinite spawning pop up
website?
  =)
 
  - k
 
  On Thursday 19 July 2001 08:28 am, you wrote:
   Hello,
  
   I need to prevent user to close the web browser on close button or by
   pressing ALT+F4.
  
   Is this possible?
  
   Thanks,
   Mihailo.
  
  
   _
   Do You Yahoo!?
   Get your free @yahoo.com address at http://mail.yahoo.com
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  To contact the list administrators, e-mail: [EMAIL PROTECTED]
 




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




[PHP] Re: Sessions + Variables + includes

2001-07-19 Thread Steve Brett

great minds and all that 
this is some code  i use but i have a login page that takes the username and
passowrd and passes that to another page that does the verification.

so:
page 1 takes the username and password.
page 2 registers session vars and sets logged in to true if accepted.

every page from then on has this include file

?php
session_start();
if ($loggedin != true)
{
 echo'headmeta HTTP-EQUIV=Refresh CONTENT=0;URL=login.php/head';
 session_destroy();
 exit;
}

i use the meta http=equiv to direct them to the index page of the site
if they are verified.

Steve

Dosenbrei [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...


 Hi

 Sorry for my bad english ;-)

 I'm writing an application using php and sessions.
 In the first include file i'm writing something like this

 session_start();
 session_register(loggedin);

 The i have another include file with the functions.
 When i'm submitting the username and passwort to the function
 which checks them i'd like to set loggedin to 1 how does this work?

 function CheckLogin($username,$password)
 {
 if($username=='test'  $password=='user')
 {
 $loggedin=1;
 header(location:secretpage.php);
 }
 else
 {
 $loggedin =0;
 header(location:login.php)
 }

 Can i user include with sessions or doe i have to use requiere?
 I also tried to set the $loggedin to 1 this way:

 $HTTP_SESSION_VARS[loggedin]=1;

 This doesn't work too.

 Please help me


 THX



-- 
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: Basic database questions.

2001-07-19 Thread Steve Brett


Seb Frost [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Hi everyone, this is my first ever post on the list so please be gentle
with
 me ;-)

 OK I want to put a database on my website.  Up until yesterday my
knowledge
 of databases was having created a very simple one when I was about 15 for
 GCSE IT.  Don't ask how, but I've always avoided them, learning c++ and
all
 the rest of it instead.  SO, I'm pretty computer literate, but know
nothing
 about databases.

 SO I'm told I should use PHP and MySQL.  Been learning PHP for the last
day
 or so, seems easy enough (so far!)

 But I'm confused.

 1) Is MySQL just a set of instructions for querying a database or is it an
 actual format for storing a database.  Somehting I read suggested that
MySQL
 should be used to access Acess DB's - wtf?


mysql is a database management system that is relational to a certain extent
(no flames).
php has an abstraction layer that allows php to interface directly with
mysql (and other 'better' databases such as postgresql) via a port (5432 in
the case of postgresql).
drop access from your mind altogether. you simply don't need to use it if
you use mysql.

 2) OK so I can see how the mysql instructions will get data from a
database
 but how do I create the little bastard in the first place?  SHOULD I be
 using something like access?  It makes no sense to me!


get mysql and install it. then get a front end editor like mysql-front or
pg_admin for mysql.
you can either use the front end to create your database or do it via the
command line using SQL.

 Sorry for the dumb questions, but I need soem dumb answers!  It seems
 everything about MySQL on the web is directed at people who have used
 databases extensively.


to be hones that's true to a certain extent but i always thought of mysql
being the access of open source dbs (just to cnfuse you further!!!) but it
certainly isn't the case. not as robust as postgresql for 100's of
concurrent users but feature rich and easy to use.

time to jump off the micro$oft bandwaggon - you'll never look back !!

Steve
 thanks everyone,

 - seb




-- 
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: Session problems

2001-07-19 Thread Steve Brett

id' resgister the session var first then change / set it.

don't actually know if it makes a diff 

Steve
Bernie Kruger [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Hi,

 I use this simple session script below,  but the session variables are not
 carried over from 1.php to 2.php.  What can be wrong?  I can see on the
 server that the files are created.  When I open 1.php a 1K file is created
 on the server and the contents (my_session_variable|s:10:some value;).
 When I open 2.php afterwards a 0K file is created on the server which is
 empty.

 I use IIS5, Win2k, PHP 4.0.5, IE5.5.
 Session method: files

 (1.php)

 ?php
 session_start();
 $my_session_variable = some value;
 session_register(my_session_variable);
 ?

 and

 (2.php)

 ?php
 session_start();
 print Value of 'my_session_variable': $my_session_variable;
 ?

 Tx
 BK





-- 
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: Session problems

2001-07-19 Thread Steve Brett

another thing you could try is find out where the php session data is stored
and see if the session files are there - i think on win2k they are in
c:\php\sessiondata ...


Steve
Bernie Kruger [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Hi,

 I use this simple session script below,  but the session variables are not
 carried over from 1.php to 2.php.  What can be wrong?  I can see on the
 server that the files are created.  When I open 1.php a 1K file is created
 on the server and the contents (my_session_variable|s:10:some value;).
 When I open 2.php afterwards a 0K file is created on the server which is
 empty.

 I use IIS5, Win2k, PHP 4.0.5, IE5.5.
 Session method: files

 (1.php)

 ?php
 session_start();
 $my_session_variable = some value;
 session_register(my_session_variable);
 ?

 and

 (2.php)

 ?php
 session_start();
 print Value of 'my_session_variable': $my_session_variable;
 ?

 Tx
 BK





-- 
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: Basic database questions.

2001-07-19 Thread Steve Brett

i meant for writing your code etc and testing.

i generally write stuff on my windows machine and then ftp them to the
production server after i've tested/debugges them etc.

Steve

Seb Frost [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Im using win2k, but I have no intetntion of serving a webpage off of it, I
 only have a 56k modem!  I'll be running the website off of an ISP.  Do I
 still need to install IIS and stuff?  What for?

 - seb

 -Original Message-
 From: Steve Brett [mailto:[EMAIL PROTECTED]]
 Sent: 19 July 2001 15:33
 To: [EMAIL PROTECTED]
 Subject: Re: [PHP] Re: Basic database questions.


 you can get mysql font from http://www.anse.de/mysqlfront/

 be sure to install mysql first though.
 if you're using windows 2000 then get php from http://www.php.net and
 install after installing IIS5
 then install mysql front.

 the  nice thing about it is the installers are superb and you can get away
 with installing the three progs and off you go.

 let me know if you need any further help.

 Steve

 Seb Frost [EMAIL PROTECTED] wrote in message
 [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
  Thanks Steve that's exactly the kind of 100% definate answers I needed
:-)
  Hadn't seen nor heard of front ends for it, will look into them!
 
  - seb
 
  -Original Message-
  From: Steve Brett [mailto:[EMAIL PROTECTED]]
  Sent: 19 July 2001 14:27
  To: [EMAIL PROTECTED]
  Subject: [PHP] Re: Basic database questions.
 
 
 
  Seb Frost [EMAIL PROTECTED] wrote in message
  [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
   Hi everyone, this is my first ever post on the list so please be
gentle
  with
   me ;-)
  
   OK I want to put a database on my website.  Up until yesterday my
  knowledge
   of databases was having created a very simple one when I was about 15
 for
   GCSE IT.  Don't ask how, but I've always avoided them, learning c++
and
  all
   the rest of it instead.  SO, I'm pretty computer literate, but know
  nothing
   about databases.
  
   SO I'm told I should use PHP and MySQL.  Been learning PHP for the
last
  day
   or so, seems easy enough (so far!)
  
   But I'm confused.
  
   1) Is MySQL just a set of instructions for querying a database or is
it
 an
   actual format for storing a database.  Somehting I read suggested that
  MySQL
   should be used to access Acess DB's - wtf?
  
 
  mysql is a database management system that is relational to a certain
 extent
  (no flames).
  php has an abstraction layer that allows php to interface directly with
  mysql (and other 'better' databases such as postgresql) via a port (5432
 in
  the case of postgresql).
  drop access from your mind altogether. you simply don't need to use it
if
  you use mysql.
 
   2) OK so I can see how the mysql instructions will get data from a
  database
   but how do I create the little bastard in the first place?  SHOULD I
be
   using something like access?  It makes no sense to me!
  
 
  get mysql and install it. then get a front end editor like mysql-front
or
  pg_admin for mysql.
  you can either use the front end to create your database or do it via
the
  command line using SQL.
 
   Sorry for the dumb questions, but I need soem dumb answers!  It seems
   everything about MySQL on the web is directed at people who have used
   databases extensively.
  
 
  to be hones that's true to a certain extent but i always thought of
mysql
  being the access of open source dbs (just to cnfuse you further!!!) but
it
  certainly isn't the case. not as robust as postgresql for 100's of
  concurrent users but feature rich and easy to use.
 
  time to jump off the micro$oft bandwaggon - you'll never look back !!
 
  Steve
   thanks everyone,
  
   - seb
  
 
 
 
  --
  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] Re: Session problems

2001-07-19 Thread Steve Brett

you only need to register vars with the session once.

Steve

Rudolf Visagie [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Hi Bernie,

 Do a session_register in the second script as well:
 ?php
  session_start();
  session_register(my_session_variable);
  print Value of 'my_session_variable': $my_session_variable;
  ?

 Rudolf Visagie

 -Original Message-
 From: Bernie Kruger [mailto:[EMAIL PROTECTED]]
 Sent: 19 July 2001 04:55
 To: [EMAIL PROTECTED]
 Subject: [PHP] Re: Session problems


 Tried everything all of you suggested, still no luck :-(

 BK

 Bernie Kruger [EMAIL PROTECTED] wrote in message
 [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
  Hi,
 
  I use this simple session script below,  but the session variables are
not
  carried over from 1.php to 2.php.  What can be wrong?  I can see on the
  server that the files are created.  When I open 1.php a 1K file is
created
  on the server and the contents (my_session_variable|s:10:some value;).
  When I open 2.php afterwards a 0K file is created on the server which is
  empty.
 
  I use IIS5, Win2k, PHP 4.0.5, IE5.5.
  Session method: files
 
  (1.php)
 
  ?php
  session_start();
  $my_session_variable = some value;
  session_register(my_session_variable);
  ?
 
  and
 
  (2.php)
 
  ?php
  session_start();
  print Value of 'my_session_variable': $my_session_variable;
  ?
 
  Tx
  BK
 
 



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



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




[PHP] Re: mail() help

2001-07-17 Thread Steve Brett

as afr as i know it's a recompile with a path to sendmail ...
great when it works though !

Steve

Patrick W. Rateliff [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 I am getting this error when using the trying to use the mail function.
Any
 insite will help, I have been up for too long working on a few projects
and
 my brain is damn near melted.


 mail() is not supported in this PHP build in

 so when I built PHP 4.06 I am assuming I missed a option, but just want to
 make sure before i head back and re-do things.  Is there a simple option
to
 turn on the mail support.





-- 
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] how to include a remote file and change relative links to non-relative

2001-07-17 Thread Brett

I am trying to create a page that will get a remote file and email it to me.  All 
works fine using several different methods (include,file,fread) only relative links 
for images and links get my server address instead of the actual address the images 
should be retrieved from.

Is there a way I can get the remote file and make all relative links for images and 
such point where they should?

Thanks,
bubba



[PHP] Re: echo vs printf

2001-07-16 Thread Steve Brett

don't echo and printf do different jobs ?

as i understand it echo will dump anything to screen, fprint will accept
formatted text args like you owe me %d dollars,$owed_amount) or something
like that.

i kind of use print by itself (harking back to the old days of basic etc)
but use echo quite a lot. only use printf when i have to put cash amounts in
and stuff like that.

Steve

Brother [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Why should I use printf instead of echo and vice versa?

 As for today I use printf mostly but I don't know why.

 brother
 Mail: [EMAIL PROTECTED]
 UIN: 4722160
 Web: http://motd.st




-- 
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: string search

2001-07-16 Thread Steve Brett

have a look at ereg() (regular expression match)  functions in manual.
they'll do exactly what you want.

Steve

Joseph Bannon [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 I need a search function (if statement) that performs a search on a string
 and if the string contains something like aol.com, performs another
 function. Can anyone help me? Thanks.

 Joseph



-- 
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] escape char hell

2001-07-16 Thread Steve Brett

hi,

i've got myself into a bit of a mess. i have a database with approx 4000
records (mysql) and when  i populated the database i was given 4000 text
files with the product name as the file name and the description of the
product as the contents.

so i set up a text field in the table to hold the descriptions and wrote a
script in php to handle the import. all went well, client impressed etc, but
now i'm running into problems with allsorts of escape chars in the
description field and am looking for a script that will strip the escape
chars from the database ...

anyone had similar problems ? new records added to the db now have all html
chars translated on input and translated on query.

many thanks,

Steve



-- 
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: escape char hell

2001-07-16 Thread Steve Brett

sorry  posted to wrong group

Steve

Steve Brett [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 hi,

 i've got myself into a bit of a mess. i have a database with approx 4000
 records (mysql) and when  i populated the database i was given 4000 text
 files with the product name as the file name and the description of the
 product as the contents.

 so i set up a text field in the table to hold the descriptions and wrote a
 script in php to handle the import. all went well, client impressed etc,
but
 now i'm running into problems with allsorts of escape chars in the
 description field and am looking for a script that will strip the escape
 chars from the database ...

 anyone had similar problems ? new records added to the db now have all
html
 chars translated on input and translated on query.

 many thanks,

 Steve





-- 
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] echo vs printf

2001-07-16 Thread Steve Brett

i seem to remember reading somewhere that print acts like (is) a function,
presumably returning false if  it cannot print to screen, whereas echo just
dumps it.

also you can drop vars in print like

print you have $points points;

whereas to echo it you'd have to concatenate the string.

Steve


Don Read [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...

 On 16-Jul-01 brother wrote:
  Why should I use printf instead of echo and vice versa?
 

 printf print-formated

 $a=12.3456;

 echo $a, 'BR';
 printf('%1.2fBR', $a);

 12.3456BR
 12.34BR

  As for today I use printf mostly but I don't know why.

 You prolly mean print; There may be some minor differences from echo,
 but i've never seen 'em.
 (i think they threw print in PHP to keep JAPHs happy).

 Regards,
 --
 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]




[PHP] www.oosha.com/phpdev/ - mailing list

2001-07-15 Thread Brett Shaw

Oosha.com's PhpDEV has got a mailing list if you would like to joing please
see below: -

To subscribe to the mailinglist, simply send a message with the word
'subscribe' in the Subject: field to the -request address of that list

To: [EMAIL PROTECTED]
Subject: subscribe

To subscribe to the digest, simply send a message with the word 'subscribe'
in the Subject: field to the following address.
To: [EMAIL PROTECTED]
Subject: subscribe

To send email to the mailinglist, write to the following address:
To: [EMAIL PROTECTED]

To unsubscribe from the mailinglist, simply send a message with the word
'unsubscribe' in the Subject: field to the -request address of that list
To: [EMAIL PROTECTED]
Subject: unsubscribe

To unsubscribe from the digest, write a email like this:
To: [EMAIL PROTECTED]
Subject: unsubscribe


[EMAIL PROTECTED]
[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] Alternative to phpMyAdmin

2001-07-13 Thread Steve Brett

if you install mysql on a windoze machine then you can administer ANY mysql
database going through the socket.

i do it all the time.


Steve

 -Original Message-
 From: Alexander Skwar [mailto:[EMAIL PROTECTED]]
 Sent: 12 July 2001 19:15
 To: Matthew Loff
 Cc: 'Steve Brett'; 'Steph'; [EMAIL PROTECTED]
 Subject: Re: [PHP] Alternative to phpMyAdmin
 
 
 So sprach »Matthew Loff« am 2001-07-12 um 14:07:16 -0400 :
  
  I second that recommendation-- MySQL-Front is downright excellent!
  
  http://www.mysqlfront.de/
 
 Well, but how is that going to work, if Steph wants to manage his
 databases on his providers server?
 
 Besides, mysqlfront is a Windows program...
 
 Alexander Skwar
 -- 
 How to quote: http://learn.to/quote (german) 
 http://quote.6x.to (english)
 Homepage: http://www.digitalprojects.com   |   
 http://www.iso-top.de
iso-top.de - Die günstige Art an Linux Distributionen zu kommen
   Uptime: 23 hours 13 minutes
 

--
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] Alternative to phpMyAdmin

2001-07-13 Thread Steve Brett

i'm sorry but i seem to be completely missing your point.

mysql accepts incoming requests on a specific socket (can't remember which
one, but postgresql is 5432) and therefore where you are is not an issue.

i administer databases via a modem connection that sit on servers somewhere
in the states.
i install mysql and php in windows and then develop at home, then i update
the live db throught mysql-front.

Steve

 -Original Message-
 From: Alexander Skwar [mailto:[EMAIL PROTECTED]]
 Sent: 13 July 2001 10:15
 To: Steve Brett; Alexander Skwar; Matthew Loff; Steve Brett; 'Steph';
 [EMAIL PROTECTED]
 Subject: RE: [PHP] Alternative to phpMyAdmin
 
 
  if you install mysql on a windoze machine then you can 
 administer ANY  mysql database going through the socket.
 
 Okay, for a development this may be fine, but I still fail to 
 see how a tool that runs on your own computer (no matter if 
 it's a Windows tool, or a Linux tool) can help you administer 
 databases which are not on the same computer (unless the 
 mysql database on the providers server can be contacted from 
 any machine and not just from localhost).
 
 -- 
 Homepage:http://www.digitalprojects.com   |   
 http://www.iso-top.de
 iso-top.de - Die günstige Art an Linux Distributionen zu kommen
 

--
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] Alternative to phpMyAdmin

2001-07-13 Thread Steve Brett

 -Original Message-

 From: Alexander Skwar [mailto:[EMAIL PROTECTED]]

 Sent: 13 July 2001 10:57

 To: Steve Brett; Alexander Skwar; Steve Brett; Matthew Loff; Steve

 Brett; 'Steph'; [EMAIL PROTECTED]

 Subject: RE: [PHP] Alternative to phpMyAdmin





  i'm sorry but i seem to be completely missing your point.

 

  mysql accepts incoming requests on a specific socket (can't

 remember



 You mean port, don't you?



i do indeed. gess who's psending most of his time at the minute socket
programming :-)

  one, but postgresql is 5432) and therefore where you are is not an

  issue.



 Well, the issue is, that normally, connects to mysql are NOT

 allowed from any arbitrary host. Normally, in safe setups,

 network connections to mysql are not possible. And if they

 are, you need to specify a ip from which connects are allowed.



this should be set up by your isp though so as part of a mysql package you'd
get this type of access to your db's

Steve

 --

 Homepage: http://www.digitalprojects.com |

 http://www.iso-top.de

 iso-top.de - Die günstige Art an Linux Distributionen zu kommen



Alexander Skwar [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
  i'm sorry but i seem to be completely missing your point.

 Yeah, seems like so :)

 
  mysql accepts incoming requests on a specific socket (can't remember

 You mean port, don't you?

  one, but postgresql is 5432) and therefore where you are is not an
  issue.

 Well, the issue is, that normally, connects to mysql are NOT allowed from
any arbitrary host.  Normally, in safe setups, network connections to mysql
are not possible.  And if they are, you need to specify a ip from which
connects are allowed.

 --
 Homepage:http://www.digitalprojects.com   |   http://www.iso-top.de
 iso-top.de - Die günstige Art an Linux Distributionen zu kommen



-- 
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] time compare in my sql

2001-07-12 Thread Steve Brett

have a look at date_format in the mysql help and pull your sate filed out as
a date

Steve

 -Original Message-
 From: Jack [mailto:[EMAIL PROTECTED]]
 Sent: 12 July 2001 21:04
 To: [EMAIL PROTECTED]
 Subject: [PHP] time compare in my sql
 
 
 Hi folks
 I have a filed in data type time , how would I compare the 
 value submited from the form with the value in that filed, 
 which is in format 11:00:00 ?
 When I do this in query:
 
 select * from table where time  = '12:00:00'; ( in order 
 select all records that have time before noon)
 
 it keeps saying sql syntax error.
 
 What should I do?
 Jack
 [EMAIL PROTECTED]
 Love your enemies, it will drive them nuts
 

-- 
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] Alternative to phpMyAdmin

2001-07-12 Thread Steve Brett

mysql front is by far my favourite

available from mysql download section.

Steve

 -Original Message-
 From: Steph [mailto:[EMAIL PROTECTED]]
 Sent: 12 July 2001 05:01
 To: [EMAIL PROTECTED]
 Subject: [PHP] Alternative to phpMyAdmin
 
 
 Hi all! I love phpMyAdmin, just makes life so easy :) But I 
 just moved my site, and phpMyAdmin isnt working on my server 
 yet, so does any one have any solid alternatives that I can install??
 
 Thanks, Steph
 

-- 
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] Oracle 8i + non perstistant database connections remaining open.

2001-07-10 Thread Steve Brett

you could move to a database that supports hot backups. postgresql perhaps ?

 -Original Message-
 From: Thies C. Arntzen [mailto:[EMAIL PROTECTED]]
 Sent: 10 July 2001 10:40
 To: Taylor, Stewart
 Cc: [EMAIL PROTECTED]
 Subject: Re: [PHP] Oracle 8i + non perstistant database connections
 remaining open.
 
 
 On Tue, Jul 10, 2001 at 09:32:32AM +0100, Taylor, Stewart wrote:
  Hello,
   
   
  I'm using
  OCI8 Revision 1.96
  Oracle Version 8.1
  Apache Apache/1.3.11
  Redhat Linux 6.2
  php 4.0.2
   
  I am connecting to my database using a non-persistant 
 connection (ocilogin).
  My applications run with no problems during the day.
 However, at the end
  of the day there is about 20 database connections still 
 open.  This has
  caused a problem because when the database is shutdown to 
 backup (overnight)
  and then restarted apache still retains the 20 connections. 
   This means
  that when users begin using the applications again in the 
 morning apache
  starts reusing the old connections plus creating some new 
 ones and causes
  users to be intermittently logged out/refused access/random 
 query failures
  etc..  The error messages logged when this happens are below:
  PHP Warning:  failed to rollback outstanding transactions!: 
 ORA-01012: not
  logged on
  PHP Warning:  failed to rollback outstanding transactions!:
  ORA-24324:service handle not initialized
   
  A quick fix to this problem is to shutdown apache when the 
 backup is run so
  all the connections are dropped/
   
  Hovever, should these connections be remaining open in the 
 first place?  Has
  anyone got any ideas?
 
 if you only use ocilogon and _not_ ociplogon the connection
 will be closed at request and, and apache/php will not keep
 then open - believe me!
 
 please triple check your setup and report back!
 
 tc
 
 -- 
 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] Average of column...

2001-07-10 Thread Steve Brett

$age_result = mysql_query(select AVG(age) as avgage FROM bat_rost WHERE
ownerID = '$teamID');
$row = mysql_fetch_row($age_result);
$average_age=$row[0];
echo Average age of .$teamID. is .$average_age;

or

$age_result = mysql_query(select AVG(age) as avgage FROM bat_rost WHERE
ownerID = '$teamID');
$row = mysql_fetch_array($age_result);
$average_age=$row[avgage];
echo Average age of .$teamID. is .$average_age;

read the php manual pages on stuff like mysql_fetch_row and
mysql_fetch_array etc.

Steve

 -Original Message-
 From: Jeff Lewis [mailto:[EMAIL PROTECTED]]
 Sent: 10 July 2001 16:54
 To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
 Subject: RE: [PHP] Average of column...
 
 
 This doesn't work:
 
 $age_result = mysql_query(select AVG(age) as avgage FROM 
 bat_rost WHERE
 ownerID = '$teamID');
 $row = mysql_fetch_object($age_result);
 $age=$avgage;
 echo Average age - .$teamID.$avgage;
 
 Neither does this:
 
 $age_result = mysql_query(select AVG(age) as avgage FROM 
 bat_rost WHERE
 ownerID = '$teamID');
 $res = mysql_fetch_row($age_result)
 $age=$res[0];
 echo Average age - .$teamID.$avgage;
 
 
  -Original Message-
  From: Remo Pini [mailto:[EMAIL PROTECTED]]
  Sent: Tuesday, July 10, 2001 11:41 AM
  To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
  Subject: RE: [PHP] Average of column...
 
 
  if you do a
 
  $res = mysql_fetch_row($age_result)
 
  $res[0] will be the value of AVG(age).
 
 
   -Original Message-
   From: Jeff Lewis [mailto:[EMAIL PROTECTED]]
   Sent: Tuesday, July 10, 2001 5:27 PM
   To: [EMAIL PROTECTED]
   Subject: [PHP] Average of column...
  
  
   I am trying to obtain the average age for a few teams in 
 my database.
  
   Am using the below code:
  
   $age_result = mysql_query(select AVG(age) FROM bat_rost 
 WHERE ownerID =
   '$teamID');
   while(($row = mysql_fetch_object($age_result))){
 $age=$row-age;
   echo Average age - .$teamID.$age;}
  
   How can I get the average age from this?
  
   Jeff
  
  
   --
   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] Socket Madness !!!!

2001-07-06 Thread Steve Brett

many thanks.

i settled for fgetc and checking for a NULL (ascii 0)

Steve

 -Original Message-
 From: David George [mailto:[EMAIL PROTECTED]]
 Sent: 05 July 2001 21:50
 To: Justin Farnsworth
 Cc: [EMAIL PROTECTED]
 Subject: Re: [PHP] Socket Madness 
 
 
 Justin Farnsworth wrote:
 
 Steve Brett wrote:
 
 does anyone know the ascii value for EOF ?
 
 
 I think it is four (CTRL-D), viz:
 
 | 00 nul| 01 soh| 02 stx| 03 etx| 04 eot| 05 enq| 06 ack| 07 bel|
 
 Actually EOT is not EOF.  There is no such ASCII character as 
 EOF.  It 
 is a condition not a character.  Different functions that use an EOF 
 condition have different ways of indicating it.
 
 There are examples at:
 http://www.php.net/manual/en/function.fgets.php
 
 Here is a link to PHP's feof function:
 http://www.php.net/manual/en/function.feof.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]




RE: [PHP] Single quote

2001-07-06 Thread Steve Brett


string stripslashes (string str)


Returns a string with backslashes stripped off. (\' becomes ' and so on.)
Double backslashes are made into a single backslash. 

Steve

 -Original Message-
 From: Andy [mailto:[EMAIL PROTECTED]]
 Sent: 06 July 2001 10:29
 To: [EMAIL PROTECTED]
 Subject: [PHP] Single quote
 
 
 I got a data file containing this line:
 $ 1'000'000.-
 
 Then I read and echo this line
 $fp = fopen ( $sFilename,r);
 $sData = fgets ( $fp, 1000 ) )
 
 echo $sData
 
 Now what came out is
 $ 1\'000\'000.-
 
 I tried to get rid of these slashes with
 ereg_replace( \\', ', $sData );
 but I had no luck.
 
 Who can help?
 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]




[PHP] Socket Madness !!!!

2001-07-05 Thread Steve Brett

Hi,

I need to set up a sockets connection to a server that was written in
Delphi.

Using the following code I can connect to the socket and send a message
through it but don't get a reply back ...

{
echo Socket opened ok ... sending messagebr;
$message=sprintf(Steve%c Hello world,255);
fputs($socket,$message);
echo fgets($socket, 255);
fclose($socket);
}

the socket is opened using fsockopen() and the message get there but i only
get the reply when the remote socket server is closed ...

can anyone help ?

thanks in advance
Steve Brett 
Internal Development
tel: 3263 
EMIS Ltd. 
Privileged and /or Confidential information may be contained in this
message. If you are not the original addressee indicated in this message (or
responsible for delivery of the message to such person), you may not copy or
deliver this message to anyone. In such case, please delete this message,
and notify us immediately. Opinions, conclusions and other information
expressed in this message are not given or endorsed by my firm or employer
unless otherwise indicated by an authorised representative independently of
this message.
Egton Medical Information Systems Limited. Registered in England. No
2117205. 
Registered Office: Park House Mews, 77 Back Lane, Off Broadway, Horsforth,
Leeds, LS18 4RF



-- 
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] Socket Madness !!!!

2001-07-05 Thread Steve Brett

fixed it now by adding ascii(10) to reply from server BUT what if i use
fgetc ?

does anyone know the ascii value for EOF ?

cheers,

Steve

 -Original Message-
 From: Steve Brett [mailto:[EMAIL PROTECTED]]
 Sent: 05 July 2001 12:58
 To: Php-General (E-mail)
 Subject: [PHP] Socket Madness 
 
 
 Hi,
 
 I need to set up a sockets connection to a server that was written in
 Delphi.
 
 Using the following code I can connect to the socket and send 
 a message
 through it but don't get a reply back ...
 
   {
   echo Socket opened ok ... sending messagebr;
   $message=sprintf(Steve%c Hello world,255);
   fputs($socket,$message);
   echo fgets($socket, 255);
   fclose($socket);
   }
 
 the socket is opened using fsockopen() and the message get 
 there but i only
 get the reply when the remote socket server is closed ...
 
 can anyone help ?
 
 thanks in advance
 Steve Brett 
 Internal Development
 tel: 3263 
 EMIS Ltd. 
 Privileged and /or Confidential information may be contained in this
 message. If you are not the original addressee indicated in 
 this message (or
 responsible for delivery of the message to such person), you 
 may not copy or
 deliver this message to anyone. In such case, please delete 
 this message,
 and notify us immediately. Opinions, conclusions and other information
 expressed in this message are not given or endorsed by my 
 firm or employer
 unless otherwise indicated by an authorised representative 
 independently of
 this message.
 Egton Medical Information Systems Limited. Registered in England. No
 2117205. 
 Registered Office: Park House Mews, 77 Back Lane, Off 
 Broadway, Horsforth,
 Leeds, LS18 4RF
 
 
 
 -- 
 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] session troubles

2001-07-05 Thread Steve Brett

your session_start() has to be the first thing in the page. no blank lines
etc.

like
?php
session_start();
include(db.inc);
include(classes/user-class.inc);
session_register(user);
?
right at the top of your page. a blank line will send header info ...

Steve

 -Original Message-
 From: Brad Wright [mailto:[EMAIL PROTECTED]]
 Sent: 05 July 2001 16:21
 To: [EMAIL PROTECTED]
 Subject: [PHP] session troubles
 
 
 Hi all,
 Im new to this mailing list so im not sure what to expect 
 from 'y'all' but
 i'm hoping this will be the beginning of a long and beautiful 
 friendship.
 
 My question:
 
 i have a series of PHP4 pages that if I start a session 
 (session_start()) on
 the first page (adminLogin.php), all is fine and dandy...all the
 session_resources get passed to the next page (login2.php) 
 and i can get
 acccess to those session resources. Te problem is, at the top 
 of the page a
 warning message is displayed:
 
 Warning: Cannot send session cache limiter - headers already 
 sent (output
 started at /home/e-smith/files/ibays/test/html/login2.php:1) in
 /home/e-smith/files/ibays/test/html/login2.php on line 1
 
 
 What does this mean?? If i comment out the session_start() 
 line,  i dodnt
 get this message BUT i also dont get the session variuables i need.
 
 Hope Im making some sense, Hope someone can help.
 
 Thanks,
 Brad
 
 
 -- 
 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] PhpDEV

2001-06-23 Thread Brett Shaw

www.oosha.com/phpdev/index.php3

Ive had some great response to the site but not as much as id hoped if you
have any ideas please email them to me and ill implement them

--
[EMAIL PROTECTED]
[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] PhpDEV

2001-05-24 Thread Brett Shaw

for those of you who are interested im developing a web site for php
developers to share resources and information.

you wont need to be a member or commit yourself to anything its totally
free.

you can view the site at the following URL: -
http://www.oosha.com/phpdev/index.php3

Its empty at the moment but feel free to input any information you
like...



-- 
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] Populating HTML List boxes From DB

2001-04-16 Thread Brett

Try using $row-device instead of $divice in your while statement.

Brett

 Thanks Jason... I've used SELECT DISTINCT ... now i doubt this has
anything to do with SELECT DISTINCT as such but for some reason its only
displaying the last vaule entered

 select name="device"
 ?php
   $query ="SELECT DISTINCT device FROM 3backup ORDER BY device";
   $rs =mysql_query($query);
   $device = mysql_result($rs, 'device');
   while($row = mysql_fetch_object($rs)){
 echo 'option value="';
 echo $device;
 echo '"';
 echo $device;
 echo '/option\n';
   }
 ?
 /select

 Any suggestions?

 Peter
 -Original Message-
 From: Jason Murray [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, April 17, 2001 11:12 AM
 To: 'Peter Houchin'; Php-General@Lists. Php. Net
 Subject: RE: [PHP] Populating HTML List boxes From DB


  say in my db i have multiple values that are the same as well
  as different values... how can i restrict it to showing each
  value just once?

 Sounds like you want a "SELECT DISTINCT".

 You might want to have a look at www.sqlcourse.com.

 Jason



-- 
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] Reading a file and changing a href tag values

2001-04-13 Thread Brett

I have been able to find out how to read a file and replace certain matches,
but I want to be able to take a web page stored in a string and change the
a href tags and add www.mysite.com?page=   before the actual link value so
the new url would read www.mysite.com?page=original_url.  Can I do this and
if so will someone give me an idea how?   Thanks.

Brett


-- 
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] Including a URL for mailing..

2001-04-11 Thread Brett

 What I'm trying to do is specify a URL in a form, and then take that URL,
 put its contents into a variable, and mail it out in an e-mail message
with
 the body of the message being that URL.  I haven't gotten anywhere so far,
 just getting blank messages for the body..   can anyone point me in the
 right direction on saving the contents of a page to a variable?  I've ran
 across a few examples, but nothing has worked for me yet. :(

 Thanks,
 Chad


try using output buffering.  In a php script put the following:

ob_start(); //everything following will be stored for output.

include 'your_page.php';

$body=ob_get_contents(); //store everything in output in $body variable

Then mail as usual.  Your page will be the $body variable.  If you want to
display the page as well use ob_end_flush().  If you just want to mail the
page use ob_end_clean() to clear the output buffering and continue scripting
for normal display.

check out http://www.php.net/manual/en/ref.outcontrol.php for more
information on output buffering.  If you are still stuck email me off list
and I will send you a sample of a file that does the same thing for me.

Brett


-- 
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] file deletions ....

2001-03-28 Thread Steve Brett

hi,

i need to delete files in my web folder so i can 'tidy' them up. i have a
username and password that has ftp access and so far i've tried system(),
unlink() and setting up an ftp connection (they use php 4.03 whihc seems to
have ftp access closed).

i have no problem listing the files i want to delete but seem unable to
delete them.

can anyone help ?

Steve



-- 
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] file deletions ....

2001-03-28 Thread Steve Brett


""Phil Driscoll"" [EMAIL PROTECTED] wrote in message
001201c0b768$60da60a0$0c81@philsntserver">news:001201c0b768$60da60a0$0c81@philsntserver...
 Steve

 unlink works fine for me (on my nt boxes) providing the anonymous web user
 has permission to delete the files. Note that under IIS and possibly PWS,

i think that may be the problem. the site is on a server on an  ISP and the
web user does not have permission to delete the files.
i was hoping to use ftp_connect but don't think that's suported either ...
maybe sudo via system() would work 

 the damn server keeps files open for a few minutes after it has served
them
 up, and consequently nobody can delete or modify the files during this
 period.

 Cheers
 --
 Phil Driscoll
 Dial Solutions
 +44 (0)113 294 5112
 http://www.dialsolutions.com
 http://www.dtonline.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 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 sessions and classes

2001-03-26 Thread Steve Brett

hi,

i'm busily rewriting an exisitng calendar system that is in use at work.

we're using UML as a design tool and hope to have an OO version of the
system we have at the minute that wil 'fit in' with future devs.

our system at the moment makes heavy use of postgresql and i am hoping to
populate various object from the data in the db.

our system also relies on session for passing data between pages and the
site as a whole.

what i need to know is this in a kind of yes or no fashion:

will php allow me to create a class and then have access to the class from
other pages and scripts ?

Steve



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

2001-03-26 Thread Brett Bandy

InterBase isn't real good with subselects.

Try using a join instead:

select e.empname from employer e join badclient b on e.empno =
b.employercode where b.pesal = '$Persal';

Brett

""Wade Halsey"" [EMAIL PROTECTED] wrote in message
00a501c0b38b$e2a27ea0$256410ac@wadeh">news:00a501c0b38b$e2a27ea0$256410ac@wadeh...
Hi ppl

("select empname from employer where empno = (select employercode from
badclient where pesal = '$Persal')")

Could anyone help me out with the syntax?

Im running an interbase db and php4.04

Thanks
Wade




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

2001-03-22 Thread Brett Bandy

Make sure all the dlls used by php3_ldap.dll are available.

I have php4 and the php_ldap.dll requires the libsasl.dll to be available.

Brett

""almir"" [EMAIL PROTECTED] wrote in message
99d00g$j4h$[EMAIL PROTECTED]">news:99d00g$j4h$[EMAIL PROTECTED]...
 ok
 i am usng php3.0.11 ,IIS4 and NT4 trying to connect to ldap server but i
get
 a error
 Fatal error: Call to unsupported or undefined function ldap_connect() in
...
 i have included php3_ldap.dll in my php3.ini, i have even tried to include
 it dinamicaly with dl but then i get

 Fatal error: Unable to load dynamic library './php3_ldap.dll'

snip



-- 
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] Headers

2001-03-17 Thread Brett

 How do I do something like:
 if headers_sent=false
 include header.inc


if (headers_sent() == false)include 'header.inc';

be sure and check the manual to make sure that "header_sent()" is the
correct format.

Brett


-- 
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] header:(location) error

2001-03-17 Thread Brett

 Brett, I only have conditional logic above my header() call... this page
is
 processing form input and does a redirect based on the result? Will this
not
 work?


If there is a single empty line above your first ? tag then that will cause
the error.  If you post yor code it will be more helpful to understand.

Brett


-- 
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] Can you recommend an ISP with the following?

2001-03-16 Thread Brett



 I'm looking to move from an old Web host (stormweb.net) that has
 entirely stopped responding to customer support emails. I liked what
 they had to offer, before they became unresponsive, so I'm looking for
 a similar ISP with:


I would  do a search on google for cobalt virtual hosts.  If you want my
recommendation, I have been using Interliant for a year now for co-location.
They have excellent support, offer Cobalt RAQs virtual hosting, and have
great connection speeds and uptime.

Brett




-- 
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] Error with ldap

2001-03-16 Thread Brett Bandy

php_ldap.dll also requires libsasl.dll, so make sure you move this dll to
\winnt\system32 as well.

Brett

"Alain ROMERO" [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
I copy 'msvcrtd.dll' in winnt\system32 and php3 works fine, but not php4

HELP !

Alain ROMERO a écrit :

 PHP 4.0.2 on Win32
 or PHP 3 on Win32
 extension=php_ldap.dll   is on in the php.ini file

 I get 'Unable to load php_ldap.dll' (PHP4) when I call a php file ?
 I get 'Call to an unsupported function ldap_connect()' (PHP3)  ?

 Help please ?

 --
 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] Opening/closing a DB

2001-03-16 Thread Brett Bandy

With InterBase using persistent connections will save a lot of time.
However,
you need to be extra careful with how you manage transactions.  InterBase
uses
a versioning engine for transaction management and you can easily screw up
the
system performance if you don't manage your transactions correctly.

Make sure you use short quick transactions.  Don't leave a transaction open,
always make
sure the transaction is committed or rolledback.  Lingering transactions are
probably the
biggest performance problem you'll encounter with InterBase.

Brett

""Daniel Grace"" [EMAIL PROTECTED] wrote in message
004101c0a992$80fa98c0$b4bc9a40@hades">news:004101c0a992$80fa98c0$b4bc9a40@hades...
 On Saturday, March 10, 2001 at 7:03 AM, Todd Cary
[EMAIL PROTECTED]
 wrote:

  I have some questions about PHP and it's interaction with a DB (namely,
  Interbase).  My client's application uses a DB extensively and I am not
  clear about opening and closing a DB -  the price one pays.
 
  First, I notice that the approximate time to open a connection to my DB
  on my test system is 1 second with a "locate time" of another second.
  So, 50% of the time is opening the DB.
 -- snip --

 I haven't used Interbase, but if it's like most of PHP's database
 interfaces, it isn't too critical to worry about closing the database
 connection. PHP will do so automatically when your script ends.

 -- unsnip --
 
  The next question envolves closing the DB and returning memory.
 
  ibase_free_result;
  ibase_close($dbh);
 
  What will happen if in my code I forget to do this in a place or two?
  Will the system eventually crash?
 -- snip --

 The Interbase extensions to PHP support persistent connections:
 http://www.php.net/manual/en/function.ibase-pconnect.php (see
 mysql_pconnect() as well for more general info on persistent connections).
 With persistent connections, the overhead in connecting to the database
 backend is minimized since the same connection can be shared across
multiple
 pages. This won't work with the CGI version of PHP however.

  - Daniel Grace http://dewin.oldbattery.com/

   "Space may be the final frontier but its made in a Hollywood basement."
 - Red Hot Chili Peppers - Californication




 --
 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] header:(location) error

2001-03-16 Thread Brett


 I am receiving the following error from my app, and I'd be gratefull if
 somebody would point out the usual cause of   it. I am doing a redirect
 based on a form validation routine. Thank you.

 Warning: Cannot add header information - headers already sent in
 /usr/home/stas/html/cathedral/scripts/act_save_resume.php on line 175

Make sure you have no whitespace above your ? ? tags.  If any output is
sent to the browser then you can not add a header, session, cookie.

Brett


-- 
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] Interbase

2001-03-07 Thread Brett Bandy

you might try www.ibphoenix.com as they have more info (than the Borland
site) regarding InterBase.

Brett

""Chris"" [EMAIL PROTECTED] wrote in message
03fd01c0a73c$15183c00$01c8c8c8@ibcserver">news:03fd01c0a73c$15183c00$01c8c8c8@ibcserver...
Hi,
Has anyone here dealt with the new Interbase 6.0 License?
The web site says it is a free download for development, but I can't find
any info about commercial use, and their sales office doesn't seem to know
either, and they haven't called back yet.

Anyone know what the commercial license is? Is it still free?

Thanks,
Chris




-- 
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] adding support to previous build with apxs

2001-03-06 Thread Brett

About a year ago Rasmus gave instructions on how to add support to a php binary 
without recompiling using apxs.  It was something like configure, make and copy files 
to somewhere or something like that.  He also said it was documented in the manual but 
I have not been able to find any instructions.  So does anyone have some instructions 
on how this is done.  I would appreciate any input.

Thanks,
Brett



[PHP] stumped on mailing a complete page

2001-03-03 Thread Brett

This question may have been asked a million times, but I have had no luck
searching for a difinitive answer.

I want to send a confirmation email upon receiving an order, and would like
to send the page that I display on the browser to the user.

I can not figure out how to send a page, like the links that let you mail a
page to a friend on some sites.  Any help would be much appreciated.

Thanks,
Brett


-- 
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] logic question concerning sale prices in shopping basket app

2001-02-28 Thread Brett

I have a simple page that offers three items(7700,7701,7702).  I am trying to figure 
the best way to calculate the price for each shirt depending on the amount they want.  
The breakdown of prices is:
Any 3 shirts for $50
7700 - 3 for $33 or $14.99
7701  7702 - 3 for $50 or $25.

So I sort through the 7700's and set the price for multiples of three which is 11, 
then sort through the 7701 and 7702 and set the price for multiples of three which is 
16.66.

Now I run into a problem with the remaining shirts and figuring out how they should be 
priced.  If there are four shirts left and they are  2-7700, 1- 7701, and 1- 7702,
I need a way to make sure that the 7701 and 7702 are included with 1 of the 7700, and 
the other 7700 is priced at 14.99.

The items are stored in mysql and referenced by the product code(7700).  Hopefully I 
explained this weel enough.  Maybe some ofyou have an idea.
If you want to see what this is for go to http://www.jnewman.com/oxfords.  Play all 
you want, it does nothing but add the prices.  If you add 1 buttondown and 2 of the 
other shirts you will see that the total is 70 something instead of 50 something.

Thanks,
Brett





[PHP] find out if a number is a multiple of three

2001-01-18 Thread Brett

I am trying to find out if I can take a the quantity of a product ordered
and find out if it is a multiple of three.  Can someone point me in the
direction of some documentation or an exmaple of how this can be
accomplished.

Thanks,
Brett


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