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
24 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 ...
0
votes
0answers
16 views

How to Stop IIS editing body of http 201 response? (PHP)

I'm currently implementing a REST service in PHP on an IIS server. Everything is working fine, except that when I have the server respond with a HTTP status code of 201, IIS is prepending a string ...
0
votes
1answer
60 views

Ubuntu 14.04 PPA previous minor version of PHP 5.6

I'm currently running PHP 5.6.6 installed on Ubuntu using the PPA provided by Ondřej Surý https://launchpad.net/~ondrej/+archive/ubuntu/php5-5.6 This is managed using Chef which isn't really relevant ...
0
votes
3answers
65 views

Is there an option in Apache to check PHP files for malicious code before parsing them?

Basically, I would like Apache to check PHP files for certain patterns before parsing them. If these PHP files match the patterns, I would like to send something else in replacement back to the user. ...
0
votes
1answer
94 views

Reverse Proxy for PHP: Best practice?

I'm setting up NGINX as a SSL reverse proxy for three small web apps with dynamic (PHP) and static content. What would be considered best practice security-wise and performance-wise when it comes to ...
3
votes
2answers
282 views

Blocking PHP mailer spam using iptables

I host a public-facing web server running Debian Wheezy, and latest versions of Postfix, Apache, PHP, Spamassassin, ClamAV, rootkit hunter. Apache is configured with a handful of vhosts, each tied to ...
2
votes
0answers
73 views

CentOS 7 / Apache 2.4 / FastCGI Configuration

Does anyone know how to properly configure PHP/FastCGI on a CentOS 7 machine using Apache 2.4? In the Apache Virtual Host config file, I have this: <FilesMatch \.php$> SetHandler ...
-1
votes
1answer
45 views

How to overcome IIS message exceeds the request content length in php

I am using phpUploader on IIS8.5. I have the php upload set to 20mb and I have the site set to: <?xml version="1.0" encoding="UTF-8"?> <configuration> <system.webServer> ...
0
votes
0answers
27 views

Open LiteSpeed permission problems

I recently moved to open litespeed from apache and i can no longer create files. When i do a file_put_contents i get permission errors. lsphp and litespeed both run under user nobody. Doing a chmod ...
0
votes
0answers
28 views

When using Apache mod_php, what's the precedence of loaded php.ini files?

I'm having some troubles with php.ini configuration when Apache executes PHP using mod_php. I can't understand how/the order of configuration files. Here is how phpinfo() Apache section: ...
0
votes
1answer
51 views

Php executes with different results in command line than when browsed to in Apache

I setup a CentOS 7 vm webserver with the LAMP stack. Over the last few days I have been trying to get an LDAPS connection working to my Windows Server 2008 R2 Domain Controller. I have been able to ...
0
votes
0answers
62 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 ...
0
votes
1answer
35 views

SOA: Is using PHP FPM to serve webservice traffic without NGINX a good idea?

I'm in the processes of developing a service oriented architecture using PHP. A member of my team has suggested that because each of the services serves only HTTP traffic, serving responses only in ...
0
votes
0answers
32 views

Can't Get Virtual Subdirectory Locations Working in Nginx

I have my webapps each as toplevel directories under /var/www, and ideally need to stay that way.. only one hostname (_), no vhosts, so I want "/" to point to my /var/www/mainsite/, and then I want ...
0
votes
0answers
25 views

Rights issue, extracting a zip archive

I'm in need for some expertise. I've been tinkering a few days at this with fruitless results. I'm trying to write an update script starting out in PHP. PHP will download a zip archive via FTP ...
0
votes
0answers
16 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 ...
-2
votes
1answer
24 views

Centos system. It cannot generate pictures according to apache server [closed]

My system is centos6,I have written a php script and a python script and the php script will invoke the python script.And the python script will invoke two software:blast and RNAfold,it will generate ...
-1
votes
1answer
24 views

Synchronize Staging Server and Live Server [closed]

