Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [php]

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.

0
votes
0answers
27 views

calling wget from a browser using php

My httpd is running with a daemon user. I want to do a wget using php from FTP server. When I run the php from linux server, the same downloads the required file from FTP. But when I call the same php ...
-1
votes
1answer
18 views

crond php server crash

My CentOS server crashed with 100% memory with swapping, after running fine for a week. Investigating the /var/log/messages shows me the following: https://pastebin.com/CSF8DDzX Basically, alot of the ...
-1
votes
0answers
32 views

Downgrade PHP 7.3.2 to PHP 5.4 CentOS 7.6

I've tried this : service httpd stop sudo yum-config-manager --enable remi-php54 sudo yum-config-manager --disable remi-php73 sudo yum -y downgrade php php-cli php-fpm php-mysqlnd php-zip php-...
-1
votes
1answer
18 views

How to create an all default LAMP stack on Arch [closed]

How to create an all default LAMP stack (with some decent port configuration, and email server to re-contact issuing clients and PHP Composer) on Arch Linux?
0
votes
1answer
14 views

Automating a php-info file creation and deletion process

How can one automate the creation and deletion process of a php info file? Automatic deletion is good in case one wants to be covered from cases it forgets to delete the file and then the file is ...
0
votes
1answer
51 views

The value 'buster' is invalid for APT::Default-Release as such a release is not available in the sources

I am planing on hosting my laravel application on my RaspberryPi that's connected locally. I have my DynDns domain setup and everything. Now i just need to get PHP7.2 on my raspberry and from what i'...
0
votes
0answers
21 views

How to use PHP CGI instead of PHP-FPM with APache2

My Drupal 7 site works fine on a Debian6 with PHP 5.3.7 as native package. The configuration file of Apache2 is oriented to use CGI. I exported the same site on a Debian9 with Php7.x as native ...
1
vote
1answer
51 views

How to install multiple PHP versions in Virtualmin 6, Debian 9

