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

learn more… | top users | synonyms

42
votes
3answers
56k 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 ...
37
votes
6answers
54k 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 ...
27
votes
7answers
16k 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?
18
votes
5answers
9k 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, ...
16
votes
5answers
4k 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 ...
14
votes
5answers
7k 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 ...
14
votes
2answers
24k 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 ...
14
votes
1answer
713 views

hexdump vs actual file contents

When I do hexdump filename.txt I get the following as output: 00000000 ac5a 5afb c08d 5d15 26d0 2491 e8c9 8917 00000010 When I do <?= bin2hex(file_get_contents('filename.txt')); ?> I get ...
13
votes
1answer
34k views

How to manually install Apache, PHP and MySQL on Windows?

How do I install Apache with PHP support and the MySQL server on Windows without using any ready-to-use packages like WAMPServer or XAMPP ?
13
votes
5answers
44k 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 ...
10
votes
1answer
599 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 ...
9
votes
4answers
4k 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 ...
9
votes
3answers
26k 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 ...
8
votes
5answers
21k 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 ...
7
votes
9answers
155 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
397 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
15k 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
11k 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 ...
7
votes
1answer
4k views

How is Apache mapping files without extensions?

My local dev setup is mapping things like http://mydomain.dev/testhtmlpage to testhtmlpage.html and http://mydomain.dev/testphppage to testphppage.php. The browser stays on the orginally enter URL. ...
7
votes
3answers
47 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 ...
6
votes
7answers
945 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
4answers
17k 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
3answers
6k views

phpmyadmin symlinks error after ubuntu upgrade

After the upgrade of my ubuntu server to 13.04 my phpmyadmin is no longer reachable. the browser reports 500 (internal server error) and in the error.log it says: PHP Fatal error: require_once(): ...
6
votes
3answers
2k views

“Too many files open” on Mac OSX after running apache in PHP with XDebug for some time

I am running Mac OS X 10.9.4, including the builtin apache2 webserver with PHP 5.5.14 from brew (packages: php55, php55-intl, php55-pdo-pgsql, php55-xdebug). When running this setup it works quite ...
6
votes
2answers
8k 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
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 ...
6
votes
4answers
820 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
2answers
2k 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
295 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
20k views

How to install the SQLite PDO extension on Ubuntu

The default Ubuntu PHP package does not include the PDO SQLite extension. How can I install the SQLite PDO extension? Is there a package that one can easily install via apt-get?
5
votes
4answers
2k 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, ...
5
votes
3answers
14k 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
4answers
92 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
3answers
67k 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 ...
5
votes
4answers
1k 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
5answers
7k views

How to find out from Apache what pages cause long loading times?

How can i find out what PHP scripts take longest to load in Apache?
5
votes
3answers
3k views

Installing zeromq on Windows 7 WAMP server

I am looking for installing zeromq on my Windows 7 machine for using zeromq with PHP (I am using WAMP server (5.3.4), Apache Server 2.2.17). I followed the documentation on their site, but I don't ...
5
votes
1answer
632 views

Linux server broken packages

So, I'm trying to install the PHP5 cURL package on a Ubuntu Lucid 10.04.3 server. My concern is that there are broken packages on this server and if I install this package with the broken packages ...
5
votes
6answers
687 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
609 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
2answers
244 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 ...
4
votes
5answers
9k views

apache client denied by server configuration after mac OS X upgrade to Yosemite

I know this looks similar to other questions but Yosemite seems to have changed something with apache configuration with the upgrade. my error log says " client denied by server configuration: ...
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
216 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
2answers
8k views

How to restart PHP on Windows? Unable to find the socket transport “ssl”

I am trying to load the openssl module, I uncommented it in the php.ini: extension=php_openssl.dll But when running my script I get an error: Failed to connect: 0 Unable to find the socket ...
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
2answers
11k 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
10answers
23k 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 ...