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

2
votes
1answer
91 views

nginx config with php and alias broken after update

I have configured access to a local directory through an nginx alias + php support: https://mydomain.de/wbg points to /var/www/wallabag. Everything was working fine until I did a normal apt-get update ...
0
votes
0answers
35 views

DataTables warning: JSON data from server could not be parsed

This is my first post on ServerFault. I hope that this question is detailed enough for someone to help me. I have looked online for two days regarding, "DataTables warning (table id = ...
1
vote
2answers
91 views

Clean URLs and php extension on nginx

I've looked at dozens of other questions and references on the web - and by all my calculations, my setup should work, but it doesn't. I have nginx installation with php-fpm. If I try to access a ...
0
votes
1answer
65 views

mysqldump (using PHP exec) not dumping file but no error

I wasn't sure if this was a SO or SF question but I thought this might be the best place. I apologise if it is not! I am using mysqldump through PHP exec but it doesn't seem to be working. The code I ...
1
vote
0answers
123 views

Windows PHP 7.0.3 x64 (Apache handle) crash after a lot of request with zend_mm_heap corrupted [closed]

I'm testing PHP 7 x64 on my Windows 7 workstation with a basic Apache benchmark F:\apache\bin\ab -c 200 -n 2000 localhost/index.php index.php is simple <?php phpinfo(); the benchmark ...
1
vote
1answer
140 views

Upgrade PHP from 5.3 to 5.6, unmet dependencies

I have a OVH VPS which runs php 5.3. I would like to update to php 5.6. I've used this solution (How do I upgrade from PHP 5.3 to PHP 5.4.6 in Ubuntu?) : sudo add-apt-repository ppa:ondrej/php5-5.6 ...
0
votes
0answers
28 views

Amazon ec2 apache needs to restart frequently

I launched a new instance on amazon ec2 (Frankfurt availability zone) and installed apache server (php & MySQL) and an SSL certificate. The website is not launched yet so there is no traffic. ...
0
votes
1answer
290 views

Can't Install mcrypt for CentOS 7 Using php-common-5.4.16

I've tried installing mcrypt and I'm receiving an error (below). Basically the error says I have the wrong version of PHP (as far as I can tell). I've seen a similar post here: Can't install ...
0
votes
0answers
27 views

Nginx + php5-fpm not logging errors

How to log all PHP warnings and errors? /var/ini/php/php.ini log_errors = On error_log = /var/log/php_errors.log /var/ini/php/pools/php.conf catch_workers_output = yes When I restart php5-fpm ...
0
votes
1answer
66 views

From Bitbucket to Elastic beanstalk - PHP deployment

Context A PHP project is set up on bitbucket cloud. Code is developed locally in XAMPP. The code runs in Amazon Web Service Elastic Beanstalk environment. Problem I commit my changes locally and ...
0
votes
2answers
233 views

PHP5 unmet dependencies when upgrading

Trying to upgrade PHP from 5.3 to 5.6 using the following: sudo add-apt-repository ppa:ondrej/php5-5.6 sudo apt-get update sudo apt-get install php5-common When I try this, I run into this error ...
0
votes
0answers
88 views

Migrate zend application to IIS 8.5 webserver with PHP 7.0.1 already installed

I'm busy with transferring my web applications from an IIS 5.0 webserver with PHP 5.3 installed to a new server with IIS 8.5 and PHP 7.0.1. installed. I started with transferring a few application ...
-1
votes
1answer
99 views

sendmail and gmail not received [duplicate]

I try to send mail with sendmail (Debian 8) from a PHP script. It does work but only gmail is not working. Sending a mail from root, I got this message xxx@gmail.com... Connecting to ...
0
votes
1answer
25 views

Allow LDAP Authentication (or connection)

I'm trying to make a webapp that authenticate throw a LDAP Server. But i get this error: ldap_bind(): Unable to bind to server: Can't contact LDAP server And when i try this command: ldapwhoami ...
0
votes
0answers
36 views

Read Files from S3FS mount with PHP

We have a S3 bucket we use for video uploading. I also have a script for accessing the Youtube API so I can pull the upload files from a server rather than via the Web interface. This used to work ...
1
vote
1answer
59 views

PHP-FPM crashes when having too many users while doing a heavy job

