Results 1 to 16 of 16
  1. #1

    * 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

  2. #2
    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 ==

  3. #3
    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!

  4. #4
    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!

  5. #5
    Join Date
    Feb 2005
    Location
    Australia
    Posts
    5,849
    Quote Originally Posted by grand master View Post
    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.
    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?
    It's not needed, but incorrect / unsupported commands in .htaccess files are often the cause of mysterious http 500 errors. If you don't have one, don't worry about it.
    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

  6. #6
    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

  7. #7
    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?

  8. #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

  9. #9
    Join Date
    Feb 2005
    Location
    Australia
    Posts
    5,849
    Quote Originally Posted by grand master View Post
    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.
    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
    But don't add it - there's no need for that in a PHP script meant to be accessed via the web. You could alternatively run the file with:
    Code:
    php -f install.php
    but even that's not likely to be all that useful since your php-cli environment may well be quite different to the web one.

    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

  10. #10
    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.

  11. #11
    Just going to get the logs...

  12. #12

    Question

    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
    The last line mentions Suhosin? so I assume thats installed and all good?

  13. #13
    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.


  14. #14
    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

  15. #15
    Join Date
    Feb 2012
    Location
    Poland
    Posts
    22
    I think its 500 error is by bad PHP

  16. #16
    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

  1. Install php/mysql/apache on vps hosting
    By levani in forum VPS Hosting
    Replies: 36
    Last Post: 02-14-2010, 10:25 AM
  2. centos:apache,php, yum install or source install?
    By cchere in forum Hosting Security and Technology
    Replies: 2
    Last Post: 08-29-2006, 05:14 PM
  3. Install Apache, PHP, and MySQL...PLEASE HELP!!!
    By Sage55 in forum Other Offers & Requests
    Replies: 2
    Last Post: 05-06-2003, 12:27 AM
  4. Install apache, php, mysql...
    By aweller in forum Employment / Job Offers
    Replies: 4
    Last Post: 04-06-2003, 12:20 PM
  5. Need someone to install php to get it to work with apache
    By dallassmith in forum Employment / Job Offers
    Replies: 3
    Last Post: 01-20-2003, 02:26 AM

Posting Permissions

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