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.

Filter by
Sorted by
Tagged with
8 votes
1 answer
7k views

Alias doesn't work in script with #!/usr/bin/env php

I've some PHP scripts which are starting with #!/usr/bin/env php. The default interpreter is PHP 4.4, but the scripts need PHP 5.3, so I created an alias in ~/.bashrc: alias php="/usr/local/bin/php5-...
witrin's user avatar
  • 183
8 votes
6 answers
42k views

Downgrade PHP 5.4 to 5.3 in Debian

I had to do a Debian dist-upgrade on my server... in the process, PHP got upgraded to 5.4. We use ioncube which only supports up to 5.3 atm, and I'm having some trouble finding how to downgrade to 5....
Carnivoris's user avatar
8 votes
3 answers
47k views

Change php modules directory

I am compiling php, and its setting my modules directory to /usr/lib64/20090626-zts I would like to change this to /usr/lib64/php/modules, but I cannot find a configuration option to do so. I can ...
copacetic's user avatar
  • 183
8 votes
6 answers
3k views

How can I keep Apache from falling over?

I have a pair of servers hosting a single Magento ecommerce site with moderate traffic (60k page views per day reported from google analytics, I think about 80k reported on the server itself). The ...
Dave Child's user avatar
8 votes
4 answers
18k views

Why is PHP $_REQUEST array empty?

I installed nginx on Ubuntu Hardy and immediately realized that the PHP scripts were getting empty request arrays, ie whether GET or POST nothing was coming through, even the $_REQUEST array was empty....
vfclists's user avatar
  • 1,652
8 votes
1 answer
71k views

405 (Not Allowed) on POST request

