php-general Digest 26 Oct 2003 16:50:32 -0000 Issue 2378

Topics (messages 167605 through 167632):

Re: ADSI & PHP
        167605 by: Evan Nemerson
        167608 by: Pc Technics, Inc.

Re: reading/parsing file names
        167606 by: Evan Nemerson
        167627 by: Curt Zirzow

Re: limits on variable/classname length
        167607 by: Evan Nemerson

Session problem
        167609 by: Manisha Sathe
        167610 by: Evan Nemerson
        167611 by: Manisha Sathe
        167612 by: Evan Nemerson
        167615 by: Manisha Sathe
        167619 by: dark

help with mail() using smtp-auth
        167613 by: Trell
        167614 by: Marek Kilimajer

Re: output
        167616 by: Shmuel

Re: Trying to organise an array
        167617 by: Burhan Khalid

Re: Post form variables to a frame
        167618 by: Burhan Khalid

Re: w3c-compliant form-action parameters
        167620 by: Timo Boettcher

Re: sockets - fine tunning
        167621 by: Raditha Dissanayake

Re: CURL remote server get data back
        167622 by: Raditha Dissanayake
        167623 by: Dan McCullough
        167624 by: Raditha Dissanayake

Get image file size
        167625 by: Awlad Hussain
        167626 by: David Otton

doc_root question.
        167628 by: P M
        167630 by: dark

where to set session.bug_compat_warn ?
        167629 by: Decapode Azur
        167631 by: Curt Zirzow

How can i count time it taked to render the page?
        167632 by: Bas

Administrivia:

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

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

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


----------------------------------------------------------------------
--- Begin Message ---
Okay I'm no expert for windows- I had to look up ADSI and found 
http://www.microsoft.com/windows2000/techinfo/howitworks/activedirectory/adsilinks.asp
which mentions LDAP.  Take a look at php.net/ldap and see if it does what you 
need.



On Saturday 25 October 2003 09:24 am, Pc Technics, Inc. wrote:
> Anyone know if its possible to use ADSI with PHP? I can not seem to find
> any good articles which explain how to convert ASP to PHP using the COM
> properties of PHP. I would really like to write this in PHP, rather than
> ASP.
>
> Thanks in advance ....
>
> - Jeremy
>  Pc Technics, Inc.
>  www.pc-technics.com
>  100% FREE Internet Hosting!

-- 
Evan Nemerson
[EMAIL PROTECTED]

--
"...the whole idea of revenge and punishment is a childish daydream. Properly 
speaking, there is no such thing as revenge. Revenge is an act which you want 
to commit when you are powerless and because you are powerless: as soon as 
the sense of impotence is removed, the desire evaporates also. "

-George Orwell

--- End Message ---
--- Begin Message ---
 Hello Evan,

    I imagined that the PHP LDAP functions would work, however, this would
only work on LDAP compliant directory servers, such as Microsoft and Novell.
This would not work however for a local NT machine which is not joined to a
domain. ADSI has a 'WinNT://" provider for this, where as the 'LDAP://";
provider is meant for the domain (directory) environment.

  To make a long story short, the PHP LDAP library is not really ADSI & PHP,
but rather an LDAP library which works with LDAP compliant directory
servers. I was looking for a way to use ADSI with PHP.

  I appreciate your response, Evan.

- Jeremy
  Pc Technics, Inc.
  www.pc-technics.com
  100% FREE Internet Hosting!




"Evan Nemerson" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Okay I'm no expert for windows- I had to look up ADSI and found
>
http://www.microsoft.com/windows2000/techinfo/howitworks/activedirectory/adsilinks.asp
> which mentions LDAP.  Take a look at php.net/ldap and see if it does what
you
> need.
>
>
>
> On Saturday 25 October 2003 09:24 am, Pc Technics, Inc. wrote:
> > Anyone know if its possible to use ADSI with PHP? I can not seem to find
> > any good articles which explain how to convert ASP to PHP using the COM
> > properties of PHP. I would really like to write this in PHP, rather than
> > ASP.
> >
> > Thanks in advance ....
> >
> > - Jeremy
> >  Pc Technics, Inc.
> >  www.pc-technics.com
> >  100% FREE Internet Hosting!
>
> -- 
> Evan Nemerson
> [EMAIL PROTECTED]
>
> --
> "...the whole idea of revenge and punishment is a childish daydream.
Properly
> speaking, there is no such thing as revenge. Revenge is an act which you
want
> to commit when you are powerless and because you are powerless: as soon as
> the sense of impotence is removed, the desire evaporates also. "
>
> -George Orwell

