• Home
  • Archive
  • Tools
  • Contact Us

The Customize Windows

Technology Journal

  • Cloud Computing
  • Computer
  • Digital Photography
  • Windows 7
  • Archive
  • Cloud Computing
  • Virtualization
  • Computer and Internet
  • Digital Photography
  • Android
  • Sysadmin
  • Electronics
  • Big Data
  • Virtualization
  • Downloads
  • Web Development
  • Apple
  • Android
Advertisement
You are here: Home » Optimize php ini for Rackspace Cloud Server (PVHVM)

By Abhishek Ghosh May 2, 2014 4:56 am Updated on May 2, 2014

Optimize php ini for Rackspace Cloud Server (PVHVM)

Advertisement

Here is a quick guide to optimize php ini for Rackspace Cloud Server (PVHVM) for higher performance and lower page loading speed. We talked about PVHVM Virtualization Mode. You probably know about guides on APC Configuration and Optimization for Rackspace Cloud Server (PVHVM), Rackspace Cloud Database, Install APC, Tweak MySQL my.cnf, use Varnish Cache etc. Also, you can read Memcached Configuration and Optimization for Rackspace Cloud Server.

Also, it is suggested to read Hardening Rackspace Cloud Server for WordPress. Last but the most important remaining is Optimize php ini for Rackspace Cloud Server (PVHVM).

 

Optimize php ini for Rackspace Cloud Server (PVHVM) : Basics

 

It is funny, but there are many unknown sources to optimize php ini file, for example; by Apple Inc :
http://www.opensource.apple.com/source/apache_mod_php/apache_mod_php-4.3/php/php.ini-optimized?txt
On Linux, for normal LAMP server installation; php.ini file is located at :

Advertisement

---

Vim
1
/etc/php5/apache2

To find php.ini, we need to run :

Vim
1
php --ini

You will get this kind of output :

Vim
1
2
3
4
5
6
7
8
9
10
Configuration File (php.ini) Path: /etc/php5/cli
Loaded Configuration File:         /etc/php5/cli/php.ini
Scan for additional .ini files in: /etc/php5/cli/conf.d
Additional .ini files parsed:      /etc/php5/cli/conf.d/curl.ini,
/etc/php5/cli/conf.d/pdo.ini,
/etc/php5/cli/conf.d/pdo_sqlite.ini,
/etc/php5/cli/conf.d/sqlite.ini,
/etc/php5/cli/conf.d/sqlite3.ini,
/etc/php5/cli/conf.d/xdebug.ini,
/etc/php5/cli/conf.d/xsl.ini

Like, we ran the command on our Mac running OS X 10.9 :

Optimize php ini for Rackspace Cloud Server

Also, you can run a simple command :

Vim
1
php -i | grep 'php.ini'

It will only give you the output of the location :

Vim
1
Loaded Configuration File => /usr/local/lib/php.ini

Optimize-php-ini-for-Rackspace-Cloud-Server-(PVHVM)

For PHP-MySQL based web softwares like WordPress, editing this php.ini wrongly can fully make the system unstable. So, always read the documentation from official website first to know the function. Take a backup of the file (its quite bigger) via FTP client like Filezilla, edit a copied version on plain text editor locally and replace it via FTP, in case you are not used with command line. If you are logging to FTP as root, binary transfer mode has no difference than editing on nono on command line. Plus, FTP way will allow to keep the original file as backup by renaming – very easy to restore. If you edit wrongly, running the grep command with -i flag might show up :

Vim
1
2
Configuration File (php.ini) Path   /etc/php5/apache2
Loaded Configuration File   /etc/php5/apache2/php.ini

It simply means your configuration is not read. A syntax error in php.ini in line numbered x, will render next all the syntax not excite.

We should restart the Apache after editing :

Vim
1
sudo service apache2 restart

Do not edit on FTP client like Filezilla in all cases, it is a handy tip for testing settings for huge changes.
php.ini can make a site load quite badly or can make it fully optimized. If you create a php file with this :

Vim
1
2
3
4
<!--?php
// Show all php information
phpinfo();
?-->

and load the file on browser, you will get all the information. Also, if you want a crazy nice script, you can download it from this article to get maximum possible information about php.

Also, this file determines the maximum uploading size like basic functions. Official documentation :

Vim
1
http://www.php.net/manual/en/configuration.file.php

 

Optimize php ini for Rackspace Cloud Server (PVHVM) : Things

 

This an universal suggested php.ini configuration to optimize php.ini for one 01 GB server instance (we are taking that MySQL server is not on the same host, if on the same host, adjust according to load value, setting memory to ¼th is safer, ;; or ; are comments) :

Vim
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
memory_limit = 512M
max_execution_time = 360
max_input_time = 900
post_max_size = 50M
upload_max_filesize = 900M
;; more here
realpath_cache_size = 64k
realpath_cache_ttl = 3600
;;
; Allow files to be uploaded
file_uploads = On
; Allow external URLs to be opened
allow_url_fopen = On
; Disable PHP register globals
register_globals = Off
; Enable GZIP compression at the default level
zlib.output_compression = On
zlib.output_compression_level = 6
; Load mcrypt extension
extension=mcrypt.so
;; cookies using Mcrypt is faster than the Blowfish that is used by default
; Disable PHP magic quotes
magic_quotes_gpc = Off
magic_quotes_runtime = Off
magic_quotes_sybase = Off
; Load PDO MySQL extension
extension=pdo.so
extension=pdo_mysql.so
;; zend path is not right, check yours
zend_extension=/usr/local/.../xdebug.so
xdebug.profiler_enable=1
xdebug.profiler_aggregate = On
xdebug.profiler_output_dir=/tmp

Editing parameters on /etc/php5/fpm/php.ini will be the same in case php-fpm is running. You probably should edit (for fpm) :

Vim
1
/etc/php5/fpm/pool.d/

You need to fine tune PHP5-FPM with an example server with 1GB RAM. With12GB RAM, you can dedicate 700MB RAM for PHP and the rest for other processes if MySQL server is different. Now what files are there? for example; APC config :

Vim
1
/etc/php5/conf.d/apc.ini

We actually did that part on previous guides! At any time, you can test instantly your tweak by calling the functions.

Tagged With wordpress php ini optimization , optimization icloud com

This Article Has Been Shared 897 Times!

Facebook Twitter Pinterest

Abhishek Ghosh

About Abhishek Ghosh

Abhishek Ghosh is a Businessman, Surgeon, Author and Blogger. You can keep touch with him on Twitter - @AbhishekCTRL.

Here’s what we’ve got for you which might like :

Articles Related to Optimize php ini for Rackspace Cloud Server (PVHVM)

  • How to Build a Private Cloud

    Building a Private Cloud infrastructure is not very easy for building a Company’s IT Infrastructure. Many brand and Open Source Projects.has various resources.

  • iOS App in SWIFT Language to List the Available Fonts

    Here is a Free Software, an iOS App written in Swift Language or what Apple said Objective-C without the C. Download and modify yourself.

  • Database as a Service and Development of Applications

    Database as a Service and Development sings well as it waives off the anxiety related to stability of the web or mobile device application.

  • Guide to Install VNC Server on Ubuntu 14.04 on Rackspace Cloud

    This Guide describes how to install VNC Server on Ubuntu 14.04 on Rackspace Cloud with step by step commands. The server becomes a desktop.

  • WP-CLI and Cloud Server

    With Cloud Automation, we can integrate WP-CLI, a command line tool for WordPress for better, easy and faster management on Cloud Server.

Additionally, performing a search on this website can help you. Also, we have YouTube Videos.

Take The Conversation Further ...

We'd love to know your thoughts on this article.
Meet the Author over on Twitter to join the conversation right now!

If you want to Advertise on our Article or want a Sponsored Article, you are invited to Contact us.

