Find the answer to your Linux question:
Results 1 to 5 of 5
oops messed up on the subject, supposed to say "downloading a .php script instead of running it" after hitting this post i decided it had been a very long time ...
  1. #1
    Just Joined! brokndodge's Avatar
    Join Date
    Feb 2006
    Location
    Arkansas, USA
    Posts
    78

    downloading php instead of installing it?

    oops messed up on the subject, supposed to say "downloading a .php script instead of running it"

    after hitting this post i decided it had been a very long time since i had delt with a cms. so i found one i liked (drupal) and installed it.

    I'm running Debian Etch updated yesterday. I've installed apache, perl and php
    Code:
    apt-get install apache libapache-mod-php5 libapache-mod-perl php5
    PostgreSQL was already installed from a previous gameserver project so i created the requisite database and username and populated the database with the Drupal stuff from a file provided in the installation tar. chmod all the php and perl files 757.

    Now i fire up the server and hit my localhost and instead of getting the drupal index page i get a box asking me what i want to do with the file.
    so i restarted apache with
    Code:
    apache restart
    still no go
    so i ran
    Code:
    apt-get --purge remove apache libapache-mod-php5 libapache-mod-perl php5
    apt-get install apache libapache-mod-php5 libapache-mod-perl php5
    the /etc/apache/modules.conf list the php and the perl modules
    still no go...

    what did i miss?

  2. #2
    Just Joined! brokndodge's Avatar
    Join Date
    Feb 2006
    Location
    Arkansas, USA
    Posts
    78
    thats weird... i got up this morning and it was working fine. huh but i've got to install the postgresql extention for php

    ok i figured out what was wrong... for some reason i've got to call index.php directly.

    http://127.0.0.1/index.php

    what do i need to change in order to get apache to run the index.php. it is listed in apache.conf. i'll post the relevent section in a few minutes

  3. #3
    Linux Newbie deek's Avatar
    Join Date
    Mar 2005
    Location
    Fort Wayne, IN
    Posts
    248
    All you need to do is add index.php to your DirectoryIndex directive.

    I think by default it should look like:

    DirectoryIndex index.html

    So change it to:

    DirectoryIndex index.html index.php

    That way, when you hit your url, it will try to load index.html first, if it exists, and if not, will look for index.php.
    Join the Open Source Revolution. Support GNU/Linux.

    Find me at: www.deeksworld.com
    Registered GNU/Linux User #395777

  4. #4
    Just Joined! brokndodge's Avatar
    Join Date
    Feb 2006
    Location
    Arkansas, USA
    Posts
    78
    index.php was already in the list... i think firefox was giving me some trouble not wanting to refresh the page. it kept pulling the same page out of it's cache. weird tho. anyway most of the glitches are finxed, if got trouble with permissions and ownership but i think i've bout got that figured out too.

  5. #5
    Just Joined! brokndodge's Avatar
    Join Date
    Feb 2006
    Location
    Arkansas, USA
    Posts
    78
    ---fixed---

    ok... here's the deal... turns out i was trying to make things more difficult then they were. apache was trying to send the old index file because i had only reneamed it from index.html to index.html.old.

    as to the permissions, i had configured php5 to only allow access to /home/www but drupal needs access to /tmp. I haven't figured out yet how to make it work the way i want it to... i tryed a simlink (/home/www/tmp => /tmp) but drupal fussed about that too... saying the link wasn't a directory. it worked fine when i tested it at the cli. i got the rest of the permissions taken care of by creating a www system user and system group moving everything into /home/www and chown -R www:www /home/www

    after that... pretty much i wrote all the apache and php5 config files back to default and just let it rip. everything works all of a sudden. seems like drupal is built so the absolute noob can set it up quickly, and i was just making it harder than it was.

Posting Permissions

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