PHP is a widely-used, general-purpose scripting language that is especially suited for web development.

learn more… | top users | synonyms

1
vote
1answer
103 views

Program acting differently depending on user

I am trying to control an RC transmitter from a PHP site. The command works fine as user "xbian" in the command line: sudo /home/xbian/433Utils/RPi_utils/codesend 34832404 for example, and it works ...
2
votes
2answers
798 views

Using sudoers to allow php to run command

I am trying to get my php page to run this command: shell_exec("sudo /home/xbian/433Utils/RPi_utils/codesend {$num}"); So I added this entry to my sudoers file with visudo: www-data ALL=NOPASSWD: ...
2
votes
1answer
204 views

kill process in script while writing file behavior

in my php script which runs as a cron job, I have foreach($sites as $site) { exec('./wkhtmltoimage-amd64 ' . $site . ' somefile.png'); exec('./zopflipng -y somefile.png somefile.png'); } ...
2
votes
0answers
730 views

Can't Install ImageMagick on Centos using Yum

I am trying to install ImageMagick on my dedicated-virtual Centos server for use with PHP. I first ran the following commands successfully: # yum install gcc php-devel php-pear # yum install ...
1
vote
1answer
94 views

Mail server broken my LAMP installation

I was installing mail server, postfix/sendmail I suppose. Then I had no need to use it anymore so I removed it. But now when I type localhost in my browser it redirects me to https://mail.example.com. ...
1
vote
1answer
145 views

Running cron jobs under php ver. 5.4

My hosting company switched me to php version 5.4. I run a Drupal site (D7.) They say: You'll want to make sure your crons use "/usr/php/54/usr/bin/php" instead, as otherwise it will use PHP 5.2. ...
0
votes
1answer
251 views

Wordpress won't recognize the MySQL database

I want to install Wordpress on Archlinux but I have this error: Your PHP installation appears to be missing the MySQL extension which is required by WordPress. I un-commented this line in ...
1
vote
2answers
538 views

PHP exec expect script with SCP then SSH

I have a PHP page which runs the following expect script to upload a file to another server on my network: #!/usr/bin/expect -f set password [lindex $argv 0] spawn /usr/bin/scp /home/Dave/bin/test ...
0
votes
1answer
94 views

Notify-send not working when run from apache [duplicate]

I have the following script (alert.sh) which has been setuid'd: DISPLAY=:0.0 notify-send --urgency=low -i python "The job has finished" and the following PHP file alert.php: <?php echo ...
2
votes
1answer
121 views

compiling PHP fails cause of libpcre

I'm trying to compile PHP myself as I want to use PHPBrew to switch between multiple versions of PHP. I already solved a ton of problems in the process, but with this particular one I can't get any ...
2
votes
1answer
968 views

nginx php-fpm index.php doesn't load

I have a quite simple setup with nginx and php-fpm, howsoever when I try to access my website with my-website.com I get a 403 forbidden error, If I access my-website.com/index.php everything works ...
2
votes
1answer
787 views

Securest way to authenticate users against /etc/shadow using PHP?

This question became important to me, since I'm setting up a Horde environment and want to use the system accounts. Doing some search I found mainly 4 ways of doing that, which all seem to have some ...
0
votes
0answers
39 views

Help required for LAMP Stack fail-over Configuration

I am using cloud servers of digital ocean for last some months. Recently One of my cloud servers disappeared from panel with backups @ ubiquity, the server co guys put it back after 1 day. However my ...
1
vote
0answers
1k views

How to install PHP 5.2.4 in CentOS release 6.5 (Final)?

Folks I need to install PHP 5.2.4 in CentOS release 6.5 (Final). My souces list are: # CentOS-Base.repo # # The mirror system uses the connecting IP address of the client and the # update status of ...
1
vote
1answer
323 views

Downgrade php version on debian

I have a big problem with my sites after I migrated to a new server. The only difference is the php version. On the old server I have 5.3.3-7+squeeze15 and on the new server there is ...
1
vote
1answer
53 views

rpmbuild library register for 'requires'

Big Picture: I am building an in-house rpm for a customized php. I build an rpm which works, but generate library requirements that I can't seem to meet without using 'nodeps', which I want to avoid ...
0
votes
0answers
66 views

