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

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.

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.

Forbidden You don't have permission to access /appetitclic/wp-content/themes/Apc/img/logo.png on this server

Hello all :)
I am currently working on a WP website and a the moment I am working locally with Wampserver.
None of my pictures happen to appear on my website.
Here is the error I get when I put the image url in my browser :
Forbidden
You don't have permission to access
/appetitclic/wp-content/themes/Apc/img/logo.png on this server.
I have no problem accessing phpmyadmin and image from TewentyTwelve template work fine.
Things I have tried :
-Editing (and creating) .htaccess in wp-admin.
-Editing phpmyadmin.conf
-Puting Wamp on online mode
-Working through http://127.0.0.1/ instead of locally.
I am pretty sure the problem doesn't have to so with the code because I have access to the /appetitclic/wp-content/themes/Apc/img/ folder and I see the list of images (not working). I maybe missed one or two workarounds but I am pretty sure I tried most of the common ones.
If you need any info on my setup / configs I have tried ask away.
Thank you very much,
Cheers.
If you start your relative url with a backslash '/' that means go to the servers root folder and work up from there.
Try loosing the leading slash and see what that does.
I have that same problem when I downloaded random images for img preloading testing.
So I went to change permission from no access to read & write (if on Mac then > Get info. You shall see that permission section at the very bottom).
You might use chmod to change permission to particular users.
Hope this help.
I had the same problem today. I created a static webpage put in the html folder of my web server. It turned out that some images could not be loaded. The solution is quite simple. I just right click the image folder and changed the properties to allow readers to view the images.

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

how to transfer codeigniter site from localhost to live server

I developed a site in codeigniter with basic functionality now i want to update this site to my live server. But when i uploaded my site to live server it shows 404 - PAGE NOT FOUND.
http://www.nawtist.com/test/ams/
Please tell me what do i need to do. I searched a lot about this but i didn't found any helpful information. So is there any base_url or anything else that i need to change before upload this on live server really appreciate
And remember, many servers are case-sensitive and with CodeIgniter v3 you should change the controller's first letter file and model's first letter file to upper case. That worked for me too.
Best
You have problem with your htaccess file or mod_rewrite is disable on that server.
When you go to page with index.php it works (although css file doesn't work because of bad routing)
also check if $config['index_page']=''; if it should work without index.php
I had the same problem times ago and there are 4 points in codeigniter to care about as I remember:
Check base_url value in your "config.php"
Check database settings in "database.php"
Check .htaccess file contents if you have defined it once
Check routes.php if you have defined any custom routes
That's all!
If you are facing 404 page not found in Codeigniter after upload file local to live server then follow these steps
change your controller and file name first letter capital
same change as above in model class and file name i.e first letter capital
After following steps above your problem can be solve Thank you.

URL Rewrite with Joomla on IIS7

I have Joomla 1.5.9 running on IIS7. I'm now experimenting with the SEO Settings from the Joomla global configuration page.
First I toyed with Search Engine Friendly URLs (that gets rid of the queries part of URLs); that works fine.
I also tried to enable the "Use Apache mod_rewrite". I installed "Microsoft URL Rewrite Module for IIS 7.0" and added the web.config as per http://learn.iis.net/page.aspx/527/joomla-on-iis . When clicking on menu links, this seems to work in that I no longer see index.php in the URL. The address bar updates to what appears like the right URL, but the content shown is always that of the home page. I tried both in IE and Google Chrome with the same result. Refreshing the page after loaded made no difference.
I tried re-starting IIS7, it didn't make a difference.
Edit: After I followed the suggestion below (followed instructions at http://www.mydotnetworld.com/post/2008/10/24/URL-Rewriting-In-Joomla-15-on-IIS-7.aspx :turned on fast cgi, modified php.ini, and imported rewrite rules instead of putting them in a web.config myself), I now get 404's instead of just showing the home page's content. The URL still appears to be correctly rewritten. So, different behavior but still doesn't work. I'm not sure this is useful information, but these two fields are shown in the 404 page:
Requested URL http://localhost:80/joomla_course/seasonal-specialties
Physical Path C:\inetpub\wwwroot\joomla_course\seasonal-specialties
Should the physical path be the 'non-rewritten' URL? Or is it expected that that it be like this?
Edit 2: Oho! I found someone with the same issue posted on Joomla forums: http://forum.joomla.org/viewtopic.php?f=543&t=364706&p=1598137#p1598137 . No answer there either, though.
Any idea on how to diagnose (or even better, fix :) ) this?
Thanks!
I got this to work now. The key was to make sure FastCGI is used to run php (as per http://learn.iis.net/page.aspx/246/using-fastcgi-to-host-php-applications-on-iis-70 ), and making sure that the "Use Apache mod_rewrite" is enabled. If "Use Apache mod_rewrite" is turned off but the rewrite rules are present in IIS7, then the HTML shows up but none of the styling or images.
The requirement for using FastCGI is weird (and contradicts what is suggested in http://maximumpcguides.com/windows-vista/how-to-create-a-windows-vista-iis7-mysql-php-web-server , which is what I used to setup php in the first place). Everything seems to work when not using FastCGI, except for the URL rewriting.
It seems that either importing the rules (as suggested in http://www.mydotnetworld.com/post/2008/10/24/URL-Rewriting-In-Joomla-15-on-IIS-7.aspx) or manually adding them to a web.config file (as suggested in http://learn.iis.net/page.aspx/527/joomla-on-iis ) will work.
It looks like there is something wrong with the rules in the web.config. Just going from a comment on the article you linked you are not the only one having this issue. I would remove the web.config and then follow the steps outlined here.

Resources