CakePHP from localhost to remote server - blank page - cakephp

i am trying to figure this out for a long time now, but so far no luck, maybe somebody can help me.
I have a 2.2.2 cakephp installed on my computer (localhost) and everything works perfectly. But now i want that same project to be online on remote server. I upload everything, set mysql path but i get a blank page when trying to access the site.
If i upload a fresh cakephp it works, but my project doesnt. The debug is set to default, think that should be 2? I also deleted files in cache/tmp, but still no errors or anything, just blank page.
Any info would be helpful, thank you.

I hate when that happens :). Usually it does if there is an error somewhere and you can't see it because the errors are turned off, so you should call phpinfo() and see if display_errors is on. Changing the debug mode doesn't work every time since display_errors is set from php.ini.
Unfortunately, if this is the problem and you don't have access to edit the php.ini file, you might need to ask the hosting provider to change it and restart the php service.
You can also try this: error_reporting(E_ALL)

I uploaded changes to my cakephp website and discovered that all actions for a particular controller returned a blank page. I discovered what the error was and was able to reproduce it with another controller.
The problem was that in the first line of my controller file I had a space before the opening php tag.
One space cost me hours.

Just uploading all files won't cut it. Make sure you work through this checklist:
First and foremost, check the error log file located under app/tmp/logs/error.log, this usually holds some very good pointers as to what is wrong.
Make sure you have uploaded the app/Config/database.php file with the proper details. Local installs usually have user root without password. Online servers (obviously) do not!
To that extent, also make sure you actually have a database with your hosting provider (either your host sent you the info or you need to create it yourself using their control panel).
Make sure you also uploaded all .htaccess files (the one under the root directory and /app and /app/webroot), some FTP programs don't show this "hidden" file by default.
If all else fails, contact your hosting provider for further support as they usually have access to more verbose server logs that can also hold clues.

The real problem was only the coding I used in notepad++. All my files were encoded with UTF-8, but they should have been UTF-8 without BOM. After I changed it to UTF-8 withot BOM, everything started to work perfectly.

Related

Umbraco angular errors

We have a project running Umbraco 7.5.9
We have suddenly started to get the following errors when loading Umbraco and opening various document types
Failed to load template: views/components/umb-folder-grid.html?umb__rnd=7.5.9.884162080
The errors come from /umbraco/lib/angular/1.1.5/angular.min.js
Is this a server setting that is causing this? The error has suddenly started appearing in several applications
Thanks
Check your project path whether Umbraco\Views\components\umb-folder-grid.html files exist?
It seems like you are missing that file - maybe accident delete it or did not include it when publish
Check your dev tools network tab and look for the call for the umb-folder-grid.html file.
It should come with a 200 response, but in your instance it may be 404ing.
I found that this file is requested when I go to the Media section of Umbraco.
If the file is 404ing, open up the location of the file in a separate tab and see if anything is being returned. If there is nothing there, check that your server does have the file on it.

"Respawning" Files in Cpanel