--- End Message ---
--- Begin Message ---
A little something I whipped up to avoid my zoology homework (I /really/ don't 
care that the damn sperm of nematodes are unusual because they lack a 
flagellum and acrosome). Conclusion: substr is faster than preg_match

[tadpole tadpole]$ php -q ./bench.php
substr: 3.6424000263214
PCRE:   5.121386051178
substr: 3.2655299901962
PCRE:   3.8099709749222
substr: 3.2664449214935
PCRE:   3.7604590654373
substr: 3.2712109088898
PCRE:   3.7643429040909
substr: 3.496111035347
PCRE:   4.4902020692825
substr: 3.3643230199814
PCRE:   4.404403090477
substr: 3.5383290052414
PCRE:   4.0583729743958
substr: 3.3862169981003
PCRE:   5.0897340774536
substr: 4.3838140964508
PCRE:   3.887619972229
substr: 3.4568190574646
PCRE:   3.8514100313187
Averages:
substr: 3.5071199059486
pcre:   4.2237901210785
[tadpole tadpole]$ cat ./bench.php
<?php

function getmicrotime() {
  list($usec, $sec) = explode(' ', microtime());
  return ((float)$usec + (float)$sec);
}

$pcre = array();
$substr = array();

for ( $x=0 ; $x<10 ; $x++ ) {
  $array = array();
  for ( $y=0 ; $y<100000 ; $y++ ) {
    array_push($array, mt_rand().'.thumb.jpg');
  }

  $results = array();
  $start = getmicrotime();
  foreach ( $array as $a ) {
    if ( substr($a, -10) == '.thumb.jpg' )
      array_push($results, $a);
  }
  $substr[$x] = (getmicrotime()-$start);
  echo "substr: {$substr[$x]}\n";

  unset($results);
  $results = array();
  $start = getmicrotime();
  foreach ( $array as $a ) {
    if ( preg_match('/\.thumb\.jpg$/', $a) )
      array_push($results, $a);
  }
  $pcre[$x] = (getmicrotime()-$start);
  echo "PCRE:   {$pcre[$x]}\n";

  unset($results, $array);
}

echo "Averages:\n";
echo "substr: ".($avg['substr']=(array_sum($substr)/count($substr)))."\n";
echo "pcre:   ".($avg['pcre']=(array_sum($pcre)/count($pcre)))."\n";

?>

--- End Message ---
--- Begin Message ---
* Thus wrote Evan Nemerson ([EMAIL PROTECTED]):
> 
> [tadpole tadpole]$ php -q ./bench.php
> Averages:
> substr: 3.5071199059486
> pcre:   4.2237901210785

Averages:
substr: 5.1445327162743
pcre:   5.6803694009781
posix:   8.0486606121063

Interesing that my results of substr vs. pcre came in closer, then
I added the ereg function to test, which I expected to come in
last.

This was processed on a p233 processor with php4.3.3


Curt
-- 
"My PHP key is worn out"

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

--- End Message ---
--- Begin Message ---
Hmmm I _think_ it depends on size_t, which (IIRC) is typically typdef'd as an 
unsigned long int. I say that because there are macros (like ZEND_SET_SYMBOL) 
that do strlen(name) all over the place. Here's an except from limits.h:

/* Maximum value an `unsigned long int' can hold.  (Minimum is 0.)  */
#  if __WORDSIZE == 64
#   define ULONG_MAX    18446744073709551615UL
#  else
#   define ULONG_MAX    4294967295UL
#  endif


On Saturday 25 October 2003 09:36 pm, Greg Beaver wrote:
> Hi,
>
> Are there any limits on the length a variable or classname may be in
> PHP?  I was unable to find anything in the manual, and my tests found
> that a variable over 2000 characters long still caused no error or
> problems.
>
> This is important because phpDocumentor 2.0 will be using a database to
> cache parsed data, and I need to know how much space to allocate for the
> names of classes and other things.
>
> Greg

-- 
Evan Nemerson
[EMAIL PROTECTED]

--
"The people are the only sure reliance for preservation of our liberty."

-Thomas Jefferson

