PHP is a widely-used general-purpose scripting language that is especially suited for Web development. The current version is 5.3.3, released on July 22, 2010.

learn more… | top users | synonyms

2
votes
1answer
879 views

Upgrade PHP to 5.4.14 on OS X 10.7.5 Lion

I am trying to upgrade PHP on my Mac. I have downloaded PHP 5.4.14 and have no problems with the configuration command: ./configure \ --prefix=/usr \ --mandir=/usr/share/man \ ...
2
votes
1answer
2k views

Nice commands in a .sh script for cron jobs

I have this php script that I need to run on shared webhosting. I have created a cron job that executes an sh script. The command for the cron was: /bin/sh /home/user/script.sh So I'm assuming it is ...
2
votes
1answer
1k views

Can I Call AHK Script From PHP or Javascript - Also How Do I Pass A Variable to a Script?

If I have an AHK script which has a variable in it - how can I pass a value to that variable so that the script runs with that value? Can I call an AHK script from PHP or Javascript - if so how? I ...
2
votes
1answer
252 views

curl works at the command line, but how do i put it in a php file?

The following curl format works for me from the command line. The line below is just sample data, but the format works. curl -u email@email.com:1234567 https://api.email.com/status How do I ...
2
votes
2answers
129 views

Detect filetype in narrowed region

