php-windows Digest 16 Jan 2002 00:37:32 -0000 Issue 954
Topics (messages 11450 through 11462):
APACHE2 Module
11450 by: Bharath
Fatal Error : Allowed Memory Size Exhausted
11451 by: Lee Denny
11459 by: Nicole Amashta
Re: Please help a newbie -- have pity!
11452 by: brother
11456 by: Alain Samoun
11460 by: Nicole Amashta
IMAP Mail problem
11453 by: Alex Lis
IMAP PHP Problem
11454 by: Alex Lis
Re: sending an array through post
11455 by: Alex Lis
11461 by: Nicole Amashta
Re: cant read php.ini
11457 by: Adrian Kelland
Re: Unique id Number
11458 by: Nicole Amashta
Re: calling an ASP program or object from within php
11462 by: ST Ooi
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 ---
On WIN32....
php4apache.dll does not run as a apache2 module...
there is supposed to be a php4apache2.dll from www.php4win.com
LoadModule php4_module d:/Apache!/php/sapi/php4apache2.dll
on Apache/2.0.28 and Received an error
=====ERROR====
apache: module "C:\php4-build\php4\SAPI\APACHE2FILTER\sapi_apache2.c" is
not compatible with this version of Apache.
Please contact the vendor for the correct version.
===============
there is no such file on my C drive...
Please HELP
Bharath
bharath_b_lohray (at) yahoo.com
--- End Message ---
--- Begin Message ---
I'm getting the error
Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to
allocate 12288 bytes) in ../includes/resultheader.inc on line 16
The exact line of code does change - so its not syntax or semantics.
Can anyone enlighten me on what this means and what I'm doing wrong.
Cheers,
Lee
--- End Message ---
--- Begin Message ---
Check yoru php.ini for max memory allocated for your scripts. You can
control this through that file.
Check the following lines in your php.ini file:
<snip>
;;;;;;;;;;;;;;;;;;;
; Resource Limits ;
;;;;;;;;;;;;;;;;;;;
max_execution_time = 8000 ; Maximum execution time of each script, in
seconds
memory_limit = 8M ; Maximum amount of memory a script may consume (8MB)
</snip>
Good luck,
NIicole Amashta
www.aeontrek.com
=============================
"Lee Denny" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> I'm getting the error
>
> Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to
> allocate 12288 bytes) in ../includes/resultheader.inc on line 16
>
>
> The exact line of code does change - so its not syntax or semantics.
>
> Can anyone enlighten me on what this means and what I'm doing wrong.
>
> Cheers,
>
> Lee
>
>
--- End Message ---
--- Begin Message ---
Yes if you are using windows 2k/nt then IIS would be the easiest solution
for your needs, they can develop and se the chnages take place almost
imediatly.
/me
> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Sent: den 15 januari 2002 10:49
> To: Frank M. Kromann; tom
> Cc: [EMAIL PROTECTED]
> Subject: Rif: Re: [PHP-WIN] Please help a newbie -- have pity!
>
>
> Hi,
> I was asked to teach some students PHP.
> I want to know what they have to have and to do to run locally PHP.
> Microsoft IIS can for instance be installed on a machine that
> works at the same time as server or client? Can they have a
> single isolated machine and test and see their work?
> Thank you very much
> Antonio bernabei
>
> >
> > Da: "Frank M. Kromann" <[EMAIL PROTECTED]>
> > Data: 14/01/2002 19:07
> > A: tom <[EMAIL PROTECTED]>
> > cc: <[EMAIL PROTECTED]>
> > Oggetto: Re: [PHP-WIN] Please help a newbie -- have pity!
> >
> > Using the prowser to view a file on your file system will
> just show the content. The browser does not have any
> knowledge of the PHP parser.
> >
> > A web server on the other hand will be able to run the
> requested script through a parser an send the converted
> document (usually as html) to the browser fopr display.
> >
> > The binary version of PHP on Win32 works fine with IIS,
> Apache and other web servers available on that platform.
> >
> > - Frank
> >
> > > Can someone tell me how to use this php.exe file?? The
> docs are totally
> > > confusing.
> > >
> > > Okay - I run a rented unix server that supports php, no
> problem. But I want
> > > to test my site files offline on my win 2k machine.
> Online IE displays the
> > > php test files just fine, but offline it ignores the php
> content entirely. I
> > > want to browse to d:\test.php, for instance -- without
> using the w2k server
> > > stuff, just browse to file.
> > >
> > > I thought the php download of windows binaries was
> supposed to fix this, but
> > > I can't get it to do anything.
> > >
> > > Tom
> > >
> > >
> > >
> > >
> > > --
> > > 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]
> > >
> > >
> >
> >
> >
> >
> > --
> > 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]
> >
> >
>
>
> --
> 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]
>
--- End Message ---
--- Begin Message ---
Check:
http://www.phpbuilder.com/columns/moon19990716.php3
A+
Alain
On Tue, Jan 15, 2002 at 09:49:08AM +0100, [EMAIL PROTECTED] wrote:
> Hi,
> I was asked to teach some students PHP.
> I want to know what they have to have and to do to run locally PHP.
> Microsoft IIS can for instance be installed on a machine that works at the same time
>as server or client? Can they have a single isolated machine and test and see their
>work?
> Thank you very much
> Antonio bernabei
>
> >
> > Da: "Frank M. Kromann" <[EMAIL PROTECTED]>
> > Data: 14/01/2002 19:07
> > A: tom <[EMAIL PROTECTED]>
> > cc: <[EMAIL PROTECTED]>
> > Oggetto: Re: [PHP-WIN] Please help a newbie -- have pity!
> >
> > Using the prowser to view a file on your file system will just show the content.
>The browser does not have any knowledge of the PHP parser.
> >
> > A web server on the other hand will be able to run the requested script through a
>parser an send the converted document (usually as html) to the browser fopr display.
> >
> > The binary version of PHP on Win32 works fine with IIS, Apache and other web
>servers available on that platform.
> >
> > - Frank
> >
> > > Can someone tell me how to use this php.exe file?? The docs are totally
> > > confusing.
> > >
> > > Okay - I run a rented unix server that supports php, no problem. But I want
> > > to test my site files offline on my win 2k machine. Online IE displays the
> > > php test files just fine, but offline it ignores the php content entirely. I
> > > want to browse to d:\test.php, for instance -- without using the w2k server
> > > stuff, just browse to file.
> > >
> > > I thought the php download of windows binaries was supposed to fix this, but
> > > I can't get it to do anything.
> > >
> > > Tom
> > >
> > >
> > >
> > >
> > > --
> > > 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]
> > >
> > >
> >
> >
> >
> >
> > --
> > 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]
> >
> >
>
>
> --
> 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]
--- End Message ---
--- Begin Message ---
You actually have to make that run off the webserver. You can't just run the
script as d:\somescript.php. Has to be http://yoursever/somescript.php.
And make sure allow execution of scripts is checked off if you're using IIS
(or PWS).
Nicole Amashta
www.aeontrek.com
==================================
"Tom" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Can someone tell me how to use this php.exe file?? The docs are totally
> confusing.
>
> Okay - I run a rented unix server that supports php, no problem. But I
want
> to test my site files offline on my win 2k machine. Online IE displays the
> php test files just fine, but offline it ignores the php content entirely.
I
> want to browse to d:\test.php, for instance -- without using the w2k
server
> stuff, just browse to file.
>
> I thought the php download of windows binaries was supposed to fix this,
but
> I can't get it to do anything.
>
> Tom
>
>
>
--- End Message ---
--- Begin Message ---
Not actually IMPA, but POP3...
The following code :
<HTML><HEAD><TITLE>Mail</TITLE></HEAD><BODY BACKGROUND="" BGCOLOR="#ffffff"
TEXT="#000000" LINK="#0000ff" VLINK="#800080" ALINK="#ff0000">
<?
$mbox = imap_open("{localhost:110/pop3}INBOX", "keb", "gravy");
if ($hdr = imap_check($mbox)) {
$msgnum = $hdr->Nmsgs;
print("You have ".$msgnum." messages<br><br>\n");
}
else {
echo "failed";
}
if ($hdr = imap_headerinfo($mbox, 1)) {
$thissubject = $hdr->Subject;
print("$thissubject<br><br>\n");
}
else {
echo "failed";
}
imap_close($mbox);
?>
</BODY></HTML>
is producing this output :
CGI Error
The specified CGI application misbehaved by not returning a complete set of
HTTP headers. The headers it did return are:
Now, the first method (to print the number of messages) works fine when
there by itself. The header method though is screwing it up... why?!?!
, Alex
--- End Message ---
--- Begin Message ---
Not actually IMAP, but POP3...
The following code :
<HTML><HEAD><TITLE>Mail</TITLE></HEAD><BODY BACKGROUND="" BGCOLOR="#ffffff"
TEXT="#000000" LINK="#0000ff" VLINK="#800080" ALINK="#ff0000">
<?
$mbox = imap_open("{localhost:110/pop3}INBOX", "username", "password");
if ($hdr = imap_check($mbox)) {
$msgnum = $hdr->Nmsgs;
print("You have ".$msgnum." messages<br><br>\n");
}
else {
echo "failed";
}
if ($hdr = imap_headerinfo($mbox, 1)) {
$thissubject = $hdr->Subject;
print("$thissubject<br><br>\n");
}
else {
echo "failed";
}
imap_close($mbox);
?>
</BODY></HTML>
is producing this output :
CGI Error
The specified CGI application misbehaved by not returning a complete set of
HTTP headers. The headers it did return are:
Now, the first method (to print the number of messages) works fine when
there by itself. The header method though is screwing it up... why?!?!
, Alex
--- End Message ---
--- Begin Message ---
also, failing all else, use implode to concatenate the array into a string,
then pass it and explode it at the other end.
"Pac Mon" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> If they don't need to be visible include this form element in the form to
be
> submited:
> <input type='hidden' value='<? echo $myArray ?>'>
>
> >
> >Hello,
> >I need to send a lot of numbers with a form(post). How can I do that.
I've
> >tried just this:
> >
> ><input type="text" value="<?php $myArray ?>">
> >
> >But that won't work.
> >
> >How then?
> >polleke
>
>
> _________________________________________________________________
> MSN Photos is the easiest way to share and print your photos:
> http://photos.msn.com/support/worldwide.aspx
>
--- End Message ---
--- Begin Message ---
Do you want to set the field with the values from a PHP array? Or do you
want to retrieve back as an array values from a form?
If the first, you must walk through the array and print the values out;
If the latter, you can use a list box and assign it some name and include
brackets to make it an array when returned back to the php script.
Example:
<form action="somescript.php" method="post" >
<input type="checkbox" name="id[]" value="1">
<input type="checkbox" name="id[]" value="2">
.....
<input type="checkbox" name="id[]" value="n">
</form>
Then, once the php script is called, you can access the values checked off
and loop through the id[] array. Values checked on the form will be returned
in the array $id.
for($i=0; $i<count($id); $i++) {
echo $id[$i]; /// prints out the id's
}
Nicole Amashta
www.aeontrek.com
===================
"Polleke" <[EMAIL PROTECTED]> wrote in message
002101c19d38$43e030e0$7214643e@nieuwe">news:002101c19d38$43e030e0$7214643e@nieuwe...
Hello,
I need to send a lot of numbers with a form(post). How can I do that. I've
tried just this:
<input type="text" value="<?php $myArray ?>">
But that won't work.
How then?
polleke
--- End Message ---
--- Begin Message ---
There is no other php.ini on the machine. I have given full control
permissions to the IUSR_machinename to access the file. I wonder if it is
something about Terminal Server? The php.exe does not seem to read the
php.ini even if it is in the same directory
"Alain Samoun" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Use the Start/find to find if there is any other php.ini file somewhere.
> A+
> Alain
>
> On Mon, Jan 14, 2002 at 04:03:11PM -0000, Adrian Kelland wrote:
> > PHP is working fine on an NT4 Terminal Server except for mail functions.
I
> > have entered the correct settings in the php.ini file. These were tested
OK
> > in a script. The problems seems to be that the php.ini file is not being
> > read. phpinfo() expects it to be in c:\winnt, so I put it there instead
of
> > c:\wtsrv. Still no joy. Any ideas
> >
> >
> >
> > --
> > 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]
--- End Message ---
--- Begin Message ---
OK, here is how I interpreted your question. When you insert data into a
table, you want to get back it's newly created ID. All you need to do is,
after inserting the field, select back the id of that field where id is the
max(id) created (assuming you are using auto_incrementing ID field.)
For example, you just inserted the new user data:
insert into user (name,login,password,permissions) values ('Jane
Doe','jdoe','jane555', 125);
Now, you want to retrieve the ID of the newly inserted record. If you using
an automatically incrementing ID field, you can recall the ID by doing like
so:
select max(id) as id from user where login='jdoe';
This is not an exact; but considering you probably have a unique constraint
on the login field, there should be only ONE record with the login='jdoe'.
This is one way to do all this. If the data is such that it could exist
multiple times, you can consider other ways to pull back the ID. If you need
more examples, I can provide you with. I've done this many times in my web
apps.
Good Luck,
Nicole Amashta
www.aeontrek.com
==============================
"James Mansfield" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> OK...newbie question it must be:
> I want to add an entry into a db tb (using php obviously) and when its
added
> into the db its gets a sequencially numberred id....now can I retrieve
this
> id numbe rin the same php coded page as what I create the entry with? If
not
> what is the best way around it? Create a unique number for the entry
before
> adding it into db??
>
>
--- End Message ---
--- Begin Message ---
Do you need to call the ASP at the end of the PHP execution? Or at the
middle of
the PHP execution? I have been using both PHP for major HTML generation and
ASP to update Access database, but that's after PHP has been executed.
Thanks.
ST Ooi
Malaysia
----- Original Message -----
From: "Nicole Lallande" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, January 15, 2002 8:25 AM
Subject: [PHP-WIN] calling an ASP program or object from within php
> Greetings,
>
> Documentation searched through: book, search through newsgroup archive,
> php.net -- frankly having a tough time posing the question.
>
> I am new to php-windows and am clueless about ASP. I am having to
> create a code that will call an ASP script for the database
> connectivity. I need to pass a couple of variables to the asp program.
> I don't need any return - my job is done once I call the asp script.
> I know that php can call external programs by using 'exec' but I am not
> sure if a) that will work with asp and b) if that is the most
> effective/efficient way.
>
> I have the php4 bible which has the most windows info I have see in the
> literature and it discusses COM objects but not really calling a program.
>
> Please advise,
>
> TIA,
>
> Nicole
>
>
> --
> 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]
>
>
--- End Message ---