--- End Message ---
--- Begin Message ---
I am trying to use session but it seems it does not work on win2k server,
the same runs on linux.

following is my first php
-------------------
<?
session_start();
$_SESSION["name"]= "Manisha";
?>
----------------------
following is the second php

<?
session_start();
echo $_SESSION["name"];
?>

-----------------

but it is always giving me following error msg

Notice: Undefined index: name in C:\Project Codes\www\testPHP\second.php on
line 6

----------------------------

The same thing works well on live Linux server. I checked php.ini options
such as session enable / register global etc - both r same. Please help  me.
Is it a problem with win2k server or did i miss out any thing in php.ini ?

Regards
Manisha

--- End Message ---
--- Begin Message ---
Your Linux server probably has error_reporting set to 0, which is usually a 
good idea for production environments. To supress the error messages without 
modifying your php.ini, do error_reporting(0). Take a look in your php.ini 
file- the error_reporting directive will have lots of comments around it 
explaining the concept thoroughly.


On Sunday 26 October 2003 01:06 am, Manisha Sathe wrote:
> I am trying to use session but it seems it does not work on win2k server,
> the same runs on linux.
>
> following is my first php
> -------------------
> <?
> session_start();
> $_SESSION["name"]= "Manisha";
> ?>
> ----------------------
> following is the second php
>
> <?
> session_start();
> echo $_SESSION["name"];
> ?>
>
> -----------------
>
> but it is always giving me following error msg
>
> Notice: Undefined index: name in C:\Project Codes\www\testPHP\second.php on
> line 6
>
> ----------------------------
>
> The same thing works well on live Linux server. I checked php.ini options
> such as session enable / register global etc - both r same. Please help 
> me. Is it a problem with win2k server or did i miss out any thing in
> php.ini ?
>
> Regards
> Manisha

-- 
Evan Nemerson
[EMAIL PROTECTED]

--
"The people are the only sure reliance for preservation of our liberty."

-Thomas Jefferson

--- End Message ---
--- Begin Message ---
It works well on linux means it shows me o/p as 'Manisha' but on local
Win2kserver, it gives error.

I tried to make use of error_reporting(0); in second.php but then screen
becomes blank, it does not show me the output as "Manisha"

manisha



"Evan Nemerson" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Your Linux server probably has error_reporting set to 0, which is usually
a
> good idea for production environments. To supress the error messages
without
> modifying your php.ini, do error_reporting(0). Take a look in your php.ini
> file- the error_reporting directive will have lots of comments around it
> explaining the concept thoroughly.
>
>
> On Sunday 26 October 2003 01:06 am, Manisha Sathe wrote:
> > I am trying to use session but it seems it does not work on win2k
server,
> > the same runs on linux.
> >
> > following is my first php
> > -------------------
> > <?
> > session_start();
> > $_SESSION["name"]= "Manisha";
> > ?>
> > ----------------------
> > following is the second php
> >
> > <?
> > session_start();
> > echo $_SESSION["name"];
> > ?>
> >
> > -----------------
> >
> > but it is always giving me following error msg
> >
> > Notice: Undefined index: name in C:\Project Codes\www\testPHP\second.php
on
> > line 6
> >
> > ----------------------------
> >
> > The same thing works well on live Linux server. I checked php.ini
options
> > such as session enable / register global etc - both r same. Please help
> > me. Is it a problem with win2k server or did i miss out any thing in
> > php.ini ?
> >
> > Regards
> > Manisha
>
> --
> Evan Nemerson
> [EMAIL PROTECTED]
>
> --
> "The people are the only sure reliance for preservation of our liberty."
>
> -Thomas Jefferson

--- End Message ---
--- Begin Message ---
var_dump(ini_get('variables_order'));
var_dump(isset($_SESSION));
var_dump($_SESSION);

?


