Phpfox v3 Ultimate Guide
Phpfox v3 Ultimate Guide
Phpfox v3 Ultimate Guide
Table of Contents
Phpfox v3 vs. Social Engine 4 ................................................................................................. 3 Phpfox Hosting Requirements & Comparison ..................................................................... 5 Installing phpfox v3 on a live website .................................................................................... 8 Importing Users from Social Engine 4 ................................................................................. 12 Importing Users from Ning ................................................................................................... 14 Installing phpfox v3 on local pc (only for testing)............................................................... 15 Upgrading to phpfox v3 ........................................................................................................ 16 What to do right away after completed installation .......................................................... 20 White-Labeling Phpfox ......................................................................................................... 21 Walkthrough of AdminCP .................................................................................................... 24 How to install theme in phpfox v3 ........................................................................................ 28 Mail Settings ........................................................................................................................... 29 How & Why to Install Comet chat in phpfox instead of using default IM? ..................... 31 Why not to use a shout box in phpfox? ................................................................................ 33 Language pack in phpfox v3 ................................................................................................. 34 Enable Janrain Engage Integration in Phpfox v3 ............................................................... 36 Enable Facebook Connect in Phpfox v3 .............................................................................. 41 Enable Facebook & Twitter Sharing in Phpfox v3 ............................................................. 43 How to add OpenInviter Contact Importer in phpfox v3? ................................................ 44 How to install a 3rd party plugin in phpfox v3? ....................................................................... 46 How to enable TinyMCE the WYSIWYG text editor? ........................................................... 47 Why Not to use Amazon S3 in Phpfox v3? ................................................................................. 48 How to manage Phpfox v3 productively? ................................................................................... 49 How to create apps in Phpfox v3? ................................................................................................ 50 Enabling Debug Mode in Phpfox v3? .......................................................................................... 51 Managing User Groups ................................................................................................................... 52 How to do Full Site Backup/Restore? .......................................................................................... 53 How To Install Nginx on an Ubuntu 9.04 server with PHP5 support (through FastCGI) and MySQL support?...................................................................................................................... 56 How to setup X-cache with phpfox v3? ....................................................................................... 58 Premium Support, Resources & Tutorials ................................................................................. 61
That was just comparison of se4 vs. phpfox 2 Now come to 3 it will blowout SE4 10X.
Web Server - Apache, IIS, CGI, FastCGI or ISAPI Operating System - Solaris, Linux, BSD, Windows or Mac PHP Version - Minimum - 5+ MySQL Version - Minimum - 4.1 GD complied with your PHP Build - Yes SendMail - Yes PHP safe mode - OFF PHP memory_limit - 32M PHP CURL - Yes Minimum Web Space - 15 mb
Optional Server Requirements The requirements listed below are only required if you decide to use one of the following optional modules.
Video Module o FFmpeg o FFmpeg-PHP o Mplayer + Mencoder o flv2tool o Libogg + Libvorbis o LAME MP3 Encoder o PHP file_uploads - 1 o PHP post_max_size - 100M o PHP max_input_time - -1 o PHP upload_max_filesize - 100M Music Module o PHP file_uploads - 1 o PHP post_max_size - 40M o PHP max_input_time - -1 o PHP upload_max_filesize - 38M Short URL o mod_rewrite (Apache) Facebook Connect o PHP OpenSSL
The requirements for a web browser depends on what theme you are using for your site. The default theme we release has been tested to work on the latest versions of all the most common web browsers (eg. Firefox, IE8, Opera, Chrome etc...). For those that use Internet Explorer must have version 7 or higher installed in order to properly use all the features provided with v2. How to check your hosting provider meets these requirements: 1. Ask your host. The best way to check your requirements is to simply contact your host and ask them. Simply link them back to this page so they can look over the list. 2. You can also download our test script here. The zip package will have 1 PHP file called "phpfox.php". Upload that PHP file to your server and run it like: http://www.example.com/phpfox.php
gets too much traffic and Shared Hosting isnt enough anymore, the reason why I would consider going to Cloud Hosting right away is because I can set up several servers and still pay (in theory) very little, I would have 2 or 3 database servers, one memcache server and one application server and the bill would probably be lower than that of a dedicated server. Cloud/VPS vs. Dedicated: - Not one single point of failure, in a dedicated server if your database crashes your site goes down, in cloud (or VPS) if you have several DB servers, one of them can go down and the site still works, maybe a little slower but it works. - Cost, supposedly Cloud hosting is cheaper than renting a dedicated server. This needs to be analysed for every situation as cloud servers are usually not as powerful as dedicated servers - Contracts, to the best of my knowledge in Cloud hosting you can cancel at any time and you stop paying right away, where in Dedicated Hosting you need to pay to month's end still. Again, this may not be the case for every offer out there. - Dedicated servers have usually much more capacity reaching dozens of gigs of ram and more extras than common Cloud Servers. VPS vs. Cloud: - Think the Contracts topic still applies here - VPS you are still sharing a server, where in a cloud you are allotted a set of resources (say 1.7 Ghz) and you may use those resources at any time - You can add Cloud servers at any moment and they're ready instantly, in a VPS most often you need to wait for the hosting company to set it up for you. - Cloud is still very new, there may be security issues not yet discovered, while VPS is a time proven principle. I'm still not good on the shared hosting numbers, but by 4,000 you'll definitely need a dedicated Celeron server (1TB bandwidth is sufficient for a normal site). 7k-18k seem to work fine on a Pentium D / core2duo server. 20k-35k works ok on a Dual Xeon Dempsey 5050 (8x virtual processors). Beyond this, you will definitely need a cluster.
I & my friend ho-ll-er recommend 7skyhost as its owner is a very popular member on socialengineforum & phpfox camp also his support is the best.
Go into the folder "upload/", which should have contents similar to those shown in this structure guide:
file/ include/ install/ module/ static/ theme/ favicon.ico htaccess.txt index.php robots.txt
To
include/setting/server.sett.php
Next, upload the files and folders within the "upload/" folder to your site using an FTP client. Be sure to overwrite any old files. Once that is completed we can move on to the next step.
file/attachment/ file/cache/ file/css/ file/gzip/ * file/log/ file/music/ file/pic/app/ * file/pic/ad/ file/pic/egift/ * file/pic/emoticon/ file/pic/emoticon/default/ file/pic/event/ file/pic/group/ file/pic/icon/ file/pic/marketplace/ file/pic/music/ file/pic/pages file/pic/photo/ file/pic/poll/ file/pic/quiz/ file/pic/subscribe/ file/pic/user/ file/pic/video/ file/pic/watermark/ file/static/ file/session/ file/video/ include/setting/server.sett.php
Step 2: License Agreement Abide to the License Agreement to continue to the next step. Step 3: Requirement Check Step 3 will consist of checking your server if it meets the software requirements and all the required files/folders have the correct permissions. Step 4: Configuration This step is where you will need to know your SQL username and password. If you do not know it, please ask your web host - in most cases it is different from the FTP log in information. The form is very straightforward, with only the following points needing closer examination. If you do not know what your "SQL Host" is, try "localhost" (without the quotes). If the SQL server is on the same server as your website (and in most cases it is) this will suffice. If you have created a new database for phpFox, or wish to use an existing database, enter the name of the database in the appropriate field.
Video Module Configuration These settings are optional and only should be filled if you plan to use the video module. The script will attempt to find the correct paths for both FFMPEG and MENCODER, however you should verify if they are correct with your host. If at any time these settings are incorrect you can change them directly from the AdminCP at a later time. Step 5: Installer The installer will now be automated until the final step. It will install all the required database tables and insert any data into each of the tables depending on what modules are being installed. Step 6: Administrators Account Fill out the form to create your administrators account. Step 7: Complete Congratulations phpFox is installed!
To access the import script login as an Admin and visit: http:/www.yoursite.com/index.php?do=/admincp/foxporter/ Your Social Engine site (source files) must be located on the same server as phpFox v3 as we require to know the full path to where it is installed in order to get the information required to access the database and import the content. Social Engine and phpFox v3 do not have to be installed in the same database. Known Bugs: 1. Emails are UNIQUE!, so if you have the admin/current member of your phpfox community has the same email as someone you are importing... it will NOT port their account information, forum posts, pictures, etc... therefore you need to change the email on the Social engine Website / use a new email on the phpFox / a complete CLEAN install of phpfox Example: I have an account with an email Registered to exampleemail@gmail.com on both the phpFox and Social Engine website... Both are admin accounts... none of the information/pictures/forum posts will be ported to phpfox... so you need to use a new email or change the old one. Currently this will import Social Engine's... Users Friends Photo Categories Photo Albums Photos The goal is to release updates in stages so if you already imported your users you can skip that and import the next batch of content depending on the update we have provided. To access the import script login as an Admin and visit: http:/www.yoursite.com/index.php?do=/admincp/foxporter/ Your Social Engine site (source files) must be located on the same server as phpFox v3 as we require to know the full path to where it is installed in order to get the information required to access the database and import the content. Social Engine and phpFox v3 do not have to be installed in the same database.
Upgrading to phpfox v3
I tested in my site; it will overwrite your file, but not will remove your database. If your user have a custom design in their profile its will be fine. Also if you do some setting in your admin cp it will be fine too. And Don't Forget to BACKUP you File first.
This guide will help you through the upgrade process of phpFox. This guide assumes that you have successfully downloaded the latest release from phpFox and have the ZIP file "unzipped". The upgrade script only works with phpfox version 1.6 build 21 and newer so if you are running 1.6 build 20 or older you will need to upgrade to build 21 and then use this guide to get to version 2. It also will only upgrade content generated by the default unmodified modules. No themes or modifications will be upgraded.
Go into the folder "upload/", which should have contents similar to those shown in this structure guide:
file/ include/ install/ module/ static/ theme/ favicon.ico htaccess.txt index.php robots.txt
Next, upload the files and folders within the "upload/" folder to your site using an FTP client. Be sure to overwrite any old files. Once that is completed we can move on to the next step.
If this file does not exist you are upgrading from a legacy version and will have to rename the file:
include/setting/server.sett.php.new
to
include/setting/server.sett.php
Notice: Do not rename the file above if it already exists and/or you are upgrading from v2.0.0rc1 or higher. Again, if you are upgrading from any v2 to a new v2, do not rename the file above.
file/attachment/ file/cache/ file/css/ file/gzip/ * file/log/ file/music/ file/pic/app/ * file/pic/ad/ file/pic/egift/ * file/pic/emoticon/ file/pic/emoticon/default/ file/pic/event/ file/pic/group/ file/pic/icon/ file/pic/marketplace/ file/pic/music/ file/pic/pages file/pic/photo/ file/pic/poll/ file/pic/quiz/ file/pic/subscribe/ file/pic/user/ file/pic/video/ file/pic/watermark/ file/static/ file/session/ file/video/ include/setting/server.sett.php
Step 2: License Agreement Abide to the License Agreement to continue to the next step. Step 3: Requirement Check Step 3 will consist of checking your server if it meets the software requirements and all the required files/folders have the correct permissions. Step 4: Updates This step is automated and is when all the updates take place. Depending on what version you are upgrading from the time taken to complete the upgrade can differ. The older the version you are upgrading from the longer it will take. Step 5: Completed Congratulations your site has been upgraded to the latest version of phpFox. If you upgraded from version 1.6.21 test your site, and when you can confirm it is working properly you can remove the folders: /include/settings/ /include/modules/
/site/
Common Pitfalls - I am upgrading but the site says "Install" R/ Make sure you did not rename the file /include/setting/server.sett.php.new and that your site was working before uploading any file
Main file folder is writable (file/). This is a security risk and this folder should not have any "write" permission.
Use your file manager in Cpanel. Set your files permissions to 555 & it will solve these warnings. Delete /Install if it exists in phpfox root folder.
White-Labeling Phpfox
1. How to remove branding in PhpFox3 Through FTP go to yoursite.com/include/library/phpfox/phpfox/phpfoxclass.php Find: public static function link($bLink = true, $bVersion = true) { return 'Powered By ' . ($bLink ? '' : '') . 'phpFox' . ($bLink ? '</a>' : '') . ($bVersion ? ' Version ' . PhpFox::getVersion() : ''); } And replace with: public static function link($bLink = true, $bVersion = true) { } 2. Change your site's logo One of the first steps of making your phpFox site unique is to change the site logo. To change your site logo login to your AdminCP, then go to: Extensions >> Theme >> Manage Themes then to click on the drop down button next to the current theme - usually "phpFox - (Default)" Manage Styles then click on the current style - usually "phpFox - (Default)" here too. Then click on the option: Change Logo Browse after your logo then upload it. You can have the script automatically resize the logo for you - if you want. Once done click: Upload Logo
3. Change Favicon in your site All you have to do is rename your custom icon to "favicon", and upload it to your root phpFox directory (replacing your old favicon.ico). After that, clear your browser's cache, and you should be set. If you need to convert an image to a favicon, I'd suggest searching for a free converter online. You can try this one: http://tools.dynamicdrive.com/favicon/ 4. Change the Site Name You change your site name from the AdminCP -> Settings -> System Settings -> Manage Settings -> Core: Site Name, it will show there instead. 5. Site title, copyright, keywords and site description The site title is what is shown on the web browser at the very top in the window border, by default it reads something like "phpfox - Social Networking Script". The site description is used by search engines to identify what sort of information your site has, it is also shown in search results, by default its "The ultimate solution for your online community. phpFoX is easy to use, easy to customize and packed full of advanced software features found on most top community websites!" The keywords are also used for SEO and by default they do not relate to your site. You can change these by going to the AdminCP -> Settings -> System Settings -> Manage Settings -> Core. Search for "Site Title", "Copyright", "Meta Keywords" and "Meta Description" 6. "Kind Regards, Phpfox" This is the phrase that is used as a signature for outgoing emails. There are two ways to change: Easy one: just go to AdminCP -> Settings -> System Settings -> Manage Settings: Mail, look for "Signature" and replace what is there with whatever text you want. More personalized one: First you will need to create a language phrase. This phrase can belong to a product so if you have not done so yet, please create a Product. Now go to the AdminCP -> Extensions -> Language -> Add Phrase. Here choose your product from the drop down list. In the "module" drop down you can select "core". This is an access control measure, if this module is disabled the phrase will be disabled as well, but the core module cant be disabled so that guarantees this phrase will be enabled as long as the script runs. The variable
name can be all lower case letters and must have no spaces; this would make a good variable for this case: general_site_email_signature Now in the "text" field you can add whatever you want, you can use HTML to format your signature. Submit and you should have a new language phrase. Now lets tell the script to use this phrase: please go to the AdminCP -> Settings -> System Settings -> Manage Settings: Mail. There is a section called "Signature", it references to the previous language phrase so change the text there for: {phrase var='core.general_site_email_signature'} if you named your variable differently then make the appropriate change. Save and to make sure, clear your site's cache by going to AdminCP -> Tools -> Maintenance -> Cache Manager. 7. Change Default Text/Phrase of Homepage Go to admincp/theme/template/user look for Welcome.html.php <h1>{param var='core.site_title'} helps you connect and share with the people in your life.</h1> <div class="t_center"> {img theme='layout/banner.png'}-----> You can also change Your logo where it says img theme to layout whatever your Image name is:) </div> Now replace Helps You connect and share with people in your Life With Your Tag or Catch phrase.. if you want change text of something else you could do this by using phrase manager.
Walkthrough of AdminCP
If you want to set this theme as your default, follow the following steps : Adminpanel -> Extenstions -> Theme -> Manage Themes You will see a list of the themes on your site Click the dropdown arrow on the left of theme and select Manage Styles, now find the style you want to be default and click on the Red Dot to make it the active theme. Click on Update Clear your Cache afterwards
Mail Settings
To change the send mail settings. 1. Go to your Adminpanel -> Settings -> Manage Settings -> Mail If you want to change the send mail method to smtp: Change Send Mail Method To SMTP; then fill these settings: SMTP SMTP SMTP SMTP Host Authentication Username Password
If you want to change the name displayed when users receive emails from this site: Change From to your desired name If you want to change the default email: Change Email to your desired email If you want to change the site signature: Change Signature to your desired signature
Headers
No matter which method you choose there is a portion of the message called headers. the headers specify many things, between them the importance or priority of the message, who sent the message, the message id and many others. So, now that you have a little better understanding of the options at hand we need to mention that mail is handled internally in phpfox by a third party package called phpmailer. It is considered as the best mail handling library available and its free. It takes care of all the headers and formatting and standards compliance so your mail goes out just as perfect as it can be. Here is the whole picture:
1. In your site someone triggers an action that sends an email, the phpfox script gets this action 2. The phpfox checks the users that will receive the mail and sets their emails
3. The phpfox script sends the message, the from and the to fields to phpmailer, it also sends the character set (UTF-8 or else) and line breaking settings as well as smtp settings if available and the method to use (smtp vs mail). 4. Phpmailer takes all those parameters and sends the mail.
Thats as far as we're concerned here (the details of how it connects to the other server are not relevant right now) and this is why it gets difficult to say this, if your mail does not come out, there is very little responsibility on the Phpfox end, I would dare to say that 10% or lower is actually done on the phpfox side. There are of course ways to check if your mail is working, one is by using another script to check if it works, a simple php line like this would test if the "mail" method is working for this one case:
<?php $bSent = mail('youraddress@yourmailprovider.com','subject', 'message'); var_dump($bSent); ?>
it would output true if mail was sent and false if it wasnt and here's one caveat, the fact that it got sent, doesnt mean it got received. Mail Clients like Yahoo!, Hotmail, GMail, etc, do not return right away if the message was received properly or not, they can place the message in a queue to be checked and by then the communication between the servers has been closed already. But if you test this and you actually got the test email (when checking your inbox or spam folder) then you know this method works (or at least worked for this one case).
SPF Records
Among the many reasons why a mail could not make it to the recipients' inbox is that it got marked as SPAM, each mail client has its own rules on defining what SPAM is but perhaps the most important one is the SPF Record. In internet there are translators that say "the address www.site.com is the computer 219.219.219.219", thats an IP number, unique to your server and the way in which internet computers are identified, you can think of it like your house address, theres only one address for each house. In these servers you can host a small record that says "the server 219.219.219.219 is the only server that sends mail from www.site.com ". Mail clients check on these records and if they find one they compare it to the message they just received. Implementing an SPF record is free, and your hosting company can help you with that. This is the official site for the openspf project.
Checking your SPF records
When having problems with mail you really want to check if your domain has a SPF record, the following tools will help you to identify whether you have one and if its properly set up.
1. http://www.openspf.org/Why 2. http://www.kitterman.com/spf/validate.html
How & Why to Install Comet chat in phpfox instead of using default IM?
As a note, keep in mind that the default phpFox's IM use a very greedy resource consumption technology called "long pooling", in order to keep the chat updated. The problem with this technology is that it uses the server to keep the chat updated. Therefore, replacing the default IM with a peer-to-peer IM chat can increase the performance very much, because the peer-to-peer technology avoids the use of the server to keep the chat updated. How? By keeping a direct connection among the users involved, instead of using the server as a centralized place to update. You can download the latest comet chat nulled here: Cometchat 3.01 Platinum For phpFox Nulled: http://www.megaupload.com/?d=FWFTK7NQ Introduction This guide will help you through the installation process and get CometChat running on your site. Installation is very straight forward, only taking about 5 minutes from uploading the files to viewing the CometChat bar on your site. Before you begin, you will need an FTP client, if you do not have one, some popular solutions include FileZilla (free) or CuteFTP (trial). You do not need programming knowledge to install CometChat, but a working knowledge of FTP functions is a plus. This guide assumes that you have successfully downloaded the latest release of CometChat and have the zip file "unzipped" and ready to go. If not, you can download the package from your client area. The instructions will term the zip file you downloaded as cometchat.zip. Uploading At this point, you should have the zip archive cometchat.zip and find a single folder- "cometchat". If you don't know already, find out the folder in which phpFox is installed.
If you access your phpFox site via 'http://www.domain.com', then look for the webroot directory. The "webroot" directory is usually 'public_html' or 'www', but this varies from server to server so if you're unsure, contact your hosting provider. Using your FTP client, copy the cometchat folder inside your phpFox folder. e.g. http://www.domain.com/cometchat Installation Step 1 You should now run the installer file through your web browser by entering the URL to it into your browser address bar (if you have followed our example, type in http://www.domain.com/cometchat/install.php, naturally substituting 'domain.com' for your web address). If the installation was completed successfully, then two lines of HTML code will be displayed on your screen. Please copy these two lines. Step 2 Now edit your template header. If you are using the default template, then the header file will be: /theme/frontend/default/template/template.html.php Immediately after the opening head tag add the copied code: <head> Now delete install.php file from the cometchat folder. That's all! Now log-in to your site and you will be able to see the CometChat bar. For customizing the text, icons, plugins, theme and modules, please refer to other documents here.
1) Make sure that only one (1!!) language pack is installed and set as default 2) Then click "import language packs..." You can install any language pack beside the default. But you can have only one pack for one language.
Settings >> System Settings >> Manage Settings >> Facebook Connect For the field: Facebook API Key enter the API Key Facebook provides you with. Next, for the field: Facebook Secret enter the Application Secret Facebook provides you with. Next, for the field Application ID enter the Application ID Facebook provides you with. Now enable this feature by setting: Enable Facebook Connect to True Your Facebook Connect should now be setup. To test this feature log out of your site and visit your sites index page. Under the login form you should see a Facebook Connect button.
<iframe src="Insert the link to your openinviter file here" width="900" height="950" frameborder="no" scrolling="auto" style="border-width:2px; border-color:#fff; background:#FFF; border-style:hidden;"> </iframe> Submit and you should be taken to the Add Menu screen. Connection: (I put on Main but you can put where you want) Language Package Details: This is the title for your menu Submit
Upload the contents of the /upload folder to your root phpfox directory directory. Usually, this directory will be /public_html, /www, or /htdocs.
STEP 2
Go to "Import Products" section of the Phpfox Admin Panel. The section can be found by going to the Main Menu "Extensions">"Products"->"Import Products". Install the product by clicking the "Install" link under the "Action" column. And you're done!
http://forums.phpfox.com/project.php?issueid=4688
To manage user group settings, first log into your AdminCP and go to: Users >> User Group Manager >> Manage User Groups
Here you will find a list of all the available user groups. We will start working with the default user group "Registered User". To the left of that user group you will find a drop -down icon. Click on that icon and then click on the sub-menu "Manage User Settings". You will now find a page with all the user group settings organized based on the module they belong to. By clicking on a module you will find many settings that control features for that specific module
Backup:
Restore:
How To Install Nginx on an Ubuntu 9.04 server with PHP5 support (through FastCGI) and MySQL support?
1.)System Requirements a.) VPS or Dedicated Server b.)Reccomended Dedicated Server At 7Skyhost Webhosting http://www.7skyhost.com/dedicated.html c.) SHH usually installed with Dedicated or VPS Webhosting d.) PuTTy a Shh Client For Windows where You can Cut paste Codes 2.) So Lets go Ahead Download PuTTy A.)http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html B.)After that install Putty and configure it 2.) Lets go grab Nginx on an Ubuntu 9.04 server with PHP5 support (through FastCGI) and MySQL support And Install it a,)Open Putty By Double Clicking it and then put Your SHH Config. In this tutorial I use the hostname server1.example.com with the IP address 192.168.0.100. These settings might differ for you, so you have to replace them where appropriate. I'm running all the steps in this tutorial with root privileges, so make sure you're logged in as root: sudo su <------------------Copy paste just those words ok Lets install Mysql 2 Installing MySQL 5.0 In order to install MySQL, we run aptitude install mysql-server mysql-client<------Copy and paste This INto Putty Black Screen You will be asked to provide a password for the MySQL root user - this password is valid for the user root@localhost as well as root@server1.example.com, so we don't have to specify a MySQL root password manually later on: New password for the MySQL "root" user: <-- yourrootsqlpassword Repeat password for the MySQL "root" user: <-- yourrootsqlpassword Now Lets install Nginx: 3 Installing Nginx
Nginx is available as a package for Ubuntu 9.04 which we can install as follows: aptitude install nginx Start nginx afterwards: /etc/init.d/nginx start Type in your web server's IP address or hostname into a browser (e.g. http://192.168.0.100), and you should see the nginx welcome page: Now Lets Install Php 5 With FGI: 4 Installing PHP5 We can make PHP5 work in nginx through FastCGI. Fortunately, Ubuntu 9.04 provides a FastCGI-enabled PHP5 package which we install like this (together with some PHP5 modules like php5-mysql which you need if you want to use MySQL from your PHP scripts): aptitude install php5-cgi php5-mysql php5-curl php5-gd php5-idn php-pear php5-imagick php5-imap php5-mcrypt php5-memcache php5-mhash php5-ming php5pspell php5-recode php5-snmp php5-sqlite php5-tidy php5-xmlrpc php5-xsl-------------------->Copy Paste this in Putty Client Then open /etc/php5/cgi/php.ini and add the line cgi.fix_pathinfo = 1 right at the end of the file: vi /etc/php5/cgi/php.ini---------->Goto Your Favorite File Manger Program login into root Edit This File add cgi.fix_pathinfo = 1 right at the end of the file [...] cgi.fix_pathinfo = 1 There's no standalone FastCGI daemon package for Ubuntu 9.04, therefore we use the spawn-fcgi program from lighttpd. We install lighttpd as follows: aptitude install lighttpd<-------------copy and paste this into the putty Client You will see an error message saying that lighttpd can't start because port 80 is already in use: Starting web server: lighttpd 2009-04-30 15:51:50: (network.c.300) can't bind to port: 80 Address already in use failed! That's how it's supposed to be because nginx is already listening on port 80. Run update-rc.d -f lighttpd remove----------------> Copy Paste This into Shh Client Congratulation you just installled Nginx on an Ubuntu 9.04 server with PHP5 support (through FastCGI) and MySQL support
Now make Sure You make a password only you know Example: Create one password for Xcache administration: # echo -n deacon| md5sum ok Now that you installed x-cache lets properly Configure with php.ini Now we are Done with putty, Now Login into Your Favorite FTP-Client or File Manager Find php.ini and edit add this Code before loading any other Zend Extension by Cut and paste using Note Pad [xcache-common] zend_extension = /usr/lib/php/modules/xcache.so [xcache.admin] xcache.admin.user = "admin" ;how to create md5 pwd: echo -n "password"| md5sum xcache.admin.pass = "a364b1d54799c713b8a377de50f8ed3c" #easywms.com [xcache] ; Change xcache.size to tune the size of the opcode cache ; to disable: xcache.size=0 ; to enable : xcache.size=64M etc (any size > 0) and your system mmap allows ; someone said, if >=64 will get problem xcache.size = 32M xcache.shm_scheme = "mmap" ; set to cpu count (cat /proc/cpuinfo |grep -c processor) xcache.count =4 ; just a hash hints, you can always store count(items) > slots xcache.slots = 8K ; ttl of the cache item, 0=forever xcache.ttl =0 ; interval of gc scanning expired items, 0=no scan, other values is in seconds xcache.gc_interval = 0 ; Change xcache.var_size to adjust the size of variable cache ; same as aboves but for variable cache, if you have not used xcache function in script,forget it xcache.var_size = 8M xcache.var_count = 1 xcache.var_slots = 8K
300
xcache.test = Off xcache.readonly_protection = On ; for *nix, xcache.mmap_path is a file path, not directory. ; Use something like "/tmp/xcache" if you want to turn on ReadonlyProtection ; 2 group of php wont share the same /tmp/xcache ; for win32, xcache.mmap_path=anonymous map name, not file path xcache.mmap_path = "/tmp/xcache" ; leave it blank(disabled) or "/tmp/phpcore/" ; make sure its writable by php (without checking open_basedir) xcache.coredump_directory = "" ; per request settings xcache.cacher = On xcache.stat = On xcache.optimizer = Off [xcache.coverager] ; per request settings ; enable coverage data collecting for xcache.coveragedump_directory and ; xcache_coverager_start/stop/get/clean() functions (will hurt executing performance) xcache.coverager = On ; ini only settings ; make sure its readable (care open_basedir) by coverage viewer script ; requires xcache.coverager=On xcache.coveragedump_directory = "" Congrats you now have installed X-cache and properly configured it.