We have staging and live server at our office. Where Live code and DB changes are far more advanced than staging one.This application developed under php and DB is mysql. Earlier we used to work in ...
1
vote
0answers
20 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
1answer
78 views

OpsWorks environment variables available to PHP CLI

We are deploying a Laravel-based application to AWS using OpsWorks. We have defined environment variables through the OpsWorks console and they are correctly seen by Apache. However, when running CLI ...
0
votes
0answers
15 views

Disable gd library on a specific website

I am trying to disable gb library on a specific website so it won't affect the other websites which are hosted on the same server. Is it possible to do this with htaccess or is there another way?
0
votes
0answers
33 views

Wait Time (TTFB) Difference Between Apache and IIS 8.5 [duplicate]

I have a system which runs on PHP and MySQL. I know that there is a performance difference between WinServer 2012R2 IIS8.5 vs Centos 6.5 LAMP when using PHP&MySQL based structures. But the ...
0
votes
0answers
26 views

Key and Certificate for Ideal PHP Wrapper

I try to make a Ideal sandbox with a PHP wrapper and Simulator. IDEAL wrapper: https://github.com/PENDOnl/iDEAL-v3.3.1-PHP-Wrapper IDEAL simulator: http://ideal-simulator.nl/ I runned these ...
-2
votes
3answers
119 views

Upgrade php version on centos 6.5

On the current stack i hv centos 6.5 (64 bit) , PHP 5.3 available. I'm a linux new bee & need to perform php upgrade to PHP 5.5. Tried following but that returned error: wget ...
1
vote
1answer
372 views

xz compression not available - yum error on centos [closed]

I want to update my php to new version. Dealing with this source: https://webtatic.com/packages/php56/#comment-139854 And now I can't use yum commands. Anytime when I'm trying install something or ...
2
votes
0answers
27 views

Suexec PHP does not load php.ini

I'm using FastCGI with suEXEC for PHP on CentOS 7. My wrapper script looks as follows: #!/bin/sh PHPRC=/home/ben/etc/ export PHPRC export TMPDIR=/home/ben/tmp/ exec /usr/bin/php-cgi -c ...
0
votes
1answer
53 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 ...
1
vote
2answers
40 views

PHP Mail Delayed Shared Hosting [closed]

I'm developing a Drupal site on very generic shared LAMP hosting. My client insists on using the shared hosting company for some reason. (Is it OK to mention the hosting company?) E-mails are sent ...
0
votes
1answer
93 views

Apache not displaying custom 500 error page for php errors

Apache does not want to display a custom error document that I have setup. In my vhost I have DocumentRoot /var/www/site/public ... ErrorDocument 500 /500.html The 500.html is located ...
-2
votes
2answers
35 views

How to Disable ModSecurity without any Errors

I've enabled Mod_Security on my VPS which runs an Ubuntu OS with an apache web server. Now, I want to disable it because I setup another firewall to protect my server. I've tried preforming the steps ...
0
votes
0answers
103 views

json works on localhost but not working on my real server

I have an application that is getting information from my server (online), I have a version of that website in my computer (localhost), The application is working on localhost can get the json, But I ...
0
votes
0answers
20 views

How to use AppCmd on Windows Server for IIS with a site

I came across this ServerFault Article entitled show PHP error message on IIS 7, which was expanded a bit by Anton Staykov. I also searched a couple of other articles, such as this one by Microsoft. ...
-1
votes
1answer
130 views

Sending email from PHP through exchange [closed]

I figured serverfault might be a better fit for this question. I'm trying to send emails with PHP mail() function. PHP returns no errors and says the email has been accepted whether it sends or not. ...
0
votes
0answers
48 views

Set php-fpm slow log file permissions

I have a setup of php-fpm on CentOS 7 with each user having their own pool and log files. I want to make sure that each user is able to view their own log files. This works great for the PHP ...
1
vote
2answers
50 views

Deleting phpMyAdmin setup.php

