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

PHP-FPM Permission denied on folders

I get read/write errors on a new CentOS + Nginx + PHP-FPM server, this is muy configuration Nginx user nginx; [...] fastcgi_pass 127.0.0.1:9000; PHP-FPM user = nginx group = nginx listen = ...
0
votes
0answers
231 views

How to install laravel on xampp?

I'm using the latest version of manjaro 64 bit and latest version of xampp. I want to install composer and laravel, tried many solutions on stackoverflow and askubuntu. Everytime I see a different ...
0
votes
0answers
188 views

nginx + php-fpm error: failed to ptrace(PEEKDATA) pid: Input/output error

I'm seeing a few of errors like the one below in the php-fpm-error.log. We're running a Fedora setup with nginx and php-fpm and I'm just wondering what it means. Any ideas? ERROR: failed to ...
2
votes
0answers
35 views

Fatal error: Call to undefined function gzopen() in /etc/apache2/htdocs/sites/all/modules/smart_ip/includes/smart_ip.utility.inc on line 454

I'm using centos 6.7, http 2.4.17, mysql 5.1, php 5.5.30. web page is working fine but at bottom it is giving below error. Fatal error: Call to undefined function gzopen() in ...
1
vote
3answers
103 views

How to add tag for xml from file exist using shell linux

xml1.xml <app> <bbb> <jjj>test1</jjj> </bbb> <bbb> <jjj>test2</jjj> </bbb> </app> xml2.xml file2 ...
1
vote
1answer
31 views

Nginx redirects all domains to one website

I'm trying to setup a server with Nginx and PHP FPM and I ran into some trouble. I've set up an Nginx virtual host and a fpm pool for each website. The problem is that all domains are showing the ...
1
vote
1answer
262 views

shell_exec cannot create file

I'm using nginx webserver and I'm writing a script that includes file creation but www-data is not able to create the file even I give permission in the sudoers list. Inside my sudoers file: ...
0
votes
1answer
26 views

Enable modules in PHP 5 without recompiling

I am trying to install a CMS which requires the mbstring module for PHP. According to that page, the module is installed but not activated by default. The article links to an install page which ...
1
vote
1answer
88 views

Need To grab IP of visitors from the Apache logs , How could I do it?

I want to store the IP of the visitors to my website, 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
80 views

ffmpeg output.mp4 with size 0

I have a video upload script in php where i exec the following command exec("/usr/bin/ffmpeg -i ".$folder."/".$filenameIn.".mp4 ".$folder."/".$filenameOut.".flv 2>&1", $output); and the ...
0
votes
0answers
30 views

Error Output From HHVM Under Nginx

I have a web-server that I've set up with nginx with HHVM for handling PHP, and everything's working great except for one minor gripe; the location of PHP errors. When I was using PHP-FPM, errors ...
2
votes
1answer
287 views

How to read variables from a php file in bash

How do I export variables from a PHP script in Bash? I'm writing a Bash script to read database names from config.php files of each website, and then import the database from the backup repository. I ...
0
votes
1answer
27 views

Execute a php file x amount of times one after another

