PHP is a widely-used, general-purpose scripting language that is especially suited for web development. Use this tag when you are dealing with a PHP script, installing PHP, or configuring a PHP installation.

learn more… | top users | synonyms

0
votes
0answers
12 views

[ error writing /usr/share/nginx/www/php-info.php

I am trying to write a file with nano sudo nano /usr/share/nginx/www/php-info.php I put: <?php echo phpinfo(); ?> and getting "[ error writing /usr/share/nginx/www/php-info.php ]" when ...
0
votes
1answer
39 views

Zabbix web install Redhat conflicts php

I am trying to install Zabbix on redhat 7 64bit. The zabbix server installed successfully with command yum install zabbix-server-mysql But I am getting conflicts with php70u with php56u when I tried ...
0
votes
1answer
3k views

mcrypt, EPEL and CentOS 6.4

I am having issues installing php-mcrypt. I am not an administrator of any level. I have performed the following. Installed EPEL Installed REMI Configured EPEL Updated YUM Cleaned YUM Installed ...
0
votes
1answer
1k views

PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/php_mysql.so'

I am running PHP 5.6 on Linux. When I try to load a PHP page, I'm getting the following PHP error. PHP Startup: Unable to load dynamic library /usr/lib64/php/modules/php_mysql.so' When I look ...
1
vote
1answer
123 views

PHP app crashes: child pid exits with Illegal instruction (4)

I have a CentOS 6 server with Apache and PHP. I run some application and can constantly reproduce this crash. After some sequential action the app dies and the only trace I found is the following ...
0
votes
1answer
1k views

Slow DNS resolve from curl/lynx etc

I have a strange issue with DNS resolving: Root of the problem is that I get curl errors: "Error executing HTTP request: name lookup timed out". Tried to ping some sites, all resolved fine (and fast). ...
2
votes
2answers
4k views

Git pull error libcurl.so.3 not found

I have a php script to git pull from my github repository set up in my webservice hook urls like so: <?php echo shell_exec('~/git/usr/bin/git pull 2>&1'); ?> When I open this script ...
1
vote
1answer
596 views

How would I run Django and LAMP on different subdomains, but on the same Apache server?

I am currently working on a development project where I need to run four different PHP programs (both with MySQL backends) and one Django project. Current Plan: XenForo (forums.domain.com) [PHP ...
4
votes
1answer
1k views

suexec with chrooted environment

I'm trying to get a chrooted Apache environment working running mod_fcgid with suexec. Looking at suexec log inside jail, the wrapper scripts are being executed with no problems, however, when I look ...
5
votes
2answers
751 views

apache and php Segmentation fault [closed]

I have recently migrated to Archlinux. I installed Apache, php and mysql according to the Arch Linux LAMP wiki page. Now I have setup a virtual host for my new Symfony project. For every request I ...
0
votes
1answer
17 views

Stopping infinit loop from php script run in linux terminal

I am currently following a tutorial that teaches how to create a queue in php. An infinite loop was created in a php script. I simplified the code in order to focus on the question at hand: while(1) ...
1
vote
0answers
476 views

Debian - Apache 2.2 & mod_php - memory usage

I have a memory problem with my servers (Debian 6.0) where is installed Apache httpd 2.2, mod_php and APC. Actually it seems that httpd allocate all available memory (4GB) when is waiting too much ...
1
vote
2answers
104 views

Tracking from httpd instance to PHP script when PHP is a module

I'm trying to figure out exactly what's going on that kicks CPU usage in random httpd workers so high but I'm having a little hard of a time figuring out what PHP page is being requested so that I can ...
1
vote
1answer
24 views

Domjudge keeps Not Authenticated

I am trying to install Domjudge in my VPS. After I run ./configure, make and config database I login at /public/login.php with the user/pass: judgehost/judge but it doesn't log me in. I try at ...
0
votes
1answer
226 views

How can I configure my server to avoid information leakage from the SERVER header of its HTTP response

I have a centos 7 server with apache v2.4.6 php 5.4.16 and OpenSSL 1.0.1e-fips installed. I was just doing a scan to it to see how secure my server is. I found out that my server is giving out ...
1
vote
1answer
118 views

Need to grab IP of visitors from the Apache logs

I want to store the IP of the visitors to my website, and I want to use PHP. Should I use cron for it or how will be the visitors' IP will be automatically stored?
0
votes
1answer
20 views

Circular dependencies that cannot be fulfilled. PHP packages on CentOS 7 to support Drupal 8

I am trying to install Drupal 8.0.5 on Apache 2.4.6 on CentOS 7, with PHP 5.6.19. I get an error that PHP extensions are disabled. The detail I get is that it pertains to "gd." I have installed, ...
4
votes
2answers
12k views

PHP on centos 6 not working

I have installed PHP, MySQL, Apache on CentOS 6, now I have restarted the Apache and mysql, to test PHP I have created a index.php on /var/www/html/test/ now once I go to localhost/test/index.php then ...
4
votes
2answers
1k views

How to set secure permissions for multiple users and multiple websites?

On a Gentoo 3.2.12 server with apache2+php, there are several websites running: /www /website1 /website2 ...etc The apache user should have read-only access to all the websites. There ...
5
votes
2answers
2k views

Permissions: What's the right way to give Apache more user permissions?

Context: I am making an in-browser control panel that gives me one button access to a library of scripts (.sh and .php) that I've written to process various kinds of data for a project. It's a "one ...
5
votes
2answers
20k views

Execute shell script from php, as root user?

Need to execute the following line from PHP: $res = shell_exec('sudo sh /home/nicklas/cronjobs/make_account.sh username password'); The problem is nothing happens on execution. If i try to ...
0
votes
0answers
60 views

How do I use php-fpm on RHEL 7.2?

I've already asked this on Stack Overflow but received no response, so I'm trying my luck here. I'm new to configuring Apache and I'm trying to optimize my Apache server. Reading through the ...
1
vote
1answer
41 views

Data from python script to website

This involves a raspberry pi and apache2 so I thought the question would be good to go here.. have never used web sockets and things like that before so I'm pretty lost and hoping for some ...
0
votes
3answers
27 views

Does it matter if I'm root or not when installing apache?

I need to install a LAMP stack on a RHEL 6.7 server. Do I have to be root to install this or not?
7
votes
1answer
958 views

Opening port 80 but remain secure

I have a standard installation of Ubuntu 10.04, and have installed the LAMP stack so I can do some web development locally. On my router I have opened port 80 so I can develop with external services ...
7
votes
4answers
4k views

Case-insensitive file system for production server?

The initial situation looks like this: The corporate software is PHP-based. It is delivered by Apache 2 on a Windows 2003 Server. It is big. It is a legacy of rather unprofessional developers who ...
31
votes
2answers
88k views

What user should apache and PHP be running as? What permissions should /var/www files have?

I just spun up an Ubuntu 11.10 box and then ran apt-get install apache2 php5 to install apache2 and PHP 5 on the box. Now it is functioning as a "web server" and it loads the "It Works!" page. Now I'm ...
0
votes
0answers
8 views

LAMP server Installation - httpd, mysql are 'unrecognized services'

I recently installed Bitnami LAMP server to have apache, mysql and php on my server with redhat 6.7. The installation was fine, I can see httpd and mysql processes; even the wget from localhost ...
2
votes
2answers
59 views

Restarting httpd kills scripts executed from PHP

My game server has a custom PHP administration interface, which can run the server manually by running the start shell script with exec and sudo -E. However, if I restart httpd using service httpd ...
0
votes
0answers
22 views

Zimbra z-push provisioning: ERR_TOO_MANY_REDIRECTS

I'm trying to install z-push provisioning in my zimbra environment to control mobile devices with GUI. So : OS : Centos 7 Zimbra version 8.6 Z-push version : 1.5 To install Z-push I have this ...
2
votes
0answers
73 views

munin phpfpm plugin

I have setup PHP-FPM plugin All graphs works except three PHP5-FPM Average Process Size PHP5-FPM Memory Usage PHP5-FPM Processes setup /etc/munin/plugin-conf.d/munin-node [phpfpm_*] env.url ...
4
votes
1answer
2k views

Howto fix my PHP install on FreeBSD using pkg

I've been messing around with pkg install, installing / removing both php5-5.4.29 and php55-5.5.13. But when I run php from the command line, it will give me an error like this: PHP Warning: PHP ...
5
votes
3answers
586 views

File permissions

I have a PHP script running which makes symlinks. To confirm which user it is: file_put_contents("testFile", "test"); $user = fileowner("testFile"); unlink("testFile"); echo "running as user '" . ...
0
votes
0answers
45 views

Nightmare importing database from old mySQL/PHP to new one

I have a system that failed on me. That system was running CentOS 6.0, PHP4 and MySQL 5 (if I am not wrong). That database contains latin characters, letters like á, é, ç, ó, ã, etc. From the ...
1
vote
1answer
1k views

phpmyadmin doesn't work after installing php5-mysqlnd

I am currently running into some problems with phpMyAdmin. I set everything up correctly and made sure everything worked. Then later after some developing on some pages I noticed I couldn't execute ...
1
vote
1answer
1k views

PECL memcached installation gets error

I installed Zend Server 6 (debian). Also installed several packages: apt-get install gcc apt-get install g++ apt-get install libncurses5-dev apt-get install zlib1g apt-get install zlib1g-dev ...
2
votes
1answer
59 views

Expect PECL for PHP 7

I just upgraded to PHP 7.0.3, but there is no support for expect. Does anyone know if is it possible to bypass the installation issue? It says: root@portal:/home# pecl install expect-0.3.3.tgz ...
0
votes
2answers
38 views

find composer global install path as root

I have some php packages installed globally using php composer within a script sudo -u me composer global require "phpmd/phpmd" I want to find the path of these globally installed php packages. ...
0
votes
0answers
30 views

How to install old PHP version 5.2.17 package using yum?

I am trying to update php 5.2.9 to 5.2.17 as it is a bridge version to upgrade client's existing CMS. Is there a way to install this specific version using yum?
0
votes
1answer
4k views

How to install Owncloud on CentOS 6.5

I wanted to install Owncloud on my VPS running CentOS 6.5. I followed the instructions on the official owncloud website but when I run the command yum install owncloud it says Error: Package: ...
1
vote
3answers
2k views

How to do a fast convert of a .xls (MS Excel) file to .csv

How can I do a fast convert of excel to csv? I have tried with php, perl, JavaScript. but it takes too much time. For example, for a 5MB file it will take 3-5 minutes.
0
votes
0answers
151 views

Why does “Connection Failed: 2002” display randomly on my PHP/MySQL website?

I'm running CentOS 6 with Apache/PHP/MySQL. PS. I'm sort of a novice at Linux, but I did my best to gather info before coming here. I'm now a bit stuck. I recently upgraded PHP to version 5.5.12. I ...
2
votes
1answer
740 views

Error passing variable from bash to php

I have the following files: vars.txt C=1234567890 Ascript.php #!/usr/bin/php <?php var $C="$argv[1]"; echo "\n $C \n"; $con = mysql_connect('localhost','root','123') or die ("No connected"); ...
1
vote
2answers
3k views

PHP exec command has the result 0 even if an error occurs

I have this PHP code: $execout=exec('ssh root@xxx.xxx.xxx.xx "sudo /etc/init.d/smokeping reload"',$output1,$result); if($result !=0){ echo"that can't reload"; } else{ echo "successfully ...
1
vote
1answer
47 views

Locating PHP extension folder using bash

I'm trying to build a bash script to install the Source Guardian PHP extension however the destination directory is different on every subsequent release of Ubuntu. Installing PHP5 on Ubuntu 14.04 ...
1
vote
0answers
17 views

PHP does not use MySQL default sockets

I am having a hard time understanding why PHP cannot connect with localhost as a host. I can connect by doing: mysql -uroot -p And also, through Sequel Pro I can connect with localhost as a host. ...
7
votes
5answers
12k views

Is there any command to enable/disable a php extension from command line?

Is there any command to enable/disable a php extension easily from command line? (php.ini)
0
votes
2answers
978 views

How find and install PHP 5.3.10 or later on CentOS 6.5?

When I check yum list php it only shows 5.3.3 which is older than 5.3.10. How do I get and install the newer PHP? (Using CentOS 6.5)
0
votes
0answers
93 views

Installing mysqlnd for php 5.6 on CentOs 7

I get php warning: mysql_connect(): Headers and client library minor version mismatch. Headers:50547 Library:50624 Also I read that I need to install mysqlnd to my server. I tried do it using: ...
0
votes
0answers
25 views

NGINX and PHP Pools

We host quite a few client sites, and I've inherited a shared hosting ecosystem on DigitalOcean. We run a LEMP stack, and all sites were at the same permission access level as eachother. We are now ...