Re: [PHP] mail() php in message

2003-10-13 Thread Onno Kuipers
Chris Hayes wrote:

message of the mail. I know how the to put html in the message:

$message = '


in stead of

 print " $gebruikerbooks ";


do

 $message .= " $gebruikerbooks ";

A little clarification:
* Just instead of echoing it directly to the browser, add it to your 
variable $message.
* "$message.='bla';" is a shortcut for   "$message.=$message . 'bla'; "
* the . is the glue for strings.


Thanx for your reaction. But I am not sure if I explained my problem the 
right way. Let me say it a little bit different:

My server runs PHP and Mysql. Normaly I can put some php in my 
.php-files wich will create a html file for the clients. (you all know 
this of course).

My question now is: How can I put that html (created with PHP) in the 
message off the mail.

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


[PHP] php convert html to pdf

2003-10-13 Thread hycn office
hi all ~

where can find the free of charge complete script ?

remarks : i am using web hosting , so cant install anything

thank you "-_-

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



[PHP] Re: Working with external images

2003-10-13 Thread Voodoo
Just found it. If anyone is interested,

$src_image="myImage";
$picsize=getimagesize($src_image);
$source_x  = $picsize[0];
$source_y  = $picsize[1];

echo $source_x." x ".$source_y;

Thanks anyway,

Voodoo

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



Re: [PHP] mail() php in message

2003-10-13 Thread Manuel Lemos
Hello,

On 10/13/2003 05:02 AM, Onno Kuipers wrote:
My server runs PHP and Mysql. Normaly I can put some php in my 
.php-files wich will create a html file for the clients. (you all know 
this of course).

My question now is: How can I put that html (created with PHP) in the 
message off the mail.
To not have to change your PHP code, you may capture the HTML you want 
to mail by enclosing your PHP code between a ob_start() and a 
ob_get_clean() commands, like this:

ob_start();

... your code here:

$message=ob_get_clean();

And then use the $message variable to compose an HTML message.

Sending an HTML message properly requires that you compose a message 
according to the MIME standards. Just try this class that makes it easy:

http://www.phpclasses.org/mimemessage

--

Regards,
Manuel Lemos
Free ready to use OOP components written in PHP
http://www.phpclasses.org/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] mail() php in message

2003-10-13 Thread Onno Kuipers
Manuel Lemos wrote:
Hello,

On 10/13/2003 05:02 AM, Onno Kuipers wrote:

My server runs PHP and Mysql. Normaly I can put some php in my 
.php-files wich will create a html file for the clients. (you all know 
this of course).

My question now is: How can I put that html (created with PHP) in the 
message off the mail.


To not have to change your PHP code, you may capture the HTML you want 
to mail by enclosing your PHP code between a ob_start() and a 
ob_get_clean() commands, like this:

ob_start();

... your code here:

$message=ob_get_clean();

And then use the $message variable to compose an HTML message.

Sending an HTML message properly requires that you compose a message 
according to the MIME standards. Just try this class that makes it easy:

http://www.phpclasses.org/mimemessage

thanx a lot! I think this will help.

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


[PHP] From PHP to C and viceversa

2003-10-13 Thread Antonio Bernabei
Hi,
I have apache under linux and I want to exchange data 
from a php script to a c programm (some strings): is it possible?
Can anyone help me?
Thanks
Antonio Bernabei

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



Re: [PHP] mail() php in message

2003-10-13 Thread Onno Kuipers
Manuel Lemos wrote:
Hello,

On 10/13/2003 05:02 AM, Onno Kuipers wrote:

My server runs PHP and Mysql. Normaly I can put some php in my 
.php-files wich will create a html file for the clients. (you all know 
this of course).

My question now is: How can I put that html (created with PHP) in the 
message off the mail.


To not have to change your PHP code, you may capture the HTML you want 
to mail by enclosing your PHP code between a ob_start() and a 
ob_get_clean() commands, like this:

ob_start();

... your code here:

$message=ob_get_clean();

And then use the $message variable to compose an HTML message.

Sending an HTML message properly requires that you compose a message 
according to the MIME standards. Just try this class that makes it easy:

http://www.phpclasses.org/mimemessage

thanx a lot! I think this will help. .

 oops works only with PHP 4... and I ... euh PHP3..

Is there another method to do this before I even think of upgrading?

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


[PHP] feedback form

2003-10-13 Thread merryE
I create a feedback form in html and the action si to post to the php. It doesn't wotk 
well and i don't know what's is the problem. please help me to look at it. Tell me the 
errors, thank's. 

This is the form.php code:


This is the form.html code:


   
name :

  
   
email :

  
   
feedback :

  
   
 
 
  
  

  


[PHP] Object and properties

2003-10-13 Thread Cosmin
Is there a way to find out all the properties from an object?

For instance if I have:
---
class test
{
var $a;
var $b;
var $c;
function test(){}
}
$example= new test();
---
, is there a function to tell me that the object example has the
'a','b',and 'c' properties.

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



RE: [PHP] feedback form

2003-10-13 Thread Fernando Melo
mail($toaddress, $subject, $mailconten); 

should be

mail($toaddress, $subject, $mailcontent);


-Original Message-
From: merryE [mailto:[EMAIL PROTECTED] 
Sent: 12 October 2003 22:52
To: [EMAIL PROTECTED]
Subject: [PHP] feedback form

I create a feedback form in html and the action si to post to the php. It
doesn't wotk well and i don't know what's is the problem. please help me to
look at it. Tell me the errors, thank's. 

This is the form.php code:


This is the form.html code:


   
name :

  
   
email :

  
   
feedback :

  
   
 
 
  
  

  

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



RE: [PHP] feedback form

2003-10-13 Thread Fernando Melo


mail($toaddress, $subject, $mailconten);

should be

mail($toaddress, $subject, $mailcontent);


-Original Message-
From: merryE [mailto:[EMAIL PROTECTED] 
Sent: 12 October 2003 22:52
To: [EMAIL PROTECTED]
Subject: [PHP] feedback form

I create a feedback form in html and the action si to post to the php. It
doesn't wotk well and i don't know what's is the problem. please help me to
look at it. Tell me the errors, thank's. 

This is the form.php code:


This is the form.html code:


   
name :

  
   
email :

  
   
feedback :

  
   
 
 
  
  

  

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



Re: [PHP] Object and properties

2003-10-13 Thread Pavel Jartsev
Cosmin wrote:
Is there a way to find out all the properties from an object?

...
>

Try this:
http://www.php.net/manual/en/function.get-object-vars.php
--
Pavel a.k.a. Papi
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] awful newbie question

2003-10-13 Thread Marek Kilimajer
It is called Paamayim Nekudotayim ;) and is explaned here: 
http://www.php.net/manual/en/keyword.paamayim-nekudotayim.php

Paul Freedman wrote:
Marek -
Thanks for your help.
Unfortunately, my ignorance is more extensive than I had believed. In your
reply, ... echo 'Q::qzml() ... what is the signifigance of '::'? I've only
thought of such a figure as expressing a ratio.
- Paul
- Original Message - 
From: "Marek Kilimajer" <[EMAIL PROTECTED]>
To: "Paul Freedman" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Sunday, October 12, 2003 1:09 PM
Subject: Re: [PHP] awful newbie question



Paul Freedman wrote:

I'm one of the ignorant multitude beginning to grope their way across
the threshhold of web programming. I come from another world, not computer
science, and thus have a question so basic I haven't found any reference to
it anywhere. It's killing me.
In the php statement
$q->qzml();
what is the symbol '->' called? What does it mean?
It calls *member* function of object $q. So even if qzml is a global
function it will not work, the function must be defined in the object's
class definition:
class Q {

function qzml() {
echo 'Q::qzml() function';
}
}
$q=new Q;

$q->qzml();


A php script with this line in it, in which $q is an object and qzml()
is a function, returns the error message "undefined function". When I remove
this line, the function qzml() is recognized.
I have also come across the symbol '=>'. I assume it is not the same
symbol. What is it, and what does it mean?

It is used to assign values to keys in array() construct:
http://sk.php.net/manual/en/function.array.php

Any help would be greatly appreciated.

Thanks,
-Paul
--
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] Major wierdness - ack!

2003-10-13 Thread Ford, Mike [LSS]
On 10 October 2003 21:28, James Johnson wrote:

> Hi,
> 
> I'm getting so frustrated with this.
> 
> I have put some error trapping code in my site with the
> following code (an
> included file):
> 
>ob_start();
>   error_reporting(E_ALL);
>   set_error_handler('pc_error_handler');
>   function pc_error_handler($errno, $error, $file, $line, $context) {
>   $message = "[ERROR][$errno][$error][$file:$line]";
>   error_log($message); echo $message;
>   }
> 
> > 
> 
> I have a page that hits the database to display the records.
> One of the
> columns is 'startDate'. I format this for display like this:
> 
>  date('m/d/Y',strtotime($row_GetAds['startDate'])); ?>
> 
> The page returns the following error:
> 
> [ERROR][8][Undefined index:
> startDate][/home/.paco/campuscb/campuscorkboard.com/search_job
> s.php:319][ERR OR][8][strtotime() called with empty time
> parameter][/home/.paco/campuscb/campuscorkboard.com/search_job
> s.php:319]10/1 0/2003
> 
> If I comment out the error_reporting include file, the page
> renders fine. I
> have checked the DB and the startDate column has a valid date in it.

I'd bet this is solely to do with your error_reporting setting -- what is it
when you have the error-trapping include commented out?  Odds on it's E_ALL
^ E_NOTICE, and the two errors in question are NOTICE-level messages (as
evidenced by the [8] in each message) -- so you see them when your error
handler has control, but not when it doesn't.  Try putting the
error_reporting(E_ALL) call in your main script, commenting out the include,
and seeing if you now get standard PHP notices about these two errors.

Something else to note is that the setting of error_reporting has absolutely
no effect on when your error_handler is called -- it will be called every
time there is an event that *could* generate an error message.  It's up to
your error_handler to decide, on each occasion, whether it *should* issue a
message -- thus, if you want it to observe the error_reporting setting, you
have to test the value of the $errno parameter (which is actually the error
*level* of the error, not an individual error number) against the current
setting of error_reporting() (you have to fetch the result of
error_reporting() every time, since it will be zero if the context
triggering the error is affected by an @ operator, allowing you to ignore
that particular error if you want to).

Cheers!

Mike

-
Mike Ford,  Electronic Information Services Adviser,
Learning Support Services, Learning & Information Services,
JG125, James Graham Building, Leeds Metropolitan University,
Beckett Park, LEEDS,  LS6 3QS,  United Kingdom
Email: [EMAIL PROTECTED]
Tel: +44 113 283 2600 extn 4730  Fax:  +44 113 283 3211 

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



RE: [PHP] Sessions

2003-10-13 Thread Ford, Mike [LSS]
On 11 October 2003 02:23, Lowell Allen wrote:

