php-windows Digest 2 Dec 2003 15:40:25 -0000 Issue 2025

Topics (messages 22260 through 22270):

Change ENV via putenv() during script execution
        22260 by: Paul Menard

Help with submit
        22261 by: Lawrence
        22269 by: Seung Hwan Kang

Re: Webpath vs Absolute Path
        22262 by: Eric COLINET

Upload and Download from local to server tools!( like w3Upload in asp)
        22263 by: Brent
        22265 by: Ignatius Reilly

Re: HTTP/1.1 500 Server Error
        22264 by: Eric COLINET

Re: How to find out if PC is online
        22266 by: Svensson, B.A.T. (HKG)
        22267 by: H Marc Bower

Re: PHP 4.3.4 and Sessions
        22268 by: Seung Hwan Kang

compiling extensions
        22270 by: Piotr Pluciennik

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 ---
Hi all,

Happy Holidays.

I'm having trouble with the ftp_rawlist() command. In reading many post it was stated 
that this
script relies on the TEMP environment variable. Well that is just my issue. On the 
Windows system
that the user connects to and authentictes to, the TEMP env var is set to a location 
tht does not
allow the user read/write permissions. And per the sys admin this will not change. His 
suggestion
is to change the varible to the uer's home directory for the execution of the php 
script.

So I thought I would look into this. My question is. before the cll the ftp-rawlist(), 
can I set
the env via the putenv() function and have it take? I have tries this without any 
results.

My thought is tht the php.exe when started via IIS inherits the env variables. 
Sometime later
during the parse of my script I am tryingto override this enviroment. Is my thinging 
wrong?

Should this work?

Paul



__________________________________
Do you Yahoo!?
Free Pop-Up Blocker - Get it now
http://companion.yahoo.com/

--- End Message ---
--- Begin Message ---
<body>
<?
if (@$B1)
echo" You press checkout" ;
elseif(@$B2)
echo"You press update" ;
?>
<form method="POST" action="submit.php">
<input type="image" src="checkout.gif"  name="B1" onclick="this.submit();">
<input type="image" src="update.gif"  name="B2" onclick="this.submit();">
<input type="submit"  value="Checkout" name="B1" >
<input type="submit"  value="Update" name="B2" >
</form>
</body>
When I replace button submit with image "checkout.gif" and "update.gif" , I
do not get value of $B1 and $B2 more , please show me how to get $B1 $B2
when I replace button submit with image , thank you .

--- End Message ---
--- Begin Message --- try buttons.

eg.

<BUTTON name="submit" value="submit" type="submit">
Send<IMG src="/icons/wow.gif" alt="wow"></BUTTON>
<BUTTON name="reset" type="reset">
Reset<IMG src="/icons/oops.gif" alt="oops"></BUTTON>

:)

Lawrence wrote:

<body>
<?
if (@$B1)
echo" You press checkout" ;
elseif(@$B2)
echo"You press update" ;
?>
<form method="POST" action="submit.php">
<input type="image" src="checkout.gif"  name="B1" onclick="this.submit();">
<input type="image" src="update.gif"  name="B2" onclick="this.submit();">
<input type="submit"  value="Checkout" name="B1" >
<input type="submit"  value="Update" name="B2" >
</form>
</body>
When I replace button submit with image "checkout.gif" and "update.gif" , I
do not get value of $B1 and $B2 more , please show me how to get $B1 $B2
when I replace button submit with image , thank you .

--- End Message ---
--- Begin Message --- Hi Tony,

What you call a webpath is in fact an advanced PHP functionnality that allow (as you know) opening resources
anywhere on the web using http protocol.


But in fact they are too pitfall:
- Doesn't your test.com host interpret the PHP code before sending it to the script ?
In this case your test class for exemple will reduce to an empty file - that may cause the problem.
- Does your script host allow_url_fopen in php.ini ?
In this case 'webpath' just don't work


Without any error message it's difficult to dignanostic any problem thought.

