$theTitle=wp_title(" - ", false); if($theTitle != "") { ?> } else { ?> } ?>
by Andrew Johnstone
In: General
20 Dec 2005Expanding on a tip from the previous post, I quite often will have conversations over msn messenger in the morning and forgett to mail myself the logs of how to do things. Heres one way to access your logs or attach a file system.
On the server, create a Share with write permissions in my instance I have named the folder ShareMSMessengerLogs
On the client machine execute the following command.
NET USE H: \\70.84.243.42\Share
This will then prompt you for a username and password, enter the credentials for the server, although I wouldn’t recommend using your administrator account and also it does not matter what drive you attach this too as long as it is not taken, in this instance I have used drive H:
The password or user name is invalid for \\70.84.243.42\Share. Enter the user name for '70.84.243.42': Administrator Enter the password for 70.84.243.42: The command completed successfully.
Now set the path in MSN Messenger to the path of the network drive H:
In: General
19 Dec 2005I just came across this about Friends Reunited web site for £120 million on informitv, not bad considering it was a established from their back room
ITV acquires Friends web site for 120 million pounds
ITV, the UK commercial television company, has acquired the Friends Reunited web site from its founders for £120 million in cash and shares.Friends Reunited, a web site that links people through their former schools, colleges and employers, was originally established by Steve and Julie Pankhurst from the spare bedroom of their suburban semi in north London.
…
The company expects to turnover £12 million in the year 2005, with earnings of £6 million before tax.
In: General
19 Dec 2005Everyone has their own way of doing things, whether its through one short cut or another, anyway heres some quick tips. If you have any submit them below, i’m sure I we all still have plenty to learn.
Minimise Outlook to Systray…
Windows Registry Editor Version 5.00 [HKEY_CURRENT_USER\Software\Microsoft\Office\11.0\Outlook\Preferences] "MinToTray"=dword:00000001
MAP Network drives, including Samba from the command line.
NET VIEW \\PC192 \\PC193 \\SVR50 \\SVR51 \\SVR52 \\SVR57 \\SVR59
NET USE P: \\127.0.0.1/Projects
Get general SystemInformation command line
systeminfo
Copy local DNS from a server, if you don’t have a DNS server from the command line.
copy \ \SVR69 \netlogon \hosts %systemroot% \system32 \drivers \etc \hosts
Running admin commands on a workstation from the command line
runas /u:127.0.0.1 \administrator cmd.exe
Lookup Name Server information including TTL from the command line.
nslookup Default Server: Address: 192.168.2.1 > set d2 > set domain=ajohnstone.com > set type=all > ls Server: Address: 192.168.2.1 ------------ SendRequest(), len 35 HEADER: opcode = QUERY, id = 2, rcode = NOERROR header flags: query, want recursion questions = 1, answers = 0, authority records = 0, additional = 0 QUESTIONS: ls.ajohnstone.com, type = ANY, class = IN ------------ ------------ Got answer (97 bytes): HEADER: opcode = QUERY, id = 2, rcode = NOERROR header flags: response, want recursion, recursion avail. questions = 1, answers = 1, authority records = 2, additional = 0 QUESTIONS: ls.ajohnstone.com, type = ANY, class = IN ANSWERS: -> ls.ajohnstone.com type = A, class = IN, dlen = 4 internet address = 70.85.198.202 ttl = 86371 (23 hours 59 mins 31 secs) AUTHORITY RECORDS: -> ajohnstone.com type = NS, class = IN, dlen = 16 nameserver = ns.aplosmedia.com ttl = 86166 (23 hours 56 mins 6 secs) -> ajohnstone.com type = NS, class = IN, dlen = 6 nameserver = ns2.aplosmedia.com ttl = 86166 (23 hours 56 mins 6 secs) ------------ Non-authoritative answer: ls.ajohnstone.com type = A, class = IN, dlen = 4 internet address = 70.85.198.202 ttl = 86371 (23 hours 59 mins 31 secs) ajohnstone.com type = NS, class = IN, dlen = 16 nameserver = ns.aplosmedia.com ttl = 86166 (23 hours 56 mins 6 secs) ajohnstone.com type = NS, class = IN, dlen = 6 nameserver = ns2.aplosmedia.com ttl = 86166 (23 hours 56 mins 6 secs) >
Display DNS Cache, Flush DNS, Release IP Address, and Renew IP Address from the command line.
ipconfig /displaydns ipconfig /flushdns ipconfig /release ipconfig /renew
Alternative to Tracert
PathPing
DNSLint [Description of the DNSLint] (Download)
DNSLint is a Microsoft Windows utility that helps you to diagnose common DNS name resolution issues.
In: General
17 Dec 2005I was browsing through google for any new information on large scale PHP deployments, and to my surprise I got a message telling me my machine had been infected! Considering I am very careful what I run on my machine, and haven’t had a virus on my computer in over two or more years I was quite surprised. Admitedly I have installed applications that do contain spyware, and I quite promptly physically remove them from the registry, the file system, and ensuring that any application hooks are also removed.
I immediately ran an antivirus program and a number of other applications to ensure nothing was ary, which picked up nothing. Anyway heres the amusing little picture .
Lately i’ve been developing with MySQL3, and it’s almost like hitting your head against a brick wall with its limitations and specific documentation is difficult to find.
Some of the limitations:
In MySQL Server 3.23.44 and up, the InnoDB storage engine supports checking of foreign key constraints, including CASCADE, ON DELETE, and ON UPDATE. See Section 14.2.6.4, “FOREIGN KEY Constraints”.
For storage engines other than InnoDB, MySQL Server parses the FOREIGN KEY syntax in CREATE TABLE statements, but does not use or store it. In the future, the implementation will be extended to store this information in the table specification file so that it may be retrieved by mysqldump and ODBC. At a later stage, foreign key constraints will be implemented for MyISAM tables as well.
Other limitations
fairly recently started a new position, and have come from developing on all the latest versions to developing with MySQL 3, and PHP 4, which is quite a step back from MySQL 5, (PHP 5.0.4) or even MySQL 4. In general I take many aspects of MySQLs features as being rather trivial and it makes my job that much more difficult to discover why there is syntax errors, which is valid in later versions of MySQL.
As to why MySQL 3 is still being used is due to support an application.
In: PHP
8 Dec 2005I was interested in integrating PHP and SharePoint services, and using Microsoft Word 2003 (Or other MS Office Products) to upload documents directly to PHP, here are some of my observations.
There are two processes winword.exe itself pyshically POST’s the word document on the server, another process called dssm.exe (Microsoft Office Document Update Utility), which manages updates.
Analyzing the http protocol, whilst utilizing shared workspaces in Microsoft Word 2003 initialially authenticates via NTLM and the following protocols are listed in OPTIONS: [GET, POST, OPTIONS, HEAD, MKCOL, PUT, PROPFIND, PROPPATCH, DELETE, MOVE, COPY, GETLIB, LOCK, UNLOCK]; Which means Apache would have to be configured to accept some of the protocols.
Once authenticated the following occurs:
WinWord.exe Upload to SharePoint
WinWord.exe Update to SharePoint
Some example requests.
POST
POST /SharePoint%20Services(1)/_vti_bin/_vti_aut/author.dll HTTP/1.1 Accept: auth/sicily Content-Length: 20207 Content-Type: application/x-vermeer-urlencoded X-Vermeer-Content-Type: application/x-vermeer-urlencoded Connection: Keep-Alive method=put+document%3a6%2e0%2e2%2e6356&service%5fname=%2fSharePoint+Services%281%29&document=%5bdocument%5fname%3dShared+Documents%2fSharePoint+Services%2edoc%3bmeta%5finfo%3d%5b%5d%5d&put%5foption=edit&comment=&keep%5fchecked%5fout=false
method=put+document:6.0.2.6356&service_name=/SharePoint+Services(1)&document=%5Bdocument_name=Shared+Documents/SharePoint+Services.doc;meta_info=%5B%5D%5D&put_option=edit&comment=&keep_checked_out=false
Response
HTTP/1.1 200 OK Connection: close Date: Tue, 08 Nov 2005 21:26:55 GMT Server: Microsoft-IIS/6.0 X-Powered-By: ASP.NET MicrosoftSharePointTeamServices: 6.0.2.6411 Content-type: application/x-vermeer-rpc <html><head><title>vermeer RPC packet</title></head> <body> <p>method=put document:6.0.2.6356 <p>message=successfully put document 'Shared Documents/SharePoint Services.doc' as 'Shared Documents/SharePoint Services.doc' <p>document= <ul> <li>document_name=Shared Documents/SharePoint Services.doc <li>meta_info= <ul> <li>vti_approvallevel <li>SR| <li>vti_categories <li>VW| <li>vti_filesize <li>IR|19968 <li>vti_assignedto <li>SR| <li>Checked by <li>SW|Andrew M. Johnstone <li>Department <li>SW|Development <li>vti_modifiedby <li>SR|C22586_40180\administrator <li>vti_timecreated <li>TR|08 Nov 2005 21:26:56 -0000 <li>vti_title <li>SR|SharePoint Services <li>vti_timelastmodified <li>TR|08 Nov 2005 21:26:56 -0000 <li>_SharedFileIndex <li>SW|0000020000000000{54AD31DF-B8AF-4070-A579-F3A63D6C202F}http://sharepoint.hostelhost.com/SharePoint Services(1)/Shared Documents/SharePoint Services.doc <li>vti_author <li>SR|C22586_40180\administrator <li>vti_sourcecontrolversion <li>SR|V1 <li>vti_sourcecontrolcookie <li>SR|fp_internal </ul> </ul> </body> </html>
POST
POST /SharePoint%20Services(1)/_vti_bin/dws.asmx HTTP/1.1 Content-Type: text/xml; charset=utf-8 SOAPAction: http://schemas.microsoft.com/sharepoint/soap/dws/GetDwsMetaData X-Office-Version: 11.0.6408 User-Agent: Microsoft Office/11.0 (Windows NT 5.1; Microsoft Office Word 11.0.6408; Pro) Host: sharepoint.hostelhost.com Content-Length: 363 Connection: Keep-Alive Cache-Control: no-cache Cookie: HELM=Username=&Interface=standard%5FXP&ThemeColour=XP&NonSecureReturnURL=&Password=&LanguageCode=EN Authorization: NTLM <?xml version='1.0' ?> <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"> <s:Body> <GetDwsMetaData xmlns="http://schemas.microsoft.com/sharepoint/soap/dws/"> <document>http://sharepoint.hostelhost.com/SharePoint%20Services(1)/Shared%20Documents/SharePoint%20Services.doc</document> <id></id> <minimal>false</minimal> </GetDwsMetaData> </s:Body> </s:Envelope>
Response
HTTP/1.1 200 OK Date: Tue, 08 Nov 2005 21:26:59 GMT Server: Microsoft-IIS/6.0 X-Powered-By: ASP.NET MicrosoftSharePointTeamServices: 6.0.2.6411 X-AspNet-Version: 1.1.4322 Cache-Control: private, max-age=0 Content-Type: text/xml; charset=utf-8 Content-Length: 6367 <?xml version="1.0" encoding="utf-8"?> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <soap:Body> <GetDwsMetaDataResponse xmlns="http://schemas.microsoft.com/sharepoint/soap/dws/"> <GetDwsMetaDataResult> <Results> <SubscribeUrl>http://sharepoint.hostelhost.com/SharePoint Services(1)/_layouts/1033/SubNew.aspx</SubscribeUrl> <MtgInstance /> <SettingUrl>http://sharepoint.hostelhost.com/SharePoint Services(1)/_layouts/1033/settings.aspx</SettingUrl> <PermsUrl>http://sharepoint.hostelhost.com/SharePoint Services(1)/_layouts/1033/EditPrms.aspx</PermsUrl> <UserInfoUrl>http://sharepoint.hostelhost.com/SharePoint Services(1)/_layouts/1033/UserEdit.aspx</UserInfoUrl> <Roles> <Role Name="Reader" Type="Reader" Description="Has read-only access to the Web site." /> <Role Name="Contributor" Type="Contributor" Description="Can add content to existing document libraries and lists." /> <Role Name="Web Designer" Type="WebDesigner" Description="Can create lists and document libraries and customize pages in the Web site." /> <Role Name="Administrator" Type="Administrator" Description="Has full control of the Web site." /> </Roles> <Schema Name="Tasks"> <Field Name="Title" Type="Text" Required="True"><Choices /></Field> <Field Name="Attachments" Type="Attachments" Required="False"><Choices /></Field> <Field Name="Order" Type="Number" Required="False"><Choices /></Field> <Field Name="Priority" Type="Choice" Required="False"><Choices><Choice>(1) High</Choice><Choice>(2) Normal</Choice><Choice>(3) Low</Choice></Choices></Field> <Field Name="Status" Type="Choice" Required="False"><Choices><Choice>Not Started</Choice><Choice>In Progress</Choice><Choice>Completed</Choice><Choice>Deferred</Choice><Choice>Waiting on someone else</Choice></Choices></Field> <Field Name="PercentComplete" Type="Number" Required="False"><Choices /></Field> <Field Name="AssignedTo" Type="User" Required="False"><Choices /></Field> <Field Name="Body" Type="Note" Required="False"><Choices /></Field> <Field Name="StartDate" Type="DateTime" Required="False"><Choices /></Field> <Field Name="DueDate" Type="DateTime" Required="False"><Choices /></Field> </Schema> <Schema Name="Documents" Url="Shared Documents"> <Field Name="FileLeafRef" Type="Invalid" Required="True"><Choices /></Field> <Field Name="_SourceUrl" Type="Text" Required="False"><Choices /></Field> <Field Name="_SharedFileIndex" Type="Text" Required="False"><Choices /></Field> <Field Name="Order" Type="Number" Required="False"><Choices /></Field> <Field Name="Title" Type="Text" Required="False"><Choices /></Field> </Schema> <Schema Name="Links"> <Field Name="Attachments" Type="Attachments" Required="False"><Choices /></Field> <Field Name="Order" Type="Number" Required="False"><Choices /></Field> <Field Name="URL" Type="URL" Required="True"><Choices /></Field> <Field Name="Comments" Type="Note" Required="False"><Choices /></Field> </Schema> <ListInfo Name="Tasks"> <Moderated>False</Moderated> <ListPermissions> <InsertListItems /> <EditListItems /> <DeleteListItems /> <ManageLists /> </ListPermissions> </ListInfo> <ListInfo Name="Documents"> <Moderated>False</Moderated> <ListPermissions> <InsertListItems /> <EditListItems /> <DeleteListItems /> <ManageLists /> </ListPermissions> </ListInfo> <ListInfo Name="Links"> <Moderated>False</Moderated> <ListPermissions> <InsertListItems /><EditListItems /><DeleteListItems /><ManageLists /></ListPermissions> </ListInfo> <Permissions> <ManageSubwebs /><ManageWeb /><ManageRoles /><ManageLists /> <InsertListItems /><EditListItems /><DeleteListItems /> </Permissions> <HasUniquePerm>True</HasUniquePerm> <WorkspaceType>DWS</WorkspaceType> <IsADMode>False</IsADMode> <DocUrl>http://sharepoint.hostelhost.com/SharePoint%20Services(1)/Shared%20Documents/SharePoint%20Services.doc</DocUrl> <Minimal>False</Minimal> <Results> <Title>SharePoint Services</Title> <LastUpdate>632670820194565000</LastUpdate> <User> <ID>1</ID> <Name>C22586_40180administrator</Name> <LoginName>C22586_40180administrator</LoginName> <Email>andrew@ajohnstone.com</Email> <IsDomainGroup>False</IsDomainGroup> <IsSiteAdmin>True</IsSiteAdmin> </User> <Members> <Member> <ID>1</ID> <Name>C22586_40180administrator</Name> <LoginName>C22586_40180administrator</LoginName> <Email>andrew@ajohnstone.com</Email> <IsDomainGroup>False</IsDomainGroup> </Member> </Members> <Assignees> <Member> <ID>1</ID> <Name>C22586_40180administrator</Name> <LoginName>C22586_40180administrator</LoginName> </Member> </Assignees> <List Name="Tasks"> <ID>{A9D58464-55C3-477F-A18E-B18A75732A9F}</ID> </List> <List Name="Documents"> <ID>{E133F72B-8ECB-436B-8916-CD331678AC75}</ID> <z:row ows_FileRef="Shared Documents/SharePoint Services.doc" ows_Title="SharePoint Services" ows_FSObjType="0" ows_Created="2005-11-08T21:26:55Z" ows_Author="1;#C22586_40180administrator" ows_Modified="2005-11-08T21:26:55Z" ows_Editor="1;#C22586_40180administrator" ows_ID="1" ows_ProgID="" xmlns:z="#RowsetSchema" /> </List> <List Name="Links"><ID>{51BF4716-E5B7-4C0D-A6AE-93EF0645FF38}</ID></List> </Results> </Results> </GetDwsMetaDataResult> </GetDwsMetaDataResponse> </soap:Body> </soap:Envelope>
I’ll post an example up when I get some free time…
In: PHP
7 Dec 2005It’s been a little while since I published something, so I’ll make something live. I tend to forgett about a silly quirk in internet explorer that I continually bump into, which generally takes me time to figure out why page does not load… Usually this is when downloading documents and is a very simple fix by calling session_cache_limiter(‘none’); after the session has been started.
Also something worth looking into is the QCodo Framework, which I have recently come across. It seems very effective from the demonstrations, and they also have a interesting article, Code Generation vs. Metaprogramming.
In: General
28 Nov 2005I have come across a few Ajax applications or implentations of Ajax that has impressed me due to their simplicity and clean designs, what Ajax implementations have impressed you lately?
In: PHP
28 Nov 2005I’ve been using Zend Studio for Eclipse (beta) for several weeks in a rewrite of a framework and numerous sites at work and overall I really like the IDE. Its got some great features and being based on the eclipse project makes it really extensible and customizable. With debugging, profiling, code completion, code formatting and more enabled can help with productivity.
A complete list of features can be found at Zend.
Zend Studio for Eclipse consumes quite a lot of memory and the recommended amount of RAM for eclipse based applications is 2GB, however you can control the amount of memory that eclipse will use by editing the zendStudio.ini file.
Whilst I do like the IDE I have found a number of issues with Zend Studio:
In: General
8 Nov 2005I was playing around trying to bind Multiple Websites in IIS5.1 on Windows XP, however after trying to find information on why trying to start up both services resulted in the following error “The request is not supported”, despite being bound to different IP addresses. I finally came across Kristofer Gäfvert site, which states this is not possible and the only solution appears to upgrade to windows 2003 server, after trawling through lots of documentation. Regardless, when developing you tend to really only work on one project at a time so you can start and stop the projects Website as and when needed.
I have been a developer for roughly 10 years and have worked with an extensive range of technologies. Whilst working for relatively small companies, I have worked with all aspects of the development life cycle, which has given me a broad and in-depth experience.