php-windows Digest 18 Apr 2002 22:22:38 -0000 Issue 1100
Topics (messages 13155 through 13182):
R: [PHP-WIN] Using Access with PHP via ODBC
13155 by: Alberto. Sartori
Creating a "nice" link
13156 by: R.S. Herhuth
13157 by: Steve Bradwell
13158 by: Nicole Amashta
13159 by: Brian McGarvie
13182 by: Matt Parlane
help with upload IIS php 4.1.2
13160 by: cybero
13162 by: cybero
13163 by: Nicole Amashta
R: [PHP-WIN] help with upload IIS php 4.1.2
13161 by: Alberto. Sartori
Re: Forward Link
13164 by: Nicole Amashta
my php.ini
13165 by: cybero
13166 by: Nicole Amashta
13167 by: Nicole Amashta
13168 by: Nicole Amashta
13169 by: Nicole Amashta
13171 by: Nicole Amashta
13172 by: cybero
php SiteManager
13170 by: Steve Bradwell
How can i install PHP as an Apache module on windows 2000?
13173 by: Guilherme Dávalos
13174 by: cybero
executing windows command with php
13175 by: Evans, Josh
13176 by: Dash McElroy
13177 by: Nicole Amashta
Apache 1.3 / Win2KPro / PHP4
13178 by: Thomas Maynard
Trouble w/Apache on WinME
13179 by: Ken Villines
Connecting to a remote database
13180 by: R.S. Herhuth
13181 by: Matt Babineau
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 ---
Try this (from pscode.com):
<?
$conn = new COM("ADODB.Connection") or die("Cannot start ADO");
// Microsoft Access connection string.
$conn->Open("DRIVER={Microsoft Access Driver (*.mdb)};
DBQ=C:\\inetpub\\wwwroot\\php\\mydb.mdb");
// SQL statement to build recordset.
$rs = $conn->Execute("SELECT myfield FROM mytable");
echo "<p>Below is a list of values in the MYDB.MDB database, MYABLE table, MYFIELD
field.</p>";
// Display all the values in the records
// et
while (!$rs->EOF) {
$fv = $rs->Fields("myfield");
echo "Value: ".$fv->value."<br>\n";
$rs->MoveNext();
}
$rs->Close();
?>
-----Messaggio originale-----
Da: Brian McGarvie [mailto:[EMAIL PROTECTED]]
Inviato: giovedě 18 aprile 2002 12.06
A: [EMAIL PROTECTED]
Oggetto: [PHP-WIN] Using Access with PHP via ODBC
Hi,
I'm developing an application which is built on top of an existing MS
Access Database, when the DB is not opened/windows client to the DB is
opened it creates a lock, which in turn prevents PHP from accessing the
Database, is there any solutions to this?
Thanks in advance....
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
I am creating a few links on the fly that have to pass variables to the
next page:
echo '<a href="nextPage.php?variable1=$var1">next page</a>'
The problem is that I don't want that information to appear in the
address field (more like a method=post instead of a method=get). How
can I do that?
I was trying to use sessions under W2k, php4, Apache and all my pages
hang and never load once I start the session so I can't use sessions :-(
Any ideas?
Thanks,
Ron
--- End Message ---
--- Begin Message ---
Hey Ron,
I am using php4, apache and win98 and sessions work ok for me, I am pretty
new to php but I have found sessions are the easiest and most practical way
to store vars, I was using cookies before...which work really well but can
get a little tedious to use when you have alot of variables because you have
to parse them all out of the cookie string.
So unless there is a known issue with w2k i wouldn't rule out sessions,
otherwise use cookies.
hope this helps,
Steve.
-----Original Message-----
From: R.S. Herhuth [mailto:[EMAIL PROTECTED]]
Sent: Thursday, April 18, 2002 9:00 AM
To: [EMAIL PROTECTED]
Subject: [PHP-WIN] Creating a "nice" link
I am creating a few links on the fly that have to pass variables to the
next page:
echo '<a href="nextPage.php?variable1=$var1">next page</a>'
The problem is that I don't want that information to appear in the
address field (more like a method=post instead of a method=get). How
can I do that?
I was trying to use sessions under W2k, php4, Apache and all my pages
hang and never load once I start the session so I can't use sessions :-(
Any ideas?
Thanks,
Ron
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
I have php 4.0.6 on Win2k and Apache ... i use session and have no problem.
If you need help setting up your php.ini for sessions, let me know.
You need to make sure that the session directory exists (the one that is
setup in yoru php.ini should point to a directory that exists. Double check
that path.)
Good luck and don't rule out sessions just yet ;)
Nicole Amashta
Web Application Development
--
-----
Nicole Amashta
Web Application Developer
www.aeontrek.com
"R.S. Herhuth" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
>
> I am creating a few links on the fly that have to pass variables to the
> next page:
>
> echo '<a href="nextPage.php?variable1=$var1">next page</a>'
>
> The problem is that I don't want that information to appear in the
> address field (more like a method=post instead of a method=get). How
> can I do that?
>
> I was trying to use sessions under W2k, php4, Apache and all my pages
> hang and never load once I start the session so I can't use sessions :-(
>
> Any ideas?
>
> Thanks,
> Ron
--- End Message ---
--- Begin Message ---
have you configured your session_data path in the PHP.ini file? this may
cause php to hang if you do not have this set
-----Original Message-----
From: R.S. Herhuth [mailto:[EMAIL PROTECTED]]
Sent: 18 April 2002 2:00 PM
To: [EMAIL PROTECTED]
Subject: [PHP-WIN] Creating a "nice" link
I am creating a few links on the fly that have to pass variables to the
next page:
echo '<a href="nextPage.php?variable1=$var1">next page</a>'
The problem is that I don't want that information to appear in the
address field (more like a method=post instead of a method=get). How
can I do that?
I was trying to use sessions under W2k, php4, Apache and all my pages
hang and never load once I start the session so I can't use sessions :-(
Any ideas?
Thanks,
Ron
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
Hiya...
In case you can't get sessions working, you could use javascript to post a
form to the next page... (messy I know...)
<form name="form1" method="post" action="nextPage.php">
<input type="hidden" name="variable1" value="<?=$var1?>">
</form>
<a href="" onClick="document.form1.submit(); return false">Next page</a>
I'm not too sure about cross browser compatibility though, you might want to
try in on Netscape and IE just in case.
Hope that helps...
Matt
"R.S. Herhuth" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
>
> I am creating a few links on the fly that have to pass variables to the
> next page:
>
> echo '<a href="nextPage.php?variable1=$var1">next page</a>'
>
> The problem is that I don't want that information to appear in the
> address field (more like a method=post instead of a method=get). How
> can I do that?
>
> I was trying to use sessions under W2k, php4, Apache and all my pages
> hang and never load once I start the session so I can't use sessions :-(
>
> Any ideas?
>
> Thanks,
> Ron
--- End Message ---
--- Begin Message ---
Hi all.
I have a big problem with uploading files.
I have WINDOWS 2000, IIS, PHP4.1.2.
send.htm ->
<FORM ENCTYPE="multipart/form-data" ACTION="send.php"
METHOD=POST>
<INPUT TYPE="hidden" name="MAX_FILE_SIZE"
value="4000000">
Send this file: <INPUT NAME="userfile" TYPE="file">
<INPUT TYPE="submit" VALUE="Send File">
</FORM>
send.php ->
<?
IF (is_uploaded_file($userfile))
{
ECHO "Name : ".$userfile ."<BR>\n";
ECHO "Orign : ".$userfile_name ."<BR>\n";
ECHO "Type : ".$userfile_type ."<BR>\n";
ECHO "Size: ".$userfile_size."<BR>\n";
}
?>
when i upload file nothing result is there.
Sorry for my english I am from Slovakia :o)
---
Odchádzajúca správa neobsahuje vírusy.
Skontrolované antivírusovým systémom AVG (http://www.grisoft.cz).
Verzia: 6.0.342 / Vírusová databáza: 189 - dátum vydania: 14.3.2002
--- End Message ---
--- Begin Message ---
Section in my php.ini
register_globals = on
I also try $_FILES["userfile"]["name"] but nothing.
Alberto. Sartori <[EMAIL PROTECTED]> píse v diskusním
příspěvku:[EMAIL PROTECTED]
k.com...
If you've turned on the Global Variables you can use this:
$_FILES["userfile"]["name"]
$_FILES["userfile"]["size"]
-----Messaggio originale-----
Da: cybero [mailto:[EMAIL PROTECTED]]
Inviato: giovedě 18 aprile 2002 16.42
A: [EMAIL PROTECTED]
Oggetto: [PHP-WIN] help with upload IIS php 4.1.2
Hi all.
I have a big problem with uploading files.
I have WINDOWS 2000, IIS, PHP4.1.2.
send.htm ->
<FORM ENCTYPE="multipart/form-data" ACTION="send.php"
METHOD=POST>
<INPUT TYPE="hidden" name="MAX_FILE_SIZE"
value="4000000">
Send this file: <INPUT NAME="userfile" TYPE="file">
<INPUT TYPE="submit" VALUE="Send File">
</FORM>
send.php ->
<?
IF (is_uploaded_file($userfile))
{
ECHO "Name : ".$userfile ."<BR>\n";
ECHO "Orign : ".$userfile_name ."<BR>\n";
ECHO "Type : ".$userfile_type ."<BR>\n";
ECHO "Size: ".$userfile_size."<BR>\n";
}
?>
when i upload file nothing result is there.
Sorry for my english I am from Slovakia :o)
---
Odchádzajúca správa neobsahuje vírusy.
Skontrolované antivírusovým systémom AVG (http://www.grisoft.cz).
Verzia: 6.0.342 / Vírusová databáza: 189 - dátum vydania: 14.3.2002
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
Make sure the path in you PHP.ini to your temp folder is setup and that path
exists. When you upload files, they are temporarily placed in this temp
directory (which you set in php.ini). Double check this exists.
good luck,
--
Nicole Amashta
Web Application Developer
www.aeontrek.com
"Cybero" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Section in my php.ini
>
> register_globals = on
>
> I also try $_FILES["userfile"]["name"] but nothing.
>
>
>
> Alberto. Sartori <[EMAIL PROTECTED]> píse v diskusním
>
příspěvku:[EMAIL PROTECTED]
> k.com...
> If you've turned on the Global Variables you can use this:
>
> $_FILES["userfile"]["name"]
> $_FILES["userfile"]["size"]
>
>
> -----Messaggio originale-----
> Da: cybero [mailto:[EMAIL PROTECTED]]
> Inviato: giovedě 18 aprile 2002 16.42
> A: [EMAIL PROTECTED]
> Oggetto: [PHP-WIN] help with upload IIS php 4.1.2
>
>
> Hi all.
> I have a big problem with uploading files.
>
> I have WINDOWS 2000, IIS, PHP4.1.2.
>
> send.htm ->
>
> <FORM ENCTYPE="multipart/form-data" ACTION="send.php"
> METHOD=POST>
>
> <INPUT TYPE="hidden" name="MAX_FILE_SIZE"
> value="4000000">
> Send this file: <INPUT NAME="userfile" TYPE="file">
> <INPUT TYPE="submit" VALUE="Send File">
>
> </FORM>
>
> send.php ->
>
> <?
> IF (is_uploaded_file($userfile))
> {
> ECHO "Name : ".$userfile ."<BR>\n";
> ECHO "Orign : ".$userfile_name ."<BR>\n";
> ECHO "Type : ".$userfile_type ."<BR>\n";
> ECHO "Size: ".$userfile_size."<BR>\n";
> }
> ?>
>
> when i upload file nothing result is there.
>
> Sorry for my english I am from Slovakia :o)
>
>
>
>
>
> ---
> Odchádzajúca správa neobsahuje vírusy.
> Skontrolované antivírusovým systémom AVG (http://www.grisoft.cz).
> Verzia: 6.0.342 / Vírusová databáza: 189 - dátum vydania: 14.3.2002
>
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>
--- End Message ---
--- Begin Message ---
If you've turned on the Global Variables you can use this:
$_FILES["userfile"]["name"]
$_FILES["userfile"]["size"]
-----Messaggio originale-----
Da: cybero [mailto:[EMAIL PROTECTED]]
Inviato: giovedě 18 aprile 2002 16.42
A: [EMAIL PROTECTED]
Oggetto: [PHP-WIN] help with upload IIS php 4.1.2
Hi all.
I have a big problem with uploading files.
I have WINDOWS 2000, IIS, PHP4.1.2.
send.htm ->
<FORM ENCTYPE="multipart/form-data" ACTION="send.php"
METHOD=POST>
<INPUT TYPE="hidden" name="MAX_FILE_SIZE"
value="4000000">
Send this file: <INPUT NAME="userfile" TYPE="file">
<INPUT TYPE="submit" VALUE="Send File">
</FORM>
send.php ->
<?
IF (is_uploaded_file($userfile))
{
ECHO "Name : ".$userfile ."<BR>\n";
ECHO "Orign : ".$userfile_name ."<BR>\n";
ECHO "Type : ".$userfile_type ."<BR>\n";
ECHO "Size: ".$userfile_size."<BR>\n";
}
?>
when i upload file nothing result is there.
Sorry for my english I am from Slovakia :o)
---
Odchádzajúca správa neobsahuje vírusy.
Skontrolované antivírusovým systémom AVG (http://www.grisoft.cz).
Verzia: 6.0.342 / Vírusová databáza: 189 - dátum vydania: 14.3.2002
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
You can use embedded javascript for this.
Example:
<snip>
<?
## some code here .. blah blah
echo "<script>window.location='http://path/to/next/page';</script>";
exit; ## you may want to stop execution of rest of page here but at this
point you should be
## directed to the url set above.
?>
</snip>
hope that helps some.
--
Nicole Amashta
Web Application Developer
www.aeontrek.com
"Wayne Hinch" <[EMAIL PROTECTED]> wrote in message
000001c1e6b2$acfddcd0$0300a8c0@gromit">news:000001c1e6b2$acfddcd0$0300a8c0@gromit...
> Hi all,
>
> How can I get a page to automatically forward to the next page currently
> I am trying to use
>
> header("Location: [filename.php]");
>
> although this is not working it is bringing up the following error
>
> Warning: Cannot add header information - headers already sent by (output
> started at c:\html/customer/newcust.php:3) in [filename] on line 304
>
> How do I get around this problem, Please help.
>
> Wayne
>
--- End Message ---
--- Begin Message ---
enable_dl = on
file_uploads = on
upload_tmpd_dir = c:\inetpub\wwwroot\uploads
upload_max_filesize = 4M
---
Odchádzajúca správa neobsahuje vírusy.
Skontrolované antivírusovým systémom AVG (http://www.grisoft.cz).
Verzia: 6.0.342 / Vírusová databáza: 189 - dátum vydania: 14.3.2002
--- End Message ---
--- Begin Message ---
Is 4mb large enough? If the file you are attempting to upload is larger than
4mb, it won't work either. Also, be sure that uploads directory exists on
the computer PHP runs on.
--
Nicole Amashta
Web Application Developer
www.aeontrek.com
"Cybero" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
>
> enable_dl = on
> file_uploads = on
> upload_tmpd_dir = c:\inetpub\wwwroot\uploads
> upload_max_filesize = 4M
>
>
>
> ---
> Odchádzajúca správa neobsahuje vírusy.
> Skontrolované antivírusovým systémom AVG (http://www.grisoft.cz).
> Verzia: 6.0.342 / Vírusová databáza: 189 - dátum vydania: 14.3.2002
>
>
--- End Message ---
--- Begin Message ---
>>The file is smaller than 4M and folder 100% exist on my server.
Could you paste the code you are using (privately if you prefer)? And is the
error you are getting just that the page hangs after you submit the file for
upload?
--
Nicole Amashta
Web Application Developer
www.aeontrek.com
"Nicole Amashta" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Is 4mb large enough? If the file you are attempting to upload is larger
than
> 4mb, it won't work either. Also, be sure that uploads directory exists on
> the computer PHP runs on.
>
> --
> Nicole Amashta
> Web Application Developer
> www.aeontrek.com
>
>
> "Cybero" <[EMAIL PROTECTED]> wrote in message
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> >
> > enable_dl = on
> > file_uploads = on
> > upload_tmpd_dir = c:\inetpub\wwwroot\uploads
> > upload_max_filesize = 4M
> >
> >
> >
> > ---
> > Odchádzajúca správa neobsahuje vírusy.
> > Skontrolované antivírusovým systémom AVG (http://www.grisoft.cz).
> > Verzia: 6.0.342 / Vírusová databáza: 189 - dátum vydania: 14.3.2002
> >
> >
>
>
--- End Message ---
--- Begin Message ---
Sorry, you already pasted code. I am trying to do 5+ things at once ...
--
Nicole Amashta
Web Application Developer
www.aeontrek.com
"Nicole Amashta" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> >>The file is smaller than 4M and folder 100% exist on my server.
>
> Could you paste the code you are using (privately if you prefer)? And is
the
> error you are getting just that the page hangs after you submit the file
for
> upload?
>
> --
> Nicole Amashta
> Web Application Developer
> www.aeontrek.com
>
>
> "Nicole Amashta" <[EMAIL PROTECTED]> wrote in message
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > Is 4mb large enough? If the file you are attempting to upload is larger
> than
> > 4mb, it won't work either. Also, be sure that uploads directory exists
on
> > the computer PHP runs on.
> >
> > --
> > Nicole Amashta
> > Web Application Developer
> > www.aeontrek.com
> >
> >
> > "Cybero" <[EMAIL PROTECTED]> wrote in message
> > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > >
> > > enable_dl = on
> > > file_uploads = on
> > > upload_tmpd_dir = c:\inetpub\wwwroot\uploads
> > > upload_max_filesize = 4M
> > >
> > >
> > >
> > > ---
> > > Odchádzajúca správa neobsahuje vírusy.
> > > Skontrolované antivírusovým systémom AVG (http://www.grisoft.cz).
> > > Verzia: 6.0.342 / Vírusová databáza: 189 - dátum vydania: 14.3.2002
> > >
> > >
> >
> >
>
>
--- End Message ---
--- Begin Message ---
OK, try some debugging lines.
First off, in your php script, you didn't upload the file anywhere. You have
to do some sort of:
copy( $userfile, $pathtonewfile )
to get the file there. Then, when you check the file exists, you want to
check the path of the new file, like so:
if ( file_exists( $pathtonewfile) )
{
echo "The file exists.";
}
else
{
echo "The file does not exist.";
}
--
Nicole Amashta
Web Application Developer
www.aeontrek.com
"Cybero" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
>
> enable_dl = on
> file_uploads = on
> upload_tmpd_dir = c:\inetpub\wwwroot\uploads
> upload_max_filesize = 4M
>
>
>
> ---
> Odchádzajúca správa neobsahuje vírusy.
> Skontrolované antivírusovým systémom AVG (http://www.grisoft.cz).
> Verzia: 6.0.342 / Vírusová databáza: 189 - dátum vydania: 14.3.2002
>
>
--- End Message ---
--- Begin Message ---
I tried your code and it works. Although this does not actually upload a
file anywhere. It just checks that the file is in the directory set in your
php.ini (in your case, c:\inetpub\wwwroot\upload).
Make sure that this directory has the Read and Write permissions, which you
can set bu right-clicking on the directory where these files are being
placed (in your case, the upload directory).
Try that ...
--
Nicole Amashta
Web Application Developer
www.aeontrek.com
"Cybero" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
>
> enable_dl = on
> file_uploads = on
> upload_tmpd_dir = c:\inetpub\wwwroot\uploads
> upload_max_filesize = 4M
>
>
>
> ---
> Odchádzajúca správa neobsahuje vírusy.
> Skontrolované antivírusovým systémom AVG (http://www.grisoft.cz).
> Verzia: 6.0.342 / Vírusová databáza: 189 - dátum vydania: 14.3.2002
>
>
--- End Message ---
--- Begin Message ---
When I use AppacheWebServer it Works
eg.
from send.htm ->
<BODY BGCOLOR=#FFFFFF>
<FORM ENCTYPE="multipart/form-data" ACTION="send.php" METHOD=POST>
<INPUT TYPE="hidden" name="MAX_FILE_SIZE" value="4000000">
Send this file: <INPUT NAME="userfile" TYPE="file">
<INPUT TYPE="submit" VALUE="Send File">
</FORM>
</BODY>
I send any file eg. Setuplog.txt to site send.php ->
<?php
echo "Name: ".$_FILES["userfile"]["name"]."<BR>\n";
echo "Tmp Name: ".$_FILES["userfile"]["tmp_name"]."<BR>\n";
echo "Size: ".$_FILES["userfile"]["size"]."<BR>\n";
echo "Type: ".$_FILES["userfile"]["type"]."<BR>\n";
?>
and it returns
Name: Setuplog.txt
Tmp Name: c:\inetpub\wwwroot\uploads\php18.tmp
Size: 116098
Type: text/plain
but on IIS it doesn't work.
I use windows 2000 server.
---
Odchádzajúca správa neobsahuje vírusy.
Skontrolované antivírusovým systémom AVG (http://www.grisoft.cz).
Verzia: 6.0.342 / Vírusová databáza: 189 - dátum vydania: 14.3.2002
--- End Message ---
--- Begin Message ---
Hello everyone,
I am pretty new to php and web development, Right now I am writing my code
in VIM which I like but I was checking around and saw a download for PHP
SiteManager. I would like to start creating object oriented php applications
I have done some java and c++, will this help?
Also what really is SiteManger?
Thanks alot
Steve.
--- End Message ---
--- Begin Message ---
Hi,
i'm trying to run an application on Apache 1.3 at windows 2000 professional, but it
was made on php/Linux. I suppose that i'm having the following problem beacuse the
installation of PHP on windows is CGI version by default.
the problem is:
[Thu Apr 18 12:28:00 2002] [error] [client 127.0.0.1] malformed header from script.
Bad header=HTTP/1.0 401 Unauthorized: c:/php/php.exe
So, how can i install PHP as an Apache module on windows 2000?
--- End Message ---
--- Begin Message ---
add this lines to httpd.conf :
LoadModule php4_module c:/php/sapi/php4apache.dll
AddModule mod_php4.c
AddType application/x-httpd-php .php
Guilherme dávalos <[EMAIL PROTECTED]> píse v diskusním
příspěvku:001b01c1e718$6b6f6b60$[EMAIL PROTECTED]
Hi,
i'm trying to run an application on Apache 1.3 at windows 2000 professional,
but it was made on php/Linux. I suppose that i'm having the following
problem beacuse the installation of PHP on windows is CGI version by
default.
the problem is:
[Thu Apr 18 12:28:00 2002] [error] [client 127.0.0.1] malformed header from
script. Bad header=HTTP/1.0 401 Unauthorized: c:/php/php.exe
So, how can i install PHP as an Apache module on windows 2000?
---
Odchádzajúca správa neobsahuje vírusy.
Skontrolované antivírusovým systémom AVG (http://www.grisoft.cz).
Verzia: 6.0.342 / Vírusová databáza: 189 - dátum vydania: 14.3.2002
--- End Message ---
--- Begin Message ---
what would be the best way to ping a host and return the output to a
webpage?
--- End Message ---
--- Begin Message ---
Josh,
Believe it or not, I found an effective way to do that with a batch script!
But PHP works better :)
One of the easiest ways in PHP is to use the backtick method - the `
character (just like in unix).
Example:
<pre>
<?php
echo `ping blah.host.com`;
?>
</pre>
Works great.
-Dash
-----Original Message-----
From: Evans, Josh [mailto:[EMAIL PROTECTED]]
Sent: Thursday, April 18, 2002 11:34 AM
To: [EMAIL PROTECTED]
Subject: [PHP-WIN] executing windows command with php
what would be the best way to ping a host and return the output to a
webpage?
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
Go to php.net. Type in "exec" in the search box for functions.
It shows you how to use exec and system to execute system commands and
return the output.
I have a script to ping servers on the network and get their IP's. So, it
can be done.
--
Nicole Amashta
Web Application Developer
www.aeontrek.com
"Josh Evans" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> what would be the best way to ping a host and return the output to a
> webpage?
>
>
>
--- End Message ---
--- Begin Message ---
Hello All,
I have just started with php and I thought all was well. However I will
state problem and then my procedures.
Problem: I run a .php file and I get nothing but a blank screen. I view the
source and the php code is not there indicating that apache sent it to the
php program, right? I run an html file containing php and again no display
but the code is still in the source.
This is what I have done.
I extracted the zip file containing the php files and put them in C:\php4. I
then copied all of the dll's from the dll subdir and copied them into the
C:\winnt\system32 dir. I then take copy the php4ts.dll and put it in the
system dir as well. I then copy the php.ini_recommend and put it into the
C:\winnt dir and rename it to php.ini. Then I edit php.ini with the
following: [doc_root = "C:\wwwroot"] , and [extension_dir =
C:\php4\extensions]. I then go to the httpd.conf file and add the following:
[LoadModule php4_module c:/php4/sapi/php4apache.dll] placed last on the list
of other "LoadModule" directives. I then add [AddModule mod_php4.c] last on
the list of other "AddModule directives. Then [AddType
application/x-httpd-php .php4 .php .phtml] and [AddType
application/x-httpd-php-source .phps] in the file where it refers to
document types. I then added the user [IUSR_(machinename)] to my user list
and verified that the php.exe prog was working properly.
That is what I have done and there is my problem. Please help me with this.
I am usually very deductive with this stuff but I have used all known
resources to get nowhere.
Thanks
Bryan
--- End Message ---
--- Begin Message ---
I am doing some php development and testing it on my WinME system. I have
Apache installed and the only way I can get anything to execute is with a
shebang at the beginning of the file. Then the shebang is printed in the
page:( Anyone know how to get around this. I don't have this trouble with
ASP pages.
Thanks
-Ken
--- End Message ---
--- Begin Message ---
Newbie alert!
I am able to connect to a SQL Server Database on my local network by
specifying the host as "testHost" the database is "DB". My question is
if I'm outside the network what is the correct syntax that I need to
call in the host in order to access the database?
Thanks,
ROn
--- End Message ---
--- Begin Message ---
Try to access the SQL DB by IP Address. If you want to access it from
outside you LAN, The machine the SQL DB is on has to have an external
IP.
Matt Babineau
Freelance Internet Developer
e: [EMAIL PROTECTED]
p: 603.943.4237
w: http://www.illuminatistudios.com
-----Original Message-----
From: R.S. Herhuth [mailto:[EMAIL PROTECTED]]
Sent: Thursday, April 18, 2002 3:57 PM
To: [EMAIL PROTECTED]
Subject: [PHP-WIN] Connecting to a remote database
Newbie alert!
I am able to connect to a SQL Server Database on my local network by
specifying the host as "testHost" the database is "DB". My question is
if I'm outside the network what is the correct syntax that I need to
call in the host in order to access the database?
Thanks,
ROn
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---