jetty server executing php Announcing the arrival of Valued Associate #679: Cesar Manara ...

Did Kevin spill real chili?

List *all* the tuples!

How to draw this diagram using TikZ package?

The logistics of corpse disposal

How to recreate this effect in Photoshop?

How can I fade player when goes inside or outside of the area?

Why was the term "discrete" used in discrete logarithm?

When is phishing education going too far?

Should I use Javascript Classes or Apex Classes in Lightning Web Components?

Is above average number of years spent on PhD considered a red flag in future academia or industry positions?

Is there a concise way to say "all of the X, one of each"?

How do I keep my slimes from escaping their pens?

Can inflation occur in a positive-sum game currency system such as the Stack Exchange reputation system?

How discoverable are IPv6 addresses and AAAA names by potential attackers?

Doubts about chords

Why did the IBM 650 use bi-quinary?

What is the correct way to use the pinch test for dehydration?

If 'B is more likely given A', then 'A is more likely given B'

3 doors, three guards, one stone

Why is high voltage dangerous?

How do I determine if the rules for a long jump or high jump are applicable for Monks?

How do I stop a creek from eroding my steep embankment?

Why is "Captain Marvel" translated as male in Portugal?

When to stop saving and start investing?



jetty server executing php



Announcing the arrival of Valued Associate #679: Cesar Manara
Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern)
Come Celebrate our 10 Year Anniversary!Password protect app in jettyNullPointerException on jetty 7 startup with jetty deployment descriptorNginx + PHP-FPM = “Random” 502 Bad Gateway503 error (Service Unavailable) in the jetty serverProxy Error 502 “Reason: Error reading from remote server” with Apache 2.2.3 (Debian) mod_proxy and Jetty 6.1.18“Keep-Alive” response header for Jetty Web serverHow to have Jetty redirect http to httpsJetty interprets JETTY_ARGS as file nameDisable Connection:keep alive in Jetty 9Cannot recompile PHP on Mac OS X and enable PHP calendar





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ height:90px;width:728px;box-sizing:border-box;
}







1















I want to configure so that jetty runs PHP files, but have been unsuccessful so far. I have Jetty WTP tools installed in my Eclipse IDE.



When I start up the Jetty server. I got the exception: java.lang.ClassNotFoundException org.mortbay.servlet.CGI: org.mortbay.servlet.CGI and javax.servlet.UnavailableException: org.mortbay.servlet.CGI. I put a simple php file(index.php) under my WebContent folder. I also downloaded this library and added it to the classpath(Eclipse: build path and add external jar). I have no clue now what I've done wrong. I also compiled php with:



./configure --with-fastcgi=/usr/local
make
sudo make install


And my web.xml file looks like this:



<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.4"
xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
<display-name>Sample PHP Application</display-name>
<servlet>
<servlet-name>PHP</servlet-name>
<servlet-class>org.mortbay.servlet.CGI</servlet-class>
<init-param>
<param-name>commandPrefix</param-name>
<param-value>/usr/local/bin/php-cgi-fix</param-value>
</init-param>
</servlet>

