Ubuntu server in Google cloud won't run apps in browser - php

I've started a plain Ubuntu 15.10 instance on Google Cloud and installed a couple of apps via the command line as per their installation instructions:
http://wiki.resourcespace.org/index.php/Installing_on_Ubuntu_Linux]http://wiki.resourcespace.org/index.php/Installing_on_Ubuntu_Linux1
webmin.com/deb.html*
*I have opened up port 10000 on the firewall for webmin.
Everything seemed to go according to plan on the command line, however in the case of both applications, when it comes to the bit where I load up the app in my browser, my browser is returning the "web page not available" message.
If I go to the base IP address of the server I get the Apache2 Ubuntu default page so I know apache is running.
Can anyone point me in the right direction as to why I can't see the apps in my browser?
I guess there's something I need to enable or a service I should start, but I'm honestly not sure what I should be looking for.
It's probably worth mentioning that I have another Google Cloud instance where I did the bitnami "one click install" of ResourceSpace, and on that server I separately managed to install and run webmin with no problems at all. I want to set up a clean install that directly refers back to the original software vendor for easy updates as the bitnami install is out-of-date and is proving difficult to update.

Apps weren't properly installed.
Re-ran a clean install and everything worked.

Have you tried opening all your ports?

Related

how do you run a php file on a chromebook?

I've been looking on YouTube and other places, i'm not sure how, this place is filled with smart people so i thought i would ask you guys!
This blog post lists some options:
Termux lets you install a Linux environment and has a PHP distribution (but it is highly restricted and you will probably run into plenty of frustrating limits)
You can enable Developer Mode and then press Ctrl-Alt-T to open a crosh shell, from which you get type shell to get a regular shell and from there either:
Install Linux and dual-boot
Create a chroot environment to develop in
Meanwhile OS 69 introduces Linux for Chromebook which should be an easier way to get a Linux environment.
… but that said, Chromebooks are generally low-powered machines that aren't ideal hardware for doing development work. I'd look at setting up a remote server and doing my dev work over SSH.
You need to install MAMP or XAMPP on your Chromebook. MAMP or XAMPP will turn your Chromebook into a web server capable of reading PHP.
EDITED:
Since you can't run MAMP or XAMPP on your Chromebook, then you should look into using a Cloud solution such as AWS or Google Cloud.

Code only works if I use the Xdebug extension

When I started my latest project I learned how to use the xdebug extension and I have been using it ever since. Now I am ready to spin up a server and go in to production with this project and my site doesn't fully work. The frontend pages seem to work, which are php based as well, but the backend endpoints that query the database and return some data to the frontend always are returning a 500 status code. So I attach xdebug and figure out how to run it remotely and the pages all start working without any code changes. I go in to the php.ini file and turn it back off and the pages continue to work. Since this is an AWS EC2 server, I delete the instance and create a new one running the same initialization scripts I wrote to install all the software and I get the exact same issue. The server doesn't work until I follow the xdebug install instructions and restart apache2. And like before even when I unattach the xdebug extension via the php.ini file, the code continues to work. Even after the system is rebooted it still continues to work so whatever is being fixed appears to be permanent.
What would building and attaching the xdebug extension, and restarting Apache2, do to the a LAMP stack that would make my code work, even after the extension has been turned off? My server is being built with scripts that run various apt-get install commands with no binaries provided by me as it all is community provided programs. Like clockwork it breaks every time I rebuild the machine until I apply the extension. I can automate that in to my build scripts if I have to, but it is driving me a bit nuts that I don't understand what is happening.
When the server sends a 500 error, normally you get an entry to the php_error.log. So first check this file. Maybe there is some difference in memory limits, max. post variables etc.
I would suggest you to try to find calls of any xdebug specific functions such as var_dump() or any prefixed by xdebug_ in your code:
https://xdebug.org/docs/all_functions
What would building and attaching the xdebug extension, and restarting Apache2, do to the a LAMP stack that would make my code work, even after the extension has been turned off?
Installing one piece of software can bring with it another. If you sudo apt install php-xdebug without php installed, it will install php.

Odoo installation on XAMPP and rest api

