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

learn more… | top users | synonyms

0
votes
0answers
4 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
0answers
10 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
1answer
1k views

Slow DNS resolve from curl/lynx etc

I have a strange issue with DNS resolving: Root of the problem is that I get curl errors: "Error executing HTTP request: name lookup timed out". Tried to ping some sites, all resolved fine (and fast). ...
0
votes
0answers
31 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 ...
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 ...
2
votes
1answer
1k views

Howto fix my PHP install on FreeBSD using pkg

I've been messing around with pkg install, installing / removing both php5-5.4.29 and php55-5.5.13. But when I run php from the command line, it will give me an error like this: PHP Warning: PHP ...
0
votes
1answer
3k views

mcrypt, EPEL and CentOS 6.4

I am having issues installing php-mcrypt. I am not an administrator of any level. I have performed the following. Installed EPEL Installed REMI Configured EPEL Updated YUM Cleaned YUM Installed ...
0
votes
1answer
10 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 ...
1
vote
1answer
846 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
20 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
1answer
684 views

install php5-fpm on Debian Squeeze

I tried in many ways to install php5-fpm in om Debian squeeze, but couldn't. I was wondering if I have to upgrade php5.3.3 to higher version because it doesn't seem to work on lower than php5.4 I ...
1
vote
0answers
31 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
13 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 ...
2
votes
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 ...
1
vote
1answer
656 views

phpmyadmin doesn't work after installing php5-mysqlnd

I am currently running into some problems with phpMyAdmin. I set everything up correctly and made sure everything worked. Then later after some developing on some pages I noticed I couldn't execute ...
3
votes
1answer
705 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
1answer
452 views

Centos - executing a bash script from PHP

I have 3 scripts (I have removed the help_page function from the networkstats.sh script when I pasted here to save some space): api3.php <?php output = shell_exec('/bin/bash ...
0
votes
1answer
429 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: ...
1
vote
4answers
102 views

Script to delete files that don't match certain filenames

I have a folder with 500,000 images, sorted in subfolders by year and month. I'd like to create a script that does this: If the filename does not match any of the filenames in names.log then delete ...
5
votes
1answer
386 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 ...
0
votes
1answer
477 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 ...
0
votes
1answer
454 views

how to automatically cleanup failed PHP uploads in /tmp?

How can I automatically cleanup failed uploads? PHP is storing them in /tmp and all file names look like phpAbCDeF (basically php followed by 6 characters). I know that I can use the command: find ...
9
votes
8answers
13k views

How do I install a PHP CLI with a usable interactive prompt on Debian Wheezy?

When I install php5-cli on Debian Wheezy (currently testing), the interactive prompt is very unusable due to missing readline support (bug 341868). What's the easiest way to install a version linked ...
0
votes
1answer
842 views

CRON job to check if PHP script is running

I am having trouble regarding CRON jobs, I've basically got two php scripts that I want to keep running continuously on my server. Currently I am using an infinte loop to keep them going but they seem ...
2
votes
1answer
49 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 ...
2
votes
2answers
1k 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: ...
0
votes
1answer
29 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}\' ...
1
vote
3answers
1k views

I get a “command not found” error, though the script file is shown by “ls”

I want to run yii console commands in shell. I run protected/yiic in the console, yet it fails, yielding -bash: yiic: command not found What's the problem? See the shell commands and responses I ...
2
votes
1answer
5k 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
0answers
21 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 ...
3
votes
3answers
4k views

Is there any command to enable/disable a php extension from command line?

Is there any command to enable/disable a php extension easily from command line? (php.ini)
0
votes
1answer
34 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 ...
0
votes
2answers
23 views

Mail is not going in some domain

We are using Phpmailr function to sending mail after registration . When we are using gmail,hotmail mail ID for registration mail is going perfectly. But when we are using AOL or some other domain ...
0
votes
1answer
368 views

Install php 5.6 on Debian Wheezy on Armel

I'm working with an ARM server, and it has Debian Wheezy on it. Poor choice, I know, I didn't install it. I've (loosely) followed this guide and added this to sources.list: deb ...
0
votes
1answer
27 views

Building PHP from source for use in Apache

I'm having trouble when installing an older version of PHP (5.1) on a Ubuntu machine. I've tried to downgrade it without success using apt-get, so I tried to install from source. After the ...
0
votes
1answer
51 views

Apache not reading changes to PHP files

I'm developing on a CentOS6 server with Apache and PHP. When I make a change to a PHP file (and save) it appears that apache is not reading the changed file - it's still processing my old .php file. ...
0
votes
0answers
40 views

.htaccess is not working in users' public_html directories

I followed a tutorial: http://www.techytalk.info/enable-userdir-apache-module-ubuntu-debian-based-linux-distributions/ but .htaccess is not overriding Apache's configuration. May be "AllowOverride ...
0
votes
0answers
10 views

Unable to get Nginx5 and php5-fpm running on mac

I've an issue whilst trying to get Nginx and PHP FPM working together. I have installed both the packages with brew, and the server is working as expected with static pages. However, when it comes ...
0
votes
1answer
27 views

php shell_exec() + /dev/hwrng: no output

I have this PHP script: <?php $od = shell_exec('od /dev/hwrng --address-radix=n --read-bytes=4 --format=u4'); ?> <html> <head> <title>hwrng</title> </head> ...
5
votes
1answer
7k views

-bash: phpize: command not found on Centos 6

When I try to run phpize I get -bash: phpize: command not found I have run yum -y install php-devel but that returns: Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * ...
1
vote
1answer
55 views

“not a valid package archive” when trying to install PHP extension?

I'm running CENTOS 6.6 on a VPS and am trying to install the ZMQ PHP extension and tried installing using the command shown in the instructions: sudo pecl install zmq-beta However, it fails, ...
0
votes
2answers
111 views

How to install php5-auth-pam on newer versions of Ubuntu?

I'm trying to install php5-auth-pam on Ubuntu 14.04, but package doesn't exist after Ubuntu 12.04. I've tried by downloading package here: http://packages.ubuntu.com/precise/php5-auth-pam I've done ...
0
votes
1answer
50 views

mysql high availablity for LAMP application (ubuntu 14.04)

im trying to achieve HIGH Availability (HA) for a LAMP application(News Portal website) which might be of interest to many unfamiliar users.For files im using Glusterfs (replica) for redundancy ...
0
votes
1answer
377 views

Can't Install php-mssql or freetds on Centos7

My goal is to connect to MS SQL Server 2005 using PHP. I have installed PHP and ODBC. I am running CentOS7. PHP Version => 5.4.16 .... (from php -i) .... odbc ODBC Support => enabled I am ...
2
votes
4answers
4k 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 ...
0
votes
2answers
203 views

Apache httpd cannot parse php on CentOS 7

I'm setting up a new CentOS 7 server, I installed apache httpd successfully and get the html welcome page then I installed php 5.4 then tried to test it using test page: <?php phpinfo(); ?> ...
0
votes
1answer
40 views

stop IP address to land on website home page [closed]

I notices that when i type my VPS IP address in address bar then it display website home page. So it may case duplicate content. Can you please tell me How to stop IP address landing on website home ...
0
votes
1answer
59 views

Terminal sandbox commands

I was wondering if there's a way to run shell commands that affect only a certain directory and its subdirectories. I'm using PHP and I want to make an app that allows the user to execute shell ...
1
vote
1answer
52 views

Should I replace my system binary of PHP in /usr/bin with a self compiled one? [closed]

I had PHP version 5.4 installed on my Mac 10.9 machine and wanted to upgrade to 5.6. I downloaded the source files and ran ./configure, make and make install. I looked and it seems to have compiled ...