php-windows Digest 20 Apr 2001 11:15:51 -0000 Issue 554

Topics (messages 6902 through 6916):

Re: dynamic pulldowns from DB
        6902 by: Paul Meagher
        6909 by: Tom Mathews

Re: PHP4 on Win problem (update).
        6903 by: GArlington
        6915 by: Phil Driscoll

Help on installing something
        6904 by: Manesh

Re: Php3
        6905 by: rjones
        6906 by: Frank M. Kromann

Re: While not working
        6907 by: MD
        6913 by: Johannes Janson

Re: Excel COM
        6908 by: MD

Re: file .htaccess
        6910 by: Matt Williams

Re: Select statement not working
        6911 by: Martin Kemp

Re: MSSQL text  fields truncation
        6912 by: Kelvin Luck

SNMP Extension
        6914 by: Ermanno Iannacci

Sendmail
        6916 by: Ben Cairns

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]


----------------------------------------------------------------------


Check out Leon Atkinson's Chained Selectors article at Zend.

http://www.zend.com/zend/tut/drop-down.php

Regards,
Paul Meagher

----- Original Message -----
From: "Robert Trembath" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Thursday, April 19, 2001 5:24 PM
Subject: [PHP-WIN] dynamic pulldowns from DB


> A little help from anyone please.
>
> I know this was discussed before but I can't find it now that I need it.
I
> want to dynamically populate a pulldown list from a mysql query based on
> what is selected from another pulldown list populated by a query from
mysql.
> If the first choice is changed a different list of option is populated in
> the second. Please help!
>
> Robert
>
>
> --
> 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]
>
>





Depends how neat you want it to be!
If you don't mind asking the user to hit a button for each selection, then treat
each list as a form with its own submit button. Set the submit action to update
the variable that you use for the select to create the next list down.
Note that if you do this you will have to put the sql queries in line in the
code!

The alternative that I use when I want a neater solution is to pass the php
variable to a javascript function which sets the next level variable and then
returns to the script, but this can be confusing if you're newish to php and/or
javascript.

Tom

Robert Trembath wrote:

> A little help from anyone please.
>
> I know this was discussed before but I can't find it now that I need it. I
> want to dynamically populate a pulldown list from a mysql query based on
> what is selected from another pulldown list populated by a query from mysql.
> If the first choice is changed a different list of option is populated in
> the second. Please help!
>
> Robert
>
> --
> 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]




Yes, everything is done according to install instructions.
I run php module on Apache, so there are only two lines I needed and they
appear in my httpd.conf exactly as in install guide,
I found that the pop-up was caused by file association, after I removed it
the pages display PHP source instead of executing it.
Any ideas here?
Thanks,
G.A.








>Yes, everything is done according to install instructions.
>I run php module on Apache, so there are only two lines I needed and they
>appear in my httpd.conf exactly as in install guide,
>I found that the pop-up was caused by file association, after I removed it
>the pages display PHP source instead of executing it.
>Any ideas here?

Just to check that you are accessing the php file via http://localhost
rather than file://localhost
and failing that, you'd better post the relevant lines of your httpd.conf
file.

Cheers
--
Phil Driscoll
Dial Solutions
+44 (0)113 294 5112
http://www.dialsolutions.com
http://www.dtonline.org







ok, i have mysql working, i need a really good tutorial for me newbie! like
exactly how to make a database and stuff like that!





You add it in the php.ini file. Look for the AddType section and add php3 to
the end of the line..

rwj
----- Original Message -----
From: "Manesh" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, April 19, 2001 7:23 AM
Subject: RE: [PHP-WIN] Php3


> where do i add that. I am IIS5 (i think, i have win2k)
>
> -----Original Message-----
> From: rjones [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, April 18, 2001 11:42 PM
> To: [EMAIL PROTECTED]
> Subject: Re: [PHP-WIN] Php3
>
>
> Manesh,
> Are you trying to run php version 3 or scripts with a php3 extension?
> If the latter you need to add php3 to your AddType application/x-httpd-php
> .phtml .php
>
> rwj
>
> ----- Original Message -----
> From: "Manesh" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Wednesday, April 18, 2001 9:33 PM
> Subject: [PHP-WIN] Php3
>
>
> > i have php4 and when i use .php its works, but php3 don't work
> >
> > plz help!
> >
> > --
> > 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]
>





That is not correct. Using IIS4 and IIS5 you have to add script mappings. You do this 
from the "Internet Service Manager". You find that under Administrative Tools.

When you right click on either The "compyter", "Default Web Site" or a directory you 
can select properties. Select "Home directory", "Directory"  or "Virtual Directory" 
and click Configuration. If the configuration button is disabled you have to click the 
create button first.

Click the add button and add the following settings:

Executable = c:\php3\php.exe %s %s
Extension = .php3
Enable Schript engine.

If you want the scripts parsed with php4 you add this instead:

Executable = c:\php4\php.exe
Extension = .php3
Enable Schript engine.

