php-windows Digest 1 May 2002 07:18:50 -0000 Issue 1121

Topics (messages 13424 through 13449):

Re: executing an external program
        13424 by: Scott Hurring

Problem sending variables with an browser
        13425 by: Waldemar Brand Neto
        13426 by: Dash McElroy
        13429 by: Scott Hurring
        13431 by: Waldemar Brand Neto
        13432 by: Scott Hurring

Cant get PHP to run on Win 98
        13427 by: Jeff Britts
        13434 by: Matt Parlane
        13438 by: Ross Fleming

Re: Need help with functions
        13428 by: Scott Hurring

Re: i'm stuck guys
        13430 by: Scott Hurring

USER_AGENT wrong thanks to proxy cache! Help!
        13433 by: Roderick Martin

Php on windows - Linux and Windows Editors
        13435 by: Sukhwinder Singh

php.ini setting, need some info
        13436 by: Matt Babineau
        13441 by: Mike Flynn

Re: Access databse
        13437 by: Cam

Please help PHP 4.2 on A 2.0 under WinXP
        13439 by: news \(mp\)

Undefined Variables?!
        13440 by: steven
        13442 by: Mike Flynn
        13444 by: Mike Flynn

Re: setting php variables from the client side
        13443 by: steven

Carriage Return and Line Feed
        13445 by: Matt Babineau

PHP generation of <select> fields
        13446 by: Dash McElroy
        13449 by: Kriegers Horst

Building a .dll extension using Cygwin?
        13447 by: Jon Baer

php won't "process" forms anymore
        13448 by: Erik

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 ---
Also, try system() if you want to see the output
of the called program (http://php.net/system)

PS: The online help system is your friend.  :)

---
Scott Hurring
Systems Programmer
EAC Corporation
[EMAIL PROTECTED]
Voice: 201-462-2149
Fax: 201-288-1515

> -----Original Message-----
> From: Mike Flynn [mailto:[EMAIL PROTECTED]]
> Sent: Saturday, April 27, 2002 4:48 PM
> To: Rainer Bruch; [EMAIL PROTECTED]
> Subject: Re: [PHP-WIN] executing an external program
> 
> 
> Some things to think about are:
> 1. http://www.php.net/manual/en/function.exec.php
> 2. If you are going to use backslashes in a string, you need 
> to escape 
> them, so the sample code your "specialist" gave you would 
> need to be changed:
> ><?
> >shell_exec('c:\\programme\\microsoft office\\office\\winword.exe');
> >?>
> Otherwise PHO would see \p, \m, \o, \w escape codes.
> 
> -Mike
> 
> At 06:45 PM 4/27/02 +0200, Rainer Bruch wrote:
> >i am new in using and understanding php. need help in 
> following issue:
> >opening (executing) an external program (not a file) like 
> "winword.exe" with
> >php4.
> >my system-configuration:
> >- windows 2000
> >- php4 1.1.1
> >- winword execution program-path is:
> >"c:\programme\micosoft office\office\winword.exe"
> >
> >please, will somebody out there will help me with the 
> complete php-code
> >like:
> ><?
> >"code to execute the winword-program";
> >?>
> >
> >i have asked a so called specialist who gave the following 
> (not functioning,
> >no error message) code:
> ><?
> >shell_exec("c:\programme\microsoft office\office\winword.exe");
> >?>
> >
> >thanks to all who will help me
> >rainer
> >
> >
> >
> >--
> >PHP Windows Mailing List (http://www.php.net/)
> >To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 
> -- Mike Flynn --
> mike @ mikeflynn . net
> home => work => home => shop => home [adbusters]
> 
> 
> -- 
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
--- End Message ---
--- Begin Message ---
Hy, I am a newbie in php and I have a problem sending variables.

This is the part of the code wth problem
$paramentro="TUBOS E CONEXOES TIGRE";
echo "<td align=center>";
echo "<a href=Produto1.php?nome=$parametro>". $ix." </a>";
echo "</td>";

When I pass the mouse over the link the browser show to me:

Produto.php?nome=TUBOS.
Every caracther after the space is ignored.
Could anyone help me.

Thanks

Waldemar




--- End Message ---
--- Begin Message ---
Put quotes in the href="" part like this:

echo "<a href=\"Produto1.php?nome=$parametro\">". $ix." </a>";

You may want to convert the spaces to %20's (there must be a PHP function to
do this...).

-Dash

-----Original Message-----
From: Waldemar Brand Neto [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, April 30, 2002 1:17 PM
To: Php
Subject: [PHP-WIN] Problem sending variables with an browser


Hy, I am a newbie in php and I have a problem sending variables.

This is the part of the code wth problem
$paramentro="TUBOS E CONEXOES TIGRE";
echo "<td align=center>";
echo "<a href=Produto1.php?nome=$parametro>". $ix." </a>";
echo "</td>";

When I pass the mouse over the link the browser show to me:

Produto.php?nome=TUBOS.
Every caracther after the space is ignored.
Could anyone help me.

Thanks

Waldemar




--- End Message ---
--- Begin Message ---
use: urlencode($param)

---
Scott Hurring
Systems Programmer
EAC Corporation
[EMAIL PROTECTED]
Voice: 201-462-2149
Fax: 201-288-1515

> -----Original Message-----
> From: Dash McElroy [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, April 30, 2002 4:19 PM
> To: 'Waldemar Brand Neto'; Php
> Subject: RE: [PHP-WIN] Problem sending variables with an browser
> 
> 
> Put quotes in the href="" part like this:
> 
> echo "<a href=\"Produto1.php?nome=$parametro\">". $ix." </a>";
> 
> You may want to convert the spaces to %20's (there must be a 
> PHP function to
> do this...).
> 
> -Dash
> 
> -----Original Message-----
> From: Waldemar Brand Neto [mailto:[EMAIL PROTECTED]] 
> Sent: Tuesday, April 30, 2002 1:17 PM
> To: Php
> Subject: [PHP-WIN] Problem sending variables with an browser
> 
> 
> Hy, I am a newbie in php and I have a problem sending variables.
> 
> This is the part of the code wth problem
> $paramentro="TUBOS E CONEXOES TIGRE";
> echo "<td align=center>";
> echo "<a href=Produto1.php?nome=$parametro>". $ix." </a>";
> echo "</td>";
> 
> When I pass the mouse over the link the browser show to me:
> 
> Produto.php?nome=TUBOS.
> Every caracther after the space is ignored.
> Could anyone help me.
> 
> Thanks
> 
> Waldemar
> 
> 
> 
> 
> 
> -- 
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
--- End Message ---
--- Begin Message ---
Thanks a lot Dash, the problem is solved.

Waldemar

----- Original Message -----
From: "Dash McElroy" <[EMAIL PROTECTED]>
To: "'Waldemar Brand Neto'" <[EMAIL PROTECTED]>; "Php"
<[EMAIL PROTECTED]>
Sent: Tuesday, April 30, 2002 5:18 PM
Subject: RE: [PHP-WIN] Problem sending variables with an browser


> Put quotes in the href="" part like this:
>
> echo "<a href=\"Produto1.php?nome=$parametro\">". $ix." </a>";
>
> You may want to convert the spaces to %20's (there must be a PHP function
to
> do this...).
>
> -Dash
>
> -----Original Message-----
> From: Waldemar Brand Neto [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, April 30, 2002 1:17 PM
> To: Php
> Subject: [PHP-WIN] Problem sending variables with an browser
>
>
> Hy, I am a newbie in php and I have a problem sending variables.
>
> This is the part of the code wth problem
> $paramentro="TUBOS E CONEXOES TIGRE";
> echo "<td align=center>";
> echo "<a href=Produto1.php?nome=$parametro>". $ix." </a>";
> echo "</td>";
>
> When I pass the mouse over the link the browser show to me:
>
> Produto.php?nome=TUBOS.
> Every caracther after the space is ignored.
> Could anyone help me.
>
> Thanks
>
> Waldemar
>
>
>
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>


--- End Message ---
--- Begin Message ---
Remember the online help... http://php.net/keyword

It is seriously cool... i wish that every language's
official site had as easy a way to get documentation
as PHP. :)

---
Scott Hurring
Systems Programmer
EAC Corporation
[EMAIL PROTECTED]
Voice: 201-462-2149
Fax: 201-288-1515

> -----Original Message-----
> From: Dash McElroy [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, April 30, 2002 5:17 PM
> To: 'Scott Hurring'
> Subject: RE: [PHP-WIN] Problem sending variables with an browser
> 
> 
> Thanks Scott. I was too lazy to look it up :)
> 
> -Dash
> 
> -----Original Message-----
> From: Scott Hurring [mailto:[EMAIL PROTECTED]] 
> Sent: Tuesday, April 30, 2002 1:27 PM
> To: Php-Win (E-mail)
> Subject: RE: [PHP-WIN] Problem sending variables with an browser
> 
> 
> use: urlencode($param)
> 
> ---
> Scott Hurring
> Systems Programmer
> EAC Corporation
> [EMAIL PROTECTED]
> Voice: 201-462-2149
> Fax: 201-288-1515
> 
> > -----Original Message-----
> > From: Dash McElroy [mailto:[EMAIL PROTECTED]]
> > Sent: Tuesday, April 30, 2002 4:19 PM
> > To: 'Waldemar Brand Neto'; Php
> > Subject: RE: [PHP-WIN] Problem sending variables with an browser
> > 
> > 
> > Put quotes in the href="" part like this:
> > 
> > echo "<a href=\"Produto1.php?nome=$parametro\">". $ix." </a>";
> > 
> > You may want to convert the spaces to %20's (there must be a 
> > PHP function to
> > do this...).
> > 
> > -Dash
> > 
> > -----Original Message-----
> > From: Waldemar Brand Neto [mailto:[EMAIL PROTECTED]] 
> > Sent: Tuesday, April 30, 2002 1:17 PM
> > To: Php
> > Subject: [PHP-WIN] Problem sending variables with an browser
> > 
> > 
> > Hy, I am a newbie in php and I have a problem sending variables.
> > 
> > This is the part of the code wth problem
> > $paramentro="TUBOS E CONEXOES TIGRE";
> > echo "<td align=center>";
> > echo "<a href=Produto1.php?nome=$parametro>". $ix." </a>";
> > echo "</td>";
> > 
> > When I pass the mouse over the link the browser show to me:
> > 
> > Produto.php?nome=TUBOS.
> > Every caracther after the space is ignored.
> > Could anyone help me.
> > 
> > Thanks
> > 
> > Waldemar
> > 
> > 
> > 
> > 
> > 
> > -- 
> > PHP Windows Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> > 
> 
> -- 
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
--- End Message ---
--- Begin Message ---
I just started learning PHP and have looked to solve this issue, but haven't
got the correct answer yet.

I installed the latest version of PHP on my Win98 machine running PWS.

I can do php_info(), so it seems the installation is correct.

Now I'm trying a simple form get and all I receive is the following:

Notice: Undefined variable: C in d:\www\php\test.php on line 2
The url reads:http://localhost/php/test.php?C=foo

and test.php contains:
<?php
echo $C;
?>

I found a suggestion to turn down the error reporting, which stopped the
error from being displayed, but didn't stop the error itself.

Any help would be appreciated




--- End Message ---
--- Begin Message ---
Hi Jeff...

Have a look at http://www.php.net/release_4_2_0.php .

>From version 4.2.0 onwards, request variables are no longer registered in
the global scope.
You'd probably find that if you used echo $_GET['C'] instead of just echo
$C, it would work.

Matt

"Jeff Britts" <[EMAIL PROTECTED]> wrote in message
000201c1f083$6586ce40$9900a8c0@radiospot2">news:000201c1f083$6586ce40$9900a8c0@radiospot2...
> I just started learning PHP and have looked to solve this issue, but
haven't
> got the correct answer yet.
>
> I installed the latest version of PHP on my Win98 machine running PWS.
>
> I can do php_info(), so it seems the installation is correct.
>
> Now I'm trying a simple form get and all I receive is the following:
>
> Notice: Undefined variable: C in d:\www\php\test.php on line 2
> The url reads:http://localhost/php/test.php?C=foo
>
> and test.php contains:
> <?php
> echo $C;
> ?>
>
> I found a suggestion to turn down the error reporting, which stopped the
> error from being displayed, but didn't stop the error itself.
>
> Any help would be appreciated
>
>
>
>


--- End Message ---
--- Begin Message ---
Make sure
register_globals=On
is set in your php.ini

Ross

-----Original Message-----
From: Jeff Britts [mailto:[EMAIL PROTECTED]]
Sent: 30 April 2002 21:13
To: [EMAIL PROTECTED]
Subject: [PHP-WIN] Cant get PHP to run on Win 98


I just started learning PHP and have looked to solve this issue, but haven't
got the correct answer yet.

I installed the latest version of PHP on my Win98 machine running PWS.

I can do php_info(), so it seems the installation is correct.

Now I'm trying a simple form get and all I receive is the following:

Notice: Undefined variable: C in d:\www\php\test.php on line 2
The url reads:http://localhost/php/test.php?C=foo

and test.php contains:
<?php
echo $C;
?>

I found a suggestion to turn down the error reporting, which stopped the
error from being displayed, but didn't stop the error itself.

Any help would be appreciated





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

--- End Message ---
--- Begin Message ---
I'm not sure if i properly understand what you need,
but *if* i understand; you need to pass the ENTIRE
form to a function.

On the HTML form, name all form fields somethign like:

"form[name]"
"form[email]"

Then, whatever function needs the ENTIRE form,
just pass it the $form array.  

If you want to preserve form elements, try
using $form['prev'] = serialize($form);
then making a hidden field named 'prev', and
on the *next* form use: unserialize($form['prev']);
to get at the "previous" values.

---
Scott Hurring
Systems Programmer
EAC Corporation
[EMAIL PROTECTED]
Voice: 201-462-2149
Fax: 201-288-1515

> -----Original Message-----
> From: Bob Sears [mailto:[EMAIL PROTECTED]]
> Sent: Monday, April 29, 2002 9:22 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP-WIN] Need help with functions
> 
> 
> I'm into developing a shopping cart using PHP (naturally) and 
> am running 
> into a little snag.
> I need to be able to perform several tasks within the framework of a 
> <form></form> construct:
> 
> 1)      Call a function from within the module;
> 2)      Call an external PHP module (no return) with the 
> contents of ALL 
> elements within the form;
> 3)      Call an external (or a function) that will overlay a 
> smaller window 
> to display cart contents and
>          have the customer click a button to close the window 
> (return?). 
> All FORM contents needed;
> 
> Here is the pseudo code, subject to MAJOR change (obviously) ...
> 
> <?
> function function_one()
> {
>    print ("I'm in function one ...");
> }
> ?>
> <html>
> <head>
> </head>
> <body>
> <form>
> This is program one ...
> <?
>    print ("<a href=\"bob2.php\"> click here</a>");   <---- 
> This needs to 
> transfer to
>                                                            
> another module, 
> not returning.
>    print ("<input type=???">);                       <---- 
> This needs to 
> enter function_one
>                                                            and remain 
> within the module
>    print ("???????????????");                        <---- 
> This needs to 
> transfer to another
>                                                            
> module (or call 
> another function
>                                                            
> within this 
> module) to open another
>                                                            
> window, display 
> the contents of a
>                                                            
> shopping cart, 
> then have the customer
>                                                            
> click a button 
> to close with window.
>    ?>
> </form>
> </body>
> </html>
> 
> Can anyone return this with some pseudo code?
> 
> Bob
> 
--- End Message ---
--- Begin Message ---
It probably isnt working becuase AFAIK,
it's SHIFT+Click to force a refresh with MSIE.

---
Scott Hurring
Systems Programmer
EAC Corporation
[EMAIL PROTECTED]
Voice: 201-462-2149
Fax: 201-288-1515