So straight to the point- Im trying to clean my host entirely (databases too) and after I delete the last 2 files wp-content and wp-includes (700MB of files) they get restored instantly. This may be a simple question but for me it s very odd and I don`t get it. Besides file-manager i used Filezilla too and the same thing happens(my hosting company as it su#%$ failed to give me a reply after 48h).
I have recorded a short video of my problem to help you better understand my issue.
https://www.youtube.com/watch?v=wqL35R0-vvw&feature=youtu.be
Hope you`ll be able to help me. Thank You !
I`m working on this website for an NGO after it was hacked and for now I want to wipe every single file from the server and rebuild it but those files which have inside infected pages(php scripts) wont get deleted
Chances are very good some of those files are owned by the webserver, especially if you were compromised via a WordPress vulnerability. As they're owned by the webserver and not your user, you're unable to delete them.
If you have root/sudo access, you can use that on the command-line to remove them. If you don't, you'll need your host to help.

Wordpress URL Change on submit

I currently have a website i'm working on that I have taken over from another individual, I dumped his SQL file into my database and everything seems to be ok apart from one thing. Whenever I try to log in to the back end or if I try to go elsewhere, it will add an additional .co.uk to the address bar, making it like so:
From: www.domain.co.uk to www.domain.co.uk.co.uk
I've had a dig in the database but I really can't find anything and i've never faced this issue before, could anyone shed some light on this for me? Maybe just let me know where I could look within the database to identify the problem, many thanks.
Take a look at the .htaccess file in the root folder, which is hidden and may contain rewrite rules.
Also, I recommend you use this plugin for migrations:
http://wordpress.org/extend/plugins/wp-migrate-db/
I use it whenever I move from localhost to a live site and vice versa. It will also ensure your widgets are preserved, since doing a find replace will cause the object serialisation syntax WordPress uses to break.
After migrating, you need to visit Settings > Permalinks so the .htaccess file can be updated according to the new URL for rewrites.

Stubborn Silverlight Caching Issue?

Bear with a bit me before jumping straight to the normal caching fix solutions. Here's what happening:
I have a project, a single project out of dozens in our solution that appears to be refusing to update its code when I build and run. It's not part of the xap, but a dll sitting along side the xap.
Things I've already determined not a solution:
I've checked the output of its dll and it has been built, and its contents updated to match my code, verified with dotPeek. But it refuses to display the updated code.
I clean, rebuild the solution, and restart the dev server but it refuses to display the updated code.
I switch to a different browser, no dice.
I clear browser cache's to no avail.
I completely delete my local code and do a fresh fetch from our repository, again, no love from silverlight.
I have not been without a little success though. The ONE bone I've been thrown was over the weekend. Not touching it for a couple days, I came back to work on Monday and, without having done anything to it, it just updated. Now, however, it's cached again, or something, because it's stuck in the last set of changes I made to it.
So my question is this: What am I missing?
Most likely your files may be read only and MS Build fails to display error message and it does not update files. In case if you have mistakenly checked in your .xap files, then this is possible, you will have to remove it from your source control and also make .xap file writable by removing readonly checkbox.
Visual Studio checks in your .xap files by mistake and silverlight build does not report any error.
Second, do you have any other file backup service installed like Shadow copy or Dropbox kind of online backup service, something is probably making xap files readonly and that is causing this problem.
Here there are couple answers: Prevent Silverlight 3 from caching while debugging
Code below helped me(add this to Page_Load of page that hosted the app ):
Response.Cache.SetExpires(DateTime.Now.AddSeconds(-100));
Response.Cache.SetCacheability(HttpCacheability.NoCache);
UPDATE:
Prevent Silverlight xap from being cached by proxy server
"So my question is this: What am I missing?"
An internal caching mechanism that our application uses. So, none of you could really have helped me as it was an architectural feature of our software.

SSRS css messing up?

So the last couple of days my dev webpage for ssrs has been looking really weird, as if it's not getting styled by css at all. I'm not the only person that is seeing it like this. We just rebooted the server and it didn't have any effect. If you know what it causing this, please help.
another symptom is that i can't modify security settings now.
If I were you, I would view the page using FF (firebug), and take a look in the head to see whether the CSS is being imported.
If it is, make sure the path is correct.
A couple of general things come to mind...
Make sure your IIS application/virtual directory settings are correct especially if you are using SSRS2005. The default IIS applications are "Reports" and "ReportServer"
Make sure the NTFS rights are correct for Local path. For example the default location for ReportServer is "c:\Program Files\Microsoft SQL Server\MSSQL.3\Reporting Services\ReportServer"
In my experience when strange things like this are happening there are user rights/access issues. Especially when you can't modify security settings.
HTH
Well it kinda seems to have fixed itself.
This may be a bit naive, but have you tried an offline version of the code?
Get the generated HTML via "view source" in your browser of choice, then get the stylesheet by accessing it directly from the same browser, using whatever the path is from the html (I recommend Google Chrome, as the view source provides clickable hyperlinks within the source). Put them both on your desktop, making sure the relative paths are preserved, and see what it looks like offline.
I'm sure that the server/Microsoft produce all of this code and so it's SUPPOSED to work, so a missing closing tag or misplaced semi-colon is probably not the answer, but I have found more than once that pulling my output off the server and onto my desktop has made the problem go from mysterious to "Oh! Duh! /styles/style.css, not /Styles/style.css" etc etc.
The problem can only be with your server if www doesn't have read/execute access to all of the right folders. I find this really unlikely, but it's easy to check by simply trying to view the source code of the CSS. If you can, the problem is post-server output.

Resources