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

learn more… | top users | synonyms

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
116 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
612 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
783 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
190 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
5k 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
466 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
375 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
148 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
8k 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
245 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
382 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
163 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
6k 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
245 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
131 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
979 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
505 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
87 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
566 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
817 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 ...
0
votes
2answers
1k 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
303 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
1k 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?
0
votes
1answer
461 views

How to start a GUI program with PHP from website

My firm has some Ubuntu 12.04 running where there is no display attached and that are behind different firewalls. The visitor on local websites on that servers should be able to start a GUI program ...
1
vote
2answers
3k views

What is the best place to put php files above server root directory?

I am running a web application and I want to move a directory containing my php files above the server root directory. Where would be the best place to put them? On my web server I rent from ...
0
votes
0answers
77 views

How to start a GUI program in a VM with PHP

I have an Ubuntu 12.04 VM running on my online server where there is no display attached. I want to start Teamviewer there on that VM to get graphical access to that server. I guess I have to give ...
1
vote
1answer
263 views

Executing commands with PHP: using normal user, but its home directory is /root

I'm using a custom compiled installation of Apache + PHP, listening on port 80. Apache is configured to run as a normal user, with the proper settings User and Group of the httpd.conf file. After ...
2
votes
2answers
443 views

How to open process substituted file from php?

Here's what I tried to do myself: $ type 1.sh #!/bin/bash -eu php -r 'var_dump(file_get_contents($_SERVER["argv"][1]));' -- <(echo 1) $ ./1.sh PHP Warning: file_get_contents(/dev/fd/63): failed ...
4
votes
2answers
94 views

Who cuts off first symbol of process substituted file and for what reason?

$ type 1.sh #!/bin/bash -eu php <(echo 12) $ ./1.sh 2 $ type 2.sh #!/bin/bash -eu cat <(echo 12) $ ./2.sh 12 $ type 3.sh #!/bin/bash -eu echo 12 | php $ ./3.sh 12 $ type 4.sh #!/bin/bash -eu ...
0
votes
1answer
294 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 ...
1
vote
2answers
365 views

Arch Linux: I get 500 error when trying to open PHP file

I get the HTTP Error 500 (Internal Server Error) error with Chrome when trying to open a simple PHP file. I have installed Apache and PHP correctly as instructed in this article. Including the PHP ...
0
votes
1answer
198 views

Use an existing wampserver from a windows partition on linux mint

I dual boot Windows 7 and Linux Mint 14. I have wampserver installed on Win 7 and have a couple of websites already set up there. Is it possible to use that same installation apache/mysql/php ...
0
votes
1answer
647 views

Arch Linux: Apache just isn't interpreting the index.php files

Title is self explanatory. I'm on Arch Linux, I installed the apache, php, php-apache and mariadb packages. I have added the following line to the /etc/httpd/conf/httpd.conf file: LoadModule ...
0
votes
0answers
93 views

sybase and iconv

I inherited an old Ubuntu 6.10 server running php 5.1.6 which is using sybase to connect to MSSQL. A user submitted some text containing an en-dash and crashed one of my script. It turns out sybase ...
0
votes
0answers
122 views

uploading from Netbeans to remote CentOS server failed

I have a php web application on Netbeans on my Ubuntu , and server is CentOS on a virtualBox . Suddenly uploading to server stopped and I'm getting these errors for non-root user : Failed: file ...
1
vote
0answers
364 views

Debian - Apache 2.2 & mod_php - memory usage

I have a memory problem with my servers (Debian 6.0) where is installed Apache httpd 2.2, mod_php and APC. Actually it seems that httpd allocate all available memory (4GB) when is waiting too much ...
0
votes
2answers
537 views

How do I make PHP securely load files from the server root home folder on CentOS?

So I built what I thought would be this awesome reporting page in PHP that loads data from some CSV text files and creates nice Google charts and tables for our clients. I then thought it would be ...
0
votes
1answer
48 views

How to resolve midgard2 already loaded?

When running PHP on my Ubuntu 13.04 machine I get the following warning: PHP Warning: Module 'midgard2' already loaded in Unknown on line 0 This tells me exactly nothing. How could I resolve this ...
0
votes
2answers
2k views

Ubuntu crontab php not working

Yes, I have read many, many documentations but I can't get it to work. I have a simple single php file which I want to run once or twice in a minute. My php file is called: cronjob_refresh.php and I'm ...
0
votes
2answers
729 views

Problem with configure and build php 5.2 on redhat 5

I downloaded php binaries and tried to build the same using following command. ./configure --with-apxs2=/usr/sbin/apxs --with-mysql But i'm getting the error related to mysql client library. ...
1
vote
2answers
3k 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
0answers
325 views

centos 6.3 apache local network not working

I have clean installed centos, apache, mysql, php and have my php pages running fine at 192.168.1.66. I type that ip in on another computer (macbook) on the same network and get nothing. Page time ...
0
votes
1answer
276 views

PHP compilation - link to library

I am compiling php 5.3.13 on my server. I want to create an autonome php5 folder. So prefix is: /usr/local/php5 In this folder I have a lib folder, where I put all lib needed for php to be executed ...
0
votes
1answer
390 views

Installing Ioncube loaders without issues CentOS 5.9

Seem to be having issues installing Ioncube loaders on CentOS 5.9. I followed this guide to install Ioncube: but it's still not working on the site at all, I keep getting this error on BoxBilling, ...
0
votes
1answer
157 views

Bash config files being read in contradiction to `man bash`

While trying to determine the differences between .bashrc and .bash_profile I notice that .bashrc is never read, and that .bash_profile is only read from SSH, but not from PHP. This seems to ...