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

39
votes
3answers
49k views

How to install an updated version of PEAR / PHPUnit on Ubuntu?

Most tutorials online show how to install PEAR by doing this: sudo apt-get install php-pear This installs version 1.6.1. It works great because it's super easy! My problem is that I want to install ...
32
votes
6answers
41k views

How do I rename a file to .htaccess in Windows 7?

I'm using XAMPP to test a PHP script. Now, in the root of the folder I want to place a .htaccess file according to the requirements of the script. But Windows won't let me rename it to .htaccess. Is ...
28
votes
5answers
2k views

php.net listed as suspicious - visiting this web site may harm your computer

When I access php.net through Google search i get the following message saying The Website Ahead Contains Malware! See the screenshot attached below: Is it same for you guys? How can I avoid ...
21
votes
7answers
12k views

How do I easily highlight the syntax of PHP code in Word?

How do I easily write and syntax-highlighted PHP code (or any others programming language) in a Word 2009 document?
16
votes
5answers
2k views

How to go to a website on a shared server by its ip address?

I have a few questions, please help: Fist, I can access Google search just by typing http://74.125.224.211, because this is the IP address returned by nslookup. However, I could not do so with the ...
16
votes
5answers
7k views

Is there any *good* HTML-mode for emacs?

I love emacs, and I want to do my web-programming work in it, but I can't find a way to get it to edit HTML properly. I mean it's seriously awful. It will do HTML fine, but not PHP, javascript, ...
11
votes
5answers
4k views

Where can I find ready-to-use virtual machines?

I'm new to virtualization, and I'm trying to create a couple of boxes for testing the software I develop (php) in diferent enviroments. I know php is portable, but sometimes it breaks because of ...
10
votes
1answer
434 views

Different background color for multiple filetypes in vim

Is it possible to have different background colors in vim (ie. one light, one dark) when dealing with files with multiple filetypes (ie. :set ft=html.php)? In PHP code with HTML embedded, it can be ...
8
votes
4answers
10k views

Error trying to install PHPUnit from PEAR

$ sudo pear install phpunit/PHPUnit Unknown remote channel: pear.symfony-project.com phpunit/PHPUnit requires package "channel://pear.symfony-project.com/YAML" (version >= 1.0.2) phpunit/PHPUnit ...
8
votes
5answers
32k views

Is there a way to use Xcode for PHP web development?

I have heard you could use Xcode for PHP development with syntax highlighting, syntax check, code completion etc. some time ago, maybe years ago. Is there a way to add PHP support to a current Xcode ...
7
votes
9answers
148 views

Is it dangerous if I store a copy of an infected website on my local disk?

First, I'm not into HTML and PHP programming. A friend's Joomla site was hacked by some sort of html injection, and now every php and html file has an iframe which is linked to some sort of malware ...
7
votes
3answers
388 views

Why does Windows append .php to my php files but not other ones

I have many different types of files in a folder - .php, .css, .htm, .js, .docx, .xls, etc. The only file type that Windows (viewed from Windows Explorer) actually shows the extension are the .php ...
7
votes
3answers
11k views

How to add PHP in netbeans on Ubuntu?

I just downloaded Netbeans for Ubuntu. Now I only have Java, how can I add PHP to it?
7
votes
4answers
3k views

How “legal” is site-scraping using cURL? [closed]

Recently I was experimenting with the cURL, and I found lot is possible with it. I built a small script that crawls a musical site, which plays online songs. On the way of my experiment, I found that ...
7
votes
5answers
14k views

How to rename multiple files in multiple folders with 1 command

We want to rename our *.html files to *.php but (sadly enough) have not enough knowledge to do it with a dos batchfile and/or cmd prompt command. The problem is that each file is in seperat folder ...
6
votes
7answers
834 views

Mac Text Editor (with function list) [duplicate]

Possible Duplicate: Text editor for Mac OS X So I've got a Mac in the post coming to me, and will probably be doing quite a bit of development on it so I am looking for a text editor (PHP + ...
6
votes
14answers
3k views

What is the best Apache, PHP setup for a Mac developer? [closed]

I'm a Web Developer who has just made the switch over to Mac. Despite all that I know and love about the Windows environment I find myself in a new mysterious place. My question: what is the best ...
6
votes
4answers
15k views

How to make variables auto-complete in Notepad++?

