It's extremely frustrating that I have 'debug' => true in the app config but all Laravel is showing is "Whoops, looks like something went wrong." For the love of coding, does somebody know how to get debugging to work?
I have faced the same problem. Laravel was showing only "Whoops, looks like something went wrong." but this line and not showing the actual error. Then I have checked the app/config/app.php file and changed "debug" => false to "debug" => true and it worked perfectly.
You said that you have also done it and still not working. I suggest you to run a composer update command for your project and then try again.
To be sure your app is in development mode, edit bootstrap/start.php, in the detectEnvironment function simply put your machine name. On linux use hostname terminal commande to determine your machine name.
$env = $app->detectEnvironment(array(
'local' => array('homestead', 'Jeanphi'),
));
Actually debugging is working fine for me with L4.0.7 when i set 'debug' => true in app/config/app.php
That switch tells Laravel to turn on Whoops and to bypass the 'compiled.php' file. When it is disabled, Whoops will not show. A normal server error page is served instead.
Were you expecting something else?
EDIT: maybe you are referring to "debugging" as the old profiler bar that were in L3 (Anbu). In that case I suggest you install this package
Check you haven't renamed your app/config folder as fideloper suggests in the comment.
For example you might have renamed it to prevent overwriting the default config settings when copying your site somewhere else.
For all it's worth, I was getting this error now after deployment because I didn't create these folders:
/app/storage/cache
/app/storage/logs
/app/storage/meta
/app/storage/sessions
/app/storage/views
Some changes need an apache restart to take effect.
I came across problem recently, after separating out debug and a few other config options into a separate (dev.php) config file.
The in-hindsight obvious, by-logic obscure solution: Don't move debug out of config/app.php
Had that same problem altought my app was in debug mode.
In my case I was deploying on server,and to make that work
you must take care of detectEnvironment variable.
It is located in bootstrap/start.php
$env = $app->detectEnvironment(array(
'local' => array('your_server_name'),
));
as it's instructed in the docs :
http://laravel.com/docs/4.2/configuration
i got same problem with that...
first, laravel run well on windows using apache..
then while i'm using ubuntu and nginx, it shows "Whoops, looks like something went wrong."
no error in php log and nothing found on laravel log..
so i tried modify path folder permission to 0777
sudo chmod -R 0777 {put your folder application folder here}
it works
I had the same problem several times and I have two possibilities.
the folder storage doesn't have the right permissions, you should use chmod 755 or chmod 777
the public/index.php has none permission or a 777
These two options has occurred to me before, maybe there are some more.
well you need to clear configuration cache and regenerate it each time you change config files
run 'php artisan config:cache' in console and your good to go
Related
My larevel app insatller is not going ahead with this error seen in picture below i am using windows 10 with Xampp
Tried .env permission
It's a permission issue try to set 644 for .env file which is standard for files.
You can do that by right-clicking on the file in windows & select properties.
It seems a permission problem.. as you dont have the right permission
Follow this link !
https://stackoverflow.com/questions/30639174/how-to-set-up-file-permissions-for-laravel
hope It will Help You!
Guys it wasn't working normally so i went on shared hosting and there were linux permisssions and i modified them and it worked and i cloned the REPO to my local server and solved the issue tahnks for the feedback
I have installed Laravel 4.2.11 on Wamp server through Composer. I have created the alias using wamp's Apache option but the URL http://localhost/laraveldemo/ (I have created the laraveldemo as alias) shows "Whoops, looks like something went wrong."
How I rectify this?
For further reference, when encountering a problem like this the first step to a solution is enabling the debug flag. That way you can often see a better error message.
This can be done through changing the flag located in app/config/app.php
'debug' => true
Should be set to true.
I have installed new site in Joomla 1.7 and its working fine, but when i checked its back-end (administrator) got 500 Internal Server Error.
Note: Site is working fine in Local server.
Please suggestion me any solution.
Thanks in advance.
First you have change folder permission to 775 for the following folders:
cache, logs, tmp & administrator/cache
then go to: configuration.php
find code:
$log_path = 'XXXXXXXXXXXXX';
$tmp_path = 'XXXXXXXXXXXXX';
and change code into:
$log_path = './logs';
$tmp_path = './tmp';
problem solved :)
I had this problem, but none of your advices didn't help.
I fixed a problem only after I switched off all modules via PhpMyAdmin (PMA).
Table modules, changed parameter "published" to 0 for all and then enabled only few modules with these types:
mod_login
mod_menu
mod_sumbenu
mod_toolbar
mod_title
After this I entered admin page and used top menu to enable all needed modules one by one. After admin page started to give me 500 error again I knew what module is faulty and I disabled it again via PMA.
May be some files are not uploded.Check failed transfer of your FTP server.Make sure all the files are uploded online
Check your error logs and backtrace what is causing the error. It sounds like you have MySQL errors, make sure any of your components/modules/aren't tricking out your site.
Think it's a component?
You can login into PHPMyAdmin and disable/enable modules manually by unpublishing them using the table editor, changing isPublished to 0 .
Try reinstalling database with the correct compatibility and also check web.config file on ftp for correct configuration paths !
I experienced something similar on my site. Digging through the log file, /administrator/error_log i saw this error message:
[08-Oct-2012 15:28:59] PHP Fatal error: Call to a member function login() on a non-object in /home/XXX/public_html/administrator/components/com_login/admin.login.php on line 65 .
Problem was, i had a previous installation of Joomla 1.5.x, and uploaded files for Joomla 1.6 to replace the previous files and upgrade security of the site. Took me almost a month to find a solution for my own case;
Finally found out from this website that I needed to completely delete all previous files in the website root directory before uploading a new version of Joomla.
Hope this helps someone out there who is in the same situation!
I also have the same issue on my site backend when editing or saving some articles, modules etc...Finally i solved it...
Add these lines to /etc/httpd/conf.d/mod_secuirity.conf on your server
SecRuleEngine Off
save it...and restart apache...it works fine for me.
Adding these lines disable mod_secuirity engine off.I don't know if it causes secuirity problems in future..
Tnx all...
Change the permission of folder administrator at 775 or 755
I tried all the above ideas. Without avail. For my site (which was an outdated Joomla 1.5.x site- don't ask!!!), where the backend suddenly stopped working, the final solution was switching the servers PHP version from 4 to 5.5 (even 5.4 did not work!).
I then got some strange PHP warnings in the frontend. But I then updated Joomla from the now again working backend to the last 1.5 version and everything worked fine from the on.
Phew! Maybe this helps someone later on...
In my case there was a single file with bad permissions.
It can be tricky to figure out which file has the problem so just run this to set the permissions for all the files in the directory:
chmod -R ug+rwX .
chmod -R o+rX .
Change the permissions of all of your files/directories.
Files should be 755
Directories should be 644
This is my case and my solution:
I have changed my server and got this error. I have protected my administrator folder using password protection method. So I have checked my new server and found that my protection information are not saved in control panel. also my .htaccess file (in administrator folder) is not compatible to my new server.
The solution:
Simply protect my folder using control panel
I have renamed the .htaccess file to htaccess.txt
It is done.
I hope it could be useful ;)
I have installed new site in Joomla 1.7 and its working fine, but when i checked its back-end (administrator) got 500 Internal Server Error.
Note: Site is working fine in Local server.
Please suggestion me any solution.
Thanks in advance.
First you have change folder permission to 775 for the following folders:
cache, logs, tmp & administrator/cache
then go to: configuration.php
find code:
$log_path = 'XXXXXXXXXXXXX';
$tmp_path = 'XXXXXXXXXXXXX';
and change code into:
$log_path = './logs';
$tmp_path = './tmp';
problem solved :)
I had this problem, but none of your advices didn't help.
I fixed a problem only after I switched off all modules via PhpMyAdmin (PMA).
Table modules, changed parameter "published" to 0 for all and then enabled only few modules with these types:
mod_login
mod_menu
mod_sumbenu
mod_toolbar
mod_title
After this I entered admin page and used top menu to enable all needed modules one by one. After admin page started to give me 500 error again I knew what module is faulty and I disabled it again via PMA.
May be some files are not uploded.Check failed transfer of your FTP server.Make sure all the files are uploded online
Check your error logs and backtrace what is causing the error. It sounds like you have MySQL errors, make sure any of your components/modules/aren't tricking out your site.
Think it's a component?
You can login into PHPMyAdmin and disable/enable modules manually by unpublishing them using the table editor, changing isPublished to 0 .
Try reinstalling database with the correct compatibility and also check web.config file on ftp for correct configuration paths !
I experienced something similar on my site. Digging through the log file, /administrator/error_log i saw this error message:
[08-Oct-2012 15:28:59] PHP Fatal error: Call to a member function login() on a non-object in /home/XXX/public_html/administrator/components/com_login/admin.login.php on line 65 .
Problem was, i had a previous installation of Joomla 1.5.x, and uploaded files for Joomla 1.6 to replace the previous files and upgrade security of the site. Took me almost a month to find a solution for my own case;
Finally found out from this website that I needed to completely delete all previous files in the website root directory before uploading a new version of Joomla.
Hope this helps someone out there who is in the same situation!
I also have the same issue on my site backend when editing or saving some articles, modules etc...Finally i solved it...
Add these lines to /etc/httpd/conf.d/mod_secuirity.conf on your server
SecRuleEngine Off
save it...and restart apache...it works fine for me.
Adding these lines disable mod_secuirity engine off.I don't know if it causes secuirity problems in future..
Tnx all...
Change the permission of folder administrator at 775 or 755
I tried all the above ideas. Without avail. For my site (which was an outdated Joomla 1.5.x site- don't ask!!!), where the backend suddenly stopped working, the final solution was switching the servers PHP version from 4 to 5.5 (even 5.4 did not work!).
I then got some strange PHP warnings in the frontend. But I then updated Joomla from the now again working backend to the last 1.5 version and everything worked fine from the on.
Phew! Maybe this helps someone later on...
In my case there was a single file with bad permissions.
It can be tricky to figure out which file has the problem so just run this to set the permissions for all the files in the directory:
chmod -R ug+rwX .
chmod -R o+rX .
Change the permissions of all of your files/directories.
Files should be 755
Directories should be 644
This is my case and my solution:
I have changed my server and got this error. I have protected my administrator folder using password protection method. So I have checked my new server and found that my protection information are not saved in control panel. also my .htaccess file (in administrator folder) is not compatible to my new server.
The solution:
Simply protect my folder using control panel
I have renamed the .htaccess file to htaccess.txt
It is done.
I hope it could be useful ;)
Under config.php I have:
$config['log_threshold'] = 4;
$config['log_path'] = '/home/myaccount/logFilesFolder';
In index.php I have:
error_reporting(E_ALL);
The only way I can seem to get anything to log is if I chmod that directory to rwx (777), which doesn't seem right to me. That and it doesn't see to be logging all the errors.
In my local/dev environment it seems to be working but on my production server nothing is being logged. I can't seem to figure out why.
The log filename in the configuration settings needs a trailing "/" above making sure the webserver process has writeable access to the directory.
Change the logs owner and group to what owner/group your live web server is running, give it write perms and it should work. I take it that in your local/dev server your CI folder is owned by you that is why you need to chmod it to 777 to make it work.
The directory where you want the log files to be saved needs to be writable.
I have tried a lot of solutions and finally what worked for me was this:
Open system/libraries/Log.php
and change the following lines;
set the value of: $this->log_path to a writable directory, preferably home directory so that there are no permission issues. If you want to change the filename also, search for the variable $filepath and change the name.
Example:
$this->log_path = '/log';
touch /log/
restart the webserver.
The logs will start coming.
I have tried a lot of other options, none worked, this is not neat approach but at least I can see my logs now.
I had the same problem with my Codeigniter 4 project. The log was created successfully in my local window machine but was not creating on the remote Linux machine. I was using a custom path to generate log files under the 'app' folder. So what I did is to change the settings in my config/Logger.php file back to
'path' => WRITEPATH.'logs/',
and it created the log files under writeable/logs folder.