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

learn more… | top users | synonyms

0
votes
0answers
8 views

Enabling URL rewriting for API [migrated]

I'm new to configuring API web servers and I'm trying to enable URL rewriting for the server so that a user can go to my public DNS.com/getAlbum to access a method within my api.php file (assumption, ...
1
vote
1answer
25 views

How do I get the filename and job numer of an “at” job

We have a script (generator) that is creating a series of at jobs. The at jobs fire another PHP script. The generator script loops through and does something like this: exec('/usr/bin/at 5:00 May 11, ...
1
vote
1answer
35 views

Operation not permitted

I'm on OS X and I'm trying to write an interface for for an interpreter, the communication with the interpreter looks like this in PHP: $f = fopen('mmascript.m', 'w'); fwrite($f, ...
0
votes
0answers
33 views

How to configure the various components of a LAMP stack [on hold]

Setting up a LAMP stack with a frontend Web server and backend Application server and a separate DB server. I need a nice simple walk-through guide on polishing it all up and getting everything ...
2
votes
1answer
30 views

Getting sendmail to send mail at a specific time

We have a stock PHP ecommerce application that sends notification emails out whenever a successful purchase is made. We want one of the notifications to be sent 2 weeks after the purchase is made. ...
1
vote
0answers
18 views

Correct/Efficient/Reliable way to import log file entries to a MySQL database?

I'd like to be able to query our server access log files to identify abuse patterns. Log files really aren't very queryable, and it would be fairly easy to do what I wanted if each hit was a row in a ...
2
votes
1answer
29 views

Why was it necessary to restart apache webserver to copy files via php on newly mounted filer?

Scenario allready running Apache Webserver 2.4.2 on Solaris 5.10 newly added nfs mount as target for copying files via php executing cp via shell with the same user as the webserver works copying ...
4
votes
1answer
47 views

How can I launch a command, wait 2 seconds and return the output without killing the command?

I'm trying to launch a command from php with shell_exec which calls a bash script that launches a program that stays running, but sometimes this program throws an error and exit, what I need is a way ...
2
votes
3answers
42 views

Can system time be paused?

This may or may not be the right approach, but it's feasibility was requested of me: We have a demo server that we update from time to time in order to keep the statistical calculations up-to-date. ...
1
vote
0answers
44 views

Can't run php cli at webuser but will run as root

I am running a Magento application on a Nginx server. nginx + php-fpm running as webuser:www There are some function in the shell directory of Magento which run fine as root and the import run fine ...
0
votes
0answers
53 views

PHP 5.4 ON CENTOS 7 , NGINX , page not found error

I am trying to install PHP 5.4 on CentOS 7 currently , my conf files look like the following : /etc/nginx/conf.d server { listen 80; server_name 178.62.255.79; root ...
0
votes
1answer
30 views

Find all the PHP scripts with email in my postfix mail queue

How do I find all the scripts that have mail sitting in my postfix mail queue? This server is sending out spam and I've spot checked it, but I want to make sure I haven't missed any scripts that may ...
1
vote
0answers
16 views

openssl decrypt file [migrated]

Hopefully someone knows the answer... BACKGROUND I have created a small routine in PHP that encrypts a (large) file using the cipher AES, key length 256bits and the block cipher CBC. Now, because ...
1
vote
1answer
41 views

Find only in directories n levels deep

I use this command to find and run all istances of wp-cron.php I have for each site I have: find /var/www/ -name 'wp-cron.php' -exec php -q "{}" \; Since my websites tree is: ...
0
votes
1answer
62 views

Installed PHP extensions to wrong PHP version

I just bought a VPS and it came with PHP5.3.3 and that wasn't good for our website, so I successfully (so it seemed, anyway) installed PHP5.6.7 and successfully registered it with Plesk. For the ...
1
vote
1answer
67 views

Unable to run php on Linux Mint 17.1

I'm trying to install LAMP on Linux Mint 17.1 following this tutorial here: http://community.linuxmint.com/tutorial/view/486 The Apache part was okay, I can access the localhost which shows a ...
0
votes
0answers
22 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
55 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
0answers
146 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 ...
0
votes
1answer
16 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 ...
0
votes
1answer
27 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
0answers
33 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
23 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 ...
0
votes
1answer
948 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: ...
5
votes
1answer
397 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 ...
2
votes
1answer
130 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 ...
0
votes
1answer
33 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}\' ...
0
votes
0answers
28 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 ...
0
votes
1answer
42 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 ...
1
vote
4answers
112 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 ...
0
votes
2answers
26 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
29 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
64 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
59 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
14 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
37 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> ...
1
vote
1answer
97 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
171 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
75 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
679 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 ...
0
votes
2answers
360 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
47 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
73 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
72 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 ...
0
votes
1answer
79 views

Create folder as Apache with user add Centos

I have a windows drive that's mounted onto my Linux server. PHP and Apache web server needs to create folders on the windows drive with (mkdir) but I get permission error. I have mounted my windows ...
0
votes
1answer
22 views

How to make Logwatch track git commits

I have a webserver with a git repo containing a website. I have made a CMS using PHP where PHP automatically commits to git when files are changed. I would like to track these commits (preferably in a ...
0
votes
0answers
90 views

Updating my version of php to the latest 5.5 version

I'm trying to update the version of php 5.5 to the latest version (5.5.20 at the time of writing). I'm doing this on a CentOS v6 machine. I've tried following the steps here: ...
0
votes
0answers
139 views

PHP “Output file write error” with shell_exec and stdin (|)

php -a echo shell_exec('djpeg image.jpg | pamfile'); result: Output file write error --- out of disk space? stdin: PPM raw, 500 by 373 maxval 255 (djpeg converts a jpeg to PPM and writes to ...
0
votes
0answers
111 views

cURL settings in debian

I recently setup a cURL script, wich I tested at a Windows XAMPP envirement. Now I want to bring it live on our Debian machine, but its not working anyhow. I think this has something to do with the ...