But using 'webpath' for script inclusion is a bad idea to my view since, in addition to the problem described below, it is 10 times (at least) slower than 'absolute path'
(opening web connection - reading data from one side and from the other side ...) and can lead to double (or more) the load of your web server
(since any http opened connection open an other connection for each included file) and this can cause problems too.



Regards, Eric


At 20:57 01/12/2003, Tony Devlin wrote:
Hello List,

  I'm running an IIS 5.0 server on Windows 2000 box and have PHP Version
4.3.2 with 512 Megs Ram. I am using the CGI mode.

It's a webserver running about 26 Virtual Domains.  All Domains are running
PHP and have php scripts.

Something recently has happened and I'm not sure why.  I am hoping someone
on this list can help me.  All of these sites have been running for over 6
months or longer.  Just today a new problem pop'd up, I noticed some of my
sites were timing out and php failing to execute; I could not think of
anything similiar about the sites that were timing out.  Out of the 26
virtual domains, about 7 were timing out.  After much much much debugging I
could only find one thing similiar;

Instead of using an absolute o/s path:
IE: <?INCLUDE("d:\dir1\dir2\test.php");?>

These were using a webpath:
IE: <?INCLUDE("http://www.test.com/test.php";);?>

I changed his webpath calls to use an absolute path and boom, the sites are
working again Perfectly.

Now I prefer and usually always us an absolute o/s path, but we have another
php developer who doesn't.  Again these sites had been running correctly for
over 6 months and now all of a sudden stopped.

What could have caused these websites to stop allowing a webpath?  Why would
it all of a sudden stop working?





Tony Devlin
V. President / CTO      Airewaves Broadband
69 Robert Smalls Prkwy.
Suite 4B
Beaufort, SC 29902
[EMAIL PROTECTED]
http://www.airewaves.com <http://www.airewaves.com/>
tel:
fax:
mobile:         (843) 379-2473
(800) 861-6301
(678) 480-4959







--- End Message ---
--- Begin Message ---
G'day,
Just wondering if anyone out there knows where I can find PHP
tools to upload and download files to and from a server and local
machine.  A asp solution can be found at  http://www.dimac.net/
but asp sucks!! No need for interface or browse files names etc,
I will know where the files are and what they are called and where
I want them to go. hope someone understands what i'm askin!!
ta
Brent.

--- End Message ---
--- Begin Message ---
PHP has a very nice FTP library.

Check the manual.
_________________________
----- Original Message -----
From: "Brent" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, December 02, 2003 09:53
Subject: [PHP-WIN] Upload and Download from local to server tools!( like
w3Upload in asp)


> G'day,
> Just wondering if anyone out there knows where I can find PHP
> tools to upload and download files to and from a server and local
> machine.  A asp solution can be found at  http://www.dimac.net/
> but asp sucks!! No need for interface or browse files names etc,
> I will know where the files are and what they are called and where
> I want them to go. hope someone understands what i'm askin!!
> ta
> Brent.
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

--- End Message ---
--- Begin Message --- Hi Peter,

As far as know the CGI version of PHP doesn't work well on Win95.

But just to be sure set error_log (php.ini) to a file and check the content of it since 500 is a crash.


Eric



At 03:17 02/12/2003, Peter Richards wrote:
Hi,

I have been using a PWS (M$ personal web server) for some ASP work, on
a Win95b box. I found I was able to also use the PWS for some PHP
work. Recently installed PHP 4.3.4, and now all I get with any .PHP
file is a "HTTP/1.1 500 Server Error" msg.

Any clues ?

I _think_ the previous version of PHP I was using was 4.2.3, but I
would prefer to use the latest version.

Peter

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

--- End Message ---
--- Begin Message ---
Yes, you are wrong. 

-----Original Message-----
From: SolidDigital
To: [EMAIL PROTECTED]
Sent: 2003-12-01 20:10
Subject: Re: [PHP-WIN] Re: How to find out if PC is online

