php-general Digest 17 Feb 2002 14:03:39 -0000 Issue 1177

Topics (messages 85077 through 85102):

Re: file reading and array's
        85077 by: Scott

Re: Outputing XML to browser???
        85078 by: Jim Hankins

Breadcrumbs in PHP
        85079 by: lmlweb.mybc.com

storing arrays
        85080 by: Clark
        85083 by: CC Zona

Re: Help please
        85081 by: Bogdan Stancescu
        85082 by: webmaster mbtradingco
        85084 by: webmaster mbtradingco
        85086 by: Bogdan Stancescu
        85091 by: webmaster mbtradingco

Apache.exe fails Java
        85085 by: Zlutarch G.

Re: Sessions that last for ever
        85087 by: Jason Wong

global variables accesible by any script started by any browser
        85088 by: Sofhian Mahat

MySQL error checking/matching
        85089 by: Navid Yar

net send/WinPopup code - RFC
        85090 by: Garth Dahlstrom

Could this be a configuration directive?
        85092 by: Anas Mughal
        85093 by: Michael Sims
        85094 by: Anas Mughal

pdf_open_memory_image
        85095 by: Brent Meshier

preg_replace problem.
        85096 by: Paul Roberts

test for cookies, without reloading
        85097 by: Bas Jobsen

How to build PHP on LINUX with GD?
        85098 by: Andy

Duplicate e-mails
        85099 by: Anthony Rodriguez

4. sample of PHP docs in CHM
        85100 by: Gabor Hojtsy

Sendmail & PHP
        85101 by: Liam MacKenzie

Re: exec on Windows
        85102 by: DL Neil

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 ---
Perfect!  Thank you, my mind was out in left field somewhere.


On Tue, 12 Feb 2002, DL Neil wrote:

> Hi Scott,
> 
> > In my constant effort to improve my perl conversion project, I have a
> > question regarding file reading.  I am taking two files and combining
> > them in an array and then writing out a new file.  Is there a way to:
> > a)strip out the first line of the second file
> > b)test for conditions based on what is on the next line on the file
> > 
> > An example, I start the array on file one, then mid-way I start another
> > array on the second file (this array within in the first).  I need to
> > check the next line in the file for a condition to exist.
> > 
> > I have tried this, but run into the pointer resetting on each pass.
> > 
> > Any thoughts would be appreciated.  Thanks in advance.
> 
> 
> Use explicitly array pointers instead of the 'built-in' ones, then:
> 
> your need to look-ahead becomes array[$ptr + 1] 
> avoiding the first record becomes for ( $i=1; $i<$last; $i ++ ) //instead of $i=0
> 
> Does that cover things?
> =dn
> 
> 

-- 


--- End Message ---
--- Begin Message ---
More info on my latest issue regarding the integrating of xml and php for
dynamic xml documents

Thanks for help, could use another assist if you have a moment.  When I used
the method of using the application it worked only the output is text not
xml, ie it does update the dynamic information but formats it as text so I
reverted back to the previous configuration of the line in the httpd.conf
file which is

<IfModule mod_php4.c>
        AddType application/x-httpd-php .php .php4 .php3 .phtml
        AddType application/x-httpd-php-source .phps
    </IfModule>

Now as I thought about this, there must be something that tells php that
it's default type is text/html for output.  I perused the php.ini file and
low and behold I find something:

; As of 4.0b4, PHP always outputs a character encoding by default in
; the Content-type: header.  To disable sending of the charset, simply
; set it to be empty.
;
; PHP's built-in default is text/html
default_mimetype = "text/xml"   <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<I
changed this to xml,

now my xml works but of course I've now broke html formating.  (I need both
of course)

Surely there is someway to tell either with an xml header or something
within the beginning of a file which at this point could be either xml or
php, really doesn't matter. I must be able to tell php either by content, or
by location or something what format the file is to be displayed in so it
works.

Any ideas?



"Christian Blichmann" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Whoops, sent you a wrong .htaccess - file, here's
> what I really use (the other one was old):
>     AddType application/x-httpd-php .php .php4 .htm .html .xml .xhtml
>     DirectoryIndex index.xml index.xhtml
>     IndexIgnore .htaccess .htpasswd
>
> --
> Christian Blichmann
>
> _____________________________________________
> don't hesitate - email me with your thoughts:
> e-mail: [EMAIL PROTECTED]
>  - please remove the ".nospam" from address.
> _____________________________________________
> do you want to know more?
> web:    http://www.blichmann.de
>
>


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