or If you prefer the ISAPI version

Executable = c:\php4\php4isapi.dll
Extension = .php3
Enable Schript engine.

You do not need to restart the server after these changes.

- Frank

> You add it in the php.ini file. Look for the AddType section and add php3 to
> the end of the line..
> 
> rwj
> ----- Original Message -----
> From: "Manesh" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Thursday, April 19, 2001 7:23 AM
> Subject: RE: [PHP-WIN] Php3
> 
> 
> > where do i add that. I am IIS5 (i think, i have win2k)
> >
> > -----Original Message-----
> > From: rjones [mailto:[EMAIL PROTECTED]]
> > Sent: Wednesday, April 18, 2001 11:42 PM
> > To: [EMAIL PROTECTED]
> > Subject: Re: [PHP-WIN] Php3
> >
> >
> > Manesh,
> > Are you trying to run php version 3 or scripts with a php3 extension?
> > If the latter you need to add php3 to your AddType application/x-httpd-php
> > .phtml .php
> >
> > rwj
> >
> > ----- Original Message -----
> > From: "Manesh" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Wednesday, April 18, 2001 9:33 PM
> > Subject: [PHP-WIN] Php3
> >
> >
> > > i have php4 and when i use .php its works, but php3 don't work
> > >
> > > plz help!
> > >
> > > --
> > > 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]
> >
> 
> 
> -- 
> 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]
> 
> 
> 







you have a colon instead of a semi colon. (:,;)

also, if u continue having problems, use mysql_fetch_row instead of
mysql_fetch_array

mike

