New user's registration have been closed due to high spamming and low trafic on this forum. Please contact forum admins directly if you need an account. Thanks !

index.php downloading. not opening

Got problems with Bubba? Then this forum is for you.
Locked
netpage
Posts: 26
Joined: 04 Sep 2007, 13:36

index.php downloading. not opening

Post by netpage »

Hi,

I assume that this is related to the work I have done to get my Bubba 1 talking to my NAS http://forum.excito.net/viewtopic.php?t=1524.

Now when I try to open the web admin page I get the download dialog box. I have looked at some of the solutions on this site but not sure what I have done and what I can do to solve it.

Any ideas?

Thanks
Eek
Posts: 372
Joined: 23 Dec 2007, 03:03
Location: the Netherlands

Post by Eek »

check if these exist

ls -l /etc/apache2/mods-enabled/php*
netpage
Posts: 26
Joined: 04 Sep 2007, 13:36

Post by netpage »

Hi Eek,

I do not have any php* files or folders in the /etc/apache2/mods-enabled folder.

Here is the folder I do have

Code: Select all

bubba:/etc/apache2/mods-enabled# ls
alias.load	      authz_host.load  env.load		 status.load
auth_basic.load       authz_user.load  mime.load	 userdir.conf
auth_pam.load	      autoindex.load   negotiation.load  userdir.load
authn_file.load       cgi.load	       setenvif.load
authz_default.load    dir.conf	       ssl.conf
authz_groupfile.load  dir.load	       ssl.load
Eek
Posts: 372
Joined: 23 Dec 2007, 03:03
Location: the Netherlands

Post by Eek »

enable php
it should be already installed

ls -l /etc/apache2/mod-available/php*
Ubi
Posts: 1549
Joined: 17 Jul 2007, 09:01

Post by Ubi »

That should be: ls -l /etc/apache2/mods-available/php*
mind the extra S
netpage
Posts: 26
Joined: 04 Sep 2007, 13:36

Post by netpage »

Can anyone please advise how to enable PHP. I have tried typing the following when logged in as root but it just comes up with

Code: Select all

bubba:/# php enable
bash: php: command not found
bubba:/# enable php
bash: enable: php: not a shell builtin
but just get errors.

I have also searched the Internet but can not find an answer.

Thanks in advance
6feet5
Posts: 269
Joined: 13 Apr 2007, 17:32
Location: Gnesta, Sweden
Contact:

Post by 6feet5 »

Try

Code: Select all

a2enmod <NAME>
Skipping the name will display all available modules and ask for a module name.

/Johan
netpage
Posts: 26
Joined: 04 Sep 2007, 13:36

Post by netpage »

Thanks. I have run

Code: Select all

a2enmod php4
and restarted apache but I still get the download dialog box for index.php rather than viewing it.

Any other ideas what I need to do?

Thanks
6feet5
Posts: 269
Joined: 13 Apr 2007, 17:32
Location: Gnesta, Sweden
Contact:

Post by 6feet5 »

In a previous post you wrote you had no php* files in /etc/apache2/mods-enabled. Is this still the case after running a2enmod?

/Johan
netpage
Posts: 26
Joined: 04 Sep 2007, 13:36

Post by netpage »

Here is the list of the files in

Code: Select all

bubba:/etc/apache2/mods-enabled# ls
alias.load	      authz_host.load  env.load		 ssl.conf
auth_basic.load       authz_user.load  mime.load	 ssl.load
auth_pam.load	      autoindex.load   negotiation.load  status.load
authn_file.load       cgi.load	       php4.conf	 userdir.conf
authz_default.load    dir.conf	       php4.load	 userdir.load
authz_groupfile.load  dir.load	       setenvif.load
So it looks like I have a couple. Does this help?

Thanks
6feet5
Posts: 269
Joined: 13 Apr 2007, 17:32
Location: Gnesta, Sweden
Contact:

Post by 6feet5 »

Hmm, looks like php is enabled, as far as I can tell. This is beginning to look really weird.

What is the content of the php files in /etc/apache2/mods-enabled? Is there an AddType for .php file in any of them? Have you tried a simple test script in you public_html folder?
Log on to bubba as your ordinary user and do the following (ignore the mkdir line if you already have a public_html folder in your home folder on bubba):

Code: Select all

mkdir /home/USERNAME/public_html
chmod ugo+rx /home/USERNAME/public_html
cat >/home/USERNAME/public_html/phpinfo.php
<?php phpinfo(); ?>
<CTRL-D>
Replace USERNAME with your user name, and <CTRL-D> by actually pressing Ctrl-D.
Restart Apache by typing (you need to be root for this)

Code: Select all

/etc/init.d/apache2 restart
(I'm not sure if this is necessary, but do it anyway)

Now try accessing this page with your browser by using address:

Code: Select all

http://bubba/~USERNAME/phpinfo.php
(once again replacing USERNAME with your users name, and bubba with whatever host name you're using)

What is the result?

/Johan
netpage
Posts: 26
Joined: 04 Sep 2007, 13:36

Post by netpage »

in the php4.conf I have

Code: Select all

IfModule mod_php4.c>
  AddType application/x-httpd-php .php .phtml .php3
  AddType application/x-httpd-php-source .phps
</IfModule>
in the php4.load I have

Code: Select all

LoadModule php4_module /usr/lib/apache2/modules/libphp4.so
I then tried to follow the other parts of your post but could not manage all of it. I ran it all as 'su' then tried as 'username' still got some errors.

However when I just tried to log on it worked. Not sure why, so I suppose this is fixed :). Thanks.
Locked