Nov 28

To launch AppStore directly from your application (e.g. when you give the user an option to buy full version in your free app, and/or similar use cases), following code snippet may be used:

NSURL *appStoreURL= [NSURL URLWithString:@“http://phobos.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=293671688&mt=8″];
[[UIApplication sharedApplication] openURL:appStoreURL];

while this code snippet should work fine with an iPhone OS 2.0 device, there is a bug (AFAIK) in iPhone OS 2.1 which prevents it from properly
opening links starting with http://itunes, e.g. if you use the following code

NSURL *appStoreURL = [NSURL URLWithString:@“http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=293671688&mt=8″];
[[UIApplication sharedApplication] openURL:appStoreURL];

it would fail and safari would complain that it cannot open the page as too many redirects have occurred. Just replace http://itunes with http://phobos in the url and it should work like a charm.

written by ishaq \\ tags: ,

Nov 17

I upgraded my installation of wordpress over the weekend and the “can’t login to admin panel” problem kept me pulling my hair for two days. I am listing down the steps I did for the sake of the record.

1. I cleared my cookies and authenticated sessions, even tried login from a different browser, no success.

2. Reset my password, still no success…

3. Upgraded my wp-config.php to include 3 secret keys (taking help from wp-config-sample.php), no success…

4. Stumbled upon this thread, but it didn’t help me since I wasn’t using Admin SSL.

5. Then I came across this article, so I renamed my plugins folder, logged in, renamed it back to plugins, and everything works now.

and God, Akismet is a blessing. I didn’t have Akismet for 2 days and my inbox was full of all sorts of spam comments from wordpress.

written by ishaq \\ tags:

Oct 22

Tintash (my workplace) has recently updated its site and they have put caricatures and short bios of the whole team in the ‘about’ section. Here’s what I look like:

Muhammad Ishaq

It’s not so true representation of me since I, usually, do not dress formally around here, it does look pretty funny though =)

The company’s page describing the team and their caricatures (including this one) is here.

P.S.: Please don’t tell me it looks like Bin Laden. ;-)

written by ishaq \\ tags:

Jul 10

Recently I was trying to configure apache2 to act as a proxy to mongrel (Ruby on Rails), so I added the following directives to my httpd.conf

<virtualhost *>

    ServerName test.example.com
    <proxy *="">
        Order allow,deny
        Allow from all
    </proxy>
    # Proxy directives
    ProxyPass /phpmyadmin ! # don't want proxy forwarding for phpMyAdmin
    ProxyPass / http://localhost:3000/
    ProxyPassReverse / http://localhost:3000/
    ProxyPreserveHost on

    # Logfiles
    ErrorLog  /var/log/apache2/test.example.com.error.log
    CustomLog /var/log/apache2/test.example.com.access.log combined

</virtualhost>
</pre>
However, as soon as I used to restart apache after adding this code, it always threw 503 - Service Unavailable. The error log showed a number of lines like this one:
<pre>[Thu Jul 09 11:37:13 2008] [error] (13)Permission denied: proxy: HTTP: attempt to connect to 127.0.0.1:3000 (*) failed

In short it has to do something with permissions in SELinux which doesn’t allow httpd to connect to network and the solution is this command:

# /usr/sbin/setsebool httpd_can_network_connect 1

Thanks to the help found here and here.

written by ishaq \\ tags: ,

Dec 26

Marry Christmas and a Happy New Year to all of my readers.

I know the post is a about 10 hours and 29 minutes late , but I was away for Eid Holidays and didn’t have access to internet :)

Regards,
MI

written by ishaq \\ tags: