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

learn more… | top users | synonyms

2
votes
3answers
708 views

Cannot Access Webpage from Outside LAN

I have a CentOS 6.0 web server running httpd, mysql, php, and Joomla 2.5. It has a static, public IP address. I can access the webpage (which is the Joomla management console) by IP address perfectly ...
2
votes
0answers
902 views

Nginx Owncloud 4 produces “No input file specified.”

I'm trying to setup an Owncloud 4 instance with nginx as a webserver. The host device is a Raspberry Pi with preinstalled Debian 6. When I try to open the URL to the Owncloud installation in a ...
2
votes
0answers
447 views

proper permissions under HTTP root with Apache2 + FastCGI + Suexec

I currently have a setup which runs Apache2 + FastCGI PHP + Suexec. As an example, I'm using /mnt/data/www/vhosts/inflex.co.uk/htdocs as a DocRoot for one of my virtual hosts. I have a script ...
2
votes
0answers
967 views

MySQL socket and PHP (and other languages)

Background info I'm currently running CentOS (or Red Hat?). uname -a gives (I edited out my domain name) Linux XXXXXXXXX.com 2.6.32-71.29.1.el6.x86_64 #1 SMP Mon Jun 27 19:49:27 BST 2011 x86_64 ...
2
votes
1answer
747 views

Getting PHP fatal errors in vTiger while logging from a normal users [closed]

I am getting the error below and notices in Apache logs when I am trying to login with any normal user on vTiger although admin user is working fine and able to see everything as expected. Below are ...
1
vote
2answers
464 views

How to recover a utility. (Accidentally Deleted /usr/bin/php file)

New Linux user. I accidentally overwrote my /usr/bin/php file. The php command no longer works. What's the best way to recover that file? Using bash and Linux Mint distro.
1
vote
2answers
633 views

CentOS, PHP file is running from browser, not from cron daemon

I am working on CentOS. I have created a PHP file which run from browser http://mydomain.com/backupfile/dobackup.php I have added the script from crontab and made the file executable, but it is ...
1
vote
3answers
451 views

Why does Crontab give me an error with my PHP script when running it from the terminal does not?

I'm having some problems with running the Crontab with PHP files. I have this same php scripts running in the Crontab for more than 6 months but some days ago mysteriously they stopped to execute the ...
1
vote
1answer
838 views

Email sent from web server using PHP does not arrive

I am trying to send email via my web server using PHP but for some reason the email never arrives. According to PHP the email was sucessfully sent but I never receive the email. I know its not a spam ...
1
vote
2answers
50 views

wget - corrupted directories

I am using wget to create an HTML mirror of a php templated site on localhost. I am encountering a problem with some directories being mirrored as extensionless documents. What could be causing this ...
1
vote
2answers
479 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 ...
1
vote
2answers
207 views

Dotdeb says PHP 5.3.18 is the latest

I'm using Debian 6 . Now I don't understand why it says PHP 5.3.18 is the latest when 5.3.2 has been around for 2 years? I need at least PHP 5.3.2 for my symfony project. Thanks.
1
vote
2answers
485 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 ...
1
vote
2answers
135 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 ...
1
vote
2answers
667 views

How to install PHP 5.3 on RHEL5

I'm working with a RHEL5.1 box that has PHP 5.1.6 installed by default. I need to upgrade PHP to PHP 5.3.x. I've tried several tutorials and have had no luck. Can anyone help me out with this?
1
vote
5answers
981 views

Start/stop program from website

I have some users on my machine that I allow to run small Mumble voice servers. I would like for them to be able to start/stop their voice server from a website (being ran by Apache). With the current ...
1
vote
2answers
3k views

Apache 2 and PHP 5 not working

I have a test.php file in the web server directory with php phpinfo(); content. When I try to execute php test.php at a shell then it executes correctly. But when I try to open the web page in a ...
1
vote
1answer
52 views

understanding LAMP: linux apache mysql and php [on hold]

I have multiple questions and I am confused. Few months back, I was installing a software locally ~/bin. Tools got installed successfully and running fine till date. In installation it automatically ...
1
vote
1answer
73 views

Pass bash script arguments in double quotes to php cli script

I am trying to pass arguments to a bash script and then to a php script, I have literally looked at 30+ links, and tried over a dozen examples, and I for whatever reason have not been able to get the ...
1
vote
2answers
80 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 ...
1
vote
1answer
2k views

