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

learn more… | top users | synonyms

1
vote
1answer
9 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
12 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
12 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
25 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
77 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
21 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
22 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
29 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
26 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
9 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
17 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> ...
-2
votes
0answers
15 views

sql server and apche and lan access

I Have a sql server and phpmyadmin and Apache on a Ubuntu laptop 14.04 and ia have a mac i have ftp set up to upload files to the laptop www dir. but i want to make a php my on dream weaver with a ...
1
vote
1answer
28 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
55 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
33 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
160 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
121 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
29 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
39 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
40 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
45 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
17 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
66 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
86 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
81 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 ...
0
votes
1answer
17 views

Excluding some php-pages but not others with wget?

I want to use wget to recursively download a website. The site contains articles served by a php-script, eg. www.example.com/article.php?id=1021&ch=5 - these are what I want, all separate article ...
1
vote
1answer
92 views

What is Best Practice for running PHP in background?

When running the following on the command line it will be suspended until I issue the fg command: /usr/bin/php -r 'phpinfo();' & This is the case regardless if the PHP code is contained in a ...
0
votes
1answer
47 views

Apache / php config for production & staging & development

I have a server that has a production server a staging sever and a development server. I maintain code by changing it on the development server testing it. Then staging it and testing it and then ...
1
vote
0answers
52 views

PHP script can't read CLI arguments when extra extensions are enabled in php.ini

I hope that I'm posting in the right StackExchange. I am facing a very strange problem with PHP CLI. I'm using Symfony Framework and I can't use Symfony's commands properly when I add extensions in ...
0
votes
1answer
277 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 ...
1
vote
1answer
32 views

load missing library from ~/ without root or symlinks on shared hosting?

So I have a library file that is used by a php module, both of which reside in my home dir on my shared hosted cpanel account. Problem is this library depends on libcrypto.so.6 and libssl.so.6 files ...
0
votes
1answer
156 views

NGINX + PHP-FPM Permission denied

I have few WordPress websites, all with same config - difference only with user and domain, but got 403 only for newly created virtualhost: # cat barelef-art.kiev.ua.conf server { server_name ...
0
votes
1answer
76 views

compiling php 5.4 and higher with mysql

i'm running a pile of mediawiki instances on oracle enterprise linux and i'm trying to upgrade from 1.19.x to the latest LTS version, 1.23.x. i'm currently using php 5.3 and due to some odd issues ...
0
votes
1answer
46 views

Installing PHP on OS X. Syntax errors?

When installing OS X on Yosemite with curl -s http://php-osx.liip.ch/install.sh | bash -s 5.6, I get the following: **** [WARNING] Detected OS X Yosemite 10.10. As this is quite new, there may be ...
-1
votes
1answer
258 views

php: command not found on centos

I've currently installed CentOS (6.5 version), nginx, mysql and php. I've tried to navigate to index.php in a browser, and it looks fine, but if I try to run the script via the command-line I get: ...
0
votes
1answer
125 views

No Sendmail but ISPConfig Postfix

This is what php uses to send php mail with the php mail() function: ; For Unix only. You may supply arguments as well (default: "sendmail -t -i"). ...
0
votes
1answer
38 views

Keep PHP's output with tee -a

Normally when running PHP script in web server mode, this would show up: $ php -S 0.0.0.0:12345 PHP 5.6.1 Development Server started at Mon Nov 24 14:09:22 2014 Listening on http://0.0.0.0:12345 ...
4
votes
2answers
697 views

Cron reports error in php5-common job after update

After an update to php5-common this night, cron reports a sed error "invalid option -- 'z'". This problem has also been reported on the Debian mailing list. What should I do, until the problem is ...
1
vote
0answers
46 views

Start glassfish in LINUX server remotely

I want to start glassfish on a server running LINUX, the problem is that my service provider does not grant access to ssh connections nor any other helpful tool to run asadmin start-domain I have ...
1
vote
0answers
12 views

Domjudge keeps Not Authenticated

I am trying to install Domjudge in my VPS. After I run ./configure, make and config database I login at /public/login.php with the user/pass: judgehost/judge but it doesn't log me in. I try at ...
0
votes
0answers
89 views

How to properly install Apache, MySQL, and PHP on Ubuntu 10.4

I have followed a guide on how to install Apache, MySQL, and PHP on my laptop running Linux (Ubuntu 10.4) It appears I have it installed correctly but when I am not sure. I followed this guide here: ...
4
votes
2answers
141 views

how to know which php extensions are installed

I need to install on a lamp server exactly the same php extensions that are installed on an old server, how do to know exactly which extensions are installed in order to install the same on the new ...
0
votes
1answer
39 views

Can someone be so kind as to setup a cronjob for me? [closed]

I've been trying to get cron to execute these two scripts to schedule and post on twitter, tumblr, facebook and linkedin. It worked once and never again. <?php require ...
1
vote
0answers
534 views

Debian PHP5 is 500 Internal Server Error after install, folowed Debian LAMP Wiki

Im trying to setup debian lamp stack for a live production server, im following the wiki at https://wiki.debian.org/LaMp, I have Apache2 working from the /var/www and from my user ...
1
vote
0answers
247 views

Redirect loop with Nginx as reverse proxy and Yii

I've been reading another similar issues and changing some things in my Nginx configuration, but no one worked :/ When I'm trying to access to a specific page at my site, it leads me to a "redirect ...
2
votes
1answer
184 views

Error passing variable from bash to php

I have the following files: vars.txt C=1234567890 Ascript.php #!/usr/bin/php <?php var $C="$argv[1]"; echo "\n $C \n"; $con = mysql_connect('localhost','root','123') or die ("No connected"); ...
0
votes
1answer
31 views

Security concerns

I've recently been struggling with ways to make a easy way for my father to both mount and unmount a harddrive on a linux based system. I thought of a way to execute a shell script with PHP. The ...
0
votes
0answers
42 views

Could session.cache_expire time in php5-fpm/php.ini cause PHP cURL responses to be empty?

Could session.cache_expire time in php5-fpm/php.ini cause PHP cURL requests to have empty responses, if the cache expired before the response came back? My code is like this: $ch = ...
0
votes
0answers
91 views

imageantialias() not available with php fpm with gd and nginx

I'm getting the error that the function imageantialias() is missing despite php5-fpm and php5-gd being installed. I am using a debian system with a nginx server. Everything else is working fine.