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
1answer
122 views

permission denied when script tries to run

I have a PHP script that run's the following command using exec() /root/gsutil/gsutil <COMMAND> In my error logs I receive the following: sh: 1: /root/gsutil/gsutil: Permission denied Does ...
0
votes
1answer
44 views

localhost != localhost for MySQL/PHP

System: Mac OS X Server 10.6.latest I just switched from the ancient MySQL (<5?) that came with Mac OS X Server to MariaDB 10.1, installed via MacPorts. (That was a whole 'nuther barrel of fun...) ...
0
votes
1answer
58 views

Ubuntu apache process consuming 100% cpu PHP/MySQL app

I have a server at Rackspace connecting to a Cloud DB instance running MySQL. I'm not a server admin so I apologize for not having enough data. I'm having a hard time determining what is causing my ...
1
vote
2answers
41 views

Send PHP requests from dedicated IP instead of shared IP

I have set a dedicated IP for a website (using directadmin), but all outgoing php requests are sent from the server's shared IP. Result of the following code is always the shared IP. $a = ...
-1
votes
0answers
15 views

mysql return true when int = 1 [migrated]

this seems a simple question, but i cannot find the awnser. I want to save a true/false in my mySQL database. So i'm saving 1/0 in a INT column. When i select this i get the 1/0, but i want it to ...
0
votes
1answer
10 views

Call to undefined function apd_set_pprof_trace()

have hundreds of php files which initiates mails throw SMTP server using "mail()" function. Now the this SMTP is shutting down in few-days and we are asked to contact external EmailWebService to send ...
0
votes
0answers
12 views

How to disable Pear caching?

We've been experiencing problems with the Pear cache and these problems are affecting our Puppet agents. Here's what I mean: $ ls -al /tmp/pear/cache/ | wc -l 211 How does one disable pear (php ...
0
votes
1answer
16 views

Upgrading Apache and keeping PHP

I have CentOS6.4 and currently running PHP5.3 with mod_php and Apache2.2 I've been trying to find an easy way to upgrade to Apache2.4, but the only things I've found are for php-fpm I'd like to keep ...
0
votes
1answer
14 views

How to generate a php.ini file out of current environment?

For some of my running PHP web applications (running under PHP-FPM) I need to setup cronjobs. Currently all those cronjobs are using the CLI default php.ini. Is there any easy way (e.g. script) ...
0
votes
1answer
28 views

Postfix/OpenDKIM not signing PHP sent emails

We installed SPF, DKIM, and DMARC records for email security/verifiability. When sending through the console or a mail client like Outlook or Mac's Mail it processes fully and has all three pass. ...
0
votes
1answer
27 views

What are the security implications of the below apache conf file

I have a situation where I want to share a codebase when accessing via a subdomain. sub1.example1.com shares sub1.example2.com Both example1.com and example2.com have there on virtual host file. I ...
0
votes
0answers
11 views

VirtualDocumentRoot and ProxyPassMatch

I have the following Apache configuration: ServerName localhost UseCanonicalName Off LogLevel debug <VirtualHost *:8080> ServerName _default_ VirtualDocumentRoot ...
0
votes
0answers
7 views

How to set internet proxy for amazon s3 server [migrated]

How to set internet proxy for amazon s3.i am getting Warning: S3::putObject(): [7] Failed connect to Host,No error in E:\wamp\www\S3\s3.php on line 363.i know this is because of proxy related ...
0
votes
1answer
19 views

maximum number of clients connected to the web service [duplicate]

How can I find the maximum number of clients that can connect to my web service at the same time? Is there any way to know how many clients can connect to the web service at the same time? What is ...
-1
votes
1answer
63 views

Cron job is not working in centos 6.6

I have dedicated server having centos 6.6 and centos webpanel. Now I'm trying to set cron job from centos web panel. I had tried so many commands to run one php file each and every minute, but still ...
0
votes
0answers
19 views

Enable Apache user to run a command antiword “sh: antiword: command not found”

I am trying to run a command via PHP to perform a task using antiword. After reading around I understand that I need to give my apache user an extended access to enable user to run antiword? How can ...
-1
votes
1answer
32 views

Accidently deleted *.so files in extensions folder at /usr/lib/php5

This might sound really stupid. But, While developing a PHP extension I accidently deleted all *.so files in extensions folder(named as a long number) located at /usr/lib/php5. can anyone tell me if ...
-4
votes
0answers
81 views

millions of session files generated in /tmp dir then no space left on hard disk and made the website crash

There is a Wordpress site which only provide article reading services running on the linux server.(Doesn't have user center). But seems that doesn't work well these days. One day I found my site ...
0
votes
1answer
65 views

Error while installing php-imap on CentOS 6.6

I'm trying to install php-imap on CentOS 6.6 yum install php-imap But I'm getting this error: Error: Package: php-common-5.3.29-4.w5.x86_64 (webtatic) Requires: libcurl.so.3()(64bit) ...
0
votes
1answer
51 views

Could not install php zip extension by using `pecl install` command line

When I want to install the zip extension of php using pecl utility, I got the following error: No releases available for package "pecl.php.net/zip" install failed but the zip extension is exists ...
0
votes
0answers
18 views

Doku wiki cannot connect to fast cgi behind ngnix

I'm trying to configure dokuwiki with ngnix. I'm using the https setup: server { server_name wiki.example.co; root /var/www/dokuwiki; index doku.php; listen 443 ssl; keepalive_requests 10; ...
0
votes
0answers
17 views

Improve memcache performance?

Using PHP, I'm connecting to Memcache with: $this->mem = new Memcache; $connected = @$this->mem->connect("localhost"); I feel like I'm hitting some kind of bottleneck. Looking at the ...
-1
votes
0answers
36 views

Constant virus detections [duplicate]

My antivirus has been detecting quite a few viruses/trojans lately. Mainly Backdoor:PHP/Shell.P Backdoor:PHP/WebShell.J I have been trying to identify the source of these files with no luck so ...
0
votes
1answer
42 views

Curl version on command line is different to PHP

I've got PHP version 5.5.21-1+deb.sury.org~precise+2 running with Apache2 under Ubuntu 12.04 When I run phpinfo() it shows the curl version as 7.22.0 When I run curl --version via the command line - ...
0
votes
1answer
75 views

Php 5.6.5 won't work very well

Today I installed Php 5.6.5 on my server with Debian 7 Wheezy and Apache2. First, I added these repositories to my /etc/apt/sources.list file: http://packages.dotdeb.org wheezy-php56 ...
1
vote
2answers
39 views

lighttpd + PHP-fcgi slow response

We have a problem regarding lighttpd as the webserver with php5 as backend via fast-cgi. Sometimes the server's response is taking more than 5 seconds (up to 20 seconds) when requesting a simple file ...
0
votes
0answers
5 views

Improve Xdebug performance [migrated]

I've found many articles, and posts about this, even on stackexchange sites, I'd just like want to be sure, is it the max, what I can get from xDebug. My scenario: I am developing a wordpress site ...
1
vote
1answer
51 views

Zabbix cannot connect to a PostgreSQL database

First off I am running CentOS 6.5 and attempting to use Zabbix 2.2.4. Any hostnames have been replaced with examples. I have installed the following RPMs onto my Zabbix machine ( hostname will be ...
0
votes
0answers
25 views

Improve the security of a website implementing the least privilege principle [migrated]

I am a beginner and I am trying to program a secure website to improve my skills and knowledge. I am under Linux and I am using LAMP with php. My website is similar to a social network so people will ...
0
votes
1answer
11 views

Varnish doesn't work with session on PHP

I have got varnish installed on my server. I have a page on my site which i would like to get cached via Varnish. With fresh varnish installation, I created a PHP page with some content in it. loaded ...
1
vote
1answer
44 views

Isolating a high-CPU PHP Process

I have a 16 CPU core server that's experiencing consistent load averages of 40-70. After camping on a top command for a number of hours, I've isolated the CPU spikes to a single user. After pressing ...
-1
votes
0answers
24 views

PHP compilation error

I have apache 2.4 installed on my vm and I am trying to install PHP 3.5.10. my config, make test went fine but when i did make install its failing. can some one please help? make *** Warning: ...
-1
votes
1answer
24 views

Exploit PHP File Found in /tmp directory [duplicate]

I have been alerted to by our system that a PHP shell has been found in the /tmp directory. Firstly - I would like to know how it could have got here and why it would be here - is there any way PHP ...
0
votes
0answers
45 views

malformed header from script

I got this error on my website: Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request. Please contact the server ...
0
votes
0answers
25 views

PHP & MySQL config for IIS server under heavy load

I am running a PHP/MYSQL website on Windows Server 2012 using IIS 8. I had performance issues on my old server with the CPU spiking above 100% during peak times. So I've just upgraded my server to a ...
0
votes
0answers
18 views

How to use this phpcgi apache tempalte to run php 5.2

From vestacp documentation (the CP I use) "phpcgi - tempalte to run php as cgi. can be useful to run php4 or php5.2" here is the source of the template ...
-1
votes
1answer
116 views

500 Internal Server Error on Fresh Laravel install [on hold]

I have been trying for 3 days now with no win. I have a digitalocean droplet, and I have ispconfig 3 on there under a domain (lets call it server.com). I then have a domain name (website.com) that I ...
1
vote
1answer
40 views

Kill old php cron script

After running ps aux | grep php, I found about 10 php scripts ran by cron that have started over a week ago and are hanging. Each script usually take 40 seconds to complete. I have set ...
0
votes
1answer
87 views

Cannot install PHP iUS 5.6 on RHEL 6.4 - conflicts/dependencies

When trying to install PHP 5.6 from the iUS repo, I get this error: --> Processing Conflict: php56u-common-5.6.5-1.ius.el6.x86_64 conflicts php-common < 5.6 --> Finished Dependency ...
-1
votes
0answers
27 views

How to run command after receiving email in Exim 4? [duplicate]

i want to ask how to run command everytime new mail has been delivered to vmail and include email sender and receiver in the command like: php ...
-2
votes
0answers
32 views

Run command after receiving mail in Exim 4 [duplicate]

i want to ask how to run command everytime new mail has been delivered to vmail and include email sender and receiver in the command like: php ...
0
votes
1answer
46 views

Make postfix trigger a php script using always_bcc

I have been having a VERY hard time with this, have searched everywhere, and in utter desperation am posting this question. I am using postfix and dovecot on ubuntu 12.04. I am trying very hard to ...
0
votes
1answer
52 views

PHP eat a lot of memory on IIS

I just transferred one site from Linux to windows and i`m getting strange fatal error messages. My Linux PHP had 256MB memory limit and never had single "out of memory" fatal error. Now on IIS i have ...
2
votes
1answer
27 views

Cygwin OpenSSH server does not respond after first command from PHP (Using phpseclib)

I got cygwin and sshd working fine. And there are no issues at all when using putty. It responds as expected even for multiple commands. But when using phpseclib , A response is received only for the ...
0
votes
1answer
32 views

Make error_log readable by apache

Setup: CentOS 6.6, Apache 2.2.15, php 5.5.21 I 'm building a php script that displays the content of the /var/log/httpd/error_log file. Unfortunately, it does not work. The error message states: ...
-1
votes
0answers
16 views

File Created by PHP Doesn't Have Permissions

The problem is when I upload a photo to my server using PHP from android, TrustedInstaller doesn't have permissions on the file and I can't change file permissions using chmod(). There is no problem ...
0
votes
0answers
57 views

Using apache with hhvm

I've tried to test hhvm (on my local machine), but did not manage to get it working. Important side-note: I need to run mod_php and fcgi at the same time. It's not possible to abandon mod_php for me ...
0
votes
2answers
97 views

PHP memcached session redundancy

I'm trying to follow How To Share PHP Sessions on Multiple Memcached Servers article and implement that to my environment: /etc/php.d/memcache.ini: # grep -v ^\; /etc/php.d/memcache.ini ...
0
votes
0answers
21 views

Supersede the default Apache config on a different config file

I'm using Ubuntu with Apache 2.4. The config file for Apache is found at /etc/apache2/apache2.conf at the end of this config file it's written # Current File: /etc/apache2/apache2.conf <Directory ...
0
votes
0answers
27 views

PHP Warning: Unknown: Failed to write session data (memcached). Very infrequent

I installed memcached (2.2.0) libmemached (1.0.18) a few weeks ago. (Apache/2.4.10 and PHP 5.5.20), mostly for php session management. Generally I'm really pleased with performance but I notice this ...