php-windows Digest 26 Jan 2005 18:39:44 -0000 Issue 2551

Topics (messages 25457 through 25463):

Re: PHP MS-DOS
        25457 by: DvDmanDT
        25458 by: Jean-Philippe Palha
        25459 by: DvDmanDT
        25460 by: tg-php.gryffyndevelopment.com
        25461 by: Jason Barnett
        25462 by: DvDmanDT

server problem
        25463 by: Ross Hulford

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 ---
I don't think you could get it to run under dos.. You could recompile it
ofcorse, but I doubt it would work anyway.. I think it uses some
functionality that wouldn't be possible under dos.. But it's only a guess..

-- 
// DvDmanDT
MSN: dvdmandt�hotmail.com
Mail: dvdmandt�telia.com
"Shawn McKenzie" <[EMAIL PROTECTED]> skrev i meddelandet
news:[EMAIL PROTECTED]
> Is it possible to run the current win32 PHP under DOS only?  I have a
> bootable DOS disk with PHP and when I attempt to run it I get "This
> program can not run in DOS mode.".
>
> Is there a DOS binary???
>
> TIA
> -Shawn

--- End Message ---
--- Begin Message ---
Try PHP CLI, it's the command line version of PHP
(look at the CLI folder in your PHP distrib)

Jean-Philippe PALHA ([EMAIL PROTECTED])
IMA'DIFF - 13, rue Damesme - 75013 Paris  FRANCE
Tel : 33 1 53 80 89 89 - Fax : 33 1 53 80 89 81
Web : http://www.imadiff.com
------------------------------------------------------------------
------------------------------------------------------------------

"DvDmanDT" <[EMAIL PROTECTED]> sur mercredi 26 janvier 2005 � 15:45 +0100:
>I don't think you could get it to run under dos.. You could recompile it
>ofcorse, but I doubt it would work anyway.. I think it uses some
>functionality that wouldn't be possible under dos.. But it's only a
>guess..
>
>-- 
>// DvDmanDT
>MSN: dvdmandt�hotmail.com
>Mail: dvdmandt�telia.com
>"Shawn McKenzie" <[EMAIL PROTECTED]> skrev i meddelandet
>news:[EMAIL PROTECTED]
>> Is it possible to run the current win32 PHP under DOS only?  I have a
>> bootable DOS disk with PHP and when I attempt to run it I get "This
>> program can not run in DOS mode.".
>>
>> Is there a DOS binary???
>>
>> TIA
>> -Shawn
>
>-- 
>PHP Windows Mailing List (http://www.php.net/)
>To unsubscribe, visit: http://www.php.net/unsub.php

--- End Message ---
--- Begin Message ---
Yes, but it's still a windows app.. :p I think it uses windows funtionality,
that doesn't exist in dos (with dos I don't mean console windows, I mean
real dos, with no windows loaded at all).. It's not using windows specific
stuff, or at least it doesn't really depend on it, but it uses stuff that I
doubt exists in dos..

