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

Unable to retrieve HTTP_SESSION

I have set up a login form using Apache2's mod_auth_form. Now I am trying to retrieve the login of the user in a PHP script using the HTTP_SESSION environment variable, as advertised in mod_session's ...
0
votes
1answer
31 views

Fix PHP error Invalid argument supplied for foreach() after update PHP & Mysql

I have updated PHP from 5.3 version to PHP 5.6.21 (mod_fcgid) on my CentOs 6.5 vps. The vps holds 4 Prestashop and almost works but cart doesn't work as expected. The php error log contains this ...
0
votes
0answers
20 views

Render backslashes in environment variables

I am on CentOS 7 with PHP 5.5.34 (cli) I have some environment variables set in /etc/environment and have my apache config set to use /etc/environment as one of it's EnvironmentFile directives in ...
0
votes
0answers
27 views

Suspected Ubuntu PHP Garbage Collection Locking Server

I'm running Ubuntu 14.04 LTS with PHP 5.6.20 and, symptomatically, the server periodically fails to serve requests. I believe this occurs around the time that the PHP garage collection cron job ...
0
votes
1answer
57 views

Cannot get php5-fpm to work on Ubuntu 14.04 with Apache 2.4.7

I have been trying for two days now to upgrade my regular LAMP stack to use php5-fpm and event-mpm, but it just doesn't want to work! At this point seems like I've tried everything to make it work, ...
0
votes
1answer
22 views

New server worked for a few hours, but now connections time out

I used this guide to set up Apache2 and PHP5: link. I set up a simple PHP script, debugged some permissions issues, got everything working. A few hours later, it stopped working. I could no longer ...
0
votes
0answers
17 views

Unable to install php5-mysql on Ubuntu 14.04

When I'm trying to install php5-mysql on my local PC with Ubuntu version: # cat /etc/*-release DISTRIB_ID=Ubuntu DISTRIB_RELEASE=14.04 DISTRIB_CODENAME=trusty DISTRIB_DESCRIPTION="Ubuntu 14.04.4 LTS" ...
0
votes
1answer
32 views

A Website in my Centos 6 server is picking incorrect PHP version

I have a CentOS 6 server that has PHP 5.6.20 installed: # php -v PHP 5.6.20 (cli) (built: Apr 2 2016 08:28:23) Copyright (c) 1997-2016 The PHP Group Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend ...
0
votes
0answers
16 views

Permission update on PHP script with Apache2 and mod_php

I have done my tests using a stock and up-to-date Apache2+PHP5 install on Debian Jessie, with mod_php. Let's say Apache runs under www-data system account (I've done other tests with mpm-itk and a ...
0
votes
1answer
66 views

Configuring apache2-mpm-worker with php5

I have a ubuntu 14.04.4 server box and I have installed apache2 and php5 packages but after enabling mpm_worker and restart apache I got following error " Apache is running a threaded MPM, but your ...
0
votes
0answers
37 views

Codeigniter links not working without index.php

I have a code igniter application that used to work properly in wamp, but after shifting to lamp it stopped working normally. Also I have used Modular Extensions to make my app follow HMVC Only the ...
1
vote
0answers
39 views

PHP Script sending spams and mail.add_x_header not working

I've got my server hacked lately by some Php64 malware. Since then, I have found a lot of PHP files in my /var/www sub-folders. I am trying to delete each of these or clearing the files when some ...
1
vote
0answers
28 views

apache php-fpm: How to run scripts on same domain w/ different users

I have a number of directories containing php scripts that need to be run as separate users. Example directory structure is as follows: /var/www ├── project │ ├── item1 │ │   └── script1.php │ ...
0
votes
0answers
29 views

php-main.sock file not found in php version 5.6.20

I have successfully installed nginx version 1.9.11 on my remote server, running CentOS 7. I also installed PHP version 5.6.20 by following this link. I am trying to use a PHP socket for running PHP, ...
0
votes
0answers
14 views

TMPDIR not set on Ubuntu Server

Just got a brand new Ubuntu server from my hosting company which will be mainly used for Wordpress sites. I'm going through apache and php settings to harden the server but when testing a Wordpress ...
1
vote
1answer
69 views

MS Native SQL driver 10.0 and SQL Server 2008 connection creation failure

I'm trying to narrow down and debug quite elusive error: State: 08001 Code: 258 Msg: [Microsoft][SQL Server Native Client 10.0]TCP Provider: Timeout error [258]. State: HYT00 Code: 0 Msg: ...
0
votes
0answers
25 views

Nginx and strange file permissions after upload

