How to check what user php is running as?
<?php echo exec(‘whoami’); ?>
<?php echo exec(‘whoami’); ?>
See the end of this post for how to do this in WAMPServer 3 For WampServer 2.5 and previous versions WAMPServer is designed to be a single seat developers tool. Apache is therefore configure by default to only allow access from the PC running the server i.e. localhost or 127.0.0.1 or ::1 But as it … Read more
I would just move the includes folder out of the web-root, but if you want to block direct access to the whole includes folder, you can put a .htaccess file in that folder that contains just: deny from all That way you cannot open any file from that folder, but you can include them in … Read more
In httpd.conf add (or change if it’s already there): AddDefaultCharset utf-8
This is an Ancient answer from 2013, back when PHP was new and security wasn’t an issue: Here in the future it’s a security risk to dump errors to screen like this. You better not be doing this in any production setting. Why are the 500 Internal Server Errors not being logged into your apache … Read more
Pre-forking basically means a master creates forks which handle each request. A fork is a completely separate *nix process. Update as per the comments below. The pre in pre-fork means that these processes are forked before a request comes in. They can however usually be increased or decreased as the load goes up and down. … Read more
The comment by MK pointed me in the right direction. In the case of Apache 2.4 and up, there are different defaults and a new directive. I am running Apache 2.4.6, and I had to add the following directives to get it working: SSLProxyEngine on SSLProxyVerify none SSLProxyCheckPeerCN off SSLProxyCheckPeerName off SSLProxyCheckPeerExpire off
Tried this? Should work in both .htaccess, httpd.conf and in a VirtualHost (usually placed in httpd-vhosts.conf if you have included it from your httpd.conf) <filesMatch “\.(html|htm|js|css)$”> FileETag None <ifModule mod_headers.c> Header unset ETag Header set Cache-Control “max-age=0, no-cache, no-store, must-revalidate” Header set Pragma “no-cache” Header set Expires “Wed, 11 Jan 1984 05:00:00 GMT” </ifModule> </filesMatch> … Read more
To answer the original question: To change the XAMPP Apache server port here the procedure : 1. Choose a free port number The default port used by Apache is 80. Take a look to all your used ports with Netstat (integrated to XAMPP Control Panel). Then you can see all used ports and here we … Read more
Syntax check To check configuration files for syntax errors: # Red Hat-based (Fedora, CentOS), Arch-based and OSX httpd -t # Debian-based (Ubuntu) apache2ctl -t # MacOS apachectl -t List virtual hosts To list all virtual hosts, and their locations: # Red Hat-based (Fedora, CentOS), Arch-based and OSX httpd -S # Debian-based (Ubuntu) apache2ctl -S # … Read more