Codeigniter based website on Mochahost displaying blank pages - codeigniter

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.

Related

Moved joomla site to another host but doesn't work

I have recently moved my joomla site to another hosting. But now the site doesn't work. Shows blank page. Though the administrator's page (/administrator) is shown and works correctly. Have any ideas for what reason it can be?
Remove the .htaccess altogether
clear the cache and tmp folders
make sure db name, login and password are correct in the configuration.php
make sure the server path (tmp and logs folders) are correct
if you still get an empty page, make sure you're looking at the right log file. Turn php error logging on or display them.
post some more details here...

Magento gives 404 on every page, including homepage

I have just followed the following steps for a Magento migration.
Copied all fiels from our staging server to the production server
Dumped the database and copied it to the production server
Imported database dump into new database
Updated app/etc/local.xml
Updated the database entries "web/secure/base_ur" and "web/unsecure/base_url" to the new url
Cleared var/cache
Now each page gives a 404 error, including the homepage and admin. Also, it does not seem to be a htaccess problem because urls with index.php in the path also don't work.
I have done the same procedure as listed about on my a different machine with the same files, and then it works fine. So it seems server specific.
I have done extensive searching on the problem, but nothing seems to help so far.
Any ideas are greatly appriciated!
--edit--
I somewhat fixed it.
In index.php I changed:
Mage::run($mageRunCode, $mageRunType);
To
Mage::run('english');
This seems to be necessary as english is the name of our default store. However, I think it would be better if Magento figures this out by itself. Also, how come this worked out of the box when migrating to another server?

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.

CodeIgniter installation questions

When I upload the CodeIgniter package to my web server on Bluehost, I can get into the main page, but not sure if this is all I have to do.
I've read many questions here about the same issue, but nothing worked for me. As I understand that I have to add some code .htaccess codeignitor code to the root .htaccess, but that made a mess in my url redirection.
I verified that mod_rewrite is working fine through some php code, but still unsure about the installation procedure. did any have this framework works on his Bluehost webserver??
I found the installation guide on this site, but the test fails back to 404 page.
By the way, I uploaded the package on a subdomain folder
Any comments are appreciated.
That's nothing wrong with Bluehost.. I've upload my CI into a subdomain folder in Bluehost. and nothing wrong.. It work perfectly..
Some questions :
Do you set your base_url correctly? or you can leave it blank.
Are you sure you've write the right .htaccess, and put it in the right place? make sure the index page in the config file is blank.

Resources