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.

7887 questions
2
votes
3 answers

How to host a Wordpress site on multiple servers due to geographical siteload issues?

Wordpress website is currently hosted in the US, this is where 40% of our target audience is. The rest of visitors are coming form Middle east, Australia, Russia, China, Singapore, UK, Switzerland, Kazakstan... all over the map. With all caching in…
2
votes
1 answer

Server locale C vs en_US.UTF-8

I am considering to change all of my server locale to C by "export LC_ALL=C" Is it a common practice? I am thinking will there be any side effect on a LAMP server, or should I just leave as using the default of "en_US.UTF-8"?
Ryan
  • 5,831
  • 24
  • 72
  • 91
2
votes
1 answer

How can I update Zend Engine API? Ubuntu

How can I update Zend Engine API? I'm running PHP 5.2-5-3 ubuntu 4.1 I'm trying to run lampp, but I get this error for xdebug. Starting XAMPP for Linux 1.7.1... Xdebug requires Zend Engine API version 220090626. The Zend Engine API version…
patrickinmpls
  • 123
  • 1
  • 7
2
votes
1 answer

how to correctly clear php apc cache with capistrano

we are using capistrano to deploy our PHP application. and php-apc is enabled on the production server with apc.stat = 0. In capistrano config there is a rule to clear apc cache after deploy:update : after "deploy:update", "clear_apc_cache" the…
Mathieu
  • 73
  • 8
2
votes
2 answers

Hosting MySQL on a server at another host

We have a standard LAMP-stack web application running on a dedicated server at hosting company A. After some analysis we have decided that we need to put the MySQL database and various background jobs that crunch data on it on a separate server, in…
royappa
  • 297
  • 2
  • 9
2
votes
2 answers

How do I set up Apache HTTP authorization with a salt in my password?

I'm using mod_auth_mysql with Apache 2 and MySQL 5 for apache authorization. Right now our passwords are being stored in the plain in our database. As a new requirement, we have to store them with a salt, to fight rainbow table attacks. The…
Amandasaurus
  • 31,471
  • 65
  • 192
  • 253
2
votes
1 answer

nginx and HTTP Referer

I'm using nginx together with php5-fpm and with the following fastcgi_params file: fastcgi_param CONTENT_LENGTH $content_length; fastcgi_param CONTENT_TYPE $content_type; fastcgi_param DOCUMENT_ROOT …
Alix Axel
  • 2,803
  • 6
  • 29
  • 30
2
votes
1 answer

PHP: Can't access to MySQL server on a different server via PDO

I'm trying to connect to a offloaded SQL server offered here. It says that I should connect using the internal IP 172.16.0.51. I installed nginx and PHP (php5-fpm, php5-mysql) on my VPS. phpinfo() works, too. However, when I try to connect to the…
CookieEater
  • 141
  • 5
2
votes
3 answers

CPanel Change Password of POP Accounts (60,000 of them)

I have a server with CPanel/WHM and we have some 60,000 mailboxes, well some of them looks like compromized for easy password, and we want to reset all mailbox passwords. I tried to run /scripts/fixpop but somehow it did reset password but we dont…
Akash Kava
  • 467
  • 3
  • 8
  • 19
2
votes
1 answer

PHP CLI: Call to undefined function mysql_connect() even with mysql module enabled

I try to run a PHP script from the command line, but get the following error: Call to undefined function mysql_connect() However, the mysql module is loaded: root /var/www/scripts # php -m | grep mysql mysql mysqli pdo_mysql I am on a Debian…
Matthias
  • 302
  • 4
  • 16
2
votes
2 answers

Equivalent of PHP setlocale in an APACHE config file

I need to display a date in french locale. A solution is to use setlocale(LC_TIME, 'fr_FR'); But I'm looking to set the locale directly in the configuration of my apache server. In the /etc/httpd/conf/httpd.conf file, I tried
Nicolas
  • 387
  • 2
  • 5
  • 12
2
votes
1 answer

How to tell php-fpm to send php error log to the nginx error log?

When I am using apache/mod_php, the PHP error will appear in the apache's error log. Now, I am using php-fpm with nginx via fcgi, is it possible to have the PHP error log in the nginx error log as well? So far the only solution is to use external…
Howard
  • 2,135
  • 13
  • 48
  • 72
2
votes
1 answer

NGINX + Codeigniter doesnt work can't access controllers and send parameters to controllers

I want to run codeigniter under NGINX but it just doesnt work. I want to be able to send a parameters to controllers methods. But so far I can not even access controller using the address example.com/index.php/welcome.php. It says No input file…
Harlsten
  • 161
  • 1
  • 1
  • 6
2
votes
0 answers

ICU Latin-ASCII on Centos

Have ICU 4.2 on Centos 5, but need Latin-ASCII translitarator, which came in ICU 4.6. Is there any easy way to add Latin-ASCII without recompiling ICU (no rpm for Centos) and then PHP?
pmm
  • 123
  • 1
  • 4
2
votes
1 answer

PHP Not running on specific directories

Ok. This is a pretty weird error: I made a folder named 'hello' at /etc/apache2/sites-enabled/ with hello.php. Then i created an Alias that told /hello would go to /etc/apache2/sites-enabled/hello. This worked out. Then i tried to make a VHost,…
MoshMage
  • 123
  • 5