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.

Filter by
Sorted by
Tagged with
1 vote
0 answers
343 views

PHP 7.1.2 cannot Gmake : Zend Error

I use Solaris 11.3 Sparc 64 bit, Mysql Enterprise Advance 5.7.1, Apache 2.4.25 and PHP 7.1.2 I configure PHP with following parameter. export CC="gcc -m64" export CFLAGS="-std=gnu99" ./configure --...
user3323980's user avatar
0 votes
1 answer
31 views

strange wrapping of file paths

I have a PHP script run form the command line on an AWS AMI Linux EC2 instance that echos out when it is renaming files, and it is wrapping the end of the string back to the beginning. The string ...
raphael75's user avatar
  • 733
0 votes
1 answer
9k views

How to change root password for mysql and phpmyadmin-mint Linux

I have recently installed Linux Mint. I have installed 1) Lamp 2) Set up MySQL 3) Test Apache 4) Test PHP 5) Phpmyadmin Everything was working fine. Unfortunately my password include $ ...
Shanu k k's user avatar
  • 101
1 vote
1 answer
1k views

Running a bash script with php from cron

I have a script with a curl command in it for php to execute: /root/notify-down-script.sh #!/bin/bash echo "test" > file curl -d "credentials=foobar" -d "title=$server down" https://notifi.it/...
maxisme's user avatar
  • 275
2 votes
1 answer
2k views

Can't get Phpmyadmin

I recently installed Linux mint.But i can't get phpmyadmin when i hit http://localhost/phpmyadmin/.I did the following commends 1)Install the LAMP Server using sudo apt-get install lamp-server^ -y 2)...
shanu's user avatar
  • 21
8 votes
2 answers
9k views

why php can not see /tmp files

i have simple test.php page: <pre><?php system("ls -la /tmp"); ?></pre> which always shows just: . and .. folders and nothing else in browser. in the command line: 1) ls -la /...
Asain Kujovic's user avatar
1 vote
0 answers
589 views

Problem with installing phpmyadmin

I use Linux Mint 18.1 KDE Edition and I installed php 7.0, psp-mysql, apache2 and phpmyadmin. But when I go to url in my Google Chrome I see these errors: <?php /* vim: set expandtab sw=4 ts=4 sts=...
Ivailo GEORGIEV's user avatar
1 vote
0 answers
548 views

Trying to run PostFIX mail server. But mail sending in not working

I was trying to setup postfix MTA to use the mail() function in PHP. Using MAMP 4.1 the free version on Mac OSX sierra PHP version 7.1.0 I am not interested to use MAMP PRO and third party libraries ...
Varun Gupta's user avatar
1 vote
1 answer
215 views

Output on Running PHP from Command Line

When running PHP on CLI, with same script concurrently on Ubuntu Linux, I have this: [1] Done php /var/www/html/deletebadsubjtermsnew.php 150 2 > /var/www/html/...
forgodsakehold's user avatar
1 vote
0 answers
77 views

How do I set up mail.log in PHP?

I'm trying to set up mail.log in PHP. I updated php.ini's mail.log setting on the server: ; Log all mail() calls including the full path of the script, line #, to address and headers mail.log = "/var/...
symlink's user avatar
  • 211
1 vote
1 answer
725 views

What Mail Transfer Agents is PHP using?

I'm trying to diagnose a problem with certain email addresses possibly being blocked on my server. I'm running PHP 5.3 on CentOS 5.7. The php.ini file lists a sendmail_path of /usr/sbin/sendmail -t -i,...
symlink's user avatar
  • 211
2 votes
2 answers
3k views

Fresh install PHP 7.1.1, php.ini is missing

I can't find where the php.ini file is on a fresh install of PHP 7.1.1 in Solaris. find / -name "php.ini" ## < No result ./php --ini Configuration File (php.ini) Path: /opt/app/php/lib Loaded ...
user3323980's user avatar
2 votes
0 answers
2k views

Systemd service: Failed to issue method call: Unit service failed [closed]

I am trying to make a custom service in my VPS. However, it doesn't let me run it. It says the following. I am not sure what is going on but when I run it on my Ubuntu laptop it works properly. What ...
kobbycoder's user avatar
2 votes
2 answers
2k views

How to run cronjob every 4 hours minus 1 second

I have data coming from API and I want to call it and dump the data in my db every 4 hours (current day data). I used the following : 0 */4 * * * The data in my report is missing some values, ...
Bilal Halayqa's user avatar
1 vote
0 answers
121 views