I am trying to upload files inside of wordpress, but I am getting errors. This is not due to the upload failing, but the upload having the wrong permissions. I can find the uploaded file, and when I ...
0
votes
0answers
42 views

PHP unable to load dynamic library's library

I have been trying to get imagick to work on a normal lamp server. What I did: sudo apt-get --purge remove "imagemagick" sudo apt-get --purge remove "php5-imagick*" service apache2 restart (lib not ...
0
votes
0answers
57 views

Confused about bottleneck on Mysql cluster 7.3 or apache2.2.x/php5.5

I have setup a mysql cluster 7.3.x with 2 Datanodes,2 SQL nodes and 1 Management Node in a LXD/LXC centos 6.7 containers and a separate Apache 2.2.x/PHP-5.5 web server. The website currently serves a ...
0
votes
1answer
12 views

Forwarding custom page rule for known ip adresses

I want to add some ip adresses to a blacklist, and i want to show these ip addresses in blacklist a custom web page that includes a "you are in blacklist" message on body. How can i do this? I have ...
0
votes
0answers
54 views

IIS 7 Error 500 on some file downloads

I'm having a very strange issue with IIS 7 on Windows Server 2008 R2, I have tried this on 2 different servers one hosted locally and one in the cloud. Both running PHP 5.5.30, with IIS URL rewrite ...
1
vote
0answers
70 views

Getting 404 Not Found while PHP works in background - Nginx

I have noticed that I get 404 - Not Found when calling a .php file even if the script works in background. The php file downloads a long Json and populates a db until I close the window. I am using ...
0
votes
0answers
66 views

Apache does not follow symlinks to locations on external drives

I have run into a problem using glob function. I use it to scan the entire directory contents and everything is shown except for the symlinks that are mapped from an external hdd or the other ...
0
votes
1answer
124 views

php:5-apache docker image no /etc/php/apache2/php.ini

I just pulled docker image php:5-apache and it runs well and all but there is no /etc/php5/apache2/php.ini file so I can't add extension=mongodb.so even if it is installed with PECL.
0
votes
2answers
30 views

Create and save mail to inbox locally with Postfix

Apparently it's as simple as just sending an e-mail to a local account, and configuring Postfix to receive mail for the local account. Not too shabby! Original Question This hypothetic server would ...
1
vote
2answers
113 views

Apache webserver HTTPS port redirects to HTTP with port 443

At my work I installed Mediawiki (latest version) on a Apache webserver 2.4.6 with PHP 5. Everthing works fine when I want to access the wiki pages locally and I configure a hostname in Mediawiki ...
0
votes
1answer
30 views

Php can't find hash function

I'm using apache with php on amazon linux. I've updated php from 5.3 to 5.5 and apache from 2.2 to 2.4. Now calling echo hash('sha256','wtf'); is behaving in a strange way. It works for a while and ...
0
votes
0answers
53 views

laravel site using hhvm broke rewriting url

I tried to find a solution everywhere, even if the answers look close to my issue I was not able to have the correct solution. I built a website with laravel. My config is the following : laravel ...
0
votes
0answers
73 views

Apache + PHP Memory Limit Upload Issue

My environment is Fedora 20, Apache 2.4.10, and php 5.5.26 and I am having an issue with uploading a file that is greater than 2 GB's. If I upload a file greater than 2 gb's I'm noticing that while ...
0
votes
0answers
37 views

PHP session inconsistent persistence on server

I don't like the term "random" for bugs, but this is how it is presenting itself: for some users, irrespective of browser, location or other considerations are having sessions be set and persist over ...
2
votes
2answers
238 views

CentOS 7.2, PHP 5.4 - MySQL extension is missing [closed]

I'm trying to install a Wordpress blog on my Linux server (CentOS 7.2), using PHP 5.4 and MariaDB, but I keep running into this error: Your PHP installation appears to be missing the MySQL extension ...
2
votes
1answer
128 views

Issue installing Ioncube with PHP 5.6.11 with Apache 2.4.16 on centOS 6.7

This is how I am compiling PHP 5.6.11 with apache2 2.4.16 on cenOS 6.7: ./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-config-file-path=/usr/local/lib --with-mysql --with-curl ...
0
votes
1answer
91 views

Are the php-zts extensions needed when the mpm is event?

my php is correctly installed and working, but at Apache startup I have all the current loaded extensions with warning messages like... [23-Dec-2015 21:47:45 UTC] PHP Warning: PHP Startup: bz2: ...
-1
votes
1answer
46 views

FreeBSD -no internet access -no packages

I just used this command: make -DBATCH install clean and realized that I don't have access to internet from FreeBSD. If I type the address manually the browser doesn't let me see them. Can ...
0
votes
0answers
70 views

Using multiple versions of php

I have gone through the linked SO question already. I want to use php 5.6.16 as the default one on my debian installation. I've compiled it already with the --with-apxs2=/opt/httpd/bin/apxs parameter ...
1
vote
0answers
18 views

Website trying to pull up a page from a different site

We've had an issue come up a couple times in the past month or so, and I don't know what is causing it. After the first time, we wrote it off as a fluke, but it happened again today, so I'm looking ...
0
votes
1answer
61 views

PHP Fatal error: Directive 'register_globals' is no longer available in PHP in Unknown on line 0 [duplicate]

Cron [ -x /usr/lib/php5/sessionclean ] && /usr/lib/php5/sessionclean PHP Fatal error: Directive 'register_globals' is no longer available in PHP in Unknown on line 0 Hi, root get above ...
0
votes
0answers
152 views

How do I install PDO drivers for PHP on Windows?

I installed Apache, PHP 5.6 and MySQL 5.7 on a Windows server. In php.ini, I enabled the following: extension=php_mysql.dll extension=php_mysqli.dll extension=php_oci8_12c.dll ...
0
votes
2answers
151 views

Error with apache 2.4 and PHP 5.6.14-0+deb8u1 With fpm

I have a Vagrant machine with: Apache/2.4.10 (Debian) PHP 5.6.14-0+deb8u1 and PHP-FPM. In some case I get this error: 500 Internal Server Error. And I have this in message in php5-fpm.log ...
0
votes
0answers
56 views

Nginx - File uploading with a php backend?

I want to set up a simple nginx server that takes uploaded files and runs a few checks and shell commands on them before moving them to the /files directory. Is it possible to do this with a php file ...
0
votes
0answers
18 views

PHP files downloading instead of executing [duplicate]

I have what I understand to be a reasonably common problem-- Apache is downloading PHP files instead of executing them. I've used the solutions on other threads as best as I was able and learned the ...
0
votes
1answer
98 views

Apache serves PHP file as plain text if %20 is added to the file extension [closed]

I've never seen this before and Google didn't lead to any results so far. I am almost sure it is a mistake so stupid that I should see it but I just don't. I have a very basic Apache server with PHP, ...
0
votes
0answers
60 views

Run a different version of PHP on a domain directory?

I'm aware that it's perfectly possible to run different PHP versions on different domains/vhosts. But, someone is asking me to run a different PHP version on a domain directory because "there are ...
0
votes
0answers
49 views

postfix / php mail() on ubuntu 14.04: no mail sent, no trace in log

Setup: Ubuntu 14.04 postfix 2.11.0 php 5.6.15 Php's mail() function does not send out emails on my VPS and no issue appears on the log. My test script is very basic: <?php ...
1
vote
1answer
1k views

Ubuntu 12.04 PHP 5.3 to 5.5 update fails

on a Ubuntu 12.04 Server I´m trying to update PHP 5.3 to 5.5 this is what I have done: sudo add-apt-repository ppa:ondrej/php5 sudo apt-get update sudo apt-get install php5 unfortuntely the ...
2
votes
1answer
146 views

Inconsistent download size with PHP + NGINX configuration

I'm building a Joomla website using docman for document management/downloading. The site is built on a Ubuntu 14.04 server running Nginx 1.4.2 and PHP5 (FPM). The issue i'm having is that files are ...
1
vote
0answers
35 views

upgrading PHP from 5.3.3 to 5.4.40 breaks

I have a RHEL 6.7 server running: Apache: 2.2.15 PHP 5.3.3 getenforce => Disabled As is, its working fine. The web master for the server tells me that PHP-5.3 will no longer work with Facebook's API ...
0
votes
0answers
613 views

500 Internal Server Laravel 4 on Apache

I have project in Laravel 4. It's on bitbucket. I've downloaded it from my repo on my local machine, crated a local virtual host, working fine. But when I cloned the same project on my server and ...
0
votes
1answer
314 views

sqlsrv not showing up in phpinfo.

I'm using Win server 2k12, php 5.5.12, on wamp. Edited php.ini (both on apache dir and php dir) to add php_sqlsrv_55_ts.dll and the php_pdo_sqlsrv_55_ts.dll, and configured the extension dir path ...
2
votes
1answer
32 views

Why is my connection to php-fpm.sock being refused?

I've seen a bunch of questions about this problem on here but none of those had answers that helped me out. I kept getting a 502 error from nginx so I took a look at the access.log and saw I kept ...