Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 6 of 6

Thread: PHP and Cygwin

  1. #1
    Regular Coder
    Join Date
    Jul 2002
    Posts
    165
    Thanks
    0
    Thanked 0 Times in 0 Posts

    PHP and Cygwin

    Hiya, I've setup php for winXP and configured the mod_perl to work as well, next step I want to be able to run CGI/perl scripts in conjunction with Cygwin.

    Why? Because I want to be able to use my perl scripts and sed & awk together... erm, on windows too, can I install php for unix with cygwin?

  • #2
    Super Moderator
    Join Date
    May 2002
    Location
    Perth Australia
    Posts
    4,108
    Thanks
    11
    Thanked 101 Times in 99 Posts
    Hi , if you have cygwin in your PATH , say 'c:/cygwin/bin' then thats really all you need to do e.g.

    PHP Code:
    <?php 
    exec
    'ps -eW' $yaks ); 
    print_r($yaks);
    ?>
    PERL cgi scripts should find the cygwin tools as easily , mod_perl I assume you need to use exec or backticks or whatever it is PERL uses


    <you probably know this but anyway>
    If you have installed cygwin it should have added itself to your PATH ... tpye 'SET' in command window to check...
    if not , right click 'my computer' , click the advanced tab , click 'environment variables' , in the 'system variables' window select 'Path' , click 'edit' and add c:/whatever/cygwin/bin to the end of that line , you will then probably need to restart.
    You can do this via command line as well , type 'SET /?'
    </you probably know this but anyway />
    resistance is...

    MVC is the current buzz in web application architectures. It comes from event-driven desktop application design and doesn't fit into web application design very well. But luckily nobody really knows what MVC means, so we can call our presentation layer separation mechanism MVC and move on. (Rasmus Lerdorf)

  • #3
    Regular Coder
    Join Date
    May 2004
    Location
    sweden
    Posts
    236
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Waking up this thread

    I just discovered to my disappointment that PHP is not in a package for cygwin. Does anyone have info on how to install it?

    I want to be able to use PHP in cygwin to perform tasks without having to write and run a script or have a webserver going on my desktop.
    Carl McDade
    _____________
    Hiveminds Magazine
    for web publisher and community builders
    eRuby Tutorials

  • #4
    Regular Coder
    Join Date
    Jun 2002
    Location
    Sheffield, UK
    Posts
    552
    Thanks
    0
    Thanked 0 Times in 0 Posts
    whats wrong with using CLI PHP for windows?
    "To be successful in IT you don't need to know everything - just where to find it in under 30 seconds"

    (Me Me Me Me Me Me Me Me Me)

  • #5
    Senior Coder Mhtml's Avatar
    Join Date
    Jun 2002
    Location
    Sydney, Australia
    Posts
    3,531
    Thanks
    0
    Thanked 1 Time in 1 Post
    Quote Originally Posted by firepages
    PHP Code:
    <?php 
    exec
    'ps -eW' $yaks ); 
    print_r($yaks);
    ?>
    You certainly seem to like those hairy beasts.
    Omnis mico antequam dominus Spookster!

  • #6
    Super Moderator
    Join Date
    May 2002
    Location
    Perth Australia
    Posts
    4,108
    Thanks
    11
    Thanked 101 Times in 99 Posts
    Quote Originally Posted by Mhtml
    You certainly seem to like those hairy beasts.
    much friendlier than $llama's is all I can say

    As Readme says you can just use your existing win32 CLI binary in cygwin , simply copy the php-cli & php4ts.dll to the cygwin /bin directory or add your current php cli to the PATH.

    You could (if you have gcc & the common build tools (all part of cygwin)) , grab the source & compile PHP from within cygwin , though unless you really just want the challange ... I would not bother , just use the existing win32 binaries.
    resistance is...

    MVC is the current buzz in web application architectures. It comes from event-driven desktop application design and doesn't fit into web application design very well. But luckily nobody really knows what MVC means, so we can call our presentation layer separation mechanism MVC and move on. (Rasmus Lerdorf)


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •