Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

New Install shows the PHP script in browser
 
psychosonicsid
Jr. Member
 
Total Posts:  15
Joined:  2008-07-19
 

Hi I have just tried to install magento and get a php script appearing in the browser.
Having tried before and found my last host wasn’t compatible - this host is new to me.
Is it something I am doing wrong or is it a problem with the host?

The script that shows up is:

<?php
/**
* Magento
*
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License (OSL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/osl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to so we can send you a copy immediately.
*
* @category Mage
* @package Mage
* @copyright Copyright (c) 2004-2007 Irubin Consulting Inc. DBA Varien (http://www.varien.com)
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
*/

if (version_compare(phpversion(), ‘5.2.0’, ‘<’)===true) {
echo ‘<div style="font:12px/1.35em arial, helvetica, sans-serif;"><div style="margin:0 0 25px 0; border-bottom:1px solid #ccc;"><h3 style="margin:0; font-size:1.7em; font-weight:normal; text-transform:none; text-align:left; color:#2f2f2f;">Whoops, it looks like you have an invalid PHP version.</h3></div><p>Magento supports PHP 5.2.0 or newer. <a href="http://www.magentocommerce.com/install" target="">Find out</a> how to install</a> Magento using PHP-CGI as a work-around.</p></div>’;
exit;
}

$mageFilename = ‘app/Mage.php’;

if (!file_exists($mageFilename)) {
if (is_dir(’downloader’)) {
header("Location: downloader");
} else {
echo “app/Mage.php not found”;
}
exit;
}

require_once $mageFilename;

umask(0);
Mage::run(’default’);

Any ideas anyone?

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top