> > I'm trying to track down some issues with my site, and am trying to
> > decide if it's a session variable issue. On a random basis, it
> > appears that session vars are being dumped, deleted, or unset, as
> > the site will break. Queries based on session vars don't work,
> > session vars not being displayed, etc. This seems to happen most
> > often after a page has been idle for a couple of minutes and a
> > refresh is done on the page. 
> > 
> > This is on a hosted site. I have checked the configuration settings
> > with phpinfo(); and session support is enabled.
> > 
> > On all pages where I use $_SESSION[], I have  > session_start();?>. This has been double checked.
> > 
> > 1) Do session vars timeout, or can they be set to timeout after a
> > certain length of time? 2) Is there anything other than
> > session_start(); that needs to be done when using session vars? 3)
> > What other things can I check for? 
> 
> Most things are explained well by the online manual, and you
> should read and
> re-read the session documentation. That said, I'll also say that the
> documentation on sessions is not as informative as I'd like
> it to be, and I
> still get reports of sessions expiring before they should.

AFAIR, there's lots of extra helpful information about what the php.ini
session settings mean in the distributed php.ini-dist and/or
php-ini-recommended.  If you're tinkering with these settings, you really
need to read, absorb and understand those comments in addition to what's in
the actual manual.

Cheers!

Mike

-
Mike Ford,  Electronic Information Services Adviser,
Learning Support Services, Learning & Information Services,
JG125, James Graham Building, Leeds Metropolitan University,
Beckett Park, LEEDS,  LS6 3QS,  United Kingdom
Email: [EMAIL PROTECTED]
Tel: +44 113 283 2600 extn 4730  Fax:  +44 113 283 3211 

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



RE: [PHP] newbie question

2003-10-13 Thread Ford, Mike [LSS]
On 12 October 2003 23:36, Eugene Lee wrote:

> On Mon, Oct 13, 2003 at 03:23:53AM +1000, Wang Feng wrote:
> > 
> >  "1. An optional padding specifier that says what character will be
> > used for padding the results to the right string size. This may be
> > a space character or a 0 (zero character). The default is to pad
> > with spaces. An alternate padding character can be specified by
> > prefixing it with a single quote ('). See the examples below." "3.
> > An optional number, a width specifier that says how many characters
> > (minimum) this conversion should result in." 
> > http://au.php.net/manual/en/function.sprintf.php 
> > 
> > Assume that $price=.65; then the "%0.2f" yields 0.65.
> > 
> > If we follow what the manual says, then can you tell me what the 0
> > is used for? Is it a (optional) paddinng spcifier OR is it a
> > (optional) width specifier OR both? And why does it yiled 0.65
> > rather than .65? 
> > 
> > (The manual doesn't explain things clear, man.)
> 
> The PHP manual is vague in several sections.  I wonder how bug
> reports get submitted for it? 

http://bugs.php.net/report.php and select "Documentation problem" from the
"Type of bug" drop-down.  (But read the bug-reporting guidelines at
http://php.bugs.php.net/ first!)

Cheers!

Mike

-
Mike Ford,  Electronic Information Services Adviser,
Learning Support Services, Learning & Information Services,
JG125, James Graham Building, Leeds Metropolitan University,
Beckett Park, LEEDS,  LS6 3QS,  United Kingdom
Email: [EMAIL PROTECTED]
Tel: +44 113 283 2600 extn 4730  Fax:  +44 113 283 3211 

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



[PHP] unset() un-appropriate ?

2003-10-13 Thread Ciprian Trofin

I have a form with 3 checkboxes x1,x2,x3. I want to build an array of
values from the checked boxes; I choosed the following approach:
1. build an array with all values
2. eliminate from array the "" values using unset

CODE:

  $x = array($_POST['x1'],$_POST['x2'],$_POST['x3']);
  do {
   for ($i=0;$i < sizeof($x);$i++) {
$stop = 0;
if (!trim($x[$i])) {
 $stop = 1;
 unset($x[$i]);
 break;
}
   }
  }
  while ($stop>0);


For some reason, the code doesn't work (loops ad infinitum). But replacing

unset($x[$i]);

with

array_splice($indice, $i, 1);

it does.

Help!

-- 
 Ciprian

> Remember that you are unique. Just like everyone else.

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



Re: [PHP] Search for an exact string inside of another string

2003-10-13 Thread Rory McKinley
Hi

What you are looking for is a regular expression function, I would suggest
the following:

if(ereg($str1, $str2) == 1)
{
/*Found Bob in string*/
}
else
{
/*didn't find Bob
}


Rory McKinley
Nebula Solutions
+27 82 857 2391
[EMAIL PROTECTED]
"There are 10 kinds of people in this world,
those who understand binary and those who don't" (Unknown)
- Original Message - 
From: "PHP Webmaster" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, October 12, 2003 2:11 AM
Subject: [PHP] Search for an exact string inside of another string


> Hi all,
>
> I have a little problem that I hope you can help me with.
>
> I have the following strings:
>
> $str1 = "Bob";
> $str2 = "My Name Is Bob";
>
> How can I get PHP to look for $str1 inside of $str2?
>
> Also, what about if "Bob" inside of $str2 is in different places?
>
> I would like something like:
>
> if ($str1 IS INSIDE OF $str2) {
> echo "str1 is inside of str2";
> }
> else {
> echo "could not find str1 inside of str2";
> }
>
> Any ideas appreciated.
>
> -- 
> 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] preg_replace newb

2003-10-13 Thread Justin French
Hi,

Trying to get this working, without any luck:

$str = preg_replace("!(.*?)!",'{link|\\2|\\1}',$str);

FWIW, I'm aware that this doesn't ANY WHERE NEAR cover all instances of 
a link, but in this case, I KNOW that the link will have the above 
format, because it was generated by another PHP script I wrote.

Any hints?

Justin

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


Re: [PHP] Output control - IE problem with flush()

2003-10-13 Thread Marek Kilimajer
Guess what? No, unless you hack into users computer and install mozilla 
instead ;).

Do you really need tables? CSS can do just about anything.

Duncan wrote:
Hi,

I am currently working with the output control functions and they work
like a charm - as long as I don't start using IE to view my test page.
I put together the below code from a couple of comments on php.net and
it works like a charm with mozilla, where the content gets displayed
with each loop run - but as soon as I start using tables then IE waits
until the table gets closed to display the output, so it basically
waits until everything is put together anyway and outputs it all.
So, mozilla starts drawing the first table which gets surrounded by
the first table border, then the next table appears so that both get
surrounded by the first table border and so on.
IE simply keeps on loading until all 3 parts of the array have been
put together and then starts displaying the output in the window.
So, my question: is there a way to make IE display the flush'ed output
even when I am using tables?
I guess I am simply making a stupid mistake here, but so far all my
tries resulted in IE not being able to use flush() within tables
(e.g.: remove the surrounding table and it will work just fine again).
S.o. mentioned in the php.net comments that the < tr > tag is causing
those problems, but I tried all kind of combinations to no avail.
However, since I see that kind of output control on several sites I assume there has to be some kind of way to get the data displayed before the table structure has been closed again - or is that an ASP only feature?

Any help would be appreciated,

Duncan

Line
1';
$arg[1] = 'Line 2';
$arg[2] = 'Line
3';
ob_start();
for ($j=0; $j != sizeof($arg); $j++)
{
@eval("?>" . $arg[$j] .str_pad(" ", 300). "
ob_end_clean();
?>

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


Re: [PHP] unset() un-appropriate ?

2003-10-13 Thread David Otton
On Mon, 13 Oct 2003 12:47:44 +0200, you wrote:

>I have a form with 3 checkboxes x1,x2,x3. I want to build an array of
>values from the checked boxes; I choosed the following approach:
>1. build an array with all values
>2. eliminate from array the "" values using unset
>
>For some reason, the code doesn't work (loops ad infinitum). But replacing

Turning your error-reporting level up might give you a hint.

I've no idea what you're trying to accomplish, but I would guess you're
trying for this:



infinite loops seem to be part of the design. Maybe this would be better for
you?



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



[PHP] \n \t don't work!!!

2003-10-13 Thread Wang Feng
Guys,

These codes are copied from the manual:

*
 echo ("this is the simplest, an SGML processing instruction\n");
 echo "This spans
 multiple lines. The newlines will be
 output as well";
 echo "This spans\nmultiple lines. The newlines will be\noutput as well.";
**

None of them works. I mean there're not any new lines generated in my
browser and I have to use the echo"" to print a new line. But why
doesn't the \n work? BTW, the \t doesn't work either.

(WindowsXP Pro + PHP Version 4.1.1)


Please advise.


cheers,

feng

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



Re: [PHP] \n \t don't work!!!

2003-10-13 Thread Chris Hayes
At 13:22 13-10-03, you wrote:
Guys,

These codes are copied from the manual:

*
 echo ("this is the simplest, an SGML processing instruction\n");
 echo "This spans
 multiple lines. The newlines will be
 output as well";
 echo "This spans\nmultiple lines. The newlines will be\noutput as well.";
**
None of them works.
They do work but you will not see that in the rendered html page (in a 
browser). Have a look at the source of the produced page and you will see 
the linebreaks.
I suppose your manual was not intending on making html pages, or it was a 
very lousy one. I would recommend reading the first chapters of the manual 
on www.php.net to get a general idea of PHP. Then read some tutorials on 
for instance phpfreaks.com.


 I mean there're not any new lines generated in my
browser and I have to use the echo"" to print a new line. But why
doesn't the \n work? BTW, the \t doesn't work either.
(WindowsXP Pro + PHP Version 4.1.1)

Please advise.

cheers,

feng

--
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] \n \t don't work!!!

2003-10-13 Thread Marek Kilimajer
It DOES work, look at the source html code.

Wang Feng wrote:

Guys,

These codes are copied from the manual:

*
 echo ("this is the simplest, an SGML processing instruction\n");
 echo "This spans
 multiple lines. The newlines will be
 output as well";
 echo "This spans\nmultiple lines. The newlines will be\noutput as well.";
**
None of them works. I mean there're not any new lines generated in my
browser and I have to use the echo"" to print a new line. But why
doesn't the \n work? BTW, the \t doesn't work either.
(WindowsXP Pro + PHP Version 4.1.1)

Please advise.

cheers,

feng

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


[PHP] Re: I can't make 'read_tag.php' file

2003-10-13 Thread Bas
This just says:

Parse error: parse error, unexpected T_STRING, expecting ')' in
C:\pub\read-tags.php on line 12
"Manuel VáZquez Acosta" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Try this:
>
> function readTag($filenane, $tagtype, $degub = false)
> // I prefer boolean for debug :)
> {
> $filedata = file_get_contents($filename);
> $tagtype = preg_quote($tagtype);
> $tagRegExp = "/((?:.|\s)*?)/";
> preg_replace_callback($tagRegExp, 'replaceFunc', $filedata);
> }
>
> function replaceFunc(match)
> {
> // match[0] ---  the whole tag from  to 
> // match[1] ---  the contents of the tag
> //I am my self !!! in the example
>
>
> return WHATEVER_YOU_WANT_TO_REPLACE_THE_TAG;
> }
>
> I didnt make sure this script will work 100%; but it should.
>
> Manu.
>
> "Bas" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
> > I have found that this script doesn't work:
> >
> > read_tag.php
> >
> > ---
> >  >
> > function readTag($filename, $tagtype, $debug = 0) {
> > $filedata = file_get_contents($filename);
> > $tagrealname = " > $tagrealname .= $tagtype;
> > $tagrealname .= ">";
> >
> > $tagdata = stristr($filedata, $tagrealname);
> > $posofend = strpos($tagdata, "");
> > $length = strlen($tagdata);
> > $lengthoftag = strlen($tagrealname);
> > $lengthofend = strlen("");
> > $lengthofstr = $length - $posofend - $lengthoftag;
> > $returndata = substr($tagdata, $lengthoftag, $lengthofstr);
> > if ($debug == 1) {
> > echo "Length = " . $length;
> > echo "Of Tag = " . $lengthoftag;
> > echo "Of Str = " . $lengthofstr;
> > echo "Of End = " . $posofend;
> > echo "TagData:" . $tagdata;
> > }
> > return $returndata;
> > }
> > ?>
> >
> > 
> > 
> > Test readTag-functie
> > 
> > 
> > 
> >
> > ---
> > And with this, it needs the file 'test.tag'
> > ---
> > 
> > I am myself!!
> > 
> > 
> > This is a test!!!
> > 
> > 
> > Welcome!!!
> > 
> > 
> > Closing!!!
> > 
> > ---
> > The first parameter of the readTag function is the filename of the tag
> file.
> > The second is the tag to search for an the third is the debug mode.
> >
> > The error is that if i load this, the readTag function returns
everything
> > except for the Closing!!!
> >
> > What's wrong?
> >
> > I'm running Win XP with Apache 2.0.44(Win32) CGI setup and PHP 4.3.3

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



Re: [PHP] phpmyadmin

2003-10-13 Thread Marek Kilimajer
Again, check phpmyadmin html source code. If your query begins with 
anything potentionaly destructive (DELETE, ALTER, DROP ...) it displays 
a confirm (not alert).

John Taylor-Johnston wrote:

What about some javascript to alert() and decide if the form executes like phpmyadmin does:

http://ccl.flsh.usherbrooke.ca/example.jpg

This would save me time coding PHP.
How can I accomplish this? What does the onsubmit look like?
John


* Thus wrote John Taylor-Johnston ([EMAIL PROTECTED]):

Any ideas? I want to avoid having two "mysql_query($sql)". I'm basically looking for better functionality and wanting to learn how to clean up my code.
there are a couple options, the insert has a extra option, 'ON
DUPLICATE KEY':
 http://www.mysql.com/doc/en/INSERT.html
Or use the REPLACE syntax:
 http://www.mysql.com/doc/en/REPLACE.html


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


Re: [PHP] \n \t don't work!!!

2003-10-13 Thread Wang Feng

> They do work but you will not see that in the rendered html page (in a
> browser). Have a look at the source of the produced page and you will see
> the linebreaks.

 The page source shows:





> I suppose your manual was not intending on making html pages, or it was a
> very lousy one.

I do want to just make a html page.

The following is my source code, and what I expect is to see the new lines
when the \n appears, ok?

*

Hello World Program




**

So, what's the problem here?


cheers,

feng

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



Re: [PHP] unset() un-appropriate ?

2003-10-13 Thread Jason Wong
On Monday 13 October 2003 18:47, Ciprian Trofin wrote:
> I have a form with 3 checkboxes x1,x2,x3. I want to build an array of
> values from the checked boxes; I choosed the following approach:
> 1. build an array with all values
> 2. eliminate from array the "" values using unset

The checkboxes that are not checked are not set anyway so what you're trying 
to do is superfluous. Try print_r($_POST) to see exactly what you're getting 
back from the form.

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
--
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
--
/*
Money can't buy happiness, but it can make you awfully comfortable while
you're being miserable.
-- C.B. Luce
*/

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



Re: [PHP] I can't make 'read_tag.php' file

2003-10-13 Thread Bas
This works!!! I am a newbie to PHP and i8 knop really nothing about Regular
Expressions!!! Thanks!!!
"Curt Zirzow" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> * Thus wrote Bas ([EMAIL PROTECTED]):
> >
> > ---
> > And with this, it needs the file 'test.tag'
> > ---
> > 
> > I am myself!!
> > 
> [...]
> >
> > The error is that if i load this, the readTag function returns
everything
> > except for the Closing!!!
>
> Do you mean that all the other tags return the proper content
> except the last one?  I didn't study the code too closely for
> reasons that follow.
>
> >
> > What's wrong?
>
> Glad you asked :)   Here are a couple things I noticed:
>   - every call to this function has the overhead of reading the
> file.
>   - The parsing is error prone, ie. someone puts: 
>
> If its possible I would take a complete different approach at
> parsing the tags.  There are two options that I see right away. Use
> XML as your data format and an xml parser to obtain the values in
> the tags.  Or use preg_match_all.  Here is how I would approach the
> preg_match_all:
>
> function parseTags($file) {
>   /* readfile... here */
>
>   $tag_match = "!\s*([^<]*)\s*!is";
>   preg_match_all($tag_match, $filedata, $matches);
>   for ($i=0; $i< count($matches[0]); $i++) {
> $tagname = $matches[1][$i];
> $tags[$tagname] = $matches[2][$i];
>   }
>   return $tags;
> }
>
> Then you can use it like so:
>
>  $bttags = parseTags('test.tag');
> ?>
> 
> 
> Test readTag-functie
> 
> 
> 
>
>
> HTH,
>
> Curt
> -- 
> "My PHP key is worn out"
>
>   PHP List stats since 1997:
>   http://zirzow.dyndns.org/html/mlists/

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



Re: [PHP] \n \t don't work!!!

2003-10-13 Thread Wang Feng
Ok, Now I see what happen (maybe).

So, the "\n" is not for the browser output, but for the *view source*? So,
it's different from the "echo "?

If so, what's the deal to do that? --- Makes it look nice if the user view
the source code?


cheers,

feng


- Original Message -
From: "Chris Hayes" <[EMAIL PROTECTED]>
To: "Wang Feng" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Monday, October 13, 2003 9:29 PM
Subject: Re: [PHP] \n \t don't work!!!


> At 13:22 13-10-03, you wrote:
> >Guys,
> >
> >These codes are copied from the manual:
> >
> >*
> >  echo ("this is the simplest, an SGML processing instruction\n");
> >  echo "This spans
> >  multiple lines. The newlines will be
> >  output as well";
> >  echo "This spans\nmultiple lines. The newlines will be\noutput as
well.";
> >**
> >
> >None of them works.
> They do work but you will not see that in the rendered html page (in a
> browser). Have a look at the source of the produced page and you will see
> the linebreaks.
> I suppose your manual was not intending on making html pages, or it was a
> very lousy one. I would recommend reading the first chapters of the manual
> on www.php.net to get a general idea of PHP. Then read some tutorials on
> for instance phpfreaks.com.
>
>
> >  I mean there're not any new lines generated in my
> >browser and I have to use the echo"" to print a new line. But why
> >doesn't the \n work? BTW, the \t doesn't work either.
> >
> >(WindowsXP Pro + PHP Version 4.1.1)
> >
> >
> >Please advise.
> >
> >
> >cheers,
> >
> >feng
> >
> >--
> >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] \n \t don't work!!!

2003-10-13 Thread Marek Kilimajer
Wang Feng wrote:
 The page source shows:




The problem might be right here --+
(closing html tag)|
  |
Hello World Program


?>


**
Simple:


Hello World Program


echo ("this is the simplest, an SGML processing instruction");
echo "This spansmultiple lines. The newlines will beoutput as well";
echo "This spansmultiple lines. The newlines will beoutput as 
well.";

?>


In html you cannot use newlines for formating, use  if you need 
newline. You can use  tag for preformated text however.

So, what's the problem here?

cheers,

feng

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


RE: [PHP] ftp_connect() issues

2003-10-13 Thread Phil Ewington - 43 Plc
I can still connect to the ftp server from my client machine using any
number of FTP apps, I also created an ftp test tool, on the same server as I
am currently having problems, that lets you enter an ftp host, username &
password to see if it can connect and login.

I can login to other ftp servers just not the one I want to. Strangely I
managed to get a connection to the suspect ftp server a couple of times then
nothing again. Seems to be an intermittent problem, but it would be nice to
know whether it was a connection that was being dropped by the remote server
or whether there were network issues that stopped the request reaching the
target server.


Phil.

-Original Message-
From: Jason Wong [mailto:[EMAIL PROTECTED]
Sent: 10 October 2003 17:51
To: [EMAIL PROTECTED]
Subject: Re: [PHP] ftp_connect() issues


On Saturday 11 October 2003 00:01, Phil Ewington - 43 Plc wrote:

> A script that has been running successfully for over 18 months has
suddenly
> stopped working due to ftp_connect() failing. I have been assured that
> nothing has changed on the ftp server so now need to try and find out why
> this is happening.

And have you verified that you can still connect to the ftp server via other
means?

And have you verified that the script can connect to other ftp servers?

--
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
--
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
--
/*
It is more rational to sacrifice one life than six.
-- Spock, "The Galileo Seven", stardate 2822.3
*/

--
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] Connecting to Linux server from windows

2003-10-13 Thread Binay
Hi all !

I have PHP (4.3.2) running on windows 2k. Now i want to connect to a Linux Server and 
execute some commands and get the results back to win2k server. How can i achiece 
this. 

Please help me out.


Thanks in advance

Binay 


[PHP] Error in creating BTML(BT Markup Language)

2003-10-13 Thread Bas
I am trying to make an BTML-parser.

(BTML-Some Markup Language invented by Me)

I have 3 files:

read-tags.php:
---
\s*([^<]*)\s*!is";
  preg_match_all($tag_match, $filedata, $matches);
  for ($i=0; $i< count($matches[0]); $i++) {
$tagname = $matches[1][$i];
$tags[$tagname] = $matches[2][$i];
  }
  return $tags;
}
?>
---
btml.php:
---
s in your )
include_once("read-tags.php");
$filename = $_GET['name'];
$bttags = parseTags($filename);

