Control Web Panel

WebPanel => Apache => Topic started by: tewfik on July 27, 2018, 07:18:36 PM

Title: Internal Server Error
Post by: tewfik on July 27, 2018, 07:18:36 PM
Hello,
Thank you for helping me solve this problem
"
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator at info@centos-webpanel.com to inform them of the time this error occurred, and the actions you performed just before this error.

More information about this error may be available in the server error log.
"
Title: Re: Internal Server Error
Post by: bullten on July 27, 2018, 07:24:00 PM
What is output of

Code: [Select]
tail -f /usr/local/apache/logs/error_log
Title: Re: Internal Server Error
Post by: tewfik on July 27, 2018, 07:43:14 PM
thank's

[Fri Jul 27 15:29:54.658057 2018] [:error] [pid 9242:tid 140065036556032] [client 129.45.62.8:13123] SoftException in Application.cpp:569: Directory "/usr/local/apache/htdocs/applicationtest" is writeable by group
[Fri Jul 27 15:29:54.658228 2018] [core:error] [pid 9242:tid 140065036556032] [client 129.45.62.8:13123] End of script output before headers: index.php

Merci
Title: Re: Internal Server Error
Post by: bullten on July 27, 2018, 07:48:43 PM
You need to set directory permission to 0755 and files permission to 0644. You cant have 0777 as any file or directory permission.

Code: [Select]
chmod 0755 /usr/local/apache/htdocs/applicationtest
Title: Re: Internal Server Error
Post by: tewfik on July 27, 2018, 08:10:20 PM
I changed the permissions to 0755 files on 0644.
i restart apache
always the same message
here are the messages from the logs file

[Fri Jul 27 16:07:44.845634 2018] [:error] [pid 9197:tid 140056694077184] [client 129.45.62.8:13135] SoftException in Application.cpp:569: Directory "/usr/local/apache/htdocs" is writeable by group
[Fri Jul 27 16:07:44.845802 2018] [core:error] [pid 9197:tid 140056694077184] [client 129.45.62.8:13135] End of script output before headers: index.php
Title: Re: Internal Server Error
Post by: bullten on July 27, 2018, 08:11:44 PM
Message has changed

Code: [Select]
chmod 0755 /usr/local/apache/htdocs
Title: Re: Internal Server Error
Post by: tewfik on July 27, 2018, 08:21:18 PM
Thank you
now I have another problem connecting to the database
Title: Re: Internal Server Error
Post by: tewfik on July 27, 2018, 08:22:45 PM
Une erreur s'est produite lors de la connexion á la base de données
Connection attempt failed: SQLSTATE[HY000] [1045] Access denied for user 'root'@'localhost' (using password: NO)
Title: Re: Internal Server Error
Post by: bullten on July 27, 2018, 08:27:16 PM
Are you using root password in your database config file?
Title: Re: Internal Server Error
Post by: tewfik on July 27, 2018, 08:32:04 PM
j'ai plusieurs sous dossier et dans chaque dossier un fichier Index
donc il faut changer l'ensemble des permissions?
Title: Re: Internal Server Error
Post by: bullten on July 27, 2018, 08:35:33 PM
The error above means you are not using root mysql password in your database config file.

Code: [Select]
cat /etc/.my.cnf
using the command above you will get root login for mysql database.

Locate where is your database configuration file and use the details.
Title: Re: Internal Server Error
Post by: tewfik on July 27, 2018, 08:39:22 PM

I have a subfolder (_lib) for the configuration of the database
currently when I'm doing IP / Folder is / _lib I have the same message
Title: Re: Internal Server Error
Post by: bullten on July 27, 2018, 08:44:32 PM
Do you even know how to install the script? Have you installed the script previously?

May i know what script you are using for installation?
Title: Re: Internal Server Error
Post by: tewfik on July 27, 2018, 08:50:10 PM
we use scriptcase as a development tool, usually it's the following path: http: // ip / dossiertest / _lib / prod / lib / php /? login which gives me the possibility to configure the database
Title: Re: Internal Server Error
Post by: tewfik on July 27, 2018, 09:11:14 PM
thanks and good night
Title: Re: Internal Server Error
Post by: bullten on July 27, 2018, 11:06:00 PM
Hello,

I just replicated the same thing on my test server. You need to go to

Code: [Select]
cd /usr/local/apache/htdocs/folderinwhichfilesare
run the command below

Code: [Select]
find . -type d -exec chmod 0755 {} \;
find . -type f -exec chmod 0644 {} \;

Then you can access your files

Title: Re: Internal Server Error
Post by: tewfik on July 28, 2018, 09:19:41 AM

Hello,
Sorry for yesterday, I have access to the file but now I have another problem
Connection to the database
I have the following message:
An error occurred while connecting to the database
Connection attempt failed: SQLSTATE [HY000] [1045] Access denied for user 'root' @ 'localhost' (using password: NO)

I have configured my connection to the database
Title: Re: Internal Server Error
Post by: bullten on July 29, 2018, 11:24:24 PM
The error means no you are not using password for root connection of mysql.
Title: Re: Internal Server Error
Post by: studio4host on July 30, 2018, 01:31:44 PM
you should install all your applications under the user which you create, you can assign subdomains to the user account for testing.
It's not recommended to have anything custom added into /usr/local/apache/htdocs folder, also it's NOT recommended to use the root password in any script...you have mysql manager for that to create new databases and users.

Additionally to fix permissions for the folder /usr/local/apache/htdocs you can use in cwp.admin under user account option fix permissions and there you have a user nobody.
Title: Re: Internal Server Error
Post by: mirkazka on February 05, 2022, 06:13:32 PM
Hello,
Thank you for helping me solve this problem
"
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator at info@centos-webpanel.com to inform them of the time this error occurred, and the actions you performed just before this error.

More information about this error may be available in the server error log.



[Sun Feb 06 01:02:34.182072 2022] [core:error] [pid 11990:tid 139790565431040] [client 10.10.9.1:64893] End of script output before headers: index.php
[Sun Feb 06 01:02:34.348744 2022] [:error] [pid 14667:tid 139790716499712] [client 10.10.9.1:64894] SoftException in Application.cpp:350: UID of script "/usr/local/apache/htdocs/index.php" is smaller than min_uid

Title: Re: Internal Server Error
Post by: rcschaff on February 05, 2022, 07:26:00 PM
f script "/usr/local/apache/htdocs/index.php" is smaller than min_uid   <<< This is your error

chown "/usr/local/apache/htdocs/index.php" to nobody, or a user account other than root