Results 1 to 16 of 16
Thread: VPS-Apache and php install
-
02-23-2012, 04:56 AM #1Newbie
- Join Date
- Feb 2012
- Posts
- 8
VPS-Apache and php install
Hello,
I have rented my first vps and now running ubuntu 10.10
I have been navigating the interwebs and have compiled a list of commands to install webmin,apache,mysql etc.
## install perl modules
sudo apt-get install perl libnet-ssleay-perl openssl libauthen-pam-perl libpam-runtime libio-pty-perl -y
##get libmd5
wget *debian.org/debian/pool/main/libm/libmd5-perl/libmd5-perl_2.03-1_all.deb
##install libmd5
dpkg -i libmd5-perl_2.03-1_all.deb
##get webmin
wget -O webmin_1.520_all.deb *sourceforge.net/projects/webadmin/files/webmin/1.520/webmin_1.520_all.deb/download
##install webmin
dpkg -i webmin_1.520_all.deb
##fix dependencies
sudo apt-get -f install
##restart webmin
sudo /etc/init.d/webmin restart
##install apache2 and php
sudo apt-get install apache2 -y
sudo apt-get install php5 -y
sudo apt-get install libapache2-mod-php5 -y
sudo /etc/init.d/apache2 restart
This is what I have so far.
I can get on webmin and upload files using proftp and thats great my issue however is i'm trying to install a php script from sourceforge /projects/phpservermon/ after trying nagios and nconf and figuring it was a little overkill for me needs.
The issue is I can run a simple php file with phpinfo and it returns everything but I cannot run the install.php even though its in the same directory with the same permissions.
In Chrome I get a 500 error and in firefox I get a blank screen
My apache2 logs just say missing favicon.
Has anyone come across this before and can shed any light on this?
My apologies if this is in the wrong forum.
Regards
GM
-
02-23-2012, 05:33 AM #2Web Hosting Master
- Join Date
- Feb 2005
- Location
- United Kingdom
- Posts
- 3,476
check the logs to see the issue, as normally using logs you can debug and fix the issue
Explore our outstanding VPS choices tailored to your budget, and we welcome reasonable offers.
VPS Price Match Guarantee on: All our range of DDOS protected XEN HVM VPS
== Contact us for any online solution development or managed / unmanaged vps hosting ==
-
02-23-2012, 05:39 AM #3Rebooting is a hack, not a fix
- Join Date
- May 2008
- Location
- Citrus Heights, CA
- Posts
- 1,887
you have a .htaccess file in there by chance?
iWebFusion.Net - Shared / Reseller / VPS / Bare Metal / Colocation / IP Transit / Networking
*Simply Hosting - Wholly owned networks, in-house staff, legions of fans!
-
02-23-2012, 05:46 AM #4Newbie
- Join Date
- Feb 2012
- Posts
- 8
I'm at work at the moment so ill have to check later on the logs, however the apache logs said nothing bar the favicon bit.
I have no .htaccess as I read one was not needed as it was on an apache virtual host?
I'm a bit of a n00b i'm afraid, but eager to learn!
-
02-23-2012, 06:04 AM #5Retired Moderator
- Join Date
- Feb 2005
- Location
- Australia
- Posts
- 5,849
Each domain is usually set up with separate log files - you may have been checking the logs for the main server. Check the config files and inside the virtualhost container for this domain you should find the path to its log files.
I have no .htaccess as I read one was not needed as it was on an apache virtual host?Chris
"Some problems are so complex that you have to be highly intelligent and well informed just to be undecided about them." - Laurence J. Peter
-
02-23-2012, 06:12 AM #6Newbie
- Join Date
- Feb 2012
- Posts
- 8
Thanks for the help so far.
Ill boot my netbook up at lunch and take a closer look at the log files.
Much appreciated!
gm
-
02-23-2012, 06:22 AM #7WHT Addict
- Join Date
- Dec 2011
- Location
- World Wide Web
- Posts
- 124
Have you tried it running it through command line
php install.php
or simply executing it ./install.php (with execution permissions granted)
Do you get any error there?
-
02-23-2012, 06:51 AM #8Newbie
- Join Date
- Feb 2012
- Posts
- 8
I ran that from ssh on my phone php install.php just returned a line.
chmod +x install.php then ./install.php said
line1:?PHP: No such file or directory
line3: /bin: is a directory
Line 4: Classes: command not found.
So it seems like doing that will parse the file, maybe the script is borked.
I might try and install Joomla to see if that works?
Thanks GM
-
02-23-2012, 07:34 AM #9Retired Moderator
- Join Date
- Feb 2005
- Location
- Australia
- Posts
- 5,849
To run a file like that from the command line it needs a shebang, ie. the first line must be something like
Code:#!/usr/bin/php
Code:php -f install.php
Best just to find those log files!Chris
"Some problems are so complex that you have to be highly intelligent and well informed just to be undecided about them." - Laurence J. Peter
-
02-23-2012, 08:06 AM #10Web Hosting Guru
- Join Date
- Mar 2008
- Location
- /usr/bin/kvm
- Posts
- 261
I smell permissions error. If suHosin is installed, it'd complaint about the folder that scripts are in writable by group and wouldn't run the script.
-
02-23-2012, 09:23 AM #11Newbie
- Join Date
- Feb 2012
- Posts
- 8
Just going to get the logs...
-
02-23-2012, 09:26 AM #12Newbie
- Join Date
- Feb 2012
- Posts
- 8
Hi again and thanks for replying, Here are the logs.. the ip addresses have been changed to protect the innocent
other log:
<IP ADDRESS> - - [23/Feb/2012:09:30:08 +0000] "GET /install.php HTTP/1.1" 500 275 "-" "Mozilla/5.0 (Linux; U; Android 2.3.3; en-gb; Scroll Essential Build/GRI40) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1"
<IP ADDRESS> - - [23/Feb/2012:09:30:08 +0000] "GET /favicon.ico HTTP/1.1" 404 510 "http://<IP ADDRESS>/install.php" "Mozilla/5.0 (Linux; U; Android 2.3.3; en-gb; Scroll Essential Build/GRI40) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1"
<IP ADDRESS> - - [23/Feb/2012:09:35:57 +0000] "GET /install.php HTTP/1.1" 500 275 "-" "Mozilla/5.0 (Linux; U; Android 2.3.3; en-gb; Scroll Essential Build/GRI40) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1"
<IP ADDRESS> - - [23/Feb/2012:09:42:46 +0000] "GET /install.php HTTP/1.1" 500 275 "-" "Mozilla/5.0 (Linux; U; Android 2.3.3; en-gb; Scroll Essential Build/GRI40) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1"
<IP ADDRESS> - - [23/Feb/2012:09:56:50 +0000] "GET /install.php HTTP/1.1" 500 275 "-" "Mozilla/5.0 (Ubuntu; X11; Linux i686; rv:9.0.1) Gecko/20100101 Firefox/9.0.1"
<IP ADDRESS> - - [23/Feb/2012:09:56:52 +0000] "GET /favicon.ico HTTP/1.1" 404 510 "-" "Mozilla/5.0 (Ubuntu; X11; Linux i686; rv:9.0.1) Gecko/20100101 Firefox/9.0.1"
<IP ADDRESS> - - [23/Feb/2012:09:56:52 +0000] "GET /favicon.ico HTTP/1.1" 404 509 "-" "Mozilla/5.0 (Ubuntu; X11; Linux i686; rv:9.0.1) Gecko/20100101 Firefox/9.0.1"
<IP ADDRESS> - - [23/Feb/2012:10:57:18 +0000] "GET /install.php HTTP/1.1" 500 275 "-" "Mozilla/5.0 (Linux; U; Android 2.3.3; en-gb; Scroll Essential Build/GRI40) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1"
<IP ADDRESS> - - [23/Feb/2012:13:11:51 +0000] "GET /install.php HTTP/1.1" 500 275 "-" "Mozilla/5.0 (Ubuntu; X11; Linux i686; rv:9.0.1) Gecko/20100101 Firefox/9.0.1"
<Apache log>
[Thu Feb 23 10:58:03 2012] [notice] Apache/2.2.16 (Ubuntu) PHP/5.3.3-1ubuntu9.10 with Suhosin-Patch configured -- resuming normal operations
-
02-23-2012, 10:11 AM #13Newbie
- Join Date
- Feb 2012
- Posts
- 8
I have turned on some debugging in the php script and its stopping on some MYSQL, so maybe that is the issue.
More investigation required.
-
02-23-2012, 10:33 AM #14Retired Moderator
- Join Date
- Feb 2005
- Location
- Australia
- Posts
- 5,849
What you have there is the access log. Look for the error log, probably in the same directory. It should show the reason for the 500 errors.
Chris
"Some problems are so complex that you have to be highly intelligent and well informed just to be undecided about them." - Laurence J. Peter
-
02-23-2012, 10:47 AM #15Newbie
- Join Date
- Feb 2012
- Location
- Poland
- Posts
- 22
I think its 500 error is by bad PHP
-
02-23-2012, 02:24 PM #16Newbie
- Join Date
- Feb 2012
- Posts
- 8
I would like to thank everyone for the advice you have given.
I have solved this by installing PHPmyadmin.
sudo apt-get install phpmyadmin.
I'm not sure why installing this solved the issue as I never even needed to log in to it.
I only installed it to have easier control of the database.
Anyway its sorted so thanks again.
GM
Seems I can't mark this as SOLVED, if a passing mod would be so kind.
Similar Threads
-
Install php/mysql/apache on vps hosting
By levani in forum VPS HostingReplies: 36Last Post: 02-14-2010, 10:25 AM -
centos:apache,php, yum install or source install?
By cchere in forum Hosting Security and TechnologyReplies: 2Last Post: 08-29-2006, 05:14 PM -
Install Apache, PHP, and MySQL...PLEASE HELP!!!
By Sage55 in forum Other Offers & RequestsReplies: 2Last Post: 05-06-2003, 12:27 AM -
Install apache, php, mysql...
By aweller in forum Employment / Job OffersReplies: 4Last Post: 04-06-2003, 12:20 PM -
Need someone to install php to get it to work with apache
By dallassmith in forum Employment / Job OffersReplies: 3Last Post: 01-20-2003, 02:26 AM