How to install phpmyadmin 4.0 on Debian

Is there a way to install an up-to-date phpmyadin on Debian Squeeze via apt-get? I only found a PPA for Ubuntu on the PMA download page
1
vote
2answers
245 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 ...
1
vote
2answers
313 views

PHP package won't install correctly

Yesterday I did apt-get upgrade on my Debian/testing and broke a php5 package. I even tried to remove & purge with apt and dpkg clean apt cache. When installed again clean, it fails with ...
1
vote
1answer
341 views

Execute file in its native directory with shell script

I'm executing a php file from the php-cli with a shell script. One of the php files creates a file named available_data during the course of its execution. The problem is that the php file needs to ...
1
vote
2answers
5k views

Getting PHP to work with apache to run .php files through browser

I have VPS running Debian 5.0 (I think) and I would like to get it to run PHP files. I was told it needed to be configured with Apache. I tried entering the command apt-get install apache2 php5 ...
1
vote
2answers
54 views

shell script to find the combination of the array elements

I have a shell script in which I have defined an array. The array contains more than 2 elements. I need to find the combination of all the elements in my array. Suppose, if my array has the elements, ...
1
vote
2answers
27 views

Tracking from httpd instance to PHP script when PHP is a module

I'm trying to figure out exactly what's going on that kicks CPU usage in random httpd workers so high but I'm having a little hard of a time figuring out what PHP page is being requested so that I can ...
1
vote
2answers
36 views

PHP+FastCGI+nginx on Debian

I new with Debian. I want to use php on Debian. I do: apt-get install php5-cli php5-cgi spawn-fcgi Create file /usr/bin/php-fastcgi: #! /bin/sh PHP_FCGI_CHILDREN=3 PHP_FCGI_MAX_REQUESTS=1000 exec ...
1
vote
1answer
45 views

impact of allowing Apache to execute some commands on the server

I have an Ubuntu 12 web server running apache2, I developed a graphic interface using PHP to make users able to create their own email account by themselves ( exec() function), so I used visudo to ...
1
vote
3answers
278 views

php shell_exec() permission on Linux Ubuntu

I'm developing a php application using Linux server. My problem is executing shell_exec() to call some exe file is not work(actually not exe, it's kind of linux executable file) echo ...
1
vote
1answer
146 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
1answer
2k 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 ...
1
vote
2answers
308 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
101 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 ...
1
vote
1answer
80 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 ...
1
vote
1answer
148 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
2answers
641 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 ...
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 ...
1
vote
2answers
574 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 ...
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)
1
vote
3answers
2k views

Curl not found (Glype)

I'm trying to install proxy software called Glype on my server. It continues to tell me that "Glype requires cURL/libcurl". I have the latest version of curl installed. Why might this be happening? ...
1
vote
2answers
781 views

How can I get crontab to use a different PHP installation location?

I have a MAMP setup which runs PHP 5.3.5 on my Mac OS X 10.5 computer. I am trying to install a crontab that executes a PHP script, which is located on my MAMP server. I can only get the crontab to ...
1
vote
1answer
957 views

Connect to a remote mysql server with bash php or perl

What is the best and lowest resource way to connect to a remote mysql server (server1.example.com) and execute queries like INSERT into SERVICES (user, id) ($user, $id) from server2.example.com? ...
1
vote
2answers
485 views

run script asynchronously / in a different process

I have a simple php script <?php for($i=0;$i<10;$i++){ sleep(1); echo $i; } Which I run from the command line php myfile.php & I would expect I can do other things in the command line, ...
1
vote
1answer
52 views

Can not execute some shell command from php

I want to execute phpcs commands from phpcode using shell_exec function. During execution it gives error /usr/bin/php: relocation error: /usr/bin/php: symbol X509_free, version OPENSSL_1.0.0 not ...
1
vote
1answer
40 views

cannot locate cacti files under /srv/www/cacti

I am installing cacti on SLES-11-SP2 following instructions on Open Suse Cacti guide but I cannot locate the cacti files under /srv/www/cacti after the installation. Do you have any idea where they ...
1
vote
1answer
67 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. ...
1
vote
2answers
368 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 ...
1
vote
1answer
250 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 ...
1
vote
3answers
840 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 ...