How to undertand the GPLI code, structure and database?

Where can I get the conception and database structure of the GLPI ? I didn't find any documentation in the Internet. "how to create a plugin in GPLI" in Github doesn't help me very much.
zied's user avatar
  • 151
3 votes
1 answer
2k views

How to include multiple config dir in php-fpm?

I'm doing the configuration of php-fpm, and I'm experiencing some issues with the include= directive in php-fpm.conf file. Here is the default directive : include=/etc/php/7.0/fpm/pool.d/*.conf But ...
Nurrl's user avatar
  • 61
1 vote
1 answer
94 views

HTTPD server not starting after disabling these modules mod_include, mod_info, mod_autoindex and mod_userdir

As per this article "4. Disable Unnecessary Modules" Ref: http://www.tecmint.com/apache-security-tips/ It’s always good to minor the chances of being a victim of any web attack. So it’s recommended ...
Sundar's user avatar
  • 111
1 vote
2 answers
1k views

How to authenticate Linux accounts with PAM using PHP without giving www-data shadow

Sort of as a follow up to this: Securest way to authenticate users against /etc/shadow using PHP? and because there hasn't been anything relevant that I've seen on Ubuntu 16.04. I'm trying to ...
brianforan's user avatar
2 votes
1 answer
1k views

PHPmailer remote execution vulnerability check

I have a RHEL6 system and I want to verify if the system is vulnerable to phpmailer remote code execution exploit. I did not setup the server. How can I figure if the server is vulnerable? I tried ...
afl's user avatar
  • 69
3 votes
3 answers
4k views

Why does phpinfo() show version 5.5.9 but php -v show version 7.0

I am running ubuntu on vagrant box and am successfully running and developing LAMP applications. BACKGROUND: I am trying to install laravel with composer and getting "the requested PHP extension ...
Oliver Williams's user avatar
1 vote
1 answer
42 views

Alternate source for a package removed from a testing or unstable repo

https://tracker.debian.org/pkg/php-mongo php-mongo 1.6.10-1 has been removed from unstable and testing and I was using it in a VM to maintain some legacy code. When I came to provision another VM ...
gawpertron's user avatar
33 votes
4 answers
25k views

Unix system(“unzip archive.zip”) Extracting Zip Files Silently

How do I silently extract files, without displaying status?
Adedoyin Akande's user avatar
2 votes
1 answer
4k views

Obtain PHP7.0 on Debian 7

Is there still any possibility to install PHP7 on Debian Wheezy (7.11) ? /etc/apt/sources.list deb http://packages.dotdeb.org wheezy all deb-src http://packages.dotdeb.org wheezy all Commands # ...
ElemEnts's user avatar
4 votes
1 answer
750 views

PHP interactive script that calls nano

I have written simple PHP programs meant for the command line that run a script to completion with the hashbang at the top: #!/usr/bin/php -q <?php //etc However I need to write a script that ...
Oliver Williams's user avatar
11 votes
2 answers
22k views

SELinux is preventing NGINX from writing via PHP-FPM

I'm using a server to write into a NFS type mount-point via NGINX using php-fpm. At the very first step, it shows me the following error: 2017/01/16 11:32:59 [error] 55463#0: *22 FastCGI sent in ...
Parsa Samet's user avatar
1 vote
0 answers
1k views

How to remove php7 completely from centos 6?

I was trying to build a wiki on centos server and I downloaded PHP7 from its official website. When I wanted to remove it, I found that even if I deleted all the PHP7 files(I install it using a tar.gz)...
charlie's user avatar
  • 11
1 vote
0 answers
210 views

Ubuntu php upgrading issue

I have a problem after I updated my php version to 5.6 from 5.5. OS: Ubuntu 14.04.1 LTS. Server version: Apache/2.4.7 (Ubuntu). PHP version: 5.5. Laravel 4.2 with yajra package. I have done the ...
Tugsbayar Buyadaa's user avatar
3 votes
1 answer
408 views

Rewrite doesn't work expectedly in NGINX

I'm using the following syntax for my rewrite in NGINX, and as far as I see it's working right! : location / { if (!-e $request_filename){ rewrite ^(.+)$ /index.php?url=$1 ...
Parsa Samet's user avatar
1 vote
1 answer
2k views

Delete specified range of line number from a text file using sed from within PHP

I am trying to delete range of line numbers using sed command within php using exec command. I know how to use sed when substituting values directly within command. exec("sed -i.bak -e '2d;12,17d;57d'...
Abhishek J's user avatar
2 votes
1 answer
1k views

.htaccess rewrite not working?

I have the following virtual host in /etc/apache2/vhosts.d/ip-based_vhosts.conf: <VirtualHost test.local:80> ServerAdmin [email protected] ServerName test.local DocumentRoot /home/web/test....
george's user avatar
  • 123
1 vote
1 answer
419 views

EasyApache 4 Migration Issue

One of server is hosting several domains with their wepages mostly in php. Server was running eayapache3 with php5.5. One of the domain asked to enable php5.6 recently. So we migrated the server from ...
Sollosa's user avatar
  • 1,929
1 vote
0 answers
2k views

How to run .phar file with PHP CLI from an unpacked RPM?

How to reproduce: "Install" PHP 5.4 (plus ncurses and OpenSSL libraries) from CentOS 7 repositories using rpm2cpio | cpio in a directory called "rpm" Download phpunit.phar version 4.8.26 Run ...
l0b0's user avatar
  • 51.5k
0 votes
1 answer
2k views

Output of SQL query as variable PHP

I have a PHP script that connects to one of my SQL databases and runs a select command. I'm then trying to see what the output is of command but when I echo my results to a file I get "Resource id #5" ...
a.smith's user avatar
  • 715
1 vote
0 answers
3k views

Cannot load libphp5.so undefined symbol: unixd_config apache service not start

When I trying to restart apache service getting below error: root@localhost:/# /etc/init.d/apache2 restart [FAIL] Restarting web server: apache2 failed! [warn] The apache2 configtest failed. ... (...
Nullpointer's user avatar
3 votes
2 answers
4k views

PHP Startup: Unable to load dynamic library : cannot open shared object file: No such file or directory

I'm trying to compile a specific version of GEOS and its PHP bindings in the Travis CI environment; they're using Ubuntu. Here is my install script: sudo apt-get update sudo apt-get remove 'libgeos.*...
BenMorel's user avatar
  • 4,597
2 votes
1 answer
765 views

DNS Resolve in php chroot

I created a script which creates a chroot and sets up php-fpm and apache2 to make the site work. In my script I'm copying all required lib(s) to my chroot lib(s) dir(s) using this: fileArray=$(ldd /...
Nurrl's user avatar
  • 61
1 vote
1 answer
7k views

How to POST 'shell output' as JSON data with Curl

I got the following command: curl -H 'Content-Type: application/json' -X POST -d '{"host": "'$(hostname)'"}' http://sitename.com/update.php Which works as expected, but if I try to send uptime ...
Mc Kernel's user avatar
  • 521
1 vote
1 answer
3k views

php: compiling with openssl, ftp, ldap, curl support in debian gnu/linux

I'm trying to compile php 5.2.x in debian gnu/linux: ./configure --with-ldap --enable-ftp --with-apxs2 --with-mcrypt --enable-bcmath --with-bz2 --enable-calendar --enable-dba=shared --enable-exif ...
ZiTAL's user avatar
  • 131
2 votes
3 answers
2k views

rsync files with apache permissions over ssh

I'm running a rsync via apache to sync an assets directory rsync -avz -e 'ssh -l rsync -i /home/rsync/.ssh/rsync -o StrictHostKeyChecking=no' /var/www/html/site/Uploads centos@$IP:/var/www/html/site/...
Rudiger's user avatar
  • 141
3 votes
2 answers
7k views

Nginx + PHP-FPM serving .php files as downloads

It's a matter asked thousand times and since I hate write posts, I read and search for all possible documentation before get to the annoying part (for me) which is writing. So I have Nginx & PHP-...
Alain's user avatar
  • 335
1 vote
1 answer
786 views

Why would accessing a PHP CGI file with GET fail (404) but with POST succeed (200)?

I have centos web server. Name: CentOS release 6.8 (Final) Kernel Version: 2.6.32-642.6.2.el6.x86_64 Apache version: Apache/2.2.31 PHP version: 5.4.45 [PHP Switcher] I was try to access link getting ...
kibar's user avatar
  • 111
0 votes
1 answer
660 views

Global multiline search & replace

I have a server with thousands of files containing a multi-line pattern that I want to globally find & replace. Here's a sample of the pattern: <div class="fusion-header-sticky-height">&...
James T Snell's user avatar
0 votes
1 answer
5k views

cat filename | cut -f2 | head -1 > newfile contains more characters than expected

When I run: cat filename | cut -f3 | head -1 I get the following result: apple However when I save this to a file by using: cat filename | cut -f3 | head -1 > newfile I then open this using ...
NeverPhased's user avatar
1 vote
1 answer
2k views

selinux started blocking php "exec" calls after yum update

I've used the PHP exec command to issue lpr -P printer_name /var/www/html/somefile.pdf but after a RHEL system update (7.2 to 7.3), selinux has decided to start blocking these requests. selinux ...
a coder's user avatar
  • 3,253
0 votes
4 answers
3k views

How to track the names of the uploaded files in Linux servers?

I want to monitor/keep track of all the files uploaded using web server (mainly using PHP/Apache and NOT using FTP server). I Googled and found that, only possible way could be writing a hook for ...
Mani's user avatar
  • 574
3 votes
1 answer
5k views

SQLSTATE[HY000] [2003] Can't connect to MySQL server on '127.0.0.1' (13) but 'localhost' works

Cent os Apache + php + MySQL from php when you try to connect to the MySQL at the address 127.0.0.1, an error occurs. If you replace a line 127.0.0.1 to localhost everything works without problems. ...
Carl W.'s user avatar
  • 31
3 votes
2 answers
12k views

“unable to get local issuer certificate” and “tlsv1 unrecognized name”

I am having a problem with the Paypal IPN postback verification. The problem came up a month ago, I believe when Paypal updated their security standards and their certificates. My website is running ...
Niko Zarzani's user avatar
0 votes
1 answer
974 views

Why PHP doesn't run in Apache?

I'm using Elementary OS and Apache. What I did? I installed Apache 2 and I went to http://127.0.0.1/ to check if Apache was online, that's ok. I saw the Apache2 Ubuntu Default Page, I thought Apache ...
Shader's user avatar
  • 23
0 votes
0 answers
73 views

Block uploads by extensions directly on php

We test our system day by day checking about php allowing bad formats in upload routines. I discovered recently that developers uploaded a plugin with examples, that allow peoples to send php files ...
Luciano Andress Martini's user avatar
1 vote
0 answers
773 views

Can't add a PPA, stuck at gpg: keybox

I'm on Debian Testing and I'm trying to add a repository with this command: add-apt-repository ppa:ondrej/php But it eventually gets stuck after it adds the gpg key, like so: gpg: keybox '/tmp/...
user avatar

1
8 9
10
11 12
20