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

0
votes
0answers
32 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 ...
6
votes
3answers
9k views

How to pass $_GET variables to a PHP script via the command line?

I am trying to create a webserver that serves PHP scripts. Currently, it works as follows: The client requests /index.php?test=value The server invokes php index.php The server feeds the HTTP ...
0
votes
1answer
31 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 ...
-1
votes
0answers
26 views

Wich PHP Module to Install on CentOS to Execute Php Files

I have installed CentOS 5 (32 bit) on my VPS that contains basic php files with no database. I have installed PHP as well but the specific module needs to be installed. What module would be necessary ...
0
votes
0answers
13 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 ...
1
vote
2answers
1k 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 ...
0
votes
2answers
22 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 ...
0
votes
0answers
48 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
24 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
980 views

How to fix Apache from crashing with PHP+Curl on an SSH request?

My Apache process segfaults whenever I call curl_exec() from PHP with an "https://" URL. If I use http instead of https as the URL transport, it works perfectly, so I know curl and the other curl ...
-2
votes
1answer
54 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 ...
1
vote
0answers
138 views

squirrelmail postfixadmin plugin - failed login to xmlrpc instance

I have installed postfixadmin 2.3.6 and im using squirrelmail vacation plugin. Postfixadmin is working good i can add/edit/delete email accounts and vacation or forwards / aliases. I have problems ...
-2
votes
2answers
219 views

SMTP/HTTP/FTP status check using PHP [closed]

I am in need of a piece of code to check whether the website is alive or down . I think this can be done with php curl or fsockopen . But i do want to check whether other services like ftp, smtp, ...
17
votes
9answers
17k views

Mysteriously empty $_POST array

I have the following HTML/PHP page: <?php if(empty($_SERVER['CONTENT_TYPE'])) { $type = "application/x-www-form-urlencoded"; $_SERVER['CONTENT_TYPE'] = $type; } echo "<pre>"; ...
1
vote
1answer
353 views

error compling php5 with gd for ubuntu 12.04

I need the imageantialias() to work on the server I built. I have complied PHP before but for some reason I can't do it any more. I ran these steps to try: apt-get source php5 apt-get build-dep ...
0
votes
2answers
396 views

difference between /usr/bin/php and php in crontab

What is the difference between specifying "/usr/bin/php" and just using "php" when setting up a PHP script to run in my crontab? I would tend to just use "php" rather than the full path. 30 16 * * * ...
0
votes
0answers
19 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 ...
2
votes
1answer
2k views

All PHP sites stopped working on IIS7, internal server error 500

I installed multiple drupal 7 sites using the Web Platform Installer on Windows Server 2008. Until know they worked without any problems, but recently internal server error 500 started to show up ...
2
votes
1answer
112 views

How to Upgrade to PHP 5.5 on Windows Server 2008

What is the proper way to upgrade from PHP Version 5.4.32 to PHP Version 5.5.22 on Windows? All that I can find is how to to install. PHP is already running on Windows Server 2008 R2 64 bit alongside ...
0
votes
1answer
29 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 ...
0
votes
3answers
327 views

Bundling tidy-html5 with PHP?

I want to setup the W3C fork of HTMLTidy (tidy-html5) as a PHP extension. I had installed the normal php/tidy extension using the php5-tidy package. I then downloaded the Git repository, and ran the ...
0
votes
1answer
21 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
2answers
5k views

ISPConfig shows the 403 forbidden [closed]

That's what i receive when opening the browser Forbidden You don't have permission to access / on this server. and there is nothing meaningful in the logs " 403 179 "-" "Mozilla/5.0 ...
8
votes
4answers
332 views

Paranoid Sysadmin -vs- Out-of-Date PHP version

How can a paranoid sysadmin confidently stay up-to-date with the latest stable PHP versions? (security fixes have been coming in pretty regularly). This is a Production server, and so "breaking ...
5
votes
3answers
873 views

.htaccess redirect all extension to php

I recently updated my .htaccess file to hide the .php extension of the urls. It works nice, when I try to reach domain.com/index, it displays the php file. When I type domain.com/index.php it ...
0
votes
0answers
14 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
0answers
23 views

PHP error reporting without notices

I have been trying to set up php.ini file for error reporting. I wanted for my log file to show everything except notices. Referring to my researches, solution was to use this command: ...
-1
votes
1answer
128 views

Multiple versions of PHP through nginx

EDIT: For future reference Multiple versions of PHP through nginx Nginx and different versions of PHP FPM + PHP I am running Ubuntu 14.10 with a LEMP stack using PHP 5.5.12. I have a number of ...
1
vote
0answers
89 views

End of script output before headers: php5

I've inherited the sysadmin role on a server that's running a wordpress website on top of Apache 2.4/Debian. It almost works, but it is issuing "500 internal server error" from time to time. In my ...
-1
votes
2answers
19 views

Symlink in crontab, script not found [duplicate]

I'm running Debian testing and can't get a simple cron to run a symlinked PHP script. I've a php script in a subdirectory in my home folder /home/foobar/dir/script.php (which starts with the ...
1
vote
2answers
2k views

