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

Sendmail wont send to same domain

I'm using sendmail on my webserver, which so far is working fine. However, when I send emails to the same domain I'm sending them from, they never get delivered. I temporarily changed the email information in my application to another domain, at…
AaronDS
  • 123
  • 1
  • 5
2
votes
3 answers

Compile pHash on Centos + PHP extension

I'm trying to compile pHash 0.9.5 on Centos 6.3 x86_64 Here is the detail of the steps I've followed: $ yum install unzip $ wget https://downloads.sourceforge.net/project/cimg/CImg-1.5.4.zip $ unzip CImg-1.5.4.zip $ $ wget…
maxwell2022
  • 253
  • 4
  • 11
2
votes
1 answer

Can't compile PHP with Sybase

Trying to compile Sybase with PHP 5.4.13 in Linux version 3.2.0-4-686-pae (debian-kernel@lists.debian.org) (gcc version 4.6.3 (Debian 4.6.3-14) ) #1 SMP Debian 3.2.35-2 # apt-get install freetds-dev php-5.4.13# ./configure…
Shawn Welch
  • 541
  • 2
  • 5
  • 19
2
votes
3 answers

How to run PHP + IIS8 as Windows User, or should I?

I am creating a PHP website on IIS8 that needs to connect to an SQL Server that is in the same Windows Domain as the IIS8. I am given a Windows Domain user account and asked to connect using its credentials. I am using sqlserv_connect() for PHP and…
Jake
  • 1,172
  • 6
  • 28
  • 48
2
votes
1 answer

White screen of death with PHP-FPM, no error logged

This is a tale of two different php files. File 1 source: test(); File 1 output: Fatal error: Call to a member function test() on a non-object in /wwwroot/sites/example.com/public/fatal.php on line 1 This is also printed to…
Vic
  • 294
  • 4
  • 18
2
votes
2 answers

Linux server only shows source code of php not actual site

I am kind of trying to transfer my website to an Amazon EC2 instance. I have set up everything and now when I open my website instead of seeing the website I just get to see the source code. Is there anything I did wrong in the setup process ?
the_critic
  • 205
  • 2
  • 11
2
votes
2 answers

PHP can't connect to MySQL after changing datadir

I have changed my MySQL datadir and socket location in my /etc/my.cnf as follows: [mysqld] #--default datadir #datadir=/var/lib/mysql #--new datadir datadir=/data/lib/mysql #--default socket #socket=/var/lib/mysql/mysql.sock #--new…
ashiina
  • 145
  • 2
  • 5
2
votes
2 answers

Setting default permission for session files

How could I set default permissions for session files so that both apache-php-process and some-other-user's-php-process can rw them? The session is created by some-other-user's-php-process and after that apache-php-process should be able to read and…
Timo Kähkönen
  • 156
  • 1
  • 6
2
votes
1 answer

emails sporadically being sent to incorrect/extra recipients

We've been using hMailServer successfully for a number of years as our mail server. Recently Microsoft blocked us for spam (even though we have a legit opt-in service), so any hotmail, live emails were not being delivered. We have a backup server on…
deifwud
  • 73
  • 5
2
votes
2 answers

CURL in PHP chroot'ed environment

How can I find out what files or sockets are needed by Curl when running in a chroot'ed PHP environment on Mac OSX? I recently secured my website by chrooting PHP but now every call to Amazon S3 through it's API is failing, with the error…
Danack
  • 1,216
  • 1
  • 16
  • 27
2
votes
0 answers

What is the correct way to log PHP script's execution time and memory usage?

I want to monitor the execution time and memory usage for my web application running on Nginx + FPM. To that end, I am generating execution time and memory data in the page footer. I can also insert this into the FPM error log file, to be read later…
Rohit
  • 310
  • 3
  • 7
2
votes
1 answer

Temporarily stop everyone from accessing mysql DB

I am going to migrate a LAMP server tonight, it uses php and mysql with apache on centos. I want to stop people from accessing the site/database while I back it up. Will stopping httpd be a sufficient way to stop people from accessing the DB, and…
user160910
2
votes
3 answers

Any advantages of using nginx as a reverse proxy server in mainly php driven dynamic non-static webites?

My question is there any advantage using nginx as reverse proxy when most of the content is dynamically generated via php ? As far as i am concern the nginx is very useful in caching the static content into a cache and serving the multiple requests…
mahen3d
  • 4,342
  • 14
  • 36
  • 57
2
votes
4 answers

Problems installing PHP 5.4.11 and MySQL 5.6.10 on CentOS 6.3

I'm attempting to install PHP 5.4.11 and MySQL 5.6.10 onto a CentOS 6.3 box. I've successfully installed PHP 5.4.11 via the remi repository for yum. I've also successfully installed MySQL 5.6.10 using the community server rpm's on the MySQL…
Mark Locker
  • 141
  • 2
  • 5
2
votes
3 answers

Apache bottle neck

I have nginx as a front end proxy and apache with mod_fcgid. This box has 24GB RAM and 16 cores. I shouldn't be bottlenecking. There seems to be a bottleneck. Once it hits 7000 requests it hangs before continuing. EDIT 3: Can someone explain…
Tiffany Walker
  • 6,681
  • 14
  • 56
  • 82