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.

General Questions /

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

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

Copying from local to productie, 404 error?


Go to End
Reply


30 Posts   4685 Views

Avatar
raamklaza

Community Member, 182 Posts

25 June 2009 at 7:23pm

Hello,

i make a nice silverstripe website locally.

I wanted to check how it looks online so i uploaded the files, copied the database and changed the _config with my db connection.

But now i get the following message (in ff btw). As you can see it still links to a local file, but from where? Anyone any idea's?

Not Found

The requested URL /1-Ontwikkeling/xxx.nl/sapphire/main.php was not found on this server.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

Avatar
banal

Community Member, 901 Posts

25 June 2009 at 7:49pm

Most likely you didn't copy the .htaccess over to the live server. Or the RewriteBase in the .htaccess is different from local to production.

Avatar
raamklaza

Community Member, 182 Posts

25 June 2009 at 9:03pm

Hm oke .htaccess forgot about that.

I changed it in the file and upload it...

But still the some message...

The requested URL /xxx.nl/sapphire/main.php was not found on this server.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

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

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /xxx.nl

RewriteCond %{REQUEST_URI} !(\.gif$)|(\.jpg$)|(\.png$)|(\.css$)|(\.js$)|(\.php$)

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

Avatar
raamklaza

Community Member, 182 Posts

25 June 2009 at 9:07pm

When i change the Rewritebase in the .htaccess to just / i get the following message....

===
Website Error
There has been an error

The website server has not been able to respond to your request.
===

Is there a way to get more info on this error?

Avatar
Sam

Administrator, 685 Posts

25 June 2009 at 10:15pm

Yes. Change your site into dev mode. See http://doc.silverstripe.com/doku.php?id=debugging#dev_mode for more info.

Avatar
raamklaza

Community Member, 182 Posts

25 June 2009 at 10:45pm

Edited: 25/06/2009 10:48pm

When is put behind the url i get: ?isDev=1

Fatal error: Couldn't run query: SHOW FULL FIELDS IN `Permission` Table 'w0576642_ss.Permission' doesn't exist in /home/w0576642/domains/xxx.nl/public_html/sapphire/core/model/MySQLDatabase.php on line 400

I changed the _config so it's in dev mode and then i see:

[User Error] Couldn't run query: SELECT `SiteTree`.*, `Page`.*, `GhostPage`.*, `BlogEntry`.*, `BlogHolder`.*, `Calendar`.*, `CalendarEvent`.*, `FlickrGallery`.*, `Forum`.*, `ForumHolder`.*, `ErrorPage`.*, `RedirectorPage`.*, `VirtualPage`.*, `MetaBlog`.*, `UserDefinedForm`.*, `YoutubeGallery`.*, `SiteTree`.ID, if(`SiteTree`.ClassName,`SiteTree`.ClassName,'SiteTree') AS RecordClassName FROM `SiteTree` LEFT JOIN `Page` ON `Page`.ID = `SiteTree`.ID LEFT JOIN `GhostPage` ON `GhostPage`.ID = `SiteTree`.ID LEFT JOIN `BlogEntry` ON `BlogEntry`.ID = `SiteTree`.ID LEFT JOIN `BlogHolder` ON `BlogHolder`.ID = `SiteTree`.ID LEFT JOIN `Calendar` ON `Calendar`.ID = `SiteTree`.ID LEFT JOIN `CalendarEvent` ON `CalendarEvent`.ID = `SiteTree`.ID LEFT JOIN `FlickrGallery` ON `FlickrGallery`.ID = `SiteTree`.ID LEFT JOIN `Forum` ON `Forum`.ID = `SiteTree`.ID LEFT JOIN `ForumHolder` ON `ForumHolder`.ID = `SiteTree`.ID LEFT JOIN `ErrorPage` ON `ErrorPage`.ID = `SiteTree`.ID LEFT JOIN `RedirectorPage` ON `RedirectorPage`.ID = `SiteTree`.ID LEFT JOIN `VirtualPage` ON `VirtualPage`.ID = `SiteTree`.ID LEFT JOIN `MetaBlog` ON `MetaBlog`.ID = `SiteTree`.ID LEFT JOIN `UserDefinedForm` ON `UserDefinedForm`.ID = `SiteTree`.ID LEFT JOIN `YoutubeGallery` ON `YoutubeGallery`.ID = `SiteTree`.ID WHERE (HomepageForDomain REGEXP '(, ^) *roufaida\.nl *(,|$)') ORDER BY Sort LIMIT 1 | Table 'w0576642_ss.SiteTree' doesn't exist
GET /

Line 400 in /home/w0576642/domains/roufaida.nl/public_html/sapphire/core/model/MySQLDatabase.php

I think it means that the db is not correct, right?
But i copied the db contents from local to production... Both through phpmyadmin

Avatar
raamklaza

Community Member, 182 Posts

25 June 2009 at 11:37pm

Weird thing though:

Table 'w0576642_ss.SiteTree' doesn't exist

DOES exist

Avatar
raamklaza

Community Member, 182 Posts

26 June 2009 at 12:24am

Help :'(

Go to Top