""Danilo Meles"" <[EMAIL PROTECTED]> wrote in message
001801c0c8fd$3e9272c0$23cecac8@BLUE">news:001801c0c8fd$3e9272c0$23cecac8@BLUE...
> Hy There;
>
> I'm trying to get a string from one table in my db. I'm using while to get
> get this data. But it's not working:
>
> Please see the following code , In the while tag I'm trying to get the
> USER_ID from my table, but it returns zero instead.
> What I'm doing wrong???
>
> Thanks for a while !!
>
> Danilo Meles
>
> <?
> //conexão com o Banco
> include ("db.php");
> //Selecao do db
> mysql_select_db("$DB") or die("Db não encontrado");
> //Querys do programa
> $quser= "SELECT id_User, login, senha FROM user Where login ='$usuario'";
>
> $qinsuser = "insert into user (login, senha) values ('$usuario',
'$senha')";
>
> $qbaseuser = "INSERT INTO AddressUser (Id_AddUser, UrlUser, IndiceUser)
> SELECT Id_User, Url, Indice FROM address";
>
> $qveruser = "SELECT id_User, login, senha FROM user Where login =
> '$usuario'";
>
> $qupuser = "UPDATE AddressUser SET Id_AddUser = '$id' WHERE Id_AddUser
> ='5'";
>
> //verificação da caixa postal
> $mbox = @imap_open ("{paraisonet.com.br:143}INBOX", "$usuario", "$senha");
> if (!$mbox):
> echo "Ooopsss !!!<br><br> Por favor se você é assinante da ParaisoNet,
tente
> novamente. <br><br> Caso contrário clique aqui.";
> exit;
> endif;
> // pesquisa se usuario existe
> $queryuser = mysql_query("$quser")or die("a pesquisa de usuario falhou");
> $Num = mysql_num_rows($queryuser);
>  if (!$Num):
>  //inserção de novo usuario
>  $queryinsuser = mysql_query("$qinsuser")or die("a inserção falhou
falhou");
> // copia de registros de uma tabela para outra
>  $querybaseuser = mysql_query("$qbaseuser")or die("a inserçao da base
> falhou");
>
> // here is the while command. But the $id variable get zero (0) , and it
> should get the ID_USER from my db. What I'm doing wrong??
>  while ($dados = mysql_fetch_array($queryuser)):
>  $id = $dados[id_User];
>  endwhile;
>
>
>  // atualização do id do usuario
>  $queryupsuser = mysql_query("$qupuser")or die("A atualização falhou");
>  if ($queryupsuser):
>  echo "deu ceto";
>  echo "$id foda";
>  else:
>  echo "deu errado";
>  endif;
> else:
>  echo "usuario existente ";
> endif;
>
> ?>
>
>
> --
> 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,


> if (!$mbox):
> echo "Ooopsss !!!<br><br> Por favor se você é assinante da ParaisoNet,
tente
> novamente. <br><br> Caso contrário clique aqui.";
> exit;
> endif;
puuuh, this alternative syntax is not very readable.

> // here is the while command. But the $id variable get zero (0) , and it
> should get the ID_USER from my db. What I'm doing wrong??

is this numeric 0 or "nothing"?

Johannes








I have also had such errors when using COM objects in general. I have not
been able to pinpoint exactly the cause, but it seems that using any COM
object in invisible mode ( setting the visible property to fasle) will
increase your chances of failure. You also may find that you simply will not
have enough room for some com objects. I don't think it has so much to do
with size but something to do with the way windows manages resources. If you
find that it works once then fails, that it may not be properly releasing
its memory addressess. Make sure to dereference and unlink the COM objects
after use.

my best guesses...
 nothing more, nothing less

""Michael C"" <[EMAIL PROTECTED]> wrote in message
9blsvi$8vm$[EMAIL PROTECTED]">news:9blsvi$8vm$[EMAIL PROTECTED]...
> Ryan:
> Hey I am going to just say that I am curious myself now
> So that is why I am posting to this group
> Thanks
> Mike
>
>
>
>
>
>
> ""Conover, Ryan"" <[EMAIL PROTECTED]> wrote in message
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > I am trying to use the excel Com on a win2k/IIS5/php4.0.4pl1 with Office
> 2K
> > SR-1.  I keep getting the following error.
> >
> > Warning: Unable to obtain IDispatch interface for CLSID
> > {00020820-0000-0000-C000-000000000046}: Not enough storage is available
to
> > complete this operation. in c:\Inetpub\wwwroot/ComTest2.php on line 3
> >
> > Anyone know how to rectify this.
> >
> > Ryan Conover
> >
> >
> > --
> > 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]
>







> My site in on Unix server with PHP4.
> I need to insert in file .htaccess in the root this command for an include
> path:
>
> php_include_path      /directory
>
> Why this command don't work ? I've an internal server error ..

Try using
for php3

php_include_path "c:/directory"

for php4

php_value include_path "c:/directory"

HTH

M@





I've had almost exactly the same problem - in access the query returns all
the fields that should be there, but use that SQL string in a php script and
I only get a few (or none) of the results.

I am not where the erroneous source is at the moment - I'll post it to the
list when I get there, but it is perplexing because I'm using the same code
as I've used elsewhere, of the form:

$res = odbc_exec ($connect, $query);

while (odbc_next_field [[or whatever]] ($res)) {
        print (odbc_fetch ($res, "field"));
}

I've used this successfully in other situations, but I think the difference
here may be that it's accessing the mdb file through a shared drive. What's
even weirder is that I have a php script that I run standalone that queries
an access db through a shared drive and that works fine!

I am using php 4.0.4 (CGI) on win2k on IIS 5, so it doesn't seem to be an
apache problem.

I will send again when I have a better example of what I wrote.

Martin

> -----Original Message-----
> From: Nick Allen [mailto:[EMAIL PROTECTED]]
> Sent: 19 April 2001 1:13
> To: [EMAIL PROTECTED]
> Subject: Select statement not working
>
>
> Can't seem to troubleshoot this one...
>
> WinNT4.0
> PHP4.0.3 cgi
> Apache (latest)
>
> Code queries an Access database via ODBC and returns an empty dataset
> although there are definately records in there. Connection is fine - no
> errors and a valid connection handle is returned.
>
> echoing the query string to the page and then copying/pasting
> that directly
> into the sql edit section of the query builder in MSAccess works fine.
>
> Query is so simple it hurts:
>
> SELECT txtIntCategory FROM tblIntCategory;
>
> yet it returns *NOTHING*!!
>
> Identical Access query returns 8 string values.
>
> Any ideas or known bugs?
>
> TIA.
>
> Nick.
>
>
>
>





Hi,
Thanks for the responses, hit the nail right on the head. It works perfectly
now,
Cheers,
Kelvin.

-----Original Message-----
From: Flint Doungchak [mailto:[EMAIL PROTECTED]]
Sent: 19 April 2001 19:04
To: '[EMAIL PROTECTED]'; [EMAIL PROTECTED]
Subject: RE: [PHP-WIN] MSSQL text fields truncation


Kevin,

If you are using 4.0.4pl1 or recent version (4.0.x) of PHP, there is a
php.ini directive for MSSQL, for you to set this.

; Valid range 0 - 2147483647.  Default = 4096.
;mssql.textlimit = 4096

; Valid range 0 - 2147483647.  Default = 4096.
;mssql.textsize = 4096

Uncomment and set the directives as you wish. If you running 3.0.x I think
you're screwed. I'm not sure though. Frank will be able to answer this
better but I think one of his recent posting seemed to indicate that. I
never got it to work in 3.0.x.

Take care,

-Flint





I've got Apache and PHP on NT4. I'm getting errors from SNMP Extensions. The
Apache error.log says it couldn't find files like IF-MIB.txt etc.. These
files are in mibs folder. Why PHP can't see them?





I know this is a windows list, but....

I need to know how to configure Sendmail on a Redhat Linux machine to relay 
messages through another host.


-- Ben Cairns - Head Of Technical Operations
intasept.COM
Tel: 01332 365333
Fax: 01332 346010
E-Mail: [EMAIL PROTECTED]
Web: http://www.intasept.com

"MAKING sense of
the INFORMATION
TECHNOLOGY age
@ WORK......"



Reply via email to