I am using the terrific NrrwRgn plugin. I often edit XML files with PHP in CDATA sections, so in the narrowed buffer I get this: <![CDATA[ $foo='bar'; doSomething($foo); ...
2
votes
2answers
2k views

Installing PHP/Apache on Windows XP

I'm trying to install an Apache web server with PHP on my Windows XP Pro box, but I'm not having any luck. I'm trying to mimic a production server, so I'd rather not have the latest. The prod ...
2
votes
2answers
18k views

http://localhost:8080 is not working on running apacher Server through XAMPP

I am unable to configure a PHP/MySQL/Apache environment on my local machine using XAMPP. In my xampp control panel the Apache and MySQL status is shown as started, but localhost URL is not working. ...
2
votes
1answer
5k views

How can I open .PHP files with PHP.exe in Windows 7?

I have WAMP (Apache/MySQL/PHP) installed on Windows 7. PHP 5.3 is included. I tried "test.php -> right-click -> open with -> browse -> PHP.exe" but PHP.exe does not get added to the "Open With" list. ...
2
votes
1answer
7k views

WAMP server won't run with PHP 5.3.4 but will with PHP 5.2.11

I have a 64bit Windows 7 Professional machine. I'm running WampServer Version 2.1 with Apache 2.2.4. It was installed on a clean machine. I'm using the default ini/conf files as they come. Wamp is ...
2
votes
2answers
856 views

Create a local DNS TLD for development

I do a lot of web dev, mainly RoR and PHP, I've got a VMs which holds my dev environments and handling multiple clients on them is a pain. With PHP you just create a subdir, but with RoR it's a little ...
2
votes
1answer
1k views

Using NetBeans for pure HTML/JS/CSS development

Is it possible to use NetBeans to create HTML/JS/CSS projects which can be run by a local web browser instead of a full PHP project which has to be passed through an interpreter?
2
votes
1answer
840 views

php's pecl - oauth - Mac OS X 10.6.6

I'm trying to install a php extension through pecl and I'm getting some weird errors... any ideas? wcmisdpilotpc1:~ alexus$ sudo pecl install oauth Password: Notice: Array to string conversion in ...
2
votes
1answer
843 views

what exactly happens when I “sudo apt-get install php-pear”

I'm a little confused about the reasoning behind installing PEAR through CLI like this: //shell sudo apt-get install php-pear AFAIK Pear is just PHP library - so - that's just bunch of PHP classes. ...
2
votes
2answers
1k views

How should I install PHP 5.3.3 on Snow Leopard?

What is the recommended way to upgrade PHP to 5.3.3 on Snow Leopard? If I compile from sources does it replace the existing PHP install 5.3.1. I need it because I'm using nginx as my webserver. PHP ...
2
votes
1answer
328 views

installing w3c validator on Fedora 11

On Fedora 11 i have installed w3c validator using yum install w3c-markup-validator is this installation configure each and everything including the complete website? followed this doc ...
2
votes
1answer
2k views

How to edit the PHPUnit library path in Zend Studio?

I'm trying to set up Zend Studio so I can use PHPUnit, but I can't figure it out. The PHPUnit library path is un-editable. What should I do?
2
votes
1answer
197 views

Adding sudoer for all but root

Here is the base of my problem: I would like to add sudo rights to a user, but not to use it as root for security reasons. I have a PHP script needing to run a command (drush) through exec(). ...
2
votes
1answer
2k views

Nginx & UserDir & PHP

I have a fairly simple nginx/1.4.7 installation (from Debian/unstable) and I'm trying to get PHP scripts to run inside a UserDir. server { listen 8083; ...
2
votes
1answer
1k views

How to run Visual Studio 2008 and WAMP server on same local machine running WIndows7?

I'm having a machine running on Windows 7. First I installed WAMP server on my local machine. It was working fine. Then I installed Microsoft Visual Studio 2008. From that time the WAMP server is not ...
2
votes
2answers
346 views

Imagick Convert Append 2 pdf pages

I am using the following code to make a single pdf file with multiple pages in one jpg file I am using Imagick library and PHP tcpdf convert -append path1.pdf path2.jpg Now what i need to do is to ...
2
votes
1answer
423 views

What is more transparent, curl or wget in this web crawler project?

I have files on a Windows 7, xampp server (using altered port, 181). I am triggering the script from another computer (linux) using curl http://xxx.xxx.xxx:181/phpproject.php This PHP project is a ...
2
votes
1answer
1k views

Apache downloads php files instead of running their source

I have just recently upgraded PHP 5.3 to 5.4 on my Debian Squeeze server. Now, instead of executing PHP files, Apache just downloads them, which is really bad. When I try to follow these steps, I get ...
2
votes
1answer
1k views

Running rsync shell command in php

I am trying to do a rsync from amazon cloud to my local machine by using php. I have $copy = 'rsync -acz ubuntu@ec3-51-123-131-111.compute-1.amazonaws.com:/project/file.txt .' shell_exec ($copy) ...
2
votes
1answer
207 views

php sessions - is it possible to trigger a server script executed by a DIFFERENT user than www-data?

i am running a php+mysql site on a lamp ubuntu cloud server (amazon ec2). i use php sessions. the apache php user is called www-data. for every session (SID), i need to create a temporary folder ...
2
votes
1answer
59 views

find amin to retrieve executed php files by apache

So I have a massive legacy app that consists of half a million php files. For a single request, I would like to know which php files are used by apache to respond. I can look at the apache logs, they ...
2
votes
1answer
1k views

Vim: Context sensitive code completion for PHP

Vim gives me too much options when I use code completion. In a class, and type $class-> it gives me about a zillion options, so not only from the class itself but also from php, all globals ever ...
2
votes
1answer
507 views

Changing the PATH environment variable in Apache

In my phpinfo(), in the section Apache Environment, I want to change the value of the variable PATH. This is possible? I tried SetEnv PATH /mypath, but it does not work. How do I change the PATH ...
2
votes
3answers
2k views

PECL install error after upgrading to OSX 10.8

I've just upgraded my OS to Mountain Lion and PECL is no longer working (it's on a test drive so no drama, but I'd like to get it working so I can upgrade the OS on my shiny new SSD as well). I'm ...
2
votes
1answer
371 views

Weird file truncation issue in CIFS mount

With reference to: http://stackoverflow.com/questions/12211629/php-file-put-contents-not-truncating-file-in-cifs-mount We have a Seagate BlackArmor NAS device, which is mounted on our Ubuntu 10.04 ...
2
votes
1answer
624 views

Set permissions to www user to run ImageMagick

I have installed ImageMagick on my OSX Lion. When running from the console everything works fine. But when I'm trying to run 'convert -version' from a php script : <? exec('convert -version', ...
2
votes
2answers
3k views

ffmpeg works on terminal not with PHP exec

If I execute a ffmpeg command from terminal, I get the desired result: ffmpeg -i src.mp4 -ar 22050 -ab 32 -f flv -s 320x240 video.flv Terminal's output ... video:3404kB audio:1038kB global ...
2
votes
2answers
2k views

How to set CRON to execute a php file outside of a public html folder?

I have a php file located at, let's say, for example: /data/web/process.php This file is not publicly available (no virtual host is running in that folder, but apache is installed). I need to ...
2
votes
1answer
56 views

More than 1 processs (background)

In the PHP code, I have the following: run.php <?php shell_exec("php theprocess.php > /dev/null 2>&1 &"); ?> I execute run.php from the browser (eg: http://localhost/run.php) ...
2
votes
4answers
3k views

File still unwriteable in /var/www/html after the chmod command

I've got some trouble while trying to install some applications on my linux system. It is said that the files in my /var/www/html/xxx directory, where I put them, is not writeable. The command chmod ...
2
votes
1answer
40 views

Does versions control system work on server or per site

I tried hard so that I can stay away from version control but in almost good job specifications, I find version control as requirement. So I thought I had to start from somewhere. I always tried to ...
2
votes
1answer
1k views

apache throws 500 error on php error

Hey guys, I just installed apache2 with curl and php5. I haven't touched the config files, and every time my php throws an error (function doesn't exists, variable not set, etc), instead of display ...
2
votes
2answers
2k views

How to execute a php file with crontab?

I have ubuntu setup with lamp and I was wondering what I would type to start a php page say at 2am everyday. I am still studying how crontab works so I can't test to see which one works. So if I ...
2
votes
1answer
314 views

What part of a vim color scheme file controls the dollar signs at the beginning of PHP variables?

I'm trying out a nice scheme called darkspectrum, but it seems to lack support for the dollar signs at the beginning of PHP variables. How do I control them?
2
votes
2answers
29 views

Searching major search engines with text such as <%#

If I type '<%# vs <%"' into any of the major search engines, everything is stripped out except the 'vs'. I understand why they do this. I would just like to know if anyone knows of a way to ...
2
votes
2answers
72 views

Configure error when installing php

When installing php I configure it like so: ./configure --prefix=/wwwroot/php --with-apxs2=/wwwroot/bin/apxs --with-configure-file-path=/wwwroot/php --with-mysql --with-gd And a configure error ...
2
votes
0answers
10 views

Customise HTML-Kit Tools syntax highlighting

I'm using HTML-Kit tools to edit a PHP site. The syntax highlighting's really helpful, but it would be good if I could edit it, specifically so that my custom functions would be highlighted (as ...
2
votes
1answer
95 views

bash- command does not work with php shell_exec

I want to execute following command on my Ubuntu server using php: android create project --target 8 --name $fname --path ./$fname --activity MainActivity --package $fpack 2>&1 The above ...
2
votes
1answer
27 views

Linux : Setting which php bin to use in CLI

Hi i'm trying to use php command in linux. However I have two installations of php, one I got from the sudo-apt-get and one from a stack, Lappstack. Don't ask how I got there, but nevertheless i'm ...
2
votes
2answers
593 views

phpMyAdmin cannot login - keeps asking for credentials

I have phpmyadmin on my Arch linux box, it is running, so is apache with php and mysql. When I go to http://localhost/phpmyadmin/, it shows the usual login prompt. However, no matter what I enter, ...
2
votes
1answer
163 views

Extract text out of two lines in a file and output them in a table

I am trying to make a PHP script for my school. School's web directory has about 100 text files, one text file for each student. Every text file has a two lines like: stu $id = '12701'; stu $name = ...
2
votes
0answers
81 views

Socksify php script

I am trying to socksify php script network connections, however I am unable to do that, script ignores the socksifyer, just connects directly. I tried using tsocks and torsocks. tsocks php ...
2
votes
1answer
833 views

PHP won't run on command line Linux

I think I may just be missing something simple, but I can not get PHP to run anything on the command line. I'm using Linux Ubuntu. All the exact same files run as expected via the web. I have tried ...
2
votes
0answers
995 views

CentOS 5.10 Yum Packages won't update/upgrade

I've just used yum to install PhpMyAdmin and it installed version 2.11.11.3-2.el5 which is completely out of date since version 4 is out. I've tried running yum update phpmyadmin but I receive No ...
2
votes
0answers
101 views

PHP ssh2_fingerprint() does not match ssh-keygen -lf id_rsa.pub

I am using the lib ssh2 module with PHP and calling the function ssh2_fingerprint() to get the keys fingerprint. According to all resources on the internet, I can get the fingerprint of a public key ...
2
votes
2answers
717 views

Notepad++ - HighLight matching tags in php

Have php with echoing html tags. notepad++ 6.4.5 is highlighting ok the tags inside php and outisde php. notepad++ 6.5 is highlighting ok the tags only outisde php and NO HIGHLIGHT inside php code. ...