Why does Output_buffering option remain ON regardless of php.ini OFF setting? - wamp

I want to change the output_buffering setting on my local WAMP server to OFF.
Currently it is set to ON as my phpinfo.php file says:
output_buffering 4096 4096
The problem is that although I am changing the php.ini file which is located at the location mentioned in the phpinfo.php information to look like this:
output_buffering
Default Value: Off
Development Value: Off
Production Value: Off
OR this:
output_buffering
Default Value: Off
Development Value: 0
Production Value: 0
The values of the output_buffering setting remain the same after restarting the WAMP server:
output_buffering 4096 4096
Also, if I try echoing the output_buffering setting with this php function, I get a result of 4096:
echo ini_get('output_buffering');
Can someone please help me understand why this is happening and how to fix it?
Best regards,
Peter

Related

OpenLiteSpeed - Changing Document Root and Permissions

I am trying to change the document root on my Ubtuntu 18.04 OpenLiteSpeed server. I would like to change it to /var/www/html/public so I can install my Laravel project there. It's where I am used to having my document root from Apache. I have found the settings within the admin panel (it is now set to /var/www/html/public); however, it seems from other posts that I have found that the user does not have the correct permissions (I get a 500 error when visiting the site). I am wondering how I go about changing those permissions.
# ps -ef|grep litespeed
Returns
root 24011 1 0 22:06 ? 00:00:00 openlitespeed (lshttpd - main)
root 24012 24011 0 22:06 ? 00:00:00 openlitespeed (lscgid)
nobody 24021 24011 0 22:06 ? 00:00:00 openlitespeed (lshttpd - #01)
nobody 24022 24011 0 22:06 ? 00:00:00 openlitespeed (lshttpd - #02)
root 24095 20775 0 22:15 pts/0 00:00:00 grep --color=auto litespeed
Please try set up suexec user/group as this (the last 2 options) to your external app setting, accordingly to your /var/www/html/public owner/group.
but 500 error not necessarily means permission issue.
You can also try create a simple hello world or phpinfo page to test first.

Why does nginx randomly throw "403 - Forbidden" errors?

I configured Nginx, uwsgi and Django with help of this tutorial:
https://uwsgi-docs.readthedocs.io/en/latest/tutorials/Django_and_nginx.html. But I'm not using a socket, a wsgi ini file, a system wide installation or the emperor mode.
The problem that occurs is a 403 - Forbidden. But this error seems to occur randomly across machines and browsers. For example I can connect to the website via Edge with no problem, but Firefox on the same machine throws a 403 (I use a win home 64 bit machine). Firefox on my Iphone 5 connects with no problem as well as Safari.
I red that this error may occur with wrong permissions but I set the permissions recursively like this:
chown -R kltc:kltc /home (axample)
chmod -R ug+r /home (example)
The only change I made to Nginx (/etc/nginx/nginx.conf) was uncommenting the 'server_names_hash_bucket_size 64'.
How is this possible ?

WAMP Server - local server - 1 of 2 services running

I installed WAMP server and ran the applpication. The icon in the taskbar stays orange and says "local server - 1 of 2 services running" . Also, I am able to see the phpMyAdmin page in the browser but when I try to login it gives the following error:
#2002 - No connection could be made because the target machine actively refused it. <br />The server is not responding (or the local server's socket is not correctly configured).
I have tested port 80 and I got this response:
***** Test which uses port 80 *****
===== Tested by command netstat filtered on port 80 =====
Test for TCP
Your port 80 is used by a processus with PID = 6612
The processus of PID 6612 is 'httpd.exe' Session: Services
The service of PID 6612 for 'httpd.exe' is 'wampapache64'
This service is from Wampserver - It is correct
Test for TCPv6
Your port 80 is used by a processus with PID = 6612
The processus of PID 6612 is 'httpd.exe' Session: Services
The service of PID 6612 for 'httpd.exe' is 'wampapache64'
This service is from Wampserver - It is correct
===== Tested by attempting to open a socket on port 80 =====
Your port 80 is actually used by :
Server: Apache/2.4.18 (Win64) PHP/5.6.19
I believe that the above result means that there is no problem with the port. I even tried changing the port and still gives the same status - orange icon.
Note - When a prompt from Windows Firewall was shown after installing WAMP, I didn't give access to both private and public networks, i.e. I unchecked both the options.
Kindly help me to run both the services in the local server.
Thank you!
Click on the WAMP icon in the tray and go to Apache > service Administration and check if the service is installed or if it isn't running . You can even reinstall it by removing and installing it again. Do the same with MySQL . Go to MySQL > Service Administration and do the same things . In my case Apache service wasn't installed and Installing it did the trick. check the image below.
See this image
Most of the answers given on the Internet say to change the port used by Apache but that is not the solution in most of the cases.
Actually, start the WAMP server->right click on the icon -> tools -> use a port other than 3306 -> click on this -> set on 3308.
Hopefully, this will resolve the error.
I had the same problem but only Skype was using port 80. I just changed port 80 from Skype and make it use another one. OR you can change port 80 used by Apache. To do this go to WAMP -> Apache -> http.conf and change Listen 80 with Listen 81 for eg.
The same with me but in my case I installed mysql after installing wampserver so there was a port conflict between the integrated version and the independent version of mysql for the port 3306, so the problem could resolved either by changing one of ports
If you want to change wampserver's mysql's port go to the taskbar icon right click and the go to tools select: use a port rather than xxxx(3306 in my case)
This thread helped me.
How to change port number for apache in WAMP
Thread Details below
Just go to httpd.conf file, for ex. under WAMP environment its situated at:
C:\wamp\bin\apache\apache2.2.22\conf\httpd.conf
go to line no. 46 and edit Listen 80 to your requirement for ex.
Listen 8383
newer versions of WAMP uses these 2 lines:
Listen 0.0.0.0:8383
Listen [::0]:8383
Next go to line no. 171 and edit ServerName localhost:80 to your requirement for ex.
ServerName localhost:8383
Restart Apache and its done !!
Now, you can access with your URL:
http://localhost:8383 or http://192.168.1.1:8383
Hope it helps to people looking for solution here.
No need to remove and reinstall WAMP or edit Host file or change any port. this problem happens when Internet Information Services (IIS) Manager service is running. you need just stop IIS to run wampapache service without any problem.
press start then type iis and run Internet Information Services (IIS) Manager and in right panel press stop. then click on wamp icon on system tray and choose start all services.
this is all you need.
I had the same issue some time back. Tried all kinds of things and finally found the link below. Basically the issue was:
A parameter in your 'my.ini' file (C:\Wamp\bin\mysql\mysql<version>) called 'lower_case_table_names'
If there, comment it out and restart MYSQL again."
If I recall, also did a computer restart also just for good measures.
http://forum.wampserver.com/read.php?2,136457
This might be because php is not working because the default port 80 is taken so u need to change the port follow these steps
1. Click the wamp icon from the bottom right corner
2. Go to Apache->httpd.conf and open this file
3. Search for word Listen in the file and change these two lines
Listen 0.0.0.0:8018 (u can use any digits instead of 18 )
Listen [::0]:8018
4. Now search for the word localhost and change this line
ServerName localhost:8018
5. Restart wamp
6. Go to your default browser and type http://localhost:8080/ this will open the wamp menu
It's either your WAMP Apache port is clashing with IIS (if that is installed and running), or MySQL port is clashing with another MySQL install.
Edit your WAMP > Apache > httpd.conf by hovering cursor over Apache inside WAMP tray icon. Change port 80 to an available port like 8181. Restart all services.
I had the same issue, where only 1 service out of 2 was running. But my issue was not a port issue.
I had previously zipped up a bunch of .conf files in the alias directory to share them with a colleague, and I left the .zip file there. This caused an error in Apache as it tried to use the .zip file as an alias.
Once I removed the .zip file from the alias directory, my Apache services were working fine.
Bit of an 'outside the box' answer, but this was my issue with the same symptoms!
Maybe it is not a port problem.
if you had a problem because msvcr110.dll is missing
so after you setup the library you will get this problem service 1 of 2
so in this case you have to reinstall the wamp server.
I had faced similar similar issue where the server was not starting up with the following message - "local server - 1 of 2 services running" , with server icon in Orange color.
With nothing updated in the error logs. Finally was able to track issue through -
Wamp server icon -> Apache -> Service Administration 'wampapache64' -> install service
Error message : WAMP - 'Your port 80 is actually used - Error'
Resolution : Change the port number of the wamp server to some other number,for example 5050.
Go to: C:\wamp\bin\apache\apache2.4.9\conf\httpd.conf
In that file change the listen port to 5050.
#Listen 12.34.56.78:5050
Listen 0.0.0.0:5050
Listen [::0]:5050
Save and Restart. Now you can see the server started successfully with green icon.
Following threads helped me to resolve this issue :
How to change port number for apache in WAMP
WAMP - Your port 80 is actually used - Error
GO to run type Services and enter
check these two services must start

Why is WAMP not displaying any of my files? Just showing a blank white page?

I started wamp server and it's only showing blank white pages for all of the files and I am not sure what I should do about it?
It was working before, today I have made no changes to any of the configuration files or anything and there are no error messages being displayed, I've even restated my machine and that didn't change much.
I restart the Apache service and also it's given me an error?
make sure you don't have any file named default.php or index.php, as the server will display them before anything else, and you won't be able to choose files from the tree index.
If that is not the case, wamp's htdocs equivalente in apache's xampp is the www directory folder. Create a folder inside the www directory, say Sites, put some files in there, then run wamp and write http://127.0.0.1/Sites (for this example). You should see the tree directory for your files where you can open them and run your php files.
WAMP didn't run very well in my Windows 7, either, but it does work. Cheers!
Do u use Skype? If so,
Just log out of your Skype and restart wamp server again. after that login your skype again. Never login skype before Wamp server started. The Problem is Server port got conflict with skype.
If you're sure with your server configurations then it is possible that it is just a port conflict.
You need to check what port is being used.
left click wamp manager -> Apache -> httpd.conf
Search for this line
Listen 80
If LISTEN is 8080, your url should be http://127.0.0.1:8080/Sites
OR change the 8080 port to 80 in the httpd.conf
Edit C:\wamp\www\index.php
Set "false" in this line...
$suppress_localhost = false;
In index.php living in the folder www, edit the line
($suppress_localhost?
To
($suppress_localhost==false?
Don't include ; as it will attract errors. Good luck!

C/C++ FastCGI Developers toolkit example program (not working?)

I am using the fastcgi C/C++ toolkit, to develop a test fastcgi app.
I built (and am now testing) this example provided by the toolkit.
I have loaded Apache mod_fcgid and successfully restarted the apache2 daemon. However, when I try to access the fastcgi resource, it is returning a blank page.
Note: I made the following changes to the example code (as it didn't work with the default socket fd value of 0):
int sock_fd = FCGX_OpenSocket(":5000", 1);
FCGX_InitRequest(&request, sock_fd, 0);
My /etc/apache2/mods-enabled/fcgid.conf file looks like this:
<IfModule mod_fcgid.c>
AddHandler fcgid-script .fcgi
SocketPath /var/lib/apache2/fcgid/sock
IPCConnectTimeout 10
IPCCommTimeout 20
OutputBufferSize 0
MaxRequestsPerProcess 500
</IfModule>
My /etc/apache2/mods-enabled/fcgid.load file looks like this:
LoadModule fcgid_module /my/path/here/libs/mod_fcgid.so
I then accessed the 'resource' in a browser using the following url:
http://127.0.0.1:5000
What am I doing wrong? (assuming that someone has actually managed to get the example cited above, to work)
I am developing/testing on Linux Ubuntu 10.x
i don't use apache for while, but i think your url is bad
i assume your apache run on port 80 and your echo.fcgi is at root of apache folder
for information, i use nginx for serve fcgi application
http://localhost/echo.fcgi
Run apachctl -D to verify your have mod_fcgid running. I believe no output (i.e a white page) occurs when your process crashes.
You will need to compile your program with debugging (-O0 -ggdb), redeploy, and restart Apache.
Change your Apache config to only spawn one process. This will allow you to attach gdb to your FCGI application and debug it.
Let me know if you need further assistance.