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.

learn more… | top users | synonyms

3
votes
3answers
6k views

Safely update php 5.3.3 to >=5.3.4 on centos 6

Would the following works fine without any issues? I have apc cache installed, the other packages the usual php configuration. yum update php would that be enough? it is an active server, so want ...
3
votes
4answers
5k views

Is it Possible to view my apache server (local host) from home or remote computer that is outside my LAN?

i am developing a website and need to share progress with other stakeholders. Is it Possible to view my apache server (local host) from home or remote computer that is outside my LAN?
2
votes
3answers
3k views

Millions of files in php's tmp error - how to delete? [closed]

I've got a tmp-folder with 14 million php session files in my home directory. At least that's what I think it is, it's not like I could ls it or anything. I've tried using find with the -exec rm {} \;...
2
votes
2answers
1k views

Failed installing APC?

I am trying to install APC on a gentoo with php 5.2 Here teh full command i Lanched: mkdir /home/APC-php cd /home/APC-php wget http://pecl.php.net/get/APC tar -xzvf APC cd APC-3.1.9 /usr/local/php5/...
2
votes
1answer
2k views

apache sendmail: trying to change user “from” address from apache to domain account

I apologize if I am asking a question already answered, but my problem isn't really that I haven't found an answer. I have, in fact, found a half-dozen different "solutions" to my problem, tried them ...
2
votes
9answers
7k views

CronTab: Not running my PHP scripts?

final edit: i have moved this to http://serverfault.com/questions/168662/406-error-with-get-cron-job EDIT 4: i am getting a 406 error page with this cron! here is the crontab (copied from cPanel): ...
1
vote
1answer
587 views

Apache / PHP server delaying for a minute before responding

Am having the strangest issue with an apache/PHP instance (PHP 5.2 in this case), where it will take over a minute to respond to a request. The PHP profiling is saying it's taking less than a second ...
1
vote
2answers
2k views

How can I prevent users from seeing my PHP source code?

I tried to access my website recently and I saw something disturbing -- users could download the index.php file and see its contents, the PHP code! How is this possible, for Apache to serve up PHP ...
1
vote
5answers
1k views

User Specific Php.ini When php is ran as a module?

I have a php setting that can only be changed in the ini file. I can't change this setting in the global php.ini due to conflicts, so I'll need to have this user specific. Can this be done if php is ...
1
vote
1answer
3k views

Loading JSON in PHP53: ZVAL_DELREF in Unknown on line 0

I'm trying to loading JSON into the new-installed PHP5.3.1 on a CentOS server. Previously there was a PHP5.1 or near and due to the latest version of WordPress I had to upgrade the PHP. I tried to ...
1
vote
1answer
51 views

Using PHP configured for Apache with IIS

Here's my problem, I recently had to use IIS7 for one of my clients but he also wants PHP which is currently installed for my Apache setup on there. I can't find any ISAPI files in there, so I don't ...
1
vote
1answer
587 views

Make post title as a slug in url by mod rewrite

I have previously posted a question but I am not satisfied with the answers. I have a url, for example http://example.com/details.php?a=100&b=101&slug=power-programming-in-php I want to ...
1
vote
2answers
168 views

Apache security

I've been reading up on server/apache security and I've run into a contradiction. I read that you shouldn't serve any files that aren't inside Apache's scope, but I've been told that you should keep ...
1
vote
2answers
593 views

php returns junk characters at end of everything

php appears to be adding junk characters to the end of everything it returns on a friend's site. I'm not an admin on the server but I'd like to give an informed complaint to get this fixed. The site ...
1
vote
1answer
712 views

How to integrate PHP forum system with new Django website

I'm just about to launch a new Django website (RedHat EL4, Apache 2.0.52, Django 1.1, mod_wsgi), transitioning from a basic static-html and php site. As it's currently configured, Django handles ...
0
votes
1answer
374 views

Binding MySQL to run from the public or private LAN IP address - which one is faster

So we have 2 servers all running at the same web host. We have bind MySQL to listen on the public ip-address of the database server and the web server connects to it from the public ip. Both servers ...
0
votes
3answers
6k views

FFMpeg-PHP Installation Error

