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
2answers
16k 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
837 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
835 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
833 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
989 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
311 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
181 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
986 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
1k views

How to set PHP syntax for a file without <?php tag?

When I set syntax to PHP in Sublime, all thing is good in my PHP code: But when I remove <?php tag from my code, the syntax highlighter doesn't work anymore: How can I tell sublime to do ...
2
votes
2answers
326 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
369 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
960 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
196 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
494 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
350 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
599 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
2k 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
55 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
307 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
71 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
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
422 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
0answers
642 views

Apache2 + Php + Pthreads HowTos

I'm running Ubuntu 14.04 LTS 64 bit. What I would really love to do is sudo apt-get install libapache2-mod-php5 but compile PHP with --enable-maintainer-zts so I could later install pthreads with pecl ...
2
votes
1answer
126 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
71 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
690 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
955 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
2answers
659 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. ...
2
votes
1answer
1k views

PHP extension loading in CLI but not in CGI/FastCGI mode

Update 2 (ISSUE RESOLVED): Issue was an incorrect parameter during compilation. See my answer for details. Update: The result of the following command probably sheds some light on the issue! # ...
2
votes
0answers
440 views

Error 10053 using composer

I need to use Composer in my wamp server on a windows 7 machine but I keep on getting a 10053 error. For example when I try to install laravel I get the following message: ...
2
votes
1answer
83 views

How do I share a PHP 5.4 server between OS X and VMWare?

I'm running PHP 5.4 on OS X which allows me to set up a virtual server for any directory, using this Terminal command: php -S localhost:8000 This will then set up http://localhost:8000 which works ...
2
votes
1answer
939 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
220 views

Get Apache to send Content-Type text/plain for PHP

How do I get apache to send Content-Type text/plain for php files? I can accomplish this in php using header('Content-Type: text/plain'); I tried adding this to my vhost.conf (I am using Plesk) ...
2
votes
0answers
325 views

PHP : curl is and Not working in ubuntu10.04 and Nginx

I am running Nginx server on ubuntu 10.04 I am using the php version 5.3.2 .I installed php5-curl using apt-get install php5-curl. Unfortunately the curl package is not displaying in phpinfo() . ...
2
votes
1answer
353 views

Going crazy with php5apache2_4.dll not found

I have a computer with Win XP SP3 and I was going to install a WAMP system on it. I already had a pwerfectly working WAMP (Uniform Server, it is a portable wamp that works on usb stick) on another ...
2
votes
2answers
1k views

Cannot change default path to php on OS X Snow Leopard

I have installed MAMP on OS X Snow Leopard (10.6.8) and I want to change the default path for PHP. I tried both of the answers on this question, and on this question, and in this thread but when I'm ...