-- 
// DvDmanDT
MSN: dvdmandt�hotmail.com
Mail: dvdmandt�telia.com
"Jean-Philippe Palha" <[EMAIL PROTECTED]> skrev i meddelandet
news:[EMAIL PROTECTED]
> Try PHP CLI, it's the command line version of PHP
> (look at the CLI folder in your PHP distrib)
>
> Jean-Philippe PALHA ([EMAIL PROTECTED])
> IMA'DIFF - 13, rue Damesme - 75013 Paris  FRANCE
> Tel : 33 1 53 80 89 89 - Fax : 33 1 53 80 89 81
> Web : http://www.imadiff.com
> ------------------------------------------------------------------
> ------------------------------------------------------------------
>
> "DvDmanDT" <[EMAIL PROTECTED]> sur mercredi 26 janvier 2005 � 15:45
+0100:
> >I don't think you could get it to run under dos.. You could recompile it
> >ofcorse, but I doubt it would work anyway.. I think it uses some
> >functionality that wouldn't be possible under dos.. But it's only a
> >guess..
> >
> >-- 
> >// DvDmanDT
> >MSN: dvdmandt�hotmail.com
> >Mail: dvdmandt�telia.com
> >"Shawn McKenzie" <[EMAIL PROTECTED]> skrev i meddelandet
> >news:[EMAIL PROTECTED]
> >> Is it possible to run the current win32 PHP under DOS only?  I have a
> >> bootable DOS disk with PHP and when I attempt to run it I get "This
> >> program can not run in DOS mode.".
> >>
> >> Is there a DOS binary???
> >>
> >> TIA
> >> -Shawn
> >
> >-- 
> >PHP Windows Mailing List (http://www.php.net/)
> >To unsubscribe, visit: http://www.php.net/unsub.php

--- End Message ---
--- Begin Message ---
I think people get confused when they talk about "Windows apps" and such.  I'm 
not sure that I can clarify things that much, but I wanted to point out some 
stuff that might help people understand a little better.  Please, anyone who 
has more intimate knowledge of this, feel free to correct me or add to what 
I've said.


When people think Windows, they think GUI.  So then you ask yourself, "Why does 
PHP need a GUI if we're only trying to run it in command line mode?".  I guess 
one answer is that you really DONT need Windows, but in the evolution from DOS 
to Windows there were some things done that were never added to the older 
DOS-only systems that PHP requires.

It's probably more accurate to say that PHP, even command line, is a win32 app. 
 This means that it's using some win32 calls/functions/whatever that you can't 
get in a DOS-only environment.  Probably not even the DOS that's installed on a 
bootable floppy created under a newer version of Windows (DOS 7?  They up to 
DOS 8 or so yet?  I havn't made a bootable floppy since Windows 98 so I don't 
know).

I havn't checked out the PHP CLI mentioned, but if it still needs win32 
functions, then it's probably not going to work on a bootable floppy/cdrom 
without something special to help it (or a recompiling to make it not a win32 
app).

I did find a product called unWin that emulates win32 calls, but it looks like 
you have to pay for it.  Still, if that's a hard requirement for an application 
you're creating for a job or something, it might be worth looking into.

You can find unWin and unDos at:
http://www.smxinfo.com/rtos/dos/undwinpb.htm

If I screwed something up, feel free to correct me.  If you have more questions 
or I was unclear, feel free to ask and I'll try to be more clear.

-TG

= = = Original message = = =

Yes, but it's still a windows app.. :p I think it uses windows funtionality,
that doesn't exist in dos (with dos I don't mean console windows, I mean
real dos, with no windows loaded at all).. It's not using windows specific
stuff, or at least it doesn't really depend on it, but it uses stuff that I
doubt exists in dos..

-- 
// DvDmanDT
MSN: dvdmandt~hotmail.com
Mail: dvdmandt~telia.com
"Jean-Philippe Palha" <[EMAIL PROTECTED]> skrev i meddelandet
news:[EMAIL PROTECTED]
> Try PHP CLI, it's the command line version of PHP
> (look at the CLI folder in your PHP distrib)
>
> Jean-Philippe PALHA ([EMAIL PROTECTED])
> IMA'DIFF - 13, rue Damesme - 75013 Paris  FRANCE
> Tel : 33 1 53 80 89 89 - Fax : 33 1 53 80 89 81
> Web : http://www.imadiff.com
> ------------------------------------------------------------------
> ------------------------------------------------------------------
>
> "DvDmanDT" <[EMAIL PROTECTED]> sur mercredi 26 janvier 2005 ~ 15:45
+0100:
> >I don't think you could get it to run under dos.. You could recompile it
> >ofcorse, but I doubt it would work anyway.. I think it uses some
> >functionality that wouldn't be possible under dos.. But it's only a
> >guess..
> >
> >-- 
> >// DvDmanDT
> >MSN: dvdmandt~hotmail.com
> >Mail: dvdmandt~telia.com
> >"Shawn McKenzie" <[EMAIL PROTECTED]> skrev i meddelandet
> >news:[EMAIL PROTECTED]
> >> Is it possible to run the current win32 PHP under DOS only?  I have a
> >> bootable DOS disk with PHP and when I attempt to run it I get "This
> >> program can not run in DOS mode.".
> >>
> >> Is there a DOS binary???
> >>
> >> TIA
> >> -Shawn
> >
> >-- 
> >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


