Jump to content
The Uniform Server Community

page2pagepro

Member
  • Posts

    8
  • Joined

  • Last visited

Previous Fields

  • Main OS
    Windows XP

page2pagepro's Achievements

Newbie

Newbie (1/14)

  • Week One Done Rare
  • One Month Later Rare
  • One Year In Rare

Recent Badges

0

Reputation

  1. New Thread Posted http://forum.uniformserver.com/index.php?showtopic=1923
  2. New Thread Created - http://forum.uniformserver.com/index.php?showtopic=1923
  3. Sorry all. I had a brain-fart and these steps are incorrect. When installing mod_aspdotnet-2.2.0.2006-setup-r2.msi, several required files are installed in the %windir%. By Uninstalling the mod from add/remove, these files are of course removed and you will receive Apache Error: RunTime Error! Program: .....Apache.exe This application as requested the Runtime to terminate it in an unusual way. Please contact the application's supoprt team for more information. Solution: Assuming %top% is the root of your installation folder containing the Start.exe Download and extract mod_asp.zip to %top%\mod_asp Run %top%\mod_asp\Install.bat %top%\mod_asp\Uninstall.bat will undo the previous leaving no trace on PC. mod_asp.zip
  4. ADDITION to %top%/usr/local/apache2/conf/httpd.conf #asp.net LoadModule aspdotnet_module "modules/mod_aspdotnet.so" AddHandler asp.net asax ascx ashx asmx aspx axd config cs csproj licx rem resources resx soap vb vbproj vsdisco webinfo <IfModule mod_aspdotnet.cpp> # Mount the ASP.NET /asp application AspNetMount /asp "%top%/www/asp" #/SampleASP is the alias name for asp.net to execute #"c:/SampleASP" is the actual execution of files/folders in that location # Map all requests for /asp to the application files Alias /asp "%top%/www/asp" #maps /SampleASP request to "c:/SampleASP" #now to get to the /SampleASP type http://localhost/SampleASP #It'll redirect http://localhost/SampleASP to "c:/SampleASP" # Allow asp.net scripts to be executed in the /SampleASP example <Directory "%top%/www/asp"> Options FollowSymlinks ExecCGI Order allow,deny Allow from all DirectoryIndex index.htm index.aspx #default the index page to .htm and .aspx </Directory> # For all virtual ASP.NET webs, we need the aspnet_client files # to serve the client-side helper scripts. AliasMatch /aspnet_client/system_web/(\d+)_(\d+)_(\d+)_(\d+)/(.*) "C:/Windows/Microsoft.NET/Framework/v$1.$2.$3/ASP.NETClientFiles/$4" <Directory "C:/Windows/Microsoft.NET/Framework/v*/ASP.NETClientFiles"> Options FollowSymlinks Order allow,deny Allow from all </Directory> </IfModule> #asp.net %top%/www/asp/Hello-World.aspx Dim I ' declare our loop index variable %> <% ' Start the loop telling it to loop from 1 to 5 incrementing ' I by one (which is the default) on each pass. ' ' ie. this would have done the same thing: ' For I = 1 To 5 For I = 1 To 5 Step 1 ' Output our HTML and text using the value of I as ' the FONT TAG's SIZE attribute. %> <FONT SIZE="<%= I %>">Hello World</FONT><BR> <% Next ' Bounce back to the top of the loop %>
  5. Purpose is to improve the native phpinfo() function to something a bit more specialized. Assumed %top% to be UniServer Root Installation folder/directory Replace code in file %top%\home\admin\www\phpinfo.php with: <?php /**************************************************************************\ Contributors: http://nevstokes.com/blog/2009/06/23/a-better-phpinfo/ http://www.page2pagepro.com/a-better-phpinfo/ \**************************************************************************/ $options = array('CONFIGURATION', 'ENVIRONMENT', 'MODULES', 'EXTENSIONS', 'VARIABLES', 'GENERAL', 'CREDITS', 'LICENSE', 'ALL'); $display = (empty($_GET['display']) || !in_array(strtoupper($_GET['display']), $options)) ? 'ALL' : strtoupper($_GET['display']); $navigation = array(); foreach($options as $key=>$value) { $navigation[] = ($value != $display) ? '<a href="' . $_SERVER['SCRIPT_NAME'] . '?display=' . $value . '">' . $value . '</a>' : '<strong>' . $value . '</strong>'; } ob_start(); switch($display) { case 'CONFIGURATION': phpinfo(INFO_CONFIGURATION); break; case 'ENVIRONMENT': phpinfo(INFO_ENVIRONMENT); break; case 'MODULES': phpinfo(INFO_MODULES); break; case 'VARIABLES': phpinfo(INFO_VARIABLES); break; case 'GENERAL': phpinfo(INFO_GENERAL); break; case 'EXTENSIONS': case 'CREDITS': phpinfo(INFO_CREDITS); break; case 'LICENSE': phpinfo(INFO_LICENSE); break; case 'ALL': default: phpinfo(); break; } $content = ob_get_clean(); if (($display) == 'EXTENSIONS') { $str = '<body><div class="center">'; $content = substr($content, 0, strpos("$content$str", $str)+strlen($str)); ob_start(); echo '<h2>Overview</h2>'.PHP_EOL; echo '<table border="0" cellpadding="3" width="600">'.PHP_EOL; echo '<tr><td class="e">Extensions</td><td class="v">'.PHP_EOL; $exts = array(); foreach (get_loaded_extensions() as $ext) { $exts[] = $ext; } echo implode(', ', $exts).PHP_EOL; echo '</td></tr></table><br />'.PHP_EOL; echo '<h2>Details</h2>'.PHP_EOL; echo '<table border="0" cellpadding="3" width="600">'.PHP_EOL; foreach ($exts as $ext) { echo '<tr><td class="e">'.$ext.'</td><td class="v">'; $funcs = array(); foreach (get_extension_funcs($ext) as $func) { $funcs[] = $func; } echo implode(', ', $funcs).PHP_EOL; echo '</td></tr>'.PHP_EOL; } echo '</table><br />'.PHP_EOL; echo '</div></body></html>'.PHP_EOL; $content .= ob_get_contents(); ob_end_clean(); } echo str_replace('<body>', '</body><body><div class="center options"><p>' . implode(' | ', $navigation) .'</p></div>', $content); ?> Code is found with syntax-highlighting (Geshi) at Page2PagePro.com Please let me know if you have any other additions to this project. Thanx!
  6. The purpose of this article is to allow XSL support on UniServer PHP For this document - Assume %top% to be root of the UniServer Installation Folder For reference I am using Nano 5.6.5 Version housing PHP 5.3.2 From my research, UniServer implements PHP Thread-Safe x86 VC6. Steps: Download php-5.3.2-Win32-VC6-x86.zip Extract ext/php_xsl.dll from zip to %top/usr/local/php/extensions Remove semi-colon from line ;extension=php_xsl.dll in files:php.ini php.ini_delvelopment_nano php.ini_production_nano php-cli.ini is OPTIONAL for Command-Line-Interface. Add the line if required. [*]Test - I used the files listed on XSL-PHP Example Please provide comments if a more efficient method is introduced.
  7. Tested to work with 'hello-world.aspx'. Here are my steps for getting ASP to work with Uniform Server 5.6.5 Variables used for this how-to. %top% is assumed your path to the root of UniServer Installation Temporarily rename %top%\usr\local\apache2\bin\Apache.exe to httpd.exe Download mod_aspdotnet-2.2.0.2006-setup-r2.msi Install module to %top%\usr\local\apache2 (All this does is install mod_aspdotnet.so to apache2\modules folder and adds manual to apache2\manual, and of course adds registry entries) Make a copy of mod_aspdotnet.so to _mod_aspdotnet.so Uninstall "mod_aspdotnet for Apache HTTP Server 2.2" - removing 'all' trace from the computer. Rename _mod_aspdotnet.so to mod_aspdotnet.so Rename httpd.exe back to Apache.exe Add following to the BOTTOM of your %top%\usr\local\apache2\conf\httpd.conf#asp.net LoadModule aspdotnet_module "modules/mod_aspdotnet.so" AddHandler asp.net asax ascx ashx asmx aspx axd config cs csproj licx rem resources resx soap vb vbproj vsdisco webinfo <IfModule mod_aspdotnet.cpp> # Mount the ASP.NET /asp application AspNetMount /asp "%top%/www/asp" #/SampleASP is the alias name for asp.net to execute #"c:/SampleASP" is the actual execution of files/folders in that location # Map all requests for /asp to the application files Alias /asp "%top%/www/asp" #maps /SampleASP request to "c:/SampleASP" #now to get to the /SampleASP type http://localhost/SampleASP #It'll redirect http://localhost/SampleASP to "c:/SampleASP" # Allow asp.net scripts to be executed in the /SampleASP example <Directory "%top%/www/asp"> Options FollowSymlinks ExecCGI Order allow,deny Allow from all DirectoryIndex index.htm index.aspx #default the index page to .htm and .aspx </Directory> # For all virtual ASP.NET webs, we need the aspnet_client files # to serve the client-side helper scripts. AliasMatch /aspnet_client/system_web/(\d+)_(\d+)_(\d+)_(\d+)/(.*) "C:/Windows/Microsoft.NET/Framework/v$1.$2.$3/ASP.NETClientFiles/$4" <Directory "C:/Windows/Microsoft.NET/Framework/v*/ASP.NETClientFiles"> Options FollowSymlinks Order allow,deny Allow from all </Directory> </IfModule> #asp.net [*]Restart Server [*]Place your hello-world.aspx in folder %top%/www/asp [*]Please provide feedback if you find a simpler method. I have not tested beyond *BASIC* functionality of the mod. Please, if you have an involved ASP script, please try it out and share your results. thanx!
  8. G'day! I how found that hard-coding Drive letter in config files (httpd.conf, ssl.conf, my.ini, php.ini, etc.) can lead to issues when you migrate a USB-key installation to another PC. I work on projects on multiple PC's and wanted the system to recognize what relative path it was on, then adjust according. My solution is as follows (If anyone has alternative and/or better solution, please share): This is for Windows 9X, 2K and XP (Vista not verified) Step 1: Install like normal Step 2: Change references to %drive-letter%:/ to simply a backslash in 'main' config files Step 3: Create Start.bat file in UniServer Folder on USB drive with following lines: @echo off pushd %~dp0 start %~dp0Start.exe popd Step 4: Create autorun.inf in root of USB drive with following lines: [autorun] open=UniServer\Start.bat icon=UniServer\Start.exe action=Start Uniform Server LABEL=UniServer UseAutoPlay=1 Step 5: Done! Explanation: The reason we create the autorun.inf is to allow a custom auto-run. The reason we use the batch file in lieu of the executable is that I've experienced that accessing the Start.exe directly from the autorun.inf is unsuccessful. I believe it may have to do with the way the CWD (current working directory) info is relayed to the executable from the autorun file. The batch file switches to current directory and 'pops' it back to normal. I realise this is kinda a hack, but I can dynamically change drive letter of the USB-key on any PC and with I insert the key, the autorun.inf works without a hiccup. Thank you for your time! -page2pagepro.com
×
×
  • Create New...