I have a Server running Apache/2.2.22 (Debian), PHP 5.6.17 as FPM and MySQL 5.6.25. The project runs using a CMS called Redaxo (I don't think it's that important, but I'll tell ya anyway). In Redaxo ...
0
votes
1answer
23 views

PHP FPM Timing Out

We have PHP FPM with Apache running Wordpress. Occasionally I have noticed certain plugins that call external URLs have the ability to really mess with FPM resulting in lots of timeouts etc if the ...
0
votes
1answer
70 views

Debian apache2 is not executing php scripts, instead it's showing the source

I know this is probably most discussed topic online, I did search here and stackexchange and tried various answers but none of them seems to be working for me, hence why I am posting this. I have a ...
0
votes
1answer
83 views

How to remove injected code between two strings recursively in PHP files using SSH

We have in-house Linux(Ubuntu) development server. Few days ago suspicious code was injected. Just to mention here that we have more than 300 projects. Code is injected in almost every file ...
0
votes
0answers
13 views

Separated Java EE and PHP APIs running in the same machine and sharing the same SQL database general workaround

Having in mind the Java EE and the PHP APIs are completely separated (this is not about using java processes from PHP or PHP processes from java) and they will only share the database, is there any ...
-2
votes
1answer
28 views

Shared hosting vs VPS [closed]

I am looking at the shared hosting vs VPS plans, and I see that although VPS is much more expensive, I have only limited storage. Whereas in shared hosting I have unlimited storage? Why is this? What ...
0
votes
0answers
56 views

Enable Firebird Interbase for PHP on Ubuntu LAMPP

I installed Firebird on Windows along with XAMPP and all went OK. On Ubuntu, after installing Firebird Server following the instructions here. I uncommented the "interbase.so" line in php.ini, but I ...
1
vote
0answers
74 views

migrating htaccess from Apache to nginx

I'm trying to start using Homestead for my non-Laravel projects (legacy) and I managed to install box 0.3.3 successfully by cloning laravel/homestead 2.2.1 (with PHP 5.6.15). Now my problem is due to ...
0
votes
1answer
115 views

nginx GEOIP behind cloudflare proxy showing wrong country (not of end user, but if proxy)

I am using Cloudflare and nginx geoip directives: geoip_country /usr/local/share/GeoIP/GeoIP.dat; geoip_city /usr/local/share/GeoIP/GeoLiteCity.dat; They are picking the IP up OK (as pipaddress ...
3
votes
2answers
105 views

Upgrade Php 5.4 to 5.6? Upgrade debian 7 to 8?

My Operating System is Debian 7.9. My dedicated server hosts only a website in PHP (5.4 apparently), and some databases (MySQL). There are also programs like iptables, fail2ban, etc. set up. I made ...
0
votes
2answers
83 views

Deleting expired PHP session files on Ubuntu 14.04

Everything started with MySQL not being able to start. After some web searching I found out that the server ran out of inodes. df -i Filesystem Inodes IUsed IFree IUse% Mounted on ...
1
vote
1answer
23 views

How to upgrade from php 5.2.14 to php 5.3.3 on SLES11

I am in the process of installing dokuwiki on my SLES11 server, but for some reason, dokuwiki only wants php 5.3.3 and up. I realized that after installing php through the system, and it installed ...
1
vote
1answer
26 views

Small queries wait for large queries to resolve MYSQL PHP on Centos 6.5

I have a Centos 6.5, and I'm running Vaadin on Tomcat, This application has really heavy queries for reports and stuffs. My problem is, when I'm connect to MYSQL from PHP, when I made a small query, ...
1
vote
1answer
408 views

Bad Gateway 502 (nginx + php7) on Digital Ocean

Every time when I try to publish my site, I get after a couple of minutes 502 Bad Gateway error, and in my default-error.log file I get this error over and over (file size was 360MB..): 2016/02/03 ...
1
vote
0answers
68 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 ...
3
votes
3answers
327 views

Cron appears to run but doesn't execute in the same way as when run manually from the terminal [duplicate]

I have a php script that connects to an external API returns some data and updates a database table. I can run this directly via my command line / SSH terminal and it works fine (takes about 5 minutes ...
2
votes
1answer
127 views

Run a specivic (older) php version with nginx, php-fpm on debian

In order to migrate old php software, I want to run php 5.3.* so I: Removed php via apt-get purge php* Added the corresponding http://snapshot.debian.org/archive/debian/ to the sources Installed ...
0
votes
0answers
27 views

Cannot Upload Files Over A Specific Size to Wordpress

When uploading larger files to any WordPress site running on a local server it fails. If I try outside of the network it works fine, if I switch to the other LAN network running and connect to the ...
1
vote
1answer
23 views

Restrict user from executing shell commands using PHP

Let's say that i have shared hosting and i want to secure that place, from executing shell commands. I'v installed suphp, so that users can execute PHP separately. I also did some other things in ...
3
votes
1answer
219 views

php-fpm and nginx @ high CPU usage?

My server is with DigitalOcean with the following plan: 2 Core Processor 2 GB Memory My website is receiving thousands of visitors, however, both CPU cores are @ 100%: The issue seems to be with ...
1
vote
1answer
46 views

MySQL keeps crashing at unknown intervals

Version: '5.1.73' socket: '/var/lib/mysql/mysql.sock' port: 3306 Source distribution 160130 08:29:38 mysqld_safe Number of ...
1
vote
0answers
52 views

PHP page refuses to appear despite checking php-fpm, SELinux, and nginx

Problem I have a small web server that hosts a small PHP page that performs a very small function. I used to host this on another machine. I move the website to a new machine with a different ...
1
vote
0answers
22 views

How to run root commands form a website? [closed]

Im working on a project, in it I intend to make a website with server administartion functionalities. So far, I'm able to run all guest commands like ping,nmap,etc. But, I want to run root commands as ...
1
vote
0answers
126 views

Enable XSendFile on Apache on Mac OS X 10.10 - “Invalid command 'XSendFile'”

I have compiled and installed sendfile 0.12 on our mac web server. The module is enabled in the httpd.conf file, as below: LoadModule xsendfile_module libexec/apache2/mod_xsendfile.so I've ...
0
votes
0answers
17 views

Identifying PHP module already loaded breaking new Nginx virtual site

This is my first time on Server Fault, so I hope this is something you can help with. I have added a second website to my Nginx server, but the PHP site installation isn't working and gives the ...
1
vote
2answers
78 views

How can I get my mediawiki to stop thinking I have cookies disabled?

I've searched half a day for how to resolve this issue, and can't figure it out. Shortly after I made my wiki a simple private wiki according to the instructions at Mediawiki's website, it started ...
0
votes
2answers
25 views

.htaccess rule gives 500 error for php file

I used a stackoverflow answer to come up with what I was trying to do. I want requests to http://myserver.com/book/1234 to actually show the content form php file http://myserver.com/book.php?id=1234 ...
0
votes
2answers
41 views

How do I send (legitimate) email on a dedicated server as appearing from different domains?

We need to send email using PHP's mail() function (Actually CakePHP, which wraps that function) directly from our dedicated server (app.ourserver.com). We would like to send mail from ...
1
vote
0answers
27 views

php displays code when the first line of the file is <?php but displays results when the first line is a html tag [closed]

When the first line of my php file is <?php the server shows the php code in the browser. But when I add some html code first, e.g. <html><?php, it runs the php code and displays the ...
1
vote
2answers
845 views

PHP 7 conflicts with PHP 5 (Centos 7)

Trying to install PHP 7 now that it's available; (on centos 7) added repo's: rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm rpm -Uvh ...
1
vote
1answer
83 views

httpd memory usage (Apache/2.4.16 (Amazon))

I'm running an apache server (default configuration, mod_php) on an amazon linux VM with just 1G of RAM. There are two kinds of php applications running: memory heavy ones that are executed not so ...
0
votes
1answer
71 views

Running cron job manually and immediately with PHP

I just wanted to run all my cronjob manually and immediately, following command works well in command line terminal but not working with shell_exec crontab -l | grep -v '^#' | cut -f 6- -d ' ' | ...
0
votes
1answer
35 views

Nginx .php scripts restriction in subfolder

I would like to deny external (from web) access to some PHP files related to MoxieManager. Whole MoxieManager is in www/moxiemanager folder, where www is accessible from web. Now I tried this ...
0
votes
1answer
51 views

Single Thread CPU Performance with PHP

I have a lamp web server running a website that is getting very feature bloated. I have a few pages that are taking 2-3 seconds of CPU time to render the PHP. Most other pages a processed in about .2 ...
1
vote
2answers
64 views

How to check if php built-in server is running

Recent versions of PHP has a built-in webserver (for non-production environments) that can be started with php -S [...]. How can I check if it's already running on the server before attempting to ...