PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Thursday, February 10, 2022

[FIXED] Yiiframework can't load js & css resource

 February 10, 2022     centos5, yii     No comments   

Issue

I have my Yii application worked well on Windows Server. But when I deploy it on Centos server, the js and css files cannot be loaded. I got 404 error, CHttpException.

Source code to load resource:
     Yii::app()->clientScript->registerCssFile(Yii::app()->theme->baseUrl.'/css/custom.css');
     Yii::app()->clientScript->registerScriptFile(Yii::app()->theme->baseUrl.'/js/jquery-1.7.1.min.js');

In addition, I have 4 Yii web applications deploy on the same server. And the other ones work well. Does anyone know the reason why? Can it be a security error on Centos that does not publish themes folder?

Please help me on this.

TIA,


Solution

I think it's permissions problem. Check permissions of your files and folders (can web-server process access them)



Answered By - driver_by
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing