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.

Installing SilverStripe /

Getting SilverStripe up and running on your computer and on your web server.

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

[SOLVED] no themes, lots of 404s on new 3.1.2 installation (XAMPP)


Reply


5 Posts   952 Views

Avatar
mcbmcb0

Community Member, 4 Posts

31 January 2014 at 9:04pm

Edited: 31/01/2014 9:10pm

hello
first try with SS as hoping to move an exiting site. I'm testing on XAMPP 1.8.1 on win7-64 which is setup ok - running wordpress and other sites. apache 2.4.3 and php 5.4.7 with fileinfo enabled.

SS installed successfully and showed successfully themed/displayed success page; see attached screenshot_1
BUT all other pages have no themeing/css - just white with text - while *appearing* to function: ; see attached screenshot_2
When pages load firebug shows 404's for:

http://ss.dz/index.php/themes/simple/javascript/%5C/themes/simple/javascript/script.js?
http://ss.dz/index.php/themes/simple/css/%5C/themes/simple/css/reset.css?m=1384238658
http://ss.dz/index.php/framework/thirdparty/jquery/%5C/framework/thirdparty/jquery/jquery.js?m=1384238656
http://ss.dz/index.php/themes/simple/javascript/%5C/themes/simple/javascript/script.js?"
... and others...


the apache logs shows its not rewriting these requests - tho is redirecting the original page call. htaccess is default from the install.
Xampp is set up with virtual hosts, so location is not in xampp/htdocs. the relevant httpd-vhosts.conf block (like other working v-hosts) is:

<VirtualHost *:80>
   ServerName ss.dz
   DocumentRoot "D:/wwwdz_ss"
   <Directory "D:/wwwdz_ss">
      Options Indexes FollowSymLinks Includes execCGI
#xampp 1.8.1 format:
      Require all granted
   </Directory>
</VirtualHost>


and windows hosts file is configured (must be, with v-hosts, else the install/success wouldn't work, right?).

following a similar unsolved thread here [url]http://www.silverstripe.org/installing-silverstripe/show/25532[/url] i can confirm that windows/temp has a 'silverstripe-cache...' folder and i've ensured all permissions set. similarly set permissions on assets, tried ?flush=1, cleared cache, tried other browsers...

I'm thinking htacess due to the 404s (and yes, thos pages are installed) but aren't clever enough to figure this stuff out. maybe it doesn't like the virtual host configuration?
can anyone help with this/other ideas?

thanks

mike

Attached Files
Avatar
Sean

Forum Moderator, 922 Posts

10 February 2014 at 3:12pm

Tried adding AllowOverride All into the <Directory> part of the vhost configuration?

Sean

Avatar
mcbmcb0

Community Member, 4 Posts

10 February 2014 at 11:19pm

thanks for the suggestion Sean. unfortunately no difference with AllowOverride All (XAMPP restarted etc).

I've noticed with Firefox/firebug the 404s are for rewritten urls, such as:

http://ss.dz/index.php/themes/simple/css/%5C/themes/simple/css/layout.css?m=1381111500


whereas in chrome's tools the 404 is

http://themes/simple/javascript/script.js?

tho if the page is missing (e.g., http://ss.dz/xxx) then the 'Page not found' is properly formatted (no 404s, with proper css etc)
i re-installed with 3.1.1 and all the same

any other suggestions?
has anyone got this working with XAMPP? where you using virtual hosts?

cheers

Mike

Avatar
mcbmcb0

Community Member, 4 Posts

18 February 2014 at 10:10pm

OK so i think i've got his solved, thanks to noticing the many 301s and identifying index.php as causing that. then reading this thread:

http://www.silverstripe.org/installing-silverstripe/show/11824

either
1. in mysite/_config.php add

Director::setBaseURL('/');

OR
2. inframework/_config.php add:

Director::setBaseURL(str_replace("index.php/","",Director::baseURL())) ;

Of course why I have to do this on a fresh install is beyond me. This doesn't leave me feeling confident about migrating to silverstripe and also leaves me feeling I'm on my own with whatever problems lie ahead, forums or not.

hopefully this helps someone else out there

Avatar
Spaghetti

Community Member, 32 Posts

24 September 2014 at 1:05am

Thank you! Finally, an answer to a problem that's been bugging me for months! Well done.

Yes, it's not great. Most people will instinctively opt to use virtual hosts, so I've no idea why I need to add that line to my config, just to get resources to work properly with that setup.