I was trying out this breadcrumbs code found at evolt.org:

http://www.evolt.org/article/Breadcrumbs_for_PHP_Lovers/17/4455/

and tried it on my site. The same problem as documented on that page
exists on my page, being that it doesn't include any directories between
the "home" and the current page, such as:

home > about us > contact us.

Instead it shows as 

home > contact us

I've made some changes as recommended by the postings below, such as
changing SCRIPT_URL to PATH_INFO, but still no changes.

Has anyone had any experience and workaroudn with this particular script,
or if there's a better script that I can use for breadcrumbs?


-- 
Laurie Landry
[EMAIL PROTECTED] - email
(604) 693-1120 - voicemail/fax


--- End Message ---
--- Begin Message ---
Two questions:

1) Is it possible to write an array to a file?
2) Is it possible to specify the name of the key to each item of an array
when you get the array using file().

Thanks a lot.


--- End Message ---
--- Begin Message ---
In article <[EMAIL PROTECTED]>,
 [EMAIL PROTECTED] (Clark) wrote:

> 1) Is it possible to write an array to a file?

<http://php.net/serialize>
<http://php.net/fopen>
<http://php.net/fwrite>


> 2) Is it possible to specify the name of the key to each item of an array
> when you get the array using file().

You can take the array returned by file() and manipulate its keys however 
you want.  But beforehand...?  No.

-- 
CC
--- End Message ---
--- Begin Message ---
Since you're assuming Javascript anyway, you can use a <input 
type="button"> instead of <input type="submit"> and use the same 
javascript code as for the <a href>, just that you append a 
"document.forms[0].submit()".

HTH

Bogdan

webmaster mbtradingco wrote:

> I'm trying to contro l the way a new window opens when submiting a form.
>
>  
>
> When I do it fro m a regular button, I use:
>
>  
>
> <p align="center"> <a href="#pv" onClick="window.open('php/resulta.php','1','sc 
> rollbars=0,width=300,height=340,top=150,left=150');return true">
>
>  
>
> and it works, it opens the new window, but I'm not transferring any 
> values in here.
>
>  
>
> What I want to do is that when I push the submit button of a form, it 
> opens in the same window size as the prior example. I hope you can 
> assist me.
>
>  
>
> E.
>


--- End Message ---
--- Begin Message ---
Thanks… I hope you can assist me a little more.

 

I put the text like this:

 

                            <input type="Button" value="Enviar"
style="background-color: #E9B361"
onClick="window.open('php/encuesta.php','1','scrollbars=0,width=300,heig
ht=340,top=150,left=150',document.forms[0].submit());return true">

 

but it opens the new window (like it is supposed but it carries no
data), and the main window changes like if no value was added. This is
the third consecutive form in the page, and the form header is like
this.



                    <form method="POST"  action="php/encuesta.php"
target="_blank" onSubmit="submitonce(this)" name=”poll”>

 

where submitonce(this) is a function that disables the button after one
submission is made.

 

Help please.

 

Thanks

 

The site is www.papelesdeviaje.com <http://www.papelesdeviaje.com/>  and
is the poll in question. You can access below the enviar, and see what I
need the submit button to do.

 

Thanks.

-----Mensaje original-----
De: Bogdan Stancescu [mailto:[EMAIL PROTECTED]] 
Enviado el: Sábado, 16 de Febrero de 2002 20:43
Para: webmaster mbtradingco
CC: [EMAIL PROTECTED]
Asunto: Re: [PHP] Help please

 

Since you're assuming Javascript anyway, you can use a <input
type="button"> instead of <input type="submit"> and use the same
javascript code as for the <a href>, just that you append a
"document.forms[0].submit()".

HTH

Bogdan

webmaster mbtradingco wrote:



I’m trying to contro l the way a new window opens when submiting a form.

 

When I do it fro m a regular button, I use:

 

<p align="center"> <a href="#pv"
onClick="window.open('php/resulta.php','1','sc
rollbars=0,width=300,height=340,top=150,left=150');return true">

 