How do I make variables auto-complete in Notepad++? Many editors have it. I'm working on a program scan file. For every string that begins with a $ character, as soon as I type $, it would show me ...
6
votes
2answers
5k views

Where'd PHP for cygwin go? Still have a copy with PHP installed? Wanna share?

I used to have cygwin with PHP installed and working, but the hard drive on which was installed crashed catastrophically. Cygwin was just about the only thing that hadn't propagated to my backup yet, ...
6
votes
2answers
1k views

Is there a mail server written in PHP?

I would like to set up an mail server on one of my hosted machines that only supports PHP. There is no standard mail server running on that machine. Are there any mail servers written in PHP? Or, is ...
6
votes
2answers
13k views

PHP script can't run bash script. sh: Permission denied

I'm trying to exec a .sh script from PHP, however it is not executing. I checked the error logs, and I'm getting the 'sh: Permission denied' error. I checked under which user php is being run, and ...
6
votes
4answers
509 views

Flash drive friendly (portable) XAMPP alternative?

I'm trying to setup a portable MediaWiki wiki on a flash drive using XAMPP portable as a server. http://lifehacker.com/354005/run-your-personal-wikipedia-from-a-usb-stick When I try to start apache ...
6
votes
1answer
1k views

How can I enable readline for PHP 5.4 on Ubuntu 11.10?

I installed PHP 5.4 on my Ubuntu 11.10 PC like this: $ sudo add-apt-repository ppa:ondrej/php5 $ sudo apt-get update $ sudo apt-get install php5 It's working fine but I don't have the readline ...
5
votes
2answers
274 views

modify 128 bytes

I have to replace on a linux webserver, the first 128 bytes of some binary files. The files have a size of ~ 5Gb and I just have to rewrite the header bytes. What would be the best aproach to do this ...
5
votes
2answers
15k views

Where is the PHP log file located on Mac OSX?

I am having issues with phpMyAdmin on my Mac. I cannot seem to connect to the local MySQL server. When I try to log in I get the following message Cannot start session without errors, please check ...
5
votes
4answers
91 views

Programming and Browser Help [duplicate]

Possible Duplicate: Tool to highlight and annotate text on websites? This isn't a coding question per se however it relates to it. I apologise if it this in the incorrect place as I wasn't ...
5
votes
4answers
636 views

What are the risk associated while setting file/directory permission to 0777?

Currently, I am not being able to upload a file to a web folder. Whatever I do, even setting the folder permissions to 0777 I cannot upload the file to it. Out of curiosity, I searched for the risk ...
5
votes
3answers
5k views

How to add new PHP version to WAMP

I'm trying to install PHP 5.3.8 to work with WAMP (Windows). I downloaded it from the PHP website, copied it in the bin folder, and added this line to wampmanager.ini: Type: item; Caption: "5.3.8"; ...
5
votes
6answers
587 views

Server uptime checker? [closed]

I want to monitor my server's uptime. Is there some free application or a really good paid service that offers this? Obviously, I can't write something that is hosted on the server whose uptime I am ...
5
votes
1answer
409 views

Making Apache use compiled PHP instead of bundled package on Debian

My ultimate goal is to install OwnCloud on my Debian box, a 64-bit squeeze. My setup is pretty simple. I have installed OpenPanel which in turn installs all of the required LAMP modules via APT-GET. ...
5
votes
1answer
5k views

Installing PHP APC on Windows/Apache

i need help installing and configuring PHP APC i have downloaded from http://downloads.php.net/pierre/ in my PHP info, i see Compiler MSVC9 (Visual C++ 2008) Architecture x86 so i downloaded ...
5
votes
2answers
204 views

is there any way to find out how I was hacked? What was the weak point?

one of my site hacked few times :( first I lost all databases, some tables were cleared and some of table's data had changed! than at the second hack, all tables were cleared and some php files' codes ...
5
votes
1answer
21 views

PHP version for super user is fcgi instead of cli

I have a strange problem with PHP version when using CLI. When I login as root and use: php -v I get an info that php is running in CLI mode which is fine, but as soon as I use sudo php -v I get ...
5
votes
0answers
427 views

Should we still set cgi.fix_pathinfo=0 when configuring nginx+php5-fpm?

Security breach was found in nginx+php5-fpm default configuration in 2010. A lot of nginx+php5-fpm configuration guides tell us to set cgi.fix_pathinfo=0 to be safe. Is it still actual for current ...
4
votes
4answers
555 views

What all is required for email from my server to pass through spam filters?

I have a serverbeach server with postfix installed. The hostname is something like p3204059.pubip.serverbeach.com The FQDN is specified as NONE for the server itself. I clicked change ptr record, ...
4
votes
6answers
6k views

Install multiple PHP environments on OS X Snow Leopard

I just upgraded my MBP to Snow Leopard (OS X 10.6), which took PHP to 5.3 This is great, except I use my MBP as my development machine and I use a lot of PHP libs and frameworks (namely CakePHP 1.2) ...
4
votes
7answers
209 views

Corporate site filter

Alright so my work blocks a bunch of websites for obvious reasons. They even blacklisted logmein.com so thats out. I feel that I am capable of getting all my work done AND keeping up with my warfish ...
4
votes
1answer
2k views

PHP Fatal error: Call to undefined method PEAR::raiseErro() in /usr/share/php/PEAR/REST.php on line 165

when running pear upgrade the following error is raised: PHP Fatal error: Call to undefined method PEAR::raiseErro() in /usr/share/php/PEAR/REST.php on line 165 PHP Stack trace: PHP 1. ...
4
votes
3answers
49k views

How can I start phpMyAdmin?

I have just installed phpMyAdmin on my Ubuntu (using sudo apt-get install libapache2-mod-auth-mysql php5-mysql phpmyadmin). I think installation went OK. So, how can I start the phpMyAdmin now? I ...
4
votes
10answers
17k views

How can I automatically take a screenshot of a website at a specified time? [closed]

I need to take a screenshot of a website automatically at a time specified by me. Ideally it would not be using my computer since it's not guaranteed to be on at the specified time. Is there some ...
4
votes
2answers
8k views

PHP Warning: PHP Startup: Unable to load dynamic library php_mysql.dll, Mac 10.6, Apache 2.2, php 5.3.0

I'm trying to use the PHP CLI, and when I enter something like php test.php in the command line it returns: PHP Warning: PHP Startup: Unable to load dynamic library ...
4
votes
1answer
783 views

Escaping Variable in Cat

I'm trying to write a shell script over ssh via a bash prompt. The shell, however, insists on interpreting any variable I want to write instead of writing it directly to file. For example, cat ...
4
votes
1answer
4k views

Install PDO-driver for Postgresql

When i run PDO::getAvailableDrivers() i can see that the only available driver is sqlite, and i want to use Postgresql. What should i do to accomplish that?
4
votes
2answers
1k views

How do I install php5 via MacPorts with a custom configure option?

So MacPorts is the most painless way of installing stuff on my machine. But I want some custom options on my php5 install. How do I do this? With a downloaded version of php, I would do this: ...
4
votes
1answer
1k views

Eclipse as editor for FileZilla. How do I configure it?

I've decided to switch from Netbeans IDE to Eclipse PDT. I use FileZilla to edit files on FTP. I wish to use Eclipse PDT as default file editor for FileZilla. I opened up FileZilla, went to Edit > ...
4
votes
3answers
181 views

How to get a static version of my site?

I need to save a static version of my site by using the sitemap which has about 400 URLs. What is the best way to do that?
4
votes
2answers
612 views

Execute PHP files in mounted directory from VirtualBox host system is not working

I've set up a VirtualBox with a Debian 6.0 to act as a webserver. The host machine is my PowerBook running OS X 10.7.3. Under /User/cb0/Sites I have a webproject in symfony that I used to develop ...
4
votes
2answers
4k views

MediaWiki: increase session timeout

I have a small MediaWiki wiki in a hosted website. It works pretty well, except that I can't find where to configure the session timeout. Right now, my session expires while I'm editing pages. I've ...
4
votes
8answers
739 views

Fullscreen (distraction free) PHP editor

I'd like to know if there is an editor that has PHP code completion and has a fullscreen (not the way komodo edit or notepad++ have) like gedit. I've been searching for some but couldn't find any.
4
votes
2answers
4k views

Unable to use Google Chrome as the external browser in Eclipse

I'm trying to use Google Chrome as the external browser for Eclipse PDT. I always get the following error: Could not launch external web browser for http://... Check the Web Browser preferences. ...