On Sunday 26 October 2003 01:43 am, Manisha Sathe wrote:
> It works well on linux means it shows me o/p as 'Manisha' but on local
> Win2kserver, it gives error.
>
> I tried to make use of error_reporting(0); in second.php but then screen
> becomes blank, it does not show me the output as "Manisha"
>
> manisha
>
>
>
> "Evan Nemerson" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
>
> > Your Linux server probably has error_reporting set to 0, which is usually
>
> a
>
> > good idea for production environments. To supress the error messages
>
> without
>
> > modifying your php.ini, do error_reporting(0). Take a look in your
> > php.ini file- the error_reporting directive will have lots of comments
> > around it explaining the concept thoroughly.
> >
> > On Sunday 26 October 2003 01:06 am, Manisha Sathe wrote:
> > > I am trying to use session but it seems it does not work on win2k
>
> server,
>
> > > the same runs on linux.
> > >
> > > following is my first php
> > > -------------------
> > > <?
> > > session_start();
> > > $_SESSION["name"]= "Manisha";
> > > ?>
> > > ----------------------
> > > following is the second php
> > >
> > > <?
> > > session_start();
> > > echo $_SESSION["name"];
> > > ?>
> > >
> > > -----------------
> > >
> > > but it is always giving me following error msg
> > >
> > > Notice: Undefined index: name in C:\Project
> > > Codes\www\testPHP\second.php
>
> on
>
> > > line 6
> > >
> > > ----------------------------
> > >
> > > The same thing works well on live Linux server. I checked php.ini
>
> options
>
> > > such as session enable / register global etc - both r same. Please help
> > > me. Is it a problem with win2k server or did i miss out any thing in
> > > php.ini ?
> > >
> > > Regards
> > > Manisha
> >
> > --
> > Evan Nemerson
> > [EMAIL PROTECTED]
> >
> > --
> > "The people are the only sure reliance for preservation of our liberty."
> >
> > -Thomas Jefferson

-- 
Evan Nemerson
[EMAIL PROTECTED]

--
"A popular government, without popular information, or the means of acquiring 
it, is but a Prologue to a Farce or a Tragedy - or perhaps both. Knowledge 
will forever govern ignorance, and a people who mean to be their own 
Governors must arm themselves with the power which knowledge gives."

-James Madison

--- End Message ---
--- Begin Message ---
Hi,

do u mean to say put this codes in php ?
I tried to put it in second.php following is the msg -
------------------------------------------------------
string(5) "EGPCS" bool(false)
Notice: Undefined variable: _SESSION in C:\Project
Codes\Vanderveer\www\testPHP\second.php on line 4
NULL
Warning: session_start(): Cannot send session cookie - headers already sent
by (output started at C:\Project Codes\Vanderveer\www\testPHP\second.php:2)
in C:\Project Codes\Vanderveer\www\testPHP\second.php on line 7

Warning: session_start(): Cannot send session cache limiter - headers
already sent (output started at C:\Project
Codes\Vanderveer\www\testPHP\second.php:2) in C:\Project
Codes\Vanderveer\www\testPHP\second.php on line 7

Notice: Undefined index: name in C:\Project
Codes\Vanderveer\www\testPHP\second.php on line 10
---------------------------------------------

I am not that expert in PHP, what all above means ? can u give me a hint
now, what is going wrong ?

regards
manisha

"Evan Nemerson" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> var_dump(ini_get('variables_order'));
> var_dump(isset($_SESSION));
> var_dump($_SESSION);
>
> ?
>
>
> On Sunday 26 October 2003 01:43 am, Manisha Sathe wrote:
> > It works well on linux means it shows me o/p as 'Manisha' but on local
> > Win2kserver, it gives error.
> >
> > I tried to make use of error_reporting(0); in second.php but then screen
> > becomes blank, it does not show me the output as "Manisha"
> >
> > manisha
> >
> >
> >
> > "Evan Nemerson" <[EMAIL PROTECTED]> wrote in message
> > news:[EMAIL PROTECTED]
> >
> > > Your Linux server probably has error_reporting set to 0, which is
usually
> >
> > a
> >
> > > good idea for production environments. To supress the error messages
> >
> > without
> >
> > > modifying your php.ini, do error_reporting(0). Take a look in your
> > > php.ini file- the error_reporting directive will have lots of comments
> > > around it explaining the concept thoroughly.
> > >
> > > On Sunday 26 October 2003 01:06 am, Manisha Sathe wrote:
> > > > I am trying to use session but it seems it does not work on win2k
> >
> > server,
> >
> > > > the same runs on linux.
> > > >
> > > > following is my first php
> > > > -------------------
> > > > <?
> > > > session_start();
> > > > $_SESSION["name"]= "Manisha";
> > > > ?>
> > > > ----------------------
> > > > following is the second php
> > > >
> > > > <?
> > > > session_start();
> > > > echo $_SESSION["name"];
> > > > ?>
> > > >
> > > > -----------------
> > > >
> > > > but it is always giving me following error msg
> > > >
> > > > Notice: Undefined index: name in C:\Project
> > > > Codes\www\testPHP\second.php
> >
> > on
> >
> > > > line 6
> > > >
> > > > ----------------------------
> > > >
> > > > The same thing works well on live Linux server. I checked php.ini
> >
> > options
> >
> > > > such as session enable / register global etc - both r same. Please
help
> > > > me. Is it a problem with win2k server or did i miss out any thing in
> > > > php.ini ?
> > > >
> > > > Regards
> > > > Manisha
> > >
> > > --
> > > Evan Nemerson
> > > [EMAIL PROTECTED]
> > >
> > > --
> > > "The people are the only sure reliance for preservation of our
liberty."
> > >
> > > -Thomas Jefferson
>
> --
> Evan Nemerson
> [EMAIL PROTECTED]
>
> --
> "A popular government, without popular information, or the means of
acquiring
> it, is but a Prologue to a Farce or a Tragedy - or perhaps both. Knowledge
> will forever govern ignorance, and a people who mean to be their own
> Governors must arm themselves with the power which knowledge gives."
>
> -James Madison

