Magento Forum

Page 1 of 3
Cannot install magento - Internal Server error
 
griefex
Member
 
Total Posts:  52
Joined:  2008-04-01
Malta
 

Hi all,

I start by putting all the magento folder onto the server (the last version available on the website) and change permissions as said in the Installation Guide. But then when I try to launch http://www.domain/magento or http://domain/magento I get the following error:

Internal Server Error

[ The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.

Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request ]

I checked the logs and this is what I get in the error logs repeated for every time I tried:

[Tue Jul 08 20:36:23 2008] [alert] [client 78.133.77.121] /home/domain/public_html/.htaccess: Expected </meta> but saw </head>

Please find attached copies of my .htaccess files.

This one is the one in the root of the website:

<head>
<
meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
</
head>
<
PRE>############################################
## uncomment these lines for CGI mode
## make sure to specify the correct cgi php binary file name
## it might be /cgi-bin/php-cgi</PRE>
<PRE>#    Action php5-cgi /cgi-bin/php5-cgi
#    AddHandler php5-cgi .php</PRE>
<PRE>############################################
## this line is specific for 1and1 hosting</PRE>
<PRE>    #AddType x-mapp-php5 .php
    #AddHandler x-mapp-php5 .php</PRE>
<PRE>############################################
 
default index file</PRE>
<
PRE>    DirectoryIndex index.php</PRE>
<
PRE><IfModule mod_php5.c></PRE>
<
PRE>############################################
## adjust memory limit</PRE>
<PRE>    php_value memory_limit 64M
    php_value max_execution_time 18000
</PRE>
<
PRE>############################################
## disable magic quotes for php request vars</PRE>
<PRE>    php_flag magic_quotes_gpc off</PRE>
<
PRE>############################################
## enable resulting html compression</PRE>
<PRE>    #php_flag zlib.output_compression on</PRE>
<PRE>###########################################
# disable user agent verification to not break multiple image upload</PRE>
<PRE>    php_flag suhosin.session.cryptua off</PRE>
<
PRE></IfModule></PRE>
<
PRE><IfModule mod_security.c>
###########################################
# disable POST processing to not break multiple image upload</PRE>
<PRE>    SecFilterEngine Off
    SecFilterScanPOST Off
</IfModule></PRE>
<
PRE><IfModule mod_deflate.c></PRE>
<
PRE>############################################
## enable apache served files compression
## http://developer.yahoo.com/performance/rules.html#gzip</PRE>
<PRE>    # Insert filter
    #SetOutputFilter DEFLATE</PRE>
<PRE>    # Netscape 4.x has some problems...
    #BrowserMatch ^Mozilla/4 gzip-only-text/html</PRE>
<PRE>    # Netscape 4.06-4.08 have some more problems
    #BrowserMatch ^Mozilla/4\.0[678] no-gzip</PRE>
<PRE>    # MSIE masquerades as Netscape, but it is fine
    #BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
    # Don't compress images
    #SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip dont-vary</PRE>
<PRE>    # Make sure proxies don't deliver the wrong content
    #Header append Vary User-Agent env=!dont-vary</PRE>
<PRE></IfModule></PRE>
<
PRE><IfModule mod_ssl.c></PRE>
<
PRE>############################################
## make HTTPS env vars available for CGI mode</PRE>
<PRE>    SSLOptions StdEnvVars</PRE>
<
PRE></IfModule></PRE>
<
PRE><IfModule mod_rewrite.c></PRE>
<
PRE>############################################
## enable rewrites</PRE>
<PRE>    Options +FollowSymLinks
    RewriteEngine on
</PRE>
<
PRE>############################################
## you can put here your magento root folder
## path relative to web root</PRE>
<PRE>    #RewriteBase /magento/</PRE>
<PRE>############################################
## workaround for HTTP authorization
## in CGI environment</PRE>
<PRE>    RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]</PRE>
<
PRE>############################################
## always send 404 on missing files in these folders</PRE>
<PRE>    RewriteCond %{REQUEST_URI} !^/(media|skin|js)/</PRE>
<
PRE>############################################
## never rewrite for existing files, directories and links</PRE>
<PRE>    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond 
%{REQUEST_FILENAME} !-d
    RewriteCond 
