Skip to main content

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.

1,969 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
5 votes
1 answer
2k views

HSTS header not being sent though rule is present and mod_headers is enabled

We enabled HSTS in httpd.conf in the Virtual Host handling port 443. We tried with and without the <IfModule mod_headers.c>: <IfModule mod_headers.c> Header set Strict-Transport-...
user avatar
4 votes
0 answers
1k views

Ways to integrate incoming and outgoing mail webhook in Postfix

I am trying to build an application in PHP which will be able to create a Ticket whenever a new mail arrives on a specific account and whenever a reply is done for that email, the application will ...
Pankaj Jha's user avatar
4 votes
0 answers
4k views

Why Does PHP-FPM sometimes get stuck serving old files?

I have some very simple Ubuntu server setups with NGINX passing requests for PHP files via PHP-FPM. However, on two different servers, I've had the situation where http requests from browsers are ...
Ambulare's user avatar
  • 141
4 votes
1 answer
3k views

Nginx: config set up to make extensionless php pages work

I am trying to set up my first website with nginx and I cannot seem to make extensionless php pages to work. I would like my pages like /aboutme.php to appear as /aboutme or I would like to just ...
Carol's user avatar
  • 41
4 votes
5 answers
6k views

Rewrite rule for nginx (Opencart)

Opencart has this URL structure: http://example.com/index.php?route=common/home http://example.com/index.php?route=account/register http://example.com/index.php?route=checkout/cart http://example.com/...
3br4him's user avatar
  • 91
4 votes
0 answers
232 views

SQL server and PHP restart

i have Apache/PHP running on a server running windows 7 with SQL server 2008 r2 running on windows Server 2008. When SQL is restarted Apache/php will no longer connect to SQL once it is back up ...
Josh Kirkpatrick's user avatar
4 votes
1 answer
1k views

Absolute/relative file paths affecting server load?

I was told by my hosting provider's technical people that I should be using relative file paths (/home/index.php) instead of absolute paths (http://www.example.com/index.php) to "reduce server ...
user avatar
4 votes
0 answers
1k views

Strange Apache/PHP&Perl behavior—error (70007)

I’m dealing with a particular strange situation: I have two Linux machines, one with Scientific Linux (v4.8) and one with CentOS (v6.2). On the SL machine I have a XAMPP distribution with Apache 2.2.9,...
Alex's user avatar
  • 217
4 votes
1 answer
2k views

php-fpm keeps locking up

For some reason, php-fpm keeps locking up and/or hanging. It works for a little while, and then it will randomly just 'hang' for a long time upon trying to load a webpage. There's absolutely nothing ...
Rob's user avatar
  • 2,453
4 votes
1 answer
268 views

Problems restarting Apache - Curl related

I'm having a problem compiling LAMP, I have everything compiled and working, but when I try to restart apache I get the following error: seg fault or similar nasty error detected in the parent ...
Pablo's user avatar
  • 51
4 votes
0 answers
3k views

php-cgi.exe and/or php5.dll crashing - PHP 5.2.17, Win2k8 & IIS7

A specific part of my PHP script crashes randomly and I'm not sure why. The only difference on this page and the rest of the pages, is that I'm doing a PDO SQLSRV call. But 80% of the time there are ...
Slowfib's user avatar
  • 41
4 votes
2 answers
2k views

mod_headers not working for php + mod_fastcgi pages

I'm running PHP through mod_fastcgi & mod_suexec, and I added Header set X-UA-Compatible "IE=edge env=best-standards-support" to my .htaccess file. It works fine for static content, but the PHP ...
Eric's user avatar
  • 593
4 votes
1 answer
182 views

Apache rewrite works under FreeBSD, not under CentOS

I have 5 production servers which are running FreeBSD 9.2, but we are planning on transitioning to CentOS. Because of this, I am attempting to set up some virtual machines to emulate our production ...
Peter's user avatar
  • 133
4 votes
1 answer
27k views

Soap error - failed to load external entity

I have a PHP-script which uses SoapClient that connects to an API and runs methods. It works on all the different servers I have run it on previously but when I tried it on a server I get the error: ...
Marwzoor's user avatar
3 votes
0 answers
727 views

TCP retransmission inside of docker network

Just lately our server started experiencing increased CPU usage by the php(Symfony) and mysql processes. For quite some time we been trying to find the cause and we found out that we have big amount ...
Maarduk's user avatar
  • 133
3 votes
1 answer
496 views

Configuring mailiers in Phabricator

