cancel
Showing results for 
Search instead for 
Did you mean: 

Joomla Setup question

IanD
Grafter
Posts: 149
Registered: ‎01-08-2007

Joomla Setup question

I have previously been able to set Joomla up in my PlusNet webspace, but cannot manage it now. I can upload the current build zip to the new directory within my ccgi space, but I cannot unzip it.
Any pointers as to what I need to do now as I'm not sure what has changed (or I've forgotten  :-[)
Thanks for any advice and guides.
13 REPLIES 13
spraxyt
Resting Legend
Posts: 10,063
Thanks: 674
Fixes: 75
Registered: ‎06-04-2007

Re: Joomla Setup question

How long ago was it since you last installed Joomla? Are you aware of the major change to ccgi in March 2010.
You can unzip the file on the server using one of the following bash scripts:
Quote from: Gabe
At simplest, create a .cgi file such as:
#!/bin/bash
echo "Content-type: text/plain"
echo
unzip joomla.zip

whatever.cgi, placed in the same folder as joomla.zip. Set the cgi script's permissions 0700, and run it from your browser. Or, for .tar.gz:
#!/bin/bash
echo "Content-type: text/plain"
echo
tar -xvvzf joomla.tar.gz

Gabe
David
IanD
Grafter
Posts: 149
Registered: ‎01-08-2007

Re: Joomla Setup question

Thanks for that  Smiley
It was before March, so that explains why I've had the problems now.
Also helped when I realised that I needed to rename the joomla installation download to joomla.zip  Embarrassed
Now I've got it unzipped I'm getting the following error when I browse to the site to try and run the installation
Server error!
The server encountered an internal error and was unable to complete your request.
Error message:
Premature end of script headers: index.php
If you think this is a server error, please contact the webmaster.
Error 500
Any more ideas on what I'm now not doing? Have done chmod 755 for the folder that it is in as this is what I have previously used.
spraxyt
Resting Legend
Posts: 10,063
Thanks: 674
Fixes: 75
Registered: ‎06-04-2007

Re: Joomla Setup question

The cgi platform php upgrade FAQ library article provides a good introduction to what needs to be done and likely reasons for that problem.
David
IanD
Grafter
Posts: 149
Registered: ‎01-08-2007

Re: Joomla Setup question

OK. Had a look at that and can see I am now getting the http://ccgi.username.plus.com/~username.plus.com/filename.php problem as opposed to my earlier sites that run properly as http://ccgi.username.plus.com/sitename
I've got a bit lost after that and have tried permissions of 710 and 750 without success and also applying 640 to the htaccess.txt file.
Looking at Gabe's post about suEXEC, it would appear this may be the approach needed to modify the joomla installer to allow for the ~username
I've pasted the htaccess.txt below. Do I need to change it in the SEF section from RewriteCond %{REQUEST_URI} !^/index.php to RewriteCond %{REQUEST_URI} !^/~username/index.php?

##
# @version $Id: htaccess.txt 14401 2010-01-26 14:10:00Z louis $
# @package Joomla
# @copyright Copyright (C) 2005 - 2010 Open Source Matters. All rights reserved.
# @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
# Joomla! is Free Software
##