%{REQUEST_FILENAME} !-l</PRE>
<
PRE>############################################
## rewrite everything else to index.php</PRE>
<PRE>    RewriteRule .* index.php [L]</PRE>
<
PRE></IfModule>
</
PRE>
<
PRE>############################################
## Prevent character encoding issues from server overrides
## If you still have problems, use the second line instead</PRE>
<PRE>    AddDefaultCharset Off
    
#AddDefaultCharset UTF-8</PRE>
<PRE><IfModule mod_expires.c></PRE>
<
PRE>############################################
## Add default Expires header
## http://developer.yahoo.com/performance/rules.html#expires</PRE>
<PRE>    ExpiresDefault &quot;access plus 1 year&quot;</PRE>
<
PRE></IfModule></PRE>
<
PRE>############################################
## By default allow all access</PRE>
<PRE>    Order allow,deny
    Allow from all
</PRE>
<
PRE>############################################
## If running in cluster environment, uncomment this
## http://developer.yahoo.com/performance/rules.html#etags</PRE>
<PRE>    #FileETag none</PRE>

The .htaccess file found in the magento folder is attached in a text file since there is not enough space here. Can you please help me asap?

File Attachments
htaccess.txt  (File Size: 4KB - Downloads: 465)
 
Magento Community Magento Community
Magento Community
Magento Community
 
adimagento
Administrator
 
Avatar
Total Posts:  626
Joined:  2007-08-29
Los Angeles, CA
 

Have you checked to see that your hosting environment is compatible with Magento?

http://www.magentocommerce.com/knowledge-base/entry/how-do-i-know-if-my-server-is-compatible-with-magento

 
Magento Community Magento Community
Magento Community
Magento Community
 
griefex
Member
 
Total Posts:  52
Joined:  2008-04-01
Malta
 

Yes the server is compatible here are the results:

Congratulations! Your server meets the requirements for Magento.

* You have PHP 5.2.0 (or greater)
* Safe Mode is off
* You have MySQL 4.1.20 (or greater)
* You have the curl extension
* You have the dom extension
* You have the gd extension
* You have the hash extension
* You have the iconv extension
* You have the mcrypt extension
* You have the pcre extension
* You have the pdo extension
* You have the pdo_mysql extension
* You have the simplexml extension

 
Magento Community Magento Community
Magento Community
Magento Community
 
JLHC
Mentor
 
Avatar
Total Posts:  1287
Joined:  2008-05-09
Tampa, FL
 

May I know who are you hosting with? Some host have “nobody” disabled and you will need a different CHMOD for it to work. wink

 
Magento Community Magento Community
Magento Community
Magento Community
 
Rafterman
Jr. Member
 
Total Posts:  16
Joined:  2008-06-05
 

check for 775 permission in /js/proxy.php just a thought

 
Magento Community Magento Community
Magento Community
Magento Community
 
griefex
Member
 
Total Posts:  52
Joined:  2008-04-01
Malta
 

Hi this the prox.php file:

// no files specified return 404
if (empty($_GET['f'])) {
    header
('404 Not found');
    echo 
"SYNTAX: proxy.php/x.js?f=dir1/file1.js,dir2/file2.js";
    exit;
}

// allow web server set content type automatically
$contentType false;

// set custom content type if specified
if (isset($_GET['c'])) {
    $contentType 
$_GET['c']==='auto' true $_GET['c'];
}

