php-general Digest 6 Jul 2003 20:50:39 -0000 Issue 2160

Topics (messages 154115 through 154145):

Question
        154115 by: The.Rock
        154118 by: Tom Rogers

Re: does anyone know how to tell if a PHP scrip is being executed from the command 
line not a server HTTP request??
        154116 by: Robert Cummings

Reading from remote file
        154117 by: Daniele Baroncelli
        154119 by: Dan Anderson
        154123 by: Philip Olson

mysql_query
        154120 by: Kevin Fradkin
        154121 by: Sævar Öfjörð
        154122 by: Sævar Öfjörð
        154127 by: Kevin Fradkin
        154128 by: Burhan Khalid
        154130 by: Kevin Fradkin
        154132 by: Chris Knipe
        154136 by: Kevin Fradkin
        154138 by: Chris Knipe

echo not working!!!
        154124 by: aravandor
        154125 by: Tom Rogers
        154126 by: David Nicholson

Re: newbie query
        154129 by: rob

fsockopen -> returning results from port 80, 8080 and 443 requests
        154131 by: Dave [Hawk-Systems]

Can I use PHP to draw a chart?
        154133 by: Sheawh
        154135 by: Greg Donald

Having problems with an IF statement, just doesn't make sense
        154134 by: BoBB
        154137 by: David Otton

Re: Incrementing counter from an HTML page.
        154139 by: Mike Migurski

PHP 4.3.1, ini_set, ini_get, memory_limit, and max_input_time
        154140 by: Raymond C. Rodgers

how to modify in the db
        154141 by: Kevin Fradkin
        154142 by: Philip Olson
        154143 by: Miles Thompson

fsockopen/curl failure, ipv6 warning??
        154144 by: alex

Warning: Invalid argument supplied for foreach()
        154145 by: arnaud gonzales

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 ---
When is the relase date for php 5?



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

Sunday, July 6, 2003, 3:15:56 AM, you wrote:
TR> When is the relase date for php 5?




at this point I think the only digits filled in are

200x-xx-xx

-- 
regards,
Tom


