Cannot set suPHP_ConfigPath for localhost - php

I am trying to make my php.ini file recursive.
echo php_ini_loaded_file();
gives:
C:\xampp\php\php.ini
Yet when I set in my .htaccess file:
suPHP_ConfigPath C:\xampp\php\php.ini
I get
Server error! The server encountered an internal error and was unable
to complete your request. Either the server is overloaded or there was
an error in a CGI script.
If you think this is a server error, please contact the webmaster.
Error 500 localhost Apache/2.4.37 (Win32) OpenSSL/1.1.1 PHP/7.2.12
Please tell me what I am doing wrong.
As per guide here.

Related

500 server error on uploading files more that specific size on php when php.ini conf is correct

I have this PHP configuration:
ini_get('max_execution_time') = 3000
ini_get('memory_limit') = 256
ini_get('post_max_size') = 200M
ini_get('upload_max_filesize') = 200M
On this environment:
CentOS 7 server
CentOS Web Panel
Apache web server 2.4
PHP 7.2
Laravel framework 7.0
And when I try to upload files more than 1MB I get a 500 internal server error!
This is the error in network tab:
Other info about request:
I tried everything that I had in mind like setting ini in controller changing the sending file method from ajax to simple form, etc... but no luck!
I also restarted the httpd service even restarted the server so maybe the changes make affect but nothing changes
Edit:
I also see this error in apache logs:
Handler for (null) returned invalid result code 70007
After a lot of researches and tries I found the problem and in doesn't make sense at all!
As in this link said:
7007 apache error
I had to just disable this line:
LoadModule reqtimeout_module modules / mod_reqtimeout.so
From Apache httpd.conf file

Local host issue apache

I have been trying to get my local host to work. But I still haven't been able to solve it. I did everything I could. I change the listening port and restarted apache. I failed. I was given following error message. I would really appreciate if anyone can help me.
AH00557: httpd: apr_sockaddr_info_get() failed for yeshichoedons-MacBook-Pro.local
AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1. Set the 'ServerName' directive globally to suppress this message
Try editing /etc/apache2/httpd.conf and insert the following line:
ServerName localhost

Apache / PHP-FPM with dedicated error log file per host

I'm running php7.2-fpm with apache 2.4.29 on Ubuntu Server 18.04 LTS.
I'm unable to set a specific php error log file per host (as I normally do with php with apache pre-fork).
On apache host conf file I set my custom error log path:
ErrorLog /var/www/server_logs/myhost_error.log
LogLevel warn
But that file is empty
Looking at /etc/php/7.2/fpm/php-fpm.conf I saw that error log file is set to /var/log/php7.2-fpm.log and error level is enable and set to notice.
On my php project base path I put .user.ini containing
display_errors=on
display_startup_errors=on
error_reporting=E_ALL
html_errors=on
On my php project I generate a WARNING: I see it on screen but never get logged in my apache custom log error file nor in /var/log/php7.2-fpm.log
In /var/log/php7.2-fpm.log I only see
[17-Oct-2019 16:01:44] NOTICE: fpm is running, pid 25328
[17-Oct-2019 16:01:44] NOTICE: ready to handle connections
[17-Oct-2019 16:01:44] NOTICE: systemd monitor interval set to 10000ms
but no errors logged!
I cannot understand what I missed!
Anyone could help me please?

How can I change the port for localhost in PHP (Apache, Xampp)?

I updated my version of PHP (by installing a newer version of XAMPP), but I'm having trouble getting the server to use the necessary port with PHP so that it will run the correct version of PHP.
Due to the well-documented conflicts for machines running Windows, I changed the Apache ports to 81 (from 80) in the httpd.conf file for: Listen and ServerName localhost.
It appears to be running correctly. Both Apache and MySQL are running in the XAMPP Control Panel
Apache - Port: 81, 443
MySQL - Port: 3306
PHP ini was set to 3306, and I therefore left it as is.
http://localhost:81 shows that I'm running the correct version of PHP (Version 5.6.3)., however when I try opening a file at localhost:81 I receive the following error message:
Object not found! The requested URL was not found on this server. If
you entered the URL manually please check your spelling and try again.
If you think this is a server error, please contact the webmaster.
Error 404 localhost Apache/2.4.10 (Win32) OpenSSL/1.0.1i PHP/5.6.3
The only way it's allowing me to access the files is at http://localhost:2556, which is running an old version of PHP.
Any suggestions how I can get my PHP documents to access the proper port and version of PHP?

Enabling PDO in php.ini file resulted in 500 Internal Server Error

When I enabled PDO in php.ini file in root directory (C:\PHP) on Windows Server 2008 Standard it resulted in 500 Internal Server Error.
I use IIS as web server and MSSQL as database.
3 Websites are hosted on the server. 2 websites are running fine when PDO is enabled. Only 1 goes down with error message 500 Internal Server Error.
Please help. How do I fix this?
Below are the codes I uncommented from the php.ini file.
[PHP_PDO]
extension=php_pdo.dll
[PHP_PDO_MSSQL]
extension=php_pdo_mssql.dll
[PHP_PDO_ODBC]
extension=php_pdo_odbc.dll
Thanks.

Categories