Strange forward slash in 'clean' Laravel project - laravel

I was developing as usual on my Laravel project tweaking with the Queue driver settings in my .env file, when all of a sudden a random forward slash appeared at the top of my project which caused some random issues. I've cleared all cache's, routes, views etc but I am still getting the strange forward slash. I even get it in the console when I run a command.
Every page:
I assume its some kind of strange bug in Laravel. Hopefully someone can tell me whats the issue. Thanks in advance.

check you files in the config folder: app.php, database.php, ... and also public/index.php and look for a \ before the <?php or if you closed it somewhere.
if you find nothing, lookout for an echo in those files. (on windows use grepwin for fast search)

Related

Laravel + PhpStorm caching issue

I have downloaded my project from the server to local exclude tests, storage and .cache directories.
When i going to change some blade files -> save+upload. I see no changes on my website.
I can see them after artisan view:clear command.
However, then I'm using FileZilla with notepad++ or even phpStorm remoteHost mode. I can see every changes at once on my website.
Can someone explain me this moment? How it's possible to fix it?
I solved my problem by removing option Preserve files timestamps.
I spent a huge amount of time on this! Hope it helps someone

Web pages download to desktop instead of load?

I am in the middle of migrating a Magento site over to a new server. I followed instructions provided in this video to a T-
https://www.youtube.com/watch?v=OiWmZFxrZns
However, now when I try to access the transferred site, any pages just download to my desktop instead of displaying in browser.
I have never encountered this before. Have you? Does anyone know what this could be? I apologize if this is too broad, but I'm wondering if maybe it's something I have to change in a file like .htaccess or something
Help!
As I suspected- it was the .htaccess file. I fixed the issue by deleting the file altogether, though I'm sure I want only able to get away with that because I migrated everything into a subdirectory to begin with rather than the root. I am unsure if this will still be a viable solution for those experiencing the same problem in a root directory.

Error after transfering Laravel files to production

I just moved my project to new server and after that I'm getting this message:
Whoops, looks like something went wrong.
I've changed permissions to "storage" folder and sub-folders... to 777 and nothing changed...
I wanted to see the logs... but even with 777 permissions there is no log file... :/
I also tried to get more details from the error by setting debug mode to true... but it changes nothing... :/
What needs to be done after moving files to server? Do i need to change some config to make it work?
I did the same with clean installation of Laravel 4.2 and i got the same problem... :/
UPDATE:
Actions made after installing new laravel 4.2 instance:
check i its working ("You have arrived.") so it's working.
create "app/config/production/app.php" (with debug => true)
transfer all files through ftp
change permissions to 777 for storage dir
check if its working: ("Whoops, looks like something went wrong.") its not... :/
page is here...
http://dev.slashlab.pl/lara-test/public/
(if this can help with anything... :/)
I hope this doesn't sounds too bananas -- but are you sure you're uploading and working in the right folder? If you've both changed the permissions on your files, and edited the debug configuration in all your app.php files to no effect, one possibility is you're editing the wrong files.
There are (mostly) 2/3 places, where your configuration could be. app/config/app.php , app/config/local/app.php and app/config/production/app.php. If you set debug to true in this 2/3 places and then upload them, it is not possible to have this error page. After upload, try to download it to your computer and check the file (is it correct).
So... after a long struggle... I found a solution... ;)
The problem was that on remote host i had magic_quotes_gpc turned on
Everything started to work flawlessly after turning it off. (same for laravel 4.2 and 5.0).
Thanks to all that helped, because every little answer pushed me few steps forward. :)

Second Laravel installation redirecting to the previous Laravel installation and blank page issue

Steps that created the issue:
Previous Laravel 4 installation exists (Status: Working Perfect!)
Installed second Laravel 4 project. After installation, I opened the project in browser, it redirects me to the previously installed Laravel index page.
Tried installing Laravel 4 the third time. Same issue. Both, the installation points to the first Laravel index page.
Tried (Steps didn't solve the problem):
chmod 755 permission to app/storage
restarted apache2 several times
Next Step I took something strange happened:
I removed the first Laravel 4 project from the server.
Now, when I open the second and third Laravel projects. Both, the installation gives me a white blank page/screen. No error, nothing.
I set debug to true, still nothing.
Then, I tried to load the page without public in the url. Instead of getting a list of folders (app, bootstrap, public and vendor) and files. I still get a blank screen.
I copied back the first working Laravel project to the server. Same problem starts, the second and third installation points to the first Laravel index page.
I am using Lubuntu 14.04 32 bit. I tried several other things, searched for solutions in google and stackoverflow for hours. Still, couldn't solve the problem. Just don't know what I am missing here. Help will be appreciated. Thanks in advance.
Sounds like you're missing a configuration for your new site in your /etc/hosts file, or a missing Virtual Host. When you hit the URL for your 2nd installation, the browser doesn't know where to go.

Moved website, now images broken

Unsure if this should be on here or serverfault so apologies if I'm wrong.
I just moved my site from one folder to another on my server (what happened was, I was doing an update, which didn't quite work, so I transferred all the old files back). Now all my images on the site are broken.
Does anyone know why this happens? Or how to fix it more importantly?
Any help/advice would be appreciated!
Thanks
EDIT:
Okay, apparently I need to make sure the code is compiled, but completely lost as to how to do this..any ideas?
I'm also on a windows 2008 server, running IIS7. The application is written in C# .net MVC.
It doesn't seems that you have a compilation problem since the aplication is working. I mean, if you can run the website, but you are only missing the images, try to look for the paths and check if the image files are in there.
For an MVC (C#) app you should have the directory like this:
root/global.asax
root/web.config
root/Views/..
root/Model/..
´root´ is gonna be your first public folder on the WebServer
Hope it helps!
Make sure the paths to your image files (and any files for that matter) are relative to the root directory of your web site. This way, if you ever move all of the files pertaining to your web site from one location to another, everything stays relative and nothing should be broken.

Resources