My website log files show many requests looking for: /phpmyadmin/scripts/setup.php I have phpmyadmin on my website. Am I supposed to delete that setup.php file or just let them keep on requesting ...
0
votes
0answers
109 views

php curl does not execute url

Im writing a php cron script that needs to run a url After some database modifications the php script needs to execute an url $url = ...
0
votes
0answers
92 views

TYPO3 installation and apache's DocumentRoot permissions

I just installed TYPO3 7.1.0 and managed to resolve all the issues (e.g. missing system libraries, php-open_basedir-issue and so on) during and after the installation. But there is one issue that ...
0
votes
2answers
129 views

How to let PHP connect to database by using UNIX socket (Joomla)

I'd like to have my PHP applications such as Joomla make use of the UNIX socket to connect to the local mysql database. I've already configured the php.ini with: mysqli.default_socket = ...
-1
votes
1answer
43 views

how to check if openvpn is active

i am runnning multiple openvpn instances each connected to different servers let's assume there are 3 and i am using a simple php script with this command system('openvpn config1'); system('openvpn ...
0
votes
0answers
62 views

“PEAR package PHP_Archive not installed” after upgrade php to 5.4.38 on centos6.6

if I havn't install php before, everything is OK. When I upgrade php from 5.4.36 to 5.4.38, it says PEAR package PHP_Archive not installed: generated phar will require PHP's phar extension be ...
0
votes
1answer
51 views

virtual hosts with Apache 2.4 windows

Trying to upgrade the PHP version from 5.3 to 5.5 Environment: Windows 2012 Server, Apache 2.4, PHP 5.5, Upgrading from PHP 5.3 and Apache 2.2 for *MySQL and *Drupal I was able to get the ...
0
votes
0answers
15 views

How to get the real path on FS of an Apache2 Alias from php script?

All is in the question, no ? I searched for it and the only solution I found is to use apache mod_info to generate a file with apache config then read into it from php via the url, then parse it ...
0
votes
0answers
56 views

NGINX: add_before_body with .php

worker_processes 8; events { worker_connections 1024; } http { gzip off; root htdocs; add_before_body subsites/dropletlocal/library/global/func-global.class.php; #DOESN'T ...
0
votes
0answers
35 views

Apache mod_ssl StdEnvVars appear not to be set?

I have a CentOS 6.5 server running Apache 2.2.15 with mod_ssl and PHP 5.3.3. My problem is that PHP does not seem to recognize the HTTPS connection. I have the following in my ...
0
votes
2answers
30 views

Try to secure file system root with Apache2/Debian: all virtualhosts return 403 forbidden

I have Apache2 running on a Debian server. My virtualhost (one for now) are already configured in /etc/apache2/sites-available/default and are working fine: # /etc/apache2/sites-available/default ...
-2
votes
1answer
83 views

nginx SSL not working (404 error)

On a CentOS 6.6 box I have nginx set to serve two virtual hosts. One for SSL and one for basic HTTP. /etc/nginx/default.conf: server { listen 80 default_server; server_name _; #charset ...
0
votes
0answers
31 views

Per-pool php.ini with PHP-FPM without php_value workaround

I'd like to use separate php.ini files for each PHP-FPM pool. I've checked similar questions and they all say to use php_value, but that's a really dirty workaround and would require to manually (or ...
0
votes
1answer
24 views

Debugging inconsistent PHPUnit behaviour on different systems

This question has been originally asked in Stackoverflow but then I decided it might fit Serverfault better so I moved it here. I am trying to rearrange my Jenkins projects by moving some of them to ...
0
votes
0answers
30 views

lp printing crossdomain on local printer

How can files located on web server (.png or .pdf) be printed on local printer ? I have a DYMO LabelWriter 450 attached to a local POS sytem, running LAMP / Debian wheezy. Currently product labels ...
0
votes
1answer
42 views

IIS | Block execution of files in directory

I am dealing with user uploads via a PHP application. I want to secure the server so no exploits are available to the user, such as uploading a php shell and executing it. I have set it so all ...