and it works, it opens the new window, but I’m not transferring any
values in here.

 

What I want to do is that when I push the submit button of a form, it
opens in the same window size as the prior example. I hope you can
assist me.

 

E.

 

--- End Message ---
--- Begin Message ---
Thanks… I hope you can assist me a little more.

 

I put the text like this: 

 

                            <input type="Button" value="Enviar"
style="background-color: #E9B361"
onClick="window.open('php/encuesta.php','1','scrollbars=0,width=300,heig
ht=340,top=150,left=150',document.forms[0].submit());return true">

 

but it opens the new window (like it is supposed but it carries no
data), and the main window changes like if no value was added. This is
the third consecutive form in the page, and the form header is like
this.



                    <form method="POST"  action="php/encuesta.php"
target="_blank" onSubmit="submitonce(this)" name=”poll”>

 

where submitonce(this) is a function that disables the button after one
submission is made.

 

Help please.

 

Thanks

 

The site is www.papelesdeviaje.com <http://www.papelesdeviaje.com/>  and
is the poll in question. You can access below the enviar, and see what I
need the submit button to do.

 

Thanks.

 

 

-----Mensaje original-----
De: Bogdan Stancescu [mailto:[EMAIL PROTECTED]] 
Enviado el: Sábado, 16 de Febrero de 2002 20:43
Para: webmaster mbtradingco
CC: [EMAIL PROTECTED]
Asunto: Re: [PHP] Help please

 

Since you're assuming Javascript anyway, you can use a <input
type="button"> instead of <input type="submit"> and use the same
javascript code as for the <a href>, just that you append a
"document.forms[0].submit()".

HTH

Bogdan

webmaster mbtradingco wrote:



I’m trying to contro l the way a new window opens when submiting a form.

 

When I do it fro m a regular button, I use:

 

<p align="center"> <a href="#pv"
onClick="window.open('php/resulta.php','1','sc
rollbars=0,width=300,height=340,top=150,left=150');return true">

 

and it works, it opens the new window, but I’m not transferring any
values in here.

 

What I want to do is that when I push the submit button of a form, it
opens in the same window size as the prior example. I hope you can
assist me.

 

E.

 

--- End Message ---
--- Begin Message ---
You should make up your mind - do you want to use the form in order to 
carry the data (use submit()) or do you want to submit the data via URL 
(GET method - using window.open()). You can't use both!

Bogdan

webmaster mbtradingco wrote:

>Thanks... I hope you can assist me a little more.
>
> 
>
>I put the text like this: 
>
> 
>
>                            <input type="Button" value="Enviar"
>style="background-color: #E9B361"
>onClick="window.open('php/encuesta.php','1','scrollbars=0,width=300,heig
>ht=340,top=150,left=150',document.forms[0].submit());return true">
>
> 
>
>but it opens the new window (like it is supposed but it carries no
>data), and the main window changes like if no value was added. This is
>the third consecutive form in the page, and the form header is like
>this.
>
>
>
>                    <form method="POST"  action="php/encuesta.php"
>target="_blank" onSubmit="submitonce(this)" name="poll">
>
> 
>
>where submitonce(this) is a function that disables the button after one
>submission is made.
>
> 
>
>Help please.
>
> 
>
>Thanks
>
> 
>
>The site is www.papelesdeviaje.com <http://www.papelesdeviaje.com/>  and
>is the poll in question. You can access below the enviar, and see what I
>need the submit button to do.
>
> 
>
>Thanks.
>
> 
>
> 
>
>-----Mensaje original-----
>De: Bogdan Stancescu [mailto:[EMAIL PROTECTED]] 
>Enviado el: Sábado, 16 de Febrero de 2002 20:43
>Para: webmaster mbtradingco
>CC: [EMAIL PROTECTED]
>Asunto: Re: [PHP] Help please
>
> 
>
>Since you're assuming Javascript anyway, you can use a <input
>type="button"> instead of <input type="submit"> and use the same
>javascript code as for the <a href>, just that you append a
>"document.forms[0].submit()".
>
>HTH
>
>Bogdan
>
>webmaster mbtradingco wrote:
>
>
>
>I'm trying to contro l the way a new window opens when submiting a form.
>
> 
>
>When I do it fro m a regular button, I use:
>
> 
>
><p align="center"> <a href="#pv"
>onClick="window.open('php/resulta.php','1','sc
>rollbars=0,width=300,height=340,top=150,left=150');return true">
>
> 
>
>and it works, it opens the new window, but I'm not transferring any
>values in here.
>
> 
>
>What I want to do is that when I push the submit button of a form, it
>opens in the same window size as the prior example. I hope you can
>assist me.
>
> 
>
>E.
>
> 
>
>



