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

learn more… | top users | synonyms

2
votes
3answers
4k 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 ...
1
vote
2answers
139 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
284 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
149 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
4k 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 ...
0
votes
0answers
197 views

Can't get Ioncube and Zend to load w/ Apache2.4.4. and Php 5.4.16

I'm trying to build the latest version of PHP 5.4 and Apache 2.4.4 to load Ioncube and Zend optimizer. admin@vps:~> php -v Failed loading /usr/local/ioncube/ZendGuardLoader.so: ...
1
vote
2answers
652 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
885 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
188 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
85 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
31 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
585 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 ...
2
votes
1answer
311 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
64 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
601 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
152 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
562 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
811 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
210 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
369 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
298 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 ...
0
votes
2answers
2k 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
65 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 ...
0
votes
0answers
87 views

My APC opcode cache stopped working without a clearly identifiable cause

My APC 3.1.13 had been running fine for weeks, and today, it stopped working after I restarted PHP5-FPM. If I check out my apc.php it shows it caches some files, and then it just stops caching. I ...
1
vote
1answer
215 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
273 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
85 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
136 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
251 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
129 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
343 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
71 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
99 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
324 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
397 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
40 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
1k 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
443 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
1answer
1k 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
263 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
217 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
349 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
144 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 ...
1
vote
2answers
462 views

Nginx + PHP + FTP - user permission issue

I have a wordpress copy installed on /home/username/public_html/site, and now the problem is : Nginx running PHP with "www-data" identity The site folder owner and group are "username", not ...
0
votes
1answer
650 views

Nginx Ubuntu PHP5 - not found php-fastcgi.pid

I was setting-up Nginx with PHP5 on Ubuntu 10.04.4 TLS Server, and follow this instructions - http://library.linode.com/web-servers/nginx/php-fastcgi/ubuntu-10.04-lucid Everything is fine before I ...
2
votes
1answer
265 views

PHP phantom cron job

I disabled all my cron jobs by putting a # in front of them. Except for one: @reboot echo "Hi I rebooted" The rest are: #0 2,14 * * * /home/backup1/mysql-backup.sh #0 * * * * mono ...
2
votes
2answers
235 views

I can not remove folder from server

Accidentall I created the folder on remotely server (Server OS is Linux) using php: mkdir("folder_name",0); Now I can not delete this folder from server. I think this is from permission, because 0 is ...
0
votes
3answers
4k views

HTTPd shows PHP code instead of executing it

My setup: # grep php /etc/httpd/conf/httpd.conf LoadModule php5_module modules/libphp5.so AddType x-httpd-php .php AddHandler php5-script .php # grep PHP /etc/httpd/conf/httpd.conf PHPIniDir ...
2
votes
2answers
2k views

Fatal error: Class 'HttpRequest' not found

Whilst trying to make this request I have this error. I have tried to run "sudo pecl install pecl_http" but always fails. Could not find curl/curl.h After I have tired(yum instead of apt-get ...
1
vote
2answers
482 views

SSH tunnel to MySQL for PHP scripts

I need to establish an SSH tunnel so that my local PHP script can connect to a MySQL server on a remote server. Remote machine: MySQL (127.0.0.1:3306) on Linux (SSH port 44422) Local machine: Linux ...