install kohana into another website - kohana-2

I have a website that is built with kohana and another one that is built without any framework. I would like to include the first site into the second as an application ( you can write only a report with it).
The first website it's not mine( I never used kohana) so I don't understand everything very well. Inside a folder(let's call it KOHANA) I have index.php a .htaccess file and other 3 folders:
application,
system,
modules.
I've put the kohana folder inside my website(inside the public_html folder), but nothing works...First I had an error with magic quotes, then with the log directory, the other errors ...and I kept looking for solutions and fixing the errors, but I keep getting other errors. The last one is: logsThe URI you submitted has disallowed characters. It's an old version of Kohana. How can I set-up kohana into my website without getting any new errors. I don't know if I made myself clear. Thank you.

Related

Codeigniter based website on Mochahost displaying blank pages

Hi i'm a bit new at uploading a website to a webserver and i've encountered a problem.
my site is using codeigniter and my host is MochaHost.
First of all I already successfully uploaded the site i made it run twice,
but on my last upload of updated files the power went out and the upload stopped half-way through. And when the power was back I reuploaded the updated files.
Now, the problem is that when ever i try to open my site it only displays a blank page. I've tried to view specific page but it still displays a blank page. Here's the site: http://www.sph-mis.com/ .. displaying only blank pages
I read somewhere that the problem might be the directory in were i put the files, and i put it on the public_html directory
http://imgur.com/EDM6Nka
The 1st and 2nd try i did worked with the same directory but now its doesnt work.
now it just displayig blank sapce;
Can anyone help me with this?
FIXED
check the reply i made below
So really the question is how to I debug a blank page in CodeIgniter. I don't know if there are some php errors waiting to be found behind that white screen of death but its your first step to figuring it out. So here goes some ways to get some errors you can actually work with.
in your .htaccess file where index.php is located put this into it: (if none exists create it)
# display php errors
php_flag display_startup_errors on
php_flag display_errors on
php_flag html_errors on
if you get a 500 error your host may be using suPHP and you cant do it this way.
another thing to do is try this
for ci older then 2.x modify the error_reporting function in index.php to use E_ALL
error_reporting(E_ALL);
for ci newer then 2.x instead set ENVIRONMENT in index.php as:
define('ENVIRONMENT', 'development');
this sets the error_reporting to E_ALL.
You can also set in application/config/config.php
$config['log_threshold'] = 4;//or 1 for error messages only
then check for a log file in the application/logs/ directory (make sure its writable)
Also make sure your db settings are correct. CI may suppress a database connection error.
Lets see if that gets you any further.
I already fixed it, what i did was got a clean copy of codeigniter and replace the application folder and added my assets folder to it and then uploaded it.. and it worked. Something must have been wrong within my old system folder.

Posting site to IIS - cannot find files

I have created a small site, on IIS express all is working fine. I have created on IIS new application and deployed the package to the folder. the server side is asp.net webapi. the bundle configuration is loading fine when i try to enter the home page, how ever the java script files which are referenced on the cshtml page cannot be found
<script src="~/Client/lib/require/require.js" data-main="../../Client/app/requireConfig"></script>
i am getting -
require.js
/Client/lib/require --> 404 cannot be found
and the bundle which works
viewingPanelDirective.js
/NGWeb/Client/app/appComponents/viewingPanel
how can I over come it?
I think i know what might be the cause, i had the same problem myself
in you visualstudio, the js file was running on a url like this
http://localhost:/client/lib/require/require.js
now you published it, and added it as an application to your default site, you would have given it an alias (e.g) "testsite"
meaning that in reality the file is hosted at
http://localhost/testsite/client/lib/require.js
but in reality your site is looking for it (because of the ~) at
http://localhost/client/lib etc etc
Edit in response to comment:
rather than removing the ~ (which you will need to navigate you back to the url root), i would rather just include your app name in the bundles virtual path, like this:
bundles.Add(new styleBundle("~/yourAppName/Content/css")) ....... etc
I also came across this post, I haven't tried it myself but it seems an interesting alternative to my method.
Fixing Relative CSS Paths when using .NET MVC 4 Bundling

How do i fix these wrong URL's in my broken magento deployment?

This is my first attempt at using Magento to develop a site. I have to admit the learning curve has been steep, but i have been able to navigate most of the challenges thus far. Here at the final hurdle, however, i have stumbled.
Specs:
Magento 1.7.0.2
Apache version 2.2.22
PHP version 5.3.10
MySQL version 5.1.65-cll
Magento is located in a folder on the server named magento one directory down, as in http://www.mydomain.co.za/magento
Problem:
No images are displayed in the front end or backend. It is as if it cannot access the stylesheets. When viewing the source, i can see that the paths are wrong. It searches for the stylesheets in http://www.mydomain.co.za/ and not in the magento folder. I can access the backend by typing in http://www.mydomain.co.za/magento/index.php/admin and that brings up the backend without any styling. After that however, every request results in 404. The URL looks like http://www.mydomain.co.za/magento/adminindex.php without a slash between admin and index. Introducing that slash manually after every 404 results in correct page being displayed (still without styling). So clearly the problem is here, but i can't seem to fix it. And YES, i do have the slash after the path in the database for both secure and unsecure.
Attempts to solve:
Changed the url’s in database link
Changed app/etc/local.xml to use correct database
Changed .htaccess to include this line: RewriteBase /magento/ (but i
removed it again)
Deleted the appropriate cache and sessions folders
Tried some of the suggestion given here link
Now, i am stuck. I have worked my way through error upon error (no fault of Magento, just the learning curve) and i am tired… :-( If someone can please give me some advice as to what to try next, it would be greatly appreciated.
I found these links of the (seemingly) similar problem. Clearly there is something happening here. The other thread never solved the issued, just found a work around. Is it possible that we have run into a bug? Something is stripping that slash out and it isn’t any of the usual suspects… dum dum dum
link
link

After moving CI from one provider to another I get white screen of death on my homepage

I have moved my CodeIgniter application from my first server provider where everything works great to another one ( because of better speed etc.) and I have now two strange problems with WSOD.
When I go to my homepage I get a WSOD.
Well, I tried to remve the index.html file in the root and it magically works.
My question is why I need to remove the index.html file if it is there as a default file in CI package?
Is this a problem of the server? What should they change so I can leave index.html in my root? Should they enable some module or?
I think it is better for security reason to have index.html in the root folder or am I wrong?
My another problem is that when there is a redirect, e.g. on login, submiting form. I get after hitting submit a WSOD. But only when the validation is successful, so I am asssuming that the redirect failed.
One thing to notice. I am not using refresh as the second parameter, bacause it causes problems WSOD on my localhost.
Could this be a problem?
Which Apache or PHP server configuration paramter could cause this problem?
EDIT: I tried redirect('admin', 'refresh'); and also redirect('admin', 'location', 301); but I am still getting WSOD :(.
EDIT 2: Could this be an issue of disabled FastCGI PHP5?
EDIT 3: My base url in config file is OK: $config['base_url'] = 'http://www.myproblematicpage.com/'; . It has the trailing slash and everything what is needed. I am not using subfolders etc.
EDIT 4: I have changed the title of this post to be clear that everything works on my first provider, but this problem emerges after moving to another
OK, so after enabling showing errors in index.php (changing production to development mode) I saw that the problem was on the first line of the form_validation_lang.php file in my application/language/english folder. But I didn't saw any whitespaces before the first UTF-8 without BOM and BANG!... the problem disappeared. Probably the BOM was the troublemaker. However, I still don't know how could it work on the previous hosting.

code igniter framework guidance for beginners

I am just a beginner in code igniter. I have just downloaded the code igniter framework. But i don't know that where should i keep my html, php files and stylesheets, images etc. Is there any procedure to do the things? Please guide me.
CodeIgniter has an awesome user guide that will come with the install you can read through (or read it online at - http://codeigniter.com/user_guide/ ), or you can watch some of the videos on their site - http://codeigniter.com/tutorials/
In comparison to most other frameworks you're going to find they have maybe the smallest learning curve and great documentation. I would also recommend learning basic PHP and getting familiar with your web environment maybe before beginning.
I used these tutorials to help get me started with the framework haven't look back since! http://net.tutsplus.com/sessions/codeigniter-from-scratch/
hi I am a weekend coder and picked up CI about a year ago.
It helped me a lot.
The best tutorial I found was on the IBM's developer site. It runs through putting together a simple application. Admittedly, there's nothing in it about directory and file placement but it helps cement ideas about how models, views and controllers (MVC), and why MVC is so helpful. Because the basic idea is quite simple, it's worth running through a simple CI tutorial again and again till you 'feel' or intuit the basic helpfulness of the setup.
Things like JS, CSS files can be kept in their own folders at the first level of your website folder e.g /js or /css or /images. You ask about PHP files as well. PHP files which you, the coder, write, are either 'views', 'models' or 'controllers'. These go in the folders with those names in the /application folder e.g /application/views/yourview.php or /application/controllers/yourcontroller.php. The CI install comes with a default view file and a default controller, which you are probably already aware of.
The files inside /application/config are important as well. Read the user-guide about tweaking these files. The most obvious tweaks are to database.php to connect to your db, autoload to give automatic use of CI helpers/libraries which you can choose, and to config.php to give CI the name of your website e.g the name you give to '/'.
The file 'index.php' comes with the CI installation (/index.php). You don't need to fiddle with it at all really except to determine the level of error reporting you want ('environment') and that's not a priority at all. But it's important to remember this about index.php - that CI uses it as the essential reference for defining paths to useful folders like CSS or images. So even if your view file is in /application/views, if it refers to an image like a logo.gif in /images for example, the path to it is just /images/logo.gif. It is not anything more complicated like ../../images/logo.gif.
I hope that helps.
Tom
Offline version of CodeIgniter user guide is available with CodeIgniter which already downloaded by you.
just extract your CodeIgniter zip file in your localhost server root directory,
Then http://localhost/www/CodeIgniter_2.1.2/user_guide/ open this url with browser ,here you can access offline version of CodeIgniter user guide.
Here I am using wamp server so I used this url, If you are using xampp server then please use http://localhost/CodeIgniter_2.1.2/user_guide/
Okay this is what I would usually do for code igniter
here is my directory structure.
CI App Path (e.g "c:\xampp\htdocs\ci_app_name" )
-application
-system
-assets
--css (new folder , where css files will be included)
--js (javascript and jquery libraries location)
Basic HTML and PHP files should be location
CI_app_pah
-application
--views (this is where to put HTML and PHP files)
For other things such as Controller , Models and Views , you can't put any where but put in their related area.
That will be
CI app
-application
--controllers
--models
--views

Resources