Results 1 to 9 of 9

Thread: Packages to Run PHP?

  1. #1
    Join Date
    Jan 2014
    Beans
    7

    Packages to Run PHP?

    I need to use a Local server on my PC to view PHP files. But I am not sure of the Packages to install to run PHP. Can anybody please tell me the packages I should install to run PHP server locally. I need PHP, phpmyadmin, apache and MySQL. I use Ubuntu 12.04. Thank You.

  2. #2
    Join Date
    Oct 2013
    Location
    Edmonton, Canada
    Beans
    31
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: Packages to Run PHP?

    If by "view PHP files" you mean you just want to view the php code, you don't need php installed. You can do that with a text editor.


    If on the other hand you want to view the results of executing the php, then you need to do the Apache and PHP steps from the Ubuntu tutorial: https://help.ubuntu.com/community/ApacheMySQLPHP

  3. #3
    Join Date
    Nov 2008
    Location
    Metro Boston
    Beans
    8,995
    Distro
    Kubuntu 14.04 Trusty Tahr

    Re: Packages to Run PHP?

    Code:
    sudo apt-get install tasksel
    sudo tasksel install lamp-server
    sudo apt-get install phpmyadmin
    I suggest you try and learn how to use the command-line MySQL client rather than relying on phpmyadmin if you plan to build more sites with SQL backends.
    If you ask for help, please have the courtesy to check for responses and thank the people who helped you.

    Blog · Linode System Administration Guides · Android Apps for Ubuntu Users

  4. #4
    Join Date
    Mar 2010
    Location
    Metro-ATL; PM free zone.
    Beans
    Hidden!
    Distro
    Lubuntu 14.04 Trusty Tahr

    Re: Packages to Run PHP?

    Quote Originally Posted by SeijiSensei View Post
    Code:
    sudo apt-get install tasksel
    sudo tasksel install lamp-server
    sudo apt-get install phpmyadmin
    I suggest you try and learn how to use the command-line MySQL client rather than relying on phpmyadmin if you plan to build more sites with SQL backends.
    Running PHP and/or MySQL without security knowledge can be dangerous to the PC and to any other PC on the same network. Please be careful if you make those services available on the LAN or internet.
    Last edited by TheFu; January 16th, 2014 at 09:34 PM.

  5. #5
    Join Date
    Jan 2014
    Beans
    7

    Re: Packages to Run PHP?

    Thank you. I have got Apache up and running but I still cant use 'phpmyadmin'. I get a 404 error on the address localhost/phpmyadmin. I included the line "Include /etc/phpmyadmin/apache.conf " in the apache2.conf file but it still hasnt solved anything. I have just started learning PHP and I need these just to view the results of the pages I create. How can I block incoming connections on the network and just view files locally?

  6. #6
    Join Date
    Nov 2008
    Location
    Metro Boston
    Beans
    8,995
    Distro
    Kubuntu 14.04 Trusty Tahr

    Re: Packages to Run PHP?

    You can attach Apache to the localhost interface by editing /etc/apache2/ports.conf and changing the NameVirtualHost declaration so it looks like this:
    Code:
    NameVirtualHost 127.0.0.1:80
    In the virtual host declarations, replace the <VirtualHost *:80> directive with
    Code:
    <VirtualHost 127.0.0.1:80>
    Last edited by SeijiSensei; January 21st, 2014 at 04:28 PM.
    If you ask for help, please have the courtesy to check for responses and thank the people who helped you.

    Blog · Linode System Administration Guides · Android Apps for Ubuntu Users

  7. #7
    Join Date
    Jan 2014
    Beans
    7

    Re: Packages to Run PHP?

    Thanks. I dont know why but 'phpmyadmin' started working 2-3 reboots after editing the configuration file.

  8. #8
    Join Date
    Mar 2010
    Location
    Metro-ATL; PM free zone.
    Beans
    Hidden!
    Distro
    Lubuntu 14.04 Trusty Tahr

    Re: Packages to Run PHP?

    Quote Originally Posted by rudolf.almeida View Post
    Thanks. I dont know why but 'phpmyadmin' started working 2-3 reboots after editing the configuration file.
    A reboot should only be helpful to reset a hardware device. Linux is not Windows where a reboot seems to fix all sorts of things. For something like this, a reboot shouldn't matter at all unless restarting a daemon was necessary and forgotten.

    That is the theory.

  9. #9
    Join Date
    Mar 2011
    Location
    U.K.
    Beans
    Hidden!
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: Packages to Run PHP?

    Possibly the browser cache had not cleared .. try Ctrl+F5 after such changes to files. This refreshes browser.

Bookmarks

Posting Permissions

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