While installing FFmpeg-PHP, I got this interesting error: /usr/downloads/ffmpeg-php-0.6.0/ffmpeg_movie.c: In function 'zim_ffmpeg_movie_getAudioStreamId': /usr/downloads/ffmpeg-php-0.6.0/...
0
votes
1answer
1k views

No log handling enabled - turning on stderr logging Cannot find

I'm trying to setup a Cron Job that runs a .php file that will automate client email correspondance. I've created the .php file and the Cron Job through cPanel. Everything works fine in that I'm ...
0
votes
1answer
3k views

Postfix on Ubuntu tried everything, won't send emails

I'm trying to get postfix set-up on Ubuntu 13.04 but no luck so far. I found a few answers here on ServerFault that didn't work. I re-installed a bunch of times, nothing. This is my first time dealing ...
0
votes
2answers
206 views

Changing from asp to PHP - server?

I've been developing ASP for quite a while using IIS and hosting it on an NT-server (which has 2 IPs). Since a few months I'm coding in PHP (using xampp on Windows) and would also like to change my ...
0
votes
2answers
108 views

Mail server and web server on different servers

I am writing a PHP application for a client who currently hosts their website on a shared domain with fasthosts. The PHP application is going to be stored on a dedicated server at our location. Part ...
0
votes
3answers
1k views

Problem with php and apache

I am having trouble using the php module with apache2. At the moment, testing with a phpinfo script, only php code is displayed as though it were text, no output at all. I have the line LoadModule ...
0
votes
1answer
2k views

Apache + PHP-FPM + chroot results “File not found.” error

I want to set chroot to the DocumentRoot using PHP-FPM pools' chroot attribute. With the settings below, whatever I do I get only a "File not found." error: /etc/php5/fpm/pool.d/example.conf [...
0
votes
2answers
4k views

Enable json_decode() on my system

I am developing on a server that I don't really have all that control over... I just started working for a Kiosk company about 3 months ago. I am used to developing on my localhost (MAMP) and porting ...
0
votes
1answer
410 views

“<handler> scriptProcessor could not be found in <fastCGI> application configuration” when accessing PHP script in subfolder

I have a configuration problem with php on IIS 7.5. It is a practically fresh install made with the MS Web PI on Win7. I created a simple php testpage. It works in the root level http://localhost/...
0
votes
1answer
624 views

Apache not parsing files? Just sending downloads

I'm just trying to setup some simple things. I put an index.php file in my documentroot. index.html works just fine (sends a webpage). If I try index.php, it assumes I'm trying to download it. How do ...
0
votes
1answer
55 views

Making webpages on the server accessible

I have just set up a LAMP EC2 instance using rightscale when I got to the link: "http://ec2-xxx.compute-1.amazonaws.com/" I get the standard apache welcome page. Now on my server I have the ...
0
votes
2answers
1k views

My php homepage downloads index.php instead of being processed on Gandi.net

if I go to the homepage of my website http://www.website.com (on a brand new server) the index.php gets donwloaded instead than processed. I don't have the same problem on other folders. my .htaccess ...
0
votes
2answers
222 views

How to configure php5 on apache2.2?

I want to configure PHP5 on apache2.2 server. I added LoadModule php5_module "c:/php/php5apache2_2.dll" AddHandler application/x-httpd-php.php # configure the path to php.ini #PHPIniDir "c:/php" ...
-1
votes
2answers
4k views

Unable to allocate memory for pool, How to fix it

I am hosting a number of websites on my Debian server running on NginX, all of my website's log files shows me an error like this 2011/11/23 10:01:03 [error] 5320#0: *349 FastCGI sent in stderr: "...
-1
votes
2answers
2k views

phpMyAdmin Access Denied

I am experiencing the following problem when trying to connect to the phpmyadmin site of my server: phpMyAdmin tried to connect to the MySQL server, and the server rejected the connection. You ...
38
votes
5answers
33k views

Which PHP (opcode) cache one should use and why?

I keep hearing about some PHP (opcode) caches like - APC, XCache, Memcache, eAccelerator, etc. But I couldn't ever figure out how to go about choosing one. Apart from performance benefit, which a ...
12
votes
3answers
1k views

The A to Z of setting up a Linux box for secure local hosting

I am in the process of reinstalling the OS on a machine that will be used to host a couple of applications for our business. The applications will be local only; access from external clients will be ...
10
votes
3answers
19k views

