PHP is a widely-used, general-purpose scripting language that is especially suited for web development.
2
votes
3answers
22 views
Run a task in background and know the time of its termination
I need to run a unix shell script (my_script) in background and monitor it from web interface.
I start the actual script from php like so:
$command = 'my_script';
$pid= exec("nohup {$command} > ...
0
votes
1answer
21 views
php drop down menu to execute script with argument
I have shell script which I run like this
/var/www/test.sh 2015
or
/var/www/test.sh 2014
When this script runs, it actually takes data from freeradius and generates gnuplot base graph for the ...
0
votes
0answers
41 views
Multiple PHP Versions with PHP-FPM on CentOs7 (Systemd) Apache [closed]
How could I reach a multi vhost setup with multiple PHP Versions (5.4,5.5,5.6) running through php-fpm on CentOS 7?
NOTE: I don't use ispconfig or something similar.
I would like to assign which ...
1
vote
1answer
30 views
Cannot install composer on FreeBSD 10
I have a FAMP SERVER I'm setting up.
FreeBSD 10.1
Apache 2.4
MySQL 5.6
Php 5.6
Everything working ok so far. I installed symfony no problem but now trying to install composer.
curl -sS ...
1
vote
0answers
42 views
Install php apache module from source in CentOS 6.6
I tried running yum install php on my centos box however it kept installing an older version. Therefore I installed apache 2.4 and php 5.4 from source. However, I'm not sure how to install the ...
1
vote
1answer
25 views
Activate PHP commands on login
Everytime I login into my centOS box. I need to run source /opt/rh/php54/enable to be able to run php commands. What do I need to do to my installation for this to work without running this command?
...
0
votes
1answer
31 views
Php shell_exec() : for non root user, how to access root command
I have a tricky step to walk for my system (openvpn, 20 clients - raspberries, 1 server CentOS).
I want to make an auto install, from clients, for their keys.
They call a php page on the server, ...
0
votes
0answers
43 views
(noob) script works from root ssh <-> php shell_exec() does not
A nooby2death question:
In a vpn project, I generate keys automatically for clients.
I do this with a script file containing :
pkitool clientNameForKey
This line :
- does work if I execute the ...
0
votes
3answers
66 views
Get MAC of a client request?
I have a network with 20 raspberries (clients) and 1 server.
I'd like to check MAC of client request, is that possible ?
Further, possible without being known (nor visible) by the client ?
NB : I ...
0
votes
0answers
19 views
FreeBSD php (cli) in host system with application jail
Case: platform with FreeBSD (10.1) on the host system and multiple application jails.
One of the important goals for multiple jail - multiple php versions.
Users have access only in host system.
...
0
votes
1answer
42 views
PHP script to monitor process and write status to a file
I want to write a php script for monitoring particular process using top command and write into the file.
I use top -p pid for monitoring a particular process and also i write a shell script for ...
0
votes
1answer
28 views
How to Install or enable PHP-FTP support on Linux Apache server?
In my PHP code I am using the below function
ftp_connect()
But it throws an error, FTP is not enabled for PHP.
Can any one tell me how to enable/install FTP in RHEL, Apache2.2 server,PHP Version ...
0
votes
2answers
43 views
Generate a list of installed PHP extensions
My goal is to write an as simple as possible (but not more simple) that generates a list of currently installed PHP extensions (*.so files) that the user can simply copy/paste into their php.ini. It ...
-1
votes
1answer
37 views
Encrypt PHP script to a domain (RSA)
I have a php script I want to share with someone but only limit them to be able to use it on one domain.
I have found http://phpseclib.sourceforge.net/ - I think I can do this with RSA encryption but ...
1
vote
1answer
47 views
Postfix with smtp authentication failing
I'm currently in the process of updating my new server to do the same tasks as my original older server (new server is running Debian wheezy, old server is running Debian squeeze).
The issue I'm ...
0
votes
1answer
22 views
apache2 debian mod folder location
I have apache folder on Debian with configuration (apache2.conf file, not httpd.conf) in /etc/apache2. On another configuration I hasn't this folder, but it was located in /usr/local/apache2/bin. ...
0
votes
0answers
25 views
PHP sendmail_path not getting updated
Environment: Debian 7; PHP 5.4.39; Apache 2.2; ISPConfig
Using the Perfect Server Debian guide from howtoforge, I built a web server to serve some PHP applications. My intention is to use an external ...
1
vote
1answer
51 views
Pass SNMP trap packet to a php daemon on Ubuntu
I have a Ubuntu server which is collecting incoming SNMP traps. Currently these traps are handled and logged using a PHP script.
file /etc/snmp/snmptrapd.conf
traphandle default ...
0
votes
1answer
55 views
php can't find zend extension (ioncube)
On one server I've got php-5.6.7-1 and I installed ioncube there without a hitch. I put ioncube_loader_lin_5.6.so into /usr/lib/php5/20131226, and added zend_extension = ioncube_loader_lin_5.6.so to ...
0
votes
0answers
24 views
File permission issue with web server
Our project files is hosted in Linux server using root user, i tried find the user for Apache/PHP, here is what i got by running ps aux | egrep '(apache|httpd)'
[root@server tmp]# ps aux | egrep ...
1
vote
1answer
44 views
linux commandline can connect but webserver (or php) can't connect
We can connect to a specific url with linux (centos 6) commandline (curl, wget,...)
But we can't connect to it by webserver (apache) or php.
I did 'setenforce 0' command, after that webserver and ...
0
votes
3answers
24 views
Implementing index.php that serves index.html
Firstly, any advice on improving the title appreciated!
I want a webpage to reflect a log file. I have a bash script that converts the log to html. Currently this runs periodically via crontab, ...
0
votes
1answer
417 views
Apache and php not working child pid xxx exit signal Segmentation fault (11)
After making a change to my php.ini file I got the error messages as shown below.
vim /etc/php.ini
; Maximum amount of memory a script may consume (128MB)
; ...
1
vote
1answer
29 views
How do I get the filename and job numer of an “at” job
We have a script (generator) that is creating a series of at jobs. The at jobs fire another PHP script. The generator script loops through and does something like this:
exec('/usr/bin/at 5:00 May 11, ...
1
vote
1answer
62 views
Operation not permitted
I'm on OS X and I'm trying to write an interface for for an interpreter, the communication with the interpreter looks like this in PHP:
$f = fopen('mmascript.m', 'w');
fwrite($f, ...
2
votes
1answer
51 views
Getting sendmail to send mail at a specific time
We have a stock PHP ecommerce application that sends notification emails out whenever a successful purchase is made. We want one of the notifications to be sent 2 weeks after the purchase is made.
...
1
vote
0answers
25 views
Correct/Efficient/Reliable way to import log file entries to a MySQL database?
I'd like to be able to query our server access log files to identify abuse patterns. Log files really aren't very queryable, and it would be fairly easy to do what I wanted if each hit was a row in a ...
2
votes
1answer
35 views
Why was it necessary to restart apache webserver to copy files via php on newly mounted filer?
Scenario
allready running Apache Webserver 2.4.2 on Solaris 5.10
newly added nfs mount as target for copying files via php
executing cp via shell with the same user as the webserver works
copying ...
4
votes
1answer
53 views
How can I launch a command, wait 2 seconds and return the output without killing the command?
I'm trying to launch a command from php with shell_exec which calls a bash script that launches a program that stays running, but sometimes this program throws an error and exit, what I need is a way ...
2
votes
3answers
48 views
Can system time be paused?
This may or may not be the right approach, but it's feasibility was requested of me:
We have a demo server that we update from time to time in order to keep the statistical calculations up-to-date. ...
1
vote
0answers
59 views
Can't run php cli at webuser but will run as root
I am running a Magento application on a Nginx server.
nginx + php-fpm running as webuser:www
There are some function in the shell directory of Magento which run fine as root and the import run fine ...
0
votes
0answers
140 views
PHP 5.4 ON CENTOS 7 , NGINX , page not found error
I am trying to install PHP 5.4 on CentOS 7
currently , my conf files look like the following :
/etc/nginx/conf.d
server {
listen 80;
server_name 178.62.255.79;
root ...
0
votes
1answer
103 views
Find all the PHP scripts with email in my postfix mail queue
How do I find all the scripts that have mail sitting in my postfix mail queue? This server is sending out spam and I've spot checked it, but I want to make sure I haven't missed any scripts that may ...
1
vote
1answer
48 views
Find only in directories n levels deep
I use this command to find and run all istances of wp-cron.php I have for each site I have:
find /var/www/ -name 'wp-cron.php' -exec php -q "{}" \;
Since my websites tree is:
...
0
votes
1answer
120 views
Installed PHP extensions to wrong PHP version
I just bought a VPS and it came with PHP5.3.3 and that wasn't good for our website, so I successfully (so it seemed, anyway) installed PHP5.6.7 and successfully registered it with Plesk.
For the ...
1
vote
1answer
277 views
Unable to run php on Linux Mint 17.1
I'm trying to install LAMP on Linux Mint 17.1 following this tutorial here: http://community.linuxmint.com/tutorial/view/486
The Apache part was okay, I can access the localhost which shows a ...
0
votes
0answers
51 views
how to configure codeigniter based website for password protected apache basic auth codeigniter
Actually I want to 'password protect' my website as its still in development.
My requirement is simple if anyone try to access my site http://xxxxx.com it should prompt for password (Basic apache auth ...
0
votes
1answer
106 views
Chromebook crouton LAMP
I'm trying to install a LAMP stack on Ubuntu through crouton on a Chromebook (Acer c720p).
I was able to install the following packages
apache2 mysql-client mysql-server php5 libapache2-mod-php5
...
0
votes
0answers
234 views
Installing owncloud8 on CentOS 6
I'm trying to install owncloud 8 on CentOS 6 - the problem is that the default CentOS repos have only php 5.3 - but owncloud 8 requires php 5.4.
So following this guy:
How to install Owncloud on ...
0
votes
1answer
23 views
Not able to write a file when in the same group using PHP posix_setuid()
I'm running a PHP process from root which calls posix_setuid(1500); and then tries to open a file output.log
The ls -l output.log shows this output:
-rwxrwxr-x 1 www-data www-data 2294376 Mar 19 ...
0
votes
1answer
47 views
lighttpd2 and php under fast-cgi returns 403 “Permission denied”
lighttpd2 is under development but it's faar enough to where i want to start using it.
I've overcome the hurdle of installing it and getting vhost etc working.
PHP 5.6.6 (cgi-fcgi) (built: Feb 20 ...
1
vote
0answers
46 views
nginx serves info.php but doesnt serves index.php
info.php with basic phpinfo() is served when I enter info.php in the url, however index.php is not being served. I tweaked around some changes reading different answers on stackexchange
`try_files ...
1
vote
0answers
43 views
CodeIgniter On LAMP not loading database library
I have installed LAMP TURNKEY Debianf Wheezy
I unzipped codeigniter into /var/www/
It worked fine.
But If I autoload or load any controller that uses library database it throws a 500 error.
The ...
0
votes
1answer
2k 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: ...
5
votes
1answer
425 views
Linux Server Hacked
I received e-mails from Google saying that my websites are hacked. This is the e-mail.
Dear site owner or webmaster of domain.com (I received this email for my other domains too),
We recently ...
2
votes
1answer
250 views
CURL won't connect to self
I'm having a weird issue where CURL cannot connect to its own server.
For example if I'm on server example.com
wget https://example.com/ <--- WORKS FIND
curl https://example.com gets error: 35 ...
0
votes
1answer
42 views
Having problem with mysql dbdump when password starts with special character
I am trying to take a db backup with a php file that is running from a cronjob. It was running fine when I tested with sample db. But when I used the actual db there was an error.
I am using ...
0
votes
0answers
11 views
use php variables for awk regex commands [duplicate]
trying to implement autosuggest using php.
autosuggest list generated using awk
$input= $_GET["term"];
$suggest=array();
exec('awk \'BEGIN{FS=","}/.$input./{print $2,"-cost-",$1}\' ...
0
votes
0answers
51 views
PHP execute find + cp from page
I would like to copy some files from one folder to another in a Linux system through the use of PHP's methods exec or shell_exec.
Currently, the bash shell executes this line correctly and the files ...
0
votes
1answer
73 views
How to change a single line in multiple files [duplicate]
I have ~750 .php files in the same directory that contain the line
include("path/to/file.php");
I would like to change this line in every file to
require_once("path/to/file.php");
What would be ...