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

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 ...
-2
votes
0answers
18 views

restore database in mysql without using query

Recently I formatted my computer. Unfortunately I forgot to get backups of my MySQL databases. But I have my previous xampp folder with me. To restore my previous database i copied my previous ...
0
votes
2answers
1k views

How to configure sendmail properly with PHP on EC2 (no SES)?

I have been struggling with sendmail for couple of days with no luck. I am trying to setup relay host, after following the answers in this question ...
2
votes
1answer
79 views

Is it possible to connect to MySQL from PHP using the old password encryption protocol?

I am working on a front-end project with a legacy system. I have to access a MySQL 5.6.25 database, which is still using the old pre-4.1 password encryption protocol. In particular I have to write a ...
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. ...
48
votes
7answers
108k views

How do you restart php-fpm?

I need to reload my php.ini and there's nothing in the help dialog about restarting it.
-1
votes
0answers
11 views

Apache can't find QueXF in my installation

I am interested in installing QueXF on Ubuntu (Desktop, sadly) 15.04 64-bit. I followed these instructions, except with the newest versions of QueXF and its companions. I got to the point where I was ...
0
votes
0answers
4 views

read from memcache in Yii when put was from node [migrated]

We have a Yii application. And we use memcache. In our system node.js writes to cache and php reads from cache. But I get the following error in php: MemcachePool::get(): Failed to uncompress data ...
0
votes
3answers
2k views

Cannot perform a PECL installation

I have been trying to do a few PECL installations, but all of them return the same type of error. Something related to timezones? Im running RedHat x86_64 es5. Attempting to install geoip-1.0.7: ...
0
votes
3answers
12k views

HTTP Error: 413 Request Entity Too Large

What I have: I have an iPhone app that sends HTTP POST requests (XML format) to a web service written in PHP. This is on a hosted virtual private server so I can edit httpd.conf and other ...
0
votes
1answer
38 views

Nginx rewrite downloads php instead of running it

I have the following code to redirect users visiting login.php to another page: http { .... geo $bad_user { default 0; 1.2.3.4/32 1; 4.3.2.1/32 1; } server { .... location = /login.php { if ...
3
votes
2answers
2k views

Equivalent of PHP setlocale in an APACHE config file

I need to display a date in french locale. A solution is to use setlocale(LC_TIME, 'fr_FR'); But I'm looking to set the locale directly in the configuration of my apache server. In the ...
0
votes
1answer
66 views

Installing php 5.5+ on Centos 6 alongside 5.3

How can I install PHP 5.5+ alongside php 5.3 (or 5.4 with the EPEL repository) on a Centos 6 server? I don't want to remove or supersede the default version, but I would like to have both versions ...
1
vote
1answer
675 views

Apache SSL redirect loop [duplicate]

We are trying to redirect our site from http to https only. Everything we have tried in .htaccess has resulted in a redirect loop. If we manually type the "https://" in front of the url, our page ...
0
votes
0answers
8 views

php5-embed does not load extensions

While setting up php on my Ubuntu server (using php5-embed under uwsgi/nginx), I noticed curl.so was not being loaded. The file /etc/php5/embed/conf.d/20-curl.ini exists and contains ...
0
votes
2answers
97 views

How can I check who created a file on server?

Looking through server logs I've noticed some mailicious PHP files hidden among WP and Joomla folders and I'm wondering how they got on the server. Is there a way to review that? It's a shared hosting ...
0
votes
2answers
305 views

Why my emails being block by yahoo and hotmail?

I received a lot of complaints from my users, they say that they can't find the activation email. I didn't do any blast emails or send spam emails. But I do send over 1000 emails daily, that's because ...
16
votes
3answers
38k 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 ...
1
vote
2answers
86 views

Can't get apache working after installing nginx & hhvm

I had Apache2 running on my local ubuntu machine and I installed nginx & hhvm on my local for debugging purposes by following this tutorial. I would now like to switch back to Apache2 as I had it ...
0
votes
0answers
21 views

Apache SSO (mod_sspi)

I am trying to implement an auto login function into my mediawiki by using their windows credentials. I am using Apache Server (V2.2). I have implemented the Auth remoteuser extension and has ...
0
votes
0answers
20 views

How can I su -l user -p password from a scripting language running by apache server? [duplicate]

I ahve been trying to run crontab by a PHP script that is run by my apache web server. The user is apache and I have found out by running shell_exec that apache cannot run crontab: $cmd='crontab ...
0
votes
1answer
1k views

php fopen error (failed to open stream: Permission denied)

I have a php script on a Windows Server 2008 box (IIS 7) that is run periodically to download a remote XML file and store it on the server. This script (which previously used to run successfully), is ...
0
votes
0answers
35 views

nginx downloads .php files - error configured

I'm trying to follow this tutorial in order to create an amazon machine with nginx and php: http://stale.coffee/ec2-micro-instance-adventure-nginx-php-mysql.html All good, I opted to use ...
0
votes
1answer
127 views

how to remove .php extension using htaccess on godaddy linux hosting

How to remove .php extension using htaccess file. I have tried many codes (which I found on internet but not got success. An Internal server error is regularly showing. I am using Godaddy Linux ...
0
votes
0answers
17 views

How do I set permissions on directory(folder) on IIS 6.0?

I am trying to set permissions on uploads folder. I have two projects - an original project and a pilot project. I am trying to upload images from php code. It works for me for the original project ...
1
vote
1answer
16 views

Automate SVN UP process on multiple application servers

I have multiple PHP application servers having their own svn checkout copy. Now when i need to deploy anything i have to do svn up on all servers one by one. Is there any way to automate this process ...
0
votes
0answers
41 views

IIS 7.5 - PHP environment variables at the site-level

I have two versions of the same application (demo & staging) running on the same IIS server. The application relies on an environment variable via getenv("APP_ENV") to set configuration ...
2
votes
1answer
58 views

Reading 65k rows hangs PHP/MySQL

I am developing a PHP application that processes IP adresses. I am working with mysql tables containing up to 4 billion rows. I have a script that currently needs to fetch 65536 adresses from this ...
0
votes
0answers
22 views

Nginx User Directories

I am trying to configure nginx so that when going to http://example.com/~user/ it will load files from the /home/~user/www/ directory. I have found a script that seems to work for .html files but ...
0
votes
2answers
68 views

nginx can't execute many requests

I have a question about nginx tune. I have an application which I want execute 200 times every second. I created bash file and used wget with bqO switch for execute. But it has a problem. When the ...
0
votes
1answer
21 views

PHP 502 Server Error: Problems with code or server?

Not sure if this is the right forum, but I'm hoping someone can help me. We had a web app running on our web server for a while now. Suddenly it stopped working and displays a 502 error - Web server ...
2
votes
1answer
28 views

PHP/FastCgi - Which is the threshold over which to use nginx instead of apache

I'm a PHP developer, I have always developed on a LAMP environment and it's all gone well 'til now. At the moment, I am developing a PHP web application, still on apache and without the use of any ...
0
votes
1answer
29 views

RHEL and PHP versions

RHEL 7.1 ships with PHP 5.4 and that version is going out of support soon. Based on historical trends, will RHEL upgrade to a new major version of PHP? UPDATE RHEL 7.1 - PHP 5.4.16 RHEL 7.0 - PHP ...
4
votes
2answers
1k 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 ...
0
votes
1answer
19 views

Block/Prevent Adminer - Apache [duplicate]

I found out that if someone was able to hack any FTP account on my server and upload Adminer they could alter the database. I tried Google'ing a way to block or prevent Adminer from working, but got ...
7
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
1answer
21 views

Exim4 intercept all outgoing mail

I have a LAMP stack set up on a Debian 8 (jessie) machine. I'm trying to find a way of intercepting all outgoing mail sent by PHP (through sendmail) and instead of sending it out, deliver it to my ...
0
votes
0answers
27 views

What caused apache to crash?

I have a high load server using php/apache/APC working fine for months. In the last 2 days it has crashed midday. if I restart apache it works so the problem is probably in the apache/php/apc stack. ...
1
vote
2answers
35 views

How do I change the username nginx/PHP creates files as

Is there a way in which nginx/php can be configured so it creates files with a specific user. For example when a drupal/wordpress site uploads a file the user is assigned like: john:www-data ...
1
vote
2answers
47 views

How to verify if my postfix uses really TLS to send outgoing mails?

I successfully installed Postfix on my VPS. I would like to send encrypted email. I installed all certificates and private keys and set my conf file: smtpd_tls_key_file = <path to my private ...
1
vote
5answers
7k views

PHP short_open_tag Won't Enable (CentOS 6)

I'm setting up an Apache2, PHP 5.3.3 server running on CentOS 6. My web application uses the short tags <? and <?=. I can't seem to get the short tags enabled. When I run phpinfo() I see ...
2
votes
3answers
4k 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 ...
0
votes
1answer
38 views

Configuring PHP MySql extension

I am trying to load a MySql extension for PHP development. Running <?php phpinfo(); ?> I can see that the MySql extension is not loaded. This is also apparent when running a script that uses ...
0
votes
0answers
44 views

Sub Domain Not Working on Nginx server with Apache Handling PHP

I have a domain setup and it is working. However I cannot get any sub domains working. I am trying to setup a sub domain right now for phpmyadmin. I am using Nginx as a reverse proxy for Apache with ...
5
votes
1answer
139 views

Odd performance fluctation with php-fpm and nginx

I'm running a load test against a web service. It's a php application running on php-fpm and nginx, with fastcgi. There is a MySQL backend being used for small reads only. Invariably, I'm seeing a ...
0
votes
0answers
43 views

Upgrade PHP 5.6 using symlink on Ubuntu

I'm trying to upgrade to PHP 5.6 from PHP 5.4.34-1+deb.sury.org~lucid+1 on Ubuntu 10.04.4. I've tried upgrading through adding the repo and upgrading via "apt-get install php5" which installs the ...
-1
votes
1answer
361 views

PHP Application needs mbstring library - can't install on EC2

A library on my ecommerce site requires the PHP mbstring library. Seems simple, just run: yum install php-mbstring but I get: [ec2-user@ip-172-0-0-0 modules]$ sudo yum install php-mbstring Loaded ...
1
vote
2answers
208 views

memcached append() php ubuntu - bad protocol

I am running ubuntu gutsy(7.1) , php5 and I am trying to get memcached running locally. I installed everything as per the docs: memcached daemon, php PECL extension, libevent, etc. But now I can ...
1
vote
1answer
1k views

Problems installing php5 from source in Ubuntu

(Originally asked here: http://stackoverflow.com/questions/14977119/problems-installing-php5-from-source-in-ubuntu) I've been trying to install php5 for a while. I'm using. Ubuntu 12.10 Apache ...
0
votes
0answers
66 views

Match subURIs to index.php file on Apache Passenger

I have the following configuration within a VirtualHost block: #Passenger config DocumentRoot /home/me/railsapp/public <Directory /home/me/railsapp/public> AllowOverride all Options ...