--- End Message ---
--- Begin Message ---
Hi,

session_start has to be the first command this time.  try again and the result will 
look better, maybe explaining.
so it should look like:

<?
session_start();
var_dump(ini_get('variables_order'));
var_dump(isset($_SESSION));
var_dump($_SESSION);
?>

angel

On Sun, 26 Oct 2003 17:47:38 +0800
"Manisha Sathe" <[EMAIL PROTECTED]> wrote:

> Hi,
> 
> do u mean to say put this codes in php ?
> I tried to put it in second.php following is the msg -
> ------------------------------------------------------
> string(5) "EGPCS" bool(false)
> Notice: Undefined variable: _SESSION in C:\Project
> Codes\Vanderveer\www\testPHP\second.php on line 4
> NULL
> Warning: session_start(): Cannot send session cookie - headers already sent
> by (output started at C:\Project Codes\Vanderveer\www\testPHP\second.php:2)
> in C:\Project Codes\Vanderveer\www\testPHP\second.php on line 7
> 
> Warning: session_start(): Cannot send session cache limiter - headers
> already sent (output started at C:\Project
> Codes\Vanderveer\www\testPHP\second.php:2) in C:\Project
> Codes\Vanderveer\www\testPHP\second.php on line 7
> 
> Notice: Undefined index: name in C:\Project
> Codes\Vanderveer\www\testPHP\second.php on line 10
> ---------------------------------------------
> 
> I am not that expert in PHP, what all above means ? can u give me a hint
> now, what is going wrong ?
> 
> regards
> manisha
> 
> "Evan Nemerson" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
> > var_dump(ini_get('variables_order'));
> > var_dump(isset($_SESSION));
> > var_dump($_SESSION);
> >
> > ?
> >
> >
> > On Sunday 26 October 2003 01:43 am, Manisha Sathe wrote:
> > > It works well on linux means it shows me o/p as 'Manisha' but on local
> > > Win2kserver, it gives error.
> > >
> > > I tried to make use of error_reporting(0); in second.php but then screen
> > > becomes blank, it does not show me the output as "Manisha"
> > >
> > > manisha
> > >
> > >
> > >
> > > "Evan Nemerson" <[EMAIL PROTECTED]> wrote in message
> > > news:[EMAIL PROTECTED]
> > >
> > > > Your Linux server probably has error_reporting set to 0, which is
> usually
> > >
> > > a
> > >
> > > > good idea for production environments. To supress the error messages
> > >
> > > without
> > >
> > > > modifying your php.ini, do error_reporting(0). Take a look in your
> > > > php.ini file- the error_reporting directive will have lots of comments
> > > > around it explaining the concept thoroughly.
> > > >
> > > > On Sunday 26 October 2003 01:06 am, Manisha Sathe wrote:
> > > > > I am trying to use session but it seems it does not work on win2k
> > >
> > > server,
> > >
> > > > > the same runs on linux.
> > > > >
> > > > > following is my first php
> > > > > -------------------
> > > > > <?
> > > > > session_start();
> > > > > $_SESSION["name"]= "Manisha";
> > > > > ?>
> > > > > ----------------------
> > > > > following is the second php
> > > > >
> > > > > <?
> > > > > session_start();
> > > > > echo $_SESSION["name"];
> > > > > ?>
> > > > >
> > > > > -----------------
> > > > >
> > > > > but it is always giving me following error msg
> > > > >
> > > > > Notice: Undefined index: name in C:\Project
> > > > > Codes\www\testPHP\second.php
> > >
> > > on
> > >
> > > > > line 6
> > > > >
> > > > > ----------------------------
> > > > >
> > > > > The same thing works well on live Linux server. I checked php.ini
> > >
> > > options
> > >
> > > > > such as session enable / register global etc - both r same. Please
> help
> > > > > me. Is it a problem with win2k server or did i miss out any thing in
> > > > > php.ini ?
> > > > >
> > > > > Regards
> > > > > Manisha
> > > >
> > > > --
> > > > Evan Nemerson
> > > > [EMAIL PROTECTED]
> > > >
> > > > --
> > > > "The people are the only sure reliance for preservation of our
> liberty."
> > > >
> > > > -Thomas Jefferson
> >
> > --
> > Evan Nemerson
> > [EMAIL PROTECTED]
> >
> > --
> > "A popular government, without popular information, or the means of
> acquiring
> > it, is but a Prologue to a Farce or a Tragedy - or perhaps both. Knowledge
> > will forever govern ignorance, and a people who mean to be their own
> > Governors must arm themselves with the power which knowledge gives."
> >
> > -James Madison
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 

