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
9 views

nginx sites in subfolders

I have some trouble getting my nginx setup work the way I want. I have a site example.localhost that is located at /vagrant/frontend/www. My configuration for this, which is working, looks like this: ...
0
votes
2answers
30 views

Printing PDF - prints 50Mb from 1Mb PDF file ..

I have this PDF file which is just 1Mb - 30 pages . So when I send it to printer ( HP 1320 ) i see that computer sends almost 50Mb to the printer. How is that possible ? I know that PDF is ...
0
votes
0answers
3 views

Php, IIS8, and MS Sqlserver2008 driver installation

I am new to iis setup, so this is quickly turning into a nightmare. I have installed php using wpi (IIS8)(server 2012) everything is working fine. Now i would like to connect to the ms sql server (v ...
0
votes
0answers
24 views

Trying to find bottleneck… 60k onsite visitors

I know this will be hard, but I'm willing to try the Q&A route. I have a Wordpress site that currently has 60,000 visitors on the site at once. I'm using an EC2 m3.xlarge, php/php-fpm 5.5.10, ...
-1
votes
0answers
14 views

Adding users to Postfix and Dovecot from Web front-end

I have a basic email server running Postfix and Dovecot with webmail and all that jazz. Right now, I'm using a shell script I wrote to add new virtual users and mailboxes to postfix, and set ...
-4
votes
0answers
12 views

change native function name from php [migrated]

I would like to create a function xxxx that will do the same as shell_exec. The reason is that I am disabling shell_exec in my server so nobody in it will be able to use it. However for some users ...
-1
votes
1answer
22 views

Disable custom php.ini

I want to disable custom php.ini inside my shared hosting. I dont want to allow my clients to use it. I could block the usage of htaccess using allowverride but I cant see someway to block php.ini!
-1
votes
0answers
15 views

Installing php 5.2 on mac os x mavericks (10.9) [on hold]

I need to install php 5.2 for testing purposes on Mac OS X 10.9. How do I go about doing this? It is a pretty straightforward question. I am on Mac OS X 10.9 and I am wondering for an easy way to ...
-1
votes
0answers
13 views

How to connect xampp with MSSQL [on hold]

I am using xampp on a Linux server. My phpinfo() function says that I have FreeTDS. mssql Library version FreeTDS I also downloaded a moved a dblib extension to ...
0
votes
0answers
12 views

Using phpfarm to install multiple versions of php on Ubuntu behind a proxy

I'm attempting to use multiple PHP versions on the same Ubuntu 12.04 server. I've installed phpfarm (as suggested by this question). I've created a configuration file for my custom install, but the ...
-1
votes
0answers
21 views

how to setup cron which executes every minute dreamhost [on hold]

I tried to setup php cron job which runs every minute in dreamhost panel but its not working, we can set 10 minutes minimum, below that its not possible to set cron job? How to create php cronjob ...
-1
votes
1answer
23 views

Scheduled Task issue - /usr/bin/php/: No such file or directory

Can't get it working, I want to set up a cron job for a domain user in plesk 11.5, but seems that there's a problem to find the php executable. The command is: /usr/bin/php/ -f ...
2
votes
2answers
66 views

Adding “HttpOnly” and “Secure” cookie flags on Nginx & PHP

I have Nginx running with PHP and WordPress. Acunetix recommends setting these flags, but they provide no documentation. I have looked around a bit, but I have not seen anything that shows exactly how ...
0
votes
0answers
18 views

PHP file execute shell command with continuous output [migrated]

Running shell commands from PHP is done like this: <?php $cmd = 'du /'; print shell_exec ( $cmd ); ?> Or <?php $cmd = 'du /'; passthru ( $cmd ); ?> However you only see the output ...
0
votes
1answer
33 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
2answers
28 views

MariaDB Permission denied when using socket

Here is the gist of my problem: I have a web application that won't connect when the database has the host is set as localhost, however it will if I use the address 127.0.0.1. The error that PHP ...
0
votes
0answers
8 views

Virtualmin/Webmin - How to install PHP 5.2 as secondary PHP version?

I know how to install additional PHP to exiting one in Virtualmin (actually I have 5.4 and 5.5 together) but how I can add PHP 5.2.17 to 5.4? The way which I have used is not working in this case I ...
0
votes
0answers
11 views

PHP: Session-related error, that occurs only in Internet Explorer?

I have PHP 5.4.7 with Yii framework and I'm experiencing problem described here. When I login to my Yii-powered website, I'm getting session_regenerate_id(): Session object destruction failed error. I ...
1
vote
1answer
45 views

unable to switch off expose_php in ubuntu 14.04 with nginx and php-fpm

According to phpinfo: Loaded Configuration File: /etc/php5/fpm/php.ini # grep expose_php /etc/php5/fpm -R /etc/php5/fpm/php.ini:expose_php = Off ...
0
votes
0answers
9 views

how to resolve yum replace php-common --replace-with=php55w-common error? [duplicate]

how to resolve yum replace php-common --replace-with=php55w-common error? on CentOS 6.5 root@server [~]# yum replace php-common --replace-with=php55w-common Loaded plugins: fastestmirror, replace, ...
0
votes
1answer
13 views

Plesk 11.5 multiple php installation fails as php_handler doesn't exist

I have done same operation successfully in the past in order to install multiple versions of php on plesk but when I try now at a new server I get the following error : -bash: ...
0
votes
1answer
23 views

Cron getting timeout when attempting to access url (wget).

I'm sure this is simple and I've been digging but no answer is quite as specific as I need it to be. The goal is easy, have Cron hit a url on my server every 5 minutes. All of that is set up and ...
-2
votes
0answers
20 views

421 4.3.0 collect: Cannot write … (bfcommit, uid=0, gid=110): No such file or directory [closed]

There are an issue: i want to use swiftmailer but when i try then the system says: # php yiic.php sendnotifications exception 'Swift_TransportException' with message 'Expected response code 250 ...
0
votes
0answers
74 views

Apache 2.2.27 Crashes with CPU at 100%

We have a processor intensive web portal that can easily reach high CPU usage, when this happens the Apache (2.2.27) server crashes, before when using Apache 2.2.25 (with OpenSSL 0.9.8y) the server ...
1
vote
2answers
228 views

Why can nginx access /etc/passwd? [closed]

I'm trying to setup my new VPS with my couple sites. nginx, php-fpm and other needed services installed. I setup a nginx server block(virtual hosts) for my site, and then try to create a php file ...
0
votes
0answers
12 views

Prevent email spam from vhosts

We have a server with several vhosts (with php) running. Recently one vhost was overtaken from a "hacker" which manipulated the php scripts to send email spam. Because the other email servers blocked ...
0
votes
1answer
22 views

How to remove php modules from apache?

Looking at phpinfo() I found a lot of modules that I am not using and therefore they just waste memory. So I want to remove them, but the problem is that also there is huge amount of info about 'how ...
0
votes
2answers
60 views

Change apache (PHP) $PATH environment variable on CentOS with cPanel

I need to add a path to $PATH environment variable for PHP scripts on CentOS linux server with cPanel Pro 1.0 and Apache 2.2.27. For Ubuntu or SuSE it just means adding the row export ...
0
votes
0answers
6 views

Change tomcat security-roles by editing web.xml from PHP

When a user buys a product, I set up a new domain on the fly (by calling some API from PHP), and then I come to a point where I need to specify certain security roles in TomCat, preferably still from ...
1
vote
1answer
295 views

Heartbleed vulnerability when SSL provided by unaffected servers?

*I'd like to ask about two scenarios where a vulnerable version of OpenSSL is installed on a server, but that server is not providing SSL services. Scenario 1: I have an SSL certificate installed on ...
-1
votes
1answer
19 views

Is it possible to use PHP on a website hosted on AWS S3 without using EC2 or Elastic Beanstalk?

I have a bit of PHP (a contact form to be exact) that isn't working right now on my website. I'd like to activate the PHP and I heard one of the ways is to use Elastic Beanstalk. However, Elastic ...
-1
votes
0answers
10 views

How detect insufficient amount of FastCGI workes

Could you help me to figure out how can it be detected that there are not enough php fastCGI workers on Apache server? Is high number of HTTP status 503 responses a good indicator of that? How does ...
0
votes
0answers
25 views

Can't write files with PHP on IIS

I have an IIS 7.5 web server running on Windows 2008r2. When I try to write to a file I get a Permission Denied error, but I can't figure out how to fix the permissions. I have PHP configured via ...
0
votes
0answers
13 views

Curl get of .cgi file, Always 504 gateway time out

I have a ip cam and I use Get method to switch on the alarm. When I use browser everything is ok http://da***.com:808/set_alarm.cgi?user=***&pwd=***&motion_armed=1" If a try to use this ...
0
votes
1answer
86 views

Apache 2.4 HHVM 3.1 Static content serving

I have set up apache 2.4 with HHVM 3.1.0 (nightly) on ubuntu 13.10 For some reason the server serves the hhvm files (.php) correctly, but when I try to load a .html/.css or any other static file it ...
0
votes
3answers
91 views

Apache 2.4 - 403 HTTP status code

I'm getting a 403 error message with Apache, in Debian Testing. Apache version: # aptitude show apache2 | grep -i version Version: 2.4.9-1 # ls -la /home/ total 28 drwxr-xr-x 4 root root ...
-1
votes
1answer
32 views

Running PHP/MySQL on Windows Server 2008 [closed]

I have a client that has a fairly basic web ordering system that was built for them many years ago. It is based on runs fine on PHP 5.3. Now, it connects to a (even older) warehouse management system ...
-1
votes
0answers
41 views

Can I host both Tomcat and PHP sites on a single server with one IP address on port 80? [duplicate]

I would like to host both Tomcat and PHP (Wordpress) site on Linux and Apache with one IP address and port 80 for development purposes. For instance one site would be mapped to php_site.mydomain.com ...
0
votes
0answers
14 views

best logic to Load balancing YiiFramework web app

I'm going to launch a Yii framework app next days, and i'm currently searching the best way to deploy it in order to scale and support high traffic. I use Amazon RDS to host the DB, and 2 Memcached ...
0
votes
0answers
61 views

Can't load Mongo extension in php.ini

I'm having some issues while try to load mongo.so extension at php.ini. Below is what I tried: Compile the mongo extension by following the documentation at php.net for MongoDB site. This resumed ...
0
votes
0answers
39 views

How to install a newer version of php on AWS Opsworks?

Our code base is using PHP 5.5 and we are wanting to deploy on AWS Opsworks however when selecting the PHP App Server layer we are told it has PHP 5.3. What I was hoping is that I could just use the ...
0
votes
4answers
59 views

Configure postfix to block PHP-sent mail() to certain recipients

I'm trying to prevent my CentOS 6.5 server from sending out emails to a certain list of recipients. (dont_contact_me@hotmail.com, dont_contact_me@gmail.com and so on). I've configured postfix like ...
2
votes
2answers
23 views

Rsyslog duplicate logs (rsyslog.conf and rsyslog.d/something.conf)

I've created a custom log (php sends log entries to rsyslog) using local0. It uses a new custom file (/var/log/sea.log). The problem is that logs are being sent to /var/log/sea.log , ...
0
votes
2answers
139 views

Apache fails to start after PHP upgrade on CentOS 6.5 x64

I have a developer server with CentOS 6.5 and PHP 5.5.11 (latest from REMI repos). Today I did: yum --enablerepo=remi,remi-php55 update That updated Apache and some other libraries like Mongo for ...
0
votes
1answer
29 views

Unable to install php5.5 apcu module on Debian 6.0 server

Since APC is not supported by PHP 5.5 as an OP code cache I read that I can still use APC for user data which sounds good for me. It's called APCu and it should be compatible with the old APC. ...
0
votes
0answers
79 views

Postfix: Bounce checking. Emails are piped to php but prevents emails from being sent and received properly [closed]

As I was working, I made a guide of what I was doing, for future use. I have been trying to get this to work for some time and I have gotten the emails to pass through the script. The problem all ...
0
votes
0answers
12 views

Installing xattr PECL extension in Ubuntu 12.10

I am trying to install extension xattr in my Ubuntu 12.10 . sudo pecl install xattr But I am getting the error as : checking for xattr files in default path... not found configure: error: Please ...
1
vote
1answer
21 views

Temporary file security threat? [duplicate]

We use CentOS. We've been hacked and trying to figure out why. Looking at the /tmp folder I'm wondering if these are security threats: -rw-rw---- 1 mysql mysql 11665408 Apr 3 18:59 ...
0
votes
0answers
29 views

PHP application response time increases when application requests decrease

I've got a very powerful dedicated server, running a PHP 5.5.3, MySQL (Percona 5.6) SMF forum. It's running Ubuntu 13.10, it's a Xeon E3-1270 V2, 1TB disk space (0.7% full), 16GB DDR3 (15% used). I'm ...
0
votes
2answers
52 views

PHP exec “unable to fork” intermittent error on CentOS VPS

Using: PHP 5.5.10 nginx 1.5.10 Centos 6.5 a xen-based 4GB VPS My site uses encrypted paypal buttons. This encryption is done by the following code: $openssl_cmd = "($OPENSSL smime -sign -signer ...