Why is PECL installing a beta package?

I'm running Ubuntu 12.04. If I type # pecl install apc it tries to install 3.1.13 which is beta rather than 3.1.9. $ pear config-get preferred_state stable Looking inside the two archives ...
0
votes
0answers
97 views

Rewrite module won't work on Xubuntu/Apache

I have a Xubuntu (12.10) machine with Apache and PHP servers from the apt-get repository. I need to create a simple REST service in PHP and therefore need to set up .htaccess so that arbitrary URLs ...
0
votes
2answers
1k views

create a cronjob to run php script

I've created a cronjob in Xubuntu to run a PHP script in every 5 minutes. I did it as follows. I entered the following command: $ crontab -e Then entered the following: */5 * * * * /usr/bin/php ...
0
votes
1answer
51 views

Getting Sublime + xDebug to work on Debian

I have been trying to get sublime and xdebug to work on debian, but have had no luck. I can't seem to find any debian specific guides. I have tried using the ubuntu based guides, but they don't work ...
1
vote
1answer
339 views

run a php script in centos and time and timeout

I want to run a php script in centos ( /usr/bin/php file.php ), and it takes long time to execute,and in the middle of executing , it stops running , and does not give me any errors. and I'm sure that ...
1
vote
0answers
166 views

Libc-bin errors when trying to install php [closed]

I am trying to update and install php into my Ubuntu server 12. 04 using the command below: apt-get upgrade php apt-get install php5-curl php5-gd php5-mysql php5-pgsql However I receive this error ...
0
votes
1answer
241 views

PHP appears to be encountering segfault when using finfo_file method

