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

learn more… | top users | synonyms

1
vote
1answer
269 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
406 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
97 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
967 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
129 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
232 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
310 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
1k 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
92 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
214 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. ...
3
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
221 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
184 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
639 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
4k 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
246 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
206 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 ...
0
votes
1answer
1k views

Difficulty installing PHP from source to CentOS 6.4

The problem: After installing PHP from source, functionality is not present - my phpinfo test page does not work. If I use yum to install from the repository functionality is restored. Why am I ...
1
vote
1answer
139 views

Bundle my scripts to make an installer in Unix?

We've got a PHP script running MongoDB in the background. I want to make it a bundle (Installer) for Unix. I will use it to install the following on any machines: Install Apache, PHP + MongoDB ...
0
votes
2answers
752 views

How can I access the log via a php script?

I have a statistics-file on my apache server on /var/www/vhosts/test/statistics/logs/access_log I tried using echo system('cat /var/www/vhosts/test/statistics/logs/access_log'); in a php ...
1
vote
2answers
873 views

Minimize PHP.CGI.Argument.Injection and further hardening of the Centos 6.4 web server

We have Centos 6.4 server with a physical firewall. We keep seeing quite an number of PHP.CGI.Argument.Injection is detected by the firewall. On the server itself we have done the basic apache ...
2
votes
0answers
197 views

How do I install PHP5.4.16 on Debian Wheezy?

I used to be able to install php-5fpm=5.4.16-1~dotdeb.1, but it seems that this package is no longer available from the latest dotdeb packages. Here are the steps I tried. Append the following two ...
1
vote
5answers
6k views

How to install php5-memcached on Debian 7 with PHP 5.5?

My attempts to install the PHP 5 Memcached module on my Debian 7 VirtualBox VM failed: root@testvm:~# apt-get install php5-memcached Reading package lists... Done Building dependency tree ...
0
votes
2answers
536 views

Unresolved dependencies though the packages are installed (Debian 6 Sqeeze)

I'm working with a VirtualBox 4.2.14 VM and Debian 6 Sqeeze as guest system and want to install some PHP modules: root@devmv:~# apt-get install php5-fpm Reading package lists... Done Building ...
1
vote
0answers
413 views

Compiling PHP-FFMPEG Extension

cd ffmpeg-php* phpize ./configure --with-ffmpeg=/usr/local/cpffmpeg make Then I end up with the following issues on my make: ... ... ... /usr/src/ffmpeg-php-0.6.0/ffmpeg-php.c:86: warning: ...
0
votes
1answer
167 views

Unable to access http service intranet

I'm not sure if this is the right place, if this is the case I will move the question with no problem. I'm setting up a web server for testing Wordpress. Everything works fine if I try to access the ...
2
votes
3answers
10k views

Cannot install PHP packages in CentOS

In CentOS 6.3 (Edit: updated to 6.4) I can't install any PHP (MySQL, and many other) packages. For example output of yum install php-devel is: Loaded plugins: fastestmirror Loading mirror speeds ...
2
votes
2answers
307 views

Define custom DNS server when looking up host

I'm having trouble with my current web host's DNS server which doesn't correctly resolve IP addresses for Baidu. shell_exec('host -W 2 180.76.5.168'); shell_exec('nslookup 180.76.5.168'); Is there ...
0
votes
1answer
412 views

Multiple PHP Versions / cPanel with mod_fcgid

I'm trying to get multiple PHP versions working on a cPanel server which was compiled with mod_fcgid and PHP 5.3. Below is the PHP config generated by cPanel. AddHandler fcgid-script .php5 .php4 ...
1
vote
1answer
167 views

Delete key doesn't work properly in PHP interactive shell

In the interactive shell oh PHP Delete key is not working and produce ~ instead. Anyone know how to get this key to work? I am using Ubuntu 13.04 if this does matter.
1
vote
1answer
7k views

Possible to install PHP 5.2.17 on a new CentOS 6.4 system?

I'm trying to set up CentOS 6.4 (Linux 2.6.32-358.11.1.el6.x86_64) with a specific version of PHP (5.2.17) as it is required by an app I'm trying to install. I've downloaded the PHP version and ...
1
vote
2answers
1k views

PHP exec command has the result 0 even if an error occurs

I have this PHP code: $execout=exec('ssh root@xxx.xxx.xxx.xx "sudo /etc/init.d/smokeping reload"',$output1,$result); if($result !=0){ echo"that can't reload"; } else{ echo "successfully ...
0
votes
3answers
1k views

Linux mail client that can trigger a PHP script to parse email received

Is there any simple text-based mail client that I could use that could trigger a PHP script to parse mails received from the users? I have a PHP application that sends email out to users and it would ...
1
vote
1answer
261 views

Access Remote files through http path

I am using lamp on CentOS 6. Application code is written in CakePHP. Application files path is "/var/www/html/my_app". Another file server is mounted with an Application Server. Mounted path on ...
0
votes
1answer
155 views

stream a certificate to stdout to download it in php

Related Questions : when downloading certficate binary data , result is invalid certificate Download binary stream data from browser using PHP with web service “ downloaded file is corrupted ” ...
1
vote
1answer
34 views

Searching multiple mysql tables for the same 2 fields in each table

I am trying to figure out how to search mysql tables for the same 2 fields. What I have is 2 tables in the same database. Below is what I have currently:- single search works ok SELECT * FROM ...
1
vote
2answers
1k views

Why does media wiki install stop?

I am building a new MediaWiki installation on a CentOS 6.4 system. Server version: Apache/2.2.15 (Unix) Server built: May 13 2013 22:11:16 PHP 5.3.3 (cli) (built: Feb 22 2013 02:51:11) Copyright ...
3
votes
1answer
572 views

suexec with chrooted environment

I'm trying to get a chrooted Apache environment working running mod_fcgid with suexec. Looking at suexec log inside jail, the wrapper scripts are being executed with no problems, however, when I look ...
0
votes
2answers
96 views

How to get Apache to use upgraded PHP

I need to upgrade to a higher version of php. My current version is 5.1.6. So I am trying to upgrade php to version 5.3.26. php installed just fine in /usr/local. But at least according to ...
2
votes
1answer
1k views

How to execute php file as different user securely?

I want to confirm that my thoughts are correct as this is about security matter. We have web based application which is using db2 database. db2 runs under the db2inst1 user. Now we want users of the ...
1
vote
1answer
674 views

PECL memcached installation gets error

I installed Zend Server 6 (debian). Also installed several packages: apt-get install gcc apt-get install g++ apt-get install libncurses5-dev apt-get install zlib1g apt-get install zlib1g-dev ...
0
votes
1answer
943 views

Nginx returning 502 Bad Gateway

I'm trying to set up an Nginx webserver generally following this guide but using perusio's configuration. When I try to access the site, I get a 502 Bad Gateway page. Searching on the error I've seen ...
1
vote
2answers
2k views

Git pull error libcurl.so.3 not found

I have a php script to git pull from my github repository set up in my webservice hook urls like so: <?php echo shell_exec('~/git/usr/bin/git pull 2>&1'); ?> When I open this script ...
2
votes
2answers
342 views

Does PHP exec() store the executed command anywhere?

Suppose I have the following code in a PHP web application. $encrypt ? $password = generatePassword($passwordstrength): $password=""; $estring = "7z a -p$password -mx0 packFoo.aes.7z mydir/foo"; ...
0
votes
2answers
2k views

How can I check if my cronjob is runnning on my server via PHP?

I would like to give out a warning If cron is not running or if a certain cronjob is not set in crontab on my server. Is this possible to check with php?