If I execute a php file like such: php phpfiletoexecute.php It will run 1 time. What I would like to do, is run the php file example 5 times one after another (1st completes, 2nd run starts, 3rd, ...
0
votes
1answer
222 views

Fedora 23 Apache and PHP not working

I am struggling to get an answer to this. I have Fedora 23 install, in place upgrade from Fedora 22. When I go to http://localhost I get a list of files and folder and not the Fedora Test Page as it ...
0
votes
1answer
92 views

How to update apache, mysql, phpmyadmin and php?

I have my own web server running on my raspberry pi, and all my programs are outdated. I would like to update my PHP, Apache, MySQL, and phpMyAdmin. Can anyone tell me how to update all of these;? ...
0
votes
2answers
21 views

file globbing in bash not being picked up by php -l

I am trying to run php's lint function on all files in a directory, and it's proving to be harder than I expected. (I know there are non-php files here; I'm not concerned about that right now.) Here's ...
0
votes
1answer
55 views

bash PHP versus Plesk domain installed PHP

I have configured my domain to use PHP 5.5.30 ... but when I SSH into the server, bash is telling me that the php -v is 5.4.13 Why does bash use a different version of PHP, even though when running ...
-1
votes
1answer
128 views

imagettftext(): Could not find/open font in /usr/share/pear/Image/Canvas/GD.php

I’m using this tutorial http://www.phpbuilder.com/columns/ian_gilfillan20060503.php3?page=2 But when I try and use a font I see the following in http error log and no font is displayed. From ...
0
votes
1answer
167 views

Configure a subdomain (Virtualhost) for phpMyAdmin

I have a problem with configuring a subdomain (Virtualhost) for phpMyAdmin. My current .conf look like this: <VirtualHost *:80> ServerName php.erichermansson.com ServerAdmin ...
0
votes
1answer
47 views

Update /bin/usr/php in CentOS 6 [duplicate]

I have Plesk 12.5 installed, and it allows you to install multiple versions of PHP to be selectable within hosting spaces (domains), but the issue I've having right now is that the php that is being ...
2
votes
1answer
420 views

Change PHP PATH Variable for SSH

I'm trying to figure out how to change which version of PHP the php alias uses... I want it to use: /opt/plesk/php/5.6/bin/php But it currently uses: /usr/bin/php (I think) How can I ensure that ...
3
votes
1answer
99 views

Access a file in PHP through a symbolic link from a user that normally doesn't have permission

I have this website, where if the user submits a form, a python script is executed through a php page, and the python script creates a zip file and should offer it to the user for download through a ...
1
vote
0answers
50 views

Apache, can't link to Home directory, Alias does not work

I am trying to make a folder in which I can build websites (using php). I have switched from a Windows system where I was using Uniserver (http://www.uniformserver.com/) which is a setup with MySQL, ...
0
votes
1answer
293 views

Install libmysqlclient 5.5.3 on Centos 6

I'm installing Drupal 8 on my Centos 6 server. To do this I needed to upgrade both PHP and MySQL. However, I'm now getting the following error message: The libmysqlclient driver version 5.1.54 is ...
0
votes
2answers
813 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)
1
vote
2answers
161 views

How can I reach an open & listening port on Linux?

After forwarding the port I wish to open, I cannot seem to connect or get any data to this port. The PHP CLI software I have written is listening to the port actively on Ubuntu 14.04. Part of the code ...
0
votes
2answers
202 views

Cannot install php-ldap on CentOS 5 server

I tried to install the php-ldap package on my machine but was not able to do so. It shows missing dependencies error for php-common, but the said package is already installed and updated. See the ...
0
votes
0answers
112 views

Unable to install php 5.2.12 on FreeBSD 10 because of libphp5.so missing

I participate in a project where old PHP 5.2 is needed. But I can't install it on FreeBSD 10, always I get this error: [trex@H417 ~/Install/php-5.2.12]$ sudo make install Installing PHP SAPI module: ...
2
votes
0answers
45 views

Unable to insert records on sqlite on a Linux environment

I tested a simple Php program using Sqlite3 instead of mySQL on my own computer and it works fine. What the program does is simple insert of record into a certain table. Now, when I try to do that on ...
0
votes
0answers
40 views

How can I display \n as new lines in multitail?

I am using multitail to monitor logs while I program. I really like this tool. However, it is hard to use it to view object output in a php error log because new line characters \n are not processed. ...
1
vote
1answer
163 views

Restart PHP-FPM from a PHP script

I am running a LEMP stack and wish to write a simple control panel for it. So, I want to be able to restart php-fpm from a php script. To achieve this, this is what I did. Created a binary wrapper ...
1
vote
1answer
159 views

How can I run sed to replace lines in a file or do similar things in PHP?

I am writing a web frontend for configuring OpenWRT. I'm using PHP to execute commands and all the uci commands are executing without issues. However, OpenVPN configurations cannot be done via UCI and ...
0
votes
1answer
74 views

Custom Linux Hosting Control Panel in PHP - running commands as root

I want to work on a custom linux hosting control panel based on my experience in managing LEMP/LAMP stack. This is just a pet project. I believe I have ran into some hurdle. The CP is being written ...
0
votes
1answer
47 views

My websites are not visible from Apache on localhost

I have installed Ubuntu-based Mint Mate 17.2 distro. I have configured to my taste. Everything is working fine. I have also installed Apache, PHP and MySQL individually using sudo apt-get install. It ...
1
vote
0answers
127 views

Purge PHPVirtualbox to start over - has persistent settings/files somewhere

So I am diagnosing an error in PhpVirtualBox related to the console. My Vbox starts and gets to login screen then when I try to console in I get Disconnect reason: E: TCP: SECURITY_ERROR Error #2048 ...
0
votes
0answers
130 views

why md5 encrypted password insert into php ldap admin extra {md5}

I am using python script to inter encrypted password into php ldap admin but the problem I am facing is LDAP add extra {md5} before the encrypted password, I simulated the code by creating two files ...
-3
votes
1answer
62 views

How to fix the Parse error: syntax error, unexpected ',' in line 378

I'm having trouble installing modules and extension in Magento. This is the code that's failing: $uriModified = $this->getModifiedUri($uri, $https); $this->_ch = curl_init(); ...
1
vote
0answers
176 views

aptitude automatically removes packages, while upgrading php

I've facing this problem since my debian wheezy distro has been upgraded (I'm currently running ParrotSecurity 1.9 and the current version is 2.0.4). I've added http://dotdeb.org/ to my ...
0
votes
1answer
250 views

Can't open .php pages in any browser

When I try to open a php page e.g.: http://minetest.net/download.php My browser doesnt want open it and instead it wants to download the php file.
2
votes
0answers
306 views

Nginx on Debian 8 dev setup. PHP via PHP FPM not working

UPDATE: Ok, I can now happily say that what you see below is the recipe for a happily working automated PHP and Nginx dev setup (with automatic domains) and all problems I had are now solved. I ...
1
vote
1answer
266 views

Problem with PHP, libncursesw and Arch

After doing a system upgrade, whenever trying to use php it complains: php: error while loading shared libraries: libncursesw.so.5: cannot open shared object file: No such file or directory Sure, ...
1
vote
3answers
218 views

parse credentials from PHP configuration file

I'd like to write bash script to parse data from a configuration file. I searched for this but without finding something I could modify to suit my needs. Joomla! config file: public $access = ...
0
votes
0answers
125 views

Calling a password checking command from PHP using exec() - how to escape user input?

I am working on a PHP-based website where the login form needs to authenticate against local users on the system via PAM - in other words, they should be able to login successfully if they enter a ...
0
votes
1answer
71 views

Find mails, pipe them to php and delete after

I have a script that saves to DB content of piped to it file. cat /mailpath/Maildir/cur/mailfile | php -q /scriptpath/mailPipe.php I need a shell script or oneliner to find all files in Maildir, ...
0
votes
1answer
105 views

Calling php function from /var/www/folder (as www-user), which is located in a file in /var (or any folder) (with root permissions?)

I wrote a script which "walks" through /var/www/xyz and scans folders and more. The folders are all 'user-bound', so the permissions for a single folder there are set to the specific user. Running ...
0
votes
1answer
58 views

Replace newlines in multiline input with “\n”

I've been trying to do some work with generating SQL commands with an interactive bash script and have a multiline string that I need to escape for use with MySQL. Notes has already been defined as a ...
0
votes
0answers
166 views

Can't compile php 5.3 on Centos 6

I need enable php-fpm on php 5.3.29 to Centos 6, I have this error while running the ./configure script: ... config.status: creating sapi/fpm/php-fpm.conf config.status: creating ...
0
votes
1answer
105 views

Backup issue DirectAdmin - Centos 7

i hope that someone can help me with this. In Centos 7 + DirectAdmin i have a problem when i wan to make a backup from all users as ADMIN. I have googled tried alot of things but nothing helps... I ...
0
votes
0answers
263 views

Doctrine OCI8 charset behavior between php-cli and php-fpm

My Oracle database is in ISO8859-1 (not by choice). I'm struggling with segfault from php-fpm for a couple of days now. To dig out the source of it I've set two parallel environnements with the ...
0
votes
0answers
135 views

Why does apt-get upgrade not install the latest PHP version?

I usualy do apt-get update apt-get upgrade in order to keep my Debian 8.x server up to date. I also tried apt-get dist-upgrade, however, my PHP version is still the same one that I installed months ...