--- End Message ---
--- Begin Message ---
I'm sorry but I cant seem to make it work.

The form instruction is now:

                    <form method="get" onSubmit="submitonce(this)">

The Button Instruction is now:

<input type="Button" value="Enviar" style="background-color: #E9B361"
onClick="document.forms[1].submit();window.open('php/encuesta.php','1','
scrollbars=0,width=300,height=340,top=150,left=150');return true">
                       
Still when the new window opens is stops cause it does not have any
values with it.

What am I doing wrong here, if I add an action statement in the form,
then it opens the php procedure in the same window an works. If I add a
_blank target it also works, but the new window never works.

Thanks.



-----Mensaje original-----
De: Bogdan Stancescu [mailto:[EMAIL PROTECTED]] 
Enviado el: Sábado, 16 de Febrero de 2002 21:51
Para: webmaster mbtradingco
CC: [EMAIL PROTECTED]
Asunto: Re: [PHP] Help please

You should make up your mind - do you want to use the form in order to 
carry the data (use submit()) or do you want to submit the data via URL 
(GET method - using window.open()). You can't use both!

Bogdan

webmaster mbtradingco wrote:

>Thanks... I hope you can assist me a little more.
>
> 
>
>I put the text like this: 
>
> 
>
>                            <input type="Button" value="Enviar"
>style="background-color: #E9B361"
>onClick="window.open('php/encuesta.php','1','scrollbars=0,width=300,hei
g
>ht=340,top=150,left=150',document.forms[0].submit());return true">
>
> 
>
>but it opens the new window (like it is supposed but it carries no
>data), and the main window changes like if no value was added. This is
>the third consecutive form in the page, and the form header is like
>this.
>
>
>
>                    <form method="POST"  action="php/encuesta.php"
>target="_blank" onSubmit="submitonce(this)" name="poll">
>
> 
>
>where submitonce(this) is a function that disables the button after one
>submission is made.
>
> 
>
>Help please.
>
> 
>
>Thanks
>
> 
>
>The site is www.papelesdeviaje.com <http://www.papelesdeviaje.com/>
and
>is the poll in question. You can access below the enviar, and see what
I
>need the submit button to do.
>
> 
>
>Thanks.
>
> 
>
> 
>
>-----Mensaje original-----
>De: Bogdan Stancescu [mailto:[EMAIL PROTECTED]] 
>Enviado el: Sábado, 16 de Febrero de 2002 20:43
>Para: webmaster mbtradingco
>CC: [EMAIL PROTECTED]
>Asunto: Re: [PHP] Help please
>
> 
>
>Since you're assuming Javascript anyway, you can use a <input
>type="button"> instead of <input type="submit"> and use the same
>javascript code as for the <a href>, just that you append a
>"document.forms[0].submit()".
>
>HTH
>
>Bogdan
>
>webmaster mbtradingco wrote:
>
>
>
>I'm trying to contro l the way a new window opens when submiting a
form.
>
> 
>
>When I do it fro m a regular button, I use:
>
> 
>
><p align="center"> <a href="#pv"
>onClick="window.open('php/resulta.php','1','sc
>rollbars=0,width=300,height=340,top=150,left=150');return true">
>
> 
>
>and it works, it opens the new window, but I'm not transferring any
>values in here.
>
> 
>
>What I want to do is that when I push the submit button of a form, it
>opens in the same window size as the prior example. I hope you can
>assist me.
>
> 
>
>E.
>
> 
>
>



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

I am learning how to use the PHP Java extension. I used the example 
script/codes found in the PHP Java documentation:"
<?php

