[Tutorial] How to setup UberCMS 2.0 with Nginx

iHarrison

Member
Mar 11, 2012
321
131
Hello,

This is a small tutorial on setting up PHP, Nginx and UberCMS 2.0. You have hopefully executed and configured your Phoenix or Butterfly database already so I'll leave that out of this tutorial.

For this you will need to download:
  • PHP -
  • Nginx -
  • RunHiddenConsole -
  • UberCMS 2.0 -
nginx-logo.png

Installing Nginx
  1. Download the web server from the link mentioned earlier in the thread.
  2. Extract the contents of the .zip to C:\nginx - this is the recommended directory.
  3. Download RunHiddenConsole.exe and put it in the same folder!
  4. We now need to create a few files to stop, and start the server. So first, create a file called start_server.bat and put the following inside:
    PHP:
    @ECHO OFF
    RunHiddenConsole.exe e:\nginx\nginx.exe
    RunHiddenConsole.exe e:\nginx\php\php-cgi.exe -b 127.0.0.1:9000 -c e:\nginx\php\php.ini
    pause
    EXIT
  5. Then create a file called stop_server.bat and put this inside:
    PHP:
    @ECHO OFF
    taskkill /f /IM nginx.exe
    taskkill /f /IM php-cgi.exe
    EXIT
  6. As you can see, there is a line for PHP in each one, but if you want to test that the web server works, remove those and run start_server.bat. You should then be able to see a welcome page when browsing to
  7. We are now ready to install PHP!
PHP-logo.jpg

Installing PHP
  1. Download PHP using the link shown earlier in the thread, and extract it to the /php inside where the web server is located.
  2. Head inside the /php folder and search for a php.ini-production file. Rename this to php.ini.
  3. Open up php.ini inside your favourite editor. First we need to configure the extension directory, to do this, search extension_dir until you see this:
    PHP:
    ; Directory in which the loadable extensions (modules) reside.
    ; http://php.net/extension-dir
    ; extension_dir = "./"
    ; On windows:
    ; extension_dir = "ext"
  4. Just below that, put this:
    PHP:
    extension_dir = "ext"
  5. Now we need to enable a few extensions so that UberCMS can run properly. Search for ;extension=php_bz2.dll until you see a long list of extensions like this:
    PHP:
    ;extension=php_bz2.dll
    ;extension=php_curl.dll
    ;extension=php_fileinfo.dll
    ;extension=php_gd2.dll
    ;extension=php_gettext.dll
    ;extension=php_gmp.dll
    ;extension=php_intl.dll
    ;extension=php_imap.dll
    ;extension=php_interbase.dll
    ;extension=php_ldap.dll
    ;extension=php_mbstring.dll
    ;extension=php_exif.dll      ; Must be after mbstring as it depends on it
    ;extension=php_mysql.dll
    ;extension=php_mysqli.dll
    ;extension=php_oci8.dll      ; Use with Oracle 10gR2 Instant Client
    ;extension=php_oci8_11g.dll  ; Use with Oracle 11gR2 Instant Client
    ;extension=php_openssl.dll
    ;extension=php_pdo_firebird.dll
    ;extension=php_pdo_mssql.dll
    ;extension=php_pdo_mysql.dll
    ;extension=php_pdo_oci.dll
    ;extension=php_pdo_odbc.dll
    ;extension=php_pdo_pgsql.dll
    ;extension=php_pdo_sqlite.dll
    ;extension=php_pgsql.dll
    ;extension=php_pspell.dll
    ;extension=php_shmop.dll
  6. Once you are at this point, un-comment (remove the ; symbol) from the following extensions:
    PHP:
    ;extension=php_curl.dll
    ;extension=php_mbstring.dll
    ;extension=php_mysql.dll
    ;extension=php_mysqli.dll
    
    (tell me if i've missed any)
  7. Feel free to change anything you want after this, just try not to break anything! Once you have done so, save the file and go back to the nginx directory.
  8. If you removed the PHP lines from the .bat files just to test the web server, put them back!
  9. Now we need to configure Nginx to communicate with PHP. To make things easier, head over to the /conf folder and replace the contents of your nginx.conf file with this:
    PHP:
    http://pastebin.com/raw.php?i=Hsyd6Xaq
  10. This should configure everything for you. This also includes the rewrites that the CMS requires, similar to what the .htaccess and web.config files do.
  11. Save the file and start the server.
  12. To test that your PHP installation was successful, simply create a file called phpinfo.php under the /html directory with the following:
    PHP:
    <?php phpinfo(); ?>
  13. Save this, and head over to . You should be introduced with a huge page with information about PHP, your server, configuration, etc.
  14. Time for the most important part, the CMS!
logo.png

Installing UberCMS
  1. Extract the contents of the CMS to C:\nginx\html
  2. Edit /includes/configuration/system_config.php
  3. Edit /includes/configuration/ubercms_config.php
  4. Run the SQLs in the text file
  5. Add the `newcrypto` column to the `users` table, enum('1','0') not null default 1;
  6. Run the following SQL into your database:
    PHP:
    [COLOR=#666666][LEFT][URL='http://pastebin.com/raw.php?i=UKBgL7Cp'][COLOR=#53596e]http://pastebin.com/raw.php?i=UKBgL7Cp[/COLOR][/URL][/LEFT][/COLOR]
  7. UberCMS should now be installed and ready to go!
I have probably missed something out so if I have, then just PM me or reply to the thread. Feel free to ask for any help if you need any.

Enjoy ^^
 

Users who are viewing this thread

Top