Krlos Posted July 25, 2016 Posted July 25, 2016 Hi, I'm pretty sure this has been asked. many times before , but I can not find a solution to my problem, I need to show my friend how his site is going. I'm developing on my Mac usign Mampro, I have published about two other PW sites without problems, always in the root folder Whe I try to install this site to the "devel" folder in my friend's webhost, my assests are not working (css, images), and can't access the backend. The URL should be: www.domain.com/devel on my config.php I have: $config->httpHosts = array('domain.com', 'friends-admin'); I have copied over the .htaccess file Any help will be greatly appreciated
Krlos Posted July 25, 2016 Author Posted July 25, 2016 Hi Sérgio, I tried the RewriteBase /devel/ But I'm still my assests are failing to load. I can access the backend, but the assests are failing there too. Any clue?
Sergio Posted July 25, 2016 Posted July 25, 2016 How are you linking to the assets? Like the default {$config->urls->templates}assets/ ? And can I see your .htaccess and config.php (remove the password, of course) ?
Krlos Posted July 25, 2016 Author Posted July 25, 2016 Sergio, I'm using this to call my assets: <link rel="stylesheet" href="<?= $config->urls->templates; ?>assets/plugins/bootstrap/css/bootstrap.min.css"> I need to install in the /devel/ folder. I have changed the .htaccess file to txt Thank you for your help. config.php htaccess.txt
Sergio Posted July 25, 2016 Posted July 25, 2016 One question, did you move the .htaccess to the devel folder? I just tested a PW local installation here, running on MAMP: 1 - It was running under pw-multilang.dev with default config.: My config.php has $config->httpHosts = array('pw-multilang.dev', 'www.pw-multilang.dev'); 2 - I created a 'devel' folder inside the folder and moved all files, including the .htaccess, to it. Checked http://pw-multilang.dev/devel/ and all good, assets loaded and all pages accessible, including admin. 3 - I did another test, changed the base on .htaccess to /devel/ and all was good too. http://pw-multilang.dev/devel/ kept working. ---- Did you do anything else I didn't? 1
Krlos Posted July 25, 2016 Author Posted July 25, 2016 Sergio, If I put the .htaccess file on the root folder of the webhost (Cpanel by the way) I get no assets If a move the .htaccess file from the root folder to the /devel/ I get no assets and a 403 error on assets files. I also tried to mimic the folder on my Mampro and everything is working fine too.
Sergio Posted July 25, 2016 Posted July 25, 2016 I suspect it's a CPanel config then. Can you create a subdomain like dev.domain.com and move the files there?
Krlos Posted July 25, 2016 Author Posted July 25, 2016 This is driving me crazy. I created a sub domain: dev.domain.com Uploaded all files, uploaded .htaccess (with no edits, just the working .htaccess from Mampro), edited the config.php to: $config->httpHosts = array('dev.domain.com'); With no success...
Sergio Posted July 26, 2016 Posted July 26, 2016 Looks like a permission problem. What's the permission on the asset folder?
Sergio Posted July 26, 2016 Posted July 26, 2016 And also, just to be sure, are the assets files there on the server??
Sergio Posted July 26, 2016 Posted July 26, 2016 Hum... you can remove the style and scripts folders inside templates/ as you are not using them. But if you have the css and js file inside 'assets', maybe the error is from using PHP shortcode syntax to echo the path on: <?= $config->urls->templates; ?>assets/ Try using: <?php echo $config->urls->templates; ?>assets/ 1
Krlos Posted July 26, 2016 Author Posted July 26, 2016 I have all the assets inside the template folder along with te template.php files. I just tried: <?php echo $config->urls->templates; ?>assets/ No luck. The strange thing is that the PW backend is also loading without any assets, I'm gettin a unstiled backend.
Robin S Posted July 26, 2016 Posted July 26, 2016 Your templates folder has 777 permissions - some hosts don't like this and will throw errors. And the permissions look a bit funny in general. For my sites all folders have 755 and all files have 644 (apart from config.php which is set to 400 for security reasons). 3
Krlos Posted July 26, 2016 Author Posted July 26, 2016 Guys, It was a premissions problem. I ended uploading everything using ftp, and now is working fine. For some reason, when I packed the site using the Mac compress utility the permissions are screwed. Anyway, Thank you Guys for the help. 3
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now