Re: [PHP] Turck MMcache compiling

2003-12-20 Thread R'twick Niceorgaw
Hi Ryan,

Quoting Ryan A [EMAIL PROTECTED]:

 Hi,
 
 We just took a dedicated server (Linux) and want to install Turck MMCache
 for PHP on it, we have total control of that server and can SSH in etc.
 Their support does not want to install it and told us if we want to, we
 will have to do it ourselves...
 
 is there anyway we can ssh in and do it?
 I have never done anything like this before and am on a windows 2k pro
 machine...I use putty to connect.
 
 Any help appreciated.

definitely you can do it. just login as root and follow the documentation at
the
mmcache web site. I just installed it y'day and it was very easy. 
if you need any help feel free to contact me off list.

HTH
R'twick







This message was sent using IMP, the Internet Messaging Program.

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



[PHP] File Upload on a MAC-Browser didn't work

2003-12-20 Thread Volker Dähn
Hi, 
 
The following script works on any browser on windows xp. But not on a mac
(osx)
It simply shows the temp-directoryname.
Is anybody out there who could help me to fix this problem?
How will the upload work with Safari?

Thanks for your help. 
 
This is the form for the upload:  
 
form enctype=multipart/form-data method=POST name=NAForm
action=IA.php??=SID?  
input type=file name=BildDatei maxlength=128 size=36 value=? echo
$Bild; ?  
input type=hidden name=MAX_FILE_SIZE value=20480  
 
 
 
The following site checks the uplad and copies the file to a specific
folder:  
 
// if the Picture was uploaded  
if ($BildDatei!= AND  
is_uploaded_file($_FILES['BildDatei']['tmp_name'])) {  
// Check for JPG  
if ($_FILES['BildDatei']['type']=='image/pjpeg') {  
// Move File  
$TestFile=$UserCoverDir.$ISBNFeld..jpg;  
move_uploaded_file($_FILES['BildDatei']['tmp_name'], $TestFile);  
}  
} else {  
echo Save unsuccesfull;  
} 

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



RE: [PHP] html or php to pdf whith pdflib?

2003-12-20 Thread Chris
Hi Reicardo,
This can't be done by using the pdf_* functions in php without reading the
whole source file, parsing the HTML and then working the $x and $y for each
line.

There are some alternatives. If you don't really care to much about
formatting you could try this:

$pdf = pdf_new();

pdf_open_file($pdf);
pdf_begin_page($pdf, 595, 842);
$font = pdf_findfont($pdf, Times-Roman, winansi, 0);
if ($font) {
   pdf_setfont($pdf, $font, 10);
}else{
 die(Font Error);
}
pdf_set_value($pdf, textrendering, 1);
PDF_show_wraped($pdf,strip_tags(implode(,file($filename))), 50,750,500);

pdf_end_page($pdf);
pdf_close($pdf);   

$data = pdf_get_buffer($pdf);

header(Content-type: application/pdf);
header(Content-disposition: inline; filename=test.pdf);
header(Content-length:  . strlen($data));
echo $data;



function PDF_show_wraped($pdf, $text, $left, $top, $width){
$fontsize = pdf_get_value($pdf,'leading');
$length = pdf_stringwidth($pdf,$text);
$textHeight = ceil($length/$width)*$fontsize;
$h_align='left';
while(pdf_show_boxed($pdf,$text,
$left,$top,$width,$textHeight,$h_align,'blind')  1){
$textHeight += $fontsize;
}
$top-=$textHeight;
pdf_show_boxed($pdf,$text,$left,$top,$width,$textHeight,$h_align);
return $top-$textHeight;
}

Of course you would need to do something about page wrapping but that should
be quite easy.


Also you could exec() an external programme like txt2pdf
(http://www.codecuts.com/mainpage.asp?WebPageID=156). I have seen a
html2pdf as well but can't remember where right now.



Chris 

 -Original Message-
 From: E. Ricardo Santos [mailto:[EMAIL PROTECTED] 
 Sent: 20 December 2003 02:22
 To: [EMAIL PROTECTED]
 Subject: [PHP] html or php to pdf whith pdflib?
 
 Hello, somebody knows like turning a file HTML or php to pdf 
 by means of pdflib but without having to write  line  to  line?
 
 
 
 that is, a file already existing php or HTML, can be turned 
 with pdflib?
 
 
 
 This  I ask it because to where it studies pdflib, exit pdf 
 is due to write line  by  line  and coordinate by coordinate. 
 A pdf  already  created can also be mattered and to combine 
 it with the new exit. But what  I did not find  he is all 
 this is the particularitity that I raise.
 
 
 
 I hope  has explained to me correctly
 
 --
 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] Re: fopen does not open URL-files

2003-12-20 Thread Taras V. Panchenko

I tried, but I receive the new error:

Warning: fopen(): php_network_getaddresses: getaddrinfo failed: Name or
service not known in /home/manageme/public_html/try-test/fopen-test-http.php
on line 7

Warning: fopen(http://www.management.kiev.ua/MO/main.php/): failed to open
stream: Permission denied in
/home/manageme/public_html/try-test/fopen-test-http.php on line 7

Why there are errors in this simple command? What are
'php_network_getaddresses' and 'getaddrinfo' ?

Thanx,
Taras V. Panchenko.


Eric Bolikowski [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]

 Taras Panchenko [EMAIL PROTECTED] wrote in message
 news:[EMAIL PROTECTED]

  I have 2 questions:
  1) why gethostbyname() does not resolve my host name into IP?
  2) why fopen() (and file()) does not open an external (URL) file via
