20 votes Show 1 answers Get the solution ↓↓↓
I currently taking over someone project. This project uses codeigniter 3. When I run the site localhost/proj, it works just fine. But when try to login to the admin site localhost/proj/admin/login. It shows HTTP ERROR 500, This page isn’t working, localhost is currently unable to handle this request. Someone suggest me to look into the Apache(error.log). It shows "PHP Fatal error: Call to a member function real_escape_string() on boolean in C:\xampp\htdocs\project\system\database\drivers\mysqli\mysqli_driver.php on line 391". I read that it might be my .htaccess file: <IfModule mod_rewrite.c> #--- Uncomment this line for production or testing server #SetEnv CI_ENV production #--- URL rewrite #--- Note: require Rewrite mod enabled (sudo a2enmod rewrite) RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php/$1 [L] </IfModule> <IfModule !mod_rewrite.c> # If we don't have mod_rewrite installed, all 404's # can be sent to index.php, and everything works as normal. # Reference: https://gist.github.com/philipptempel/4226750 ErrorDocument 404 /index.php </IfModule>Can anyone help me with this? please. 2022-04-28 544 votes AnswerSolution:yes i had the same issue with my app, but when i removed the htaccess, the app started working fine Undefined answered 2022-04-28 Link to answer People are also looking for solutions to the problem: unable to determine current zabbix database version: the table "dbversion" was not found. ShareDidn't find the answer?Our community is visited by hundreds of web development professionals every day. Ask your question and get a quick answer for free. Similar questionsFind the answer in similar questions on our website. 478 votes 1 answers i'am using first time codeigniter .But i know php . const CI_VERSION = '3.1.11';My problem is ; website is working on hosting , im create backup and download my localhost folder.but doesn't work in localhost, i want to work localhost (wamp server). i was get a error HTTP ERROR 500. localhost url : http://localhost/test/ I was edit : application/config.php $config['base_url'] = 'http://localhost/test/'; I was update : application/database.php what should I do ? What is next step ? 2021-12-2 615 votes AnswerSolution:
Undefined answered 2021-12-2 Link to answer People are also looking for solutions to the problem: the process class relies on proc_open, which is not available on your php installation. ShareDidn't find the answer?Our community is visited by hundreds of web development professionals every day. Ask your question and get a quick answer for free. Similar questionsFind the answer in similar questions on our website. I know that there is some 500 Internal Server Error when is see this page,
I have already set the variables display_errors: On and error_reporting : E_ALL in my php.ini config file and restarted the server. I still see the same page and not the actual error message that is causing the Internal Server Error. Why? SolutionBased upon the information you’ve provided, a permissions issue on the file (or files) would be one cause of the same 500 Internal Server Error. To check whether this is the problem (if you can’t get more detailed information on the error), navigate to the directory in Terminal and run the following command: If you see limited permissions – e.g. -rw-------@ against your file, then that’s your problem. The solution then is to run chmod 644 on the problem file(s) or chmod 755 on the directories. See this answer – How do I set chmod for a folder and all of its subfolders and files? – for a detailed explanation of how to change permissions. By way of background, I had precisely the same problem as you did on some files that I had copied over from another Mac via Google Drive, which transfer had stripped most of the permissions from the files. The screenshot below illustrates. The index.php file with the -rw-------@ permissions generates a 500 Internal Server Error, while the index_finstuff.php (precisely the same content!) with -rw-r--r--@ permissions is fine. Changing the permissions on the index.php immediately resolves the problem. In other words, your PHP code and the server may both be fine. However, the limited read permissions on the file may be forbidding the server from displaying the content, causing the 500 Internal Server Error message to be displayed instead. I was using CakePHP and I was seeing this error: This page isn’t working localhost is currently unable to handle this request. HTTP ERROR 500I went to see the CakePHP Debug Level defined at app\config\core.php: /** * CakePHP Debug Level: * * Production Mode: * 0: No error messages, errors, or warnings shown. Flash messages redirect. * * Development Mode: * 1: Errors and warnings shown, model caches refreshed, flash messages halted. * 2: As in 1, but also with full debug messages and SQL output. * 3: As in 2, but also with full controller dump. * * In production mode, flash messages redirect after a time interval. * In development mode, you need to click the flash message to continue. */ Configure::write('debug', 0);I chanted the value from 0 to 1: Configure::write('debug', 1);After this change, when trying to reload the page again, I saw the corresponding error: Fatal error: Uncaught Exception: Facebook needs the CURL PHP extension.Conclusion: The solution in my case to see the errors was to change the Cake PHP Debug Level from 0 to 1 in order to show errors and warnings. If you are using the codeigniter framework and are testing the project on a localhost, open the main Index.php file of your project folder and find this code: define('ENVIRONMENT', 'production');Change it to define ('ENVIRONMENT', 'development');Because same this ENVIRONMENT is in your database.php file under config folder. like this: 'db_debug' => (ENVIRONMENT! == 'development')So the environment should be the same in both places and problem will be solved. AnswerSo, eventually I did that thing that all developers hate doing. I went and checked the server log files and found a report of a syntax error in line n. tail -n 20 /var/log/apache2/error.logSuch kind of error normally happens when you try using functions like php_info() wrongly. <?php php_info(); // 500 error phpinfo(); // Works correctly ?>A close look at your code will be better. First of all check error log in the path that your webserver indicates. Then maybe the browser is showing friendly error messages, so disable it. https://superuser.com/questions/202244/show-http-error-details-in-google-chrome It maybe solve your problem, check your files access level $ sudo chmod -R 777 /"your files location"The problem is with the Php code because other pages of the same website load properly. I see this error only on one URL and i know that there is some problem with the php code. what i want to know is why it dosen’t is display a fatal error message How to handle 500 error in CodeIgniter?How we fix CodeIgniter HTTP error 500?. # httpd –V.. <IfModulemod_rewrite.c>. RewriteEngine On.. RewriteCond %{REQUEST_FILENAME} !-f.. RewriteCond %{REQUEST_FILENAME} !-d.. RewriteRule^(.*)$ index.php?/$1 [L]. </IfModule>. How do I fix this is currently unable to handle this request http error 500?How to Fix the 500 Internal Server Error in WordPress. Back up your website.. Enable the WordPress debugging feature.. Deactivate your plugins.. Disable your currently active theme.. Check your . htaccess file.. Check your PHP memory limit.. Replace your WordPress core files.. What does HTTP error 500 mean?The HTTP status code 500 is a generic error response. It means that the server encountered an unexpected condition that prevented it from fulfilling the request. This error is usually returned by the server when no other error code is suitable.
Where is error log file in CodeIgniter?CodeIgniter has some error logging functions built in.. Make your /application/logs folder writable.. In /application/config/config.php set. $config['log_threshold'] = 1; ... . Use log_message('error', 'Some variable did not contain a value. ... . To send an email you need to extend the core CI_Exceptions class method log_exceptions().. |