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.

learn more… | top users | synonyms

5
votes
2answers
2k views

V8js PHP module on Linux - can't find libv8.so

Running into a problem with v8js-0.1.2 (beta) - I'm seeing others have success on the net but regardless of what platform/OS I'm running, I always hit the same problem. I'm currently attempting to ...
5
votes
2answers
85 views

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

can't get php mail() working on Ubuntu desktop version with sendmail and postfix

I'm running Ubuntu 9.10 LAMP and trying to do a simple email test with PHP and I'm not getting any emails sent. mail("myemail@gmail.com", "eric-linux test", "test") or die("can't send mail"); I ...
5
votes
1answer
6k views

Cacti graph not showing

I have created php script for cacti which outputs data in format like: <variable>:<value> Output of my script: temperature:20 humidity:15 Then I created data input method where input ...
5
votes
3answers
1k views

PHP APC Accelerator completely breaks Apache2 on Windows?

My local development configuration: Apache 2.2.21 VC9 downloaded from Apache Lounge (as suggested at PHP For Windows website. Manual installation as service. PHP 5.3.8 VC9 x86 Thread Safe, installed ...
5
votes
1answer
2k views

Installing a php extension (xdiff) from pecl on Linux

I was getting this error on my php script: Fatal error: Call to undefined function xdiff_file_diff() I realised that I didn't had the xdiff extension installed. When I tried to install it using the ...
5
votes
3answers
16k views

How do I configure IIS to allow access to network resources for PHP scripts?

I am currently working on a PHP front-end that joins together a series of applications running on separate servers; many of these applications generate files that I need access to, but these files ...
5
votes
1answer
139 views

Odd performance fluctation with php-fpm and nginx

I'm running a load test against a web service. It's a php application running on php-fpm and nginx, with fastcgi. There is a MySQL backend being used for small reads only. Invariably, I'm seeing a ...
5
votes
3answers
297 views

freebsd does not recognise that php was installed via ports

I have php 5.2.12 installed on FreeBSD 8.0-STABLE. It was installed from ports and I am trying to upgrade it to 5.3.2. However for some reason my system is not recognising that php was installed via ...
4
votes
9answers
774 views

Wordpress on AS/400

My client needs one clarification before assigning a job. Is it possible to run Wordpress on AS/400? Thanks
4
votes
8answers
9k views

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?
4
votes
5answers
192 views

What statistics app should I use for my website?

I have my own server (with root access). I need statistics of users who visit my website etc etc... I have looked at an app called Webalyzer... Is this a good choice? I run apache2 on a Ubuntu 9 ...
4
votes
3answers
11k views

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

The Content-Length header does not exist

I have nginx server installed on Linux. When I send a request with curl, the Content-Length header is missing from the response. The 1.php file is: <?php echo "hello"; ?> The example ...
4
votes
6answers
7k views

Apache, nginx, or lighttpd? [closed]

I am going to be live blogging from an event and expect huge spikes in traffic. I am currently using apache with modphp and it died last year under heavy traffic and I don't want it to happen again. ...
4
votes
7answers
16k views

Mac OS Snow Leopard: Why does my mysql.default_socket value not change in my phpinfo() page?

I'm getting errors whenever I try to connect locally to mySQL on Mac OS Snow Leopard 10.6.4. I'm running mySQL 5.1.46. I can log in using the console. I'm running PHP 5.3.2 and my phpinfo() page is ...
4
votes
5answers
6k views

Is LDAP the only way to authenticate an web application against Active Directory?

I'm a PHP programmer and I've never work with active directory or ldap. I need to integrate my web app with an active directory and after ask the IT guy of the client company he said to me that isn't ...
4
votes
1answer
10k views

why isn't laravel's php artisan serve server being accessible from the WWW on IIS

I have a laravel application running through the laravel artisan server: php artisan serve and it works just fine if I go on my localhost:8000.. Further, I added an inbound rule in the IIS server ...
4
votes
2answers
10k views

nginx, alias, php-fpm = File not Found

I'm trying to set up nginx with DAViCal. However, I'm getting a "File not Found" with a "FastCGI sent in stderr: "Primary script unknown" in the log. Looks like something is wrong with my aliasing but ...
4
votes
1answer
3k views

How to add directives to php.ini on AWS Elastic Beanstalk?

I'd like to add these PHP settings to my Elastic Beanstalk environment: upload_max_filesize = 64M post_max_size = 64M These options cannot be set with option_settings in .ebextensions: Namespace ...
4
votes
6answers
10k views

What causes PHP pages to consistently download instead of running normally

I'm running a Ubuntu Server on a VM, to test out different web forum solutions. I have set up a ~/public_html/ to be accessible with the apache2 web server, and that works fine. However when I go to ...
4
votes
1answer
22k views

How do I change the NGINX user?

I have a PHP script that creates a directory and outputs an image to the directory. This was working just fine under Apache but we recently decided to switch to NGINX to make more use of our limited ...
4
votes
4answers
13k views

How to build missing PHP 5.3 extensions on CentOS 5.6

I've created a fresh installation of CentOS 5.6, and installed PHP 5.3 using the php53-* packages from the CentOS repository. Specifically, I've got: php53 php53-cli php53-common php53-devel ...
4
votes
4answers
10k views

Are PHP session files ever deleted?

I see there are thousands of files in my "/tmp" directory (a CentOS machine) and almost all of them are PHP session files. I'm worried about the possible impact this might have on my system. Are those ...
4
votes
3answers
9k views

Isolating Apache virtualhosts from the rest of the system

I am setting up a web server that will host a number of different web sites as Apache VirtualHosts, each of these will have the possibility to run scripts (primarily PHP, possiblu others). My ...
4
votes
2answers
15k views

How do you upgrade PHP 5.1 to PHP 5.3 using yum on CentOS

Using Yum/CentOS. The problem is that php 5.1 is already installed and running so yum update php dont work! I looked around the net for a solution but they say to do the above =/
4
votes
1answer
7k views

Nginx: Rewrite rule for subfolder

I have a subdomain where I want to keep projects I am working on, in order to show these projects to clients. Here is the configuraion file from /etc/nginx/sites-available/projects: server { ...
4
votes
3answers
1k views

Cron job creating empty file each time it runs

I have a php script I want to run every minute to see if there are draft news posts that need to be posted. I was using "wget" for the cron command in cPanel, but i noticed (after a couple days) that ...
4
votes
3answers
7k views

How to set the PHP Api Version for phpize

I'm upgrading php on my server but I'm running into a problem with phpize and compiling external modules. phpize -v reports: Configuring for: PHP Api Version: 20041225 Zend Module Api No: ...
4
votes
2answers
3k views

PHP install on clean Amazon Linux AMI

I'm trying to get a script working to bring up new Amazon Linux EC2 instances with php55 and the Amazon PHP sdk. However, I'm running into a problem that I think is caused by PHP version conflicts. I ...
4
votes
1answer
3k views

My nginx rewrite is downloading the php file

I have the following rewrite rule I'm trying: location / { index index.php index.html; rewrite ^/test$ /test.php break; } And I ...
4
votes
2answers
8k views

What to do after hitting the dreaded 256 max connections Apache Limit

After scratching my head trying to figure out why my site was responding so slowly even though the server resources are fine, I finally checked the Apache status and found: 78 requests/sec - 0.7 ...
4
votes
4answers
6k views

How to configure PHP CLI on linux ubuntu to run as www-data?

I have a symfony2 application on my ubuntu. Symfony has a plenty of useful console commands (like php app/console cache:clear or php app/console assets:install web). The problem is If I run them as ...
4
votes
1answer
1k views

How to maintain PCI compliance on a LAMP server when repositories don't keep up with versions

We run Ubuntu Lucid 10.0.4 as the foundation of our LAMP environment. We are trying to become PCI compliant so that we can pass CC info through our server. We have run some third-party scans on our ...
4
votes
2answers
12k views

How can i enable byte range request?

How can i enable byte range request? While pod casting on itunes it gives an error message "There is a problem with your feed. Your episodes are hosted on a server which doesn’t support byte-range ...
4
votes
3answers
5k views

Chrome caching 302 redirects

I have a php script with is used to rotate banner images on a site. Under Firefox/IE page refreshes will make another request and a different image will be returned. Under Chrome, the request seems ...
4
votes
1answer
9k views

PDO_MYSQL Installation on CentOs6

I have a new CentOS 6 server running PHP 5.3.2. The output of php -v shows Unable to load dynamic library '/usr/lib64/php/modules/pdo_mysql.so - /usr/lib64/php/modules/pdo_mysql.so cannot open ...
4
votes
1answer
7k views

Curl POST - 411 Length Required

We have a RestFUL API we build in PHP. If we make the request: curl -u api-key:api-passphrase https://api.domain.com/v1/product -X POST We get back: 411 - Length Required Though if we simply add ...
4
votes
1answer
3k views

PHP_Flag and PHP_Value Command Not Found Issue

We currently have a dedicated server with one company that is running apache, php, mysql etc. It currently has whm/cpanel installed. We are migrating to a new server with cpanel/whm. Everything ...
4
votes
5answers
4k views

Where's my memory?! Nginx + PHP-FPM front end webserver slows to a crawl

I'm not sure if I have a problem with a memory leak (as my hosting company suggests), or if we both need to read http://linuxatemyram.com. Maybe you clever people can help us out? This is a front-end ...
4
votes
3answers
4k views

Nginx - Route all requests to single script

I have a PHP script that handles script routing and does all sorts of fancy things. It was originally designed for Apache, but I'm trying to migrate it to nginx for a few of my boxes. Right now, I'm ...
4
votes
2answers
4k views

code injected inside PHP file with 777 permission

I woke up to find that all the folders in my shared-web-host with 777 permission had two new php file. The code inside the file could not be read - here is the decoded version: ...
4
votes
9answers
3k views

Password Self-serve Active Directory via LAMP environment

I would like to be able to change active directory passwords via a Linux/Apache based webpage. This would be a self serve web page for the user. I have SSL-LDAP setup on the Active Directory to make ...
4
votes
3answers
5k views

How can I rewrite urls (ala mod_rewrite) for free in IIS 6?

I've got an application I wrote (with cakephp) for the lamp stack and I'm moving it to a windows server. I'm having a lot of trouble with apache for windows (memory and cpu issues) so I would like to ...
4
votes
2answers
3k views

Sendmail chdir(/clientmqueue) permission denied

My centos server can send mail using the 'mail' command but not from php. Maillog says: sendmail[18010]: NOQUEUE: SYSERR(nginx): can not chdir(/var/spool/clientmqueue/): Permission denied My ...
4
votes
2answers
15k views

How to upgrade to latest PHP, MySQL, and phpmyadmin on CentOS 5.8 (32bit)?

I have searched around on the internet and cannot find a reliable source for installing the latest versions of PHP, MySQL, and phpmyadmin on CentOS 5.8 32bit with apache. I have tried a couple times, ...
4
votes
5answers
4k views

PHP broken after upgrading to php 5.4

on an ubuntu 12.04 i have upgraded to PHP 5.4 according to this tutorial http://www.upubuntu.com/2012/03/how-to-upgrade-install-php-540-under.html But when i call php5 -v i get PHP Warning: PHP ...
4
votes
1answer
228 views

What exactly does SuPHP do?

And is it necessary? I've read a bunch of pages on it and I can't for the life of me actually figure it out, as opposed to what apache and just plain old php already do.
4
votes
3answers
276 views

Proper permissions for two developer team on PHP5 Apache Linux server

I was hoping someone could point me in the right direction regarding Linux permissions. I understand how to calculate what permissions are, understand the methodology behind changing them and can ...
4
votes
4answers
4k views

Running PHPmyAdmin on Nginx, port 8080 passed to varnish not working well!

I installed Nginx, Varnish and PHP-fpm. Then I installed PHPmyAdmin and made a virtual host for it: server{ listen 8080; server_name phpmyadmin.Domain.com; access_log ...