Questions tagged [php]

PHP is a general-purpose scripting language that is especially suited for Web development. The online manual is an excellent resource for the language syntax and has an extensive list of the built-in and extension functions. Most extensions can be found in PECL.

PHP is an open-source general-purpose scripting language that is suited and popular for server-side Web Development. There is an excellent online manual and a wiki. The online manual is a complete reference for syntax, built in functions, and extensions. There are lots of extensions for PHP that most of them can be find in PECL.

If you want to post a question in PHP, check the error log or if errors are enabled, enter them from output of your script if any.

7922 questions
22
votes
13 answers

Mysteriously empty $_POST array

I have the following HTML/PHP page:
14
votes
5 answers

PHP: Serve a file for download without providing the direct link

I want to serve invoices for download. Currently I'm using a simple numbering scheme (invoice-01.pdf, invoice-02.pdf, and so on). I know that I could use hashes instead to obscure the data. Is it also possible to use PHP and serve the invoices by…
12
votes
4 answers

Is this a good practice to upload files to a folder outside the public www folder?

I have a web site where users can upload files. I do not want those files to be accessible by anyone. I have seen that some people create a folder (say my_secret_folder) at the same level of the www directory. Then, they upload files (with PHP…
2WFR
  • 135
11
votes
8 answers

How to determine which PHP is being used?

How to determine which PHP is being used? For example, if there are /usr/local/bin/php and usr/local/bin/php5, how do I know which one is being used by my PHP scripts?
Randell
  • 1,203
11
votes
5 answers

mysql_connect(): The server requested authentication method unknown to the client [mysql_old_password] in

I'm trying to run PHP 5.4.1 ( compiled from source ) but when i try to connect on mysql i get: Warning: mysql_connect(): The server requested authentication method unknown to the client [mysql_old_password] in When using PHP 5.3/5.2 it works…
Fernando
  • 1,229
10
votes
8 answers

Building a Student Storage server

I work for a school district. I've been put in charge of building a storage server for students. A place for them to work off of from school and home. My challenge is getting this to work from home. At school they login, authenticate, and they…
DobotJr
  • 236
9
votes
4 answers

How to --enable-dom without recompiling PHP?

From the output of phpinfo(), --disable-dom are included the configure command. How do I change it to --enable-dom without recompiling PHP? Edit: I'm using Fedora 10. The PHP i'm using is the one that came with it.
Randell
  • 1,203
5
votes
2 answers

Re-compiling PHP

Say I compiled and installed PHP and then I wanted to add an additional extention a few months later. Do I need to specify everything I've included during my initial installation along w/ the new module I want? What if I dont recall the exact…
sdot257
  • 3,069
5
votes
1 answer

How can I install phalcon (or any custom PHP module/extension) on my shared cPanel web host?

Is it possible to install phalcon (a custom PHP PECL extension/module) on a shared web hosting service that uses cPanel, or is it normally something that requires root access? That is, can I still somehow get the benefits of phalcon on my existing…
Simon East
  • 1,514
5
votes
4 answers

Finding out which version PHP a remote server is running

I can't imagine this is possible but maybe there's some novel way. I'm developing an app which will require a few php files to be deployed and run on the clients' webservers. I'm not particularly interested in targeting clients who are still running…
jontyc
  • 213
  • 1
  • 2
  • 7
5
votes
2 answers

Server recommendation for simple script

I have a simple 2kb PHP script that I want to host on my own domain. Soon, i'll connect it to a mySQL database and add Google Analytics. But thats pretty much it. There is no physical content or even webpage per say involved in my app. I do want to…
egfx
4
votes
1 answer

Running PHP on the Command Line Throws Module Errors About SNMP

When I run any command using PHP on the command line I get a bunch of errors about modules: vagrant@vagrant-ubuntu-trusty-64:~$ php -v MIB search path:…
beingalex
  • 335
4
votes
2 answers

Best Practice for upgrading PHP On Production Systems

We Have two load balanced web servers running php 5.3. I've been asked by our dev team to upgrade php to 5.4 because they need certain functionality it will bring. The main issue is that 5.3 is the latest thats been built into the distros…
Demic
  • 41
4
votes
1 answer

PHP is slower than it should be

I have a server with Dual Xeon Quad Core L5420 running at 2.5GHz. I've been optimizing my server, and have come to my final bottleneck: PHP. My very simple PHP script: ./test.php
4
votes
3 answers

What does VC9 stand for in PHP version?

I need to know what does VC stand for in the PHP version: VC9 x86 Non Thread Safe (2011-Nov-10 19:52:12)
Farhan
  • 4,309
  • 11
  • 51
  • 86
1
2 3
12 13