--- End Message ---
--- Begin Message ---
Hello, first time on the list, and I'm trying to learn PHP.

Here is my setup, 2 servers, 1 is the MTA and 1 is the Web Server.
The MTA is a qmail server with smtp-auth that needs to have a user
name and password supplied to it to accept the mail for delivery.

How do I tell php to send the a username/password in the mail()
function so that it will deliver the emails?

Thanks for your help.

Trell

--- End Message ---
--- Begin Message --- mail function cannot do stmp-auth, but there are classes that can, check out www.phpclasses.org/mimemessage

Trell wrote:
Hello, first time on the list, and I'm trying to learn PHP.

Here is my setup, 2 servers, 1 is the MTA and 1 is the Web Server.
The MTA is a qmail server with smtp-auth that needs to have a user
name and password supplied to it to accept the mail for delivery.

How do I tell php to send the a username/password in the mail()
function so that it will deliver the emails?

Thanks for your help.

Trell


--- End Message ---
--- Begin Message --- David Otton wrote:
On Sat, 25 Oct 2003 11:52:53 +0300, you wrote:


I'm getting output from program I run (exec) to the web page.
How can I avoid this ?


Did you even look at the manual?

http://uk.php.net/manual/en/ref.exec.php

escapeshellarg -- escape a string to be used as a shell argument
escapeshellcmd -- escape shell metacharacters
exec -- Execute an external program
passthru -- Execute an external program and display raw output proc_close -- Close a process opened by proc_open() and return the exit
code of that process. proc_get_status -- Get information about a process opened by proc_open() proc_nice -- Change the priority of the current process proc_open -- Execute a command and open file pointers for input/output proc_terminate -- kills a process opened by proc_open shell_exec -- Execute command via shell and return complete output as
string system -- Execute an external program and display output



These I've tried:

error_reporting = E_ERROR

and even this:  
        error_reporting  =  ~E_ALL

display_errors = Off


Error reporting has nothing to do with it.


I was thinking it my self too that it is not exactly error
reporting. The problem was that I used passthru instead of exec.

Thanks.
--- End Message ---
--- Begin Message --- David Otton wrote:

On Sat, 25 Oct 2003 08:55:15 -0700, you wrote:


my god man, do you know what indenting is?


Uhm... it's that thing I did with 4-space tabs, all the way down.
Allman-style, not K&R, for what it's worth.


that confused the heck out of me.


Mailer problem?

                This            paragraph               has             two            
 tabs            between
each            word.           Can             you             see             them?



Saw those tabs.


no tabs in code

Mozilla Mail on Windows XP

fwiw

Please don't top-post.
--
Burhan Khalid
phplist[at]meidomus[dot]com
http://www.meidomus.com

--- End Message ---
--- Begin Message --- Luis Lebron wrote:

Here is the frameset:

