![]() I'm pretty sure you have something running in apache (probably the PHP module, but it's hard to be sure) that's leaking file descriptors. So I guess I have got some wrong configuration there, or it is a bug in xdebug (I am using XDebug 2.2.5, installed by brew) What confuses me is the (CLOSED)-part, why is it still listed?Īfter some time I looked up the cslistener port, which actually is 9000, which again is which port xdebug is listening for remote debugging. I can say that the application I use is using websockets, and is also using a fallback when websockets are not available or the counterpart is not running on the server. When running the lsof -c httpd command as suggested by Gordon Davisson, I can see that there are loads of entries like the following: httpd 1361 _www 15u IPv4 0xb306b48659f63853 0t0 TCP localhost:50603->localhost:cslistener (CLOSED) I have also already tried to set the maxfiles to 4096 with the command launchctl limit maxfiles 4096 16384, but the issue still returns after some time. I already found out about certain limits, but launchctl returns I have an unlimited hard limit on open files: ~ $ launchctl limit It looks to me like the file cannot be read anymore, and it returns the 403 somehow. (24)Too many open files: /Users/daniel/Development/massiveart/sulu-complete/web/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable, referer: () /Users/daniel/Development/massiveart/sulu-complete/web/website.php:0, referer: I have looked up the apache error log, and found something like the following: PHP Warning: require_once(/Users/daniel/Development/massiveart/sulu-complete/app/): failed to open stream: Too many open files in /Users/daniel/Development/massiveart/sulu-complete/web/website.php on line 10, referer: However, after some time, I will run on 403 errors for every request. ![]() ![]() When running this setup it works quite well. myext PHP server files.I am running Mac OS X 10.9.4, including the builtin apache2 webserver with PHP 5.5.14 from brew (packages: php55, php55-intl, php55-pdo-pgsql, php55-xdebug). htaccess with Nginx in the same way as explained for Apache.Īfter performing any one of the above changes, you should be able to serve both. Open the /etc/nginx/nf file and locate the following lines:Įdit the first line shown above, and change it to the following to add “.myext” as custom file extension. Place this file in your web root so that this rule applies to the files in that folder. ![]() htaccess fileĬreate a plain text file named “.htaccess” and add the following line to it:Īddhandler application/x-httpd-php. Find the lines “DirectoryIndex index.php index.htm index.html”, add add the new extension as shown below.ĭirectoryIndex index.php index.htm index.html index.myextĪfter the above change, restart your Apache server. myext, add the following line under the mime_module section of the nf file If you are using XAMPP, on Windows, you will find it under “c:\xampp\apache\conf” folder. On Windows, you’ll find “apache/conf” folder on the drive in which you have installed Apache server. On Linux, you will find nf file under “/etc/apache2/” (or under /usr/local/apache2/conf, if you’ve installed Apache 2 from source). Open your nf file, and locate the following lines: This tutorial explains how you can allow either your Apache or Nginx to serve this. For some reason, you want to keep the file extension this way for testing purpose, without having to rename it to. php, and in those cases, the webserver might not be able to serve that file.įor discussion purpose, let us assume that you have written PHP server side coding in a file with “.myext” extension. Sometimes you might also have a php file that has an extension other than. php as the extension for PHP files that are served by a webserver.
0 Comments
Leave a Reply. |