// get instance of Java class java.lang.System in PHP
  $system = new Java('java.lang.System');

  // demonstrate property access
  print 'Java version='.$system->getProperty('java.version').' <br>';
  print 'Java vendor=' .$system->getProperty('java.vendor').'  <br>';
  print 'OS='.$system->getProperty('os.name').' '.
              $system->getProperty('os.version').' on '.
              $system->getProperty('os.arch').' <br>';

  // java.util.Date example
  $formatter = new Java('java.text.SimpleDateFormat',
                        "EEEE, MMMM dd, yyyy 'at' h:mm:ss a zzzz");

  print $formatter->format(new Java('java.util.Date'));

?>"

And I got the correct output:
Java version=1.3.0
Java vendor=Sun Microsystems Inc.
OS=Windows 2000 5.0 on x86
Sunday, February 17, 2002 at 3:28:42 AM Greenwich Mean Time

However, the script also crashed Apache.exe each time it was run. It gave me 
the following error message: "Apache.exe has generated errors and will be 
closed by Windows. You will need to restart the program."

Does anyone know what is going on? Why Apache.exe kept crashing after runing 
this PHP script?

Thanks,

Zlutarch

_________________________________________________________________
MSN Photos is the easiest way to share and print your photos: 
http://photos.msn.com/support/worldwide.aspx

--- End Message ---
--- Begin Message ---
On Sunday 17 February 2002 04:10, Nigel Gilbert wrote:
> But very many commercial sites, including Apple and Amazon to name two,
> do exactly this.  When you re-enter the site they 'remember' who you are
> using a cookie.  In my case, I'm building a multi-player strategy game
> and while I want the players to go through an initial briefing the first
> time they ever join the game, thereafter they should be able to get
> straight into the game if they are still using the same PC.  But as I
> said, the specifics of my use aren't so important - lots of sites leave
> permanent cookies around and the results don't seem to be catastrophic.
>
> The question is still: how to do it?


Try changing the value of "session.cookie_lifetime" in php.ini.


-- 
Jason Wong -> Gremlins Associates -> www.gremlins.com.hk

/*
Have a taco.
                -- P.S. Beagle
*/
--- End Message ---
--- Begin Message ---
Does anyone know if it is possible to have a script declare a variable and make it 
accesible by any script started by any browser?
--- End Message ---
--- Begin Message ---
Hello everyone,

I have a problem. I have a test database (used to learn MySQL) with a
table called customers and a field called email. The email field is set
to be unique, so I know that by using: $query = "select email from
customers where email = $email"; I will get one cell with the e-mail
address that matches the email address specified by the variable
$e-mail. Basically, I want to check to see if the e-mail address set in
the variable $email matches the email address in the field named email.
But I get an error at the end.
Here's the source:

Assumptions:
- $email is set from a previous page
- a database connection is open and the database to be used is selected
- session settings will send $error back to the form page if result of
if statement below is true


$query = "select email from customers"          // Check for duplicate
entry
        . "where email = $email";
$query = stripslashes($query);
$result = mysql_query($query);

$num_results = mysql_num_rows($result);         // Get the number of
rows in database (integer)
for ($i = 0; $i < $num_results; $i++) {
$row = mysql_fetch_array($result);                      // Return
results in an associative array
}

if($row["email"] == $email) {                           // Check to see
if $email matches in database
   $error = "$email has already been registered";
   header("Location: signup.php?<?=SID?>");
   exit;
}

And this produces the following error:
Warning: Supplied argument is not a valid MySQL result resource in
e:\localhost/book-o-rama/admin/signup_do.php on line 34.

What am I doing wrong? Any help would be appreciated...

--- End Message ---
--- Begin Message ---
I'm working on some PHP code to make it possible for a PHP
script to do "net send" messages.  

Here's what I have so far, I've been successful sending 
to localhost with it on a Windows machine.  

If folks could try this out and make suggestions on how to 
improve it, I'd be very appreciative...

-Garth

Code:

<? 
function WinPopup($Target, $Message) 
  {
      global $COMSPEC;
      if (isset($COMSPEC))  // Windows
      {
        /* Schedule the call to 'net send', because if 'net send' 
           can't quickly resolve the computer name it can easily exceed PHP's 
           allowed processing time, and besides don't want the user to wait */ 
        $result = shell_exec("at ".date("H:i", time()+60)." net send
\"".$Target."\" ".escapeshellarg($Message));
        preg_match("/ID = ([0-9]+)$/",$result, $matches );
        return $matches[1];    
      }
      // *nix with Samba
      $result = shell_exec("smbclient -M ".escapeshellarg($Target)."
".escapeshellarg($Message)." >/dev/null");      
      return 1;
  }

?>
<pre>

<form>

<h4>Winpopup / Net Send from PHP</h4>

<input type=text name=target value='<?=gethostbyaddr($REMOTE_ADDR);?>'>
<input type=submit value='go!'>

<?
// The Test ...
if (isset($target))
{
$x = WinPopup($target, "PHP sent you a message at ".date("H:i"));
echo "<BR>";
echo "date = ".date("H:i");
echo "<Br>";
echo "x = [ $x ]";
?>
<br>
if <b><?=$target?></b> is a windows PC with some kind of 
net send / winpopup compatiable maillots 
running you should hopefully get
a message in about a minute or two. 
</pre>


<?
if ($COMSPEC)
{
$at = shell_exec("at");
echo "at = [ <textarea nowrap rows=10 cols=100>".$at."</textarea><Br>]";
}
else 
{
phpinfo();
}
}
?>
</form>


--- End Message ---
--- Begin Message ---
I get a parse error using my CGI version of PHP on the
following line:

   $message = $$this->func_name($string);

However, the same above line works fine with my ISP's
CGI version of PHP.

The first thing that jumps to my mind is that my ISP's
CGI version could have been compiled with some
different configuration directive. However, I am not
able to figure it out. Could someone please advise. 

Oh, another thing, my CGI version is PHP 3.0.12. The
ISP CGI version is PHP 4.0.3pl1. Is the above syntax
not supported in PHP3?

Thanks for your quick response.

=====
Anas Mughal
[EMAIL PROTECTED]
[EMAIL PROTECTED]
Tel: 973-249-6665

__________________________________________________
Do You Yahoo!?
Yahoo! Sports - Coverage of the 2002 Olympic Games
http://sports.yahoo.com
--- End Message ---
--- Begin Message ---
At 11:22 PM 2/16/2002 -0800, Anas Mughal wrote:
>I get a parse error using my CGI version of PHP on the
>following line:
>
>    $message = $$this->func_name($string);
>
>However, the same above line works fine with my ISP's
>CGI version of PHP.

That is strange.  Just for kicks, try using curly braces to make the 
statement less ambiguous.  Is the variable part just the object name, or is 
it the entire method?  See if it works like this:

$message = ${$this}->func_name($string);

or like this:

$message = ${$this->func_name($string)};

Depending on which one you mean.

--- End Message ---
--- Begin Message ---
Thank you very much...

This worked:

  $message = ${$this->func_name($string)};


and, this worked: (I am going to stick with this)

  $message = ${$this->func_name}($string);


However, this did NOT work:

$message = ${$this}->func_name($string);


Lesson learned: I need to enclose the function name
variable in curly braces.

Thanks.



--- Michael Sims <[EMAIL PROTECTED]> wrote:
> At 11:22 PM 2/16/2002 -0800, Anas Mughal wrote:
> >I get a parse error using my CGI version of PHP on
> the
> >following line:
> >
> >    $message = $$this->func_name($string);
> >
> >However, the same above line works fine with my
> ISP's
> >CGI version of PHP.
> 
> That is strange.  Just for kicks, try using curly
> braces to make the 
> statement less ambiguous.  Is the variable part just
> the object name, or is 
> it the entire method?  See if it works like this:
> 
> $message = ${$this}->func_name($string);
> 
> or like this:
> 
> $message = ${$this->func_name($string)};
> 
> Depending on which one you mean.
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 


=====
Anas Mughal
[EMAIL PROTECTED]
[EMAIL PROTECTED]
Tel: 973-249-6665

__________________________________________________
Do You Yahoo!?
Yahoo! Sports - Coverage of the 2002 Olympic Games
http://sports.yahoo.com
--- End Message ---
--- Begin Message ---
I'm running in to the following error message:

Warning: pdf_open_memory_image() is not supported in this PHP build

I have pdflib and gd compiled in to PHP, so I'm sure what to do next.  Any
ideas?

--Brent

--- End Message ---
--- Begin Message ---
where am i going wrong

i used 
$mail = preg_replace("/<p[^>]*?>/i","\n\n$0", $mail,-1);
and
$mail = preg_replace("/<p[^>]*?>/i","\n\n\\1", $mail,-1);

but i get $0 or \1 inserted, but only on the linux server
not on my win 2000 dev machine!

Paul Roberts
[EMAIL PROTECTED]
++++++++++++++++++++++++
----- Original Message ----- 
From: "Anas Mughal" <[EMAIL PROTECTED]>
To: "Michael Sims" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Sunday, February 17, 2002 8:12 AM
Subject: Re: [PHP] Could this be a configuration directive?


> Thank you very much...
> 
> This worked:
> 
>   $message = ${$this->func_name($string)};
> 
> 
> and, this worked: (I am going to stick with this)
> 
>   $message = ${$this->func_name}($string);
> 
> 
> However, this did NOT work:
> 
> $message = ${$this}->func_name($string);
> 
> 
> Lesson learned: I need to enclose the function name
> variable in curly braces.
> 
> Thanks.
> 
> 
> 
> --- Michael Sims <[EMAIL PROTECTED]> wrote:
> > At 11:22 PM 2/16/2002 -0800, Anas Mughal wrote:
> > >I get a parse error using my CGI version of PHP on
> > the
> > >following line:
> > >
> > >    $message = $$this->func_name($string);
> > >
> > >However, the same above line works fine with my
> > ISP's
> > >CGI version of PHP.
> > 
> > That is strange.  Just for kicks, try using curly
> > braces to make the 
> > statement less ambiguous.  Is the variable part just
> > the object name, or is 
> > it the entire method?  See if it works like this:
> > 
> > $message = ${$this}->func_name($string);
> > 
> > or like this:
> > 
> > $message = ${$this->func_name($string)};
> > 
> > Depending on which one you mean.
> > 
> > 
> > -- 
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> > 
> 
> 
> =====
> Anas Mughal
> [EMAIL PROTECTED]
> [EMAIL PROTECTED]
> Tel: 973-249-6665
> 
> __________________________________________________
> Do You Yahoo!?
> Yahoo! Sports - Coverage of the 2002 Olympic Games
> http://sports.yahoo.com
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 
> 


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

Is there a way to test for cookies enabled/disabled, without reload the page 
and test for the preset cookie?

echo setcookies("test");
seems to be 1 always.

Tnx,

Bas
--- End Message ---
--- Begin Message ---
Hi there,

Can it be that complicated to build php with gdlib2 on linux?

I thought the gd2 is included in php4.1.1 so just telling php at buildtime
to include it. But this is generating errors.

So I did download gdlib from boutel, compiled it and tryed to configure php
prior build. This does not work. It is never finding the gdlib.so in that
library.

Can somebody please explain how to build php with gd2 and mysql working on
RH7.2 Linux?

Thank you so much for any help. Linux makes frustrated after a while :-(

Andy


--- End Message ---
--- Begin Message ---
I've a php script that gets e-mail addresses from a MySQL database and then 
sends the same e-mail message to about 100+ addressees. There are no 
duplicate addresses in the db.

When I call the script the e-mails do get send but in duplicate and, 
instead of linking to a "Task Done" page,  it shows "url not found".  There 
is no duplication within the script and the url called is there in the same 
folder as the script.

Is there a problem with php's mail function when it's used for multiple 
messages?  Or is there a processing time limit that makes the script to be 
processed twice?

Scripts are run using Apache under Unix.

Thank you!

Anthony F. Rodriguez
([EMAIL PROTECTED])

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

We released the fourth sample of the PHP Manual
CHM Edition. We beleive it is better then the previous
ones. Go and get it: http://weblabor.hu/php-doc-chm
Discussions at [EMAIL PROTECTED]

Goba


--- End Message ---
--- Begin Message ---
Sorry about this, yet another question about sendmail...

I've spent days on this, read stacks of docs and just can not get it to work!
It sends some emails...  But others it rejects.
Please, if you know of any tutorials on how to set this stuff up, please
tell me!  
If you think you may be able to set it up for me using webmin, I will make
you a temporary account.  I just need it fixed!  By any means!

Thankyou so much for your help, this has frustrated me for too long now!!!

Liam

P.S.  Below is the error dump from sendmail.




>From MAILER-DAEMON Sun Feb 17 22:31:20 2002
Return-Path: <MAILER-DAEMON>
Received: from localhost (localhost)
        by apathy (8.11.2/8.11.2) id g1HCVJJ11765;
        Sun, 17 Feb 2002 22:31:20 +1000
Date: Sun, 17 Feb 2002 22:31:20 +1000
From: Mail Delivery Subsystem <MAILER-DAEMON>
Message-Id: <200202171231.g1HCVJJ11765@apathy>
To: nobody
MIME-Version: 1.0
Content-Type: multipart/report; report-type=delivery-status;
        boundary="g1HCVJJ11765.1013949080/apathy"
Subject: Returned mail: see transcript for details
Auto-Submitted: auto-generated (failure)

This is a MIME-encapsulated message

--g1HCVJJ11765.1013949080/apathy

The original message was received at Sat, 16 Feb 2002 09:40:28 +1000
from nobody@localhost

   ----- The following addresses had permanent fatal errors -----
[EMAIL PROTECTED]
    (reason: 550 Host unknown)

   ----- Transcript of session follows -----
550 5.1.2 [EMAIL PROTECTED] Host unknown (Name server: 
operationengima.net: host not found)

--g1HCVJJ11765.1013949080/apathy
Content-Type: message/delivery-status

Reporting-MTA: dns; apathy
Arrival-Date: Sat, 16 Feb 2002 09:40:28 +1000

Final-Recipient: RFC822; [EMAIL PROTECTED]
Action: failed
Status: 5.1.2
Remote-MTA: DNS; operationengima.net
Diagnostic-Code: SMTP; 550 Host unknown
Last-Attempt-Date: Sun, 17 Feb 2002 22:31:20 +1000

--g1HCVJJ11765.1013949080/apathy
Content-Type: message/rfc822

Return-Path: <nobody>
Received: (from nobody@localhost)
        by apathy (8.11.2/8.11.2) id g1FNeSk00547;
        Sat, 16 Feb 2002 09:40:28 +1000
Date: Sat, 16 Feb 2002 09:40:28 +1000
Message-Id: <200202152340.g1FNeSk00547@apathy>
To: [EMAIL PROTECTED]
Subject: Re: A few changes...
From: ert <[EMAIL PROTECTED]>

This email was sent to you by ert at [EMAIL PROTECTED] because they thought you 
might be interested it this article from http://www.operationenigma.net.  This is not 
SPAM and the email addresses involved in this transaction were not saved to a list or 
stored for later use.
ert wrote: 123124124
------------------------------------------------------------

A few changes...
Thursday, 07 February 2002 @ 08:16 PM EST
Contributed by: 

Sorry about the downtime people, been doing some serious renovations.  I can't tell 
you about them now, I'll post a link to a page with all the appropriate information on 
it later, maybe in a day or so.

Thanks for your patience, it is greatly appreciated!



------------------------------------------------------------
Comment on this story at 
http://www.operationenigma.net/article.php?story=20020207201614518#comments

--g1HCVJJ11765.1013949080/apathy--

--- End Message ---
--- Begin Message ---
Scott,

> I am trying to develop a music scheduling system on Windows using the
> command line to fire off WinAMP.  The first exec works fine, then it
> stops
> and says that program execution time has been exceeded.
>
> An example would be:
>
> exec ("winamp.exe M000001.mp3");
>
> a while loop kicks off the second.  I tried to send the output to null
> winamp.exe >null or nul and no luck.  Anyone else try this on Windows?


Sounds interesting.
I take it that it is the PHP script that stops (not the winamp player)!? Looks like 
you are running into
problems with the script execution time limit. Herewith a couple of theories:

1 what happens if you specify that the winamp is to run in its own cmd shell - will 
control return to PHP
'immediately'?
2 if the problem is time-out, and you can only play one .mp3 at a time, so looping to 
'the next' must be
dependent upon the preceding track finishing first, what happens if you adjust the 
set_time_limit to 0/no limit?
(RTFM: http://www.php.net/manual/en/function.set-time-limit.php)

Regards,
=dn


--- End Message ---

Reply via email to