if ($bttags['btml'] == '') {
echo "";
echo "" . $bttags['title'] . "";
echo "" . $bttags['title'] . "";
echo $bttags['text'];
if (!isempty($bttags['image'])) {
echo ";
}
echo "";
}
?>
---
and an test.btm file
---



Welcome!


Welcome to my BTML page!!! This is an experimentally version of HTML!!!
Bye!!!


noimage.gif

---

I can run this file(btml.php?name=test.btm)
and it gives me this error:
Parse error: parse error, unexpected '/' in C:\pub\include\btml.php on line
17
Can you help me out?

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



Re: [PHP] Connecting to Linux server from windows

2003-10-13 Thread Mohamed Lrhazi
How about CURL and telnet? see http://php.net/curl

On Mon, 2003-10-13 at 08:12, Binay wrote:
> Hi all !
> 
> I have PHP (4.3.2) running on windows 2k. Now i want to connect to a Linux Server 
> and execute some commands and get the results back to win2k server. How can i 
> achiece this. 
> 
> Please help me out.
> 
> 
> Thanks in advance
> 
> Binay 

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



Re: [PHP] Error in creating BTML(BT Markup Language)

2003-10-13 Thread Pavel Jartsev
Bas wrote:

> ...
>
echo ";
>

Seems that U don't have closing double-quote (") in line above.
It should be:
echo "";

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


Re: [PHP] preg_replace newb

2003-10-13 Thread Mohamed Lrhazi
I would try a petern like this:

$pattern="!([^<]*)!"

check the docs for greedy not greedy thingy...

Mohamed~