I have encountered a strange bug. When trying to determine mime type of file using Fileinfo (http://www.php.net/manual/en/function.finfo-file.php) extension, PHP (or Apache? see below.) is appearing ...
0
votes
0answers
224 views

php Mails not send with in domain

My setup : Our current server 90.0.0.50 [example] which is containing domain testdom.com. testdom.com's MX record points to Google mail. Due to some issues we need to host our domain on some other ...
0
votes
1answer
118 views

How to pass wildcards in command line [closed]

So this works: foo -a -b -c "path/file.ext" And this too if I want to pass all files from directory: foo -a -b -c path/* But if I add the quotes foo -a -b -c "path/*" It doesn't work anymore: ...
1
vote
2answers
110 views

Is there a (relatively) safe way to run CLI commands from the web?

Since I started programming LAMP apps I wanted to develop an admin control panel for my boxes. (For fun and educational purposes, otherwise I would use something already existing in the market) But ...
2
votes
3answers
2k views

install php5 with readline support on debian wheezy

php5-cli does not come with readline support on debian wheezy. this means that the interactive php shell (run as $ php -a) does not have a prompt (php >), instead it just says Interactive mode ...
1
vote
1answer
368 views

postfix: save all incoming Mails in MySQL DB and have all addresses Verified for big servers

I am new to all that server based stuff. New to Postfix and new to Ubuntu. I have an Ubuntu v-server with Postfix, PHP and MySQL installed. Also I have an own domain. So far, I managed to receive any ...
1
vote
0answers
238 views

php indent in web-mode with Emacs

I'm using Emacs web-mode and write a setting for it like this. (require 'web-mode) (add-to-list 'auto-mode-alist '("\\.php\\'" . web-mode)) (defun web-mode-hook () "Hooks for Web mode." (setq ...
1
vote
1answer
356 views

ERROR: could not find driver after changing from mysql to mariadb

mysql was working fine but I wanted to give mariadb a try on a new server I have going. However I am having an issue where all my php websites seem to have issues communicating with mariadb. Webmin ...
1
vote
1answer
90 views

xDebug compatible PHP editor/IDE for LXDE

Which PHP editor/IDE supports line by line debugging using xdebug on LXDE?
4
votes
1answer
1k views

Does segfaults mean bad memory

This is a brand new server with a new install and fresh compile of Apache/PHP with nothing crazy. Just a WordPress site hosted and I get the following. Could this just mean bad RAM? If so how can I ...
0
votes
1answer
3k views

Installing php phalcon extension

I am unable to install phalcon php extension by folowing these steps. I use 64-bit Linux Mint 14 Nadia. http://docs.phalconphp.com/en/latest/reference/install.html#linux-solaris-mac For the ...
1
vote
1answer
4k views

PHP Upgrade Error (PHP 5.3.3 to PHP 5.4.19 on CentOS 6.4)

I'm using CentOS 6.4 and I was following this tutorial in order to upgrade PHP from v 5.3.3 to v 5.4.19 but I got the following error: Error: php54w-common conflicts with ...
0
votes
1answer
839 views

Allow www-data to perform specific commands

I need a PHP script to perform git pull however I am not naive enough to give it permissions on git. I've wrapped git pull in a script which www-data has permissions for, but I'm not sure how to give ...
0
votes
1answer
117 views

Linux commands to fetch all files,size and path of files from all directories and subdirectories

Can anyone please guide me, how do I use Linux commands in PHP code to fetch all files names and their size and path of files from all directories and subdirectories. I am running a scan code. where ...
-3
votes
1answer
216 views

Best Linux for a small Web server [closed]

I'm currently planning my business servers and I would like to know what's the best Linux distro for these needs: Nginx + MySQL + PHP 5.4 Zimbra Collaboration - Open Source Node.js w/ Forever I ...
0
votes
2answers
293 views

Find PHP process that logs to file

I have started a PHP script via browser and due to a loop error the script continues to be executed even after closing the browser. I am noticing it since the script is logging error messages to my ...
0
votes
1answer
847 views

Installing php5-mcrypt for phpmyadmin

I am trying to install phpmyadmin on a server. Unfortunately, I get the following error: Reading package lists... Done Building dependency tree Reading state information... Done Some packages ...
0
votes
1answer
89 views

File permissions when mixing command line and server

I have a PHP server which creates folders and files for certain things. I also run supporting code from the command line operating on the same folders and files. The problem is that when running from ...
1
vote
1answer
191 views

Package php5-json breaks firephp

Background Recently I upgraded php to version 5.5. Within this upgrade module for json was moved out from php5 package into a new package php5-json. So I installed it. Now the connection with ...
3
votes
1answer
2k views

PHP + Exim4 on Debian - mail does not get delivered

I have a fresh Debian installation with LAMP. There is a PHP script that sends email messages to arbitrary addresses using the mail function, but it does not work - the messages don't get delivered. ...
2
votes
2answers
1k views

Find out screen id

I want to start a program with SSH using PHP, which works fine, but now I want to kill the screen with PHP, but the only thing I know is the name of the screen. How do I find out the screen ID ...
0
votes
0answers
207 views

WordPress on LinuxMint: Can't create directory (or write file)

I run Linux Mint, with Apache2, PHP and MySQL. I've activated modules for Apache so that users' public_html can be used and that PHP-scripts can be run from them. I installed WordPress in my ...
2
votes
1answer
169 views

LAMP Hardening, Transparent Proxy with iptables

I'm running a LAMP server with FTP(S) and several users. The users have only access to uploading PHP files and other web content. Some are running Drupal and Wordpress, but also a few home made stuff. ...
1
vote
2answers
549 views

Compiling PHP and installing it under one directory

I have to compile a few versions of PHP in work but I need an apache service for each version running like we have on Windows. However the configure options seem to have different folders for ...
1
vote
1answer
3k views

How to install phpmyadmin 4.0 on Debian

Is there a way to install an up-to-date phpmyadin on Debian via apt-get? I only found a PPA for Ubuntu on the that you can install with sudo add-apt-repository ppa:nijel/phpmyadmin apt-get update; ...
0
votes
1answer
207 views

setting up sendmail on debian?

I have a LAMP localhost server setup for some development and I want to test out if my code is working. Some of the tests involve checking if the correct emails are sent out by the code at the ...
4
votes
3answers
2k views

Use start-stop-daemon for a PHP server

I'm working on a socket server written in PHP. This part of the work is done but now I need to run it as a daemon. For this I've tried to use start-stop-daemon but it doesn't work. My server is ...
1
vote
1answer
166 views

Preventing script execution and file downloads in a directory?

I have a directory on my website where I'm storing files uploaded by users. I use a whitelist for uploaded file types and also save the files with hashed names, but from what I've read another good ...