By default Debian 9 comes with PHP 7, but I was interested in PHP 5 for older websites as well. I tried following/adapting this guide (not virtualmin specific). But this is the error I was getting (...
1
vote
1answer
68 views

PhpMyadmin times out with small SQL file

I am trying to upload bump to phpmyadmin, which has has only 2MB but it has 12 thousand lines. I always get this error: Service Unavailable The server is temporarily unable to service your request ...
0
votes
1answer
239 views

How to get PHP 7.1 to use libreadline.so.8?

After an update of my Manjaro system, my PHP server stopped working, with the error "php: error while loading shared libraries: libreadline.so.7: cannot open shared object file: No such file or ...
0
votes
1answer
83 views

PHP-FPM: 'No such file or directory' error from nginx/error.log. Path or permissions issue? [closed]

I am getting a "FastCGI sent in stderr: "Unable to open primary script: /var/www/mediawiki/index.php (No such file or directory)"" error when I enter my wiki address in a browser bar. Here is my PHP-...
0
votes
1answer
50 views

Is a php file with SGID bit and read-only & execute a security problem? [duplicate]

I find php files with SGID bit and read-only & execute. The group is root. Is this a problem? Because a user will need to run the php interpreter with their our account, could it led to privilege ...
0
votes
1answer
81 views

Arch: Some very-common PHP packages missing in repo

When I establish LAMP environments on Debian, I install some PHP extensions: apt install php-{cli,curl,mbstring,mcrypt,gd} From the above, besides php-gd, all packages are missing in Arch. What are ...
0
votes
1answer
44 views

access forbidden (403) for localhost/adminer with apache

By trying to get adminer running under archlinux, I got into this problem. When setting up apache for adminer and calling localhost/adminer either with firefox or opera, I receive code 403 (access ...
2
votes
0answers
36 views

PHP Curl when accessing SSL slows down connection. How to correct?

After migrating to a new server, our scripts slowed down dramatically. Some troubleshooting showed that the slowdown occurred during Curl connections as the server was trying to load the SSL cert. ...
0
votes
0answers
18 views

unable to load oci8 extension to compiled php

I compiled php-5.6.36: ./configure \ --prefix=/opt/php/php-5.6.39 \ --with-config-file-path=/opt/php-5.6.39/etc \ --enable-shared \ --enable-mbstring \ --with-curl \ --with-gd \ --with-zlib \ --...
0
votes
0answers
19 views

Executing bash script through PHP to connect to AWS fails

I am trying to initiate an AWS instance through a bash script. This bash script is invoked by a PHP script. My example php script: <?php exec("sh /var/www/html/pushDatToAWS.sh >> $...
0
votes
1answer
71 views

Error installing Gearman on Alpine Linux

I've tried to install Gearman from source on Alpine, but it's gives an error: configure: error: Please install libgearman I tried to apk search libgearman, with no result, but in Ubuntu there is ...
0
votes
1answer
20 views

What are the basic files (dirs and regular file) in Ansible-Galaxy roles? [closed]

I have an Ansible playbook for establishing LAMP environments on remote machines. Part of this playbook deals with installing Composer: - name: Install Composer get_url: url: https://...
2
votes
1answer
57 views

Is it a best practice to use Ansible-Galaxy roles in playbooks instead ansible-modules in playbooks? [closed]

I have an Ansible playbook for establishing LAMP environments on remote machines. Part of this playbook deals with installing Composer: - name: Install Composer get_url: url: https://...
0
votes
1answer
45 views

Changing PHP's post_max_size and upload_max_filesize with Ansible

Is there a way to change the two famous PHP variables post_max_size and upload_max_filesize in php.ini in a version-agnostic way with Ansible? I didn't find any literature covering this and it seems ...
0
votes
1answer
78 views

How to install Composer with Ansible?

In Bash I usually install Composer this way: curl -sS https://getcomposer.org/installer -o composer-setup.php php composer-setup.php --install-dir=/usr/local/bin --filename=composer I tried to read ...
0
votes
0answers
30 views

Nginx running php-fpm and php process

My NginX server run into problem just now, when i checked there's am out of memory problem, so i fixed it by increasing memory_limit to 1G, but the error still persist, so i take a look at system ...
0
votes
1answer
20 views

How to find all installed php on Linux system?

How to find all php (cli, php-fpm, apache-module) installed on Linux system and check which ini use each one?
0
votes
1answer
59 views

httpd hogging all memory until server crash

The server in question is used for processing data into reports, it has three cron jobs which execute every minute to check the process queue and if anything is found they'll keep running until the ...
-1
votes
2answers
113 views

How to update PHP5 to latest stable PHP5 version?

I can't find any infos on how to update PHP 5.5.14 to the latest PHP 5.6.37 which was released on 19 Jul 2018. I executed apt-get update and apt-get upgrade but PHP 5.5.14 is still installed. OS: ...
0
votes
2answers
139 views

Issue update PHP 7 on CentOS 7

I would like to update PHP 7.0.2.6 to the latest 7.2 version on my CentOS 7 server (with DirectAdmin installed) via SSH. I found many procedures on the internet, but none of them seems to work. I was ...
0
votes
1answer
16 views

Installing Composer dependency manager and running it right afterwards

I install Composer the PHP dependency manager and run it right afterwards this way on Ubuntu 18.04 with Bash: curl -sS https://getcomposer.org/installer -o composer-setup.php php composer-setup.php --...
1
vote
0answers
24 views

php-fpm Socket spawns with bad chmod

Everytime i restart my php-fpm it's creating or updates socket file to chmod 660 and i need to change manually chmod to 666 I have done before listen to file php-fpm.sock instead of 127.0.0.1 How to ...
1
vote
2answers
125 views

Using Ansible inside Bash

I use Ubuntu 18.04 with Ansible installed this way: apt-get update -y install software-properties-common apt-add-repository ppa:ansible/ansible apt install ansible I also have a small Bash script I ...
1
vote
2answers
235 views

How to find why php72_fpm is failing to start on OpenBSD?

My httpd logs show errors that look like php-fpm issues and sure enough, when I try rcctl start php72_fpm I get php72_fpm(failed) In line with other OpenBSD configuration so far, I'd expect to ...
0
votes
1answer
34 views

How can I prevent a process to change its setuid bit back to RUID within the process itself

I set my SETUID bit to a non-root user so that the process should take the ownership of that executable file always. But I figured out setuid bit can be changed back to RUID within the script itself. ...
0
votes
1answer
66 views

Building Apache 2.2 from source on CentOS

My Question Does anyone have a link to a proper source package of Apache 2.2 for CentOS, and if so are there any special instructions I'm missing ? Summary I am trying to install Apache 2.2 on a ...
1
vote
0answers
56 views

Websocket server won't connect if started via PHP

I have a websocket server written in Node. The following instruction, when executed from the command line starts the websocket server successfully: nohup "/root/.nvm/versions/node/v8.11.1/bin/node" "/...
1
vote
0answers
42 views

Message: Undefined variable: fetch_data [closed]

i am using this using codeigniter to run the snippet of code from.. from https://www.webslesson.info/2016/10/insert-fetch-update-delete-mysql-data-in-codeigniter.html .This is my autoload.php <...
1
vote
1answer
198 views

set php-fpm user and group to website's owner

I have a centos 6 server which using apache to connect php-fpm to run php site, i use user's home directory for the website root, for example /home/user1, . On the other hand, the php-fpm www.conf, ...
1
vote
0answers
30 views

Mounted CIFS directory by web shell not visible in the system shell

I use PHP shell_exec to run the command echo password | sudo -S mount.cifs //192.168.1.15/Share /share -o username=root,password=password HTTPD user is granted sudo-pivilege, the command ran ...
1
vote
2answers
183 views

problem piping data into nc

I've written a small UDP server in PHP which listens on a socket, accepts a command, and performs an action. It's really quite basic. I can connect to it manually like this: % nc -u host port (...
1
vote
3answers
355 views

How to install php + mysql on Fedora?

I'm trying to install wordpress locally. I've installed mysql (MariaDB) and php-mysqli. I have user created and database from mysql console and I have this 3 files: $ cd /etc/php.d/ $ cat 30-mysqli....
13
votes
7answers
3k views

How to get only the version number of php?

I want to get only the version of php installed on CentOS. Output of php -v PHP 7.1.16 (cli) (built: Mar 28 2018 13:19:29) ( NTS ) Copyright (c) 1997-2018 The PHP Group Zend Engine v3.1.0, Copyright ...
0
votes
1answer
191 views

unable to run command as sudo in php (CentOS 7)

I need to run a sudo command from a PHP script in CentOS 7, but I am getting an error: sudo: no tty present and no askpass program specified I have edited my sudoers file with the following lines,...
1
vote
0answers
25 views

unable to install phpmyadmin in RHEL 6

I am using red hat 6.0 Linux.Currently php 5.3.2 is installed.I want to install phpMyAdmin in it.for that php5.5 is required. I already installed epel ,remi repository in my system. I am trying to ...
1
vote
0answers
183 views

What's the difference between the `php71` and `php71w` in the yum repos?

I use yum list *php71*, there shows: ... php71-php-zstd.x86_64 0.4.14-1.el7.remi ...
0
votes
3answers
133 views

How to identify the package manager used to install software in CentOS?

On my CentOS 7.2 Server: [root@localhost data]# which php /usr/local/bin/php [root@localhost data]# ll /usr/local/bin/php lrwxrwxrwx. 1 root root 29 Jun 25 08:13 /usr/local/bin/php -> /usr/local/...
0
votes
0answers
32 views

Deleting files using www-data user

I'm running an apache2 web server on raslberry pi 3 with raspbian stretch installed. In case of unauthorized activity, I would like to delete all files saved at the apache's /var/www/html folder. I ...
1
vote
1answer
67 views

Strange problem with Phantomjs, it gets 404 error for an url, and it works fine for many other websites

I have Phantomjs 2.1.1 installed in debian 9, it works fine for many websites but it gets 404 error for this simple URL: http://writeastory.net/test.jpg I tested in two servers, i got the same issue, ...
2
votes
1answer
144 views

Can't get iso-8859-1 to work for 'umlauts' (Debian / Plesk)

I think I have configured ISO-8859-1 at all necessary locations, but still, my pages are displaying black '?' instead of German umlauts! My server runs Plesk 17.8.11 / Debian 8 / Apache 2 / PHP 7.1 (...
0
votes
1answer
114 views

How to execute ln on find results

I want to make symlinks for image files in a directory in the server. Currently I'm doing it by executing this command using php function exec(): ln -sf path/to/source path/to/symlink Both file ...
1
vote
0answers
62 views

Webserver crashes on a Saturday due to high disk IO [closed]

I'm having an issue where an Ubuntu 16.04 Serverpilot VPS server crashes on a Saturday but no other day of the week. It hosts 60 or so low traffic Wordpress websites, there are no CRON jobs that run ...
1
vote
1answer
5k views

cp: cannot create regular file: Permission denied

I am running a PHP script on my Apache server and from the script I need to copy some files (to run a Bash script that copies files). I can copy to a directory /tmp with no problems, but when I want ...