Tag Info

Hot answers tagged

92

Note: prepend sudo if not root Using SysV Init scripts directly: /etc/init.d/php-fpm restart # typical /etc/init.d/php5-fpm restart # debian-style Using service wrapper script service php-fpm restart # typical service php5-fpm restart # debian-style Using Upstart (e.g. ubuntu): restart php5-fpm # typical (ubuntu is debian-based) ...


83

Installing PHP 5.4.* on Ubuntu 12.04 Simply add the PPA repository: sudo add-apt-repository ppa:ondrej/php5-oldstable And install it: sudo apt-get update sudo apt-get install php5 You may need to install add-apt-repository on Ubuntu 12.04. To do so, run the command: sudo apt-get install python-software-properties NB! For latest version of PHP ...


53

This is perfectly normal. At system startup, a number of services start. These services initialize themselves, read in configuration files, create data structures and so on. They use some memory. Many of these services will never run again for the entire time the system is up because you're not using them. Some of them may run in hours, days, or weeks. Yet ...


49

You probably want to see the PHP Client Comparison. Short version: They will both work, and for most cases either one will do just fine. Regarding the other issue: Yes, you should be able to do telnet 127.0.0.1 11211. Very few firewalls would block localhost from communicating with itself. If you are not able to connect, verify that memcached really is ...


46

You need VS C++ 2012. Go here: http://www.microsoft.com/en-us/download/details.aspx?id=30679 You need to download the x86 version if you install the 64bit version it will give the same error.


41

maybe they use tail -f on the access log?


41

yes. you can clear the memcache. try: telnet localhost 11211 flush_all quit if the memcache does not run on localhost 11211, you will have to adjust it.


39

I also agree there is a lack of tutorials for people who just need a script to send, e.g. error emails, and don't need a full-blown mail server. First, if postfix not already installed do: sudo apt-get install postfix It prompts with a couple of questions. For the first I chose "Internet site"; for a machine behind a firewall I might choose smarthost ...


38

Whoever was making this argument seems to be saying "Once someone has their foot in the door, you might as well give them complete access". By that logic, a firewall negates the need for all passwords on your internal network. Strong passwords are one step towards limiting the damage done by network intrusion. There's no reason to throw your hands up in ...


36

For me, setting the ServerName property in httpd.conf fixed the delays (they were up to 10 seconds at worst): # ServerName gives the name and port that the server uses to identify itself. # This can often be determined automatically, but we recommend you specify # it explicitly to prevent problems during startup. # # If your host doesn't have a registered ...


35

Accourding to the packages.ubuntu.com page about php-apc the file can be found compressed here /usr/share/doc/php-apc/apc.php.gz. If you don't want do look online you can query the list of files installed by the package managment system by using a command like dpkg -L apc.php.


34

Disclaimer: You'd be mad to listen to me without doing a tonne of testing AND getting a 2nd opinion from someone qualified - I'm new to this game. The efficiency improvement idea proposed in this question won't work. The main mistake that I made was to think that the order that the memcached stores are defined in the pool dictates some kind of priority. ...


34

$ sudo apt-get install php5-cli Should do it.


34

