Webserver status set to down after installing PHP on the webserver - php

After I install php 8.0 on my webserver running apache 2.4.53 on ubuntu 20.04, my haproxy config on a pfsense router says the webserver is down. Even though apache is running fine.
I know its the main cause because after I uninstall php 8.0 the webserver is up and accessible according to haproxy.
The problem is, that I can't load content without having php installed on the webserver, but if I have it installed, the webserver isn't accessible from the designated ip.
I have tried reading the haproxy error log, but I can't find it. Also tried to reinstall the haproxy config but this also didn't work. In haproxy status overiew it also gives the error: Layer 7 wrong status: internal server error, googling this didn't give much results.

Related

How to properly install Xampp on Mac in order to run PHP code

I downloaded the installer version of Xampp version 8.1.6-0 for Mac and went to the manager-osx widget to start the Apache and MySQL servers but neither would start.
I then tried using the command sudo apachectl start and then created an index.php file and put it in htdocs, and then tried to open it using http://localhost/index.php as well as http://localhost:8080/index.php and both times it said the server could not be reached.
I've actually downloaded Xamp in the past and was able to reach the server but wasn't able to get php scripts to run, but now for some reason I can't even get the server to run.
I made sure to download the installer and not the virtual machine version. I'm running Monterey version 12.4.
I tried the solutions here but they didn't seem to work. I checked my activity monitor and nothing is running on port 80.
I also installed MAMP from here and tried to start Apache but it displayed the error:
"Apache couldn't be started. Please check your MAMP installation and
configuration."
Any help would be appreciated as I just want to run PHP.

SQLAnywhere PHP extension errors on Apache restart

I have the SQLAnywhere PHP extension installed and it's working fine, right up until Apache restarts.
After Apache has restarted, any attempt to access any website on the server generates the following error in the Apache error log and throws a 500 internal server error on the page:
AH01215: PHP Warning: request_startup() for sqlanywhere module failed in Unknown on line 0: /usr/local/cpanel/cgi-sys/ea-php56
To resolve it, I can explicitly stop and start Apache, but restarting Apache (apachectl restart) doesn't.
This is generally fine until an automated process (such as a cPanel update) causes Apache to restart.
The SQLAnywhere PHP extension was configured as follows:
Install the SQLAnywhere client
Download the PHP extension to the extensions directory
Add LD_LIBRARY_PATH=[sqlanywhere/lib64] to /etc/environment
Log out and back in for the LD_LIBRARY_PATH to take effect
Add the extension to the php.ini (or sqlanywhere.ini in php.d folder)
Stop then start Apache
My current thinking for a workaround is to modify the cPanel update script to perform an Apache restart by explicitly doing a stop then a start as this would cover the immediate issue, but I'm hoping that somebody might know of an actual fix for this to avoid any other automated restarts causing problems.
The stack I'm running is:
CentOS Linux release 7.3.1611 (Core)
cPanel 60.0 (build 28)
Apache/2.4.23 (cPanel)
PHP 5.6 (using cPanel's MultiPHP and EasyApache4)
SQLAnywhere12 Client
Thanks in advance for any suggestions!

503 Service Unavailable after brew install and restarting apache2

I'm working in framework Phalcon, which uses PHP. I wasn't able to connect my application with Postgresql. I discovered this webpage: Enabling PostgreSQL support in PHP on Mac OS X, which basically says I should download something like "php_pdo_pgsql.so" and following a well voted solution I did:
brew install php56-pdo-pgsql
and then I restarted my apache with:
sudo /usr/sbin/apachectl restart
When I reloaded my web page, which was working perfectly, appears the error:
Service Unavailable
The server is temporarily unable to service your request due to
maintenance downtime or capacity problems. Please try again later.
Looking for the error log of the webpage it seems that after the restart there are not more errors, also no more accesses in the access log. I'm using version 5.6 of PHP. My server is OSX Sierra.
I accept solutions, ideas and new question to solve my problem. Thank you very much.
I solved it!
There were no more errors in apache log. Why? When I installed the PDO of php-postgresql with brew, it automatically installed apache of brew and change the configuration of the server. So, I had 2 "apache" in my server, what screw up everything.
I used this tutorial:
https://getgrav.org/blog/macos-sierra-apache-multiple-php-versions.
In general terms, What I did was uninstallig everything I could and installing apache from brew. Then I made the configuration of the tutorial and finally my webpage is running again.
Thanks.
Please check apache2 logs file, and look for an error. If You will not be able to resolve the problem by yourself, then provide us with error message given in error.log.

After installing OTRS on XAMPP the server responds with An internal error occurred

I installed the program otrs, but how I do it with xampp How do I run the program?
And XAMPP Apache CONF
DocumentRoot "C:/otrs/OTRS/bin/cgi-bin"
<Directory "C:/otrs/OTRS/bin/cgi-bin">
localhost/installer.pl
Chrome Print:
Server Error!
An internal error occurred on the server because the server can not meet your request.
How do I run xampp OTRS with respect to this matter.
your best bet is NOT to try and use XAMPP but just go with the Windows Installer you can download from the website. Using XAMPP and Perl apps will be slow and not an enjoyable experience.
If you need to use XAMPP for some reason, you can. You'll be missing some perl libraries which is the reason for your error message. Run the checkmodules script located in the bin/ directory of your OTRS install: perl bin/otrs.CheckModules.pl --> it will report you all the modules which you need to post-install.
You are probably missing some Perl modules required for OTRS to work.
To check which modules are missing run perl OTRS_DIRECTORY/bin/otrs.CheckModules.pl
After that you need to install all missing modules.

Silex setup fails with MAMP because mod_access.so is not found?

I have downloaded Silex and I am trying to get it running with MAMP. However, when I run Silex (and only when I run Silex), Apache won't start. In the console, I see:
httpd: Syntax error on line 238 of /Applications/MAMP/conf/apache/httpd.conf: Cannot load /Applications/MAMP/Library/modules/mod_access.so into server: dlopen(/Applications/MAMP/Library/modules/mod_access.so, 10): image not found
logout
Googling the error leads to info that suggests this is a known bug, but I can't find what to actually do about it.
Silex temporarily changes my httpd.conf from this to this while it's running. After it changes back, upon quitting Silex, Apache starts again.
Apache is version 2.2.22.

Categories