// get files content
$files is_array($_GET['f']) ? $_GET['f'explode(','$_GET['f']);

$out '';
$lastModified 0;
foreach (
$files as $f{
    
// get correct file disk path
    
$p trim(str_replace('/'DIRECTORY_SEPARATOR$f), DIRECTORY_SEPARATOR);

    
// validate file path
    
if (empty($p) || strpos($p'..')!==false || strpos($p'//')!==false || !file_exists($p)) {
        
continue;
    
}
    
// try automatically get content type if requested
    
if ($contentType===true{
        $contentTypes 
= array(
            
'js' => 'text/javascript',
//            'css' => 'text/css',
//            'gif' => 'image/gif',
//            'png' => 'image/png',
//            'jpg' => 'image/jpeg',
        
);
        
$ext strtolower(pathinfo($pPATHINFO_EXTENSION));
        if (empty(
$contentTypes[$ext])) // security
            
continue;
        
}
        $contentType 
= !empty($contentTypes[$ext]) ? $contentTypes[$ext] false;
    
}

    
// append file contents
    
$out .= file_get_contents($p);
    
$lastModified max($lastModifiedfilemtime($p));
}

// last modified is the max mtime for loaded files
header('Last-modified: '.gmdate('r'$lastModified));

// optional custom content type, can be emulated by proxy.php/x.js or x.css
if (is_string($contentType)) {
    header
('Content-type: '.$contentType);
}

// remove spaces, default on
if (!(isset($_GET['s']) && !$_GET['s'])) {
    $out 
preg_replace('#[ \t]+#'' '$out);
}

// use gzip or deflate, use this if not enabled in .htaccess, default on
if (!(isset($_GET['z']) && !$_GET['z'])) {
    ini_set
('zlib.output_compression'1);
}

// add Expires header if not disabled, default 1 year
if (!(isset($_GET['e']) && $_GET['e']==='no')) {
    $time 
time()+(isset($_GET['e']) ? $_GET['e'365)*86400;
    
header('Expires: '.gmdate('r'$time));
}

echo $out;
 
Magento Community Magento Community
Magento Community
Magento Community
 
griefex
Member
 
Total Posts:  52
Joined:  2008-04-01
Malta
 

The hosting is : http://www.eukhost.com/ Can you explain what do you mean by having a different CHMOD?

 
Magento Community Magento Community
Magento Community
Magento Community
 
JLHC
Mentor
 
Avatar
Total Posts:  1287
Joined:  2008-05-09
Tampa, FL
 

It means setting a different file permission. Some host doesn’t use 777. For us, we use 755 for directories and 644 for files. Maybe you can try it. wink

 
Magento Community Magento Community
Magento Community
Magento Community
 
griefex
Member
 
Total Posts:  52
Joined:  2008-04-01
Malta
 

The permissions are set on 775. I think that they are fine. Write permission given to everything, but to unauthorised users

 
Magento Community Magento Community
Magento Community
Magento Community
 
Rafterman
Jr. Member
 
Total Posts:  16
Joined:  2008-06-05
 

ok, I have had the 500 error and 404 and I found it was an apache setting, once cinfigured correctly with the allow_overide script all was well
can you maybe post your httpd.conf so I can take a look?

 
Magento Community Magento Community
Magento Community
Magento Community
 
griefex
Member
 
Total Posts:  52
Joined:  2008-04-01
Malta
 

hi, thanks for your reply, can you tell me where exactly is the file situated? under which folder?

 
Magento Community Magento Community
Magento Community
Magento Community
 
griefex
Member
 
Total Posts:  52
Joined:  2008-04-01
Malta
 

ok its under the /conf folder, I am not sure that I have access to the folder since its in the apache folder and this is on a hosting site. Can you tell me what you changed in this file so I can ask the hosting support to change it pls?

 
Magento Community Magento Community
Magento Community
Magento Community
 
griefex
Member
 
Total Posts:  52
Joined:  2008-04-01
Malta
 

ok managed to do another step..this what i get now: http://www.stayucm.com/magento/report/?id=1122033950529&s;=default

Any ideas?

 
Magento Community Magento Community
Magento Community
Magento Community
 
Crucial Web Host
Guru
 
Avatar
Total Posts:  364
Joined:  2007-11-08
Phoenix, AZ
 

Hello,

Can you verify that the following file exists in your installation?

/home/stayucm/public_html/magento/app/design/install/default/default/template/page.phtml

If it does not - I’d start your installation over making certain to upload all files.

Hope this helps.

 
Magento Community Magento Community
Magento Community
Magento Community
 
griefex
Member
 
Total Posts:  52
Joined:  2008-04-01
Malta
 

hi I found the file there it was renamed...the reason is that someone else is working on it and im trying to solve the probs! I renamed to its proper name but its empty. Should it be empty? And now the following is happening:

When I go to here:
http://www.stayucm.com/magento/

it redirects to here and giving me an empty page:

http://www.stayucm.com/magento/index.php/install/

thanks

 
Magento Community Magento Community
Magento Community
Magento Community
 
JLHC
Mentor
 
Avatar
Total Posts:  1287
Joined:  2008-05-09
Tampa, FL
 
griefex - 09 July 2008 11:56 PM

hi I found the file there it was renamed...the reason is that someone else is working on it and im trying to solve the probs! I renamed to its proper name but its empty. Should it be empty? And now the following is happening:

When I go to here:
http://www.stayucm.com/magento/

it redirects to here and giving me an empty page:

http://www.stayucm.com/magento/index.php/install/


thanks

There is something wrong with your htaccess. Can you check and confirm this?

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top
Page 1 of 3