404 error when trying to run PHP application on Glassfish 3.1.1 through Netbeans - netbeans

While there are some similar posts about this issue, none seem to fit my problem exactly, so I would like to ask if anyone knows what I am doing wrong.
I am trying to run a PHP web application that I created in Netbeans. I am using Glassfish 3.1.1 as the web server. Whenever I run the application through Netbeans (by selecting the project, right clicking to get the context menu, then selecting "Run"), my browser opens to what I believe to be the correct url, but all I get is a 404 error page stating the following:
type: Status report
message:
description:The requested resource () is not available.
Am I missing some crucial configuration step?
I have checked my hosts file and it contains the entry:
127.0.0.1 localhost
Is there something else I need to do?
I have PHP 5.3.8 installed and all php commands run from the command line.
Would it be something in the php.ini file that needs to be configured?
I am stumped. Any help would be greatly appreciated.
ANSWERED
Please accept the comment below from Jonathan Spooner as the correct answer.

Just install Quercus within GlassFish 3.x and you can run PHP and Java.

As I stated in the comments, GlassFish and Apache Tomcat are Java application servers. In order to serve PHP pages you'll need to install a web server such as Apache HTTP web server. You'll also need to configure Apache to serve PHP files.
Something that you might look into is WAMP (Windows/Apache/MySql/PHP). This offers a simple way to get up and running quickly with little to no configuration.

Related

Error generating artifacts for the following WSDL (my url) Possible causes can be invoking https when the application is not configured for security

I use payara server and postgres database. I can deploy my project successsfully. I also can open the wsdl page. But I can not open the test page. And when I saw the server log. It show that: log information
But I think I have the jdk.
Any help is appreciative.
I already solve this problem. It said I didnot have jdk. In my ec2 instance, it really has a openjdk. So I think maybe I can not use open jdk. I download oracal jdk 8 from the web. Finally, it is success. If someone get this problem, maybe it can help you.

How to create openshift application for OPENSHIFT ONLINE 3 STARTER (NEW!) server in Eclipse IDE?

I am trying to create an openshift3 application in Eclipse IDE after installing JBoss Developer tool plugin in IDE, But getting below error at the time Sign into OpenShift.
Error: The server type, credentials, or auth scheme might be incorrect:
I have also tried other server hostname like https://console.starter-us-east-1.openshift.com/console/ and much more, but still not working.
While, when I tried to log in using OC tool (OpenShift CLI) with the same credential (as seen in picture), I haven't got any error.
I also tried to run RHC (OpenShift Client Tool) but at the time of RHC setup it is saying "You are not authorized to perform this operation."
Please help me to solve it out.
First of all, it looks like you're using an outdated version of the JBoss Tools Openshift plugin, because the "New Openshift Application" wizard looks a little bit different at the moment. So try to update it:
Help -> About Eclipse -> Installation Details -> Update... - and choose at least all the JBoss Tools plugins that it'll report to you (the best will be to choose everything reported) and update them.
Secondly, what is the URL which you use to access the Openshift web console in your browser? It seems to me that it is https://console.starter-us-east-1.openshift.com. Are you able to login there with your credentials? If yes, the same must work in JBoss Tools Openshift plugin. Check this and this articles for more info about using it.

toy web service on Eclipse- trouble with glassfish4 server

I am new to Java EE, and am trying to learn how to create a web service. I followed the instructions given at this link- http://www.eclipse.org/webtools/community/education/web/t320/Implementing_a_Simple_Web_Service.pdf to create a simple Hello World web service. I got into trouble when trying to get Eclipse to start the glassfish4 server. I get the error shown below-
I am not sure what ${sunappserver.rootdirectory} means and how it is defined. Much appreciate anyone who can help me understand this and get it working.
Check your glassfish installation. This file contains lots of configuration details. Your Exception means it is missing! Maybe there is a backup called domain.xml.bak in the same directory.
Mine is in /usr/local/glassfish4_1/glassfish/domains/domain1/config/domain.xml

Nginx + PHP5-FPM break some web app which works on Apache + PHP5

I have a vps with Debian 6.0.5, installed with Nginx + PHP5-FPM using package from dotdeb using a setup script introduced by a blog. Everything works like charm for my wordpress and phpmyadmin.
Now, I wanted to install beanstalkd into the vps, and decided to use some PHP web app to manage beanstalkd. I've installed phpBeanstalkdAdmin and Beanstalkd console. Both failed to run properly.
phpBeanstalkdAdmin returns a page like
phpBeanstalkdAdmin
Home
About
layout()->content?>
Beanstalkd console displayed an empty tube once server is configured. Before that, the error message is also missing.
When I install both in my local machine running XAMPP, which is Apache + PHP5, and point the configuration to my vps' beanstalkd, it works. Further more, before configuration Beanstalkd console would display proper error message unlike when running on Nginx + PHP5-FPM.
I've tried to use XDebug and didn't find any error or anything wrong when stepping through both web app. Both web app utilizing Zend Framework. I didn't find any specific setup which is required to run Zend Framework on Nginx + PHP5-FPM, and have tried various addition of the basic configuration such as fixing Path_Info & PHP_SELF
I would really love to use Nginx instead of Apache for my vps as I have a small box.
Any insight or guide on this issue is much appreciated.
Check the value of PHP's short_open_tag on both (should be listed in phpinfo). My guess is you need to turn it on for your VPS.

gwt response at run as web application

In my gwt application,i am using php code for back end process...i can get response from that php file when i deploy on iis server...
but i can't get response from that php file when i running from the eclipse...
(i.e)
can get response from this url "http://localhost/sample/index.php"
can't get response from this url "http://localhost:8888/sample/index.php" it returns my php code...
It's probably possible to run PHP on Jetty, too: See these instructions - not sure, if they still work with Jetty 6, and I really haven't tried it.
But I would recommend to simply run a separate PHP server (maybe deployed from a separate Eclipse project). See this GWT FAQ entry: How do I use my own server in hosted mode instead of GWT's built-in Jetty instance
You could use the gwt -noserver option
"The -noserver option instructs hosted mode to not start the embedded Jetty instance. In its place, you would run the J2EE container of your choice and simply use that in place of the embedded Jetty instance."
I don't know if this would solve your problem