Search Results

Search found 308 results on 13 pages for 'arthur ward'.

Page 3/13 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • Question about creating a sprite based 2-D Side Scroller with scaling/zooming

    - by Arthur
    I'm just wondering if anyone can offer any advice on how best to go about creating a 2-D game with zooming/scaling features akin to the early Samurai Showdown games. In this case it would be a side scroller a la Metal Slug, the zooming would come in as more enemy sprites entered the screen, or when facing a large sized boss. A feature that would be both cosmetic as well as functional to the game. I've done some reading and noticed a few suggestions that included drawing different sized sprites, a standard size and zoomed out size. Any thoughts? Thanks for your time.

    Read the article

  • Not detecting HDD after installing Ubuntu 12.04!

    - by Arthur
    After installing Ubuntu 12.04, which I'm using right now and it works great, my extra hard drive was detected the first time I turned on my computer but then it does not show anymore on my Home Folder, when I run the Disk Utility says that has a few errors but when I try to fix it, says that hard drive is busy and cannot do anything else. I've unmounted it and mounted again but nothing happens. Do you know what can be going on? Cause the first time that I was able to see my hard drive it had all the files I have, but I don't know if deleting the partition will format the whole hard drive or just the ubuntu files. THANKS in advance! BY THE WAY, I'm new to Ubuntu... :S

    Read the article

  • Creating an Interface To a Language's Standard Library?

    - by Nathan Arthur
    In the process of learning test-driven development, I've been introduced to dependency injection and the use of interfaces, and have started using these concepts in my own PHP code in order to make it more testable. There have been times when I've needed to test code that was doing things like calling the PHP time() function. In order to make these tests predictable, it seemed logical to create an interface to the standard PHP functions I use so that I can mock them out in my tests. Is this good software design? What are the pros and cons of doing this? I've found myself groaning at how quickly my PHP interface can stick its fingers into everything I do. Is there a better way to make code that relies on PHP-accessed state and functions more testable?

    Read the article

  • Adobe Air Mobile AS3 app: challenges and how to overcome them?

    - by Arthur Wulf White
    I made a PC flash game for LD 26 - minimalism and I am working on porting it to Android. Some questions I'd like to ask: Is it bad to heavily use vector graphics (ie. this.graphics.lineTo()) in Mobile Air? Does Stencyl completely alleviate this issue? Are there any inherit disadvantages to using Air Mobile that I'm missing? Where is the documentation for Air mobile (I googled and found no recent books or documentation pdf so far)

    Read the article

  • 2d game view camera zoom, rotation & offset using 'Filter' / 'Shader' processing?

    - by Arthur Wulf White
    I wish to add the ability to zoom-in, zoom-out, rotate and move the view in a top-down view over a collection of points and lines in a large 2d map. I split the map into a grid so I only need to render the points that are 'near' the camera. My question is, how do I render a point A(Xp,Yp) assuming the following details: Offset of the camera pov from the origin of the map is: Xc, Yc Meaning the camera center is positioned on top of that point. If there's a point in Xc, Yc it is positioned in the center of the screen. The rotation angle is: alpha The scale is: S Read my answer first. I am thinking there is more optimized solution, thanks. My question is how to include the following improvement: I read in the AS3 Bible book that: In regards to ShaderInput, You can use these methods to coerce Pixel Bender to crunch huge sets of data masquerading as images, without doing too much work on the ActionScript side to make them look like images. Meaning if I am performing the same linear function on a lot of items, I can do it all at once if I use Shaders correctly and save processing time. Does anyone know how that is accomplished? Here is a sample of what I mean: http://wonderfl.net/c/eFp0/

    Read the article

  • HP Bluetooth Mouse Connection Problems

    - by Arthur Upfield
    About a month ago, I turned on my laptop (Ubuntu 14.04 and Windows 8.1 dual boot, though the mouse works fine in Windows), logged in and connected my HP x4000b mouse via a bluetooth dongle (Kinivo BTD-400), and noticed that the battery indicator in Ubuntu said that the mouse battery was at 0%. The day before it was around 30%, so I decided to just change the batteries in the mouse, but after reconnecting with the new batteries, it still said 0%. The mouse connected and worked just fine, so I didn't think much of it. About a week after that, I noticed that my mouse would sometimes disconnect if I didn't use it, but since reconnecting isn't that hard I just decided to leave it. Now it also won't reconnect unless I log out and back in again, which is getting sort of tedious. Is there any way to fix this issue? Any help is appreciated, and I will try and respond to questions ASAP. Thanks.

    Read the article

  • melonJS: Entity and solid block on collision layer

    - by Arthur Halma
    Actually I have my player entity with 64x64 sprite animation and 18x60 hitbox also the map is maded by 16x16 tiles. When my player goes some way he can pass through blocks (but not all of them). For example there are 4 situations: Good (player can't pass the tile with isSolid property on collision layer) Good (player can't pass the tile with isSolid property on collision layer) Bad (player pass the tile with isSolid property on collision layer) Bad (player pass the tile with isSolid property on collision layer) Looks like melonJS checks only corners of hitbox instead of whole rectangle. Can anyone help me in this situation.

    Read the article

  • What's with the unicorns?

    - by Ward
    And don't tell me this is meta and should only be discussed over there. It's happened here, there should be an answer here. I guess that in UTC it's April 1, but it's a huge distraction.

    Read the article

  • Dvorak hotkey remapping in vim, worth it?

    - by Bryan Ward
    I've been trying to learn the dvorak keyboard layout of late and I have been making some good progress this time around. The trouble I am finding now is that all of my hotkeys are all in the wrong places. As a vim user this is particularly troubling. I have found good resources to switch the bindings back so that they are in the places in vim, but I wonder if this is worth it. I also use set -o vi in my ~/.zshrc file so that I can use the familiar bindings in the terminal as well. hjkl navigation is also featured in a number of other applications such as less. For those of you out there who have successfully made the switch, is it worth remapping things to be familiar again, or is it better in the long run to just deal with weirdly placed hotkeys?

    Read the article

  • ATI Eyefinity under linux

    - by Bryan Ward
    I know that the new 5xxx series cards from ATI are capable of powering up to 6 monitors, but I was curious if anyone had any such luck setting this up under linux. I actually only have three monitors that I am interested in using, but three is the point where the previous generation video cards started to get a little buggy as a result of needing multiple video cards. Is the linux support for this capability any good at this point, or is the Eyefinity support really only for windows at this time.

    Read the article

  • "Add correct host key in known_hosts" / multiple ssh host keys per hostname?

    - by Samuel Edwin Ward
    Trying to ssh into a computer I control, I'm getting the familiar message: @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY! Someone could be eavesdropping on you right now (man-in-the-middle attack)! It is also possible that a host key has just been changed. The fingerprint for the RSA key sent by the remote host is [...]. Please contact your system administrator. Add correct host key in /home/sward/.ssh/known_hosts to get rid of this message. Offending RSA key in /home/sward/.ssh/known_hosts:86 RSA host key for [...] has changed and you have requested strict checking. Host key verification failed. I did indeed change the key. And I read a few dozen postings saying that the way to resolve this problem is by deleting the old key from the known_hosts file. But what I would like is to have ssh accept both the old key and the new key. The language in the error message ("Add correct host key") suggests that there should be some way to add the correct host key without removing the old one. I have not been able to figure out how to add the new host key without removing the old one. Is this possible, or is the error message just extremely misleading?

    Read the article

  • Move to next selection in Word 2007

    - by Arthur Ward
    When I have multiple selections in a Word 2007 document, such as after selecting all instances of a style, how can I move from one selection to the next? When you issue the select all instances command, the view snaps to the next instance of the style, but how can I find the other instances? Any cursor key will unselect everything. Using the mouse to scroll through the document is not feasible for large documents, plus the selection could be a single character -- very easy to miss!

    Read the article

  • Logging to MySQL without empty rows/skipped records?

    - by Lee Ward
    I'm trying to figure out how to make Squid proxy log to MySQL. I know ACL order is pretty important but I'm not sure if I understand exactly what ACLs are or do, it's difficult to explain, but hopefully you'll see where I'm going with this as you read! I have created the lines to make Squid interact with a helper in squid.conf as follows: external_acl_type mysql_log %LOGIN %SRC %PROTO %URI php /etc/squid3/custom/mysql_lg.php acl ex_log external mysql_log http_access allow ex_log The external ACL helper (mysql_lg.php) is a PHP script and is as follows: error_reporting(0); if (! defined(STDIN)) { define("STDIN", fopen("php://stdin", "r")); } $res = mysql_connect('localhost', 'squid', 'testsquidpw'); $dbres = mysql_select_db('squid', $res); while (!feof(STDIN)) { $line = trim(fgets(STDIN)); $fields = explode(' ', $line); $user = rawurldecode($fields[0]); $cli_ip = rawurldecode($fields[1]); $protocol = rawurldecode($fields[2]); $uri = rawurldecode($fields[3]); $q = "INSERT INTO logs (id, user, cli_ip, protocol, url) VALUES ('', '".$user."', '".$cli_ip."', '".$protocol."', '".$uri."');"; mysql_query($q) or die (mysql_error()); if ($fault) { fwrite(STDOUT, "ERR\n"); }; fwrite(STDOUT, "OK\n"); } The configuration I have right now looks like this: ## Authentication Handler auth_param ntlm program /usr/bin/ntlm_auth --helper-protocol=squid-2.5-ntlmssp auth_param ntlm children 30 auth_param negotiate program /usr/bin/ntlm_auth --helper-protocol=squid-2.5-basic auth_param negotiate children 5 # Allow squid to update log external_acl_type mysql_log %LOGIN %SRC %PROTO %URI php /etc/squid3/custom/mysql_lg.php acl ex_log external mysql_log http_access allow ex_log acl localnet src 172.16.45.0/24 acl AuthorizedUsers proxy_auth REQUIRED acl SSL_ports port 443 acl Safe_ports port 80 # http acl Safe_ports port 21 # ftp acl Safe_ports port 443 # https acl CONNECT method CONNECT acl blockeddomain url_regex "/etc/squid3/bl.acl" http_access deny blockeddomain deny_info ERR_BAD_GENERAL blockeddomain # Deny requests to certain unsafe ports http_access deny !Safe_ports # Deny CONNECT to other than secure SSL ports http_access deny CONNECT !SSL_ports # Allow the internal network access to this proxy http_access allow localnet # Allow authorized users access to this proxy http_access allow AuthorizedUsers # FINAL RULE - Deny all other access to this proxy http_access deny all From testing, the closer to the bottom I place the logging lines the less it logs. Oftentimes, it even places empty rows in to the MySQL table. The file-based logs in /var/log/squid3/access.log are correct but many of the rows in the access logs are missing from the MySQL logs. I can't help but think it's down to the order I'm putting lines in because I want to log everything to MySQL, unauthenticated requests, blocked requests, which category blocked a specific request. The reason I want this in MySQL is because I'm trying to have everything managed via a custom web-based frontend and want to avoid using any shell commands and access to system log files if I can help it. The end result is to make it as easy as possible to maintain without keeping staff waiting on the phone whilst I add a new rule and reload the server! Hopefully someone can help me out here because this is very much a learning experience for me and I'm pretty stumped. Many thanks in advance for any help!

    Read the article

  • Multi-monitor aterm transparency

    - by Bryan Ward
    I have 3 monitors which I set the background with using xpmroot my-5760x1200bg.png I then setup aterm to use transparency by adding the following to my ~/.Xdefaults file. aterm*transparent:true aterm*shading:60 aterm*background:Black aterm*foreground:White aterm*scrollBar:true aterm*scrollBar_right:true aterm*transpscrollbar:true aterm*saveLines:32767 aterm*font:*-*-fixed-medium-r-normal--*-140-*-*-*-*-iso8859-1 aterm*boldFont:*-*-fixed-bold-r-normal--*-*-140-*-*-*-*-iso8859-1 I am getting transparency on my aterm windows, but the image that is coming through with the transparency isn't correct. On the left monitor things are fine, but the middle and right monitors both seem to use the leftmost 1920x1200 of the background image as what is behind the terminal window. It would be as if every screen had the same background as the monitor on the left. Is this something that can be configured to be correct, or is this a bug? I'm running Gentoo Linux with Xmonad.

    Read the article

  • Worst SysAdmin Accident

    - by Ward
    In line with the question about Best sysadmin accident, what's the worst accident you've been involved in? Unlike the previous question, I mean "worst" in the sense of most system damage or actual harm to people. I'll start with mine: We have two remote wiring closets that are at the end of a 100-foot corridor which has a metal grate for the floor. After we had Cat6 cable installed, the contractors cleaned up all the debris that dropped through the grating to the concrete 3 feet below. A co-worker and I entered the corridor to check on the progress one day but were distracted and didn't notice that a piece of grating had been moved aside. My buddy stepped into air and his chest slammed into the steel crossbar. He was winded and sore enough to take a couple days off, but luckily the steel beam had rounded edges and the size of the opening was such that he didn't smack his head into it or the floor below. Obviously we learned that areas where the floor is partially removed need to be flagged.

    Read the article

  • linux hardware raid 10 / lvm / virtual machine partition alignment and filesystem optimization

    - by Jason Ward
    I've been reading everything I can find about partition alignment and filesystem optimization (ext4 and xfs) but still don't know enough to be confident in setting up my current configuration. My remaining confusion comes from the LVM layer and if I should use raid parameters on the filesystem in guest os'es. My main questions are: When I use 'pvcreate --dataalignment' do I use the stripe-width as calculated for a filesystem on RAID (128kB for ext4 in my situation), the Stripe size of the RAID set (256kB), something else altogether, or do I not need this? When I create ext2/3/4 or xfs filesystems in guests on the Logical Volumes, should I add the settings for the underlying RAID (e.g. mkfs.ext4 -b 4096 -E stride=64,stripe-width=128)? Does anyone see any glaring errors in my set up below? I'm running some benchmarks now but haven't done enough to start comparing results. I have four drives in RAID 10 on a 3ware 9750-4i controller (more details on the settings below) giving me a 6.0TB device at /dev/sda. Here is my partition table: Model: LSI 9750-4i DISK (scsi) Disk /dev/sda: 5722024MiB Sector size (logical/physical): 512B/512B Partition Table: gpt Number Start End Size File system Name Flags 1 1.00MiB 257MiB 256MiB ext4 BOOTPART boot 2 257MiB 4353MiB 4096MiB linux-swap(v1) 3 4353MiB 266497MiB 262144MiB ext4 4 266497MiB 4460801MiB 4194304MiB Partition 1 is to be the /boot partition for my xen host. Partition 2 is swap. Partition 3 is to be the root (/) for my xen host. Partition 4 is to be (the only) physical volume to be used by LVM (for those who are counting, I left about 1.2TB unallocated for now) For my Xen guests, I usually create a Logical Volume of the needed size and present it to the guests for them to partition as needed. I know there are other ways of handling that but this method works best for my situation. Here's the hardware of interest on my CentOS 6.3 Xen Host: 4x Seagate Barracuda 3TB ST3000DM001 Drives (sector size: 512 logical/4096 physical) 3ware 9750-4i w/BBU (sector size reported: 512 logical/512 physical) All four drives make up a RAID 10 array. Stripe: 256kB Write Cache enabled Read Cache: intelligent StoreSave: Balance Thanks!

    Read the article

  • how to I change the owner of a folder on my server?

    - by Ashley Ward
    OK I'll be more specific - I have uploaded a bunch of folders via ftp. These now all have the the owner name of the account which I logged into FTP using. How do I change the owner to be the server name? and How do I find out what name the server is using? I'm pretty new to server permissions and the like, so please be gentle :) BTW, I'm using a linux server.

    Read the article

  • Hosted application, DNS server setup?

    - by Ward Loockx
    Currently I'm allowing users to have an hosted application. Currently they have to point A-records to our servers (sometimes this is to hard or get's messy). I've seen other players using 2 dns servers, so that the user only needs to change these. I'm willing to implement this, but a lot of questions come up. What should I use for this? Can I use bind? The records need to be generated from a mysql database What type of servers do I need? Is a DNS server taking a lot of load? Currently having around 80K daily visitors. Thanks!

    Read the article

  • Mysql - innoDb - is in the future! Current system log sequence number

    - by Ward Loockx
    I have this error in my syslog. I restored an older dump to solve this problem, after some reading. Now The errors in syslog are far less than before. But still a few times an hour I get Sep 1 14:23:29 homer mysqld: 120901 14:23:29 InnoDB: Error: page 96637 log sequence number 7 1223357717 Sep 1 14:23:29 homer mysqld: InnoDB: is in the future! Current system log sequence number 6 647303887. Sep 1 14:23:29 homer mysqld: InnoDB: Your database may be corrupt or you may have copied the InnoDB Sep 1 14:23:29 homer mysqld: InnoDB: tablespace but not the InnoDB log files. See Sep 1 14:23:29 homer mysqld: InnoDB: http://dev.mysql.com/doc/refman/5.1/en/forcing-recovery.html Sep 1 14:23:29 homer mysqld: InnoDB: for more information. Sep 1 14:23:29 homer mysqld: 120901 14:23:29 InnoDB: Error: page 96638 log sequence number 8 150027924 Sep 1 14:23:29 homer mysqld: InnoDB: is in the future! Current system log sequence number 6 647303887. Sep 1 14:23:29 homer mysqld: InnoDB: Your database may be corrupt or you may have copied the InnoDB Sep 1 14:23:29 homer mysqld: InnoDB: tablespace but not the InnoDB log files. See Sep 1 14:23:29 homer mysqld: InnoDB: http://dev.mysql.com/doc/refman/5.1/en/forcing-recovery.html Sep 1 14:23:29 homer mysqld: InnoDB: for more information. Sep 1 14:23:29 homer mysqld: 120901 14:23:29 InnoDB: Error: page 96639 log sequence number 7 4208567151 Sep 1 14:23:29 homer mysqld: InnoDB: is in the future! Current system log sequence number 6 647303887. Sep 1 14:23:29 homer mysqld: InnoDB: Your database may be corrupt or you may have copied the InnoDB Sep 1 14:23:29 homer mysqld: InnoDB: tablespace but not the InnoDB log files. See Sep 1 14:23:29 homer mysqld: InnoDB: http://dev.mysql.com/doc/refman/5.1/en/forcing-recovery.html Sep 1 14:23:29 homer mysqld: InnoDB: for more information. Anybody that knows how I can track what database is causing this issue? And how to fix?

    Read the article

  • .htaccess to restrict access to only select files

    - by Bryan Ward
    I have a directory in my webserver for which I would like to serve up only pdf files. I found I can restrict access using the .htaccess, and using something like <FilesMatch "\.(text,doc)"> Order allow,deny Deny from all Satisfy All </FilesMatch> to serve up everything except a regular expression. Is it possible to instead restrict access to only files which meet some regular expression?

    Read the article

  • lvm mirroring space unavailable.

    - by Bryan Ward
    I am trying to migrate my data on lvm to two new disks, and setup mirroring between the two. I have successfully migrated all of the data to the first of the two disks, leaving the second one completely available as a mirror. I verified this using pvdisplay -m /dev/sd{g,h}1 --- Physical volume --- PV Name /dev/sdg1 VG Name vg PV Size 931.51 GiB / not usable 3.19 MiB Allocatable yes PE Size 4.00 MiB Total PE 238466 Free PE 82866 Allocated PE 155600 PV UUID v2nc3j-EFBR-QpuG-xgro-Rm59-fmu6-IB3QcR --- Physical Segments --- Physical extent 0 to 49999: Logical volume /dev/vg/videos Logical extents 0 to 49999 Physical extent 50000 to 99999: Logical volume /dev/vg/home Logical extents 0 to 49999 Physical extent 100000 to 129999: Logical volume /dev/vg/music Logical extents 0 to 29999 Physical extent 130000 to 155599: Logical volume /dev/vg/videos Logical extents 50000 to 75599 Physical extent 155600 to 238465: FREE --- Physical volume --- PV Name /dev/sdh1 VG Name vg PV Size 931.51 GiB / not usable 3.19 MiB Allocatable yes PE Size 4.00 MiB Total PE 238466 Free PE 238466 Allocated PE 0 PV UUID LuTrem-WcsZ-qw7l-2CDS-lLKI-wdq0-QEXhLf --- Physical Segments --- Physical extent 0 to 238465: FREE Then when I try to mirror the home logical volume for example, it says that I do not have sufficient space. I used lvconvert -m1 vg/home and the output was: Insufficient suitable allocatable extents for logical volume : 50000 more required Unable to allocate extents for mirror(s). This puzzling to me because it appears as if there is plenty of space on the second disk to mirror. Is there something I have done wrong here? Or is there a way to explicitly tell LVM where to put each leg of the mirror? I'm using lvm2.

    Read the article

  • Upgrade Ubuntu linux-virtual on EC2

    - by James Ward
    I have an Ubuntu 10.10 EBS boot server on EC2. There are new updates available for it: linux-image-virtual linux-virtual Is it even ok to upgrade those packages on an EC2 server? When I do try to upgrade them I get: The following packages have been kept back: linux-image-virtual linux-virtual Should I do a dist-upgrade or something to force it? Will my instance be able to be rebooted?

    Read the article

  • Mysql innoDB corruption after server crash

    - by Ward Loockx
    Yesterday my server died because an outage in the data center. Today it's back up, but having some problems with mysql. First of all my mysql server was not able to start. For this reason I deleted the files ib_logfile0 and ib_logfile1 in /var/lib/mysql folder (I still have the old failing files). After this my server was able to startup again. But now I see a lot of issues in the mysql log file. Sep 1 09:43:55 * mysqld: 120901 9:43:55 InnoDB: Error: page 70944 log sequence number 8 1483471899 Sep 1 09:43:55 * mysqld: InnoDB: is in the future! Current system log sequence number 5 612394935. Sep 1 09:43:55 * mysqld: InnoDB: Your database may be corrupt or you may have copied the InnoDB Sep 1 09:43:55 * mysqld: InnoDB: tablespace but not the InnoDB log files. See Sep 1 09:43:55 * mysqld: InnoDB: http://dev.mysql.com/doc/refman/5.1/en/forcing-recovery.html When I check the docs on mysql.com, I found that I need to recover my database with backups. I have a backup but not sure what's the good way on importing it. Or is there a way to recover without having to re-import the database again? So if I'm correct I need to put innodb_force_recovery to 4 in mysql and delete all current data and re-import? Is there a way to do this without having downtime? I also have one slave running. This slave has the current status now: Last_Error: Relay log read failure: Could not parse relay log event entry. The possible reasons are: the master's binary log is corrupted (you can check this by running 'mysqlbinlog' on the binary log), the slave's relay log is corrupted (you can check this by running 'mysqlbinlog' on the relay log), a network problem, or a bug in the master's or slave's MySQL code. If you want to check the master's binary log or slave's relay log, you will be able to know their names by issuing 'SHOW SLAVE STATUS' on this slave. How can I totally reset the slave after the new import on the master has happend? Hopefully we can find a solution without not to much downtime. Thanks!

    Read the article

  • Limit user to one CPU core in windows 7

    - by Dean Ward
    I let my family members use my pc over rdp to play their flash-based games as their laptops overheat if they use them directly. I have it setup so I can use the pc at the same time as them. The pc has a quad core cpu and I would like to be able to assign one of those cores to the user logged in via RDP so that the other 3 cores are left alone. Is this possible? They login via a specific user account setup for the purpose. Thanks for any advice!

    Read the article

  • Squid - Logging to MySQL without empty rows/skipped records?

    - by Lee Ward
    I'm trying to figure out how to make Squid proxy log to MySQL. I know ACL order is pretty important but I'm not sure if I understand exactly what ACLs are or do, it's difficult to explain, but hopefully you'll see where I'm going with this as you read! I have created the lines to make Squid interact with a helper in squid.conf as follows: external_acl_type mysql_log %LOGIN %SRC %PROTO %URI php /etc/squid3/custom/mysql_lg.php acl ex_log external mysql_log http_access allow ex_log The external ACL helper (mysql_lg.php) is a PHP script and is as follows: error_reporting(0); if (! defined(STDIN)) { define("STDIN", fopen("php://stdin", "r")); } $res = mysql_connect('localhost', 'squid', 'testsquidpw'); $dbres = mysql_select_db('squid', $res); while (!feof(STDIN)) { $line = trim(fgets(STDIN)); $fields = explode(' ', $line); $user = rawurldecode($fields[0]); $cli_ip = rawurldecode($fields[1]); $protocol = rawurldecode($fields[2]); $uri = rawurldecode($fields[3]); $q = "INSERT INTO logs (id, user, cli_ip, protocol, url) VALUES ('', '".$user."', '".$cli_ip."', '".$protocol."', '".$uri."');"; mysql_query($q) or die (mysql_error()); if ($fault) { fwrite(STDOUT, "ERR\n"); }; fwrite(STDOUT, "OK\n"); } The configuration I have right now looks like this: ## Authentication Handler auth_param ntlm program /usr/bin/ntlm_auth --helper-protocol=squid-2.5-ntlmssp auth_param ntlm children 30 auth_param negotiate program /usr/bin/ntlm_auth --helper-protocol=squid-2.5-basic auth_param negotiate children 5 # Allow squid to update log external_acl_type mysql_log %LOGIN %SRC %PROTO %URI php /etc/squid3/custom/mysql_lg.php acl ex_log external mysql_log http_access allow ex_log acl localnet src 172.16.45.0/24 acl AuthorizedUsers proxy_auth REQUIRED acl SSL_ports port 443 acl Safe_ports port 80 # http acl Safe_ports port 21 # ftp acl Safe_ports port 443 # https acl CONNECT method CONNECT acl blockeddomain url_regex "/etc/squid3/bl.acl" http_access deny blockeddomain deny_info ERR_BAD_GENERAL blockeddomain # Deny requests to certain unsafe ports http_access deny !Safe_ports # Deny CONNECT to other than secure SSL ports http_access deny CONNECT !SSL_ports # Allow the internal network access to this proxy http_access allow localnet # Allow authorized users access to this proxy http_access allow AuthorizedUsers # FINAL RULE - Deny all other access to this proxy http_access deny all From testing, the closer to the bottom I place the logging lines the less it logs. Oftentimes, it even places empty rows in to the MySQL table. The file-based logs in /var/log/squid3/access.log are correct but many of the rows in the access logs are missing from the MySQL logs. I can't help but think it's down to the order I'm putting lines in because I want to log everything to MySQL, unauthenticated requests, blocked requests, which category blocked a specific request. The reason I want this in MySQL is because I'm trying to have everything managed via a custom web-based frontend and want to avoid using any shell commands and access to system log files if I can help it. The end result is to make it as easy as possible to maintain without keeping staff waiting on the phone whilst I add a new rule and reload the server! Hopefully someone can help me out here because this is very much a learning experience for me and I'm pretty stumped. Many thanks in advance for any help!

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >