php-windows Digest 5 Feb 2002 18:27:38 -0000 Issue 987
Topics (messages 11844 through 11854):
Embeded MySQL
11844 by: Josh Seward
undefined variable
11845 by: bz
11852 by: Nicole Amashta
Re: Re:[PHP-WIN] and now?
11846 by: Michel Laine
Unable to access Access DB via ODBC under IIS under WIN2K
11847 by: Bill Seeley
11853 by: Nicole Amashta
IIS-ODBC-Access2K w/ISAPI PHP 4.1.1 under WIN2K
11848 by: Bill Seeley
Re: PHP and JavaScript
11849 by: Nicole Amashta
Re: Can't pass variables to PHP scripts?! Please help.
11850 by: Nicole Amashta
Re: Export MySQL --> DBF, CSV, MS Access, or MS Excel?
11851 by: Nicole Amashta
Crystal Reports and COM
11854 by: Nicole Amashta
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 ---
Is it possible to compile php with libmySQL.dll or use it as an extention?
Any documentation would help great!
Thanks,
Josh Seward
[EMAIL PROTECTED]
--- End Message ---
--- Begin Message ---
Hello everyone,
I have a small question:
How can I get rid of "Warning: Undefined variable: user1(& password1) in
C:\WebShare\wwwroot\netk\5\login.php on line 4" in that program?
<?php
include ("config.php");
session_register("userpassword");
if($user1==$USER && $password1==$PASSWORD) {
$userpassword = $user1.$password1;
header("Location:index.php");
exit();
}
?>
<HTML>
<HEAD>
<TITLE>login</TITLE>
<HEAD>
<BODY>
<FORM action="<? echo $PHP_SELF ?>" method="POST">
<TABLE border="0" width="400">
<TR>
<TD>account£º
<INPUT type="text" name="user1">
<TD>password£º
<INPUT type="password" name="password1">
</TD>
</TR>
<TR>
<TD>
<INPUT type="submit" value="login">
<INPUT type="reset" value="cancel">
</TD>
</TR>
</TABLE>
</FORM>
</BODY>
</HTML>
--- End Message ---
--- Begin Message ---
In your php.ini, replace your error_reporting line with this one:
error_reporting = E_ALL & ~E_NOTICE
That should get rid of the warnings since pre-defining vars in PHP isn't
really required (as in Java).
Good luck,
~Nicole Amashta
www.aeontrek.com
"Bz" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
Hello everyone,
I have a small question:
How can I get rid of "Warning: Undefined variable: user1(& password1) in
C:\WebShare\wwwroot\netk\5\login.php on line 4" in that program?
<?php
include ("config.php");
session_register("userpassword");
if($user1==$USER && $password1==$PASSWORD) {
$userpassword = $user1.$password1;
header("Location:index.php");
exit();
}
?>
<HTML>
<HEAD>
<TITLE>login</TITLE>
<HEAD>
<BODY>
<FORM action="<? echo $PHP_SELF ?>" method="POST">
<TABLE border="0" width="400">
<TR>
<TD>account£º
<INPUT type="text" name="user1">
<TD>password£º
<INPUT type="password" name="password1">
</TD>
</TR>
<TR>
<TD>
<INPUT type="submit" value="login">
<INPUT type="reset" value="cancel">
</TD>
</TR>
</TABLE>
</FORM>
</BODY>
</HTML>
--- End Message ---
--- Begin Message ---
Sorry, but it seems like some step of our communication didn't go quite right..
Didn't mean to upset you - i apologize if i did.
I have resent my last reply (the one i am referring to) to you - not the list -
again.
Bram Somers wrote:
> I have read your message, and I replied to you!
>
> Makes one wonder if you do read your messages???
> Check your mails first! Before you say anything, thanks
>
> BS
>
> ----- Original Message -----
> From: "Bram Somers" <[EMAIL PROTECTED]>
> To: "Michel Laine" <[EMAIL PROTECTED]>
> Sent: Thursday, January 31, 2002 6:43 PM
> Subject: Re: [PHP-WIN] Re:[PHP-WIN] need help with configuration
>
> > hi,
> > I'm using windows xp
> > with php 4.1.1 from the php.net site
> > I do not have a webserver, do you know which one I should use?
> > And yes I followed the installation instructions in the install.txt folder
> >
> > BS
> > ps thanks that you wanna help me!
> > ----- Original Message -----
> > From: "Michel Laine" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Thursday, January 31, 2002 6:30 PM
> > Subject: [PHP-WIN] Re:[PHP-WIN] need help with configuration
> >
> >
> > > First of all i have some questions you must answer so we know how to
> help
> > you:
> > >
> > > Which operating system do you use?
> > > Which version of PHP are you using?
> > > Do you use any special preconfigured installer kit or just the plain PHP
> > from PHP.net?
> > > Which webserver do you use? To be able to run PHP you need a webserver
> > too.
> > > Have you followed the PHP installation instructions (install.txt which
> is
> > located in the PHP installation folder -
> > > usually c:\php) for your webserver?
--
Michel Laine
--- End Message ---
--- Begin Message ---
When attempting to query an Access 2K DB with the odbc_connect function, I
get the messsage:
Warning: SQL error: [Microsoft][ODBC Driver Manager] Data source name not
found and no default driver specified, SQL state IM002 in SQLConnect in
e:\vnpweb\html\getcontact.php on line 14 IM002
I have tried both the CGI (installer version) and ISAPI versions of PHP
4.1.1 (manual install) and get the same messages. I am able to access this
same data source name with Crystal Reports and was previously able to access
it with a PHP script under an Apache server (php4apache.dll version) on the
same machine. I've enabled both ODBC and PHP logging, but PHP logging
doesn't give me any more than the above messages. Curiously the ODBC log is
empty, even though the above messages would indicate that the MS ODBC driver
returned a legitimate error code.
Has anyone seen anything like this and can you offer any suggestions?
Thanks, Bill Seeley
--- End Message ---
--- Begin Message ---
You must set up the ODBC source you want access to. Go to control panel,
administrative tools, ODBC ... (if you haven't done this already).
Go to the DSN tab and create a new datasource there. Are you familiar with
this?
If you need further help setting up an ODBC source, let me know. After
creating this source, you can then use it through your PHP scripts.
hope that helps any.
~Nicole Amashta
www.aeontrek.com
"Bill Seeley" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> When attempting to query an Access 2K DB with the odbc_connect function, I
> get the messsage:
>
> Warning: SQL error: [Microsoft][ODBC Driver Manager] Data source name not
> found and no default driver specified, SQL state IM002 in SQLConnect in
> e:\vnpweb\html\getcontact.php on line 14 IM002
>
> I have tried both the CGI (installer version) and ISAPI versions of PHP
> 4.1.1 (manual install) and get the same messages. I am able to access this
> same data source name with Crystal Reports and was previously able to
access
> it with a PHP script under an Apache server (php4apache.dll version) on
the
> same machine. I've enabled both ODBC and PHP logging, but PHP logging
> doesn't give me any more than the above messages. Curiously the ODBC log
is
> empty, even though the above messages would indicate that the MS ODBC
driver
> returned a legitimate error code.
>
> Has anyone seen anything like this and can you offer any suggestions?
>
> Thanks, Bill Seeley
>
>
>
--- End Message ---
--- Begin Message ---
When attempting to query an Access 2K DB with the odbc_connect function, I
get the messsage:
Warning: SQL error: [Microsoft][ODBC Driver Manager] Data source name not
found and no default driver specified, SQL state IM002 in SQLConnect in
e:\vnpweb\html\getcontact.php on line 14
IM002
I have tried both the CGI (installer version) and ISAPI versions of PHP
4.1.1 (manual install) and get the same messages. I am able to access this
same data source name with Crystal Reports and was previously able to access
it with a PHP script under an Apache server (php4apache.dll version) on the
same machine.
I've enabled both ODBC and PHP logging, but PHP logging doesn't give me any
more than the above messages. Curiously the ODBC log is empty, even though
the above messages would indicate that the MS ODBC driver returned a
legitimate error code.
Has anyone seen anything like this and can you offer any suggestions?
Thanks,
Bill Seeley
--- End Message ---
--- Begin Message ---
You don't even have to document.write. You can just create a hidden variable
like you said and set that variable. such as:
<form name='frmTest'>
<input type=hidden name="var1">
</form>
then set that var after the value is retrieved from the prompt like so:
<script>
var name= prompt('....');
document.frmTest.var1.value=name;
</script>
just another way of doing it. ;)
~nicole
www.aeontrek.com
=========================
"Craig Morrison" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
>
> I figured out how to do what I wanted to do.
>
> document.write the var to a hidden field in a form.. Thanks to everyone
who
> sent messages off the list! :-)
>
> Craig Morrison wrote:
> >
> > Say I do this in JavaScript:
> >
> > var name = prompt("Please enter your name:", "Name");
> >
> > How do I access 'name' in PHP or can I?
>
> --
>
> Craig Morrison
> http://www.mtsprofessional.com/
> A Win32 Email server that works for you.
--- End Message ---
--- Begin Message ---
If you will notice, your error is just a warning. If you go to your PHP.ini
file, you should verify that you have the line:
error_reporting = E_ALL & ~E_NOTICE
as your type of error reporting. If you have warnings enabled, you will
always get warnings of your vars not being initialized with some value (even
though it is through the GET var). And, as someone else suggested, make sure
you have register globals on, which is default in php 4.0.3 and higher.
Hope that is of help.
~nicole amashta
www.aeontrek.com
"Travis Wyatt" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Here is my situation...I can't seem to get variables to pass from a GET or
POST method to a PHP script. To see for yourself go to:
> http://www.socopc.com/test.php?testvar=hello_world
>
> The source of "test.php" is...
> <html>
> <? for ($x=0;$x<5;$x++) { echo $x; } ?>
> <br><? print "testvar=\"".$testvar."\""; ?>
> <br><br><br><? phpinfo(); ?>
> </html>
>
>
> And as you will see, I get the error.
> Warning: Undefined variable: testvar in
c:\root\domains\socopc.com\test.php on line 3
> testvar=""
>
> Indicating that the variable is empty and has not been passed?!
> I'm running Win2k Server w/ Apache and PHP 4.1.1.
>
> If someone could look at that page (included are most of my settings).
And help me fix my PHP configuration? Thanks!
> ~ Travis
>
>
--- End Message ---
--- Begin Message ---
I simply have to agree with you, b.a.t. I too would love to know the format
of the Excel file. Those pesky files!
hehe,
If you find out, let me know. I haven't tried to find out myself. But i have
needed to know.
TIA!
~nicole amashta
www.aeontrek.com
"B.A.T. Svensson" <[EMAIL PROTECTED]> wrote in message
27E647E5629ED211BF78009027289C6303C1B6A1@mail1">news:27E647E5629ED211BF78009027289C6303C1B6A1@mail1...
> "Svensson, B.A.T. (HKG)" <[EMAIL PROTECTED]> wrote:
>
> >> >Where should I look for information to dump MySql tables to
> >> >other formats so the client can download the data?
> >> >
> >> >dBase, comma-delimited, Access, and Excel are
> >> >formats I find useful.
>
> [REMARK: BELOW IS WHAT _I_ (BAT Svensson) DID WROTE]
>
> >> Has MS published the file format of MS Excel files???
>
> From: Piotr Pluciennik
> >
> >You don't need to know formats of these files.
>
> Just as I can't tell what you need and not need to know, you can tell what
I
> need an not need to know. ;)
>
> >Reasonable way is to use ODBC interface or in case of
> >Access and Excel - COM model.
>
> Thanks for you answer, but you did not answer my question, considering
> weather MS has published the file format of MS Excel or not.
>
> If one is happy to treat MS Excel files as lumps of binary data, fine with
> me, but I am curious about weather MS actually has published the file
format
> of MS Excel, mainly because end users that requires me to process data
> continues to send these binary junk files, a.k.a. MS Excel files, and it
> would be nice to write a parser that could extract the data in some usable
> form.
>
> It would be nice to have a file format in order to write a program to
> extract data from those junk files.
>
> > ODBC will be easier.
>
> Here me now and belive me later: ODBC it self wont make it easier...
>
> /Anders
--- End Message ---
--- Begin Message ---
Hello. This is slightly off topic, but I am doing this through PHP, so it's
somewhat relevant to this list.
I am running crystal reports through PHP with a COM object. Now, I have this
working just fine on several computers and has been fine for months now. The
PHP calls the com object and that talks to Crystal Reports. A report is
returned in the PDF format and displayed in the web page. This is all
working fine.
Now, I am setting this up again; however, I am doing it over the phone. So,
I am directing someone else set this all up.
Here are *my* current specs:
Win2k
PHP 4.0.6
Apache 1.3
Crystal Reports version 8.5
Adobe Acrobat full (reader and distiller)
Here are *his* current spects:
Win2k
PHP 4.0.6
Apache 1.3
Crystal Reports version 8.0 <-- he has an older version.
Adobe Acrobat full (reader and distiller)
Question to anyone who knows: Does Crystal Reports 8.0 support the export of
PDF? He does not see the option through Crystal in the export feature.
Anyhow, we've attempted to test the reports through the web page and get the
NULL pointer error. We are sure that the permissions and all is set up -
matching mostly what I have on my machine, which works - through DCOMCNFG.
So, I do not believe, anymore, that the error is because of this. I believe
it could be his version of crystal simply does not support the PDF export
feature.
One error he gets when using a COM test exe is this:
Error: 692 Error in file E:\Apps\Apache\htdocs\....\thereport.rpt:
Invalid export DLL or export format
Export.Send <PEExportTo>.
Anyone have any ideas or suggestions?
TIA
nicole,
www.aeontrek.com
--
Nicole Amashta
Web Applications Developer
ABOL Software, Inc.
( 678 ) 494 - 3172
[EMAIL PROTECTED]
--- End Message ---