Re: [PHP-DB] upload problem ...

2001-06-26 Thread Xsarus Internetdiensten

He!

Don't use the function 'copy', but 'move_uploaded_file'.

Ready...
Daniel Kieviet
Xsarus Internetdiensten
Holland
[EMAIL PROTECTED]


- Original Message -
From: Andre P. [EMAIL PROTECTED]
To: Steve Brett [EMAIL PROTECTED]
Cc: php-db@lists. php. net (E-mail) [EMAIL PROTECTED]
Sent: Monday, June 25, 2001 6:17 AM
Subject: Re: [PHP-DB] upload problem ...


 Steve,

 When you use input type=file the web server uploads the file to a
 temporary directory which it must have write access to, i.e. the user
 that the httpd process is run as must have write access to /php/tmp.

 To my knowledge there is no way of allowing the httpd process to write
 to that directory using your ftp users/password. Bear in mind that you
 could change the temporary upload directory from /php/tmp to /tmp.

 do you have full access to you box or only an account?

 hope this helps

 ciao
 Andre.

 Steve Brett wrote:

 hi,
 
 i have a site and need to write a script to upload / download files so
the
 database can be updated / backed up.
 
 i've tried setting up an input type=file ... and this works fine on my
 machine but php gives an eror onthe server saying that the /php/tmp dir
 cannot be written to by, i assume, the nobody account within whihc the
web
 server runs.
 
 i need  to be bale to write to the httpd dir using php and then i can get
 the db to import the files.
 
 i have an ftp username and password but don't know how to get php to pass
 the authorisation the server. the site is already password protected just
 using a table of username / passowrds.
 
 many thanks in advance
 
 Steve
 
 
 
 




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



-- 
PHP Database 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-DB] Password Protect page

2001-06-22 Thread Xsarus Internetdiensten

Hey Lisa,

it's very simple. You was on the right way!

The reason that you got the error 'header already sent': you did NOT use
header at the top of your script! There we're some bytes send to the client!

So your header only can be sent if the client did not receive some data!!!

Below an example of the structure of the script:

?php

