Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

All Links Page Not Found


Go to End


3 Posts   1515 Views

Avatar
CalebP

Community Member, 3 Posts

9 July 2013 at 2:26am

I am not sure what has happened to my Silverstripe strip sites. On one site I am getting this: Warning: There are two files both containing the same class: '/home/content/38/9579838/html/cms/dataobject_manager/code/AssetManager.php' and '/home/content/38/9579838/html/dataobject_manager/code/AssetManager.php'. This might mean that the wrong code is being used. in /home/content/38/9579838/html/sapphire/core/ManifestBuilder.php on line 486
over and over and then you can view the site below all these comments. The other two sites hosted on the same Godaddy account that were working just fine only show the main page. You can view them. Thinknurse.com and Stunurse.com and when you click on any links it gives either "input file not found" or "Page Not Found". Here is my .htaccess file if that has any clues to what may be wrong...

Options +FollowSymLinks
Options -MultiViews
Options +ExecCGI
AddHandler x-httpd-php5-3 .php

### SILVERSTRIPE START ###
<Files *.ss>
Order deny,allow
Deny from all
Allow from 127.0.0.1
</Files>

<Files web.config>
Order deny,allow
Deny from all
</Files>

ErrorDocument 404 /assets/error-404.html
ErrorDocument 500 /assets/error-500.html

<IfModule mod_alias.c>
RedirectMatch 403 /silverstripe-cache(/|$)
</IfModule>

<IfModule mod_rewrite.c>
SetEnv HTTP_MOD_REWRITE On
RewriteEngine On

RewriteCond %{REQUEST_URI} ^(.*)$
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule .* /sapphire/main.php?url=%1&%{QUERY_STRING} [L]
</IfModule>
### SILVERSTRIPE END ###

Thank you so much for taking the time to review this and offer any support or assistance you can.

Avatar
CalebP

Community Member, 3 Posts

10 July 2013 at 1:34am

This post from the "Server Upgrade Woes" post fixed it.

http://www.silverstripe.org/general-questions/show/23917?start=16#post322562

However, I am now getting only two pages of the site giving me this PHP page.

<?php
/************************************************************************************
************************************************************************************
** **
** If you can read this text in your browser then you don't have PHP installed. **
** Please install PHP 5.0 or higher, preferably PHP 5.2 or 5.3. **
** **
************************************************************************************
************************************************************************************/

/**
* @package sapphire
* @subpackage core
*/

if(version_compare(phpversion(), 5, '<')) {
header("HTTP/1.1 500 Server Error");
echo str_replace('$PHPVersion', phpversion(), file_get_contents("dev/install/php5-required.html"));
die();
}

/**
* Main file that handles every page request.
*
* The main.php does a number of set-up activities for the request.
*
* - Includes the first one of the following files that it finds: (root)/_ss_environment.php,
* (root)/../_ss_environment.php, or (root)/../../_ss_environment.php
* - Gets an up-to-date manifest from {@link ManifestBuilder}
* - Sets up error handlers with {@link Debug::loadErrorHandlers()}
* - Calls {@link DB::connect()}, passing it the global variable $databaseConfig that should
* be defined in an _config.php
* - Sets up the default director rules using {@link Director::addRules()}
*
* After that, it calls {@link Director::direct()}, which is responsible for doing most of the
* real work.
*
* Finally, main.php will use {@link Profiler} to show a profile if the querystring variable
* "debug_profile" is set.
*
* CONFIGURING THE WEBSERVER
*
* To use Sapphire, every request that doesn't point directly to a file should be rewritten to
* sapphire/main.php?url=(url). For example, http://www.example.com/about-us/rss would be rewritten
* to http://www.example.com/sapphire/main.php?url=about-us/rss
*
* It's important that requests that point directly to a file aren't rewritten; otherwise, visitors
* won't be able to download any CSS, JS, image files, or other downloads.
*
* On Apache, RewriteEngine can be used to do this.
*
* @package sapphire
* @subpackage core
* @see Director::direct()
*/

/**
* Include Sapphire's core code
*/
require_once("core/Core.php");

if (function_exists('mb_http_output')) {
mb_http_output('UTF-8');
mb_internal_encoding('UTF-8');
}

Session::start();

// IIS will sometimes generate this.
if(!empty($_SERVER['HTTP_X_ORIGINAL_URL'])) {
$_SERVER['REQUEST_URI'] = $_SERVER['HTTP_X_ORIGINAL_URL'];
}

// Apache rewrite rules use this
if (isset($_GET['url'])) {
$url = $_GET['url'];
// IIS includes get variables in url
$i = strpos($url, '?');
if($i !== false) {
$url = substr($url, 0, $i);
}

// Lighttpd uses this
} else {
if(strpos($_SERVER['REQUEST_URI'],'?') !== false) {
list($url, $query) = explode('?', $_SERVER['REQUEST_URI'], 2);
parse_str($query, $_GET);
if ($_GET) $_REQUEST = array_merge((array)$_REQUEST, (array)$_GET);
} else {
$url = $_SERVER["REQUEST_URI"];
}
}

// Remove base folders from the URL if webroot is hosted in a subfolder
if (substr(strtolower($url), 0, strlen(BASE_URL)) == strtolower(BASE_URL)) $url = substr($url, strlen(BASE_URL));

if (isset($_GET['debug_profile'])) {
Profiler::init();
Profiler::mark('all_execution');
Profiler::mark('main.php init');
}

// Connect to database
require_once("core/model/DB.php");

// Redirect to the installer if no database is selected
if(!isset($databaseConfig) || !isset($databaseConfig['database']) || !$databaseConfig['database']) {
$s = (isset($_SERVER['SSL']) || (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != 'off')) ? 's' : '';
$installURL = "http$s://" . $_SERVER['HTTP_HOST'] . BASE_URL . '/install.php';

// The above dirname() will equate to "\" on Windows when installing directly from http://localhost (not using
// a sub-directory), this really messes things up in some browsers. Let's get rid of the backslashes
$installURL = str_replace('\\', '', $installURL);

header("Location: $installURL");
die();
}

if (isset($_GET['debug_profile'])) Profiler::mark('DB::connect');
DB::connect($databaseConfig);
if (isset($_GET['debug_profile'])) Profiler::unmark('DB::connect');

if (isset($_GET['debug_profile'])) Profiler::unmark('main.php init');

// Direct away - this is the "main" function, that hands control to the appropriate controller
Director::direct($url);

if (isset($_GET['debug_profile'])) {
Profiler::unmark('all_execution');
if(!Director::isLive()) {
Profiler::show(isset($_GET['profile_trace']));
}
}

I am not sure why the other pages from the navigation work just fine and these two are saying this message.

Avatar
CalebP

Community Member, 3 Posts

10 July 2013 at 1:48am

Nevermind on the last post. It was the local cache of google chrome. All other browsers worked. I emptied chrome's cache and all is well.

Thanks