On Mon, 2003-10-13 at 06:27, Justin French wrote:
> Hi,
> 
> Trying to get this working, without any luck:
> 
> $str = preg_replace("! href='(.*?)'>(.*?)!",'{link|\\2|\\1}',$str);
> 
> FWIW, I'm aware that this doesn't ANY WHERE NEAR cover all instances of 
> a link, but in this case, I KNOW that the link will have the above 
> format, because it was generated by another PHP script I wrote.
> 
> Any hints?
> 
> Justin

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



Re: [PHP] Error in creating BTML(BT Markup Language)

2003-10-13 Thread Bas
Now I get the output:

(in html, if you get a mail, you get the real output.)

Welcome!
Welcome!

Notice:  Undefined index:  text in C:\pub\include\btml.php on
line 13

"Pavel Jartsev" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Bas wrote:
> >
>  > ...
>  >
> > echo ";
>  >
>
> Seems that U don't have closing double-quote (") in line above.
> It should be:
>
> echo "";
>
>
> -- 
> Pavel a.k.a. Papi
>

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



RE: [PHP] From PHP to C and viceversa

2003-10-13 Thread Gregory Kornblum

>I have apache under linux and I want to exchange data 
>from a php script to a c programm (some strings): is it possible?

Yes in multiple ways. First off you need to figure out if you have the
source for the C application. If so you can use sockets, the MySQL client
API, and various other connectivity methods. Since it's using a script I'm
assuming it's not an extremely high concurrency application, then using the
MySQL client API would be the most robust option. The only other way to do
it without the source, at least that comes to mind, would be to output a
file from PHP if the C application takes input from a file. Regards.

-Gregory

P.S. Try to elaborate a bit more with your requests next time.

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



Re: [PHP] newbie question