--- End Message ---
--- Begin Message ---
I don't know if it is a great way, but it has worked for me for a long
time now. I make the following test:

    isset( $HTTP_SERVER_VARS['SERVER_PORT']

Cheers,
Rob.

On Sun, 2003-07-06 at 04:48, Jeffrey D. Means wrote:
> I am trying to write a script but for security I need to verify that it is
> not executed by a web server.  At this point I have just placed it outside
> the htdocs tree but would like to build into the script a test to die if it
> is being executed by a web server.
> 
> Thanks
> 
> Jeff Means
> CIO for MeansPC
> [EMAIL PROTECTED]
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 

-- 
.---------------------------------------------.
| Worlds of Carnage - http://www.wocmud.org   |
:---------------------------------------------:
| Come visit a world of myth and legend where |
| fantastical creatures come to life and the  |
| stuff of nightmares grasp for your soul.    |
`---------------------------------------------'

--- End Message ---
--- Begin Message ---
Hi guys,
I am trying to read from a remote file, by using an example reported at the
manual page for the fread function:

<?php
$handle = fopen ("http://www.php.net/";, "rb");
$contents = "";
do {
    $data = fread ($handle, filesize ($filename));
    if (strlen($data) == 0) {
        break;
    }
    $contents .= $data;
}
fclose ($handle);
?>


Unfortunately this example is incorrect, as it gives me a parse error. The
mistake should be in the fact that there is a "do" keyword without a
"while".
Would anyone suggest me the correct version?

Cheers

Daniele




--- End Message ---
--- Begin Message ---
Since you're using a break to determine when to leave why not...
> <?php
> $handle = fopen ("http://www.php.net/";, "rb");
> $contents = "";
  while (!(feof($handle)))
>  {
>     $data = fread ($handle, filesize ($filename));
>     if (strlen($data) == 0) {
>         break;
>     }
>     $contents .= $data;
> }
> fclose ($handle);
> ?>



--- End Message ---
--- Begin Message ---
This is already fixed in CVS.  The entire example is bogus, 
it should not be using filesize($filename) either.

Here's what's in CVS (the manual will be rebuilt sometime
in the next week):

<?php
$handle = fopen ("http://www.example.com/";, "rb");
$contents = "";
do {
    $data = fread($handle, 8192);
    if (strlen($data) == 0) {
        break;
    }
    $contents .= $data;
} while(true);
fclose ($handle);
?>

And the whole point is to demonstrate the following note:

 "When reading from network streams or pipes, such as those 
  returned when reading remote files or from popen() and 
  proc_open(), reading will stop after a packet is available. 
  This means that you should collect the data together in 
  chunks as shown in the example below."

Have fun :)

Regards, 
Philip


On Sun, 6 Jul 2003, Daniele Baroncelli wrote:

> Hi guys,
> I am trying to read from a remote file, by using an example reported at the
> manual page for the fread function:
> 
> <?php
> $handle = fopen ("http://www.php.net/";, "rb");
> $contents = "";
> do {
>     $data = fread ($handle, filesize ($filename));
>     if (strlen($data) == 0) {
>         break;
>     }
>     $contents .= $data;
> }
> fclose ($handle);
> ?>
> 
> 
> Unfortunately this example is incorrect, as it gives me a parse error. The
> mistake should be in the fact that there is a "do" keyword without a
> "while".
> Would anyone suggest me the correct version?
> 
> Cheers
> 
> Daniele
> 
> 
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 


--- End Message ---
--- Begin Message ---
hi... 1 question...
how can i show in a table the query i'm trying to make

this is what i want :
select * from my_table where var1='$val1' /* here comes the trouble  cause i
want to use 2 instead of only one... */  var2='$val2'

how you have to use it for more than one? where var1='$val1' ???
var2='$val2' ?

thanks in advance..



--- End Message ---
--- Begin Message ---
SELECT * FROM my_table WHERE var1='$var1' AND var2='$var2'
------------------------------------------^
 
you use AND
 
-----Original Message-----
From: Kevin Fradkin [mailto:[EMAIL PROTECTED] 
Sent: 6. júlí 2003 13:43
To: [EMAIL PROTECTED]
Subject: [PHP] mysql_query
 
hi... 1 question...
how can i show in a table the query i'm trying to make
 
this is what i want :
select * from my_table where var1='$val1' /* here comes the trouble
cause i want to use 2 instead of only one... */  var2='$val2'
 
how you have to use it for more than one? where var1='$val1' ???
var2='$val2' ?
 
thanks in advance..
 
 
 
-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
 
 
 

--- End Message ---
--- Begin Message ---
Hmm. Should have been like this..

-----Original Message-----
From: Sævar Öfjörð [mailto:[EMAIL PROTECTED] 
Sent: 6. júlí 2003 14:04
To: [EMAIL PROTECTED]
Subject: Re: [PHP] mysql_query

SELECT * FROM my_table WHERE var1='$var1' AND var2='$var2'


------------------------------------------^
 
you use AND
 
-----Original Message-----
From: Kevin Fradkin [mailto:[EMAIL PROTECTED] 
Sent: 6. júlí 2003 13:43
To: [EMAIL PROTECTED]
Subject: [PHP] mysql_query
 
hi... 1 question...
how can i show in a table the query i'm trying to make
 
this is what i want :
select * from my_table where var1='$val1' /* here comes the trouble
cause i want to use 2 instead of only one... */  var2='$val2'
 
how you have to use it for more than one? where var1='$val1' ???
var2='$val2' ?
 
thanks in advance..
 
 
 
-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
 
 
 


--- End Message ---
--- Begin Message ---
and now.. if in one cell i have for example... "John Matheus"

when i do the query i have to put exactly john matheus to find it...
is there any way to just write jo and search in every cell that contains
those words?

example... i have  1 column with 5 rows each 6 numbers inside :
821554
821674
818937
819378
818977

and i want to query and show onmy begining with 821*

thnx in advance!

Kevin



--- End Message ---
--- Begin Message ---
On Sunday, July 6, 2003, 7:26:06 PM, Kevin wrote:

KF> and now.. if in one cell i have for example... "John Matheus"

KF> when i do the query i have to put exactly john matheus to find it...
KF> is there any way to just write jo and search in every cell that contains
KF> those words?

try this SELECT * FROM table WHERE name = jo%

KF> example... i have  1 column with 5 rows each 6 numbers inside :
KF> 821554
KF> 821674
KF> 818937
KF> 819378
KF> 818977

KF> and i want to query and show onmy begining with 821*

SELECT * FROM table WHERE number > 821000

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


--- End Message ---
--- Begin Message ---
the problem is if i put 821000 i will have as result all number > 821000
including 830000

and i only need numbers begining with the numbers i entered..

i will try now the other thing!.. thnx!




--- End Message ---
--- Begin Message ---
----- Original Message ----- 
From: "Kevin Fradkin" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, July 06, 2003 6:40 PM
Subject: Re: [PHP] mysql_query


> the problem is if i put 821000 i will have as result all number > 821000
> including 830000
> 
> and i only need numbers begining with the numbers i entered..

where numbers LIKE 821%

I'd suggest you read up on the LIKE clause...

--
me


--- End Message ---
--- Begin Message ---
Thnx! :)

one last question for the day...
if in one cell i have two names..... ex 'mary eleanor'
and i want to search by typing 'ele' with   name LIKE '$name%' will not give
me mary eleanor as a result...
any ideas?



--- End Message ---
--- Begin Message ---
> one last question for the day...
> if in one cell i have two names..... ex 'mary eleanor'
> and i want to search by typing 'ele' with   name LIKE '$name%' will not
give
> me mary eleanor as a result...
> any ideas?


*sighs*

LIKE '%$name%'

As I said... Read the MySQL Manual.


--- End Message ---
--- Begin Message ---
I'm setting up php on the apache server for the first time here running
Slackware linux, and I cannot get the echo command to display properly.

My source file is phptest.php and it looks like this:

<html>
<head>
<title>PHP Test</title>
</head>
<body bgcolor="#000000" text="#FFFFFF">
<br><br>
<center>
<?php echo "<h1>PHP is running.</h1>"; ?>
</center>
</body>
</html>

When the page is displayed on my server, it doesn't show the text.
Altenatively, if I enclose the quoted string in parenthesis,

<?php echo ("<h1>PHP is running.</h1>"); ?>

it displays the string AND the closing double quote, paren, semicolon,
question mark, and > on a new line.  What the hell is going on here?

PHP is running.
");?>



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

Sunday, July 6, 2003, 3:55:39 PM, you wrote:
a> I'm setting up php on the apache server for the first time here running
a> Slackware linux, and I cannot get the echo command to display properly.

a> My source file is phptest.php and it looks like this:

a> <html>
a> <head>
a> <title>PHP Test</title>
a> </head>
a> <body bgcolor="#000000" text="#FFFFFF">
a> <br><br>
a> <center>
a> <?php echo "<h1>PHP is running.</h1>"; ?>
a> </center>
a> </body>
a> </html>

a> When the page is displayed on my server, it doesn't show the text.
a> Altenatively, if I enclose the quoted string in parenthesis,

a> <?php echo ("<h1>PHP is running.</h1>"); ?>

a> it displays the string AND the closing double quote, paren, semicolon,
question mark, and >> on a new line.  What the hell is going on here?

a> PHP is running.
");?>>


make sure you have a line like

AddType application/x-httpd-php .php

in httpd.conf and that you restarted apache

-- 
regards,
Tom


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


This is a reply to an e-mail that you wrote on Sun, 6 Jul 2003 at 16:57,
lines prefixed by '>' were originally written by you.
> <?php echo ("<h1>PHP is running.</h1>"); ?>
> it displays the string AND the closing double quote, paren, semicolon,
> question mark, and > on a new line.  What the hell is going on here?
> PHP is running.
> ");?>

At a guess I would say that your PHP is not being parsed as PHP, if you
view the source of your output you will probably see <?php echo
("<h1>PHP is running.</h1>"); ?> but your browser is treating <?php
echo ("<h1>PHP is running.</h1> as a tag that it does not understand and
displaying the "); ?> as text.

If this is the case you need to check your httpd.conf.

David.

--
phpmachine :: The quick and easy to use service providing you with
professionally developed PHP scripts :: http://www.phpmachine.com/

          Professional Web Development by David Nicholson
                    http://www.djnicholson.com/

    QuizSender.com - How well do your friends actually know you?
                     http://www.quizsender.com/
                    (developed entirely in PHP)

--- End Message ---
--- Begin Message ---
on 7/7/03 2:31 AM, Burhan Khalid at [EMAIL PROTECTED] wrote:
dear list
My server runs requires that if I want to write to file that I place my php
script in the cgi-bin and it treats it as a cgi script. I am new to this and
cannot get it to work. Would anyone know of a tutorial I could use to get
the hang of doing this. Apart from this my php pages work fine
Thanks
RB


--- End Message ---
--- Begin Message ---
Creating a quick script where we can poll the services on a particular server to
verify if they are running or not.  this will be included in a larger scope
application once the details are worked out.

Am having a problem getting results from queries to web server ports though.
Port 80(std), 8080(FP), and 443(SSL) either timeout without returning any
results, or error with some of the other attempts at illiciting a response that
we have tried (like specifying ssl:// prior to the hostname).

Code and two smaple outputs below. Thoughts?

Dave

<!-- begin socket.php -->
<?PHP
# get form submitted host
$host=$_POST['host'];
$portstring=array("Testing SSH:<br>\n","Testing TELNET:<br>\n","Testing
FTP:<br>\n","Testing HTTP:<br>\n","Testing HTTPS:<br>\n","Testing
SMTP:<br>\n","Testing POP3:<br>\n","Testing IMAP:<br>\n");
$portput=array("","","","GET / HTTP/1.1\r\nHost: $host\r\n\r\n","GET /
HTTP/1.1\r\nHost: $host\r\n\r\n","","","");
$portprepend=array("","","","tcp://","ssl://","","","");
$port=array(22,23,21,80,443,25,110,143);
for($i=0;$i<count($port);$i++){
        $result=date("H:i:s")."-";
        $fp = fsockopen($portprepend[$i].$host, $port[$i], $errno, $errstr,5);
        if (!$fp){
            $result=$portstring[$i]."&nbsp;&nbsp;&nbsp;Error($errno): $errstr<br>\n";
        }else{
        # see if we have to nudge for a response
            if(strlen($portput[$i]>0)){
                        fputs ($fp, $portput[$i]);
                }
        #       get the response
                $result.=$portstring[$i]."&nbsp;&nbsp;&nbsp;";
                $result.= fgets($fp,1024);
                fclose ($fp);
                $result.="<br>\n";
                $result=trim($result);
        }
        echo $result;
        flush;
}
?>
<!--  end  socket.php -->

<!-- begin sample output with "tcp://" for 80 and "ssl://" for 443 -->
12:20:13-Testing SSH:
   SSH-1.99-OpenSSH_3.5p1 FreeBSD-20030201
12:20:13-Testing TELNET:
   Error(61): Connection refused
12:20:13-Testing FTP:
   220 isp1.nexusinternetsolutions.net FTP server (Version 6.00LS) ready.
12:20:13-Testing HTTP:
   Error(0):
12:20:13-Testing HTTPS:
   Error(0):
12:20:13-Testing SMTP:
   220 isp1.nexusinternetsolutions.net ESMTP
12:20:13-Testing POP3:
   Error(61): Connection refused
12:20:13-Testing IMAP:
   Error(61): Connection refused
<!--  end  sample output with "tcp://" for 80 and "ssl://" for 443 -->

<!-- begin sample output with "" for 80 and "" for 443 -->
12:21:44-Testing SSH:
   SSH-1.99-OpenSSH_3.5p1 FreeBSD-20030201
12:21:44-Testing TELNET:
   Error(61): Connection refused
12:21:44-Testing FTP:
   220 isp1.nexusinternetsolutions.net FTP server (Version 6.00LS) ready.
12:21:44-Testing HTTP:

12:26:46-Testing HTTPS:

12:31:47-Testing SMTP:
   220 isp1.nexusinternetsolutions.net ESMTP
12:31:47-Testing POP3:
   Error(61): Connection refused
12:31:47-Testing IMAP:
   Error(61): Connection refused
<!--  end  sample output with "" for 80 and "" for 443 -->



--- End Message ---
--- Begin Message ---
It's the first time I use PHP as my project server-side language,
and I wanna know if PHP can be used to draw a chart or any other
suggestions. Thx



--- End Message ---
--- Begin Message ---
> It's the first time I use PHP as my project server-side language,
> and I wanna know if PHP can be used to draw a chart or any other
> suggestions. Thx

Yeah, PHP will do that.

I use JPGraph myself: http://www.aditus.nu/jpgraph/


-- 
Greg Donald
http://destiney.com/



--- End Message ---
--- Begin Message ---
I am using the following if statement ...

if (isset($theme)) {
  print("Current theme is $theme");
  require "content/header_$theme.php";
} else {
  print("$theme");
  require "content/header.php";
}

now one would think that if it didn't return true that the else
statement wouldn't print anything for $theme ... but it does. Also if I
use !isset it returns true with a null value for $theme ... This doesn't
make sense to me ... maybee I am doing something wrong, if I am someone
please correct me heh.

-- 
/*  BoBB
 *  AIM: Jodokast49 ICQ: 151495596
 *  Jabber: [EMAIL PROTECTED]
 *  http://knightsofchaos.com/~BoBB/new/
 *  I geek, therefor I am.
 */

--- End Message ---
--- Begin Message ---
On Mon, 7 Jul 2003 10:18:04 -0700, you wrote:

>if (isset($theme)) {
>  print("Current theme is $theme");
>  require "content/header_$theme.php";
>} else {
>  print("$theme");
>  require "content/header.php";
>}
>
>now one would think that if it didn't return true that the else
>statement wouldn't print anything for $theme ... but it does. Also if I

I would expect it to error (undefined variable theme). We need to know
what's being printed.

(BTW, to avoid the risk of calling an undefined variable, I tend to do
something like this at the top of the script:

if (!isset($theme)) {
    $theme = "";
}

and this later on:

reguire ("content/header$theme.php");


--- End Message ---
--- Begin Message ---
>The problem I am facing is that my Index page can be an HTML page only..
>not PHP. I cant use framesets, redirects etcetera.  I want to build my
>own Counter using PHP & mySQL Database.. with the "Users Online" and
>"Total Hits" feature.  How can I increment the counter or affect a PHP
>code using HTML.. is there someway I can achieve this? To be able to show
>the php counter on my HTML page.. ?

If your webserver is Apache, use SSI -
http://httpd.apache.org/docs/howto/ssi.html

---------------------------------------------------------------------
michal migurski- contact info and pgp key:
sf/ca            http://mike.teczno.com/contact.html


--- End Message ---
--- Begin Message ---
While documenting I just wrote for a client, I noted that there were several 
server variables (in the form of php.ini configuration settings) that might 
come into play that were generally the responsibility of the web master of 
the server, and thus beyond my control.

These were memory_limit, max_input_time, and max_execution_time.

According to http://www.php.net/function.ini-set , any item with the value 
"PHP_INI_ALL" in the "changeable" column should be abe to be set in any of 
the described methods in PHP. (Configuration file, .htaccess file, or through 
ini_set()/ini_alter().) 

One of the user contributed notes seems to contradict this information saying 
that "directives with PHP_INI_PERDIR or PHP_INI_ALL" may only be set in 
.htaccss files. (And I presume the php.ini file as well.) Both memory_limit 
and max_execution_time are listed as PHP_INI_ALL, but max_input_time isn't 
even listed on the page.

These discrepencies need to be remedied obviously, but it gets stranger still 
for me. Just to verify that these are not changeable in my script, I added a 
few calls to ini_set() to do some testing. Here is the relevant snippet:

$output=ini_set("max_input_time","120");
if ($output!=false) {
        $output=ini_get("max_input_time");
        echo "<!-- new input time: $output -->\n";
} else
        echo "<!-- problem setting max input time -->\n";

$output=ini_set("max_execution_time","120");
if ($output!=false) {
        $output=ini_get("max_execution_time");
        echo "<!-- new execution time: $output -->\n";
} else
        echo "<!-- problem setting max execution time -->\n";

$output=ini_set("memory_limit","12M");
if ($output!=false) {
        $output=ini_get("memory_limit");
        echo "<!-- new memory limit: $output -->\n";
} else
        echo "<!-- problem setting memory limit -->\n";


And here are the results from the page source:

<!-- problem setting max input time -->
<!-- new execution time: 120 -->
<!-- problem setting memory limit -->


So what this tells me is that it is possible to change the execution time 
from with-in the page, but it is not possible to change the input time or the 
memory limit. This wouldn't bother me except that both memory_limit and 
max_execution_time are supposed to be changeable in the same places. 
max_input_time might be as well, but I didn't see any documentation on it. So 
what gives?

On a little further testing, I wasn't even able to get a return value for 
memory_limit with ini_get()... Am I seeing some bizarre behavior that might 
be specific to my OpenBSD/Apache server? (In short, will this work properly 
on the Red Hat Linux/Apache installation that this script will be placed on?) 
Or is this a known bug in PHP 4.3.1? (As I seem to have no problem with a few 
other ini_get() calls.) Or is this behavior just as strange to all of you?

Thanks,
Raymond
-- 
Raymond C. Rodgers
http://bbnk.dhs.org/~rrodgers/
http://www.j-a-n.net/


--- End Message ---
--- Begin Message ---
hi...
i have this secuence to insert data to my db

mysql_query
("INSERT INTO my_table(
 number,name,surname
)
 values ('$number','$name','$surname'
)");

i want to ask what do i have to do if i want to modify instead of insert
when this data already exists...
 for example.. i have in my_table
number name surname
1            jhon smith

and i want to change the name...jhon --> john

and if that not exist create it...
number name surname
0          mary   duke
1          charles emmerson

and add john's one.. ( to check if i can use only modify to add )

thnx!..



--- End Message ---
--- Begin Message ---

use UPDATE

Also, be sure to learn basic SQL before use:

http://www.w3schools.com/sql/
http://www.sqlcourse.com/
http://www.onlamp.com/pub/ct/19

Regards,
Philip


On Sun, 6 Jul 2003, Kevin Fradkin wrote:

> hi...
> i have this secuence to insert data to my db
> 
> mysql_query
> ("INSERT INTO my_table(
>  number,name,surname
> )
>  values ('$number','$name','$surname'
> )");
> 
> i want to ask what do i have to do if i want to modify instead of insert
> when this data already exists...
>  for example.. i have in my_table
> number name surname
> 1            jhon smith
> 
> and i want to change the name...jhon --> john
> 
> and if that not exist create it...
> number name surname
> 0          mary   duke
> 1          charles emmerson
> 
> and add john's one.. ( to check if i can use only modify to add )
> 
> thnx!..
> 
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 


--- End Message ---
--- Begin Message ---
Start with a good tutorial on PHP and MySQL - there are scads of them around, and Julie Meloni has some excellent examples at www.thickbook.com.


At 04:41 PM 7/6/2003 -0300, Kevin Fradkin wrote:
hi...
i have this secuence to insert data to my db

mysql_query
("INSERT INTO my_table(
 number,name,surname
)
 values ('$number','$name','$surname'
)");

i want to ask what do i have to do if i want to modify instead of insert
when this data already exists...
 for example.. i have in my_table
number name surname
1            jhon smith

and i want to change the name...jhon --> john

Use a SELECT query to find if it exists (mysql_numrows() - check sp.)
then issue an UPDATE query to change it, making certain you have a unique key to identify the record.
otherwise, use your INSERT query.


This stuff isn't magic - you have to do a bit of work to get the desired results.


and if that not exist create it...
number name surname
0          mary   duke
1          charles emmerson

and add john's one.. ( to check if i can use only modify to add )

thnx!..



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


--- End Message ---
--- Begin Message ---
Hello.

I'll try wording my question more succinctly in the hopes of getting a response from 
some kind soul.

I'm trying to do a SSL post to a particular secure server, but all methods are failing 
to connect.
curl gives an error 6 = "Couldn't resolve host", and fsockopen (using the 
OpenSSL-dependent ssl://
method) fails with the following warnings in the error log:

   "PHP Warning:  fsockopen(): unable to connect to [secure.host.name]:443
    PHP Warning:  fsockopen(): php_network_getaddresses: getaddrinfo failed: no 
address associated
with name (is your IPV6 configuration correct? If this error happens all the time, try 
reconfiguring
PHP using --disable-ipv6 option to configure)"

(I've tried reconfiguring php with "--disable-ipv6" and reinstalling, but I continue 
to get the same
message).

What could be causing this?  Any and all insights welcome!

(Platform Info, btw...
OpenBSD 2.9, PHP 4.3.2, Apache 1.3.27, ModSSL 2.8.14, OpenSSL 0.9.6, curl 7.9.8 -- 
I've installed
curl 7.10.5, but PHP configure refuses to see it even when I specify the path,
"--with-curl=/usr/local/curl" -- it uses the default 7.9.8 install in /usr/local no 
matter what I
do.)

Thanks in advance...
Alex
- - - - - - - - - -
af at ax-im dot com

--- End Message ---
--- Begin Message ---
Hi all,
I am getting crazy, can't understand what i missed!
Does anybody know?

$champs = array ("titre_art" => "h3" ,"nom" => "bleu", "prenom" => "green",
"resume" => "bold");

foreach($champs as $key => $value) {


    echo "<td class='$value'>$row($key))</td>";
             }

TIA.
            zeg

--- End Message ---

Reply via email to