<servlet-mapping>
<servlet-name>PHP</servlet-name>
<url-pattern>/index.php/*</url-pattern>
</servlet-mapping>

<welcome-file-list>
<welcome-file>index.php</welcome-file>
</welcome-file-list> </web-app>


It could be my php-cgi-fix file, I got the followig text i terminal when i open it:



$ /usr/local/bin/php-cgi-fix ; exit;
/usr/local/bin/php-cgi-fix: line 3: /usr/bin/php-cgi: No such file or directory
logout


Shouldn't be /usr/local/php-cgi instead? Ok I tried that now, but still I got the same ecxeptions when I launch the server.



(I really don't like to use maven too










share|improve this question
















bumped to the homepage by Community 9 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
















  • add output "ls -al /usr/bin/php-cgi"

    – ooshro
    Feb 25 '11 at 14:05


















1















I want to configure so that jetty runs PHP files, but have been unsuccessful so far. I have Jetty WTP tools installed in my Eclipse IDE.



When I start up the Jetty server. I got the exception: java.lang.ClassNotFoundException org.mortbay.servlet.CGI: org.mortbay.servlet.CGI and javax.servlet.UnavailableException: org.mortbay.servlet.CGI. I put a simple php file(index.php) under my WebContent folder. I also downloaded this library and added it to the classpath(Eclipse: build path and add external jar). I have no clue now what I've done wrong. I also compiled php with:



./configure --with-fastcgi=/usr/local
make
sudo make install


And my web.xml file looks like this:



<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.4"
xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
<display-name>Sample PHP Application</display-name>
<servlet>
<servlet-name>PHP</servlet-name>
<servlet-class>org.mortbay.servlet.CGI</servlet-class>
<init-param>
<param-name>commandPrefix</param-name>
<param-value>/usr/local/bin/php-cgi-fix</param-value>
</init-param>
</servlet>

<servlet-mapping>
<servlet-name>PHP</servlet-name>
<url-pattern>/index.php/*</url-pattern>
</servlet-mapping>

<welcome-file-list>
<welcome-file>index.php</welcome-file>
</welcome-file-list> </web-app>


It could be my php-cgi-fix file, I got the followig text i terminal when i open it:



$ /usr/local/bin/php-cgi-fix ; exit;
/usr/local/bin/php-cgi-fix: line 3: /usr/bin/php-cgi: No such file or directory
logout


Shouldn't be /usr/local/php-cgi instead? Ok I tried that now, but still I got the same ecxeptions when I launch the server.



(I really don't like to use maven too










share|improve this question
















bumped to the homepage by Community 9 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
















  • add output "ls -al /usr/bin/php-cgi"

    – ooshro
    Feb 25 '11 at 14:05














1












1








1








I want to configure so that jetty runs PHP files, but have been unsuccessful so far. I have Jetty WTP tools installed in my Eclipse IDE.



When I start up the Jetty server. I got the exception: java.lang.ClassNotFoundException org.mortbay.servlet.CGI: org.mortbay.servlet.CGI and javax.servlet.UnavailableException: org.mortbay.servlet.CGI. I put a simple php file(index.php) under my WebContent folder. I also downloaded this library and added it to the classpath(Eclipse: build path and add external jar). I have no clue now what I've done wrong. I also compiled php with:



./configure --with-fastcgi=/usr/local
make
sudo make install


And my web.xml file looks like this:



<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.4"
xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
<display-name>Sample PHP Application</display-name>
<servlet>
<servlet-name>PHP</servlet-name>
<servlet-class>org.mortbay.servlet.CGI</servlet-class>
<init-param>
<param-name>commandPrefix</param-name>
<param-value>/usr/local/bin/php-cgi-fix</param-value>
</init-param>
</servlet>

<servlet-mapping>
<servlet-name>PHP</servlet-name>
<url-pattern>/index.php/*</url-pattern>
</servlet-mapping>

<welcome-file-list>
<welcome-file>index.php</welcome-file>
</welcome-file-list> </web-app>


It could be my php-cgi-fix file, I got the followig text i terminal when i open it:



$ /usr/local/bin/php-cgi-fix ; exit;
/usr/local/bin/php-cgi-fix: line 3: /usr/bin/php-cgi: No such file or directory
logout


Shouldn't be /usr/local/php-cgi instead? Ok I tried that now, but still I got the same ecxeptions when I launch the server.



(I really don't like to use maven too










share|improve this question
















I want to configure so that jetty runs PHP files, but have been unsuccessful so far. I have Jetty WTP tools installed in my Eclipse IDE.



When I start up the Jetty server. I got the exception: java.lang.ClassNotFoundException org.mortbay.servlet.CGI: org.mortbay.servlet.CGI and javax.servlet.UnavailableException: org.mortbay.servlet.CGI. I put a simple php file(index.php) under my WebContent folder. I also downloaded this library and added it to the classpath(Eclipse: build path and add external jar). I have no clue now what I've done wrong. I also compiled php with:



./configure --with-fastcgi=/usr/local
make
sudo make install


And my web.xml file looks like this:



<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.4"
xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
<display-name>Sample PHP Application</display-name>
<servlet>
<servlet-name>PHP</servlet-name>
<servlet-class>org.mortbay.servlet.CGI</servlet-class>
<init-param>
<param-name>commandPrefix</param-name>
<param-value>/usr/local/bin/php-cgi-fix</param-value>
</init-param>
</servlet>

<servlet-mapping>
<servlet-name>PHP</servlet-name>
<url-pattern>/index.php/*</url-pattern>
</servlet-mapping>

<welcome-file-list>
<welcome-file>index.php</welcome-file>
</welcome-file-list> </web-app>


It could be my php-cgi-fix file, I got the followig text i terminal when i open it:



$ /usr/local/bin/php-cgi-fix ; exit;
/usr/local/bin/php-cgi-fix: line 3: /usr/bin/php-cgi: No such file or directory
logout


Shouldn't be /usr/local/php-cgi instead? Ok I tried that now, but still I got the same ecxeptions when I launch the server.



(I really don't like to use maven too







php-fpm jetty






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Feb 25 '11 at 13:00









ooshro

9,1482627




9,1482627










asked Feb 25 '11 at 12:35









einsteineinstein

1093




1093





bumped to the homepage by Community 9 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.







bumped to the homepage by Community 9 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.















  • add output "ls -al /usr/bin/php-cgi"

    – ooshro
    Feb 25 '11 at 14:05



















  • add output "ls -al /usr/bin/php-cgi"

    – ooshro
    Feb 25 '11 at 14:05

















add output "ls -al /usr/bin/php-cgi"

– ooshro
Feb 25 '11 at 14:05





add output "ls -al /usr/bin/php-cgi"

– ooshro
Feb 25 '11 at 14:05










2 Answers
2






active

oldest

votes


















0














Install php-cgi(contain /usr/bin/php-cgi).



Ubuntu/Debian:



sudo apt-get install php5-cgi


CentOS/Red Hat/Fedora:



yum install php-cli


In Mac OS try create symlink:



sudo ln -s /usr/bin/php /usr/bin/php-cgi





share|improve this answer


























  • you have missunderstood me. I want jetty to be able to run php code not only java

    – einstein
    Feb 25 '11 at 12:51











  • For run PHP code you need install PHP

    – ooshro
    Feb 25 '11 at 12:53











  • yeah I've already done that. But configuring the servlet and server is the next step which I'm in

    – einstein
    Feb 25 '11 at 12:55











  • add output "ls -al /usr/bin/php-cgi" and what your OS?

    – ooshro
    Feb 25 '11 at 12:57











  • I'm conifguring the server on my mac. but the php is working I think. It is the server who isn't

    – einstein
    Feb 25 '11 at 13:05



















0














If your php-cgi-fix script comes from Jetty and PHP then it is no longer required, you can just call php-cgi directly.



22 days after you asked the question but if you are still not there then I'd suggest getting this running outside of Eclipse first. Enable debugging and look for lines in the log containing "CGI" and also set init_param "ignoreExitState" to "true".



Questions about Jetty and PHP come up about once a year on the mailing list so my guess is very few people are doing this. You may well be the first to do this on a Mac with a particular version of Jetty.






share|improve this answer
























    Your Answer








    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "2"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fserverfault.com%2fquestions%2f240213%2fjetty-server-executing-php%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    2 Answers
    2






    active

    oldest

    votes








    2 Answers
    2






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    0














    Install php-cgi(contain /usr/bin/php-cgi).



    Ubuntu/Debian:



    sudo apt-get install php5-cgi


    CentOS/Red Hat/Fedora:



    yum install php-cli


    In Mac OS try create symlink:



    sudo ln -s /usr/bin/php /usr/bin/php-cgi





    share|improve this answer


























    • you have missunderstood me. I want jetty to be able to run php code not only java

      – einstein
      Feb 25 '11 at 12:51











    • For run PHP code you need install PHP

      – ooshro
      Feb 25 '11 at 12:53











    • yeah I've already done that. But configuring the servlet and server is the next step which I'm in

      – einstein
      Feb 25 '11 at 12:55











    • add output "ls -al /usr/bin/php-cgi" and what your OS?

      – ooshro
      Feb 25 '11 at 12:57











    • I'm conifguring the server on my mac. but the php is working I think. It is the server who isn't

      – einstein
      Feb 25 '11 at 13:05
















    0














    Install php-cgi(contain /usr/bin/php-cgi).



    Ubuntu/Debian:



    sudo apt-get install php5-cgi


    CentOS/Red Hat/Fedora:



    yum install php-cli


    In Mac OS try create symlink:



    sudo ln -s /usr/bin/php /usr/bin/php-cgi





    share|improve this answer


























    • you have missunderstood me. I want jetty to be able to run php code not only java

      – einstein
      Feb 25 '11 at 12:51











    • For run PHP code you need install PHP

      – ooshro
      Feb 25 '11 at 12:53











    • yeah I've already done that. But configuring the servlet and server is the next step which I'm in

      – einstein
      Feb 25 '11 at 12:55











    • add output "ls -al /usr/bin/php-cgi" and what your OS?

      – ooshro
      Feb 25 '11 at 12:57











    • I'm conifguring the server on my mac. but the php is working I think. It is the server who isn't

      – einstein
      Feb 25 '11 at 13:05














    0












    0








    0







    Install php-cgi(contain /usr/bin/php-cgi).



    Ubuntu/Debian:



    sudo apt-get install php5-cgi


    CentOS/Red Hat/Fedora:



    yum install php-cli


    In Mac OS try create symlink:



    sudo ln -s /usr/bin/php /usr/bin/php-cgi





    share|improve this answer















    Install php-cgi(contain /usr/bin/php-cgi).



    Ubuntu/Debian:



    sudo apt-get install php5-cgi


    CentOS/Red Hat/Fedora:



    yum install php-cli


    In Mac OS try create symlink:



    sudo ln -s /usr/bin/php /usr/bin/php-cgi






    share|improve this answer














    share|improve this answer



    share|improve this answer








    edited Feb 25 '11 at 14:05

























    answered Feb 25 '11 at 12:40









    ooshroooshro

    9,1482627




    9,1482627













    • you have missunderstood me. I want jetty to be able to run php code not only java

      – einstein
      Feb 25 '11 at 12:51











    • For run PHP code you need install PHP

      – ooshro
      Feb 25 '11 at 12:53











    • yeah I've already done that. But configuring the servlet and server is the next step which I'm in

      – einstein
      Feb 25 '11 at 12:55











    • add output "ls -al /usr/bin/php-cgi" and what your OS?

      – ooshro
      Feb 25 '11 at 12:57











    • I'm conifguring the server on my mac. but the php is working I think. It is the server who isn't

      – einstein
      Feb 25 '11 at 13:05



















    • you have missunderstood me. I want jetty to be able to run php code not only java

      – einstein
      Feb 25 '11 at 12:51











    • For run PHP code you need install PHP

      – ooshro
      Feb 25 '11 at 12:53











    • yeah I've already done that. But configuring the servlet and server is the next step which I'm in

      – einstein
      Feb 25 '11 at 12:55











    • add output "ls -al /usr/bin/php-cgi" and what your OS?

      – ooshro
      Feb 25 '11 at 12:57











    • I'm conifguring the server on my mac. but the php is working I think. It is the server who isn't

      – einstein
      Feb 25 '11 at 13:05

















    you have missunderstood me. I want jetty to be able to run php code not only java

    – einstein
    Feb 25 '11 at 12:51





    you have missunderstood me. I want jetty to be able to run php code not only java

    – einstein
    Feb 25 '11 at 12:51













    For run PHP code you need install PHP

    – ooshro
    Feb 25 '11 at 12:53





    For run PHP code you need install PHP

    – ooshro
    Feb 25 '11 at 12:53













    yeah I've already done that. But configuring the servlet and server is the next step which I'm in

    – einstein
    Feb 25 '11 at 12:55





    yeah I've already done that. But configuring the servlet and server is the next step which I'm in

    – einstein
    Feb 25 '11 at 12:55













    add output "ls -al /usr/bin/php-cgi" and what your OS?

    – ooshro
    Feb 25 '11 at 12:57





    add output "ls -al /usr/bin/php-cgi" and what your OS?

    – ooshro
    Feb 25 '11 at 12:57













    I'm conifguring the server on my mac. but the php is working I think. It is the server who isn't

    – einstein
    Feb 25 '11 at 13:05





    I'm conifguring the server on my mac. but the php is working I think. It is the server who isn't

    – einstein
    Feb 25 '11 at 13:05













    0














    If your php-cgi-fix script comes from Jetty and PHP then it is no longer required, you can just call php-cgi directly.



    22 days after you asked the question but if you are still not there then I'd suggest getting this running outside of Eclipse first. Enable debugging and look for lines in the log containing "CGI" and also set init_param "ignoreExitState" to "true".



    Questions about Jetty and PHP come up about once a year on the mailing list so my guess is very few people are doing this. You may well be the first to do this on a Mac with a particular version of Jetty.






    share|improve this answer




























      0














      If your php-cgi-fix script comes from Jetty and PHP then it is no longer required, you can just call php-cgi directly.



      22 days after you asked the question but if you are still not there then I'd suggest getting this running outside of Eclipse first. Enable debugging and look for lines in the log containing "CGI" and also set init_param "ignoreExitState" to "true".



      Questions about Jetty and PHP come up about once a year on the mailing list so my guess is very few people are doing this. You may well be the first to do this on a Mac with a particular version of Jetty.






      share|improve this answer


























        0












        0








        0







        If your php-cgi-fix script comes from Jetty and PHP then it is no longer required, you can just call php-cgi directly.



        22 days after you asked the question but if you are still not there then I'd suggest getting this running outside of Eclipse first. Enable debugging and look for lines in the log containing "CGI" and also set init_param "ignoreExitState" to "true".



        Questions about Jetty and PHP come up about once a year on the mailing list so my guess is very few people are doing this. You may well be the first to do this on a Mac with a particular version of Jetty.






        share|improve this answer













        If your php-cgi-fix script comes from Jetty and PHP then it is no longer required, you can just call php-cgi directly.



        22 days after you asked the question but if you are still not there then I'd suggest getting this running outside of Eclipse first. Enable debugging and look for lines in the log containing "CGI" and also set init_param "ignoreExitState" to "true".



        Questions about Jetty and PHP come up about once a year on the mailing list so my guess is very few people are doing this. You may well be the first to do this on a Mac with a particular version of Jetty.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Mar 20 '11 at 10:49









        Grant GardnerGrant Gardner

        1




        1






























            draft saved

            draft discarded




















































            Thanks for contributing an answer to Server Fault!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fserverfault.com%2fquestions%2f240213%2fjetty-server-executing-php%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            As a Security Precaution, the user account has been locked The Next CEO of Stack OverflowMS...

            117736 Шеррод Примітки | Див. також | Посилання | Навігаційне...

            Маріан Котлеба Зміст Життєпис | Політичні погляди |...