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

1
vote
0answers
30 views

httpd processes cpu spike to 100%+ every xx seconds

My first post, unfortunately due to an issue on my dedicated (Linux Centos 6) server running some personal and one commercial website. Server version: Apache/2.4.18 (Unix) Server built: Mar 7 2016 ...
1
vote
0answers
143 views

Using PHPMailer on Hostgator (timeout when try to login into SMTP server)

solved: The problem was that to use the service through hostgator, for some reason the user must log in using main dsn name and not the SMTP domain name. I was using the simple PHP mail() function to ...
1
vote
0answers
24 views

Reducing inodes usage on vServer

On my Linux vServer the inodes are limited (maximum is 250k). I found that an Yii2 (PHP, MySQL, composer) installation requires quite a lot of inodes. The number of inodes is roughly the number of ...
1
vote
0answers
21 views

Copy PHP website to virtual folder under IIS 8.5

I would like to make an existing PHP Website (Apache) run on a virtual folder under IIS 8.5. With the help of some nice online tools I translated the following .htaccess content: <IfModule ...
1
vote
0answers
27 views

configure exim4 on ubuntu with let's encrypt

I need to send mail for a website of mine using PHP mail(). I wanted to make sure this mail is sent encrypted. I already have exim4 sending mail via PHP, but want to make sure it's using a ...
1
vote
0answers
24 views

Handling errors with php on nginx reverse proxy, and mail response to admins

Is there a way to access the server response from php once Nginx detects an error, and mail the server response to the admins while at the same time show a custom error page to the visitor? Currently ...
1
vote
0answers
30 views

Warning: mysql_connect(): Host 'ip-X-X-X-X.ec2.internal' is blocked because of many connection errors

I'm using following system: $ cat /etc/redhat-release Red Hat Enterprise Linux Server release 7.1 (Maipo) $ uname -a Linux ip-X-X-X-X.ec2.internal 3.10.0-229.14.1.el7.x86_64 #1 SMP Tue Aug 25 ...
1
vote
0answers
64 views

migrating htaccess from Apache to nginx

I'm trying to start using Homestead for my non-Laravel projects (legacy) and I managed to install box 0.3.3 successfully by cloning laravel/homestead 2.2.1 (with PHP 5.6.15). Now my problem is due to ...
1
vote
0answers
53 views

Getting 404 Not Found while PHP works in background - Nginx

I have noticed that I get 404 - Not Found when calling a .php file even if the script works in background. The php file downloads a long Json and populates a db until I close the window. I am using ...
1
vote
0answers
47 views

PHP page refuses to appear despite checking php-fpm, SELinux, and nginx

Problem I have a small web server that hosts a small PHP page that performs a very small function. I used to host this on another machine. I move the website to a new machine with a different ...
1
vote
0answers
116 views

Enable XSendFile on Apache on Mac OS X 10.10 - “Invalid command 'XSendFile'”

I have compiled and installed sendfile 0.12 on our mac web server. The module is enabled in the httpd.conf file, as below: LoadModule xsendfile_module libexec/apache2/mod_xsendfile.so I've ...
1
vote
0answers
14 views

Apache2 mod-fcgi seperate users for two applications

I try to configure my apache like this: https://www.howtoforge.com/how-to-set-up-apache2-with-mod_fcgid-and-php5-on-ubuntu-8.10 The point is that I want to have an user for typo3 and one for ...
1
vote
0answers
39 views

Apache using all cpu and cause OOM killer

I have an Xen-VPS CentOS 6.5 64 Bit with 2GB memory and 4 GB Ram, I have application with php, in my application lot of pages need to image which generated by php_imagick extension, here is apache ...
1
vote
0answers
40 views

FastCGI and tmpfs

I read some articles about using tmpfs for /tmp and PHP sessions directories for better performance, and it sounds interesting. I'm using Centos 6 server with LAMP stack (+FastCGI) and in my ...
1
vote
0answers
49 views

php-fpm error log is trucated

I'm setting up test environment where I have nginx and php-fpm on centos 7. I have successfully setup everything and I can run php code. This is my configuration: nginx version: nginx/1.9.9 ...
1
vote
0answers
23 views

sending back rewrote url without forcing a new request

The user of my application issue commands (create new post, delete comment etc.) via links with nonce parameter. As this is transported via GET the URL bar contains this technical detail. I want to ...
1
vote
0answers
84 views

CentOS PHP upgraded, now downloads all pages

I had to upgrade PHP to 5.6 to get access to a new function for locales and translation. I removed the old PHP and added the new PHP from the Remi repo as specified here. I restarted Apache and now ...
1
vote
0answers
78 views

PHP compiled with zlib, but doesn't appear in phpinfo()

I have a program that requires PHP to be configured --with-zlib, so I re-ran ./configure, make and sudo make install PHP 5.6.15 on my Ubuntu 14.04 server. However, the program still says that PHP ...
1
vote
0answers
141 views

Hosting a php website in windows server 2008 with apache

I have an asp.net website hosted in IIS 7 in windows server 2008 which is running perfectly and is hosted on local server. I have only purchase the domain name without the hosting cuz the site is ...
1
vote
0answers
39 views

handle 2k image request a second with nginx

We have made an app that displays dynamic images. We are trying to handle a load of 2k image request a second with nginx. The size of the image is about 0.13 mb and we are using php with this code to ...
1
vote
0answers
91 views

Installing an intermediate cert on Debian 8 for curl/openssl connections.

I am trying to contact a url via php's stream_socket_client() command which is failing with no error code or msg. Does this use openssl, curl or something else? The site uses https and works fine from ...
1
vote
0answers
84 views

php-fpm pool processes taking 250MB each

My centos 6.7 server has only my php and mysql based low-traffic websites (total around 3000 page views per day for all websites) using nginx web server and virtualmin (no wordpress or external ...
1
vote
0answers
19 views

IIS server slows down with only a few tens of requests

I'm using IIS 7.5 with PHP and I'm having troubles with my application, it is VERY slow and it can take more than 30 seconds to respond sometimes. I believe this is due to some kind of queue of ...
1
vote
0answers
139 views

Symfony No Access to Cache - Red Hat 7

I'm running amazon EC2 VPC, normaly use Centos and I have no problem with it, but I have tried Red Hat Enterprise Linux Server release 7.1, and I have installed everything from scratch. I'm using ...
1
vote
0answers
397 views

nginx: An existing connection was forcibly closed by the remote host

I am running nginx on Windows Server 2008 R2 and it seems to be crashing, it also uses php-cgi with it and the php-cgi is part of the problem. After about 30 seconds of being on the page php-cgi ...
1
vote
0answers
108 views

Client denied by server configuration - IP listed is server's own IP

Something odd is happening on my server. The Apache log shows lots of requests from the server's own IP address. I do not suspect the server is compromised. I suspect some PHP code is malfunctioning ...
1
vote
0answers
152 views

elFinder with NFS: Unable to upload “image.jpg”

I have a NFS mount with permissions 770 on user:group "nfsbackup:nfsbackuo" with www-data as member of group nfsbackup. This is my server connector configuration in PHP, using CodeIgniter 2, working: ...
1
vote
0answers
95 views

IIS server: directory not writable via symbolic link compared to directory junction (for only the first user)

We have the following setup for a webserver: Windows Server 2008 R2 Standard, IIS 7.5.7600.16385, PHP 5.3.28, the HMVC framework we use is Kohana. Kohana needs a cache directory to be writable in ...
1
vote
0answers
122 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
50 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 ...
1
vote
0answers
106 views

Apache authentication with PHP file

Is it possible to have authentication in Apache (or for example Nginx/HAProxy/etc) with a PHP file? What I want is the following: User visits a portal (index.php). Apache will look if index.php ...
1
vote
0answers
155 views

Apache downloading PHP files instead of rendering them after uddate form php 5.3.3 to 5.4

I have some scripts that need to use a newer version of PHP, Im running Debian 6 which has PHP 5.3.3 support, I found I could install php 5.4 using https://www.dotdeb.org/instructions/ packages. This ...
1
vote
0answers
240 views

ERROR 500 - Internal server error on PHP Sites

I am running IIS7.5 on Windows Server 2008 R2 SP1. Over a month ago I did the generic installation of PHP (v5.5.11), MySQL and the phpMyAdmin interface and it all worked great. The other day I started ...
1
vote
0answers
15 views

Anonymous Authentication Identity Win 2012 r2 security

I have a web app that uses PHP on the back-end, and the PHP executes powershell scripts to reset AD passwords through system calls. EX: shell_exec("powershell.exe -file ...
1
vote
0answers
75 views

Environment variables for PHP applications

A PHP application requires me to set several environment variables with things like database credentials, SMTP server, etc. Examples of variables include: ...
1
vote
0answers
345 views

Why do I get an OpenSSL Error when connecting PHPMyAdmin through SSL?

I'm running PHP 5.6.11 on Apache 2.2 with OpenSSL 1.0.1 on Ubuntu 12. I've sucessfully setup SSL in Apache and MySQL. Now I want to set up a PHPMyAdmin and connect it through SSL. I don't really need ...
1
vote
0answers
46 views

PHP remote network location not appearing

I'm having some difficulty getting PHP (or more specifically, Python via PHP) to recognize an important network location. I'm trying to make a simple website which will allow users to easily execute ...
1
vote
0answers
596 views

How to override “Content-Type” header with PHP script on Nginx

I have some php script which returns jpeg image(1x1 pixel) with content type "image/jpeg": // return image $image_name = 'img/pixel.jpg'; $image = fopen($image_name, 'rb'); header('Content-Length: ' ...
1
vote
0answers
90 views

Why won't php5-fpm start?

I've just installed php-fpm 5.6.8 but it won't start - start php5-fpm gives me a Job failed to start message. I've found several people with simalar problems, but the none of the answers seem to work ...
1
vote
0answers
17 views

Php load balancing questions

I have a custom written ecommerce app that runs on it's own dedicated server. All of it's constants (such as database connections, file paths etc..) are defined in a single _constants.php file. The ...
1
vote
0answers
122 views

Redis Sentinel false failovers

I'm having problems with Redis. I have 3 servers. Each server have 10 Redises working on different port. Also, each server has one Sentinel instance. Also, there are 5 application servers. Each ...
1
vote
0answers
380 views

Installing php-mysql on centos 6.5 fails due to conflicts when percona client 5.5 also installed

Some background: I'm writing a Chef cookbook to set up a LNMP stack for local development. It requires the php-mysql library for PHP 5.4 (using the php package). We're using the yum-remi repository ...
1
vote
0answers
37 views

I'm unable to write unicode on PHP-CLI on the server

I specifically cannot add åäö to php-cli on the ubuntu server. I can write it in the terminal outside of the php-cli, I can create a file test.php and manually write: <?php echo "åäö"; And ...
1
vote
0answers
100 views

FastCGI for DocumentRoot only

I'm trying to set up HHVM for one of my websites. It is running on Apache 2.4, Ubuntu 14.04. I apologize for not being the most advanced system administrator, I am more in the software engineering end ...
1
vote
0answers
350 views

php session tracking cookies (multiple session handling on same domain)

I have 2 applications, both have password based login, database,etc., the passwords are different, databases are different, applications present are in different folders. Log into the first ...
1
vote
0answers
70 views

Possible have 2 php.ini file or 2 extension_dir in php.ini?

i got Fatal error: Class 'mysqli' not found in C:\apache2triad\htdocs\index.php on line 8 error. I checked php.ini file and saw extension=php_mysql.dll is uncommented.Everything is normal. But in ...
1
vote
0answers
40 views

X3250 Server: stuck at firmware screen

The server is initialize, then it is stuck at the IBM System X Server Firmware screen (before F1, F12 appears, etc). You can see in the attached image. ...
1
vote
0answers
129 views

PHPPGAdmin on Windows - authenticate users against Active Directory

I installed PHP, Apache 2.4, and PostgreSQL 9.4.1 on Windows machine which belongs to Windows domain. My pg_hba.conf: hostnossl all postgres 127.0.0.1/32 md5 hostnossl all all ...
1
vote
0answers
271 views

Max memory for HHVM instance on vServer

Im tried hhvm on my vServer and have problems with the memory used. The performance is great, but the used memory consumption is horrible. I have a vServer with min 4GB and max 8GB memory and hhvm ...
1
vote
0answers
108 views

How to prevent Opera Turbo compression

I have a site (running Apache and PHP) that allows users to download JPEGs. The user clicks once on a link to download the JPEG, the same as when you download a zip file (not using right-click ...