After a clean installation using the bitnami image I followed the instructions to set up the mailers. It looks like this: [ { "key": "stmp-mailer", "type": &...
danijepg's user avatar
3 votes
0 answers
1k views

Cannot delete php/sessions folder

I could really use some help. I have a Ubuntu 14.04.6 account with DigitalOcean and am encountering some errors related to lack of space. When I ssh into the account and do a tab-completion at the ...
TSGM's user avatar
  • 131
3 votes
0 answers
1k views

Apache/PHP: Internal server error. Untraceable! How is that even possible?

I have a Nextcloud server running NextCloudPi (NCP) on a Raspberry Pi 3. NCP is Raspbian/Apache2/PHP/MariaDB stack so to speak. It's run reliably for years. But recently my Nextcloud died! All it does ...
Bernd Wechner's user avatar
3 votes
0 answers
370 views

Downloading fails at random for our users from S3, need help figuring out what's wrong

We have a file sharing service where users can upload, share and download their files. We are using AWS S3 to store our files. We're facing an issue where small files download fine, but when files ...
Jahanzeb's user avatar
  • 131
3 votes
0 answers
627 views

Have apache run a script before handling request

I want to have Apache run a script every time it gets a request. To be clear I want apache to serve the actual file and just have this script called right before Apache handles the request (I have my ...
Dovid Bender's user avatar
3 votes
1 answer
790 views

Hosting multiple websites (Apache Virtual Hosts), Postfix settings for sending mail FROM those domains?

I am not sure that this was the right solution in the first place but I have Postfix up and running on my Ubuntu VPS with G-Suite using relayhost = [smtp.gmail.com]:587 Mail is delivering fine, ...
Jesse's user avatar
  • 31
3 votes
0 answers
755 views

php_value overrides with Apache using a front controller

I am trying to set specific server side value for virtual paths used to upload files. All my URLs are virtual and requested are dispatched by a front controller. I have the following config in my ...
Nicolas Bouvrette's user avatar
3 votes
0 answers
1k views

Nginx Http Secure Link Module not working

I am using nginx secure_link to prevent video from hotlink. If main server key match remote server key. The video will able to access/watch. Otherwise if user access link directly without md5 link ...
Edward Shiu's user avatar
3 votes
0 answers
3k views

Docker, Nginx and PHP7: ERROR 111 Connection refused while connecting to upstream

I run a NGINX-PHP7-COMPOSER image that works well but when using Slim Framework I had to change Nginx's default config to make the URL rewrites work. And now it show this error in the logs: 2017-...
Lazhar's user avatar
  • 131
3 votes
0 answers
279 views

How to harden nginx vhosts (hosting WordPress) from other users in hacked WP installs

Overview: I have a dozen or so WP installs hosted on an Ubuntu 14.04 LTS, w/ PHP 5.5.9 & Nginx 1.4.6. MySQL runs on alternate node, not on public network. Goal: To have directories & files ...
user2977468's user avatar
3 votes
0 answers
240 views

How to verify network quality before running important benchmarks?

I have multiple CentOS servers around the world. They all are running a PHP script that tests the latency of some services once per minute. The problem is that sometimes these servers have local ...
User45454's user avatar
3 votes
0 answers
1k views

Upgrade openssl in apache from source and set as default

I have upgraded the openssl from source to version OpenSSL 1.0.1s for Apache, which installed under /usr/local/ssl/bin/openssl, and change the symlink to point it into this new installation directory ...
Irk's user avatar
  • 171
3 votes
1 answer
4k views

tail /dev/stderr from errors within supervisord php cli script

To make this simple, I want to know if it's possible to access the STDERR like a channel. I don't want the data to log to a file and then tail the file because the amount of information that I want to ...
Jeff -More Active-'s user avatar
3 votes
0 answers
332 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 ...
Steve's user avatar
  • 203
3 votes
0 answers
2k 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 ...
Riemu's user avatar
  • 123
3 votes
0 answers
1k views

LDAP over TLS fails to connect, Schannel Alert 48

I am trying to use PHP to edit users in active directory through LDAP. My test machine is using a simple WAMP setup and is NOT connected to the windows domain. This machine can connect to LDAP on the ...
Redline025's user avatar
3 votes
1 answer
2k views

PHP version conflict in Amazon Linux EC2 instance

I've lunched a fresh instance from the AWS -> EC2 console panel. After that when I logged into the instance via SSH and executed the following line: (note I executed first the sudo yum update before ...
FR STAR's user avatar
  • 173
3 votes
0 answers
1k views

php generated css no output, net::ERR_INCOMPLETE_CHUNKED_ENCODING

I am running apache on an ubuntu installation. Several webapps are running on the same server. I installed a new app, which required the pdo-sqlite extension to be installed. Now my server is ...
Loopo's user avatar
  • 425
3 votes
0 answers
171 views

Tuning Amazon Linux worker tier

I have a worker tier that is using PHP process control (pcntl) functions to send multiple requests to the SNS service in parallel. My question is how best to tune MPM_PREFORK directives to get the ...
Mike Miller's user avatar
3 votes
0 answers
604 views

VirtualDocumentRoot and ProxyPassMatch

I have the following Apache configuration: ServerName localhost UseCanonicalName Off LogLevel debug <VirtualHost *:8080> ServerName _default_ VirtualDocumentRoot /Users/alex/Sites/...
AlexMax's user avatar
  • 543
3 votes
0 answers
474 views

HHVM RepoAuthoritative Unable to stat file

My magento installation is hosted on a VPS running CentOS, Nginx, MariaDB and HHVM, which works without any problem. However, I am now trying to pre-build the RepoAuthoritative file for my ...
Nils4526's user avatar
3 votes
1 answer
12k views

Zabbix PDF Report Generation

if any of you have an idea how to implement zabbix generate PDF reports? in forum I found some like this: https://www.zabbix.com/forum/showthread.php?t=24998 . I try implement this to my zabbix 2.2....
Mick's user avatar
  • 347
3 votes
1 answer
3k views

Enforce loading of php.ini files from current folder

My goal is to increase the maximum file size for uploads in WordPress. I have followed the steps on this SE answer and this tutorial (except the .htaccess part, because it's runnning nginx and AFAIK ...
That Brazilian Guy's user avatar
3 votes
1 answer
129 views

Nginx directory post

THere is a piece of legacy code I'm working on, I can't alter where it POSTs to so I just need to figure a way around it. THe bit of Javascript makes a post as follows - POST /authentication/login/ ...
David's user avatar
  • 31
3 votes
1 answer
1k views

Apache server returns 404 after timeout

Making multiple requests to the server causes a 404 error after about 40-60 seconds. I am using JavaScript to request: example.com/test/location. Apache has mod_rewrite enabled that maps this to the ...
iainmackay85's user avatar
3 votes
2 answers
2k views

Best Practice for upgrading PHP On Production Systems

We Have two load balanced web servers running php 5.3. I've been asked by our dev team to upgrade php to 5.4 because they need certain functionality it will bring. The main issue is that 5.3 is the ...
Demic's user avatar
  • 31
3 votes
1 answer
753 views

PHP not closing TCP CLOSE_WAIT on web server

My web server has a lot of apache tcp CLOSE_WAIT's stuck at poll(found through a backtrace in gdb), How do I debug what in php is causing my web server to not properly close connections?
Aks's user avatar
  • 131
3 votes
1 answer
1k views

Allow only one request per ip and url

Using a htaccess file or sending special headers from php, is there any way to allow only one http request by ip and url? I mean, an user could make multiple request simultaneously, but not to the ...
Gabriel's user avatar
  • 169
3 votes
1 answer
2k views

Error in osm data data import while nominatim installation

I am doing nominatim installation on my server. I run the following command ./utils/setup.php --osm-file /usr/share/osm2pgsql/planetfile/planet-latest.osm.pbf --all to import the pbf file and Few ...
Ravi Kotwani's user avatar
3 votes
2 answers
2k views

Apache's "OPTIONS * HTTP/1.0" running 100% CPU - Runaway httpd process

I have this recurring issue where an httpd processes will randomly start running at 100% CPU. Often other httpd processes will join in, and it will continue until I restart Apache. Oddly, the thing it'...
Thomas Adams's user avatar
3 votes
0 answers
659 views

PHP + ImageMagick Performance Issues

Good Day, I have two environments: OpenVZ VPS and Pentium 4 local dev machine. They have all packages installed the same way. ImageMagick is compiled from sources without OpenMP support. When I run ...
Stojko's user avatar
  • 63
3 votes
2 answers
2k views

Setup secure shared hosting (Apache, PHP, MySQL)

So I'm setting up a shared hosting with Apache, PHP, MySQL and the biggest question mark is how to do with PHP, since there is a million options out there how to configure it securely. The plan is: ...
Apaz's user avatar
  • 43
3 votes
0 answers
147 views

Connection reset with duplicate query parameters

Is there anything that could cause a connection reset when duplicate query parameters are passed to a page? http://test/?test[]=1&test[]=2 Causes a connection reset http://test/?test[]=1 Works ...
Daniel Staver's user avatar
3 votes
3 answers
2k views

Windows Server 2008 IIS7 - page requests randomly hang or timeout

I've just installed a fresh copy of Windows Server 2008 x64 with IIS7 and PHP (fast CGI). However, I'm noticing that after moving my web site from a similarly specified machine to this one, I'm ...
seb835's user avatar
  • 131
3 votes
1 answer
4k views

"Unable to initialize module" fileinfo php-pecl-Fileinfo.x86_64

I have a brand new server server that I am trying to get setup up. This is a 64 bit machine that I can not install "fileinfo" or "memcache". I have uninstalled these and reinstalled them using yum ...
Myers Network's user avatar

1
2 3 4 5
40