___________________________________________________________
Sent by ePrompter, the premier email notification software.
Free download at http://www.ePrompter.com.

--- End Message ---
--- Begin Message --- DvDmanDT wrote:
Yes, but it's still a windows app.. :p I think it uses windows funtionality,
that doesn't exist in dos (with dos I don't mean console windows, I mean
real dos, with no windows loaded at all).. It's not using windows specific
stuff, or at least it doesn't really depend on it, but it uses stuff that I
doubt exists in dos..


This is a good discussion. I believe you're correct although no one has ever pointed out to me exactly what things do / don't work in an old DOS shell. For example:


- Would the filesystem functions work?
- Would TCP/IP connections work the same?
- Would basic int / string / float / etc. variables be stored in memory the way that they are in Windows?
- Would system calls have input, output, and / or error redirection?
- Is shared memory managed the same way as in newer versions of Windows?


<wild-guess>
Certainly there are a lot of other areas that might pose problems for various tasks that PHP can handle. I *don't* know what all of those areas are, let alone *if* those would be problems with using an old version of MSDOS. I'm willing to bet that shared memory would be a problem, but if you weren't trying to use threads in PHP (e.g. just a CLI version of PHP) then maybe this isn't even an issue.
</wild-guess>


--
Teach a man to fish...

NEW? | http://www.catb.org/~esr/faqs/smart-questions.html
STFA | http://marc.theaimsgroup.com/?l=php-general&w=2
STFM | http://www.php.net/manual/en/index.php
STFW | http://www.google.com/search?q=php
LAZY | http://mycroft.mozdev.org/download.html?name=PHP&submitform=Find+search+plugins

--- End Message ---
--- Begin Message ---
Well.. I would kinda say it's a windows console app.. Normal windows apps
doesn't have the main() function, but instead the windows specific
winmain().. Dos apps used main() as well.. Now, windows finds the starting
address of the program somewhere at the end of the file I think (wild guess
though), while dos just runs it from the beginning or something like that..
They use different starting addresses anyway.. Meaning that one .exe file
could accutually be a graphical windows app as well as a real dos console
app.. I cannot confirm this, but I have a slight feeling I saw something
like that in some norton app to make backups of drives/partitions..

Dos 7 is 95, 98 and 98 SE afaik.. 8.0 is windows Me..

Now:
> - Would the filesystem functions work?
Yes.. well, unless PHP uses the windows optimized versions, but that doesn't
exist is linux so probably not a problem..

> - Would TCP/IP connections work the same?
No.. I don't think TCP/IP works at all in DOS.. There's no winsock there..
Accutually, I don't even think there's dlls..

> - Would basic int / string / float / etc. variables be stored in memory
the way that they are in Windows?
Yes, as long as you use an x86 computer newer than a 80386, and a C
implentation that doesn't do anything wierd with it..

> - Would system calls have input, output, and / or error redirection?
Dos includes STDIN, STDOUT and STDERR yes.. At least dos 3.x did.. :p

> - Is shared memory managed the same way as in newer versions of Windows?
Probably not.. 2 apps can't really run at the same time in dos (not like in
windows anyway), so shared memory probably isn't even a part of the OS..


