php-windows Digest 8 Jul 2002 19:47:02 -0000 Issue 1230
Topics (messages 14584 through 14603):
Re: playing with register globals ....
14584 by: toby z
14598 by: Dash McElroy
setlocal dont work
14585 by: Ingus
http Upload corrupts my files on winXP with Apache
14586 by: Mathias B
14589 by: Mathias B
ODBC on Windows XP
14587 by: Klaas Geldof
14588 by: Egil Helland
Re: PHP on IIS 5.0
14590 by: colin mcdonald
14592 by: Brian McGarvie
14593 by: colin mcdonald
Re: PHP Access violation
14591 by: colin mcdonald
Mcrypt Library on Windows 2000
14594 by: Conover, Ryan
Setting up a auto-incrementing id field in SQL Server
14595 by: R.S. Herhuth
14596 by: colin mcdonald
PHP 4.2.1 and DOTNET (C#)
14597 by: Thomas Weidner
snmpwalk
14599 by: MAAS
Form, reading parameters
14600 by: Jean Bresse
14601 by: colin mcdonald
MIB and snmp
14602 by: MAAS
track_vars and register_globals
14603 by: David Elliott
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 ---
& nother thing
i have to allow users to upload their files on MY
server ... :s
> plz pardon my ignorence
>
> i ve been working with php for the last 3 and a 1/2
> months and i turned my register globals ON when i
> started off initially knowing im risking security
>
> now i have to upload the site and i simply cannot
> risk
> security anymore
>
> what shall i do ????
>
> if i turn register globals OFF i guess ill have to
> change all my variables in ALLLLL the pages i ve
> made
> or will i ????
> and the count of the variables .... allah alone
> knows
>
> help me plz
>
> id appriciate any help on this
>
> thnx a million ....
>
> stuck as usual
> toby .....
>
>
> __________________________________________________
> Do You Yahoo!?
> Sign up for SBC Yahoo! Dial - First Month Free
> http://sbc.yahoo.com
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
__________________________________________________
Do You Yahoo!?
Sign up for SBC Yahoo! Dial - First Month Free
http://sbc.yahoo.com
--- End Message ---
--- Begin Message ---
Toby,
You may have some fun in this undertaking. If most of your variables are of
one type (i.e. POST, or GET) then your transition should be relatively easy.
You can't just do a mass replace though, as variables you set in the script
won't work if you make them $_POST['varname']. It gets a bit messier with
cookies and other stuff.
You may want to take a look at the user's comments on this page:
http://www.php.net/manual/en/security.registerglobals.php
There are some neat ideas on how to import variables easily and nice.
It's probably easier, from now on, to use the _GET, _POST, _ETC methods :)
Good luck!
-Dash
-----Original Message-----
From: toby z [mailto:[EMAIL PROTECTED]]
Sent: Sunday, July 07, 2002 10:53 PM
To: php hlp list
Subject: Re: [PHP-WIN] playing with register globals ....
& nother thing
i have to allow users to upload their files on MY
server ... :s
> plz pardon my ignorence
>
> i ve been working with php for the last 3 and a 1/2
> months and i turned my register globals ON when i
> started off initially knowing im risking security
>
> now i have to upload the site and i simply cannot
> risk
> security anymore
>
> what shall i do ????
>
> if i turn register globals OFF i guess ill have to
> change all my variables in ALLLLL the pages i ve
> made
> or will i ????
> and the count of the variables .... allah alone
> knows
>
> help me plz
>
> id appriciate any help on this
>
> thnx a million ....
>
> stuck as usual
> toby .....
>
>
> __________________________________________________
> Do You Yahoo!?
> Sign up for SBC Yahoo! Dial - First Month Free
> http://sbc.yahoo.com
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
__________________________________________________
Do You Yahoo!?
Sign up for SBC Yahoo! Dial - First Month Free
http://sbc.yahoo.com
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
I tried to set locale to Latvian ( setlocale(LC_ALL,'lv_LV'); ) it doesn’t
give anay erorr but when I trie to print date it is still in english, what
should I do??
--- End Message ---
--- Begin Message ---
Hello
I use: Apache 2.0.36 and PHP 4.2.1 on WinXP
I have major problems when trying to upload files with the following code:
HTML code:
<form name="theForm" method="post" action="../Doc_List/"
ENCTYPE="multipart/form-data">
<input type="file" name="data" size="25">
<input type="submit" name="Action" value="<? echo(__("Add")); ?>">
</form>
Going to the PHP handler:
if (is_uploaded_file($data))
{
$realname = $_FILES['data']['name'];
echo "data: $data
run:".move_uploaded_file($_FILES['data']['tmp_name'],
"c:\\windows\\temp\\php\\".$realname);
}
The program prints: data: C:\WINDOWS\TEMP\php19C.tmp run:1
Everything goes fine if it is just a small text file. And everything seems
to also go fine for larger binary files (e.g. a word document), the document
gets copied to the temp directory. The problem is just that the file gets
completely scrambled on the way. The file almost doubles in size and the
binary data is not the same at all. seems like there is put some kind of
formatting in on the way. (Looks like it gets alot of \0 instead of NULL
bytes everywhere like some others on this group and on php.net has
experienced, but i just can't get it solved...)
I have these set in the php.ini file
magic_quotes_gpc = Off
magic_quotes_runtime = Off
magic_quotes_sybase = Off
Please Help... :)
/Mathias Bertelsen
--- End Message ---
--- Begin Message ---
Hello again
My message below was labeled spam?!?!? So i should send it again i was
told... sorry for the inconvenience...
/Mathias
-----------original message ---------------
Hello
I use: Apache 2.0.36 and PHP 4.2.1 on WinXP
I have major problems when trying to upload files with the following code:
HTML code:
<form name="theForm" method="post" action="../Doc_List/"
ENCTYPE="multipart/form-data">
<input type="file" name="data" size="25">
<input type="submit" name="Action" value="<? echo(__("Add")); ?>">
</form>
Going to the PHP handler:
if (is_uploaded_file($data))
{
$realname = $_FILES['data']['name'];
echo "data: $data
run:".move_uploaded_file($_FILES['data']['tmp_name'],
"c:\\windows\\temp\\php\\".$realname);
}
The program prints: data: C:\WINDOWS\TEMP\php19C.tmp run:1
Everything goes fine if it is just a small text file. And everything seems
to also go fine for larger binary files (e.g. a word document), the document
gets copied to the temp directory. The problem is just that the file gets
completely scrambled on the way. The file almost doubles in size and the
binary data is not the same at all. seems like there is put some kind of
formatting in on the way. (Looks like it gets alot of \0 instead of NULL
bytes everywhere like some others on this group and on php.net has
experienced, but i just can't get it solved...)
I have these set in the php.ini file
magic_quotes_gpc = Off
magic_quotes_runtime = Off
magic_quotes_sybase = Off
Please Help... :)
/Mathias Bertelsen
--- End Message ---
--- Begin Message ---
Hi,
I always used PHP together with ODBC on Windows 98, but now I'm using
Windows XP.
I added to the ODBC sources the same stuff as before, but in PHP I always
get an error (can't connect to ODBC-server... name of datasource not
found...)!
Has someone got these problems? Is there a difference between ODBC in
Windows 98 and Windows XP?
Thanx,
Klaas
--- End Message ---
--- Begin Message ---
On Monday, July 8, 2002, at 11:45 AM, Klaas Geldof wrote:
> Hi,
>
> I always used PHP together with ODBC on Windows 98, but now I'm using
> Windows XP.
> I added to the ODBC sources the same stuff as before, but in PHP I
> always
> get an error (can't connect to ODBC-server... name of datasource not
> found...)!
> Has someone got these problems? Is there a difference between ODBC in
> Windows 98 and Windows XP?
Win98 uses only one type of ODBC sources, while in NT, W2k and XP its
differenced into user, system and file datasources. You need to set up a
system datasource if php is to see it.
-e
--
egil helland / it consultant (mcse, web technology)
web: ikon.as / egil.net
--- End Message ---
--- Begin Message ---
This is what I had to do:
-take out zend_optimizer from php.ini
-put process isolation level to "HIGH" (as Michael suggested)
-put IIS in the ISAPI filter list
-disable chaching of isapi applications
I hope this helps you and/or anyone else having this problem, because it
took me a long time to figure this out and stabilize our app on IIS.
colin
Alexandr Polupanov wrote:
> i'm using php4isapi.dll on a Windows 2000 Professional.
> When i'm running Server-Side PHP Scripts, all works fine, but when i'm
> running them more than approximately 50 times, PHP seems to stop working,
> and in my browser i get this:
> "PHP has encountered an Access Violation at 010125C0"
> or this too:
> "PHP has encountered an Access Violation at 0101290E"
> Then i need to restart IIS service, to get PHP work again.
>
> Do somebody knows what is the problem, and how to solve it?
> Thanks in advance.
--- End Message ---
--- Begin Message ---
I'm having a problem with PHP/IIS5.0 with the browser seems to just hang, at no
particular stage it seems fine and then it dies....
Is this related to below... I've tried running php as .exe/isapi but still happens...
> -----Original Message-----
> From: colin mcdonald [mailto:[EMAIL PROTECTED]]
> Sent: 08 July 2002 1:57 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP-WIN] Re: PHP on IIS 5.0
>
>
> This is what I had to do:
>
> -take out zend_optimizer from php.ini
> -put process isolation level to "HIGH" (as Michael suggested)
> -put IIS in the ISAPI filter list
> -disable chaching of isapi applications
>
> I hope this helps you and/or anyone else having this problem,
> because it
> took me a long time to figure this out and stabilize our app on IIS.
>
> colin
>
> Alexandr Polupanov wrote:
> > i'm using php4isapi.dll on a Windows 2000 Professional.
> > When i'm running Server-Side PHP Scripts, all works fine,
> but when i'm
> > running them more than approximately 50 times, PHP seems to
> stop working,
> > and in my browser i get this:
> > "PHP has encountered an Access Violation at 010125C0"
> > or this too:
> > "PHP has encountered an Access Violation at 0101290E"
> > Then i need to restart IIS service, to get PHP work again.
> >
> > Do somebody knows what is the problem, and how to solve it?
> > Thanks in advance.
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--- End Message ---
--- Begin Message ---
I haven't seen that, but it wouldn't suprise me. sorry.
Brian McGarvie wrote:
> I'm having a problem with PHP/IIS5.0 with the browser seems to just hang, at no
>particular stage it seems fine and then it dies....
>
> Is this related to below... I've tried running php as .exe/isapi but still happens...
>
>
>>-----Original Message-----
>>From: colin mcdonald [mailto:[EMAIL PROTECTED]]
>>Sent: 08 July 2002 1:57 PM
>>To: [EMAIL PROTECTED]
>>Subject: [PHP-WIN] Re: PHP on IIS 5.0
>>
>>
>>This is what I had to do:
>>
>>-take out zend_optimizer from php.ini
>>-put process isolation level to "HIGH" (as Michael suggested)
>>-put IIS in the ISAPI filter list
>>-disable chaching of isapi applications
>>
>>I hope this helps you and/or anyone else having this problem,
>>because it
>>took me a long time to figure this out and stabilize our app on IIS.
>>
>>colin
--- End Message ---
--- Begin Message ---
This is what I had to do:
-take out zend_optimizer from php.ini
-put process isolation level to "HIGH" (as Michael suggested)
-put IIS in the ISAPI filter list
-disable chaching of isapi applications
I hope this helps you and/or anyone else having this problem, because it
took me a long time to figure this out and stabilize our app on IIS.
colin
Alexandr Polupanov wrote:
> i'm using php4isapi.dll on a Windows 2000 Professional with IIS 5.0
> When i'm running Server-Side PHP Scripts, all works fine, but when i'm
> running them more than approximately 50 times, PHP seems to stop working,
> and in my browser i get this:
> "PHP has encountered an Access Violation at 010125C0"
> or this too:
> "PHP has encountered an Access Violation at 0101290E"
> Then i need to restart IIS service, to get PHP work again.
>
> Do somebody knows what is the problem, and how to solve it?
> Thanks in advance.
>
>
>
--- End Message ---
--- Begin Message ---
I was wondering if anyone successfully setup any of the mycrpt releases
correctly on windows 2000 with php 4.2.1?
Ryan Conover
[EMAIL PROTECTED]
[EMAIL PROTECTED]
http://www.pitt.edu/~rscst25/
--- End Message ---
--- Begin Message ---
I would like to create a auto incrementing id field in SQL Server 2000.
What data type should I use and what settings?
Thanks
--- End Message ---
--- Begin Message ---
lookup what it means to be an "identity column".
colin
R.S. Herhuth wrote:
> I would like to create a auto incrementing id field in SQL Server 2000.
> What data type should I use and what settings?
>
> Thanks
--- End Message ---
--- Begin Message ---
Hy...
Has anyone done a successfull connection between CSharp and PHP ?
It should be working with the function "dotnet_load()", but it gives me
always the error message "Fatal error: Call to undefined function:
dotnet_load() ".
php_info() says that the dotnet Modul is enabled.
The build is 4.2.1 and done by myself.
Can anybody help me to get the things workings ???
Thanks
Thomas Weidner
--- End Message ---
--- Begin Message ---
Hi
Iam trying to use snmpwalk but I get this:
Parse error: parse error, unexpected T_VARIABLE in
c:\inetpub\wwwroot\alarm.php on line 7
This Is my code:
<HTML>
<HEAD>
<TITLE>ALARM ???</TITLE>
<? php
$a = snmpwalk("192.168.10.8", "pub_likt", "1.3.6.1.2.1.1");
?>
</HEAD>
</HTML>
--- End Message ---
--- Begin Message ---
Hello:
Took my first dip into the world on php over the weekend and got stumped on
this:
I cannot read the value of a form parameter. Here is the code:
FORM:
<html>
<head>
<title>COP Server</title>
</head>
<body>
<form action="post1.php" method="post">
UserName: <input type="text" name="Username"><br>
<input type="submit" name="Submit" value="Submit">
</form>
</body>
</html>
POST1.PHP
<html>
<head>
<title>Listing 1</title>
</head>
<body>
<?php
print(" The user name is: {$Username}<br>" );
print(" The user name is: {$HTTP_POST_VARS['Username']}<br>" );
?>
</body>
</html>
$HTTP_POST_VARS['Username'] does work but $Username does not. Could it be
configuration related? (Installed Apache 1.3.21 with PHP 4.2.1 on Windows
2000 Server).
Your help is most appreciated!
Jean
--- End Message ---
--- Begin Message ---
try $_POST[''] instead of $HTTP_POST_VARS[''] this changed recently.
also, $username probably doesn't work because you have register_globals
turned off in your php.ini
colin
Jean Bresse wrote:
> Hello:
>
> Took my first dip into the world on php over the weekend and got stumped on
> this:
>
> I cannot read the value of a form parameter. Here is the code:
>
> FORM:
>
> <html>
> <head>
> <title>COP Server</title>
> </head>
> <body>
> <form action="post1.php" method="post">
> UserName: <input type="text" name="Username"><br>
> <input type="submit" name="Submit" value="Submit">
> </form>
> </body>
> </html>
>
>
> POST1.PHP
>
> <html>
> <head>
> <title>Listing 1</title>
> </head>
> <body>
> <?php
> print(" The user name is: {$Username}<br>" );
> print(" The user name is: {$HTTP_POST_VARS['Username']}<br>" );
> ?>
> </body>
> </html>
>
> $HTTP_POST_VARS['Username'] does work but $Username does not. Could it be
> configuration related? (Installed Apache 1.3.21 with PHP 4.2.1 on Windows
> 2000 Server).
>
> Your help is most appreciated!
>
> Jean
>
>
--- End Message ---
--- Begin Message ---
Iam trying to get some data on a php homepage. I get the data vith snmp msg.
I get som msg, but when I try to get a speciall object ID i get this:
ALARM 27 (port 52):
Warning: Error in packet. Reason: (noSuchName) There is no such variable
name in this MIB. in c:\inetpub\wwwroot\alarm.php on line 6
Warning: This name does not exist: enterprises.2606.1.0.47 in
c:\inetpub\wwwroot\alarm.php on line 6
ALARM 26 (port 50):
Warning: Error in packet. Reason: (noSuchName) There is no such variable
name in this MIB. in c:\inetpub\wwwroot\alarm.php on line 8
Warning: This name does not exist: enterprises.2606.1.0.46 in
c:\inetpub\wwwroot\alarm.php on line 8
Anyone what to do??
--- End Message ---
--- Begin Message ---
Hi all,
Ok So what am I doing wrong.
System WIN 2K with 4.2.1, track_vars is enabled and register_globals is
disabled.
I have two pages
page1.php
==========8<=============================================================
<?
session_start();
if (!session_is_registered('count'))
{
session_register('count');
$count = 1;
}
else
{
$count++;
}
?>
Hello visitor, you have seen this page <?= $count; ?> times.<p>
<?= session_id(); ?><br>
To continue, <A HREF="page2.php">click here</A>
==========8<=============================================================
and page2.php
==========8<=============================================================
<?
session_start();
if (!session_is_registered('count'))
{
session_register('count');
$count = 1;
}
else
{
$count++;
}
?>
Hello visitor, you have seen this page <?= $count; ?> times.<p>
<?= session_id(); ?><br>
To continue, <A HREF="page1.php">click here</A>
==========8<=============================================================
As you can see I want to do is save $count to use in the next page. I can
find the session file and it does contain what I would expect. It appears to
make no difference if session.use_cookies is set to '0' or '1'.
--
Thank you for your time, _______________________________________________
David | David Elliott | Software Engineer |
_________________________| [EMAIL PROTECTED] | PGP Key ID 0x650F4534 |
| Law is order, and good law is good order. - <Aristotle> |
--- End Message ---