2003-10-13 Thread 'Eugene Lee'
On Mon, Oct 13, 2003 at 10:32:18AM +0100, Ford, Mike   [LSS] wrote:
: 
: On 12 October 2003 23:36, Eugene Lee wrote:
: > 
: > The PHP manual is vague in several sections.  I wonder how bug
: > reports get submitted for it? 
: 
: http://bugs.php.net/report.php and select "Documentation problem" from
: the "Type of bug" drop-down.  (But read the bug-reporting guidelines
: at http://php.bugs.php.net/ first!)

Thanks Mike, I'll give it a read when I get free!

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



RE: [PHP] PHP Installation Problems

2003-10-13 Thread Daniel Perez Clavero
RE: [PHP] PHP Installation ProblemsThis is my experience, I never chose the
PHP installation pack, I prefer the uncompressed version, modify the php.ini
and put the right dlls into the WINNT\System32 folder... I do not know what
windows is going to permit to the installation program (registry entries,
dlls substitution, etc).

I am running PHP 4.3.0 over W2K Advanced Server, but not using IIS, i´m
using Apache 1.3.27 as web server. Everything works fine.

I suggest that.

1.- Try to execute from the command line an easy script such php_info(),
Hello world or something like that in order to see if PHP is working.
2.- Try to lauch web browser and go to the root of the server in order to
see if webserver is working properly

If both are working, i suposed the error is that the webserver is not able
to understand that this request has to managed by php.exe

review this useful article por PHP on IIS

http://www.onlamp.com/pub/a/php/2000/12/14/php_admin.html

if you are running Apache, review the paths and extensions of httpd.conf
specially theese entries.

ServerRoot
LoadModule php4_module [path of the php4apache.dll)
AddModule mod_php4.c
Port
DocumentRoot
Directory and DirectoryIndex
AddType application/x-httpd-php .php

Regards.

This mesage is going to be forwarded to the list in order to let other
members sugest or add coments to your thread.

   -Original Message-
  From: Andrew Woolley [mailto:[EMAIL PROTECTED]
  Sent: lunes, 13 de octubre de 2003 14:05
  To: 'Daniel Perez Clavero'
  Subject: RE: [PHP] PHP Installation Problems


  Ok, Well I tried to install php 4.3.3 on a windows 2000 advanced server
box and it said that some ocx file was missing and I needed to set some
permissions.  So I set the permissions both in active directory on the
domain controller and on the local machine I had just installed php on.  Php
sccripts then loaded in IE as plain text (i could see the code).  I ran a
windows update on the server box and that has fixed the missing ocx file so
I can't tell you what that file was exactly.  However upon re-installation
of php 4.3.3 I was told at the end of the install process that again I had
to set the correct permissions.  These are set.  The confusing thing is that
now I cannot even open the php pages as plain text in IE, instead the
browser tells me that the page doesn't exist.  Please try and shed some
light on the situations as the company I am working for so far has only a
mailto: link in the contact page because I can't program asp.

  Please Help



  Thanks and Kind Regards



  Andrew Woolley
  168 Technology Ltd

  -Original Message-
  From: Daniel Perez Clavero [mailto:[EMAIL PROTECTED]
  Sent: 10 October 2003 13:42
  To: Andrew R. Woolley; [EMAIL PROTECTED]
  Subject: RE: [PHP] PHP Installation Problems



  Can you be a bit more explicit about errors? I´ve got some apache+PHP
  running on W2K Server box...

  -Original Message-
  From: Andrew Woolley [mailto:[EMAIL PROTECTED]
  Sent: viernes, 10 de octubre de 2003 14:11
  To: [EMAIL PROTECTED]
  Subject: [PHP] PHP Installation Problems





  -Original Message-
  From: Mehdi Achour [mailto:[EMAIL PROTECTED]
  Sent: 10 October 2003 12:28
  To: Andrew R. Woolley
  Cc: [EMAIL PROTECTED]
  Subject: Re: PHP Installation Problems



  Hi Andrew,

  Please ask support questions at [EMAIL PROTECTED]

  didou

  > I use php a lot myself but have only ever installed it on my office pc
  > (Win2K-Pro) and my home pc (WinXP-Pro).  However the company I work for
is
  > now hosting there own site on one and the Win2K Advanved Server systems
in
  > our comms room.  I have had problems installing PHP on this system but
  have
  > no problems installing it on a workstation.  Is php compatible with the
  > server software or do I have to run it on a linux box for this to work.
  >
  >
  > Thanks and Kind Regards
  >
  >
  >
  > Andrew Woolley
  > 168 Technology Ltd
  >
  >
  > HYPERLINK "mailto:[EMAIL PROTECTED]"[EMAIL PROTECTED]
  > +44 161 975 6260
  > +44 7766513134
  >
  >
  > ---
  > Outgoing mail is certified Virus Free.
  > Checked by AVG anti-virus system (http://www.grisoft.com).
  > Version: 6.0.516 / Virus Database: 313 - Release Date: 01/09/2003
  >
  >



  ---
  Incoming mail is certified Virus Free.
  Checked by AVG anti-virus system (http://www.grisoft.com).
  Version: 6.0.516 / Virus Database: 313 - Release Date: 01/09/2003



  ---
  Outgoing mail is certified Virus Free.
  Checked by AVG anti-virus system (http://www.grisoft.com).
  Version: 6.0.516 / Virus Database: 313 - Release Date: 01/09/2003



  ---
  Incoming mail is certified Virus Free.
  Checked by AVG anti-virus system (http://www.grisoft.com).
  Version: 6.0.516 / Virus Database: 313 - Release Date: 01/09/2003


  ---
  Outgoing mail is certified Virus Free.
  Checked by AVG anti-virus system (http://www.grisoft.com).
  Version: 6.0.516 / Virus Database: 313 - Release Date: 01/09/2003



Re: [PHP] \n \t don't work!!!

2003-10-13 Thread Eugene Lee
On Mon, Oct 13, 2003 at 09:48:56PM +1000, Wang Feng wrote:
: 
: Ok, Now I see what happen (maybe).
: 
: So, the "\n" is not for the browser output, but for the *view source*? So,
: it's different from the "echo "?
: 
: If so, what's the deal to do that? --- Makes it look nice if the user view
: the source code?

When normally rendering HTML text, multiple continuous whitespace
characters (i.e. "\s+") as a single space.  So HTML source code:


How are
you?
I am fine.

What else is new?



gets displayed as this:


How ar you. I am fine. What else is new?


To force a visual linebreak in rendered HTML pages, as you already
discovered you need to manually insert "" tags.

However, if you don't want to litter your HTML source code with a bunch
of gratuitous "" tags all over the place, use the "" container
tag to make the browser render newlines as visual linebreaks.

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



Re: [PHP] \n \t don't work!!!

2003-10-13 Thread Steve Buehler
If you want it to work with \n, then you will need to use the  
tags.  Otherwise you need to translate the \n's into  tags.  \n is NOT 
an html tag so when you print them to the browser, it adds lines to the 
source, but as you might already know, a new line in the source of an html 
page does NOT give a new line in the output unless you use an html tag that 
would give the new line.

Steve

At 06:39 AM 10/13/2003, you wrote:

> They do work but you will not see that in the rendered html page (in a
> browser). Have a look at the source of the produced page and you will see
> the linebreaks.
 The page source shows:



> I suppose your manual was not intending on making html pages, or it was a
> very lousy one.
I do want to just make a html page.

The following is my source code, and what I expect is to see the new lines
when the \n appears, ok?
*


?>


**
So, what's the problem here?

cheers,

feng

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--
This message has been scanned for viruses and
dangerous content by the MailScanner at ow4, and is
believed to be clean.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] preg_replace newb

2003-10-13 Thread Justin French
Mohamed,

I still can't seem to get it working:

foo";
$str = preg_replace("!([^<]*)!",'blah',$str);
echo $str;
?>
echo's 'foo' rather than 'blah'

Justin

On Monday, October 13, 2003, at 10:17  PM, Mohamed Lrhazi wrote:

I would try a petern like this:

$pattern="!([^<]*)!"

check the docs for greedy not greedy thingy...
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] \n \t don't work!!!

2003-10-13 Thread Steve Buehler
Do what I do, use both the \n and the  tags.  I am not worried about 
anybody else thinking the source is nice looking, I do it for debugging so 
that I can see how the source comes out in a readable format.

Steve

At 06:48 AM 10/13/2003, you wrote:
Ok, Now I see what happen (maybe).

So, the "\n" is not for the browser output, but for the *view source*? So,
it's different from the "echo "?
If so, what's the deal to do that? --- Makes it look nice if the user view
the source code?
cheers,

feng

- Original Message -
From: "Chris Hayes" <[EMAIL PROTECTED]>
To: "Wang Feng" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Monday, October 13, 2003 9:29 PM
Subject: Re: [PHP] \n \t don't work!!!
> At 13:22 13-10-03, you wrote:
> >Guys,
> >
> >These codes are copied from the manual:
> >
> >*
> >  echo ("this is the simplest, an SGML processing instruction\n");
> >  echo "This spans
> >  multiple lines. The newlines will be
> >  output as well";
> >  echo "This spans\nmultiple lines. The newlines will be\noutput as
well.";
> >**
> >
> >None of them works.
> They do work but you will not see that in the rendered html page (in a
> browser). Have a look at the source of the produced page and you will see
> the linebreaks.
> I suppose your manual was not intending on making html pages, or it was a
> very lousy one. I would recommend reading the first chapters of the manual
> on www.php.net to get a general idea of PHP. Then read some tutorials on
> for instance phpfreaks.com.
>
>
> >  I mean there're not any new lines generated in my
> >browser and I have to use the echo"" to print a new line. But why
> >doesn't the \n work? BTW, the \t doesn't work either.
> >
> >(WindowsXP Pro + PHP Version 4.1.1)
> >
> >
> >Please advise.
> >
> >
> >cheers,
> >
> >feng
> >
> >--
> >PHP General Mailing List (http://www.php.net/)
> >To unsubscribe, visit: http://www.php.net/unsub.php
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--
This message has been scanned for viruses and
dangerous content by the MailScanner at ow4, and is
believed to be clean.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] \n \t don't work!!!

2003-10-13 Thread Wang Feng
Thank you all for pointing me to the *right* direction!!!

Now I really understand why and what I can do with the \n in php.  :-)


cheers,

feng


- Original Message -
From: "Eugene Lee" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, October 13, 2003 10:58 PM
Subject: Re: [PHP] \n \t don't work!!!


> On Mon, Oct 13, 2003 at 09:48:56PM +1000, Wang Feng wrote:
> :
> : Ok, Now I see what happen (maybe).
> :
> : So, the "\n" is not for the browser output, but for the *view source*?
So,
> : it's different from the "echo "?
> :
> : If so, what's the deal to do that? --- Makes it look nice if the user
view
> : the source code?
>
> When normally rendering HTML text, multiple continuous whitespace
> characters (i.e. "\s+") as a single space.  So HTML source code:
>
> 
> How are
> you?
> I am fine.
>
> What else is new?
> 
> 
>
> gets displayed as this:
>
> 
> How ar you. I am fine. What else is new?
> 
>
> To force a visual linebreak in rendered HTML pages, as you already
> discovered you need to manually insert "" tags.
>
> However, if you don't want to litter your HTML source code with a bunch
> of gratuitous "" tags all over the place, use the "" container
> tag to make the browser render newlines as visual linebreaks.
>
> --
> 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] \n \t don't work!!!

2003-10-13 Thread Steve Buehler
To give tabs in html, you might want to try using       
instead of \t

Steve

At 06:57 AM 10/13/2003, you wrote:
Wang Feng wrote:
 The page source shows:



The problem might be right here --+
(closing html tag)|
  |
Hello World Program




**
Simple:


In html you cannot use newlines for formating, use  if you need
newline. You can use  tag for preformated text however.
>
> So, what's the problem here?
>
>
> cheers,
>
> feng
>
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--
This message has been scanned for viruses and
dangerous content by the MailScanner at ow4, and is
believed to be clean.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


RE: [PHP] \n \t don't work!!!

2003-10-13 Thread Jay Blanchard
[snip]
To give tabs in html, you might want to try using       
instead of \t
[/snip]

And one other thing I didn't see mentioned http://www.php.net/nl2br

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



Re: [PHP] \n \t don't work!!!

2003-10-13 Thread Eugene Lee
On Mon, Oct 13, 2003 at 08:10:39AM -0500, Jay Blanchard wrote:
: 
: [snip]
: To give tabs in html, you might want to try using       
: instead of \t
: [/snip]
: 
: And one other thing I didn't see mentioned http://www.php.net/nl2br

Note that nl2br() is XHTML compliant, which means it sends out ""
tags instead of "" tags.  This is a problem on browsers that do
poorly with mixed HTML and XHTML tag styles in the same body content.

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



Re: [PHP] preg_replace newb

2003-10-13 Thread Eugene Lee
On Mon, Oct 13, 2003 at 11:00:36PM +1000, Justin French wrote:
: 
: On Monday, October 13, 2003, at 10:17  PM, Mohamed Lrhazi wrote:
: 
: >I would try a petern like this:
: >
: >$pattern="!([^<]*)!"
: >
: >check the docs for greedy not greedy thingy...
: 
: Mohamed,
: 
: I still can't seem to get it working:
: 
: foo";
: $str = preg_replace("!([^<]*)!",'blah',$str);
: echo $str;
: ?>
: 
: echo's 'foo' rather than 'blah'

Justin,

Your code snippet works for me.  My output says "blah".  :-)

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



[PHP] Error in BTML parser 2

2003-10-13 Thread Bas
This error is not so stupid as a deleted closing ".

Okay, for all of you who missed my code here is it again:

read-tags.php
---
\s*([^<]*)\s*!is";
  preg_match_all($tag_match, $filedata, $matches);
  for ($i=0; $i< count($matches[0]); $i++) {
$tagname = $matches[1][$i];
$tags[$tagname] = $matches[2][$i];
  }
  return $tags;
}
?>
---
btml.php
---
s in your )
include_once("read-tags.php");
$filename = $_GET['name'];
$bttags = parseTags($filename);

if ($bttags['btml'] == '') {
echo "";
echo "" . $bttags['title'] . "";
echo "" . $bttags['title'] . "";
echo $bttags['text'];
if (!empty($bttags['image'])) {
echo "";
}
echo "";
}
?>
---
and test.btm
---



Welcome to BTML page v1!


Welcome to my BTML page!!! This is an experimentally version of HTML!!!
Bye!!!


noimage.gif

---

Run btml.php?name=test.btm and you will get this error plus good output:

Notice: Undefined index: text in C:\pub\include\btml.php on line 15

All indexes of the other things in $bttags do work.

Can you help me?

(And make other improvements... this is my first major project. You may
change everything and what works, post it or email me)

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



Re: [PHP] From PHP to C and viceversa

2003-10-13 Thread Antonio Bernabei
Thank you for your answer,
I have to develop an application for a small LAN (4 pcs)
What I need is to store some data in a personally cryptographed manner (two
way as I need to store and be able to retrieve data), so no one can just sit
in front of the pc where the server is (linux or win200 I have to decide),
copy the data file to a diskette and bring our data (customers' addresses)
home. I cannot guarantee that this can not happen. If I use the my_crypt
functions I think that on another pc the data can be easily read.
Thanks
Antonio Bernabei


- Original Message -
From: "Gregory Kornblum" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, October 13, 2003 2:34 PM
Subject: RE: [PHP] From PHP to C and viceversa


>
> >I have apache under linux and I want to exchange data
> >from a php script to a c programm (some strings): is it possible?
>
> Yes in multiple ways. First off you need to figure out if you have the
> source for the C application. If so you can use sockets, the MySQL client
> API, and various other connectivity methods. Since it's using a script I'm
> assuming it's not an extremely high concurrency application, then using
the
> MySQL client API would be the most robust option. The only other way to do
> it without the source, at least that comes to mind, would be to output a
> file from PHP if the C application takes input from a file. Regards.
>
> -Gregory
>
> P.S. Try to elaborate a bit more with your requests next time.
>
> --
> 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] From PHP to C and viceversa

2003-10-13 Thread Gregory Kornblum
>I have to develop an application for a small LAN (4 pcs)
>What I need is to store some data in a personally cryptographed manner (two
>way as I need to store and be able to retrieve data), so no one can just
sit
>in front of the pc where the server is (linux or win200 I have to decide),
>copy the data file to a diskette and bring our data (customers' addresses)
>home. I cannot guarantee that this can not happen. If I use the my_crypt
>functions I think that on another pc the data can be easily read.

MySQL also has methods to handle that. Seems that's the route you'll want to
go. You'll have to read up on it's API and usage at
http://www.mysql.com/doc/en/index.html and
http://www.mysql.com/documentation/mysql++/index.html. Regards.


- Original Message -
From: "Gregory Kornblum" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, October 13, 2003 2:34 PM
Subject: RE: [PHP] From PHP to C and viceversa


>
> >I have apache under linux and I want to exchange data
> >from a php script to a c programm (some strings): is it possible?
>
> Yes in multiple ways. First off you need to figure out if you have the
> source for the C application. If so you can use sockets, the MySQL client
> API, and various other connectivity methods. Since it's using a script I'm
> assuming it's not an extremely high concurrency application, then using
the
> MySQL client API would be the most robust option. The only other way to do
> it without the source, at least that comes to mind, would be to output a
> file from PHP if the C application takes input from a file. Regards.
>
> -Gregory
>
> P.S. Try to elaborate a bit more with your requests next time.
>
> --
> 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] Error in BTML parser 2

2003-10-13 Thread Curt Zirzow
* Thus wrote Bas ([EMAIL PROTECTED]):
> This error is not so stupid as a deleted closing ".
> 
> Okay, for all of you who missed my code here is it again:

> 
> read-tags.php
> ---
>  // Tag Parser v1.1
> // v1.0 First release(not working)
> // v1.1 Edited:
> // Uses Regular Expressions
> function parseTags($file) {
>   /* readfile... here */
>   $filedata = file_get_contents($file);
>   $tag_match = "!\s*([^<]*)\s*!is";

Mabey I should have explained the regex.  The tagname (the value in
matches[1][$] can only be a word character (\w*) and the value
($matches[2[$i] inside the tag will find all characters upto the
 except for the < character. 

Also do note, the '\s*' before and after the (.*?), this will force
the value returned without leading or trailing white space.
Depending on your situation this might not be desireable.

[...]
>
> 
> Welcome to my BTML page!!! This is an experimentally version of HTML!!!
> Bye!!!
> 
[..]
> 
> Run btml.php?name=test.btm and you will get this error plus good output:
> 
> Notice: Undefined index: text in C:\pub\include\btml.php on line 15

According to my description above, the code will ignore anything
that has a < character within the tags. so to allow this you'll need to
change the regex to something like:

$tag_match = "!\s*(.*?)\s*!is";

this will force it to match *anything* between the tags, except for
leading and trailing white space.


Curt
-- 
"My PHP key is worn out"

  PHP List stats since 1997: 
  http://zirzow.dyndns.org/html/mlists/

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



Re: [PHP] ftp_connect() issues

2003-10-13 Thread Raditha Dissanayake
easiest way  i know to debug FTP is with good old telnet.
just type
telnet yourserver.com 21
If there is a firewall in the way you will get a time out. If not you 
can login with
user youname
pass your pass

btw if you have access to the FTP server's log file that will probably 
tell you what's happening or not happening.

all the best
  

Phil Ewington - 43 Plc wrote:

I can still connect to the ftp server from my client machine using any
number of FTP apps, I also created an ftp test tool, on the same server as I
am currently having problems, that lets you enter an ftp host, username &
password to see if it can connect and login.
I can login to other ftp servers just not the one I want to. Strangely I
managed to get a connection to the suspect ftp server a couple of times then
nothing again. Seems to be an intermittent problem, but it would be nice to
know whether it was a connection that was being dropped by the remote server
or whether there were network issues that stopped the request reaching the
target server.
Phil.

-Original Message-
From: Jason Wong [mailto:[EMAIL PROTECTED]
Sent: 10 October 2003 17:51
To: [EMAIL PROTECTED]
Subject: Re: [PHP] ftp_connect() issues
On Saturday 11 October 2003 00:01, Phil Ewington - 43 Plc wrote:

 

A script that has been running successfully for over 18 months has
   

suddenly
 

stopped working due to ftp_connect() failing. I have been assured that
nothing has changed on the ftp server so now need to try and find out why
this is happening.
   

And have you verified that you can still connect to the ftp server via other
means?
And have you verified that the script can connect to other ftp servers?

 



--
Raditha Dissanayake.

http://www.radinks.com/sftp/  |  http://www.raditha/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] Restarting Apache without screwing up running scripts?

2003-10-13 Thread Donald Tyler
Hi,

 

 

We are building an Intranet for our company and I was wondering how
people deal with having to restart the server when its running an
intranet. Obviously if there is a complex process running and the server
restarts in the middle of it then its going to screw a lot of stuff up.

 

The only thing I could think of was to script the Intranet in such a way
as I could go into the admin section and simply disable it, then all the
currently running processes would finish, but the system would refuse to
start any new ones until I re-enabled it again.

 

Just want some advice, thanks.

 

 

Donald



[PHP] provide flag -X when connecting to mysql

2003-10-13 Thread Victor Spång Arthursson
Using the command line client when connecting to mysql makes it 
possible to provide the flag "-X" to get the result as XML directly 
from mysql.

What I wonder is if its possible in some way to provide this flag via 
php to get the result as it appears in the command line client, that 
is, as xml?

Best regards from Copenhagen/Malmoe

Victor

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


Re: [PHP] Connecting to Linux server from windows

2003-10-13 Thread Raditha Dissanayake
SOAP

Binay wrote:

Hi all !

I have PHP (4.3.2) running on windows 2k. Now i want to connect to a Linux Server and execute some commands and get the results back to win2k server. How can i achiece this. 

Please help me out.

Thanks in advance

Binay 

 



--
Raditha Dissanayake.

http://www.radinks.com/sftp/  |  http://www.raditha/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


Re: [PHP] Restarting Apache without screwing up running scripts?

2003-10-13 Thread Marek Kilimajer
# apachectl graceful

snip from manpage:

   gracefulGracefully restarts the Apache daemon by send­
   ing it a SIGUSR1.  If the daemon is  not  run­
   ning, it is started.  This differs from a nor­
   mal restart in that currently open connections
   are  not  aborted.   A side effect is that old
   log files  will  not  be  closed  immediately.
   This  means  that  if  used  in a log rotation
   script, a substantial delay may  be  necessary
   to  ensure  that  the old log files are closed
   before processing them.  This command automat­
   ically checks the configuration files via con­
   figtest before initiating the restart to  make
   sure Apache doesn't die.
Donald Tyler wrote:

Hi,

 

 

We are building an Intranet for our company and I was wondering how
people deal with having to restart the server when its running an
intranet. Obviously if there is a complex process running and the server
restarts in the middle of it then its going to screw a lot of stuff up.
 

The only thing I could think of was to script the Intranet in such a way
as I could go into the admin section and simply disable it, then all the
currently running processes would finish, but the system would refuse to
start any new ones until I re-enabled it again.
 

Just want some advice, thanks.

 

 

Donald


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


[PHP] php variable

2003-10-13 Thread Onno Kuipers
Hello,

If i set a variabele in lets say 'script one'. When i jump into 'script 
two', is there a way (without cookies) to read the variable set in 
'script one'

Like: SCRIPTONE.PHP:




$var=¨How are you¨;
?>

 
  
  name:
   
  
 
 



SCRIPTTWO.PHP:






THE PROBLEM IS THAT I ALSO WANT TO USE $VAR IN SCRIPTTWO.

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


Re: [PHP] Error in BTML parser 2

2003-10-13 Thread Bas
Yes! It works!!! This is also an good beginner-HTML.

If you have improvements then i like it from you to post them in an reply or
email me.

Regards,

Bas
"Curt Zirzow" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> * Thus wrote Bas ([EMAIL PROTECTED]):
> > This error is not so stupid as a deleted closing ".
> >
> > Okay, for all of you who missed my code here is it again:
>
> >
> > read-tags.php
> > ---
> >  > // Tag Parser v1.1
> > // v1.0 First release(not working)
> > // v1.1 Edited:
> > // Uses Regular Expressions
> > function parseTags($file) {
> >   /* readfile... here */
> >   $filedata = file_get_contents($file);
> >   $tag_match = "!\s*([^<]*)\s*!is";
>
> Mabey I should have explained the regex.  The tagname (the value in
> matches[1][$] can only be a word character (\w*) and the value
> ($matches[2[$i] inside the tag will find all characters upto the
>  except for the < character.
>
> Also do note, the '\s*' before and after the (.*?), this will force
> the value returned without leading or trailing white space.
> Depending on your situation this might not be desireable.
>
> [...]
> >
> > 
> > Welcome to my BTML page!!! This is an experimentally version of HTML!!!
> > Bye!!!
> > 
> [..]
> >
> > Run btml.php?name=test.btm and you will get this error plus good output:
> >
> > Notice: Undefined index: text in C:\pub\include\btml.php on line 15
>
> According to my description above, the code will ignore anything
> that has a < character within the tags. so to allow this you'll need to
> change the regex to something like:
>
> $tag_match = "!\s*(.*?)\s*!is";
>
> this will force it to match *anything* between the tags, except for
> leading and trailing white space.
>
>
> Curt
> -- 
> "My PHP key is worn out"
>
>   PHP List stats since 1997:
>   http://zirzow.dyndns.org/html/mlists/

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



Re: [PHP] Restarting Apache without screwing up running scripts?

2003-10-13 Thread Curt Zirzow
* Thus wrote Marek Kilimajer ([EMAIL PROTECTED]):
> # apachectl graceful

Its also wise to run a 'configtest' 

# apachectl configtest

It is a bummer if apache doesn't restart cause there is something
wrong with the config.


Curt
-- 
"My PHP key is worn out"

  PHP List stats since 1997: 
  http://zirzow.dyndns.org/html/mlists/

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



RE: [PHP] php variable

2003-10-13 Thread Jay Blanchard
[snip]
$var=¨How are you¨;
THE PROBLEM IS THAT I ALSO WANT TO USE $VAR IN SCRIPTTWO.
[/snip]

Pleace $var in a hidden form element.

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



Re: [PHP] provide flag -X when connecting to mysql

2003-10-13 Thread Marek Kilimajer
No, it is not. But there are plenty of classes that can do it for you.

Victor Spång Arthursson wrote:

Using the command line client when connecting to mysql makes it possible 
to provide the flag "-X" to get the result as XML directly from mysql.

What I wonder is if its possible in some way to provide this flag via 
php to get the result as it appears in the command line client, that is, 
as xml?

Best regards from Copenhagen/Malmoe

Victor

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


Re: [PHP] php variable

2003-10-13 Thread Marek Kilimajer
Read about sessions in the manual.

Onno Kuipers wrote:

Hello,

If i set a variabele in lets say 'script one'. When i jump into 'script 
two', is there a way (without cookies) to read the variable set in 
'script one'

Like: SCRIPTONE.PHP:




$var=¨How are you¨;
?>

 
  
  name:
   
  
 
 



SCRIPTTWO.PHP:






THE PROBLEM IS THAT I ALSO WANT TO USE $VAR IN SCRIPTTWO.

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


Re: [PHP] php variable

2003-10-13 Thread Onno Kuipers
Jay Blanchard wrote:
[snip]
$var=¨How are you¨;
THE PROBLEM IS THAT I ALSO WANT TO USE $VAR IN SCRIPTTWO.
[/snip]
Pleace $var in a hidden form element.
I tried... something like this

¨>
but it doesn't work. Maybe you mean something totaly different, can you 
show me what you mean.

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


[PHP] Yes!!! BTML v1.0 is here!!!

2003-10-13 Thread Bas
It is freely avialable!!!

Here is the sourcecode:

2 files are used to parse:

read-tags.php
---
\s*(.*?)\s*!is";
  preg_match_all($tag_match, $filedata, $matches);
  for ($i=0; $i< count($matches[0]); $i++) {
$tagname = $matches[1][$i];
$tags[$tagname] = $matches[2][$i];
  }
  return $tags;
}
?>

---
btml.php
---
s in your )
include_once("read-tags.php");
$filename = $_GET['name'];
$bttags = parseTags($filename);

if ($bttags['btml'] == '') {
echo "";
echo "" . $bttags['title'] . "";
echo "" . $bttags['title'] . "";
echo $bttags['text'];
if (!empty($bttags['image'])) {
echo "";
}
echo "";
}
?>
---
And an test BTML-file:
---



Welcome to BTML page v1!


Welcome to my BTML page!!! This is an experimentally version of HTML!!!
Bye!!!


noimage.gif

---

Run it with: btml.php?name=filename.btm

Example: btml.php?name=test.btm

For improvements e-mail me(also if you are planning on inprovements) or
reply if you have a inprovement ready.

Regards,

Bas

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



Re: [PHP] Restarting Apache without screwing up running scripts?

2003-10-13 Thread Marek Kilimajer
This command automatically checks the configuration files via configtest 
before initiating the restart to make sure Apache doesn't die.

So it is not necessery.

Curt Zirzow wrote:

* Thus wrote Marek Kilimajer ([EMAIL PROTECTED]):

# apachectl graceful


Its also wise to run a 'configtest' 

# apachectl configtest

It is a bummer if apache doesn't restart cause there is something
wrong with the config.
Curt
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Re: Yes!!! BTML v1.0 is here!!!

2003-10-13 Thread Bas
Yes, i think that you want to know the structure of the BTML-file:




Title of the page


Here any valid HTML-MARKUP



Path to a image


This is the structure of a BTML file.

I hope that you have improvements. If this changes the structure, post or
email me the new structure also.(double check for spelling errors)
"Bas" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> It is freely avialable!!!
>
> Here is the sourcecode:
>
> 2 files are used to parse:
>
> read-tags.php
> ---
>  // Tag Parser v1.11
> // v1.0 First release(not working)
> // v1.1 Edited:
> // Uses Regular Expressions
> // v1.11 Edited:
> // Edited to use with BTML
> function parseTags($file) {
>   /* readfile... here */
>   $filedata = file_get_contents($file);
>   $tag_match = "!\s*(.*?)\s*!is";
>   preg_match_all($tag_match, $filedata, $matches);
>   for ($i=0; $i< count($matches[0]); $i++) {
> $tagname = $matches[1][$i];
> $tags[$tagname] = $matches[2][$i];
>   }
>   return $tags;
> }
> ?>
>
> ---
> btml.php
> ---
>  // BTML-HTML converter v1.0
> // v1.0 First release
> // You can write precisely 1 image on the bottom,
> // 1 title
> // and 1 paragraph(you need also the s in your )
> include_once("read-tags.php");
> $filename = $_GET['name'];
> $bttags = parseTags($filename);
>
> if ($bttags['btml'] == '') {
> echo "";
> echo "" . $bttags['title'] . "";
> echo "" . $bttags['title'] . "";
> echo $bttags['text'];
> if (!empty($bttags['image'])) {
> echo "";
> }
> echo "";
> }
> ?>
> ---
> And an test BTML-file:
> ---
> 
> 
> 
> Welcome to BTML page v1!
> 
> 
> Welcome to my BTML page!!! This is an experimentally version of HTML!!!
> Bye!!!
> 
> 
> noimage.gif
> 
> ---
>
> Run it with: btml.php?name=filename.btm
>
> Example: btml.php?name=test.btm
>
> For improvements e-mail me(also if you are planning on inprovements) or
> reply if you have a inprovement ready.
>
> Regards,
>
> Bas

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



RE: [PHP] PNG to GIF conversion

2003-10-13 Thread Howard Cohodas
If you are still looking for an on-the-fly GIF encoder for PHP in a windows
environment, let me know.

Howard

-Original Message-
From: John Ryan [mailto:[EMAIL PROTECTED]
Sent: Saturday, October 11, 2003 4:50 PM
To: [EMAIL PROTECTED]
Subject: [PHP] PNG to GIF conversion


How do I do this?? I have the latest version of GD with PNG, but no GIF. But
I *have to* be able to convert images to gif. Is there any standalone php
script that'll do it, or a cgi???

--
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] mail() php in message

2003-10-13 Thread Marek Kilimajer
Onno Kuipers wrote:

thanx a lot! I think this will help. .

 oops works only with PHP 4... and I ... euh PHP3..

Is there another method to do this before I even think of upgrading?

You can write your own. But I would upgrade.

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


[PHP] Re: Exec() wont run program

2003-10-13 Thread steve
Curt Zirzow wrote:
What is gedit?  it looks like the gnu text editor command. most X 
applications
wont run from the webserver in most cases.
Curt, I'm trying to understand why most X applications wont run from the 
webserver in most cases.  If nothing else, you should at least be able 
to run a shell script from php and have that execute other X 
applications to run on the webserver.  To make things clear, the client 
initiates the execution of the applications (through php of course), but 
the applications are supposed to run on the webserver.

Is there more information available somewhere that explains why most X 
applications wont run from the webserver?  Thanks.

Steve

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


[PHP] what is the best PHP editor?

2003-10-13 Thread DougD
I currently use EditPlus - and like it -- is there anything else out there
that is better and still reasonably priced.

Thanks.

-Doug

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



Re: [PHP] what is the best PHP editor?

2003-10-13 Thread Chris Boget
> I currently use EditPlus - and like it -- is there anything else out there
> that is better and still reasonably priced.

I am not sure what you would consider reasonably priced, but the best
editor I've come across is Visual Slick Edit.  Bar none, the best and most
feature rich editor I've come across in the last few years.

Chris

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



[PHP] Re: Yes!!! BTML v1.0 is here!!!

2003-10-13 Thread Comex
\s*(.*?)\s*!is");
  preg_match_all($tag_match, $filedata, $matches);
  for ($i=0; $i< count($matches[0]); $i++) {

$tagname = $matches[1][$i];
$tag['tagname'] = $tagname;
$tag['value'] = $matches[2][$i];
$tags[] = $tag;
  }
  return $tags;
}
$filename = $_GET['name'];
$bttags = parseTags($filename);
echo "";
foreach($bttags as $tag) {
switch($tag['tagname']) {
case 'title':
echo "" . $tag['value'] . "";
echo "" . $tag['value'] . "";
break;
case 'heading':
echo "" . $tag['value'] . "";
break;
case 'image':
if (!empty($tag['value'])) {
echo "";
}
break;
case 'text':
echo nl2br($tag['value']);
break;
case 'nl':
echo "\n";
break;
}
}


echo "";


?>

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



Re: [PHP] mail() php in message

2003-10-13 Thread Manuel Lemos
Hello,

On 10/13/2003 06:13 AM, Onno Kuipers wrote:
My server runs PHP and Mysql. Normaly I can put some php in my 
.php-files wich will create a html file for the clients. (you all 
know this of course).

My question now is: How can I put that html (created with PHP) in the 
message off the mail.


To not have to change your PHP code, you may capture the HTML you want 
to mail by enclosing your PHP code between a ob_start() and a 
ob_get_clean() commands, like this:

ob_start();

... your code here:

$message=ob_get_clean();

And then use the $message variable to compose an HTML message.

Sending an HTML message properly requires that you compose a message 
according to the MIME standards. Just try this class that makes it easy:

http://www.phpclasses.org/mimemessage

thanx a lot! I think this will help. .

 oops works only with PHP 4... and I ... euh PHP3..

Is there another method to do this before I even think of upgrading?
No, there is no support for capturing output data in PHP 3. The MIME 
message class works in PHP 3, but to capture the output in PHP 3 you 
need to change your code to assign a variable with the output data 
instead of using output buffering functions.

--

Regards,
Manuel Lemos
Free ready to use OOP components written in PHP
http://www.phpclasses.org/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] php variable

2003-10-13 Thread Comex
<[EMAIL PROTECTED]>
Onno Kuipers:
> Jay Blanchard wrote:
>> [snip]
>> $var=¨How are you¨;
>> THE PROBLEM IS THAT I ALSO WANT TO USE $VAR IN SCRIPTTWO.
>> [/snip]
>>
>> Pleace $var in a hidden form element.
>
> I tried... something like this
>
>  value=¨¨>
>
> but it doesn't work. Maybe you mean something totaly different, can
> you show me what you mean.

Should work, if not use sessions.

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



RE: [PHP] what is the best PHP editor?

2003-10-13 Thread Chris W. Parker
Chris Boget 
on Monday, October 13, 2003 10:00 AM said:

> I am not sure what you would consider reasonably priced, but the best
> editor I've come across is Visual Slick Edit.  Bar none, the best and
> most feature rich editor I've come across in the last few years.

Hmm.. I downloaded Slick Edit and didn't think it was any better than
the free HTML-Kit. Have you ever used HTML-Kit and if so, what do you
think is so great about VSE?

I didn't spend a huge amount of time with the configuration of VSE but I
couldn't get it to view my Japanese pages properly. Can you set the
character encoding in VSE?



Chris.

p.s. My vote is for HTML-Kit from www.chami.com.

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



[PHP] Re: what is the best PHP editor?

2003-10-13 Thread Rob Adams
I like EditPlus too, but recently I've been using UltraEdit.
http://www.ultraedit.com/
$35 registration.  Has great column mode support.  I use the macros and
templates all the time.  Has a word file for PHP.

  -- Rob



"Dougd" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> I currently use EditPlus - and like it -- is there anything else out there
> that is better and still reasonably priced.
>
> Thanks.
>
> -Doug

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



[PHP] FTP resumepos

2003-10-13 Thread Andrei Popovici
Can anyone help me understand how the parameter resumepos from ftp_get
function can be used?

Thanks.

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



[PHP] PHP Journals and Magazined

2003-10-13 Thread Karam Chand
Hello

I just shifted to PHP from ASP and I am impressed. I
have a query though -

Apart from sites like phpbuilder.com etc. which is the
most read English magazines read by PHP developers. 

I know PHP Arch..nebody reading something
else...just querying...might subscribe to one of them.

Karam


__
Do you Yahoo!?
The New Yahoo! Shopping - with improved product search
http://shopping.yahoo.com

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



[PHP] OT project

2003-10-13 Thread Didier McGillis
I'm starting a pretty involved project and would like to get some help 
lookin for 1 php/sql/linux person and 1 database person for some assistance. 
 will answer/talk about the project off list with those interested.  
compensation available.  serious inquires only.

_
Add photos to your messages with MSN 8. Get 2 months FREE*.  
http://join.msn.com/?page=features/featuredemail

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


[PHP] FTP Errors

2003-10-13 Thread Ian
Hi,

I was wondering if anyone knew how to retrieve connection error information
when using FTP in php?

By this I mean, when connecting to a ftp server that is full, ftp_connect
just returns FALSE, and not the 421 error returned by the server.

FALSE is also the response given when attempting to connect to a ftp server
that doesn't exist or isn't running.

I want to be able to tell the difference so I can inform the end user to
retry if the server is just busy, or inform them that the site is down and
to try again later if it really is down.

Any ideas would be really appreciated.

Thanks,
Ian

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



Re: [PHP] provide flag -X when connecting to mysql

2003-10-13 Thread Victor Spång Arthursson

2003-10-13 kl. 16.39 skrev Marek Kilimajer:
No, it is not. But there are plenty of classes that can do it for you.
Can you recommend any?

Sincerely

Victor

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


Re: [PHP] what is the best PHP editor?

2003-10-13 Thread Ryan A
Hey Chris,
After reading your post I too downloaded SlickEdit...I personally use a mix
of Zend and EditPlus
Just opened slickEdit and it seems a bit complicated but more java
oriented...mind telling me why you have such a preference for this?

Cheers,
-Ryan A
http://bestwebhosters.com




> I am not sure what you would consider reasonably priced, but the best
> editor I've come across is Visual Slick Edit.  Bar none, the best and
> most feature rich editor I've come across in the last few years.

Hmm.. I downloaded Slick Edit and didn't think it was any better than
the free HTML-Kit. Have you ever used HTML-Kit and if so, what do you
think is so great about VSE?

I didn't spend a huge amount of time with the configuration of VSE but I
couldn't get it to view my Japanese pages properly. Can you set the
character encoding in VSE?



Chris.

p.s. My vote is for HTML-Kit from www.chami.com.

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

2003-10-13 Thread Curt Zirzow
* Thus wrote Andrei Popovici ([EMAIL PROTECTED]):
> Can anyone help me understand how the parameter resumepos from ftp_get
> function can be used?

ftp_get will  first seek the value  'resumepos' within the
'remote_file', before it starts to write to 'local_file'.

Curt
-- 
"My PHP key is worn out"

  PHP List stats since 1997: 
  http://zirzow.dyndns.org/html/mlists/

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



Re: [PHP] Re: what is the best PHP editor?

2003-10-13 Thread Daniel Guerrier
http://www.phpedit.net

It's good.
How good, is up to you.

--- Rob Adams <[EMAIL PROTECTED]> wrote:
> I like EditPlus too, but recently I've been using
> UltraEdit.
> http://www.ultraedit.com/
> $35 registration.  Has great column mode support.  I
> use the macros and
> templates all the time.  Has a word file for PHP.
> 
>   -- Rob
> 
> 
> 
> "Dougd" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
> > I currently use EditPlus - and like it -- is there
> anything else out there
> > that is better and still reasonably priced.
> >
> > Thanks.
> >
> > -Doug
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 


__
Do you Yahoo!?
The New Yahoo! Shopping - with improved product search
http://shopping.yahoo.com

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



Re: [PHP] what is the best PHP editor?

2003-10-13 Thread Chris Boget
> Hey Chris,
> After reading your post I too downloaded SlickEdit...I personally use a mix
> of Zend and EditPlus
> Just opened slickEdit and it seems a bit complicated but more java
> oriented...mind telling me why you have such a preference for this?

It's actually C/C++/Java oriented.  But you can set up and configure a PHP
extension.
As to why I like VSE, it is highly configurable and has a fairly powerful macro
language.  Just about every piece of internal functionality (ie, any of the menu
options, highlight text, cursor movements, etc) are set up as macro functions.
As a result, you can assign them to any custom button or add them to just about
any right click menu (right click and select 'Edit This Menu' at the bottom).

Little useful toys such as paren & brace matching, automatic indent (even for cut 
and pasted code), customizable syntax highlighting, JavaDoc comments aware, 
different emulation styles (emacs, VC++, etc), Tagging[1], etc.

As I said before, it has definitely increased my productivity.

Chris

[1] I'm not sure if 'Tag'ging is a commonly used word.  But in the context of VSE,
what that means is that you can tell VSE a directory (let's take PEAR for example)
and it'll go through the tree and look at every source file and compile information on
every function/class.  So when you are coding and start typing the function (or class) 
name, it'll give you argument information and anything else that might have been in 
the JavaDoc or PHPDoc comments.  Very, very helpful.

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



Re: [PHP] provide flag -X when connecting to mysql

2003-10-13 Thread Marek Kilimajer
No, I haven't used any, but search www.phpclasses.org and choose the one 
with the best rating.

Victor Spång Arthursson wrote:

2003-10-13 kl. 16.39 skrev Marek Kilimajer:

No, it is not. But there are plenty of classes that can do it for you.


Can you recommend any?

Sincerely

Victor

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


Re: [PHP] Re: what is the best PHP editor?

2003-10-13 Thread Rob Adams
I actually tried this a while ago, and must've had a really early version.
It showed a lot of promise, but there were too many problems, and the error
text was mostly German, so I couldn't tell what was wrong or how to fix it.
I'll have to give it another shot now.

  -- Rob



"Daniel Guerrier" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> http://www.phpedit.net
>
> It's good.
> How good, is up to you.
>
> --- Rob Adams <[EMAIL PROTECTED]> wrote:
> > I like EditPlus too, but recently I've been using
> > UltraEdit.
> > http://www.ultraedit.com/
> > $35 registration.  Has great column mode support.  I
> > use the macros and
> > templates all the time.  Has a word file for PHP.
> >
> >   -- Rob
> >
> >
> >
> > "Dougd" <[EMAIL PROTECTED]> wrote in message
> > news:[EMAIL PROTECTED]
> > > I currently use EditPlus - and like it -- is there
> > anything else out there
> > > that is better and still reasonably priced.
> > >
> > > Thanks.
> > >
> > > -Doug
> >
> > -- 
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
>
>
> __
> Do you Yahoo!?
> The New Yahoo! Shopping - with improved product search
> http://shopping.yahoo.com

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



[PHP] header() function for displaying an opened PDF document.

2003-10-13 Thread Scott Fletcher
I seem to be having problem with sending the PDF document to the browser to
be open on screen.  I kept getting the error message, it say 'Windows cannot
open this file'.  Here's my sample script, so what am I doing wrong?...

--snip--
header("Content-Type: application/pdf");
header("Content-Length: '40736'");
header("Content-Disposition: inline; filename='junk.pdf'");
--snip--

Thanks,
 Scott F.

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



Re: [PHP] what is the best PHP editor?

2003-10-13 Thread Jonathan Villa
What's the matter?  No one likes Zend Studio?

On Mon, 2003-10-13 at 12:00, Chris Boget wrote:
> > I currently use EditPlus - and like it -- is there anything else out there
> > that is better and still reasonably priced.
> 
> I am not sure what you would consider reasonably priced, but the best
> editor I've come across is Visual Slick Edit.  Bar none, the best and most
> feature rich editor I've come across in the last few years.
> 
> Chris

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



Re: [PHP] Re: what is the best PHP editor?

2003-10-13 Thread Scott Fletcher
Yea, I tried it from before and it seem to be somewhat limit.  The only good
thing about it is that with each of the newer version, it get better and
better.  I have been sticking to Visual Slick Edit along the way.  It would
have been nice if it can transfer files between two webservers if this is
possible.

Scott F.

"Rob Adams" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> I actually tried this a while ago, and must've had a really early version.
> It showed a lot of promise, but there were too many problems, and the
error
> text was mostly German, so I couldn't tell what was wrong or how to fix
it.
> I'll have to give it another shot now.
>
>   -- Rob
>
>
>
> "Daniel Guerrier" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
> > http://www.phpedit.net
> >
> > It's good.
> > How good, is up to you.
> >
> > --- Rob Adams <[EMAIL PROTECTED]> wrote:
> > > I like EditPlus too, but recently I've been using
> > > UltraEdit.
> > > http://www.ultraedit.com/
> > > $35 registration.  Has great column mode support.  I
> > > use the macros and
> > > templates all the time.  Has a word file for PHP.
> > >
> > >   -- Rob
> > >
> > >
> > >
> > > "Dougd" <[EMAIL PROTECTED]> wrote in message
> > > news:[EMAIL PROTECTED]
> > > > I currently use EditPlus - and like it -- is there
> > > anything else out there
> > > > that is better and still reasonably priced.
> > > >
> > > > Thanks.
> > > >
> > > > -Doug
> > >
> > > -- 
> > > PHP General Mailing List (http://www.php.net/)
> > > To unsubscribe, visit: http://www.php.net/unsub.php
> > >
> >
> >
> > __
> > Do you Yahoo!?
> > The New Yahoo! Shopping - with improved product search
> > http://shopping.yahoo.com

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



[PHP] Re: header() function for displaying an opened PDF document.

2003-10-13 Thread Kevin Stone
Forget the content length and disposition headers.  Just set the content type then 
output the file..

header("Content-type: application/pdf");
readfile("junk.pdf");

- Kevin

"Scott Fletcher" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED]
> I seem to be having problem with sending the PDF document to the browser to
> be open on screen.  I kept getting the error message, it say 'Windows cannot
> open this file'.  Here's my sample script, so what am I doing wrong?...
> 
> --snip--
> header("Content-Type: application/pdf");
> header("Content-Length: '40736'");
> header("Content-Disposition: inline; filename='junk.pdf'");
> --snip--
> 
> Thanks,
>  Scott F.


Re: [PHP] php variable

2003-10-13 Thread Scott Fletcher
Should also work if you use the POST method...

"Comex" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> <[EMAIL PROTECTED]>
> Onno Kuipers:
> > Jay Blanchard wrote:
> >> [snip]
> >> $var=¨How are you¨;
> >> THE PROBLEM IS THAT I ALSO WANT TO USE $VAR IN SCRIPTTWO.
> >> [/snip]
> >>
> >> Pleace $var in a hidden form element.
> >
> > I tried... something like this
> >
> >  > value=¨¨>
> >
> > but it doesn't work. Maybe you mean something totaly different, can
> > you show me what you mean.
>
> Should work, if not use sessions.

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



Re: [PHP] php variable

2003-10-13 Thread Scott Fletcher
Page 1



Page 2

echo $_REQUEST['var2'];

//or

echo $_POST['var2'];

//==
//Sometime noticed some glitch with $_POST because sometime PHP think the
data go to $_GET...
//So, to prevent future headache, I use $_REQUEST['var2'] at all time...
//==

Scott
"Comex" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> <[EMAIL PROTECTED]>
> Onno Kuipers:
> > Jay Blanchard wrote:
> >> [snip]
> >> $var=¨How are you¨;
> >> THE PROBLEM IS THAT I ALSO WANT TO USE $VAR IN SCRIPTTWO.
> >> [/snip]
> >>
> >> Pleace $var in a hidden form element.
> >
> > I tried... something like this
> >
> >  > value=¨¨>
> >
> > but it doesn't work. Maybe you mean something totaly different, can
> > you show me what you mean.
>
> Should work, if not use sessions.

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



Re: [PHP] Restarting Apache without screwing up running scripts?

2003-10-13 Thread Scott Fletcher
Wow!  I didn't know that.  I have been using apachectl restart all the time.
Now I feel better that this feature will allow Apache to be running until
people logged off of the website (by the mean of terminating the apache
connection)

Thanks!!!

"Marek Kilimajer" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
# apachectl graceful

snip from manpage:

gracefulGracefully restarts the Apache daemon by send­
ing it a SIGUSR1.  If the daemon is  not  run­
ning, it is started.  This differs from a nor­
mal restart in that currently open connections
are  not  aborted.   A side effect is that old
log files  will  not  be  closed  immediately.
This  means  that  if  used  in a log rotation
script, a substantial delay may  be  necessary
to  ensure  that  the old log files are closed
before processing them.  This command automat­
ically checks the configuration files via con­
figtest before initiating the restart to  make
sure Apache doesn't die.

Donald Tyler wrote:

> Hi,
>
>
>
>
>
> We are building an Intranet for our company and I was wondering how
> people deal with having to restart the server when its running an
> intranet. Obviously if there is a complex process running and the server
> restarts in the middle of it then its going to screw a lot of stuff up.
>
>
>
> The only thing I could think of was to script the Intranet in such a way
> as I could go into the admin section and simply disable it, then all the
> currently running processes would finish, but the system would refuse to
> start any new ones until I re-enabled it again.
>
>
>
> Just want some advice, thanks.
>
>
>
>
>
> Donald
>
>

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



[PHP] Re: php convert html to pdf

2003-10-13 Thread Scott Fletcher
I'm not aware of any such feature that would convert the HTML to PHP.  You
can use the FPDF library to generate a PDF stuffs without installing or
compiling or anything of thsoe sort.  You can find it at www.fpdf.org.  It
is free and it is pretty nice.

Scott F.

"Hycn Office" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> hi all ~
>
> where can find the free of charge complete script ?
>
> remarks : i am using web hosting , so cant install anything
>
> thank you "-_-

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



[PHP] Re: Problem with session_destroy() don't work

2003-10-13 Thread Scott Fletcher
session_destroy() don't work too well with IE (Internet Explorer) due to
bunch of bugs that IE have.  That is if you are using IE to test this

"Kostas" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hi,
> I have a problem with destroing a session.
> I have made a login page and the login work ok.
> I register the things i want like that:
>  session_register(uid); $uid= mysql_result($result,0,'userid');
> session_register(pwd); $pwd= mysql_result($result,0,'password');
> session_register(name); $name= mysql_result($result,0,'name');
> session_register(memberid); $memberid= mysql_result($result,0,'id');
> ?>
>
> I try to make the logout page like that:
>
> 
> session_start();
> session_unset();
> session_destroy();
> ?>
>
> but it dont work.
> I have
> a.. PHP - 4.0.5
> a.. MySQL - 3.23.32
> a.. Apache - 1.3.14
> a.. PHPMyAdmin - 2.1.0
> a.. Perl - nsPerl 5.005_03
>
> session.auto_start Off
> session.cache_expire 180
> session.cache_limiter nocache
> session.cookie_domain no value
> session.cookie_lifetime 0
> session.cookie_path /
> session.entropy_file no value
> session.entropy_length 0
> session.gc_maxlifetime 1440
> session.gc_probability 1
> session.name PHPSESSID
> session.referer_check no value
> session.save_handler files
> session.save_path c:/php4/sessions
> session.serialize_handler php
> session.use_cookies On
>
> installed apache on win2000
>
> The session is not destroyd. Session_unset dont work to.
> Can someone help me?
> thanks.
>

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



[PHP] Re: header() function for displaying an opened PDF document.

2003-10-13 Thread Scott Fletcher
I can't do readfile() because of lots of bug in IE (Internet Explorer)

"Kevin Stone" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Forget the content length and disposition headers.  Just set the content
type then output the file..
>
> header("Content-type: application/pdf");
> readfile("junk.pdf");
>
> - Kevin
>
> "Scott Fletcher" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> > I seem to be having problem with sending the PDF document to the browser
to
> > be open on screen.  I kept getting the error message, it say 'Windows
cannot
> > open this file'.  Here's my sample script, so what am I doing wrong?...
> >
> > --snip--
> > header("Content-Type: application/pdf");
> > header("Content-Length: '40736'");
> > header("Content-Disposition: inline; filename='junk.pdf'");
> > --snip--
> >
> > Thanks,
> >  Scott F.
>

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



  1   2   >