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

4
votes
1answer
1k 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
3answers
4k views

Changing HTTP_ACCEPT_LANGUAGE

Is it possible to change HTTP_ACCEPT_LANGUAGE? I'm using Firefox.
4
votes
1answer
6k 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
2k 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
2k 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
2answers
5k 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. ...
4
votes
3answers
199 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
740 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

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 ...
4
votes
2answers
5k 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
766 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
1answer
3k views

update Eclipse PDT to php 5.5

The current stable php version is 5.5.1. At Eclipse PDT we're however still stuck on 5.4. I tried updating it to the latest version but it doesn't give me any new updates. In preferences - > PHP -> ...
4
votes
1answer
379 views

How can two identically named files exist in the same place on linux

. I'm not a novice in linux I created a bunch of files with php using file_put_contents() I can't view the created files via browser I can view the files from the ftp but can't ...
4
votes
1answer
222 views

Convention on directory of file outside /var/www

By /var/www I am generically referring to the document root for Apache. Often times you want to work with files, but don't want them inside the doc root (PHP examples come to mind). The general ...
4
votes
1answer
537 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 ...
4
votes
3answers
521 views

Is there a way to build my own “Portable” Windows AMP (Apache, MySQL, PHP) Stack?

I know there are things like XAMPP thats portable, but it does not use latest version of the software, can I build my own? I prefer portable stuff as they don't require installs, won't be affected ...
4
votes
2answers
445 views

Can I recover a rm -rf-ed Mercurial repository?

I made the mistake of wiping out my entire project directory with a quick "rm -rf project". Of course, the .hg directory went with it. I had about 15-20 changesets, that I have not pushed to anyone, ...
4
votes
2answers
2k views

Error starting Apache with PHP module on Windows: “Cannot load php5apache2_4.dll into server: Access is denied”

I'm having some difficulty installing Apache 2.4.7 with PHP 5.5.7 on Windows Vista Service Pack 2. When trying to start Apache, I'm getting the error: Syntax error on line 176 of C:/Program ...
4
votes
1answer
4k views

How can I add color highlighting for PHP functions?

I've recently begun using Notepad++, and have found a part of its styling functionality that confuses me. I'm currently attempting to color all of PHP's defined functions (such as count(), strlen(), ...
4
votes
2answers
3k views

How do I upgrade PHP on CentOS and Kloxo?

I need to upgrade PHP so that I can upgrade joomla on my dedicated server. I have: kloxo 6.1.6 php-5.2.17-1 Linux CentOS-55-64-minimal 2.6.18-194.32.1.el5 x86_64 x86_64 x86_64 GNU/Linux I searched ...
3
votes
2answers
71 views

What are the .php~ files?

I am working on one PHP project, and I am having some files for that. Some of the files have anextension as file_name.php~ What does it mean and how do those files get created?
3
votes
4answers
927 views

What are the benefits of using Linux OS to develop a PHP based website?

in a PHP dev environment I recently visited, the lead dev was adamant that they use Linux on their machines for Zend development. I personally use Windows and have the same results during ...
3
votes
3answers
453 views

Which is the best and simplest Windows Subversion client I can install to get the Google Client Library for PHP?

My operating system is Windows 7. The google-api-php-client is made available on GitHub, and can be downloaded with Subversion. The documentation provides the exact command line command to download ...
3
votes
2answers
5k views

Convert file to PDF using LibreOffice under user apache (i.e. when using PHP)

I installed libreoffice-headless and can convert documents when logged on into the shell as a normal user. [root@desktop ~]# yum install libreoffice-headless [root@desktop ~]# yum install ...
3
votes
4answers
9k views

permission denied when doing fopen on a 777 permission file in php

Im not new to php or file permissions. But i just migrated an extremely simple script to a new server I setup. The folder which the script runs is in the document root. The permissions for the folder ...
3
votes
1answer
5k views

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

I am trying to load openssl module, I uncommented it in the php.ini: extension=php_openssl.dll But when running my script I get error: Failed to connect: 0 Unable to find the socket transport ...
3
votes
1answer
2k views

Apache php_ldap.dll error

I have apache with php 5.4 installed on a Windows 7 64bit machine. When I restart Apache I get the following: PHP Startup: Unable to load dynamic library 'c:/PHP54/ext\\php_ldap.dll' - %1 is not a ...
3
votes
3answers
3k views

PHP code is returned instead of executed

I have L-Ubuntu 11.04. I've installed Apache2 and I'm trying to simulate a server on my local file system by navigating to localhost in the browser. The problem is that I can't seem to get php to ...
3
votes
3answers
6k views

How to convert .PDF and .doc/.docx files to .HTML files?

Does anyone know of any software (preferably open source, Linux or PHP) that can convert both PDF and/or DOC/DOCX (and maybe other document formats too: rtf, txt, etc.) to HTML? I've got ...
3
votes
3answers
2k views

HTTP responses curl and wget different results

To check HTTP response header for a set of urls I send with curl the following request headers foreach ( $urls as $url ) { // Setup headers - I used the same headers from Firefox version 2.0.0.6 ...
3
votes
3answers
127 views

How web servers can find each other in a local network?

I would like to build a local network consisting of several computers each of which is running a web server. These web-servers should communicate with each other. But the problem is that IP addresses ...
3
votes
1answer
1k views

Markdown “single page” PHP web application with live preview? [closed]

I would like to know if there is a PHP web application, such that When called with something like http://example.com/index.php?inputfile=mymarkdownfile.txt; it will open the file mymarkdownfile.txt ...
3
votes
1answer
9k views

Using symbolic link directories with Apache, PHP and Windows 7

I am trying to setup a symbolic link for a directory and I am getting the strangest error. I am using: mklink /d C:\www\site\inc C:\inc where C:\inc\script.php is the file I need to run. This ...
3
votes
1answer
4k views

NginX+PHP-FPM setup: Why is this configuration workaround needed to properly set PATH_INFO? [Debian7.4]

It took several hours to find out how to properly configure NginX, but I still think I might have missed something. Mainly because this perfectly working setup raises more questions than it answers. ...
3
votes
2answers
3k views

OSX, Failed to listen on 0.0.0.0:80 (reason: Permission denied)

I'm on OSX Mavericks. I installed PHP 5.5 from http://php-osx.liip.ch/. When I go to localhost in a browser I get a page that says, "It Works!" which is not a page I created so I am not sure where it ...
3
votes
1answer
615 views

make a certain software version the default in ubuntu

I currently have 2 version of php installed on ubuntu 12.04. one for php 5.3 installed using apt-get while the other one is installed with xampp with php 5.5 When i execute these commands: > ...
3
votes
1answer
13k views

Perrmission to run specific command by sudo as www-data users without password

I have a webserver that also plays internet radio. As www-data user I want to run some commands, for example I've made this in /etc/sudoers file: www-data ALL=(ALL) NOPASSWD: /usr/bin/amixer ...
3
votes
1answer
873 views

What is the difference between apt-get install php-apc & pecl install apc?

Wanted to setup APC php cache to a fresh 12.04 precise ubuntu box. Do apt-get install php-apctotally replace apt-get -y install libpcre3-dev; sudo pecl install apc? If not what are the differences?
3
votes
4answers
5k views

why are my mails being sent to junk folder?

I am using my own domain's email address : admin@mysite.com i have a simple email sign up form, where emails entered are sent to admin@mysite.com using php's mail(). i discover it always goes into ...
3
votes
1answer
187 views

weird behaviour with forever, bash, apache and php

I'm running some node.js scripts with forever. I started them as www-data user (i.e. via ssh logging as www-data@server and typing forever start myapp.js, etc.). Ok, everything goes like a charm; my ...
3
votes
2answers
109 views

According to current knowledge where should you store passwords on your server and how do you protect them?

Given is a system of PHP and MySQL on a virtual server. I want to save passwords there. Frequently you hear people speak about their system being hacked and credit card information being stolen. ...
3
votes
2answers
4k views

php startup error Invalid library (maybe not a PHP library) 'pcntl.so'

After searching for hours to solve my problem and found nothing helpful I ask my first question here. I want to compile and install php 5.3.17 cli with pcntl extension enabled on a Debian server. The ...
3
votes
3answers
16k views

Unable to remove PHP packages from CentOS, but also unable to update PHP package to PHP 5.3

I have an interesting, albeit infuriating problem with CentOS. I'm trying to configure this server to run a Symfony2 website I've built. The website doesn't work, and I've pinned down the problem to ...
3
votes
2answers
483 views

PHP application (client) for managing my multiple email accounts

Looking for PHP application which I could use on web server instead of Thunderbird to manage my multiple email accounts* (consolidate them like in GMail). The problem is that I need web-based ...
3
votes
1answer
545 views

What crashed Automake?

When downloading open-source software from the internet (in this case: PHP 5.5.5), they often come with an Automake "script" (if I can call it a script) for building from source. Now I'm trying to ...
3
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 ...
3
votes
1answer
89 views

Installed mysql from source on linux and then how to get it work with php?

I installed apache and php from source and got them working together a month ago. Because I'm learning both of them this term. Now I need mysql to do more works. And I installed mysql from source just ...
3
votes
2answers
719 views

How to access MySQL when I delete the root user on openSUSE 11?

Unfortunately I deleted MySQL users with the command delete from mysql.user and now I can't access MySQL. I tried looking at MySQL - ERROR 1045 - Access denied, but it is not proper for me because ...
3
votes
1answer
490 views

Yum update on Fedora with option

is possible to install PHP with option --enable-pcntl (compile flag) with yum on Fedora 14? I would like turn on pcntl support for my php scripts but I don't want to compile PHP. Update: Thats it, ...
3
votes
3answers
4k views

Error message: sudo: mysql_secure_installation: command not found

I'm trying to learn PHP and I'm just in the process of installing apache,msql and PHP. I'm on a mac osx 10.7.2 I downloaded: mysql-5.5.18-osx10.6-x86_64.dmg I'm now at the point of setting the ...