> -----Original Message-----
> From: Luis Ferro [mailto:[EMAIL PROTECTED]]
> Sent: Monday, April 29, 2002 2:00 PM
> To: Webmaster
> Cc: [EMAIL PROTECTED]
> Subject: Re: [PHP-WIN] Re: i'm stuck guys
> 
> 
> Internet Explorer doesn't respect reloads and cache orders in any 
> perceived way. The only way i found to workaround this was (in a ASP 
> project) to add the response.* properties that manipulate 
> with the cache 
> and add in the <head></head> of the pages the meta 
> statements. But for 
> the 100% workaround in IE i had also to make it check the page for 
> updates ALWAYS (tools, internet options, settings, Every 
> visit to the page).
> 
> Hope that helps,
> Luis Ferro
> 
> 
> Webmaster wrote:
> 
> >Nope, CTRL F5 doesn/t work, php then gives the same page 
> anyway, I also
> >tried to make the page php appears on to expire and 
> consulted Microsoft of
> >this problem, but nobody seems to know why this happens...
> >
> >The only thing that works is to manually flush the browsers cache...
> >
> >Webmaster
> >
> >"Dash McElroy" <[EMAIL PROTECTED]> schreef in bericht
> >ABA3F1F1A223D411BE6C006008A6F7E23E63EE@MSX1-PTON">news:ABA3F1F1A223D411BE6C006008A6F7E23E63EE@MSX1-PTON...
> >  
> >
> >>In Mozilla and IE you can do a <CTRL>-F5 and it will do a 
> force refresh.
> >>
> >>-Dash
> >>
> >>-----Original Message-----
> >>From: Webmaster [mailto:[EMAIL PROTECTED]]
> >>Sent: Monday, April 29, 2002 10:30 AM
> >>To: [EMAIL PROTECTED]
> >>Subject: [PHP-WIN] Re: i'm stuck guys
> >>
> >>
> >>Hi again,
> >>I really do have problems with windows refreshing the 
> screen, that's why i
> >>see the same pages all the time too, but after all the 
> pages does have
> >>changed!
> >>
> >>When you insert some code and get the same page back, try this:
> >>
> >>Go to extra, Internet options, temporary internet files (tijdelijke
> >>    
> >>
> >internet
> >  
> >
> >>bestanden) and remove files (bestanden verwijderen) this 
> way explorer
> >>flushes it's cache, which it really not like to do :(
> >>
> >>Hope this will help too!
> >>
> >>Webmaster
> >>
> >>"Erik" <[EMAIL PROTECTED]> schreef in bericht
> >>[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> >>    
> >>
> >>>hi,
> >>>
> >>>that error indeed disapperars but now i cannot use  the 
> html buttons
> >>>      
> >>>
> >>anymore
> >>    
> >>
> >>>when i click submit it keeps on showing me the same page 
> over and over
> >>>      
> >>>
> >>again
> >>    
> >>
> >>>i created the script if the form is correctly fill in it 
> should display
> >>>      
> >>>
> >a
> >  
> >
> >>>message like
> >>>print "hi $name your message has been sended to me thank you ."; or
> >>>incompplete fields
> >>>print "oeps you forgot some requierd fields go back and fill in the
> >>>      
> >>>
> >>complete
> >>    
> >>
> >>>form please .";
> >>>but that doesn't happen anymore it shows the same page al the
> >>>      
> >>>
> >time........
> >  
> >
> >>>info:
> >>>os:windows 2000 pro
> >>>server:Apache
> >>>phpversion 4.2.0
> >>>browser:internet explorer 6.0
> >>>daimned windows computers :-) i will buy mandrake linux 
> soon so php runs
> >>>normal i think there is nothing wrong with php only windows and php
> >>>      
> >>>
> >>doesn't
> >>    
> >>
> >>>like eachother  haha :-)
> >>>
> >>>the http 500 error is gone now ........ "see above"
> >>>
> >>>regards from belgium
> >>>Erik
> >>>
> >>>
> >>>      
> >>>
> >>
> >>--
> >>PHP Windows Mailing List (http://www.php.net/)
> >>To unsubscribe, visit: http://www.php.net/unsub.php
> >>    
> >>
> >
> >
> >
> >  
> >
> 
> 
> 
> 
> -- 
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
--- End Message ---
--- Begin Message ---
I've got a script that calls the USER_AGENT variable and uses it to select a CCS
file to load. Problem is, as I move from browser to browser, apparently the
HTTP_USER gets stuck in the proxy cache and some browsers identify themselves as
other browsers.

Here's what I've found out. 

I have an .htm with several SSI's, one of which calls a .php. The .php runs fine
- no problem.

I upload the file to the server (Netscape Enterprise on NT) and load the page
through the proxy (which reports the HTTP_USER) on IE for Mac. HTTP_USER is
correct. I load the same page through the proxy on Mozilla for Mac. HTTP_USER is
correct. I can switch back and forth between these as many times as I like and
the info is correct.

Now I switch to Windows and load on IE6 through proxy. HTTP_USER is correct.
Netscape on Win? Correct. Now if I go back to the Mac and try IE again, it
reports the HTTP_USER as IE6 on Windows NT. 

We have a couple Win boxes that don't go through the proxy, so I ran this same
test again with a renamed file and then the HTTP_USER is correct.

So... I apparently can jump between browsers on Macs with no ill side-effects.
If I avoid the proxy on Windows I'm safe, but as soon as I hit a Windows browser
through the proxy, the HTTP_USER is stuck on that browser identity when I return
to the Mac side.

Our server admin has blocked .php and .css files from being cached in the proxy,
but it seems to have no effect. He personally wants to know if there is anything
else he can block that might help.

Me? I'm baffled, which isn't hard as I'm relatively new to PHP.
--- End Message ---
--- Begin Message ---
Hello,
    I don't know why people don't reply to questions related to compiling php on 
windows. If we want that php should run on every (including windows) platform we must 
help people who try to achieve that. We cannot depend on windows binary download 
provided at php.net because many of the extensions like ldap and imap are missing in 
that download(php 4.20). Every time a new windows download is available they decide to 
include a new extension and remove some other. Even if they include each extension I 
think developing on Linux is not as easy as on windows.

 I haven't found a really good Editor for Linux which is as good as Editplus 
(http://www.editplus.com). Editor like editplus enables to compile any language source 
code with just a click of a button, enables context-sensitive help and syntax 
highlighting for any available language.
 
 In many of the available editors for Linux GUI is not very good or they are very 
resource hungry like KWrite. Many are unresponsive. For example when using Kwrite if I 
press page down key and doesn't release key because I want to go to a specific page 
and when that page is found and I release page down key KWrite doesn't stop until it 
completes all page down events. Same is the case of gvim.

 Another problem in using editors like vim and emacs is that one has to learn their 
keyboard shortcuts. Should we spend time in learning php or these editors navigation 
keys? These are too very unresponsive,

 If anyone knows of a good programmer's editor for Linux which isn't very resource 
hungry and runs well in X please tell me.
--- End Message ---
--- Begin Message ---
What is this and what does it mean?
 
; Document expires after n minutes.
session.cache_expire = 15
 
Why is the default set to 180?
 
Matt Babineau
Freelance Internet Developer
e:  <mailto:[EMAIL PROTECTED]>
[EMAIL PROTECTED] 
p: 603.943.4237
w:  <http://www.illuminatistudios.com/> http://www.illuminatistudios.com
 
 
--- End Message ---
--- Begin Message ---
I don't really know, but the manual says the following:
session.cache_expire: specifies time-to-live for cached session pages in 
minutes; this has no effect for nocache limiter. Defaults to 180.

http://www.php.net/manual/en/ref.session.php



At 07:33 PM 4/30/02 -0400, Matt Babineau wrote:
>What is this and what does it mean?
>
>; Document expires after n minutes.
>session.cache_expire = 15
>
>Why is the default set to 180?
>

--- End Message ---
--- Begin Message ---
Mikael, the following steps should get you started:

>From Windows, go to control panels->administrative tools->data sources
(ODBC)

Click on the System Data Source Name (DSN) tab

Click Add and select Microsoft Access Database from the list (.mdb)

Name your DSN and select the access file you are making the ODBConnection to

now, you have that NAME to reference your database with PHP's built in ODBC
functionality. For instance odbc_connect( "Your_DSN_Name_Here", "user",
"password" ) will open the connection to your database... For further help
you should consider purchasing Wrox's Begining PHP4:
http://www.amazon.com/exec/obidos/ASIN/1861003730/minnirokcom

Good Luck,

Cam

"Mikael Syska" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > Check the functions regarding ODBC support. You will need to add the
> > database in the ODBC manager and after that, it is transparent like
> > any other DSN database.
>
>
> How do i do that, I use Windows2000 and i dont know how to do that, i can
> find the OBDC settings but dont know what to change....
>
> And I get this failure when I tries to connect to my "data.mdb"
>
> Warning: SQL error: [Microsoft][ODBC Driver Manager] Data source name not
> found and no default driver specified, SQL state IM002 in SQLConnect in c:
> \apache\htdocs\access\index.php on line 18


--- End Message ---
--- Begin Message ---
Hi there

My text box is running WinXP Pro in german.

Apache 2 is installed under c:\programme\apache group\

Apache works. Test page comes up.

PHP 4.2 is installed under c:\programme\php\

I tried to get PHP to run as ISAPI as well as CGI to no avail.

I modified httpd.conf to read like this:

--
AddType application/x-httpd-php .php
ScriptAlias /php/ "c:/Programme/Apache Group/Apache2/htdocs/php/"

# LoadModule php4_module c:/programme/php/experimental/apache2filter.dll
# LoadModule php4_module c:\programme\php\experimental\apache2filter.dll

Action application/x-httpd-php "c:/programme/php/sapi/php.exe"
--

I tried both versions of LoadModule instead of Action to get the ISAPI
stuff. No way. I tried to get the CGI stuff to work. Nothing.

With ISAPI, I cannot restart Apache, it fails immediately.

As CGI, I get at least errors saying:

--
C:/Programme/Apache Group/Apache2/htdocs/php/_test_.php is not executable;
ensure interpreted scripts have "#!" first line

Error 500

05/01/02 03:10:28
Apache/2.0.35 (Win32)
HTTP/1.1 500 Internal Server Error Date: Wed, 01 May 2002 01:10:28 GMT
Server: Apache/2.0.35 (Win32) Vary: accept-language Accept-Ranges: bytes
Content-Length: 967 Connection: close Content-Type: text/html;
charset=ISO-8859-1 Expires: Wed, 01 May 2002 01:10:28 GMT
--

What am I doing wrong?

My php script is simple:

--
<html>
<body>

<h2>This is PHP:</h2>

<?php phpinfo(); ?>

That's it

</body>
</html>
---

I am VERY happy for all hints because I have to teach the WAMP setup on
Thursday, 2-May.

Thank you


--- End Message ---
--- Begin Message ---
I just recently installed a new master Hard drive and got rid of my old one.
Of course I saved my web stuff.  When I got my new hard drive setup on the
same system with win xp and IIS and PHP I keep getting Undefined variable
error messages.

I've tried everything I can think of, the variables are clearly getting
passed...

to take a look at the error go here...
http://24.167.121.204/php/chapter1/orderform.html

You may or may not be able to reach the site...

Anyhow if you have any suggestions on getting rid of these weird undefined
variables please reply..
...also note that the code is not buggy.

-steven




--- End Message ---
--- Begin Message ---
Look in your PHP.INI file for the error_reporting variable.  You'll want 
E_ALL & ~E_NOTICE.  What probably happened was you either forgot to copy 
your old php.ini file back to your windows directory, or copied a new 
version of it without the & ~_NOTICE part that disabled undefined variable 
warnings.

At 10:33 PM 10/8/01 -0500, steven wrote:
>I just recently installed a new master Hard drive and got rid of my old one.
>Of course I saved my web stuff.  When I got my new hard drive setup on the
>same system with win xp and IIS and PHP I keep getting Undefined variable
>error messages.
>
>I've tried everything I can think of, the variables are clearly getting
>passed...
>
>to take a look at the error go here...
>http://24.167.121.204/php/chapter1/orderform.html
>
>You may or may not be able to reach the site...
>
>Anyhow if you have any suggestions on getting rid of these weird undefined
>variables please reply..
>...also note that the code is not buggy.
>
>-steven
>
>
>
>
>
>--
>PHP Windows Mailing List (http://www.php.net/)
>To unsubscribe, visit: http://www.php.net/unsub.php


-- Mike Flynn --
mike @ mikeflynn . net
home => work => home => shop => home [adbusters]

--- End Message ---
--- Begin Message ---
At 11:28 PM 10/8/01 -0500, you wrote:
>Thank you for your help so far but it seems as though the same problem
>is happening.  For some reason the php won't grab the variable values.
>The only difference now is that it doesn't show me the error, it is just
>blank where it should be displaying the variable values.
>-steven

You must have upgraded to version 4.2 of PHP.  The default setting for a 
crucial setting in the php.ini file has been changed with this 
version.  It's called "register_globals" and it has been turned off for 
security purposes.

For more information, check out:
See
http://www.php.net/release_4_2_0.php
and http://www.php.net/ChangeLog-4.php

-Mike

--- End Message ---
--- Begin Message ---
Yes it is possible... in your form you're either using the "post" or "get"
(probably "get") as your method.  Whatever it is switch it to the one you
aren't using.
if you're using post use get
and likewise if the opposite is true.

-steven

"Rs Herhuth" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
>
> I'm still struggling a bit with sessions and state.
>
> What I think I'm trying to do is use a Javascript onclick to call a
created
> function that will set session variables and then load a new page.  Is it
> possible to set php variables from the client side with out passing them
in
> the "url.html?var1=value&var2=value" format?
>
> I'm also getting killed because form variables don't change session
> variables with the same name (it took many hours to figure this out!).
>
> Am I going about this the wrong way...is there an easier method?
>
> Thanks,
> Ron
>


--- End Message ---
--- Begin Message ---
When I use a textarea html tag to put some data into mysql, when I
output it the carriage return and laine feed characters from the form do
not stick after they are put into mysql text field. Is there a way to
out the data with the carriage returns and linefeeds being read?
 
Matt Babineau
Freelance Internet Developer
e:  <mailto:[EMAIL PROTECTED]>
[EMAIL PROTECTED] 
p: 603.943.4237
w:  <http://www.illuminatistudios.com/> http://www.illuminatistudios.com
 
 
--- End Message ---
--- Begin Message ---
I am trying to use PHP to generate and automatically select the current
month in an HTML Form. Here is the code that flails:

  for ($i=01;$i<=12;$i++) {
    if($i = date(m)) {
      $selected = " selected";
    }
    print "<option
value=\"".date(m,mktime(0,0,0,$i))."\"$selected>".date(F,mktime(0,0,0,$i))."
</option>\n";
  }

The output is a large amount of April's in the Select dropdown box - my
machine then goes crazy for a while whilst the hard drive chunks like mad.

Thanks.

-Dash
--- End Message ---
--- Begin Message ---
In the if condition, you must use a double equal (==)
and add an else condition to reset the $select variable to "".
Try this:

          for ($i=01;$i<=12;$i++) {
            if($i == date(m)) {
              $selected = " selected";
            }else{
                $selected = "";
           }
            print "<option
value=\"".date(m,mktime(0,0,0,$i))."\"$selected>".date(F,mktime(0,0,0,$i))."
</option>\n";
  }


Regards
Horst

> -----Message d'origine-----
> De:   Dash McElroy [SMTP:[EMAIL PROTECTED]]
> Date: mercredi, 1. mai 2002 04:56
> À:    Php
> Objet:        [PHP-WIN] PHP generation of <select> fields
> 
> I am trying to use PHP to generate and automatically select the current
> month in an HTML Form. Here is the code that flails:
> 
>   for ($i=01;$i<=12;$i++) {
>     if($i = date(m)) {
>       $selected = " selected";
>     }
>     print "<option
> value=\"".date(m,mktime(0,0,0,$i))."\"$selected>".date(F,mktime(0,0,0,$i))
> ."
> </option>\n";
>   }
> 
> The output is a large amount of April's in the Select dropdown box - my
> machine then goes crazy for a while whilst the hard drive chunks like mad.
> 
> Thanks.
> 
> -Dash
> 
> -- 
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
Hi,

Im trying to build a simple "Hello World" C extension using Cygwin but
can't find any examples or how this can be accomplished ... can anyone
give a hint?

Thanks.

- Jon

--- End Message ---
--- Begin Message ---
hi,

when i have a page tht handles forms with php it doesn't work i don't get
any error message it just shows me the same page over and over again i even
added
error_reporting(15); at the top of the script no luck windows always shows
me the same page i may click submit a douzend of times it always show the
same

any solution for this issue ?

thanks
Erik


--- End Message ---

Reply via email to