-- 
// DvDmanDT
MSN: dvdmandt�hotmail.com
Mail: dvdmandt�telia.com
<[EMAIL PROTECTED]> skrev i meddelandet
news:[EMAIL PROTECTED]
> I think people get confused when they talk about "Windows apps" and such.
I'm not sure that I can clarify things that much, but I wanted to point out
some stuff that might help people understand a little better.  Please,
anyone who has more intimate knowledge of this, feel free to correct me or
add to what I've said.
>
>
> When people think Windows, they think GUI.  So then you ask yourself, "Why
does PHP need a GUI if we're only trying to run it in command line mode?".
I guess one answer is that you really DONT need Windows, but in the
evolution from DOS to Windows there were some things done that were never
added to the older DOS-only systems that PHP requires.
>
> It's probably more accurate to say that PHP, even command line, is a win32
app.  This means that it's using some win32 calls/functions/whatever that
you can't get in a DOS-only environment.  Probably not even the DOS that's
installed on a bootable floppy created under a newer version of Windows (DOS
7?  They up to DOS 8 or so yet?  I havn't made a bootable floppy since
Windows 98 so I don't know).
>
> I havn't checked out the PHP CLI mentioned, but if it still needs win32
functions, then it's probably not going to work on a bootable floppy/cdrom
without something special to help it (or a recompiling to make it not a
win32 app).
>
> I did find a product called unWin that emulates win32 calls, but it looks
like you have to pay for it.  Still, if that's a hard requirement for an
application you're creating for a job or something, it might be worth
looking into.
>
> You can find unWin and unDos at:
> http://www.smxinfo.com/rtos/dos/undwinpb.htm
>
> If I screwed something up, feel free to correct me.  If you have more
questions or I was unclear, feel free to ask and I'll try to be more clear.
>
> -TG
>
> = = = Original message = = =
>
> Yes, but it's still a windows app.. :p I think it uses windows
funtionality,
> that doesn't exist in dos (with dos I don't mean console windows, I mean
> real dos, with no windows loaded at all).. It's not using windows specific
> stuff, or at least it doesn't really depend on it, but it uses stuff that
I
> doubt exists in dos..
>
> -- 
> // DvDmanDT
> MSN: dvdmandt~hotmail.com
> Mail: dvdmandt~telia.com
> "Jean-Philippe Palha" <[EMAIL PROTECTED]> skrev i meddelandet
> news:[EMAIL PROTECTED]
> > Try PHP CLI, it's the command line version of PHP
> > (look at the CLI folder in your PHP distrib)
> >
> > Jean-Philippe PALHA ([EMAIL PROTECTED])
> > IMA'DIFF - 13, rue Damesme - 75013 Paris  FRANCE
> > Tel : 33 1 53 80 89 89 - Fax : 33 1 53 80 89 81
> > Web : http://www.imadiff.com
> > ------------------------------------------------------------------
> > ------------------------------------------------------------------
> >
> > "DvDmanDT" <[EMAIL PROTECTED]> sur mercredi 26 janvier 2005 ~ 15:45
> +0100:
> > >I don't think you could get it to run under dos.. You could recompile
it
> > >ofcorse, but I doubt it would work anyway.. I think it uses some
> > >functionality that wouldn't be possible under dos.. But it's only a
> > >guess..
> > >
> > >-- 
> > >// DvDmanDT
> > >MSN: dvdmandt~hotmail.com
> > >Mail: dvdmandt~telia.com
> > >"Shawn McKenzie" <[EMAIL PROTECTED]> skrev i meddelandet
> > >news:[EMAIL PROTECTED]
> > >> Is it possible to run the current win32 PHP under DOS only?  I have a
> > >> bootable DOS disk with PHP and when I attempt to run it I get "This
> > >> program can not run in DOS mode.".
> > >>
> > >> Is there a DOS binary???
> > >>
> > >> TIA
> > >> -Shawn
> > >
> > >-- 
> > >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
>
>
> ___________________________________________________________
> Sent by ePrompter, the premier email notification software.
> Free download at http://www.ePrompter.com.

--- End Message ---
--- Begin Message ---
I want to write a script that will check if the server is down if it is I
want to redirect the user to another site, the backup server.

Similarly I want users who go on to the seondary site when the main server
is UP to be redirected to the main site.

Can this be done using PHP. If not can you point me in the right direction?

Kind regards,


Ross Hulford 

--- End Message ---

Reply via email to