I am able to install the odoo on my system by downloading it from bitnami url and it was installed successfully at http://localhost:82 but I want to get installed on xampp.
I've a xampp installed on a windows machine and I want to install odoo on it so can anyone help me out on this, if its possible or not and if yes then how can i do that. I also want to use the rest api.
Please help me out on this one.
Thanks
If you are talking about a cponflict as in WAR, I don't think so. :)
odoo is an ERP, with its own server (port 8069)
XAMPP is a combination of programs, which happen to be able to serve webpages. By default Apache (the A) is responding to port 80 and sometimes 443 (depending on configuration). It is possible to modify either odoo or Apache to respond to other ports, but if you stick to the default config, they should not be in each others way.
The one thing I think of which might give you some issues, is the dependencies of odoo and what XAMPP is installing. There might be some conflicts with these, also depending on the OS you are installing your programs.
Why not install both of them, and give us a small report what happened and what you think of it.....

NewRelic install on centos and cpanel

I'm trying to install NewRelic on my website, I use PHP, cPanel(VPS/dedicated) and Centos (64bit) for my server, I've installed the server monitoring part right on my server but when I try to install the 'app' part on my server I can't get that to install, I followed the instruction links http://newrelic.com/docs/php/new-relic-for-php
but to no success, has anyone got any ideas as to why this maybe? I have restared httpd and appache multiple times and given it some time to propogate etc..
The problem of this is having WHM installed and many PHP services installed, you should try this guide I found:
New Relic for PHP w/cPanel
We have few dedicated servers on HostGator. Few months back we had installed "NewRelic" on our server for monitoring, later we started having issues and here is what HostGator Tech Team said
"While it's possible to configure a cPanel server to use a non-cPanel
PHP version, it's complicated to configure and we will not support it
or set it up. PHP gets compiled from source by cPanel normally and it
should be left this way, as it interacts with a number of other
components on the server in complicated ways, as you found out today.
We recommend completely removing the custom "Newrelic" repository as
well as the packages it installed in order to avoid further
compatibility problems."
and here is what "NewRelic" team said
"I wasn't trying to suggest that Hostgator's assertion was wrong. I
was just trying to figure out which instructions to go over with you."
Make sure to check compatibility before installing it. Installation instruction can be found at http://www.networkredux.com/answers/view/Hosting/Control_Panels/WHM/cPanel/162
New Relic Needs to document this cpanel compatibility better, I know it's my fault for not researching but while using a hostgator dedicated server with cpanel/whm I got new relic up and running. . then my server became a huge mess if improperly configured files and a few days of reading and learning to get it straightened out - I understand my fault entirely but a big ass CPANEL/WHM <- CAREFULL sign might have helped :P

Best PHP download to keep all my options open?

In the past, I used WAMPserver on windows to parse PHP for me. This is a pre-configured package, focussed on working with MySQL.
When I tried to run PostgreSQL, I got error messages that said that my version of PHP wasn't compiled to work with PostgreSQL.
So, I've recently uninstalled WAMP and every associated with it. I've downloaded Apache 2.2.11 with openSSL, installed as admin(you know, run the command prompt as administrator, cd to the directory where the download was done and have it executed, so the install was done as admin).
That's that. I now have Apache installed, "it works" shows up, so I'm that far.
Now I'm wondering, do I download the exe and install, or the zip, or something else.
What is the best thing to do to make sure that the PHP on my system can handle everything I can ever throw at it?
Also, PHP first, or MySQL/Postgre first.
And lastly, what about PEAR? I need PEAR installed, which isn't standard on Windows. I'm guessing the pear.bat file in the PHP downloads will do that for me?
EDIT: I see one close vote, yet no comment as to why. It makes me wonder how people who are so lazy and rude got to have somany points.
I would recommend downloading the zip package, as configuring php is not really that difficult, and it allows you to add features as needed.
As for whether first to install php or MySQL/PostgreSQL, - it does not really matter. You can install them in any order.
Your guess regarding PEAR is quite correct
i haven't used wamp before, so i can't comment on that
i do however use xampp which sounds very similar
in xampp if i want to enable postgres support i edit the php.ini file and uncomment the postgres section of the ini file, same with any of the extensions that i need
perhaps this might be an alternative you can try if you get stuck
There are many ways to setup a HTTP server/PHP/database machine. Sometimes the behaviour of your development setup will differ from the live server's.
I would recommend finding out the setup your web host is using, then getting a vmware appliance image that fits that as close as possible and get any additional software using it's package manager (which is easier that installing stuff on Windows).
Setup a file sharing link between the VM and the host, make sure you can view the VM's port 80 in a browser running in your host OS and you're set.

Categories