Content-Length not sent when gzip compression enabled in Apache?

I would really appreciate some help understanding this Apache behaviour. I am communicating to PHP from an iPhone Objective-C app in application/json. Gzip compression is enabled on the server, and ...
8
votes
1answer
21k views

why isn't laravel's php artisan serve server being accessible from the WWW on IIS

I have a laravel application running through the laravel artisan server: php artisan serve and it works just fine if I go on my localhost:8000.. Further, I added an inbound rule in the IIS server ...
7
votes
1answer
926 views

How can I use SELinux to confine PHP scripts?

I want to compartmentalize different PHP applications on my SL6.4 (RHEL 6.4 rebuild) web server so that they cannot access each others' data. It seems that SELinux might be able to do this, but I am ...
12
votes
8answers
3k views

is this a hack attempt?

Looking through my 404 logs I noticed the following two URLs, both of which occurred once: /library.php=../../../../../../../../../../../../../../../../../../../../../../../../proc/self/environ and ...
6
votes
3answers
2k views

Can you rely on Nginx as your only webserver for php/mysql

Can you rely on Nginx to be your only webserver. I know in terms of performance it works well, but how does it do in terms of security. I know Apache is stable and has ModSecurity. This is not the ...
16
votes
7answers
37k views

php - error: Cannot find OpenSSL's <evp.h>

Im trying to recompile PHP, but ./configure fails at : configure: error: Cannot find OpenSSL's <evp.h> I have LibSSL 1.0.0, LibSSL 0.9.8, LibSSL-Dev, OpenSSL installed. --with-openssl=/usr/...
10
votes
1answer
16k views

Apache MPMs - Worker vs Prefork

I'm trying to figure out what which is the best Apache MPM I can install on my VPS. I saw some benchmarks and MPM Worker seems to perform better than the Prefork one but for some reason everyone seems ...
8
votes
8answers
947 views

Multi-site hosting - important vulnerability being missed to secure sites from each other?

EDIT #2 July 23, 2015: Looking for a new answer that identifies an important security item missed in the below setup or can give reason to believe everything's covered. EDIT #3 July 29, 2015: I'm ...
8
votes
5answers
8k views

Install PHP7 from Remi repo

I installed PHP7 from Remi repo with sudo yum -y install httpd sudo yum -y install epel-release wget http://rpms.famillecollet.com/enterprise/remi-release-6.rpm sudo rpm -Uvh remi-release-6*.rpm ...
7
votes
3answers
12k views

Isolating Apache virtualhosts from the rest of the system

I am setting up a web server that will host a number of different web sites as Apache VirtualHosts, each of these will have the possibility to run scripts (primarily PHP, possiblu others). My ...
6
votes
3answers
4k views

Can I optimize these APC settings more?

I would like to optimize APC some more but I am not sure where I could do something. First here is the screenshot after one week of running with the current configuration: I have now the following ...
13
votes
2answers
6k views

Should I impersonate PHP via FastCGI?

I am installing the latest version of PHP onto IIS 7.5 via FastCGI, and all of the instructions say that FastCGI should impersonate the calling client by setting fastcgi.impersonate = 1 If my ...
12
votes
6answers
12k views

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 ...
11
votes
3answers
50k views

How do I change the NGINX user?

I have a PHP script that creates a directory and outputs an image to the directory. This was working just fine under Apache but we recently decided to switch to NGINX to make more use of our limited ...
3
votes
3answers
8k views

FastCGI and Apache 500 error intermittently

I have a FastCGI (mod_fastcgi)problem. It happens every once in a while, and does not casue a complete server meltdown, just 500 errors. Here are a couple things. First I am using APC so PHP is in ...
2
votes
2answers
2k views

Apache Server Performance Monitoring

I've recently setup a new apache webserver with the basic LAMP stack (PHP / MySQL / Apache). I'm curious what kind of performance monitoring solutions are typical -- really, I'm simply looking for a ...
1
vote
5answers
6k views

How can I keep my server from being clobbered by zombies from this Ubuntu cron job to remove PHP sessions?

I recently noticed when I logged in that I had several thousand processes marked "zombie". Upon further investigation, I found the following from ps fax: 701 ? Ss 0:28 cron 3363 ? ...