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
31
votes
8answers
3k views

Securing PHP webservers

PHP applications have a reputation for higher than average security problems. What configuration techniques do you use for making sure the application is secure as possible? I'm looking for ideas ...
1
vote
3answers
2k views

Dev background, safe to have php files owned by root but Apache different user?

I'm from a programming background and been thrown into managing a Linux server at work because of an emergency with our reg sys admin. Is it reliable or safe to have our PHP files owned by root yet ...
29
votes
4answers
67k views

How can I display and log PHP errors on IIS7?

We're running PHP 5.2.5 on an IIS 7 Server and we're having problems making PHP errors visible... At the moment whenever we have a PHP error the server sends back a 500 error with the message "The ...
2
votes
5answers
278 views

Compromising between fresh and secure PHP packages on production servers?

I have a handful of production servers running Centos. My application requires a fairly recent version of PHP (> 5.2, IIRC). The options currently available to Centos Users are: The official, ...
2
votes
4answers
188 views

My server is about to be switched off. I run a LAMP set up, what should I back up?

My hosting company may cut me off. Any ideas on what files I should back up? I am running RedHat 4.1. How would I save my current PHP set up? Can I just save the .so files? MySQL - is backing up ...
1
vote
2answers
985 views

how to set a limit to growth of a /home/httpd/…/stats/ error file

I've got a VPS account. The file: /home/httpd/..../stats/...-error_log is logging so many errors that it fills up the 20 GB hard drive space within a 24-hour period which amongst other problems ...
3
votes
1answer
1k views

Lighttpd big uploads memory consumption

Consider the following scenario: I am running lighttpd-1.4.19 and I am handling big uploads (hundreds of MBs but less than 1GB) through it. Server is running on Ubuntu 8.04 LTS. Files are ...
3
votes
8answers
3k views

Scaling a LAMP stack

Once you move beyond 100k hits/month, what would people in this community say is the biggest hurdle? My situ: Tons of static media (audio/video/images) being served off of S3/CDN, but being stored ...
10
votes
6answers
64k views

Temporary failure in name resolution : Host name lookup failure

I've got a script in PHP that's been running fine for months. It recently stopped working. This script connects to gmail to send out an email to my customers. Recently, I started getting this error ...
3
votes
1answer
789 views

PDO_mysql for mac

Has anybody gotten PDO_mysql working on the default PHP installation on a mac? It works with MAMP but that's inconvenient. I'm developing for Zend Framework and mysql, and Zend_db uses PDO. The ...
4
votes
3answers
10k views

Can Nginx handle php (or similar fcgi) requests inside of an alias?

I am converting a legacy Apache server to Nginx and do not have the luxury of changing URL's or rearranging the filesystem. Is it possible to use nested location{} blocks in the Nginx configuration ...
4
votes
3answers
693 views

Upgrade PHP to latest version on CentOS 4.5

I'm a Linux newbie but I need to upgrade PHP on CentOS 4.5 to the latest version -- or at least 5.2.2 or better. What's the easiest way to do that? The latest available via yum seems to be 5.1.6 and I ...
1
vote
2answers
5k views

How do you enable GD in PHP when installing via RPM?

We are working on a client's sever that has PHP running without GD. We would like to enable GD support in PHP on that machine. What is the most straightforward way to enable GD. Is there a way to do ...
0
votes
6answers
5k views

Why isn't my PHP installation recognized by Apache on Windows XP?

I have done the procedure below given in http://www.ricocheting.com/server/php.html for installing PHP and Apache. When I start the Apache server, it is displaying "invalid command PHPIniDir". How can ...
2
votes
8answers
4k views

Linux / apache web-server segmentation fault warnings

Lately I have been receiving a lot of segmentation fault warnings on my web-server. The warnings look like: [notice] child pid xxxx exit signal Segmentation fault (11) I have consulted with the ...
0
votes
4answers
3k views

How to install Apache 2.2.X and PHP5 as a Module on Windows Vista without crashing?

I followed the instructions on PHP5 readme file to do a manual install on Windows and as a module on top of Apache. I ran phpinfo() and it appeared all OK. Then, every time I run php code calling ...
2
votes
5answers
8k views

I have two versions of apache running on Ubuntu, how can I remove one?

I installed apache on ubuntu by doing the following: sudo -i cd /usr/local/src wget http://apache.mirrors.tds.net/httpd/httpd-2.2.11.tar.gz tar -xvf httpd-2.2.11.tar.gz cd httpd-2.11.9 ./configure --...
1
vote
3answers
789 views

Problems upgrading from PHP 5.1.6 to 5.2.9

I have a web server running Fedora Core 5 (yes, I know it's very old) and it was running PHP 5.1.6 so I downloaded and compiled the source for 5.2.9 and restarted the server and phpinfo() still ...
7
votes
1answer
17k views

Configure PHP to use a proxy?

Using PHP 5.2.6 and need to configure it to use our forward proxy (which requires authentication be set) so that the PHP scripts can connect to the internet correctly. I see that PHP.INI in the 4 ...
0
votes
3answers
1k views

PHP Configuration file won’t load IIS7 x64

using Fast CGI I can't get it to read the php.ini file. See my phpinfo below. System Windows NT WIN-PAFTBLXQWYW 6.0 build 6001 Build Date Mar 5 2009 19:43:24 Configure Command cscript /nologo ...
0
votes
1answer
1k views

Error running multiple instances of sphinx (searchd) on the same box

I have a MediaWiki server that hosts 4 instances of MediaWiki, and figure I should have a separate instance of sphinx search running for each. I did this by creating separate sphinx.conf files for ...
7
votes
4answers
10k views

Profiling Apache+Mysql+Php server - which is the bottleneck?

How do I profile an Linux + Apache + Mysql + Php server for speed? I have a server with a heavily modified MediaWiki instance running on Ubuntu 8.04. It's a bit sluggish - I haven't done anything to ...
5
votes
1answer
4k views

How do you run a PHP script as the file's owner, rather than as the webserver user?

I'm sure there's a well-known answer for this, but I can't seem to find it. How do I make a user's PHP scripts (in ~user/public_html, for example), run as the owner rather than as (eg) www-data? ...
3
votes
1answer
578 views

What is the URL_CHANGED Event on IIS7 Request Tracing Log?

I just enabled Failed Request Tracing for a site and I get a URL_CHANGED event as the third item on the log. 1. GENERAL_REQUEST_START SiteId="1", AppPoolId="DefaultAppPool", ConnId="1610613013", ...
30
votes
3answers
12k views

PHP: What are the advantages of FastCGI over mod_php?

It was recently suggested to me that I use FastCGI with PHP. Now I went to the FastCGI page and read it but I don't really understand what the advantages are.
1
vote
3answers
2k views

Suggested config for PHP VPS host on Linux for low memory

I'm looking at using Linode at a VPS host for a PHP Webapp. Linode offers a variety of Linux distros. I'm basically after a config that will absolutely minimize memory usage while still keeping the ...
1
vote
6answers
4k views

PHP shared hosting with opcode caching (eg APC)? [closed]

Basically I'm looking for a cheap hosting solution that actually enables opcode caching. I'm having a hard time finding one. Is there a reason for this? Anyway, anyone know of one?
0
votes
2answers
300 views

PHP takes a long time for uncached pages

On my server, PHP will take a long time to execute a script (say, 5 seconds) if it hasn't been cached by APC yet. After it is, it executes very fast. I'd provide more information, but I wouldn't know ...
3
votes
3answers
7k views

Fastest option for a PHP webserver

I need to serve a PHP app that handles lots of requests. I want to know if there's any real benefit in going with anything other than Apache, and what are the pros and cons of the alternatives. I ...
1
vote
5answers
368 views

How do you secure the “gallery” photo gallery?

Are there any special steps that should be taken to secure Gallery? Specifically, I currently have the Fedora RPM gallery2-2.3-1.fc8 installed. I do have selinux enabled in targeted mode, which is a ...
4
votes
3answers
6k views

How can I rewrite urls (ala mod_rewrite) for free in IIS 6?

I've got an application I wrote (with cakephp) for the lamp stack and I'm moving it to a windows server. I'm having a lot of trouble with apache for windows (memory and cpu issues) so I would like to ...
9
votes
2answers
7k views

mod_rewrite does not forward GET parameters

I'm having trouble setting up Apache with mod_rewrite on my development machine. Mod_rewrite is active, and works well for some rules. Some rules do not work as intended, like this one: RewriteRule ^...
2
votes
3answers
213 views

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?
34
votes
5answers
95k views

How do I tell Apache which PHP to use?

I am running Apache2 on a Mac OS X (10.5). I just compiled PHP 5.2.8 and finally got pdo-mysql working (or so I think). This terminal command: php --version is showing 5.2.8 and I have the right ...
3
votes
4answers
2k views

Installing PHP 5 on RedHat Enterprise Linux 4

I'm tearing my hair out trying to get PHP 5.2.6 installed on our RHEL 4 box here. Upgrading to RHEL 5 is an option down the road, but not tonight, which is when we need to get this instance of our ...