PHP Startup: Unable to load dynamic library '/usr/lib/php5/20100525/apc.so'

I have updated my php from 5.3.3 to 5.4.31. I have a Debian 6 Squeeze. PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php5/20100525/apc.so' - /usr/lib/php5/20100525/apc.so: ...
0
votes
1answer
43 views

Public and Private keys incorrect for user

I've followed this tutorial (which worked for me on several VPS's) to configure a secure way to install and update themes and plugins in Wordpress. Basically: sudo adduser wp-user cd /var/www sudo ...
0
votes
0answers
33 views

secure cookie in Apache => php session resets on every page load

I have set secure cookie in Apache based on this tutorial. But php session resets on every page load. for example this sample code: <?php session_start(); echo session_id(); ?> displays ...
-1
votes
0answers
31 views

Web Socket server using up extreme amounts of RAM

I am using this web sockets server from google https://code.google.com/p/phpwebsocket/ The default maximum frame size is 100000 bytes. When I send a ~100kb message and issue a peak memory command I ...
0
votes
1answer
1k views

Unable to install phpMyAdmin via yum (remi)

I'm trying to install phpMyAdmin via remi and it seems like it's missing php-php-gettext: # yum --enablerepo=remi install phpMyAdmin Loaded plugins: amazon-id, rhui-lb Resolving Dependencies --> ...
-3
votes
0answers
55 views

Error while installing PostgreSQL PHP PDO driver, at running ./configure

I have found a tutorial, installing PostgreSQL's PDO driver on PHP. I couldn't do without a tutorial, because yum and other repo's couldn't find required pdo packages. It starts with wget ...
0
votes
0answers
22 views

Run php as CGI with Apache 2.4 on Debian returns not found error

I am trying to run php build from source as CGI. I've added this to apache config ScriptAlias /cgi-bin/ /usr/share/php54/bin/ AddHandler handle .php Action handle /cgi-bin/php-cgi virtual ...
-1
votes
0answers
22 views

openshift php script not able to write files.

I want to install contao on openshift, but the install script stops and the check script shows error on php writing files: http://spahn-pointout.rhcloud.com/check/ All php-fles have 600 and orders 700 ...
1
vote
1answer
98 views

Nginx and different versions of PHP FPM + PHP

Due to a better understanding of what I wish to achieve thanks to Mark and his previous answer, I am posting a (hopefully) clearer and slightly different variation of my previous question as that ...
0
votes
0answers
14 views

open_basedir in different apache vhosts

Just playing around with open_basedir settings in some Apache vhosts. I created two identical vhosts for testing with differing ServerNames. Only one of that vhosts contains the open_basedir ...
2
votes
1answer
43 views

Limit the total memory usage of PHP-FPM

I'm running PHP-FPM on my Debian servers. My question is about the memory usage. I can only set the memory_limit inside PHP, and that shouldn't be too low for some requests. I also can only set the ...
16
votes
3answers
3k views

Why not use a WAMP stack?

I recently had a talk with some experienced people and they suggested to me not to use a WAMP stack, and instead install apache, mysql and php separately. I don't understand why they have suggested ...
0
votes
0answers
28 views

AVG Antivirus causes slow PHP response time

My PHP website has suffered from really slow response times, and after a long research I finally found out the culprit is AVG Antivirus installed on the web server. The website is running on IIS 7.5 ...
11
votes
3answers
49k views

How to check my PHP and MySQL version on Ubuntu VPS?

HI I am going to install MyBB but I am not sure whether I have installed the correct version of PHP and MySQL. PHP version 5.1.0 or above with XML Extension installed MySQL version 4.0 or ...
0
votes
2answers
496 views

Having issues enabling short_open_tag for PHP

First, yes I know I shouldn't use short tags, but they are all through the project I'm currently working on, and I just need it to work. I have enabled short_open_tag in /etc/php.ini and restarted ...
0
votes
0answers
44 views

PHP session handler using redis not work

I was sets 3 servers : 192.168.7.147:6379 <-- redis server 192.168.7.162 <-- web server 1 (using phpredis, with local devdomain jttest.com ) 192.168.7.218 <-- web server 1 (using phpredis, ...
0
votes
1answer
2k views

Plesk, default php.ini? [closed]

I can easly change and custom all php.ini-s for each domain, however, i don't know how to customize the core one? I want to be able to limit some settings globally but i don't know which php.ini is ...
0
votes
1answer
4k views

safe_mode problems after upgrade from PHP 5.3 to 5.4 with Plesk 11 [closed]

I just updated my server (running with Plesk 11) from PHP 5.3 to 5.4 via the dotdeb sources. Everything was fine except a few things. I had to disable all safe_modes in several vhosts. Plesk has the ...
0
votes
0answers
26 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
1answer
934 views

php set_time_limit not working with mod_fcgid?

It seems set_time_limit function call has no effect when php is running with mod_fcgid (the default in webmin). Can someone tell me how to make it work?