php-windows Digest 11 Oct 2002 06:33:53 -0000 Issue 1382

Topics (messages 16325 through 16330):

fwrite is adding blank lines
        16325 by: benjamin delman

slow form / server problem
        16326 by: Omar Campos
        16327 by: Jim Hunter

Re: passing variables part 2
        16328 by: Cam Dunstan

Security and File System Access
        16329 by: David P Lenk

Re: works on one server and not another
        16330 by: Uttam

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 ---
attached is a script i wrote to open a file, display it's contents in a
textarea, then submit to a different case where the file is re-written.

what i notice is that when there is a blank line, after re-writing that
blank line gets doubled. so there are now two blank lines where there was
one. why is this? anyone know how to prevent this from happening?

many thanks for you help.

benjamin


begin 666 portal_edit.php
M/&AT;6P^#0H\:&5A9#X-"@D\;&EN:R!R96P](G-T>6QE<VAE970B('1Y<&4]
M(G1E>'0O8W-S(B!H<F5F/2(O8W-S+VAE861L:6YE7V%D;6EN+F-S<R(@+SX-
M"CPO:&5A9#X-"CQB;V1Y/@T*#0H\/PT*#0HO*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ
M*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*B\-"B\J($9I;&5N
M86UE.B!P;W)T86Q?961I="YP:' )"0D)"0D)*B\-"B\J"0D)"0D)"0D)"0D)
M"2HO#0HO*B!!=71H;W(Z($)E;FIA;6EN($1E;&UA;@D)"0D)"0D)*B\-"B\J
M"0D)"0D)"0D)"0D)"2HO#0HO*B!$97-C<FEP=&EO;CH@"0D)"0D)"0D)( DJ
M+PT*+RH@(" @5&AI<R!A<'!L:6-A=&EO;B!I<R!U<V5D('1O(&5D:70@=&AE
M($EN9F]S>7,)"0DJ+PT*+RH)<&]R=&%L('!A;F5L(&EN8VQU9&4@9FEL92X)
M"0D)"0D)*B\-"B\J"0D)"0D)"0D)"0D)"2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E('9A;'5E/21F:6QE7VYA;64^(BD[#0H)"65C
M:&\H(CQT97AT87)E82!C;VQS/3$P,"!R;W=S/3,U('=R87 ];V9F(&YA;64]
M:6YC;'5D969I;&4^(BD[#0H-"@D)9F]R("@D=" ](# [("1T(#P@8V]U;G0H
M)&9I;&5S7V%R<F%Y*3L@)'0K*RE[#0H)"0EE8VAO*"(D9FEL97-?87)R87E;
M)'1=(BD[#0H)"7T-"@T*"0EE8VAO*"(\+W1E>'1A<F5A/CQB<CX\:6YP=70@
M='EP93US=6)M:70@=F%L=64]<V%V93X\+V9O<FT^(BD[#0H)"65C:&\H(CPO
M=&0^/"]T<CX\+W1A8FQE/B(I.PT*#0H)"6)R96%K.PT*?0T*+RHJ*BHJ*BHJ
M*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHO
M#0HO*@D)"0E%3D0@4U=)5$-(("=#05-%)PD)"0D)*B\-"B\J*BHJ*BHJ*BHJ
M*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ+PT*
$#0H_/@``
`
end

--- End Message ---
--- Begin Message ---
Hi. I run php in win2k server, IIS and MS SQL Server 2k.
I've created some data bases and tables. On the beginning, sending a php
form (through the intranet) was quick. Now, it spends 32 seconds (sometimes
less) to send a form.
I've tried on a empty data base but it's still slow. I donīt have a clue
about what could it be?
Maybe the HDD of the server, maybe the SQL Server....
Could you help me.

Thank you so much.


--- End Message ---
--- Begin Message ---
My first suggestion is to shut down the server then start it back up to see
if the problem goes away. If it did, then some piece of software you are
running has a memory leak or is consuming memory without releasing it back
to the OS and it is choking your throughput (I get this from time to time).
If that does not work, then start from the ground up and test to see where
the problem is. Create a static HTML page, no PHP, and see how fast it loads
 Then add some standard PHP calls, no database, and see how fast that loads.
Last, start adding database calls and see if it is the database in general
or some specific SQL call you are making that is slowing it down. Always
remember when troubleshooting, take small steps, otherwise you may not know
what you did to fix or create a problem. Once you know what is causing the
problem, then you can try to fix it, but you must first locate the cause of
the problem.
 
Jim

 
-------Original Message-------
 
From: Omar Campos
Date: Thursday, October 10, 2002 02:49:48 PM
To: [EMAIL PROTECTED]
Subject: [PHP-WIN] slow form / server problem
 
Hi. I run php in win2k server, IIS and MS SQL Server 2k.
I've created some data bases and tables. On the beginning, sending a php
form (through the intranet) was quick. Now, it spends 32 seconds (sometimes
less) to send a form.
I've tried on a empty data base but it's still slow. I donīt have a clue
about what could it be?
Maybe the HDD of the server, maybe the SQL Server....
Could you help me.

Thank you so much.



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

. 
--- End Message ---
--- Begin Message ---
db -
a small word of caution on using the ampersand to send variables within the
URL - it works just like Dash said it would but don`t try and send huge
lumps of data this way - there are limits (possibly a couple of hundred
bytes or so) to the length of the URL allowed.   Limits you wouldn`t have
run into when POSTING data from a form for example.

cheers all



--- End Message ---
--- Begin Message ---
I am planning to implement PHP under Deefield Website Pro 3.1 (not visnetic
3.5x).

We have read through some of the documentation of the PHP.NET site and found
that PHP allows direct filesystem access based on the rights of your
webserver.  We feel that it would be a good ideal to disalow the use of such
file deletion commands and the ability to upload files via http.  we already
have the latter figured out because it was configurable directly through the
PHP.ini file.  However access to the enabling and disabling of other
commands didnt seem so obvious!

Where should I look for resources related to locking down the security of
PHP?  In particular can I specify directories that PHP will allow scripts to
execute?  For instance can i specify that d:\domains\domain1 can have access
but not d:\domains\domain2 ?  This sure would be an awesome feature if there
is such a feature.

Thanks,
David P Lenk
Systems Engeneer
Net-Venture, Inc


--- End Message ---
--- Begin Message ---
1. is mysql server on both the machines (localhost)?
2.mysql gives access permission based on username@machinenameORipaddress,
are your sure the user name you are giving has insert permission on the
table specified?
2. hope in both the machine php is configured to understand '<? ?>' as php
code delimiter
    (and not <?php ?>, depending open 'short_open_tag' setting in php.ini)


regds,
-----Original Message-----
From: Tim Blackwell [mailto:[EMAIL PROTECTED]]
Sent: Thursday, October 10, 2002 00:53
To: [EMAIL PROTECTED]
Subject: works on one server and not another


this works on a windows XP machine i have but when i put it on a
w2kserver
it doesn't work?


<html>

<body>

<?

  @ $db = mysql_pconnect("localhost", "", "");

   mysql_select_db("database_name");
   $query = "insert into table_name values ('".$name."')";
   $result = mysql_query($query);

?>

</body>
</html>



--- End Message ---

Reply via email to