icon Get the most out of Surmunity, read our tips here! Need an interesting blog to read? You've got to read the Surpass Blog! | Welcome! Please register to access all of our features.

» Surpass Web Hosting Forums » Discussions » Search Me! » [Dedicated - Article] PHP Configuration

Search Me! Lots of information is found in this board. You can also ask general questions here if you'd like! This is the last stop on Surmunity.

Reply
 
LinkBack Thread Tools Search this Thread Rate Thread
Old March 13th, 2008, 6:55 PM   #1 (permalink)
URB4N 5K1LLZ
Super #1
 
Roxy's Avatar
 
Joined in Sep 2005
Lives in Orlando, FL
Hosted on SH63
2,660 posts
Gave thanks: 81
Thanked 128 times
[Dedicated - Article] PHP Configuration

PHP Configuration is mainly controlled through the php.ini file. The php.ini file includes a large array of configurations and corresponding values.

Introduction
Fig 1.

(This is some text copied from a php.ini file) The php.ini file comes very well documented from within the file itself. You will notice many lines that begin with a semicolon ; , these lines are considered comments. The text in bold illustrates the configuration/module and its corresponding value separated by the equal sign.

PHP Code:
Transparent output compression using the zlib library
Valid values for this option are 'off''on', or a specific buffer size
to be used for compression (default is 4KB)
NoteResulting chunk size may vary due to nature of compressionPHP
outputs chunks that are few hundreds bytes each as a result of
compression. If you prefer a larger chunk size for better
performanceenable output_buffering in addition.
NoteYou need to use zlib.output_handler instead of the standard
output_handler, or otherwise the output will be corrupted.
zlib.output_compression Off 

Fig 2.

(This figure illustrates a header box) To distinguish different sections from the rest of the php.ini file, "blocked boxes" are used as a method of formatting of which the parser will skip over. Similar techniques are used in Cascading Style Sheets, HTML, and many other languages.

PHP Code:
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;
This is a block header box;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 
How to Edit a php.ini file?
The simplest way to edit the php.ini file is through the terminal. The nano command is amongst the most popular.

MAC Directions

First Open Terminal (Macintosh HD/Applications/Utilities/) Then, begin an SSH Session (replace root w/your username & replace the IP Address with your IP Address):

Code:
$ ssh root@10.2.14.21
After entering your password, type the following then press Enter:

Code:
$ nano /usr/local/lib/php.ini
You should now see a window similar to this and may now begin editing your php.ini file:

__________________
Roxanne


Urban Roxy -Personal Blog
SH63 - the best darn shared server!
Roxy is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old March 13th, 2008, 7:03 PM   #2 (permalink)
Surpass Abuse Admin
Super #1
 
removed's Avatar
 
Joined in Mar 2005
Lives in Houston, TX
Hosted on NONE
7,797 posts
Gave thanks: 11
Thanked 278 times
php.ini is not always located at /usr/local/lib/php.ini on dedicated servers. `php -i | grep ini` can be used to find php.ini's proper location ...

Also, shared users cannot edit this file.
__________________
Unofficial IRC Channel: #surpass EFNet
Unofficial = No official support. Support requests can be submitted to our helpdesk.
removed is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old March 14th, 2008, 11:28 AM   #3 (permalink)
URB4N 5K1LLZ
Super #1
 
Roxy's Avatar
 
Joined in Sep 2005
Lives in Orlando, FL
Hosted on SH63
2,660 posts
Gave thanks: 81
Thanked 128 times
Quote:
Originally Posted by removed View Post
php.ini is not always located at /usr/local/lib/php.ini on dedicated servers. `php -i | grep ini` can be used to find php.ini's proper location ...

Also, shared users cannot edit this file.
Oh, well I got this from the wiki and I think it was under the Dedicated category, so that would explain it. =)
__________________
Roxanne


Urban Roxy -Personal Blog
SH63 - the best darn shared server!
Roxy is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On