php-windows Digest 6 Jul 2001 02:39:23 -0000 Issue 638
Topics (messages 8125 through 8138):
PHP - MSSQL - IIS Size Question
8125 by: Joshua Butcher
8127 by: Ivan Milanez Castellanos
8133 by: Frank M. Kromann
Re: Is this possible?
8126 by: Carlos Andre Marques Moreira
8129 by: John Catron
8132 by: Jesse S. Williams
8134 by: Kataoka Masato
Re: Is this possible? --> Correction
8128 by: Carlos Andre Marques Moreira
php with .html extension in iis5
8130 by: abe wong
btw i'm running php 4.0.6
8131 by: abe wong
Problems installing PHP4.0.6 to work with Apache 1.3.20 for Win 2000
8135 by: Lee Seng Fook
PHP Hosting
8136 by: Max Graham
Newbie:Backend scripts
8137 by: PHPFAN
8138 by: Ruslan Ohitin
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]
----------------------------------------------------------------------
I am preparing a report for a database at my company that will be shown on
the web. It has several nested tables and such in it. One of the fields to
show is a blob field.
If the blob field is too long, IIS will hang, and not be able to render the
table. If the blob field is less than 2K it is fine. Sometimes it is
bigger.
If I remove the blob field from showing it always works fine, on every
record. If I put the blob field in, it will hang on certain records but not
all.
How can I increase IIS's or PHP's buffer size so that it will render the
entire page correctly everytime?
Joshua
Joshua: it appears to be a bug in MSSQL Server I've had the same problem
with text fields larger than 20 pages, I don't know how much this will help
you, but I migrated my entire database to MySQL and now it works fine it can
read text fields as large as 120 pages no problem, also I noticed that MSSQL
tends to truncate the text fields so that not all of the text you entered
gets inserted into your table.
Try migrating to MySQL I'll bet that it will make your DB and App work fine.
Iván.
-----Original Message-----
From: Joshua Butcher [mailto:[EMAIL PROTECTED]]
Sent: Jueves, 05 de Julio de 2001 09:37 a.m.
To: [EMAIL PROTECTED]
Subject: [PHP-WIN] PHP - MSSQL - IIS Size Question
I am preparing a report for a database at my company that will be shown on
the web. It has several nested tables and such in it. One of the fields to
show is a blob field.
If the blob field is too long, IIS will hang, and not be able to render the
table. If the blob field is less than 2K it is fine. Sometimes it is
bigger.
If I remove the blob field from showing it always works fine, on every
record. If I put the blob field in, it will hang on certain records but not
all.
How can I increase IIS's or PHP's buffer size so that it will render the
entire page correctly everytime?
Joshua
Migrating is not the only solution !
MSSQL uses a default truncation size of text fields. This size can be changed with
parameters in php.ini. The maximum size of a text fiels in MSSQL is 2GB. If you are
storeing a 2 GB Text field in the database and try to view it on a web page, the user
is most likely gone before the page is rendered. With a full T1 line it would take 4-5
min to download the file.
Binary data, can also be up to 2 GB in size so be carefull. I did make some changes to
the way binary data are handled between 4.0.5 and 4.0.6. If you are using an older
version of php, please update to the latest version.
- Frank
> Joshua: it appears to be a bug in MSSQL Server I've had the same problem
> with text fields larger than 20 pages, I don't know how much this will help
> you, but I migrated my entire database to MySQL and now it works fine it can
> read text fields as large as 120 pages no problem, also I noticed that MSSQL
> tends to truncate the text fields so that not all of the text you entered
> gets inserted into your table.
>
> Try migrating to MySQL I'll bet that it will make your DB and App work fine.
>
> Iván.
>
> -----Original Message-----
> From: Joshua Butcher [mailto:[EMAIL PROTECTED]]
> Sent: Jueves, 05 de Julio de 2001 09:37 a.m.
> To: [EMAIL PROTECTED]
> Subject: [PHP-WIN] PHP - MSSQL - IIS Size Question
>
>
> I am preparing a report for a database at my company that will be shown on
> the web. It has several nested tables and such in it. One of the fields to
> show is a blob field.
>
> If the blob field is too long, IIS will hang, and not be able to render the
> table. If the blob field is less than 2K it is fine. Sometimes it is
> bigger.
>
> If I remove the blob field from showing it always works fine, on every
> record. If I put the blob field in, it will hang on certain records but not
> all.
>
> How can I increase IIS's or PHP's buffer size so that it will render the
> entire page correctly everytime?
>
> Joshua
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>
>
1: To execute php code when a A HREF link is clicked.
One way to do this is:
// This will check what link was clicked
<?php
switch ($link){
case 1: // link 1 was clicked
// write your code here
break;
case 2: // link 2 was clicked
// write your code here break;
default: // First time entering the page, no link clicked
// write your code here
}
?>
// Here are the links
<a href=<?php echo $PHP_SELF."?$link=1"; ?>> link 1 </a>
<a href=<?php echo $PHP_SELF."?$link=2"; ?>> link 2 </a>
Carlos André Marques Moreira
[EMAIL PROTECTED]
Bolsista CNPq / RHAE
SENAI-CE/CETAE
2001 Ano Internacional do Voluntário
-----Original Message-----
From: Michel Laine [mailto:[EMAIL PROTECTED]]
Sent: quinta-feira, 5 de julho de 2001 11:34
To: [EMAIL PROTECTED]
Subject: Is this possible?
Using PHP 404pl1 / MySQL 3.23.35 / PWS / W98SE if anybody should need to
know...
The stuff is for an intranet application.
1: To execute php code when a A HREF link is clicked.
I have the need to change a session variable depending on which link (of
a couple) that is clicked. The link is supposed to call $PHP_SELF which
then change its output depending on the value of the session variable.
I know that i can solve it by letting the link call different php
scripts - which update the session variable and then call back to the
first page.
If there is another way ( javascript maybe?), i am interested to know
about it.
2: To have one undo step on a database update.
Do anybody know / seen any example / tutorial on how this kind of
function can be implemented?
Let me know!
I have read most of the stuff at Newbie network, PHPdeveloper,
PHPeverywhere, Zend, Devshed, Webmonkey and PHPbuilder - but i have
never come across anything like this.
--
Michel Laine
To answer quetion number 2:
Get the MySQL reference and look up COMMIT/ROLLBACK.
If you are using the default table type (MyISAM), then it does not
support COMMIT/ROLLBACK but it tells how to accomplish this using
locked tables!
John
--- Michel Laine <[EMAIL PROTECTED]> wrote:
> Using PHP 404pl1 / MySQL 3.23.35 / PWS / W98SE if anybody should need to
> know...
> The stuff is for an intranet application.
>
> 1: To execute php code when a A HREF link is clicked.
>
> I have the need to change a session variable depending on which link (of
> a couple) that is clicked. The link is supposed to call $PHP_SELF which
> then change its output depending on the value of the session variable.
> I know that i can solve it by letting the link call different php
> scripts - which update the session variable and then call back to the
> first page.
> If there is another way ( javascript maybe?), i am interested to know
> about it.
>
> 2: To have one undo step on a database update.
>
> Do anybody know / seen any example / tutorial on how this kind of
> function can be implemented?
> Let me know!
> I have read most of the stuff at Newbie network, PHPdeveloper,
> PHPeverywhere, Zend, Devshed, Webmonkey and PHPbuilder - but i have
> never come across anything like this.
>
> --
>
> Michel Laine
>
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
__________________________________________________
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail
http://personal.mail.yahoo.com/
You could also, for #2, simply record the changes to the database and allow
those commands to be recalled and reversed. So, say that someone queried:
INSERT INTO table_name (a1, b2, c3, d4) VALUES (joe, john, judy, jackie);
You could make an undo available as an include that can parse it as a regexp
and see that INSERT needs to be DROP and the (a1, b2, c3, d4) and (joe,
john, judy, jackie) need to be WHERE values, so it would parse it as:
DROP FROM table_name WHERE a1="joe" AND b2="john" AND c3="judy" AND
d4="jackie";
The best idea is to create an include file that can parse simple quireies
and create opposite queries to go with them using some CASE statements
probably. Hmmm, maybe this will be my next project. Hehehe!
It could even go to the point of having a setup where it logs $client as
$REMOTE_ADDR for internet or and internal user value for intranet stuff, so
that they can back out as many commands as they need to. The nice thing is
that you could back out accidental deletes the same way as long as the DROP
query contained ALL of the data (the way phpMyAdmin does it).
Perhaps the table could be accessed by an admin through a web interface even
to backout as many items as may need be.
Jesse Williams
System Administrator
DowNET VoIP Team
Electronic Data Systems
-----Original Message-----
From: Michel Laine [mailto:[EMAIL PROTECTED]]
Sent: Thursday, July 05, 2001 10:34 AM
To: [EMAIL PROTECTED]
Subject: [PHP-WIN] Is this possible?
Using PHP 404pl1 / MySQL 3.23.35 / PWS / W98SE if anybody should need to
know...
The stuff is for an intranet application.
1: To execute php code when a A HREF link is clicked.
I have the need to change a session variable depending on which link (of
a couple) that is clicked. The link is supposed to call $PHP_SELF which
then change its output depending on the value of the session variable.
I know that i can solve it by letting the link call different php
scripts - which update the session variable and then call back to the
first page.
If there is another way ( javascript maybe?), i am interested to know
about it.
2: To have one undo step on a database update.
Do anybody know / seen any example / tutorial on how this kind of
function can be implemented?
Let me know!
I have read most of the stuff at Newbie network, PHPdeveloper,
PHPeverywhere, Zend, Devshed, Webmonkey and PHPbuilder - but i have
never come across anything like this.
--
Michel Laine
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]
Hi,
>1: To execute php code when a A HREF link is clicked.
>
>I have the need to change a session variable depending on which link (of
>a couple) that is clicked. The link is supposed to call $PHP_SELF which
>then change its output depending on the value of the session variable.
>I know that i can solve it by letting the link call different php
>scripts - which update the session variable and then call back to the
>first page.
>If there is another way ( javascript maybe?), i am interested to know
>about it.
I think what you need to do is return HTTP status of 204 (No Content).
When the browser receives 204 response it will leave the
screen intact, i.e., to the user nothing seems to have happened
while in fact a request gets executed on the server.
The code looks like this:
<?
header("HTTP/1.0 204 No Content"); // when using ISAPI
//header("Status: 204 No Content"); // when using CGI
?>
Masato
_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
Someone show me this error on the code below
Someone showmed a error, then i'll sending it again.
1: To execute php code when a A HREF link is clicked.
One way to do this is:
// This will check what link was clicked
<?php
switch ($link){
case 1: // link 1 was clicked
// write your code here
break;
case 2: // link 2 was clicked
// write your code here break;
default: // First time entering the page, no link clicked
// write your code here
}
?>
// Here are the links
<a href=<?php echo $PHP_SELF."?link=1"; ?>> link 1 </a>
<a href=<?php echo $PHP_SELF."?link=2"; ?>> link 2 </a>
Instead of (this code has a mistake)
// Here are the links
<a href=<?php echo $PHP_SELF."?$link=1"; ?>> link 1 </a>
<a href=<?php echo $PHP_SELF."?$link=2"; ?>> link 2 </a>
-----Original Message-----
From: Carlos Andre Marques Moreira
Sent: quinta-feira, 5 de julho de 2001 12:03
To: 'Michel Laine'; [EMAIL PROTECTED]
Subject: RE: Is this possible?
1: To execute php code when a A HREF link is clicked.
One way to do this is:
// This will check what link was clicked
<?php
switch ($link){
case 1: // link 1 was clicked
// write your code here
break;
case 2: // link 2 was clicked
// write your code here break;
default: // First time entering the page, no link clicked
// write your code here
}
?>
// Here are the links
<a href=<?php echo $PHP_SELF."?$link=1"; ?>> link 1 </a>
<a href=<?php echo $PHP_SELF."?$link=2"; ?>> link 2 </a>
Carlos André Marques Moreira
[EMAIL PROTECTED]
Bolsista CNPq / RHAE
SENAI-CE/CETAE
2001 Ano Internacional do Voluntário
-----Original Message-----
From: Michel Laine [mailto:[EMAIL PROTECTED]]
Sent: quinta-feira, 5 de julho de 2001 11:34
To: [EMAIL PROTECTED]
Subject: Is this possible?
Using PHP 404pl1 / MySQL 3.23.35 / PWS / W98SE if anybody should need to
know...
The stuff is for an intranet application.
1: To execute php code when a A HREF link is clicked.
I have the need to change a session variable depending on which link (of
a couple) that is clicked. The link is supposed to call $PHP_SELF which
then change its output depending on the value of the session variable.
I know that i can solve it by letting the link call different php
scripts - which update the session variable and then call back to the
first page.
If there is another way ( javascript maybe?), i am interested to know
about it.
2: To have one undo step on a database update.
Do anybody know / seen any example / tutorial on how this kind of
function can be implemented?
Let me know!
I have read most of the stuff at Newbie network, PHPdeveloper,
PHPeverywhere, Zend, Devshed, Webmonkey and PHPbuilder - but i have
never come across anything like this.
--
Michel Laine
i tried to make .html files run php with limited success (i have to...i'm
migrating from a unix server with a ton of .html php files)... i set the
isapi application mapping (i'm running php as an isapi extension), and yet
i'm getting totally inconsistent results... sometimes, on rare occasion, it
works. most other times, the screen's blank, but a view source shows ascii
gibberish. the rest of the time, php doesn't work and the files are shown
without any processing.
help would be greatly appreciated.
thanks.
-abe wong
Hi,
I am new to PHP. I have just downloaded PHP 4.0.6 and Apache 1.3.20
I followed the online documentation to get PHP in CGI-mode to run on Apache,
i added the following lines in my httpd.conf file as follows.
ScriptAlias /php/ "c:/php/"
AddType application/x-httpd-php .php
AddType application/x-httpd-php .phtml
Action application/x-httpd-php "/php/php.exe"
But this is my first php script "hello.php" which i put in c:\php directory
<html>
<head>
<title>PHP Testing</title>
</head>
<body bgcolor=#ffffff>
<?php echo "Hello World<p>"; ?>
</body>
</html>
But Apache couldn't process this hello.php... it gave me this error.
[Fri Jul 06 06:35:08 2001] [error] [client 127.0.0.1] c:/php/hello.php is
not executable; ensure interpreted scripts have "#!" first line
[Fri Jul 06 06:35:08 2001] [error] [client 127.0.0.1] couldn't spawn child
process: c:/php/hello.php
Can someone tell me where did I go wrong?
Appreciate your help. Many thanks.
--
:-)
Lee
Not quite free, but damn close ... anyone heard anything about this hosting service?
http://www.ucvhost.com/index.htm
Hi,
I am using php4 with mssql backend loaded on windows 2000.
Here is my problem:
I want to update my database contents every 2 hours with some sql
statements.
Is there anyway I can write scripts in php and run them every 2 hours?
Anyother solutions are most welcome.
Thank You,
Sagil.
Hi,
Try to use a scheduler to run command
php.exe -q x:\path\to\your\script.php
every 2 hours. (-q - do not output HTTP headers)
P> Hi,
P> I am using php4 with mssql backend loaded on windows 2000.
P> Here is my problem:
P> I want to update my database contents every 2 hours with some sql
P> statements.
P> Is there anyway I can write scripts in php and run them every 2 hours?
P> Anyother solutions are most welcome.
P> Thank You,
P> Sagil.
--
Best regards,
Ruslan Ohitin
mailto:[EMAIL PROTECTED]