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

8
votes
4answers
5k views

How to add Postgres support to PHP installed by Homebrew?

I have already installed and configured new version of PHP with Homebrew, including MySQL support and XDebug. That works fine. However, I need to install the support for PostgreSQL as well. How can I ...
1
vote
3answers
2k views

owncloud refusing to access data directory

I am trying to fix an OwnCloud sever. I am stuck since a day, and I am starting to despair. Owncloud (set up on arch linux) says: Data directory ( /data/ocdata) is invalid Please check that the data ...
0
votes
1answer
103 views

Connecting to MSSQL db (PDO, FreeTDS, ODBC)

I have an Ubuntu 12.04 server and I'm trying to establish a connection to a MSSQL database. I've managed to connect using tsql and isql, but osql doesn't work and connecting with PHP using PDO also ...
-1
votes
0answers
6 views

how to compile php5apache2_2.dll [on hold]

I have compiled Apache 2.2 then compiled php5.3 with VC++9. I wish to run php5.3 as a module in the Apache which I compiled. Apache is running at port 80 but I can't configure httpd.conf because I ...
1
vote
1answer
49 views

error: incomplete chunked encoding in php scripts

Trying to run some php scripts on a new shared server account, the scripts constantly hang and timeout with no error messages. Only when running the scripts in Chrome with the web developer console up ...
2
votes
1answer
17 views

My browser showing the code instead running the php code [on hold]

I wanted to upgrade my PHP from PHP 5.2 to PHP 5.6 but counter an error and so I rolled back to the previous version. Now when I try to access my localhost website is displays RAW code rather than ...
1
vote
1answer
3k views

umask for www-data user running PHP on Ubuntu

Setting up a new webserver in Ubuntu 14.04 and trying to wrangle file permissions for PHP generated files. By default, all the directories and files in /var/www are owned/grouped to www-admin. ...
4
votes
1answer
980 views

Nginx + PHP-FPM produce 502 bad gateway instead of fatal error?

I'm currently testing Symfony2 with Nginx and PHP-FPM. I also use Xdebug. Symfony2 comes with a Demo bundle, I wanted to test the new handling of fatal errors which comes with Symfony 2.2.0 by ...
1
vote
2answers
1k views

Horrible PHP/MySQL Query Performance On Ubuntu Server 10.04

I just did a clear install of Ubuntu Server 10.04 with the standard LAMP config.. Then I made a small script to test insert speeds into a table with 3 columns. When I run the script on any of my ...
0
votes
1answer
2k views

Error 101 (net::ERR_CONNECTION_RESET): The connection was reset.(while selecting multiple columns)

am using apache 2.2.i have written this code when am trying to run it my browser is failing to run it ,it's showing This webpage is not available The connection to localhost was interrupted. Error ...
1
vote
3answers
6k views

pecl_http extension not loading

For some reason pecl_http extension is not showing up in my test.php file with contains: <?php phpinfo(); ?> I just installed pecl_http using: pecl install pecl_http The install was ...
7
votes
3answers
4k views

Php pdo_dblib - cannot find/unable to load freetds

Self-hosted box, RHEL 6 PHP 5.3.3 PDO installed freetds installed pdo_dblib - so far no luck installing My goal is to use PDO with sybase. Attempting to install pdo_dblib from the appropriate ...
0
votes
0answers
12 views

Multiple webservers using PHP files stored on only one server?

Is it possible to have multiple webserver nodes that are balanced by a load balancer use PHP files stored elsewhere on the local network? Right now, I have two nodes and static content (uploads, file ...
0
votes
1answer
31 views

Cron job with PHP script doesn't work properly

One of my customers have PHP script which loads cvs file. When he execute this script via WWW it works properly - logs of loaded data are stored in /var/php/CLIENT/loaded.log. But when i try to ...
0
votes
2answers
27 views

mod_rewrite gives 404 error

I'm making a CMS and trying to convert post links to pretty ones like so: Original Link: http://localhost/index.php?id=13&category=Uncategorized&title=just-a-link Converted Link: ...
0
votes
0answers
13 views

PHP Cannot Write to Directory the Process User Owns (Fedora LEMP)

I am having a permission issue with PHP running on a Fedora 22 LEMP install. PHP cannot write to a directory owned by user 'nginx' in the group 'nginx' with permissions of '744'. The PHP FPM socket ...
2
votes
1answer
294 views

PHP eats a lot of memory on IIS

I just transferred one site from Linux to Windows and I'm getting strange fatal error messages. My Linux PHP had a 256MB memory limit and never had a single "out of memory" fatal error. Now on IIS I ...
0
votes
1answer
31 views

httpd error log “Error: Document has not the mandatory ending %EOF”

The company I work for recently outsourced a website rebuild, and along with it came a CMS. Despite my lack of expertise, I am the nominated server expert. Go Figure. Anyway, when trying to ...
0
votes
0answers
18 views

After install mod_security and mod_evasive, php not working

I followed this tutorial ( tutorial.centos.com.my/?p=69 ) and got success to install mod_security and mod_evasive. But php does not run, displays the code in the browser. Insert an index.php file in ...
4
votes
2answers
1k views

Apache/2.2.20 (Ubuntu 11.10) gzip compression won't work on php pages, content is chunked

I'm running into a problem with a new production server whereto I'm transferring projects. The HTML output of the PHP applications isn't compressed by the Apache mod_deflate module. Other resources, ...
-1
votes
1answer
13 views

php.ini 500 error when register_globals = On

i am using PHP Version 5.4.44 and have a setting in my php.ini as register_globals = Off i am trying to set it as register_globals = On but it is not working and through me an error as 500 ...
0
votes
0answers
13 views

Different caches based on cookie for same URL on Varnish

I have a PHP code that returns different output based on a request cookie value. When Varnish is disabled all works great, but with Varnish the cached page is one only and doesn't respect the ...
1
vote
2answers
1k views

How to install php cli with pnctl alongside Zend Server

I have Zend Server CE 5.6 with PHP 5.2 running on Ubuntu 11.10. Now the need has arisen to run a command line PHP script that uses PHP's pnctl functionality. First of all, I had no PHP command line ...
1
vote
0answers
18 views

Nginx can't speak with uwsgi (prematurely closed connection)

What I'm missing in my nginx/uwsgi/php-embed configuration? rpm -qa|grep php php-cli-5.4.16-36.el7_1.x86_64 php-xml-5.4.16-36.el7_1.x86_64 php-devel-5.4.16-36.el7_1.x86_64 ...
1
vote
0answers
55 views

Installing Imagemagick on CENTOS 6.7 x86_64 plus all dependencies

First off I need to mentioned that working with servers is not my specialty and it is new to me. I have followed various tutorials and examples but keep running into dependency issues. As I understand ...
0
votes
0answers
22 views

Apache Failure on Centos 7 not starting

hellau everyone, i have a problem, that i cant resolve alone, so i need your help. i have installed on a centos 7 apache when im asking for the status of the service (systemctl status httpd) so i ...
0
votes
1answer
29 views

“Memcache can't connect, connection refused (111)”?

First of all... I must say, I don't know much about servers. I'm the kind of php developer that don't use command lines very often. I'm very uncomfortable in the Terminal. However, I'm learning. I'm ...
-1
votes
0answers
8 views

Configure Horde in cpanel [on hold]

I have an admin panel running over c-panel server. Now i wish to configure mail services(IMAP) over it but i am facing some issues, i am completely new to this mail service part, so would appreciate ...
-4
votes
0answers
16 views

LEMP Setup on CentOS at DigitalOcean [on hold]

I'm following this tutorial. I got some issues start from step four: Configure Nginx to Process PHP Pages. After I typed this $ sudo vi /etc/nginx/conf.d/default.conf. I can't find server { listen ...
-2
votes
0answers
14 views

how to make php scripts executable instead of downloadable using nginx

Recently I set up a virtual machine through vagrant and I'm using nginx as a web server. The OS I'm using for the VM is Ubuntu Linux 12.04. The problem is that any script I write in PHP gets ...
0
votes
2answers
24 views

Optimizing Apache + PHP 5

I have a dedicated Ubuntu box with a Plesk panel. My php files take a couple of seconds for the ttfb at random. Most requests are server lighting fast but after a couple of refreshes it waits very ...
0
votes
1answer
404 views

PHP session handler using redis not work

I was sets 3 servers : 192.168.7.147:6379 <-- redis server 192.168.7.162 <-- web server 1 (using phpredis, with local devdomain jttest.com ) 192.168.7.218 <-- web server 1 (using phpredis, ...
2
votes
1answer
979 views

Trying to install php-devel on AWS EC2 server to compile a PHP extension, but getting errors “httpd24 conflicts with httpd-2.2.27-1.3.amzn1.x86_64”

I'm trying to install php-devel on an AWS EC2 server so I can compile a PHP extension. But I get an conflits error. --> Processing Conflict: httpd24-2.4.10-1.59.amzn1.x86_64 conflicts httpd < ...
1
vote
1answer
2k views

Red Hat 6 connect to MS SQL server 2005 using freetds; pdo_dblib and php

I'm having a problem connecting to my Microsoft SQL Server 2005 from a Red Hat box using freetds. My end goal is to be able to connect using php's PDO, but I don't appear to be able to connect when ...
1
vote
0answers
24 views

How to install PHP xdiff extension on Debian?

I am trying to install the PHP xdiff extension on Debian with Apache 2 and PHP Version 5.4.44, but I can't get it working. I tried the following pecl install xdiff But I got errors: […] checking ...
1
vote
0answers
13 views

Use different client IPs with mod_rewrite and mod_remoteip

I have a reverse proxy that my site points to to help with DDoS protection. I have mod_rewrite set to use a specific header provided by the reverse proxy in order to pull the actual client IPs instead ...
0
votes
2answers
23 views

ImageMagick suddenly stopped working on several of our servers

Overnight, the PECL ImageMagick extension suddenly stopped working on several of our servers. The error message displayed was as follows: PHP Warning: PHP Startup: Unable to load dynamic library ...
0
votes
3answers
319 views

Public and Private keys incorrect for user

I've followed this tutorial (which worked for me on several VPS's) to configure a secure way to install and update themes and plugins in Wordpress. Basically: sudo adduser wp-user cd /var/www sudo ...
2
votes
1answer
642 views

Wordpress SFTP auto update issues

I have run into an issue with WordPress and ssh. Essentially,I am trying to enable auto updating with Wordpress over SFTP. I have followed the directions on This thead on DigitalOcean.com up I have ...
0
votes
5answers
3k views

nginx: php-fastcgi running but php files not executing

I have recently set up a nginx server with PHP running as FastCGI process. The server is running with HTML files however PHP files are downloading instead of displaying and PHP code is not processed. ...
0
votes
1answer
35 views

phpinfo showing HTTP_ALLOWCOOKIES set to NO - how to change?

We have a dev and live server that were seemingly built identically. However the live server phpinfo() page shows the following in the "Apache Environment" section HTTP_ALLOWCOOKIES NO Don't see ...
0
votes
1answer
1k views

Failed upgrade of PHP on Ubunutu 12.04, error: Sub-process /usr/bin/dpkg returned an error code (1)

I just tried to upgrade my version of PHP on Ubuntu 12.04 and now I have messed it up. First I did this: sudo add-apt-repository ppa:ondrej/php5-oldstable Then I did this: sudo apt-get update ...
0
votes
1answer
33 views

How can I access comand line like cmd.exe on my dedicated linux server? [closed]

I have installed the ffmpeg by composer in my local server(windows7) and everything is working good now the site is live on internet (server CENTOS 6.7 x86_64 kvm) and I need to install it to the ...
1
vote
1answer
1k views

putting folders above public_html in a shared hosting environment

On my local environment, the following settings work in my index.php file: $system_path = '../../ci/system/'; $application_folder = '../../ci/application'; My folder structure looks like this: -ci ...
1
vote
1answer
1k views

Getting 502 bad gateway after updating php to 5.5

On my ubuntu 12.10 server I upgraded php to 5.5. After getting 502 errors on my wordpress site I did some googling and discovered I need to change my nginx configs to match the passing of php scripts ...
0
votes
1answer
2k views

Configure php mail() on Windows/IIS

I have a Windows Server 2003 / IIS web server running various application servers, and ended up begrudgingly adding PHP into the mix. I know Win/IIS isn't the ideal environment for PHP, but it's what ...
0
votes
0answers
14 views

Random/Intermittent PHP require_once error

I have an unusual problem that is hard to nail down to a specific cause. I'm running a WordPress website on PHP 5.6, IIS 8.5 and Windows Server 2012 RT2 In the past and more frequently this week, ...
0
votes
0answers
6 views

Safe PHP prevent overriding php.ini extension, how to exclude a user?

In WHM > Easyapache, there is this PHP extension : Safe PHP CGI - prevents users from overriding system php.ini Screenshot ...
0
votes
1answer
60 views

Apache and php5 fail on ubuntu server

I update a PHP 5.5.28-1+deb.sury.org~precise+1 (cli) and have apache Apache/2.2.22 but when run a restart apache2 apache2: Syntax error on line 216 of /etc/apache2/apache2.conf: Syntax error on ...
0
votes
1answer
9 views

Does Opcache fix eAccelerator's and XCache's memory leak bugs?

Both XCache and eAccelerator have a memory leak bug which will leak memory if you include the same file tens of times in a loop, even though the code executed in the file does not use up any memory at ...