Using mod_php each Apache worker has the entire PHP interpreter loaded into it. Because Apache needs one worker process per incoming request, you can quickly end up with hundreds of Apache workers in use, each with their own PHP interpreter loaded, consuming huge amounts of memory. (Note, this isn't exactly true, Apache's worker_mpm allows you to serve many ...


31

Try yum install pcre-devel before installing APC. On Debian use aptitude install libpcre3-dev instead.


28

Since a WAMP stack itself is composed of apache, mysql and php, then what's the difference between using the WAMP stack and installing them all separately? There are many differences, though the three most troubling ones are: insecure configuration difficulty and lag in upgrades non-standard configs/binary locations To expand on #1: WAMP, LAMPP, ...


26

The products you list serve different purposes. OPCode caches There are many PHP Accelerators (OPCaches) as seen on this Wikipedia list. As is common with open source products, they are all fairly similar. XCache is the lighttp PHP accelerator, and is the default choice when you are running that HTTPd. It works well with Apache as well, however APC ...


24

Do it from your command line: php -v mysql -V and: php -i | grep -i '^libxml' OR Put this in your root directory: <? phpinfo(); ?> Save it as phpinfo.php and point your browser to it (this could be http://localhost/phpinfo.php)


23

This is taken almost verbatim from my answer here, but I know we frown on link-only answers on SO so I imagine you guys do as well :-) If you are having this problem and using a version of Windows before Windows 7, this is probably not the answer to your problem. Why is this happening? The cause of this problem is IPv4 vs IPv6. When you use a host name ...


23

I found the solution. Very easy, indeed. I forgot to include the following: AddType application/x-httpd-php .php into apache mod_mime section into httpd.conf I was misled by the fact that php scripts were correctly working; however the negotiation was failing because mod_negotiation only looks for "interesting" (and known) file types.


23

As Nate's link suggests, both work perfectly well for simple usage. However, memcached supports more features that allow you to get the most performance out of memcached. The binary protocol reduces the amount of data required to be sent between client and server. Multigets and multisets allow you to get/set multiple items at the same time. If you're finding ...


23

Re: Tip 3 above (for anyone else who happens to come across this via google), it seems that at least presently in order for this to work you must use memcache.session_redundancy = N+1 for N servers in your pool, at least that seems to be the minimum threshold value that works. (Tested with php 5.3.3 on debian stable, pecl memcache 3.0.6, two memcached ...


21

The short answer: Either one is what you are looking for, but my first choice would be memcache (the first one you listed), purely based on its correct use of nomenclature. Now here's how I came to that conclusion: Here is a quick backgrounder in naming conventions (for those unfamiliar), which explains the frustration by the question asker: For many *nix ...


21

Just to double check, do you have logging set to E_ALL, and display_errors enabled in your php.ini? Usually this is enough to display these errors in IIS 7. Next, take a look at your IIS settings, as it may be set to only show error messages locally. In the IIS 7 configuration editor this is under system.webServer->httpErrors. You will need to change ...


20

If you are using apache: <Directory ~ "\.svn"> Order allow,deny Deny from all </Directory> That will block people from accessing .svn directories remotely (using the browser) but you can keep then (and svn capabilities) on the project. BTW you can substitute \.svn for \.git or \.cvs if you are using something different than ...


20

You forgot this package: sudo yum install httpd-devel.i386 or sudo yum install httpd-devel You also might need: apt-get install apache2-threaded-dev Once it's complete, try again and at the end restart apache: sudo apachectl -k graceful


19

Upgrade all packages: apt-get update; apt-get upgrade; If you want to upgrade just one package (e.g. php5): apt-get update; apt-get install php5; For the package versions available on Debian take a look at: http://www.debian.org/distrib/packages If you want to install php5 5.4.4-2, that is only available on wheezy, you should add wheezy to your ...


19

I had the same problem in Ubuntu 12.04.1 LTS and solved it with: sudo apt-get install libcurl4-openssl-dev pkg-config. After that I could compile it just using --with-openssl


19

0) Yes. At the very least, it's a systematic probe against your site trying to discover if it's vulnerable. 1) Other than making sure that your code is clean, there's not a lot you can do but run your own tests against your host to make sure it's safe. Google Skipfish is one of the many tools to help you there. 2) I would.


18

Apache mod_alias is designed for this and available from the core Apache system, and can be set in one place with almost no processing overhead, unlike mod_rewrite. Alias /robots.txt C:/xampp/vhosts/override-robots.txt With that line in the apache2.conf file, outside all the vhost's, http://example.com/robots.txt - on any website it serves, will output ...



Only top voted, non community-wiki answers of a minimum length are eligible