php-windows Digest 23 Jun 2002 09:08:50 -0000 Issue 1207
Topics (messages 14346 through 14352):
Re: Mysql socket error :\
14346 by: Peter
Newbye question
14347 by: Saci
14348 by: Matthew Hillebrand
14350 by: Brian Graham
14351 by: Saci
14352 by: Christian Leberfinger
PHP Windows / FreeBSD the Turtle and Rabbit
14349 by: Saci
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 ---
is mysql running on port 10106? I run mine on the default port but I don't
think it was that one!
Have a look in the configuration files.
"Marco Lanini" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hi,
> i have a little big problem with my configuration.
>
> I have:
> Windows XP Home
> Mysql 4.0.1 alpha
> Php 4.1.2
> Abyss Web Server (Freeware) www.apelium.com
>
> the problem is:
>
> when my script goes to connect with mysql
>
> Warning: Can't create TCP/IP socket (10106) in provamysql.php on line 3
>
> Warning: MySQL Connection Failed: Can't create TCP/IP socket (10106) in
> provamysql.php on line 3
> Can't create TCP/IP socket (10106)
>
> the code of my simple script is
>
> <?php
>
> mysql_connect("127.0.0.1","root","admin") or die(mysql_error());
> print("connected!!!");
>
> ?>
>
> i have make a lot of tests...
>
> 127.0.0.1
> localhost
> webserver (network pc name)
>
> thanks to all.
>
> PS: sorry for my english, but i'm italian.
>
>
--- End Message ---
--- Begin Message ---
I installed php 4.2.1 on windows XP using the PHP 4.2.1 installer [897Kb] -
13 May 2002
Apparently php is working since the classic hello word from php is running,
but I have some problems with variables
I have the following php code, who runs perfectly on my isp, but give a
message error on my machine who use windows xp the message are
Notice: Undefined variable: texto in
d:\inetpub\wwwroot\souio\php\teste03.php on line 5
I'm sure the code is correct because they run on my ISP (W2000) without any
problem
what is wrong witch my installation?
The code are
<html>
<head><title>Learning PHP</title></head>
<body>
<?php
if ($texto != "")
echo "You typed \"$texto\"<br><br>";
?>
<form method=post action="<? echo $PATH_INFO; ?>">
<input type="text" name="texto" value="" size=10>
<br>
<input type="submit" name="sub" value="Enviar!">
</form>
</body>
</html>
--- End Message ---
--- Begin Message ---
I don't think this will solve your problem, but you probably meant to
write:
action="<?= $PHP_SELF ?>"
I've never heard of a predefined variable named $PATH_INFO...
|-----Original Message-----
|From: Saci [mailto:[EMAIL PROTECTED]]
|Sent: Saturday, June 22, 2002 9:56 PM
|To: [EMAIL PROTECTED]
|Subject: [PHP-WIN] Newbye question
|
|
|I installed php 4.2.1 on windows XP using the PHP 4.2.1
|installer [897Kb] - 13 May 2002
|
|Apparently php is working since the classic hello word from
|php is running, but I have some problems with variables
|
|I have the following php code, who runs perfectly on my isp,
|but give a message error on my machine who use windows xp the
|message are
|
|Notice: Undefined variable: texto in
|d:\inetpub\wwwroot\souio\php\teste03.php on line 5
|
|I'm sure the code is correct because they run on my ISP
|(W2000) without any problem
|
|
|what is wrong witch my installation?
|
|
|
|The code are
|
|<html>
|<head><title>Learning PHP</title></head>
|<body>
|<?php
|if ($texto != "")
|echo "You typed \"$texto\"<br><br>";
|?>
|<form method=post action="<? echo $PATH_INFO; ?>">
|<input type="text" name="texto" value="" size=10>
|<br>
|<input type="submit" name="sub" value="Enviar!">
|</form>
|</body>
|</html>
|
|
|
|--
|PHP Windows Mailing List (http://www.php.net/)
|To unsubscribe, visit: http://www.php.net/unsub.php
|
|
--- End Message ---
--- Begin Message ---
I'm not a PHP expert, but I'm going to bet that since the error wasn't in
the code (it worked on your ISP), it's going to be in your configuration.
"Saci" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> I installed php 4.2.1 on windows XP using the PHP 4.2.1 installer
[897Kb] -
> 13 May 2002
>
> Apparently php is working since the classic hello word from php is
running,
> but I have some problems with variables
>
> I have the following php code, who runs perfectly on my isp, but give a
> message error on my machine who use windows xp the message are
>
> Notice: Undefined variable: texto in
> d:\inetpub\wwwroot\souio\php\teste03.php on line 5
>
> I'm sure the code is correct because they run on my ISP (W2000) without
any
> problem
>
>
> what is wrong witch my installation?
>
>
>
> The code are
>
> <html>
> <head><title>Learning PHP</title></head>
> <body>
> <?php
> if ($texto != "")
> echo "You typed \"$texto\"<br><br>";
> ?>
> <form method=post action="<? echo $PATH_INFO; ?>">
> <input type="text" name="texto" value="" size=10>
> <br>
> <input type="submit" name="sub" value="Enviar!">
> </form>
> </body>
> </html>
>
>
--- End Message ---
--- Begin Message ---
I told that on my email.
The question is : What is wrong ?
"Brian Graham" <[EMAIL PROTECTED]> escreveu na mensagem
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> I'm not a PHP expert, but I'm going to bet that since the error wasn't in
> the code (it worked on your ISP), it's going to be in your configuration.
>
>
--- End Message ---
--- Begin Message ---
1) action="<? echo $_SERVER['PHP_SELF']; ?>"
[works also, with register_globals=Off]
You can also leave the action-tag blank -
then the form always posts to itself!
2) $texto should be $_POST['texto']
[again the autoglobals...]
3) Correct code - I hope it helps you
<html>
<head>
<title>Learning PHP</title>
</head>
<body>
<?php
if (isset($_POST['texto']) AND $_POST['texto'] != "")
echo "You typed \"".$_POST['texto']."\"<br><br>";
?>
<form method=post action="">
<input type="text" name="texto" value="" size=10>
<br>
<input type="submit" name="sub" value="Enviar!">
</form>
</body>
</html>
Christian Leberfinger
> -----Original Message-----
> From: Saci [mailto:[EMAIL PROTECTED]]
> Sent: Sunday, June 23, 2002 6:56 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP-WIN] Newbye question
>
>
> I installed php 4.2.1 on windows XP using the PHP 4.2.1 installer
> [897Kb] -
> 13 May 2002
>
> Apparently php is working since the classic hello word from php
> is running,
> but I have some problems with variables
>
> I have the following php code, who runs perfectly on my isp, but give a
> message error on my machine who use windows xp the message are
>
> Notice: Undefined variable: texto in
> d:\inetpub\wwwroot\souio\php\teste03.php on line 5
>
> I'm sure the code is correct because they run on my ISP (W2000)
> without any
> problem
>
>
> what is wrong witch my installation?
>
>
>
> The code are
>
> <html>
> <head><title>Learning PHP</title></head>
> <body>
> <?php
> if ($texto != "")
> echo "You typed \"$texto\"<br><br>";
> ?>
> <form method=post action="<? echo $PATH_INFO; ?>">
> <input type="text" name="texto" value="" size=10>
> <br>
> <input type="submit" name="sub" value="Enviar!">
> </form>
> </body>
> </html>
>
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--- End Message ---
--- Begin Message ---
Take a look on the following links with the same code
http://www.internalnet.com.br/php/teste03.php PHP on Windows
http://66.39.125.73/php/teste03.php3 PHP on FreeBSD
The FreeBSD is quicker than windows about 10 times, is this case exception,
or Linux and UNIX systems are really 10 times faster than windows for PHP
use as a rule.
--- End Message ---