Everything worked before problems with Winginx occurred. When I send data with Jquery with POST method I get 405 (Not Allowed) error. GET works perfectly fine. When I request data from /formcheck (...
Telion's user avatar
  • 183
8 votes
3 answers
4k views

Troubles with memcache.so

I've been asked to launch a site that someone else built. It is a Wordpress shop site that needs Memcached to run, and I've been having troubles getting Memcached and the memcache php plugin working ...
CourtDemone's user avatar
8 votes
3 answers
6k views

How can I pass configure options when installing php extensions with pecl?

There is a PHP extension to which I need to pass a configure option when I install it with a pecl command. I can't find a way to do this. Of course I can install it manually, but I need it to be able ...
Piavlo's user avatar
  • 141
8 votes
4 answers
9k views

Apache/PHP appears to be caching symbolic links for 60 seconds - how to stop it, or discover what is really caching the symlinks and stop that?

We have a PHP web application we are deploying to a LAMP server running CentOS 5.5 using Capistrano. Capistrano manages switching to the latest version (and rolling back) using a symlink, so our ...
Shabbyrobe's user avatar
8 votes
6 answers
23k views

NGINX Remove index.php /index.php/something/more/ to /something/more

I'm trying to clean urls in NGINX using framework DooPHP. This => - http://example.com/index.php/something/more/ To This => - http://example.com/something/more/ I want to remove (clean url) the "...
Gaston Morixe's user avatar
8 votes
9 answers
14k views

How can I test the security of my server?

How can I test the security of my server ? Please I know it is too general question. But I was wondering if there is a tester software or web service checking all ports of your server, or possibly ...
aneuryzm's user avatar
  • 1,754
8 votes
4 answers
402 views

Paranoid Sysadmin -vs- Out-of-Date PHP version

How can a paranoid sysadmin confidently stay up-to-date with the latest stable PHP versions? (security fixes have been coming in pretty regularly). This is a Production server, and so "breaking ...
anonymous coward's user avatar
8 votes
1 answer
5k views

/usr/bin/host executed by hacked PHP script

Today I noticed unusual high request rate on Apache webserver and also quite high incoming network traffic. Upon checking Apache's mod_status page, I found the offending URLs to be from path www....
Marki555's user avatar
  • 1,568
8 votes
3 answers
5k views

Why is Apache running wild and killing MySQL?

Apache has got out of control over the past few days and made MySQL crash twice. It all started when I migrated a WordPress website over which also contains a phpBB forum. I'm not very experienced in ...
Bob Flemming's user avatar
  • 1,285
8 votes
2 answers
6k views

Can I use the worker MPM with mod_php?

After reading this answer, I decided to change httpd's MPM on my server to worker. But while editing /etc/sysconfig/httpd, I noticed this comment: # The default processing model (MPM) is the process-...
jgillich's user avatar
  • 475
8 votes
4 answers
7k views

Apc, xcache or eAccelerator? What should I use for Wordpress? [closed]

I'm trying to configure a server for a Wordpress site. What should I use for opcode caching? APC, xcache or eAccelerator?
THpubs's user avatar
  • 1,785
8 votes
1 answer
44k views

"<handler> scriptProcessor could not be found in <fastCGI> application configuration" when accessing PHP script in subfolder [duplicate]

Possible Duplicate: “<handler> scriptProcessor could not be found in <fastCGI> application configuration” when accessing PHP script in subfolder I have a configuration ...
Priednis's user avatar
  • 305
8 votes
3 answers
21k views

php writing deprecated errors to apache error log

I just upgraded from Debian Lenny to Squeeze and noticed that my /var/log/apache2/errors.log is getting bombarded with the following errors: <b>Warning</b>: Directive 'magic_quotes_gpc' ...
gardarh's user avatar
  • 189
8 votes
3 answers
10k views

Rsyslog duplicate logs (rsyslog.conf and rsyslog.d/something.conf)

I've created a custom log (PHP sends log entries to rsyslog) using local0. It uses a new custom file (/var/log/sea.log). The problem is that logs are being sent to /var/log/sea.log, /var/log/messages ...
brgsousa's user avatar
  • 215
8 votes
3 answers
13k views

PHP: what is --enable-zend-multibyte configure option for?

What is exactly --enable-zend-multibyte option for when you ./configure PHP?
Vladislav Rastrusny's user avatar
8 votes
1 answer
4k views

Nginx - Enable PHP for all hosts

I am currently testing out nginx and have set up some virtual hosts by putting configurations for each virtual host in its own file in a folder called sites-enabled. I then ask nginx to load all ...
F21's user avatar
  • 716
8 votes
1 answer
2k views

PHP on command line displays "Out of Memory", no file name, line number or memory value

I originally posted this at https://stackoverflow.com/questions/9665189/php-on-command-line-displays-out-of-memory but was advised to post here instead. This is not the normal fatal error when you ...
Gnuffo1's user avatar
  • 81
8 votes
1 answer
21k views

Adding a self-signed cert to the trusted certs within cURL in Windows?

I have created a self-signed cert from the instructions on this page, have installed it and it appears to all be working correctly, but now I need cURL to trust it. Since the later versions of cURL ...
Brett's user avatar
  • 319
8 votes
1 answer
14k views

How should I tune apache when I see high CPU, but low memory usage?

My CentOS web nodes (LAMP stack) are experiencing high CPU usage but low memory usage. Nearly all of the processes are apache. I know I could just add additional web nodes until my cpu usage becomes ...
Ryan's user avatar
  • 430
8 votes
3 answers
32k views

run shell command as other user called by PHP

I have a PHP script which is called by HTTP and not as command line script. This script should call a shell command as an other user than the current webserver user www-data. Example: <?php echo ...
powtac's user avatar
  • 639
8 votes
4 answers
3k views

What Apache/PHP configurations do you know and how good are they?

I wanted to ask you about PHP/Apache configuration methods you know, their pros and cons. I will start myself: ---------------- PHP as Apache module---------------- Pros: good speed since you don't ...
Vladislav Rastrusny's user avatar
8 votes
6 answers
4k views

PHP-CGI Started Serving Blank Pages

My PHP-CGI started serving blank pages for no apparent reason until I restarted the process. I want to know why. Unfortunately the "production" configuration file of PHP has no error_log by default. ...
Unknown's user avatar
  • 1,715
8 votes
3 answers
38k views

PHP - Extensions - no-debug-non-zts-xxxxxxxx

I am compiling php extensions (memcached and xdebug), and when I run make install, they keep getting installed into /usr/local/php/lib/php/extensions/no-debug-non-zts-20090626. So a few questions: ...
Mike Purcell's user avatar
  • 1,738
8 votes
2 answers
30k views

How do you set max execution time of PHP's CLI component?

How do you set max execution time of PHP's CLI component? I have a CLI script that has gone into a infinite loop and I'm not sure how to kill it without restarting. I used quicksilver to launch it, so ...
cwd's user avatar
  • 2,793
8 votes
6 answers
572 views

How to grow from single server setup

I'm looking for resources on how to grow our server setup. We currently have one dedicated server with Rackspace in the UK of the following spec: HPDL385_G2_PrevGen HP Single Dual Core Opteron 2214 (...
Jon M's user avatar
  • 467
8 votes
1 answer
762 views

Is there any good reason not to increase upload_max_filesize and post_max_size?

As the sysadmin of a LAMP box I am being asked to raise the upload capacity of php/html forms to something around 70 MB. I believe the server can handle it since it has two quad cores and 4 Gig RAM. I ...
damusnet's user avatar
  • 335
8 votes
1 answer
3k views

Requests are never queued after pm.max_children with Nginx and PHP-FPM

As soon as a pool reached pm.max_children, Nginx starts timing out when trying to send new requests to PHP-FPM. "max listen queue" is always 0 in the php-status page. PHP-FPM 5.5.16 Nginx 1.6.1 Here ...
pembo13's user avatar
  • 81
8 votes
4 answers
16k views

Memory usage of php-cgi processes is growing steadily

I'm trying to set up a web server on a VPS. My problem is that memory usage of php-cgi processes increases over time even though the website is not receiving any traffic at all. (it is behind a ...
John's user avatar
  • 81
8 votes
2 answers
17k views

What does ALPN, server did not agree to a protocol mean?

I see this quite regularly when using various calls in curl. I'm not sure if its the root cause to some of my returns resulting in error 400 but as a newbie just curious more than anything.
John Toe's user avatar
8 votes
3 answers
12k views

Apache + PHP-FPM = random "Error parsing script headers" + Seg Faults

I have PHP-FPM setup with Apache 2.4 using proxy_fcgi, all works fine, but every one in 4-6 requests, Apache returns a blank page. This happens on my main site http://danielhe.com/, but not subdomain ...
user avatar
8 votes
4 answers
5k views

Can I globally set $_SERVER['REDIRECT_URL'] before script execution?

I'm in the process of migrating many sites from an old to a new server configuration. Each site is based on a similar (but sadly not identical) codebase, using mod_rewrite URLs. Ubuntu 8.04 LTS => ...
Barry's user avatar
  • 181
8 votes
1 answer
33k views

upstream prematurely closed connection while reading response header from upstream 502 Bad GateWay

nginx is killin me.. so right now I have 502 Bad Gateway. error log says: 2016/10/12 17:39:53 [info] 3023#0: *464 client closed connection while waiting for request, client: 127.0.0.1, server: 0.0.0....
RobDee's user avatar
  • 155
7 votes
4 answers
33k views

Upgrade PHP 7.0 to 7.2 on Centos

I 've a working production server that runs PHP 7.0, and I want to upgrade to 7.2. I haven't found anything online that would suggest that PHP7.0 and 7.2 can co-exist. What would be the proper ...
Michael Chourdakis's user avatar
7 votes
7 answers
9k views

Very simple SMTP server for Ubuntu wanted

I'm looking for a very simple, lightweight SMTP server to run on an Ubuntu 9.04 VPS. The only functionality I need is to support the PHP mail command; <?php mail('[email protected]', 'My ...
Nigel Alderton's user avatar
7 votes
2 answers
73k views

OpenSSL extension for PHP in Ubuntu?

I'm not sure how to recompile PHP with OpenSSL? I've been looking around the OpenSSL PHP page and the OpenSSL tutorials but I don't see any openssl.so or php-openssl.so around my server? Is there a ...
MacMac's user avatar
  • 2,141
7 votes
4 answers
23k views

Do i need to open 25 port to send emails with the php mail function?

I have a Linux web app. Do I need to open port 25 to only send emails using the PHP mail function? If I have to open port 25, how can I disable receiving emails? Edit: I am asking because I ...
Ben's user avatar
  • 775
7 votes
4 answers
19k views

Installing Image Magick on Amazon EC2

Well I'm a PHP developer who know few linux commands to get my job done. I need to launch a symfony 1.4 website on Amazon EC2. Everything is fine except IMagick. I magick is also installed through ...
Kapil Sharma's user avatar
7 votes
3 answers
20k views

PHP installation on IIS: ISAPI or CGI?

I'm running IIS6 on Windows Server 2k3, and currently have PHP installed as a ISAPI module. We're about to upgrade our environment to PHP 5.3.0, and this made me wonder whether I should stick with the ...
Jacob Hume's user avatar
7 votes
4 answers
26k views

The requested PHP extension ext-mcrypt * is missing from your system [closed]

I have updated my php to version 5.4.13 etc and well in the terminal my version of php states this PHP 5.4.12 (cli) (built: Mar 16 2013 21:46:23) But running a composer install io get the ...
Simon Davies's user avatar
7 votes
1 answer
7k views

php slowlog causing ptrace error in docker container

I have an AWS Linux host machine running a centos 7 docker container with 5.5.25 and php-fpm running inside it. Php is exposed outside of the docker container over port 9000 and is serving requests to ...
Andrew Kett's user avatar
7 votes
2 answers
34k views

Disabling PHP Deprecation Warnings and Notices

I've been using and configuring PHP, but now I'm stuck in a weird problem, so I am going to ask you guys for help. I don't want to see Deprecation Warnings and Notices in a production server, ...
stivlo's user avatar
  • 749
7 votes
1 answer
12k views

Compiling PHP with LDAP support on Ubuntu 12.10

I am trying to compile PHP on Ubuntu 12.10 with LDAP support. I have run: apt-get install libldap2-dev That installs the header files to /usr/include. However, when attempting to compile it is ...
Andrew Ellis's user avatar
7 votes
2 answers
31k views

PDO_MYSQL Installation on CentOs6

I have a new CentOS 6 server running PHP 5.3.2. The output of php -v shows Unable to load dynamic library '/usr/lib64/php/modules/pdo_mysql.so - /usr/lib64/php/modules/pdo_mysql.so cannot open ...
SidC's user avatar
  • 369
7 votes
2 answers
31k views

How to make phpMyAdmin ask for my username and password

I am using rhel 5 and php 5 with mysql 5. My server is already configured and running all applications smoothly. I am accessing mysql as root and supplying my password. However, when I access ...
anitha's user avatar
  • 71
7 votes
3 answers
37k views

Confirm that mysqli extension is not installed

Recently I discovered that mysqli extension is not installed in my server Centos version 2.6. I confirm it because I change the driver of db connection from mysqli to mysql and now works fine. So, is ...
manix's user avatar
  • 175

1
3 4
5
6 7
159