http?
  Please, see my example below:
  --
 

http://www.management.kiev.ua/try-test/fopen-test-http.php -
  --
  ?
  echo gethostbyname(www.management.kiev.ua);
 
  $h=fopen(http://www.management.kiev.ua/MO/main.php;, r);
  echo fread($h,200);
  ?

 Try this rather(maybe it works):

 ?php

 $fp=fopen(http://www.management.kiev.ua/MO/main.php/;, r);
  echo fread($fp,200);
 ?

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



RE: [PHP] html or php to pdf whith pdflib?

2003-12-20 Thread dan
i use htmldoc, which converts html to pdf, saves trying to render lines
and borders in a pdflib how painful.

On Sat, 2003-12-20 at 10:20, Chris wrote:
 Hi Reicardo,
 This can't be done by using the pdf_* functions in php without reading the
 whole source file, parsing the HTML and then working the $x and $y for each
 line.
 
 There are some alternatives. If you don't really care to much about
 formatting you could try this:
 
 $pdf = pdf_new();
 
 pdf_open_file($pdf);
 pdf_begin_page($pdf, 595, 842);
 $font = pdf_findfont($pdf, Times-Roman, winansi, 0);
 if ($font) {
pdf_setfont($pdf, $font, 10);
 }else{
  die(Font Error);
 }
 pdf_set_value($pdf, textrendering, 1);
 PDF_show_wraped($pdf,strip_tags(implode(,file($filename))), 50,750,500);
 
 pdf_end_page($pdf);
 pdf_close($pdf);   
 
 $data = pdf_get_buffer($pdf);
 
 header(Content-type: application/pdf);
 header(Content-disposition: inline; filename=test.pdf);
 header(Content-length:  . strlen($data));
 echo $data;
 
 
 
 function PDF_show_wraped($pdf, $text, $left, $top, $width){
 $fontsize = pdf_get_value($pdf,'leading');
 $length = pdf_stringwidth($pdf,$text);
 $textHeight = ceil($length/$width)*$fontsize;
 $h_align='left';
 while(pdf_show_boxed($pdf,$text,
 $left,$top,$width,$textHeight,$h_align,'blind')  1){
 $textHeight += $fontsize;
 }
 $top-=$textHeight;
 pdf_show_boxed($pdf,$text,$left,$top,$width,$textHeight,$h_align);
 return $top-$textHeight;
 }
 
 Of course you would need to do something about page wrapping but that should
 be quite easy.
 
 
 Also you could exec() an external programme like txt2pdf
 (http://www.codecuts.com/mainpage.asp?WebPageID=156). I have seen a
 html2pdf as well but can't remember where right now.
 
 
 
 Chris 
 
  -Original Message-
  From: E. Ricardo Santos [mailto:[EMAIL PROTECTED] 
  Sent: 20 December 2003 02:22
  To: [EMAIL PROTECTED]
  Subject: [PHP] html or php to pdf whith pdflib?
  
  Hello, somebody knows like turning a file HTML or php to pdf 
  by means of pdflib but without having to write  line  to  line?
  
  
  
  that is, a file already existing php or HTML, can be turned 
  with pdflib?
  
  
  
  This  I ask it because to where it studies pdflib, exit pdf 
  is due to write line  by  line  and coordinate by coordinate. 
  A pdf  already  created can also be mattered and to combine 
  it with the new exit. But what  I did not find  he is all 
  this is the particularitity that I raise.
  
  
  
  I hope  has explained to me correctly
  
  --
  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] File upload problem

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

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


i'm trying to write a page which allows user to upload file. theese are my
sources but they didn't work, anyone could help me?
-form.html
form action=upload.php method=post enctype=multipart/form-data
input type=file name=upfile
input type=hidden name=MAX_FILE_SIZE value=1
input type=submit value=Invia il file
/form
upload.php---
?php
// QUESTE RIGHE RENDONO LO SCRIPT COMPATIBILE CON LE VERSIONI
// DI PHP PRECEDENTI ALLA 4.1.0
if(!isset($_FILES)) $_FILES = $HTTP_POST_FILES;
if(!isset($_SERVER)) $_SERVER = $HTTP_SERVER_VARS;

/* VARIABILI DA SETTARE /
// Directory dove salvare i files Uploadati ( chmod 777, percorso assoluto)
$upload_dir = $_SERVER[DOCUMENT_ROOT] . /esempi;

// Eventuale nuovo nome da dare al file uploadato
$new_name = ciao.dino;

// Se $new_name è vuota, il nome sarà lo stesso del file uploadato
$file_name = ($new_name) ? $new_name : $_FILES[upfile][name];

if(trim($_FILES[upfile][name]) == ) {
die(Non hai indicato il file da uploadare !);
}

if(@is_uploaded_file($_FILES[upfile][tmp_name])) {
@move_uploaded_file($_FILES[upfile][tmp_name], $upload_dir/$file_name)
or die(Impossibile spostare il file, controlla l'esistenza o i permessi
della directory
dove fare l'upload.);
} else {
die(Problemi nell'upload del file  . $_FILES[upfile][name]);
}

echo L'upload del file  . $_FILES[upfile][name] .  è avvenuto
correttamente;

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

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

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



[PHP] PHP Memory Use

2003-12-20 Thread Chris Hogben
Hey guys,

Just a quick question, which i hope someone can answer for me :)

If PHP is run for a long time, such as a server, or a PHP Bot, is the memory
usage of PHP likely to increase? If so, is there any way of attempting to
combat this, or is it just the way that PHP is built?

Cheers :)

Chris Hogben

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



[PHP] PHP Memory Use

2003-12-20 Thread Chris Hogben
Hey guys,

Just a quick question, which i hope someone can answer for me :)

If PHP is run for a long time, such as a server, or a PHP Bot, is the memory
usage of PHP likely to increase? If so, is there any way of attempting to
combat this, or is it just the way that PHP is built?

Cheers :)

Chris Hogben

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



[PHP] sessions problem

2003-12-20 Thread Nitin
hi all,

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

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

any help or suggestions

Nitin

[PHP] PHP 4.3.4 configure

2003-12-20 Thread Bernard C. Saulter
I'm trying to configure/compile PHP4.3.4 on Solaris 2.8.
Seem that 'configure' just hangs now. The 'new' build systems is broken.
I can build older version with no problem. Seem something that was not broken 
was 'fixed'. (Not a good idea.)
So, the old command of: 'configure --prefix=(what ever) --with-mysql
--with-apxs=(what ever) not just starts and hang after get to: checking host 
system type...sparc-sun-solaris2.8'
and stays there (for ever unless you kill it manual - break or control d). No 
idea what the problem could be as it never does anything more. (Machine runs: 
everythings that will compile version php-4.0.1pl2, Apache_1.3.29 and 
MYSQL-4.0.16 so this version should work (ya right)).
Bernard

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



Re: [PHP] PHP Memory Use

2003-12-20 Thread Raditha Dissanayake
Hi,
if you run poorly written scripts the answer is yes. else the answer is no.
Chris Hogben wrote:

Hey guys,

Just a quick question, which i hope someone can answer for me :)

If PHP is run for a long time, such as a server, or a PHP Bot, is the memory
usage of PHP likely to increase? If so, is there any way of attempting to
combat this, or is it just the way that PHP is built?
Cheers :)

Chris Hogben

 



--
Raditha Dissanayake.

http://www.radinks.com/sftp/ | http://www.raditha.com/megaupload
Lean and mean Secure FTP applet with | Mega Upload - PHP file uploader
Graphical User Inteface. Just 150 KB | with progress bar.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] mysql load_file retreival

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

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



php-general Digest 20 Dec 2003 17:30:51 -0000 Issue 2484

2003-12-20 Thread php-general-digest-help

php-general Digest 20 Dec 2003 17:30:51 - Issue 2484

Topics (messages 173063 through 173078):

Re: Merry Chrismas
173063 by: Ryan A

form variables
173064 by: Nitin
173065 by: Robert Cummings
173066 by: Nitin

Re: Turck MMcache compiling
173067 by: R'twick Niceorgaw

File Upload on a MAC-Browser didn't work
173068 by: Volker Dähn

Re: html or php to pdf whith pdflib?
173069 by: Chris
173071 by: dan

Re: fopen does not open URL-files
173070 by: Taras V. Panchenko

Re: File upload problem
173072 by: Larry Brown

PHP Memory Use
173073 by: Chris Hogben
173074 by: Chris Hogben
173077 by: Raditha Dissanayake

sessions problem
173075 by: Nitin

PHP 4.3.4 configure
173076 by: Bernard C. Saulter

mysql load_file retreival
173078 by: Larry Brown

Administrivia:

To subscribe to the digest, e-mail:
[EMAIL PROTECTED]

To unsubscribe from the digest, e-mail:
[EMAIL PROTECTED]

To post to the list, e-mail:
[EMAIL PROTECTED]


--
---BeginMessage---
Hey,
And a very Merry Christmas to you too...think I dont mean it?

Check this out:
www.jumac.com/free-birthday-christmas-holiday-greetings/upcardme.php?step=pi
ckupid=2k03596bb8f8

Cheers,
-Ryan A
---End Message---
---BeginMessage---
hi all,

i've an application, where i'm receiving variables from an html form and process them 
in the script. depending on the values, i may want to get some extra information from 
user through another form. now, problem is how can i keep the vaiables received from 
the first form, without passing them as query string to the next script or specifying 
as hidden form fields.

i'll really appreciate a quick help. thanx in advance
Nitin---End Message---
---BeginMessage---
On Sat, 2003-12-20 at 01:29, Nitin wrote:
 hi all,
 
 i've an application, where i'm receiving variables from an html form and process 
 them in the script. depending on the values, i may want to get some extra 
 information from user through another form. now, problem is how can i keep the 
 vaiables received from the first form, without passing them as query string to the 
 next script or specifying as hidden form fields.
 
 i'll really appreciate a quick help. thanx in advance

Sessions.

Cheers,
Rob.
-- 
..
| InterJinn Application Framework - http://www.interjinn.com |
::
| An application and templating framework for PHP. Boasting  |
| a powerful, scalable system for accessing system services  |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for   |
| creating re-usable components quickly and easily.  |
`'
---End Message---
---BeginMessage---
thanx for a quick reply and i'm sorry for it was so dumb qu

nitin
- Original Message - 
From: Robert Cummings [EMAIL PROTECTED]
To: Nitin [EMAIL PROTECTED]
Cc: PHP-General [EMAIL PROTECTED]
Sent: Saturday, December 20, 2003 11:59 AM
Subject: Re: [PHP] form variables


 On Sat, 2003-12-20 at 01:29, Nitin wrote:
  hi all,
 
  i've an application, where i'm receiving variables from an html form and
process them in the script. depending on the values, i may want to get some
extra information from user through another form. now, problem is how can i
keep the vaiables received from the first form, without passing them as
query string to the next script or specifying as hidden form fields.
 
  i'll really appreciate a quick help. thanx in advance

 Sessions.

 Cheers,
 Rob.
 -- 
 ..
 | InterJinn Application Framework - http://www.interjinn.com |
 ::
 | An application and templating framework for PHP. Boasting  |
 | a powerful, scalable system for accessing system services  |
 | such as forms, properties, sessions, and caches. InterJinn |
 | also provides an extremely flexible architecture for   |
 | creating re-usable components quickly and easily.  |
 `'

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

---End Message---
---BeginMessage---
Hi Ryan,

Quoting Ryan A [EMAIL PROTECTED]:

 Hi,
 
 We just took a dedicated server (Linux) and want to install Turck MMCache
 for PHP on it, we have total control of that server and can SSH in etc.
 Their support does not want to install it and told us if we want to, we
 will have to do it ourselves...
 
 is there anyway we can ssh in and do it?
 I have never done anything like this before and am on a windows 2k pro
 machine...I use putty to connect.
 
 Any help appreciated.


RE: [PHP] sessions problem

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

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


hi all,

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

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

any help or suggestions

Nitin

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



Re: [PHP] include files

2003-12-20 Thread Todd
This looks like it should do exactly what I need. Thanks for pointing that
out.

Marek Kilimajer wrote:
 See function debug_backtrace(), it's available since 4.3.3


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



RE: [PHP] mysql load_file retreival

2003-12-20 Thread Chris
LOAD_FILE() shouldn't be escaping the data. Are you actually calling : echo
header()? the header function should not be echoed.

header('Content-type: application/pdf');
echo result[0];

-Original Message-
From: Larry Brown [mailto:[EMAIL PROTECTED]
Sent: Saturday, December 20, 2003 9:29 AM
To: PHP List
Subject: [PHP] mysql load_file retreival


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

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

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



RE: [PHP] mysql load_file retreival

2003-12-20 Thread Larry Brown
Oops, my bad on the post.  I am not sending echo header...just header(...

I thought, based on reading from mysql that it did escape certain
characters.  I'll start looking at other possibilities...

-Original Message-
From: Chris [mailto:[EMAIL PROTECTED]
Sent: Saturday, December 20, 2003 1:24 PM
To: PHP List
Subject: RE: [PHP] mysql load_file retreival


LOAD_FILE() shouldn't be escaping the data. Are you actually calling : echo
header()? the header function should not be echoed.

header('Content-type: application/pdf');
echo result[0];

-Original Message-
From: Larry Brown [mailto:[EMAIL PROTECTED]
Sent: Saturday, December 20, 2003 9:29 AM
To: PHP List
Subject: [PHP] mysql load_file retreival


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

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

--
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] Domain Check script

2003-12-20 Thread Cesar Aracena
Hi all,

Anyone knows about anyPHP script to add a domain check option to a web site
like almost any hosting company has? I'm looking into hotcripts.com but
everything offered serves also like a registering script for the available
domains and I just want to inform my visitors if the domain they entered is
available or taken... that's all.

Thanks in advanced,
___
Cesar L. Aracena
Commercial Manager / Developer
ICAAM Web Solutions
2K GROUP
Neuquen, Argentina
Tel: +54.299.4774532
Cel: +54.299.6356688
E-mail: [EMAIL PROTECTED]

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



[PHP] Best place to search archives

2003-12-20 Thread Philip J. Newman
Hay guys, Where is the best place to search the general-php archives (o;

---
Philip J. Newman
Master Developer
PhilipNZ.com [NZ] Ltd.
[EMAIL PROTECTED]

Ph: +64 9 576 9491
Fx: +64 9 576 2532
Mob: +64 21 0483 999

-
This communication, including any attachments, is confidential. 
If you are not the intended recipient, you should not read
it - please contact me immediately, destroy it, and do not
copy or use any part of this communication or disclose
anything about it. Thank you. Please note that this 
communication does not designate an information system for
the purposes of the Electronic Transactions Act 2002.
--

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



Re: [PHP] Best place to search archives

2003-12-20 Thread olinux
 Hay guys, Where is the best place to search the
 general-php archives (o;
 

first place: 
http://groups.google.com/groups?hl=enlr=ie=UTF-8oe=utf-8group=php.general

runner up:
http://marc.theaimsgroup.com/?l=php-general


olinux

__
Do you Yahoo!?
New Yahoo! Photos - easier uploading and sharing.
http://photos.yahoo.com/

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



[PHP] Re: Domain Check script

2003-12-20 Thread Cesar Aracena
Ok... I found it... but not quite what I like. I found this function (thanks
to WebWorkz) that needs not only the domain name but also the extension to
be written. I changed the form a little bit so the extension is selected by
the visitor from a drop down menu but I don't know what to change in the
function to use it. Here it is:

function whois ($a_server, $a_query, $a_port=43)
{
$available = No match;
$a_query = str_replace(www., , $a_query);
$a_query = str_replace(http://;, , $a_query);

$sock = fsockopen($a_server,$a_port);

IF (!$sock)
{
echo (bCould Not Connect To Server./b);
}

fputs($sock,$a_query\r\n);

while(!feof($sock))
$result .= fgets($sock,128);

fclose($sock);

IF (eregi($available,$result))
{
echo (font color=\blue\b$a_query is available./b/font);
echo (BR);
echo (BR);
echo (font class=\bod\/fontDomain Check Copyright:);
echo (BR);
echo (BR);
echo (2002 WebWorkz Network, Inc. All Rights Reserved./font);
}

ELSE
{
echo (font color=\red\b$a_query is not available./b/font);
echo (BR);
echo (BR);
echo (font class=\bod\Domain Check Copyright:);
echo (BR);
echo (BR);
echo (2002 WebWorkz Network, Inc. All Rights Reserved./font);
}

}

The domain variable is $query and the extension I want to add is passed as
$ext... any thoughts?

Thanks in advanced.

Cesar Aracena [EMAIL PROTECTED] escribió en el mensaje
news:[EMAIL PROTECTED]
 Hi all,

 Anyone knows about anyPHP script to add a domain check option to a web
site
 like almost any hosting company has? I'm looking into hotcripts.com but
 everything offered serves also like a registering script for the available
 domains and I just want to inform my visitors if the domain they entered
is
 available or taken... that's all.

 Thanks in advanced,
 ___
 Cesar L. Aracena
 Commercial Manager / Developer
 ICAAM Web Solutions
 2K GROUP
 Neuquen, Argentina
 Tel: +54.299.4774532
 Cel: +54.299.6356688
 E-mail: [EMAIL PROTECTED]


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



RE: [PHP] mysql load_file retreival

2003-12-20 Thread Chris
Try looking at the data that's supposed to be outputing the pdf. Something
may be failing somewhere and you might see an error message. If you don't
see any error messages and are apparently seeing gthe pdf data, check for
whitespace outside php tags and any extraneous echo's or print's, that would
very likely cause the pdf to not be able to be read properly.

Chris

-Original Message-
From: Larry Brown [mailto:[EMAIL PROTECTED]
Sent: Saturday, December 20, 2003 10:36 AM
To: Chris; PHP List
Subject: RE: [PHP] mysql load_file retreival


Oops, my bad on the post.  I am not sending echo header...just header(...

I thought, based on reading from mysql that it did escape certain
characters.  I'll start looking at other possibilities...

-Original Message-
From: Chris [mailto:[EMAIL PROTECTED]
Sent: Saturday, December 20, 2003 1:24 PM
To: PHP List
Subject: RE: [PHP] mysql load_file retreival


LOAD_FILE() shouldn't be escaping the data. Are you actually calling : echo
header()? the header function should not be echoed.

header('Content-type: application/pdf');
echo result[0];

-Original Message-
From: Larry Brown [mailto:[EMAIL PROTECTED]
Sent: Saturday, December 20, 2003 9:29 AM
To: PHP List
Subject: [PHP] mysql load_file retreival


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

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

--
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] Document Indexer and Database Contents Index

2003-12-20 Thread olinux
Checkout htdig www.htdig.org
--- [EMAIL PROTECTED] [EMAIL PROTECTED]
wrote:
 Hi All,
 
 I'm looking for a PHP program like mnoGoSearch but
without the need to 
 recompile it with PHP.  Does such a PHP program
exist?
 
 Basically, I want the program to index file types of
.doc, .txt, .html, 
 .pdf, etc.  And also the contents of a database data
table.
 
 Thanks,
 
 Kevin


__
Do you Yahoo!?
New Yahoo! Photos - easier uploading and sharing.
http://photos.yahoo.com/

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



RE: [PHP] mysql load_file retreival

2003-12-20 Thread Larry Brown
Thanks for the help.  I went through a troubleshooting phase that started
with writing the raw data from the mysql client to disk.  Checking the size
it was apparent that it was much too small.  I tried running my script with
a smaller pdf and it worked.  It turns out that blob has a max of 64k.  A
tad small for general use for holding graphics.  I changed to a mediumblob
which is either 12 or 16 meg, I'm not sure off the top of my head now but,
that is plenty for my needs.  I did end up changing the behaviour of my
script though.  Instead of writing to a file and using load_file, I recieved
the file on upload, base64 encoded it and stored it directly to the db.
Then on retrieval, unencoded and handed it off with content type, size,
name, and application information in the header.  It works very nicely.

Thanks again...

Larry

-Original Message-
From: Chris [mailto:[EMAIL PROTECTED]
Sent: Saturday, December 20, 2003 3:49 PM
To: PHP List
Subject: RE: [PHP] mysql load_file retreival


Try looking at the data that's supposed to be outputing the pdf. Something
may be failing somewhere and you might see an error message. If you don't
see any error messages and are apparently seeing gthe pdf data, check for
whitespace outside php tags and any extraneous echo's or print's, that would
very likely cause the pdf to not be able to be read properly.

Chris

-Original Message-
From: Larry Brown [mailto:[EMAIL PROTECTED]
Sent: Saturday, December 20, 2003 10:36 AM
To: Chris; PHP List
Subject: RE: [PHP] mysql load_file retreival


Oops, my bad on the post.  I am not sending echo header...just header(...

I thought, based on reading from mysql that it did escape certain
characters.  I'll start looking at other possibilities...

-Original Message-
From: Chris [mailto:[EMAIL PROTECTED]
Sent: Saturday, December 20, 2003 1:24 PM
To: PHP List
Subject: RE: [PHP] mysql load_file retreival


LOAD_FILE() shouldn't be escaping the data. Are you actually calling : echo
header()? the header function should not be echoed.

header('Content-type: application/pdf');
echo result[0];

-Original Message-
From: Larry Brown [mailto:[EMAIL PROTECTED]
Sent: Saturday, December 20, 2003 9:29 AM
To: PHP List
Subject: [PHP] mysql load_file retreival


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

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

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

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

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



RE: [PHP] mysql load_file retreival

2003-12-20 Thread Chris
Gald to hear it works now. Are you base64 encoding it for any particular
reason? Seems to me that it would waste a lot of db space as base64 encoding
adds quite a bit to the filesize.

Chris

-Original Message-
From: Larry Brown [mailto:[EMAIL PROTECTED]
Sent: Saturday, December 20, 2003 2:16 PM
To: Chris; PHP List
Subject: RE: [PHP] mysql load_file retreival


Thanks for the help.  I went through a troubleshooting phase that started
with writing the raw data from the mysql client to disk.  Checking the size
it was apparent that it was much too small.  I tried running my script with
a smaller pdf and it worked.  It turns out that blob has a max of 64k.  A
tad small for general use for holding graphics.  I changed to a mediumblob
which is either 12 or 16 meg, I'm not sure off the top of my head now but,
that is plenty for my needs.  I did end up changing the behaviour of my
script though.  Instead of writing to a file and using load_file, I recieved
the file on upload, base64 encoded it and stored it directly to the db.
Then on retrieval, unencoded and handed it off with content type, size,
name, and application information in the header.  It works very nicely.

Thanks again...

Larry

-Original Message-
From: Chris [mailto:[EMAIL PROTECTED]
Sent: Saturday, December 20, 2003 3:49 PM
To: PHP List
Subject: RE: [PHP] mysql load_file retreival


Try looking at the data that's supposed to be outputing the pdf. Something
may be failing somewhere and you might see an error message. If you don't
see any error messages and are apparently seeing gthe pdf data, check for
whitespace outside php tags and any extraneous echo's or print's, that would
very likely cause the pdf to not be able to be read properly.

Chris

-Original Message-
From: Larry Brown [mailto:[EMAIL PROTECTED]
Sent: Saturday, December 20, 2003 10:36 AM
To: Chris; PHP List
Subject: RE: [PHP] mysql load_file retreival


Oops, my bad on the post.  I am not sending echo header...just header(...

I thought, based on reading from mysql that it did escape certain
characters.  I'll start looking at other possibilities...

-Original Message-
From: Chris [mailto:[EMAIL PROTECTED]
Sent: Saturday, December 20, 2003 1:24 PM
To: PHP List
Subject: RE: [PHP] mysql load_file retreival


LOAD_FILE() shouldn't be escaping the data. Are you actually calling : echo
header()? the header function should not be echoed.

header('Content-type: application/pdf');
echo result[0];

-Original Message-
From: Larry Brown [mailto:[EMAIL PROTECTED]
Sent: Saturday, December 20, 2003 9:29 AM
To: PHP List
Subject: [PHP] mysql load_file retreival


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

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

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

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

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



Re: [PHP] Re: Domain Check script

2003-12-20 Thread Website Managers.net
Try adding $ext onto the end of str_replace like this:
$a_query = (str_replace(www., , $a_query)...$_POST[ext]);
$a_query = (str_replace(http://;, , $a_query)...$_POST[ext]);

Jim

- Original Message - 
From: Cesar Aracena [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Saturday, December 20, 2003 2:30 PM
Subject: [PHP] Re: Domain Check script


| Ok... I found it... but not quite what I like. I found this function (thanks
| to WebWorkz) that needs not only the domain name but also the extension to
| be written. I changed the form a little bit so the extension is selected by
| the visitor from a drop down menu but I don't know what to change in the
| function to use it. Here it is:
| 
| function whois ($a_server, $a_query, $a_port=43)
| {
| $available = No match;
| $a_query = str_replace(www., , $a_query);
| $a_query = str_replace(http://;, , $a_query);
| 
| $sock = fsockopen($a_server,$a_port);
| 
| IF (!$sock)
| {
| echo (bCould Not Connect To Server./b);
| }
| 
| fputs($sock,$a_query\r\n);
| 
| while(!feof($sock))
| $result .= fgets($sock,128);
| 
| fclose($sock);
| 
| IF (eregi($available,$result))
| {
| echo (font color=\blue\b$a_query is available./b/font);
| echo (BR);
| echo (BR);
| echo (font class=\bod\/fontDomain Check Copyright:);
| echo (BR);
| echo (BR);
| echo (2002 WebWorkz Network, Inc. All Rights Reserved./font);
| }
| 
| ELSE
| {
| echo (font color=\red\b$a_query is not available./b/font);
| echo (BR);
| echo (BR);
| echo (font class=\bod\Domain Check Copyright:);
| echo (BR);
| echo (BR);
| echo (2002 WebWorkz Network, Inc. All Rights Reserved./font);
| }
| 
| }
| 
| The domain variable is $query and the extension I want to add is passed as
| $ext... any thoughts?
| 
| Thanks in advanced.
| 
| Cesar Aracena [EMAIL PROTECTED] escribió en el mensaje
| news:[EMAIL PROTECTED]
|  Hi all,
| 
|  Anyone knows about anyPHP script to add a domain check option to a web
| site
|  like almost any hosting company has? I'm looking into hotcripts.com but
|  everything offered serves also like a registering script for the available
|  domains and I just want to inform my visitors if the domain they entered
| is
|  available or taken... that's all.
| 
|  Thanks in advanced,
|  ___
|  Cesar L. Aracena
|  Commercial Manager / Developer
|  ICAAM Web Solutions
|  2K GROUP
|  Neuquen, Argentina
|  Tel: +54.299.4774532
|  Cel: +54.299.6356688
|  E-mail: [EMAIL PROTECTED]
| 
| 
| -- 
| PHP General Mailing List (http://www.php.net/)
| To unsubscribe, visit: http://www.php.net/unsub.php
| 
|

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



RE: [PHP] form variables

2003-12-20 Thread Ewout de Boer


-Oorspronkelijk bericht-
Van: Nitin [mailto:[EMAIL PROTECTED] 
Verzonden: zaterdag 20 december 2003 7:30
Aan: PHP-General
Onderwerp: [PHP] form variables


 i've an application, where i'm receiving variables from an html form and
process them in the script. depending on the values, i may want to get some
extra information from user through another form. now, problem is how can i
keep the vaiables received from the first form, without passing them as
query string to the next script or specifying as hidden form fields.


You could use sessions to keep track of your data between different scripts
without reposting anything

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



Regards,
Ewout

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



[PHP] compile problems

2003-12-20 Thread Brian V Bonini
Not a clue what's wrong, anyone?

functions.lo Zend/zend_sprintf.lo Zend/zend_ini.lo Zend/zend_qsort.lo
Zend/zend_
multibyte.lo Zend/zend_execute.lo sapi/apache/sapi_apache.lo
sapi/apache/mod_php
4.lo sapi/apache/php_apache.lo main/internal_functions.lo -lcrypt
-lc-client -lc
rypt -lmysqlclient -lcrypt -lpam -lgd -lfreetype -lpng -lz -ljpeg -lz
-lm -lcryp
t -lcrypt  -o libphp4.la
-C: no such file or directory
net/php/reflect.class: no such file or directory
-C: no such file or directory
net/php/reflect.properties: no such file or directory
java.util.zip.ZipException: duplicate entry: usr/src/php-4.3.4/ext/java/
at
java.util.zip.ZipOutputStream.putNextEntry(ZipOutputStream.java:166)
at sun.tools.jar.Main.addFile(Main.java:297)
at sun.tools.jar.Main.create(Main.java:258)
at sun.tools.jar.Main.run(Main.java:89)
at sun.tools.jar.Main.main(Main.java:518)
*** Error code 1

Stop in /usr/src/php-4.3.4.


-- 
BrianGnuPG - KeyID: 0x04A4F0DC | URL: www.gfx-design.com/keys
  Key Server: pgp.mit.edu
==
gpg --keyserver pgp.mit.edu --recv-keys 04A4F0DC
GnuPG: http://gnupg.org
http://www.biglumber.com/x/web?qs=0x2C35011004A4F0DC
Linux Registered User #339825 at http://counter.li.org


signature.asc
Description: This is a digitally signed message part


RE: [PHP] mysql load_file retreival

2003-12-20 Thread Larry Brown
I was following the example given on the php site that someone was using to
break down large files.  They base64 encoded the file while reading it in,
broke it into pieces (while inputing the pieces into the db), then
re-animated it so to speak afterwards by reversing the process.  I get the
impression that encoding the file will leave it in a state that is palatable
to the database (no quotes,commas,slashes etc) and it seemed that since the
example worked that way that I'd follow suit.  Plus, if I decided that the
file sizes should be split up, I could ultimately simply change a line of
code or so and split it up.  It is only from a lack of thorough
understanding of exactly what characters can be found in a pdf file when
viewed as a single string for the database that I don't step out and design
something of which I have not seen an example.  Plus I figure that I should
learn from people out there of whom many have spent many hours beating their
head against a wall looking for a solution and are later willing to share
that as an example to save others time.

-Original Message-
From: Chris [mailto:[EMAIL PROTECTED]
Sent: Saturday, December 20, 2003 5:55 PM
To: PHP List
Subject: RE: [PHP] mysql load_file retreival


Gald to hear it works now. Are you base64 encoding it for any particular
reason? Seems to me that it would waste a lot of db space as base64 encoding
adds quite a bit to the filesize.

Chris

-Original Message-
From: Larry Brown [mailto:[EMAIL PROTECTED]
Sent: Saturday, December 20, 2003 2:16 PM
To: Chris; PHP List
Subject: RE: [PHP] mysql load_file retreival


Thanks for the help.  I went through a troubleshooting phase that started
with writing the raw data from the mysql client to disk.  Checking the size
it was apparent that it was much too small.  I tried running my script with
a smaller pdf and it worked.  It turns out that blob has a max of 64k.  A
tad small for general use for holding graphics.  I changed to a mediumblob
which is either 12 or 16 meg, I'm not sure off the top of my head now but,
that is plenty for my needs.  I did end up changing the behaviour of my
script though.  Instead of writing to a file and using load_file, I recieved
the file on upload, base64 encoded it and stored it directly to the db.
Then on retrieval, unencoded and handed it off with content type, size,
name, and application information in the header.  It works very nicely.

Thanks again...

Larry

-Original Message-
From: Chris [mailto:[EMAIL PROTECTED]
Sent: Saturday, December 20, 2003 3:49 PM
To: PHP List
Subject: RE: [PHP] mysql load_file retreival


Try looking at the data that's supposed to be outputing the pdf. Something
may be failing somewhere and you might see an error message. If you don't
see any error messages and are apparently seeing gthe pdf data, check for
whitespace outside php tags and any extraneous echo's or print's, that would
very likely cause the pdf to not be able to be read properly.

Chris

-Original Message-
From: Larry Brown [mailto:[EMAIL PROTECTED]
Sent: Saturday, December 20, 2003 10:36 AM
To: Chris; PHP List
Subject: RE: [PHP] mysql load_file retreival


Oops, my bad on the post.  I am not sending echo header...just header(...

I thought, based on reading from mysql that it did escape certain
characters.  I'll start looking at other possibilities...

-Original Message-
From: Chris [mailto:[EMAIL PROTECTED]
Sent: Saturday, December 20, 2003 1:24 PM
To: PHP List
Subject: RE: [PHP] mysql load_file retreival


LOAD_FILE() shouldn't be escaping the data. Are you actually calling : echo
header()? the header function should not be echoed.

header('Content-type: application/pdf');
echo result[0];

-Original Message-
From: Larry Brown [mailto:[EMAIL PROTECTED]
Sent: Saturday, December 20, 2003 9:29 AM
To: PHP List
Subject: [PHP] mysql load_file retreival


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

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

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