ON Ubuntu - Error 500

Linux related discussion about netjukebox
Post Reply
allan1015
User
Posts: 8
Joined: Sat Apr 23, 2011 8:26 am

ON Ubuntu - Error 500

Post by allan1015 » Sat Apr 23, 2011 9:30 am

I have a spaken new Ubuntu/LAMP set up (php 5.3.3, mysql 5.1.49, Ubuntu 10.10),
I've got Drupal7 running and Im pretty sure my setup is working
I put the 5.26.3 netjukebox on and when I go there via browser I get a blank screen,
apache log shows a 500 error

No idea where to turn. As a test I moved the include folder to xinclude and still got same, I thought it would throw an error
I didn't set up any database, I changed the config.inc.php tp point to /media/ - though I don't have any files there yet

I ran php update.php (command line) and got this:
<code>undefined index: HTTP_HOST in /var/www/netjukebox/include/initialize.inc.php on line 80</code>
which is odd cause the call is to $_SERVER['HTTP_HOST'] and I put echo $_SERVER['HTTP_HOST'] i a test file and it works fine

After that there is an error Can't connect to MYSQL server (which does make sense as I didnt configure a DB)
(the instructions dont say to set up db prior to running)

Any ideas?

allan1015
User
Posts: 8
Joined: Sat Apr 23, 2011 8:26 am

Re: ON Ubuntu - Error 500

Post by allan1015 » Sat Apr 23, 2011 10:20 am

Update:

I created a file test.php with just phpinfo() in the nertjukebox directory, works fine
I put in require_once('include/initialize.inc.php'); in the file and I get the blank page error

So something in the initialization erroring out

User avatar
wbartels
netjukebox developer
Posts: 797
Joined: Thu Nov 04, 2004 3:12 pm
Location: Netherlands
Contact:

Re: ON Ubuntu - Error 500

Post by wbartels » Sat Apr 23, 2011 10:53 am

There must be something wrong with your webserver configuration.
See here for 500 Internal Server Error: http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html

> After that there is an error Can't connect to MYSQL server (which does make sense as I didnt configure a DB)
> (the instructions dont say to set up db prior to running)
netjukebox will create the database automatically, it cannot connect to the host defined in the config.inc.php file.

allan1015
User
Posts: 8
Joined: Sat Apr 23, 2011 8:26 am

Re: ON Ubuntu - Error 500

Post by allan1015 » Sun Apr 24, 2011 3:18 am

Hi,
I understand the idea of pointing to the webserver set up, it is a possibility.
Though drupal and some other webstuff ran just fine.

So I rebuilt the entire Ubuntu server and I only installed netjukebox and it coes up fine. I now have issues with Winapp but will research those before commenting.

However, I am not sure, I will be adding in drupal7 and that will have me adding in PHP PDO support, as well as php5-dev, adding PECL support and some other apache/php changes, so there is plenty in there to cuase some compatibility issue. I will let you know

allan

allan1015
User
Posts: 8
Joined: Sat Apr 23, 2011 8:26 am

Re: ON Ubuntu - Error 500

Post by allan1015 » Mon Apr 25, 2011 9:15 pm

So I have found what causes this issue and can replicate it

After installing the files are set to permissions of 704 and the directories are at 705 - I believe the permissions of 0 for the group is what causes this problem. I've never seen a web application on linux use 0 for the group permissions.

This requires the owner to be set to the the apache group www-data, (chown -R www-data:www-data).
Normally I chown to 'user:www-data' where user is the account I use for FTP

I changed the permissions to 644 for files and 755 for directories which is what most other products use as default permissions.

find -type d -print0 |xargs -0 chmod 755
find -type f -print0 |xargs -0 chmod 644

All is good now.

Post Reply