<frameset rows="80,*,30" cols="*" frameborder="NO" border="0"
framespacing="0">
  <frame src="header.php" name="topFrame" scrolling="NO" noresize >
  <frameset rows="*" cols="250,*" framespacing="0" frameborder="NO"
border="0">
    <frame src="browse.php" name="leftFrame" scrolling="AUTO" noresize>
    <frame src="info.php" name="mainFrame">
  </frameset>
        <frame src="footer.php" name="bottonFrame" scrolling="NO" noresize >
</frameset>


and here is the form:


<form action="frame.php" method="POST" target="leftFrame">
<select name="category">
<option value="1" label="1">1</option>
<option value="2" label="2">2</option>
<option value="3" label="3">3</option>
<option value="4" label="4">4</option>
</select>
<input type="submit" />


and here is the relevant lines of browse.php


$category=$_POST["category"];
$query="Select username, age, height, eyeColor, haircolor, build, id from
users where category='$category'";

Well your form is sending its data to frame.php -- but you are looking for it in browse.php


if you change name="category" to name="category[]" then you'll get your results in an array with $category[0] holding the value of the selected index.

--
Burhan Khalid
phplist[at]meidomus[dot]com
http://www.meidomus.com

--- End Message ---
--- Begin Message ---
Hi Chris,

Nachricht vom Samstag, 25. Oktober 2003, 19:06:10:

> --- Timo Boettcher <[EMAIL PROTECTED]> wrote:
>> > http://shiflett.org/dev/php-general/ampersand.php
>>
>> can you put the source of that online, too?

> You can view the source in your browser to see the HTML, which is
> the relevant part.
I know that, but I wanted to see if you PHP-source gets the same
results on my server (testing if my server is misconfigured)
> If you see the HTML entity for an ampersand in your browser's
> location bar after submitting the form, then your browser has a bug.
> If you only see a plain ampersand, your browser is fine, and your
> code has a bug.
I guess its the latter... *g*

>> I get the same result as you do.
>> BUT: that page doesn't validate.... *g*

> Look again. Mine is not a full page, obviously, in order to focus
> your attention to the relevant markup.
Having the php-source of that part would make it easier to build a
full page out of it, to put it through the W3C Validator.
> What is there is XHTML-compliant.
> I'm not sure what "validate" means to you, but your earlier
> complaint about an ampersand not validating leads me to believe you
> were validating against XHTML transitional or strict. 
> You can let us know which, if you want, but it is irrelevant to your
> immediate problem.
That was in the post you ansered with this one.
I am trying to get
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HEAD>
  <META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">

> I am trying to not let you distract yourself; this is what makes
> solving problems more difficult for many people.
I am trying to get that page to work AND validate as in the W3C HTML
Validator. I was able to get both, but not at the same time, so that
is one problem, and splitting it in two doesn't help me to solve it.


> Chris




 Timo

--- End Message ---
--- Begin Message --- are you getting any 1xx status codes from the web server?

Cosmin wrote:

I'm trying to make an application using XML-RPC, and I have the
following problem: I use fsockopen() to simulate a POST to my local
web-server. All goes very well except it's very very slow. Here is my
code maybe someone could tell me what I'm doing wrong:
=====================================
$url= parse_url($this->serverURL);
$requestString= "POST ".$url['path']." HTTP/1.1\r\nHost:
".$url['host']."\r\nContent-type:
application/x-www.form-urlencoded\r\nContent-length:
".strlen($this->requestData)."\r\n\r\n".$this->requestData;;
        $fp = fsockopen($url['host'], 80, $err_num, $err_msg, 5);
        if ($fp)
        {
                //make the request to the xml-rpc server
                fputs($fp, $requestString);
                //gets the result
                while (!feof($fp))
                {
                        $response .= fgets($fp, 1024);
                }
                fclose($fp);
                $this->rawResponse=$response;
                $this->error=false;
        }
        else
        {
                $this->error=true;
                $this->errorMessage=$err_msg;
        }
====================================
This is the slowest part of my script(about 16 seconds). The server's
execution time is only 0.00064206123352051 seconds. I don't know why it
takes so much to write a string to the socket and then to read the
response. Here are the execution times:
        Server Start            Server Stop
        1067090777.5339         1067090777.5346
        
        Client Start            Client Stop
        1067090777.5303         1067090794.5286

If someone knows a way on how to speed this up please tell me how to do
it.


Thank you for your time






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

--- End Message ---
--- Begin Message --- What kind of server?

