Jump to content
The Uniform Server Community

Blake Senftner

  • Content Count

  • Joined

  • Last visited

Community Reputation

0 Neutral

About Blake Senftner

  • Rank

Previous Fields

  • Main OS
    Windows Vista

Recent Profile Visitors

3,350 profile views
  1. I don't have information about pecl, but what framework are you using? I ask because its not uncommon for various frameworks to have an imagick control variable, access path, or some facility for telling the framework where the imagick binaries are stored. Check your framework's documentation. If you're working in your own framework, just access the binaries directly.
  2. Hey all, I have a utility function using the zip_archive class that makes directories into zip files. (I've put a copy at the bottom of this post.) Not sure when this broke, because when I wrote and testing the function under a previous version of Coral, it worked fine. Now, however, the zip files created do not uncompress into their contents, but uncompress into another zip file - endlessly, over and over again. Maybe something else is broken, like the unzipping utility built into OSX. If you know of anything like that, please chime in! Anyway, I'm perfectly fine continuing with Coral 8.5.5 unless there's some good reason to upgrade. I've got a product launch in about 4 weeks, and don't really have the time to troubleshoot things going wrong with an upgrade to Coral, unless something important like bug fixes to the zip_archive class are in the upgrade. Thanks for any information you can offer! /********************************************************************************* * recursive zip directory add, just pass in the path to a directory as 'src' and * it's recursive contents are added to the zip archive created at 'destination' */ function _cgrn_front_zipDirectory($source, $destination) { if (!file_exists($source)) { _devReport( '_cgrn_front_zipDirectory: source "'.$source.'" does not exist!' ); return false; } $zip = new ZipArchive(); if (!$zip->open($destination, ZIPARCHIVE::CREATE)) { _devReport( '_cgrn_front_zipDirectory: failed to create zip at "'.$destination.'"!' ); return false; } $source = str_replace('\\', '/', realpath($source)); if (is_dir($source) === true) { $files = new RecursiveIteratorIterator(new RecursiveDirectoryIterator($source), RecursiveIteratorIterator::SELF_FIRST); foreach ($files as $file) { $file = str_replace('\\', '/', realpath($file)); if (is_dir($file) === true) { $zip->addEmptyDir(str_replace($source . '/', '', $file . '/')); } else if (is_file($file) === true) { $zip->addFromString(str_replace($source . '/', '', $file), file_get_contents($file)); } } } else if (is_file($source) === true) { $zip->addFromString(basename($source), file_get_contents($source)); } return $zip->close(); }
  3. I'm using php 4 under Coral 8.4.0. I noticed that the eAccelerator and APC options can't be enabled. When I tried to find them, within the UniServer files, and then online it appears as if they are not available yet for php 4. Is this correct?
  4. Background: I'm tuning a UniServer hosted WebApp and WebAPI, running on Windows Server 2008 R2. Via the Task Manager, I experimented with setting the process priority for apache, mysql & php-cgi to "Above Normal" and saw complex processing task execution times reduce by 30%. This is quite significant. I have successfully rewritten php logic in my WebApp where it launches separate "worker" executables to launch it's WebApp processes at high priority: pclose(popen('start /B /HIGH '.$cmd, 'r' )); // $cmd is the command line to launch my worker exe Additionally, I've tried the following "Windows PowerShell" script to modify the running apache, mysql & php-cgi processes: get-process -processname httpd1 | foreach { $_.PriorityClass = "AboveNormal" } get-process -processname mysqld1 | foreach { $_.PriorityClass = "AboveNormal" } get-process -processname php-cgi | foreach { $_.PriorityClass = "AboveNormal" } This Windows PowerShell script works, but only when executed interactively. I tried executing this from within the WebApp, but it silently does nothing. I took a brief look at the UniServer's "start_as_service.exe" -> "About", and that seems to indicate the "start_as_service.exe" is written in VBA. So, perhaps a variant of this logic could be inserted or added to enable the UniServer's key executables to run with enhanced priority? /* only an example, uniServer version would be affect apache, mysql & php-cgi, with uniServer-admin specified priorities */ Private Sub ProcessIdle() Dim psList() As Process If Process.GetProcessesByName("hl").Length = 0 Then Me.Text = "Waiting for hl.exe" Else Try psList = Process.GetProcesses() For Each p As Process In psList If p.ProcessName = "hl.exe" Then p.PriorityClass = ProcessPriorityClass.Idle End If Next p Catch End Try End If End Sub Thanks for any attention to this you can provide. And double thanks for the UniServer's existence!
  • Create New...