Contact Us

Subscribe To Our Free Newsletter

Get new posts by email:

Please Confirm the Subscription When Approval Email Will Arrive in Your Email Inbox as Second Step.

Search this website…

 

Popular Articles

Our Homepage is best place to find popular articles!

Here Are Some Good to Read Articles :

  • Cloud Computing Service Models
  • What is Cloud Computing?
  • Cloud Computing and Social Networks in Mobile Space
  • ARM Processor Architecture
  • What Camera Mode to Choose
  • Indispensable MySQL queries for custom fields in WordPress
  • Windows 7 Speech Recognition Scripting Related Tutorials

Social Networks

  • Pinterest (24.3K Followers)
  • Twitter (5.8k Followers)
  • Facebook (5.7k Followers)
  • LinkedIn (3.7k Followers)
  • YouTube (1.3k Followers)
  • GitHub (Repository)
  • GitHub (Gists)
Looking to publish sponsored article on our website?

Contact us

Recent Posts

  • Is it Good to Run Apache Web server and MySQL Database on Separate Cloud Servers? March 27, 2023
  • Advantages of Cloud Server Over Dedicated Server for Hosting WordPress March 26, 2023
  • Get Audiophile-Grade Music on Your Smartphone March 25, 2023
  • Simple Windows Security and Privacy Checklist for 2023 March 24, 2023
  • 7 Best Artificial Intelligence (AI) Software March 24, 2023

About This Article

Cite this article as: Abhishek Ghosh, "Optimize php ini for Rackspace Cloud Server (PVHVM)," in The Customize Windows, May 2, 2014, March 28, 2023, https://thecustomizewindows.com/2014/05/optimize-php-ini-for-rackspace-cloud-server-pvhvm/.

Source:The Customize Windows, JiMA.in

PC users can consult Corrine Chorney for Security.

Want to know more about us? Read Notability and Mentions & Our Setup.

Copyright © 2023 - The Customize Windows | dESIGNed by The Customize Windows

Copyright  · Privacy Policy  · Advertising Policy  · Terms of Service  · Refund Policy

We use cookies on our website to give you the most relevant experience by remembering your preferences and repeat visits. By clicking “Accept”, you consent to the use of ALL the cookies.
Do not sell my personal information.
Cookie SettingsAccept
Manage consent

Privacy Overview

This website uses cookies to improve your experience while you navigate through the website. Out of these, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent. You also have the option to opt-out of these cookies. But opting out of some of these cookies may affect your browsing experience.
Necessary
Always Enabled
Necessary cookies are absolutely essential for the website to function properly. These cookies ensure basic functionalities and security features of the website, anonymously.
CookieDurationDescription
cookielawinfo-checkbox-analytics11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Analytics".
cookielawinfo-checkbox-functional11 monthsThe cookie is set by GDPR cookie consent to record the user consent for the cookies in the category "Functional".
cookielawinfo-checkbox-necessary11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookies is used to store the user consent for the cookies in the category "Necessary".
cookielawinfo-checkbox-others11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Other.
cookielawinfo-checkbox-performance11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Performance".
viewed_cookie_policy11 monthsThe cookie is set by the GDPR Cookie Consent plugin and is used to store whether or not user has consented to the use of cookies. It does not store any personal data.
Functional
Functional cookies help to perform certain functionalities like sharing the content of the website on social media platforms, collect feedbacks, and other third-party features.
Performance
Performance cookies are used to understand and analyze the key performance indexes of the website which helps in delivering a better user experience for the visitors.
Analytics
Analytical cookies are used to understand how visitors interact with the website. These cookies help provide information on metrics the number of visitors, bounce rate, traffic source, etc.
Advertisement
Advertisement cookies are used to provide visitors with relevant ads and marketing campaigns. These cookies track visitors across websites and collect information to provide customized ads.
Others
Other uncategorized cookies are those that are being analyzed and have not been classified into a category as yet.
SAVE & ACCEPT