// form has been submitted
if(isset($submit) {

// (check if password exists) {
  Yes: header(Location: securepage.php);
} else {
 No : header(Location: error.php);
} else {
// form has not been submitted
// print form

?
input type='text' name='x'
input type='submit' name='submit'

?
}

?

Success

Daniel Kieviet
Xsarus Internetdiensten
Holland
http://www.xsarus.nl
[EMAIL PROTECTED]


- Original Message -
From: Rubanowicz, Lisa [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, June 22, 2001 3:23 AM
Subject: [PHP-DB] Password Protect page


 Hi All,
 I have an Admin section for my site (where users fill in web forms and it
 changes the site and upload facility for images) and would like a script
 that does a User Logon page.  Password is enough.  I have created a TABLE
in
 my mySQL database called bw_password with two fields id and password.
 Does anyone have a handy script.  I tried but to no avail, I was trying to
 send the header to redirect if the password in the input box matches the
 database password but it kept saying that the header was already sent..  I
 tried Javascript aswell, doing a location.href = URL within the if
 statement.
 If anyone can send me one they have and I can try and modify it then or at
 least understand it.  I am a beginner so please be nice!!
 Thanks in advance
 Lisa


 Lisa Rubanowicz
 Case ITC,
 Navan, Ireland
 Tel: #353 (0)46 77663

 [EMAIL PROTECTED] mailto:[EMAIL PROTECTED]





-- 
PHP Database 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-DB] How to back up database..... ?

2001-04-17 Thread Xsarus Internetdiensten

mysqldump...

- Original Message -
From: "E K L" [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Sunday, April 15, 2001 9:40 AM
Subject: [PHP-DB] How to back up database. ?


 Hi all,
Is there anyone can tell me how to back up Mysql database from one
server
 to other server? Please advisethanks
 _
 Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.


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



-- 
PHP Database 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-DB] PHP Mail - Webmail ??

2001-03-23 Thread Xsarus Internetdiensten

Huy,

how to build mails in PHP with txt-mails AND HTML-mails AND visible in Webmail (like 
Hotmail, USANet)

With the class below I can only make HTML-mails readable in Outlook etc. 

Why are the mails not shown in USANet?
Daniel Kieviet
Xsarus Internetservices
Holland
[EMAIL PROTECTED]
http://www.xsarus.nl

-

Class:
?php

class html_mime_mail{

var $headers;
var $body;
var $multipart;
var $mime;
var $html;
var $html_text;
var $html_images = array();
var $cids = array();
var $do_html;
var $parts = array();

/***
** Constructor function. Sets the headers
** if supplied.
***/
function html_mime_mail($headers = ''){
$this-headers = $headers;
}

/***
** Adds a html part to the mail.
** Also replaces image names with
** content-id's.
***/
function add_html($html, $text){
$this-do_html = 1;
$this-html = $html;
$this-html_text = $text;
if(is_array($this-html_images) AND count($this-html_images)  0){
for($i=0; $icount($this-html_images); $i++){
$this-html = 
ereg_replace($this-html_images[$i]['name'], 'cid:'.$this-html_images[$i]['cid'], 
$this-html);
}
}
}

/***
** Builds html part of email.
***/
function build_html($orig_boundary){
$sec_boundary = '=_'.md5(uniqid(time()));
$thr_boundary = '=_'.md5(uniqid(time()));

if(!is_array($this-html_images)){
$this-multipart.= '--'.$orig_boundary."\n";
$this-multipart.= 'Content-Type: multipart/alternative; 
boundary = "'.$sec_boundary."\"\n\n\n";

$this-multipart.= '--'.$sec_boundary."\n";
$this-multipart.= 'Content-Type: text/plain'."\n";
$this-multipart.= 'Content-Transfer-Encoding: 7bit'."\n\n";
$this-multipart.= $this-html_text."\n\n";

$this-multipart.= '--'.$sec_boundary."\n";
$this-multipart.= 'Content-Type: text/html'."\n";
$this-multipart.= 'Content-Transfer-Encoding: 7bit'."\n\n";
$this-multipart.= $this-html."\n\n";
$this-multipart.= '--'.$sec_boundary."--\n\n";
}else{
$this-multipart.= '--'.$orig_boundary."\n";
$this-multipart.= 'Content-Type: multipart/related; boundary 
= "'.$sec_boundary."\"\n\n\n";

$this-multipart.= '--'.$sec_boundary."\n";
$this-multipart.= 'Content-Type: multipart/alternative; 
boundary = "'.$thr_boundary."\"\n\n\n";

$this-multipart.= '--'.$thr_boundary."\n";
$this-multipart.= 'Content-Type: text/plain'."\n";
$this-multipart.= 'Content-Transfer-Encoding: 7bit'."\n\n";
$this-multipart.= $this-html_text."\n\n";

$this-multipart.= '--'.$thr_boundary."\n";
$this-multipart.= 'Content-Type: text/html'."\n";
$this-multipart.= 'Content-Transfer-Encoding: 7bit'."\n\n";
$this-multipart.= $this-html."\n\n";
$this-multipart.= '--'.$thr_boundary."--\n\n";

for($i=0; $icount($this-html_images); $i++){
$this-multipart.= '--'.$sec_boundary."\n";
$this-build_html_image($i);
}

$this-multipart.= "--".$sec_boundary."--\n\n";
}
}
/***
** Adds an image to the list of embedded
** images.
***/
function add_html_image($file, $name = '', $c_type='application/octet-stream'){
$this-html_images[] = array( 'body' = $file,
  'name' = $name,
  'c_type' = $c_type,
  'cid' = md5(uniqid(time())) );
}


/***
** Adds a file to the list of attachments.
***/
function add_attachment($file, $name = '', $c_type='application/octet-stream'){
$this-parts[] = array( 'body' = $file,
'name' = $name,
'c_type' = 

[PHP-DB] Fout forwarding

2001-01-23 Thread Xsarus Internetdiensten



Geachte relatie,

Door een fout van een van onze medewerkers is 
wellicht naar u een bericht doorgestuurd dat u niet had mogen bereiken. Het 
betrof een bericht dat alleen bestemd was voor privérelaties van betreffende 
medewerker. Daarnaast was het bericht van een strekking die niet hoort bij een 
professioneel bedrijf. Onze excuses voor het ongemak!

Met vriendelijke groet,


Paul Kieviet
Xsarus Internetdiensten Middelharnis
Tel. 0187 - 487102
Fax 0187 - 487316