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
2
votes
1 answer

Lighttpd / PHP-CGI will crash without warning

I'm using Lighttpd / PHP-CGI on a Windows XP machine. I was using the normal CGI interface which is very stable, but I tried FastCGI and I love the speed boost. However, even under light load, the PHP-CGI daemon will just crash after an hour or…
Kaslai
  • 121
  • 3
2
votes
2 answers

PHP segmentation fault when using more than 128M

I have an install of SugarCRM. It is heavy on memory, which is a separate issue to deal with. In the meantime, any page that attempts to use more than 128M of memory, results in the Apache (mod_php) process halting with a segmentation…
Jason
  • 151
  • 1
  • 2
  • 9
2
votes
2 answers

MongoDB replicaSet failover incurs 1000x query response time increase

I'm testing a production MongoDB replica set failover. When I manually fail one of the instances I see an approx. 1000x (one thousand x) decrease in response times of my PHP queries. I'm on the latest MongoDB (2.2.2) and the latest php driver…
John
  • 85
  • 7
2
votes
1 answer

FcgidMaxProcesses not respected

I'm using FastCGI (fcgi). I'm having a problem where more PHP processes are being spawned than what should be, which is eating up my RAM. I'm using WHM, and so have set the following PHP settings via WHM web interface > Apache Configuration >…
Michael
  • 81
  • 1
  • 9
2
votes
1 answer

Long server response delay - 60 to 90 seconds - when using PHP Mail() on IIS7.5

We have a Windows 2008 Server running PHP 5.2.11 on IIS 7.5 When any script on the server calls a mail() function it presents no errors and sends the email nearly instantly. However, the server will "hang" for about 60 to 90 seconds until it starts…
m.ed
  • 21
  • 1
2
votes
1 answer

How to store php sessions using memcached and unix socket

I am running Arch linux with systemd, nginx, and php with php-fpm. I am trying (and failing) to configure memcached to store sessions using a unix socket. I have memcached installed and active, however, I am unable to disable networking. I added…
laertiades
  • 133
  • 3
  • 9
2
votes
3 answers

Change Default Config Settings for PHP?

When setting up php on a new Unix-based server, are there any default PHP settings that you will always change? Any that you will always consider changing based on the particular environment?
Yaakov Ellis
  • 556
  • 1
  • 10
  • 15
2
votes
3 answers

Why Are My High CPU Processes Located In /usr/bin/?

I keep getting RAM and CPU spikes but I can't figure out where it is coming from. If I look at the Process manager, I see, /usr/bin/php /home/hellohel/public_html/index.php Repeated several times. I also occasionally see: [php] Taking up…
kmoney12
  • 205
  • 1
  • 3
  • 6
2
votes
1 answer

Apache - How to log the file name and size of file uploads

I want to keep some statics about the files uploaded to my server, including the file name, size and response time. I use PHP to handle the uploads in the server side (client-side is a POST form) but ideally I'd like to use Apache's logging…
Vasilis
  • 293
  • 1
  • 4
  • 13
2
votes
1 answer

Sending output from php script called from bash script to syslog

Sending output from php script called from bash script to syslog Im trying to create a bash script (to be called by a cron job) which calls a php file (which I have not made). Calling the php file is easy enough. The php script output a lot of stuff…
Lonos
  • 23
  • 3
2
votes
2 answers

Securing PHP's exec and others

I'm currently setting up an hosting service and, for now, i'm very concern about security. Here is my situation : I've set up multiple apache's vhost and for obvious security reason, i don't want to let a user access others' data by moving around…
Remy Grandin
  • 208
  • 3
  • 8
2
votes
1 answer

PHP executes an older version of a script that I've already overwritten

I'm literally freaking out. It's the first time such a thing happens to me. I have modified and saved a php script, and now I am calling it from the browser, and the old version is still being run. No, I'm not seing a version of a page cached by the…
matteo
  • 731
  • 2
  • 9
  • 21
2
votes
1 answer

Changing timezone of server using cPanel / WHM

I have changed time zone of my server to Asia/Kolkata in WHM by going to the following path: Home > Server Configuration > Server Time But still my website is showing timezone as America/Denver when I check it using PHP. I have pasted the following…
sumit
  • 147
  • 1
  • 1
  • 6
2
votes
1 answer

Running a batch file from PHP - interactive services detection?

I am having a very hard time getting an executable to run from within a PHP script (using exec(), or a number of other PHP commands I've tried). The issue seems to be coming down to a question of user permissions (possibly?) or Windows/server…
Nik
  • 129
  • 1
  • 3
2
votes
1 answer

url request aborted http traffic apache

I'm having problem in our extjs php application. We have two server and there is a load balancing (NLB) in there working in a round robin way . While using the system the user is having some problems like data is not loading from the database and…
Farhan
  • 21
  • 1
  • 3