Dan McCullough wrote:

I have an install script that verifies someones registration key and
information against my client database and installs or patches, or whatever
else.  I'm new with CURL but is there away to get back a response from the
server that your are querying back through CURL?





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

--- End Message ---
--- Begin Message ---
Linux box to Linux box.  Running PHP 4.1+  The script its connecting to
would reside on one of my servers.

-----Original Message-----
From: Raditha Dissanayake [mailto:[EMAIL PROTECTED]
Sent: Sunday, October 26, 2003 8:32 AM
To: Dan McCullough
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] CURL remote server get data back


What kind of server?

Dan McCullough wrote:

>I have an install script that verifies someones registration key and
>information against my client database and installs or patches, or whatever
>else.  I'm new with CURL but is there away to get back a response from the
>server that your are querying back through CURL?
>
>
>


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

--- End Message ---
--- Begin Message --- What i meant was
Web , ftp, ssh, telnet, jabber, imap, pop, smtp etc or proprietory? :-)
if you are talking about a web server, there were two threads on POST to a web serving using PHP this week. You might find them usefull. You might be interested to know that fopen can also work with urls




Dan McCullough wrote:

Linux box to Linux box.  Running PHP 4.1+  The script its connecting to
would reside on one of my servers.

-----Original Message-----
From: Raditha Dissanayake [mailto:[EMAIL PROTECTED]
Sent: Sunday, October 26, 2003 8:32 AM
To: Dan McCullough
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] CURL remote server get data back


What kind of server?


Dan McCullough wrote:



I have an install script that verifies someones registration key and
information against my client database and installs or patches, or whatever
else. I'm new with CURL but is there away to get back a response from the
server that your are querying back through CURL?




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

--- End Message ---
--- Begin Message ---
How can I get the file size of an image in KB, I know how to get the width
and height of an image using the getimagesize(); but not sure how to get the
image file size.

Many thanks in advance.

awlad

--- End Message ---
--- Begin Message ---
On Sun, 26 Oct 2003 14:01:36 -0000, you wrote:

>How can I get the file size of an image in KB, I know how to get the width
>and height of an image using the getimagesize(); but not sure how to get the
>image file size.

http://www.google.com/search?hl=en&ie=UTF-8&oe=UTF-8&q=php+filesize
http://www.php.net/stat

--- End Message ---
--- Begin Message ---
Hello all!

I need to host several websites from the same server (physical computer), and thus 
require PHP to be configured for more than one directory with PHP files. Does anyone 
know how to specify several target directories for the doc_root directive in the 
configuration file?

Video Populares et Optimates

--- End Message ---
--- Begin Message ---
Hi!

I never knew that something like that is needed. It works fine without
any additional configuration. Does it work for your primary hosted
domain?

angel

On Sun, 26 Oct 2003 16:15:50 +0100
"P M" <[EMAIL PROTECTED]> wrote:

> Hello all!
> 
> I need to host several websites from the same server (physical computer), and thus 
> require PHP to be configured for more than one directory with PHP files. Does anyone 
> know how to specify several target directories for the doc_root directive in the 
> configuration file?
> 
> Video Populares et Optimates
> 

--- End Message ---
--- Begin Message ---
hi, I have the warning message below.
In which conf file can I set session.bug_compat_42 or 
session.bug_compat_warn to off?
And where can I find this conf file?

(annexe question: Is it possible to get the warnings in a variable so I 
could print it in html comment, or write it in a log file?)

thanks
-- 
Warning: Unknown(): Your script possibly relies on a session side-effect 
which existed until PHP 4.2.3. Please be advised that the session extension 
does not consider global variables as a source of data, unless 
register_globals is enabled. You can disable this functionality and this 
warning by setting session.bug_compat_42 or session.bug_compat_warn to off, 
respectively.

--- End Message ---
--- Begin Message ---
* Thus wrote Decapode Azur ([EMAIL PROTECTED]):
> hi, I have the warning message below.
> In which conf file can I set session.bug_compat_42 or 
> session.bug_compat_warn to off?
> And where can I find this conf file?

Just add the lines to the php.ini that is being used: 
session.bug_compat_42 = On
session.bug_compat_warn = Off

Curt
-- 
"My PHP key is worn out"

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

--- End Message ---
--- Begin Message ---
Any help appreciated.

Regards,

Bas

--- End Message ---

Reply via email to