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

learn more… | top users | synonyms

56
votes
2answers
11k views

The MD5 hash value is different from Bash and PHP [duplicate]

I tried to generate the MD5 sum (using md5sum) of a string, "hello". I tried out different methods as the md5sum tool in Linux, PHP's MD5() function as well as various online text to md5sum ...
46
votes
6answers
63k 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 ...
42
votes
3answers
60k 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 ...
29
votes
8answers
18k 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?
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 ...
18
votes
5answers
10k 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, ...
18
votes
1answer
64k 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 ?
17
votes
5answers
5k 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 ...
17
votes
2answers
29k 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 ...
15
votes
1answer
771 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 ...
14
votes
5answers
9k 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
5answers
50k 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 ...
11
votes
3answers
35k 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 ...
10
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 ...
10
votes
1answer
670 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
5answers
25k views

How to rename multiple files in multiple folders with one command

We want to rename our *.html files to *.php but (sadly enough) have not enough knowledge to do it with a cmd prompt command and/or batch file. The problem is that each file is in separate folder – ...
9
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. ...
8
votes
9answers
162 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 ...
8
votes
2answers
28k 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?
8
votes
4answers
5k 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 ...
8
votes
3answers
17k 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
3answers
403 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
21k 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"; ...
7
votes
6answers
329 views

/usr/bin/env: php: No such file or directory

I want to use .sh script for deployment of my app. That script is on my home server (Ubuntu 15.10 Server), marked as executable. Access to this script is done through ssh, using this tutorial, I have ...
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
3answers
53 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
999 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
10k 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
4answers
18k 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
14k 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 ...
6
votes
2answers
9k 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
3answers
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 ...
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
1answer
931 views

Compiling PHP 7 with mssql support

So I'm trying to switch to PHP 7. Unfortunately I'm in need to connect to an MSSQL Server so I'll need the dblib driver for pdo. With PHP5 you could ust the php5-sybase Package. So I tried to do it ...
5
votes
2answers
301 views

modify 128 bytes

I have to replace on a Linux web server, 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 approach to do ...
5
votes
6answers
11k 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: ...
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
75k 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
2answers
10k 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?
5
votes
4answers
93 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
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
8k 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
2answers
3k views

Netbeans Auto-compeletion on php class's method

I created a php project in Netbeans 7.3. I have a class (MYSQL_DB ). When I want to access its methods inside the file that I defined the class it shows me this: Note that this is out side of class ...
5
votes
3answers
4k 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
2answers
5k views

Compiling PHP on OS X: iconv works only if forced to 64-bit

I'm trying to compile PHP and I kept getting this error during make: Undefined symbols for architecture x86_64: "_iconv_open", referenced from: __php_iconv_mime_decode in iconv.o ...
5
votes
2answers
6k 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 ...
5
votes
1answer
791 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
745 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
701 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. ...