Questions tagged [php]

PHP is a general-purpose scripting language that is especially suited for Web development. The online manual is an excellent resource for the language syntax and has an extensive list of the built-in and extension functions. Most extensions can be found in PECL.

PHP is an open-source general-purpose scripting language that is suited and popular for server-side Web Development. There is an excellent online manual and a wiki. The online manual is a complete reference for syntax, built in functions, and extensions. There are lots of extensions for PHP that most of them can be find in PECL.

If you want to post a question in PHP, check the error log or if errors are enabled, enter them from output of your script if any.

7887 questions
183
votes
18 answers

How do you restart php-fpm?

I need to reload my php.ini and there's nothing in the help dialog about restarting it.
Galen
  • 1,983
  • 2
  • 12
  • 10
104
votes
1 answer

Differences and dis/advanages between: Fast-CGI, CGI, Mod-PHP, SuPHP, PHP-FPM

There are few different php "wrappers"(?). What are differences between them? Tried to google some, but cant seem to find informations. (mod-php is not googleable). Why might I choose one over another?
Gacek
  • 1,201
  • 2
  • 10
  • 10
76
votes
9 answers

memcache vs memcached?

I want to use memcached http://www.danga.com/memcached/ I have installed it through yum install memcached But now I need to connect to PHP, and there is an extension named memcache and one named memcached?…
thanksyo
  • 839
  • 2
  • 8
  • 8
74
votes
8 answers

Why is the response on localhost so slow?

I am working on a tiny little PHP project for a friend of mine, and I have a WAMP environment setup for local development. I remember the days when the response from my local Apache 2.2 was immediate. Alas, now that I got back from a long, long…
Peter Perháč
  • 1,069
  • 1
  • 9
  • 13
65
votes
13 answers

104: Connection reset by peer while reading response header from upstream (Nginx)

I have a server which was working ok until 3rd Oct 2013 at 10:50am when it began to intermittently return "502 Bad Gateway" errors to the client. Approximately 4 out of 5 browser requests succeed but about 1 in 5 fail with a 502. The nginx error log…
Nigel Alderton
  • 992
  • 3
  • 9
  • 19
65
votes
3 answers

php cli memory limit

I am getting a memory error in a php cron job: Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 71 bytes) in /opt/matrix/core/lib/DAL/DAL.inc on line 830 The applicable parts of the crontab are: $ sudo crontab -u…
Ryan H
  • 1,468
  • 3
  • 15
  • 19
57
votes
8 answers

how to restart/clear memcache without restarting the whole web server?

/opt/eduserver/eduserver gives me options: Usage: /opt/eduserver/eduserver {start|stop|startphp|startwww|startooo|stopphp|stopwww|stopooo|restartphp|restartwww|restartooo|status|restart|reload|force-reload} where memcache is php module there is…
Radek
  • 1,153
  • 4
  • 26
  • 39
55
votes
7 answers

PECL command produces long list of errors

Currently running PHP 5.4 on CentOS 6.5. I installed the webtatic php55w package then installed PEAR+PECL without issue along with redis and mongo through PECL. Shortly after, I realized 5.5 is not compatible with the framework I was working with so…
eComEvo
  • 1,011
  • 3
  • 20
  • 32
48
votes
1 answer

Can't start php-cgi.exe - MSVCR110.dll is missing

Trying to setup nginx and php on my Windows machine, but every time I try to start php-cgi.exe I get a system error. The program can't start because MSVCR110.dll is missing from your computer. Try reinstalling the problem to fix this…
Marwelln
  • 599
  • 1
  • 5
  • 5
47
votes
3 answers

How do I upgrade from PHP 5.3 to PHP 5.4.6 in Ubuntu?

Is there an easy way out to get the latest PHP? I have tried updating my package but none of it has 5.4.6 yet... if anyone knows on how to do it quickly, can it be shared here? I've tried compiling from the source, but I am constantly getting: …
user79356
  • 627
  • 1
  • 8
  • 13
47
votes
1 answer

Curl POST - 411 Length Required

We have a RestFUL API we build in PHP. If we make the request: curl -u api-key:api-passphrase https://api.domain.com/v1/product -X POST We get back: 411 - Length Required Though if we simply add -d "" onto the request it works and no 411 error. Is…
Justin
  • 5,328
  • 19
  • 64
  • 84
46
votes
1 answer

how to install an older version of a pecl package

I have this code $passengerId = new \MongoId(oPassenger->getId()); return $this->createQueryBuilder('Device') ->update() ->multiple(true) ->field('activated')->set(false) …
abbood
  • 1,127
  • 4
  • 13
  • 21
46
votes
3 answers

How to check my PHP and MySQL version on Ubuntu VPS?

HI I am going to install MyBB but I am not sure whether I have installed the correct version of PHP and MySQL. PHP version 5.1.0 or above with XML Extension installed MySQL version 4.0 or above How to check that? Especiall the PHP XML…
DocWiki
  • 683
  • 2
  • 7
  • 8
44
votes
15 answers

phpMyAdmin Error - The configuration file now needs a secret passphrase

I keep getting an error "The configuration file now needs a secret passphrase" after installation of phpmyadmin. I have set the passphrase and also followed the instruction presented on…
jax
  • 551
  • 1
  • 4
  • 4
43
votes
4 answers

What time zone is a cron job using?

I'm guessing there's a difference between my PHP time and the server time. When I check the current time in PHP, it's showing that MST is being used. However, cron jobs aren't running at the correct time. How can I check to see what timezone the…
Edward
  • 533
  • 1
  • 4
  • 4
1
2 3
99 100