#####################################################
#  READ THIS COMPLETELY IF YOU CHOOSE TO USE THIS FILE
#
# The line just below this section: 'Options +FollowSymLinks' may cause problems
# with some server configurations.  It is required for use of mod_rewrite, but may already
# be set by your server administrator in a way that dissallows changing it in
# your .htaccess file.  If using it causes your server to error out, comment it out (add # to
# beginning of line), reload your site in your browser and test your sef url's.  If they work,
# it has been set by your server administrator and you do not need it set here.
#
#####################################################
##  Can be commented out if causes errors, see notes above.
Options +FollowSymLinks
#
#  mod_rewrite in use
RewriteEngine On
########## Begin - Rewrite rules to block out some common exploits
## If you experience problems on your site block out the operations listed below
## This attempts to block the most common type of exploit `attempts` to Joomla!
#
## Deny access to extension xml files (uncomment out to activate)
#<Files ~ "\.xml$">
#Order allow,deny
#Deny from all
#Satisfy all
#</Files>
## End of deny access to extension xml files
RewriteCond %{QUERY_STRING} mosConfig_[a-zA-Z_]{1,21}(=|\%3D) [OR]
# Block out any script trying to base64_encode crap to send via URL
RewriteCond %{QUERY_STRING} base64_encode.*\(.*\) [OR]
# Block out any script that includes a <script> tag in URL
RewriteCond %{QUERY_STRING} (\<|%3C).*script.*(\>|%3E) [NC,OR]
# Block out any script trying to set a PHP GLOBALS variable via URL
RewriteCond %{QUERY_STRING} GLOBALS(=|\[|\%[0-9A-Z]{0,2}) [OR]
# Block out any script trying to modify a _REQUEST variable via URL
RewriteCond %{QUERY_STRING} _REQUEST(=|\[|\%[0-9A-Z]{0,2})
# Send all blocked request to homepage with 403 Forbidden error!
RewriteRule ^(.*)$ index.php [F,L]
#
########## End - Rewrite rules to block out some common exploits
#  Uncomment following line if your webserver's URL
#  is not directly related to physical file paths.
#  Update Your Joomla! Directory (just / for root)
# RewriteBase /

########## Begin - Joomla! core SEF Section
#
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !^/index.php
RewriteCond %{REQUEST_URI} (/|\.php|\.html|\.htm|\.feed|\.pdf|\.raw|/[^.]*)$  [NC]
RewriteRule (.*) index.php
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L]
#
########## End - Joomla! core SEF Section

Thanks again for your help.
spraxyt
Resting Legend
Posts: 10,063
Thanks: 674
Fixes: 75
Registered: ‎06-04-2007

Re: Joomla Setup question

%{REQUEST_URI} doesn't contain /~username so I wouldn't expect that to need changing.
What does need changing is to comment out (add # in front of 'Options' on) the
Options +FollowSymLinks  line
and you might need to activate (remove the # from)
#RewriteBase /
As far as the /~username problem is concerned do you mean your full domain name appears twice? The posted text isn't clear in that respect due to URL mangling. You could add [nobbc] ... [/nobbc] tags round the text to stop it being hot-linked and abbreviated..
David
IanD
Grafter
Posts: 149
Registered: ‎01-08-2007

Re: Joomla Setup question

Tried the two changes to the htaccess file you suggested, but no change.
Yes, I do mean the domain name appears twice which it does not do for the older joomla sites I've been running.
http://ccgi.username.plus.com/~username/sitename/ is coming up rather than http://ccgi.username.plus.com/sitename/ as I still get for those sites.
Thanks again for your help.
PS Not sure if I've used [nobbc] correctly. I wasn't sure if this was supposed to show round my url
spraxyt
Resting Legend
Posts: 10,063
Thanks: 674
Fixes: 75
Registered: ‎06-04-2007

Re: Joomla Setup question

Your usage of [ nobbc ] is correct, it shouldn't show in the post. It did in my example because I made it do - otherwise you wouldn't have seen what I meant. Smiley
Sorry, memory snafu about the content of %{REQUEST_URI}. It *does* contain /~username within .htaccess files, but *doesn't* in PHP.
So that needs to be allowed for. I think your original question is correct, the first %{REQUEST_URI} needs to be
RewriteCond %{REQUEST_URI} !^/~username/index.php
but also the other changes are needed.
David
IanD
Grafter
Posts: 149
Registered: ‎01-08-2007

Re: Joomla Setup question

Thanks again Dave, but no joy  Sad
I've been looking at http://community.plus.net/forum/index.php/topic,84267.16.html where there seems to be quite a few people with joomla problems, but these seem to have been resolved with the # Options +FollowSymLinks change to htaccess.
I've removed the folder and recreated it and reinstalled joomla to try a clean install again, but I'm still getting the same error. I'm using FileZilla to view the folders and change permissions etc but I've not had any problems with it in the past.
Really confusing me and also giving me some problems as I need to build and test a new joomla site before I let the end user loose on it having moved it to a host they will be buying and paying for once I can demonstrate the site.
IanD
Grafter
Posts: 149
Registered: ‎01-08-2007

Re: Joomla Setup question

Finally got it to install by chmodding every file to 750. Not sure if that is safe, but it worked.
I've also applied the other suggestions you provided as well as pointing RewriteRule (.*) to the /~username/sitename/index.php
Apart from the potential security issue, I'm not sure what actually was needed to resolve this. Any further ideas or suggestions and should I be looking at changing file permissions now that I've got joomla installed?
Thanks again for your help.
spraxyt
Resting Legend
Posts: 10,063
Thanks: 674
Fixes: 75
Registered: ‎06-04-2007

Re: Joomla Setup question

Glad to hear you got this to work.
Are any of the files you had to chmod 0750 executable, but not of type .php, .pl or .cgi? Otherwise chmod 0640 should have been sufficient; did you try that? 0640 makes the files readable by Apache. 0750 on directories is sometimes needed, when Apache needs to list directory contents.
I think 0750 on directories and 0640 on files is reasonably safe on new ccgi, but obviously there is slight additional risk.
David
IanD
Grafter
Posts: 149
Registered: ‎01-08-2007

Re: Joomla Setup question

Just tried again to see what happens and as soon as I have unzipped the files, I cannot access any of the directories in filezilla as an error 550 permission denied failed to retrieve directory listing comes up.
I'd take a guess that this has something to do with the problem I had, but is there any particular reason why this is happening and suggested chmod settings to deal with it?
spraxyt
Resting Legend
Posts: 10,063
Thanks: 674
Fixes: 75
Registered: ‎06-04-2007

Re: Joomla Setup question

To minimise speculation on my part I've installed Joomla in my ccgi space, but in a subfolder; no problems at all. It would mess things up for me if I installed it at the top level. My .htaccess file wouldn't affect the installation.
I created the subfolder using FileZilla. Permissions on that came up as 0750. I uploaded the Joomla 1.5.22 zip file to that folder and unzipped it using the cgi script mentioned in an earlier reply. Then  uploaded the cgi setperms script to my subfolder and ran it. This set all directory permissions (including those for the  containing subfolder) to 0710, and php, pl and cgi file permissions to 0700. Other file permissions were left as they were (0644).
I ran the Joomla install script in my browser entered the required information and it installed OK. I left FTP configuration at the default 'no' to the enable option and entered nothing in the boxes (it isn't needed).
My impression is that you are installing Joomla at the top level. The permissions on that directory (set by Plusnet when your ccgi space was created) should be 01710. You shouldn't change those and the setperms script has a test to avoid doing that.
When working with FileZilla you should be logged in so that the owner (first number/triple) permissions apply which I would expect to be '7' or 'rwx' on all directories and subdirectories. 'Unable to list contents' suggests to me that the permission on your directories are wrong.
In case the problem starts from the top level you can check that using the following script
[code=toplevelperms.cgi script]
#!/bin/bash
echo "Content-type: text/plain"
echo
ls -l -d .[/code]
FTP it to your top level, set its permissions to 0700 and run it in your browser. The output should be similar to
[code=results]
drwx--x--T 13 username cgiusers 16384 Dec  6 12:09 .[/code]
Hope this sheds some light on the problem you are experiencing.
David
IanD
Grafter
Posts: 149
Registered: ‎01-08-2007

Re: Joomla Setup question

Nope - have been running within a subfolder, but tried chmod 710 for the folder I created. I then changed the initial php files to 700 and then went to the installation folder created in joomla. Changed the index.php there to 700 and that sorted it. (Couldn't get setperms.cgi to work but figured it our anyway).
Seems to be the permissions on the index.php and install.php files that were giving me the problem. Once changed to 700 as you and gabe suggested it ran fine.
Hope this will help others get joomla installed and running again.
Thanks for your help and advice. I would not have been able to follow the previous discussions without you pointing me in the right direction.  Smiley
Edit - got setperms.cgi to work after changing its permissions to 700. Missed that first time...