What i meant to say was if gethostbyaddr(ipadress) responds with 
something else than the ipadress then this PC must be online.

Or am I wrong??

Jocjem



B.A.T. Svensson wrote:
> And precisly how does the mechnaism with gethostbyaddr(),
> e.g. an DNS request, work to be able to resolve the issue
> about weather a particular host i online or not? 
> 
> As far as I know this is not possible. The only thing one might
> be able to say after a successfull DNS look up is this-or-that
> host has a registered entry in the DNS server. Nothing more can
> be deduced.
> 
> If I messed something here, please fill me in.
> 
> -----Original Message-----
> From: J.Veenhuijsen
> To: [EMAIL PROTECTED]
> Sent: 2003-12-01 12:53
> Subject: [PHP-WIN] Re: How to find out if PC is online
> 
> Try :
> 
> gethostbyaddr (PHP 3, PHP 4 )
> Get the Internet host name corresponding to a given IP address
> string gethostbyaddr (string ip_address)
> Returns the host name of the Internet host specified by ip_address. If

> an error occurs, eturns
> ip_address.
> See also gethostbyname().
> 
> Jochem
> 
> Jan Hrebenar wrote:
> 
>>Hello All,
>>
>>I`d like to make script which will detect
>>if my computer at IP xxx.xxx.xxx.xxx is online.
>>I try to use system("ping") but this function
>>is not allowed on server.
>>
>>Can somebody tell me if exist any other way
>>to do this?
>>
>>Pls excuse my english
> 
> 

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

--- End Message ---
--- Begin Message ---
A thought I had is to set up a simple script on the server that, when
executed, pops the time/date/IP into a file (or database) whenever the page
is accessed (this won't work for a yes/no, since there is always going to be
a yes answer, and the lack of an answer will indicate no... but it's hard to
indicate a lack of an answer using this method :)  You could do your test
based on how old the last access was, I guess, and assume that if the
machine was up 60 seconds ago, chances are good it's still up).  Then on the
machine you want to know is up, if Windows, put a shortcut to the webpage
that you just made in the startup folder.  Make the page refresh every x
seconds.  Then write a second script that picks out the values stored in the
first script to see when the last time was that the machine ran the script.
This will give you the time and date and the IP Address (and any more
information you care to set when the machine accesses the script) of the
machine's last activity on the server.

It will work, just not sure if it will accomplish what you're looking for.

(V)

----- Original Message ----- 
From: "Jan Hrebenar" <[EMAIL PROTECTED]>
> Hello All,
>
> I`d like to make script which will detect
> if my computer at IP xxx.xxx.xxx.xxx is online.
> I try to use system("ping") but this function
> is not allowed on server.
>
> Can somebody tell me if exist any other way
> to do this?

--- End Message ---
--- Begin Message --- Why would you need to save login and passwd in the session?

It must be better once you validate login and passwd, the just register one unique id as a session id, if the user logged out destroy that session id.

If there is more than one previllege for the user. You may register a user id, previllege, and session id (unique id) so that you can distingue user previllege too.

:)

Sascha Kaufmann wrote:
Hello everyone

I have some major problems with the 4.3.4 version under Windows XP SP 1 with both, Apache 1.3.29 and IIS.
PHP creates wrong(?) session files, it adds lots of spaces and a session file looks like:


status|s:2:"ok ";user|s:5:"admin     ";userid|i:14;language|s:2:"de ";
          ^                 ^^^^^                   ^

I register the session variables with $_SESSION['status'] = "ok";

or it adds a space after a string which is very annoying at the Password verification, I just can't login to my application which *works* with versions < 4.3.4 :(
Had someone a similar problem and has a fix for it?

--- End Message ---
--- Begin Message ---
Hi,

I've already compiled php and now is time for some extensions. So, what
should I do, where can I find info on how to do it under windows?

Waiting to hear from you asap...

Piotr

--- End Message ---

Reply via email to