Author: Ajay

  • How To Fix MacOS ERR_EMPTY_RESPONSE

    How To Fix MacOS ERR_EMPTY_RESPONSE

    While installing few php scripts on my local MacOS Monterey I started getting ERR_EMPTY_RESPONSE error in Chrome browser.

    First I encountered this issue while installing Typo3 CMS. I tried installing phpMyAdmin and got the same error.

    ERR_EMPTY_RESPONSE on MacOS Google Chrome
    ERR_EMPTY_RESPONSE on MacOS Google Chrome

    Digging down further and after some tweaking with apache config files and php.ini files I found out that the problem is with Google Chrome and not with MacOS in particular. There may have been some Apache and/or php.ini config settings which fixed this error in other browsers but I’m not sure what is the exact fix.

    The Solution

    I’m not sure what exactly caused this problem but other folks have been saying it’s cache.

    Try cleaning Google Chrome cache.

    Restart Mac.

    Try in other browsers.

    Digging down further it seems that there is something wrong with configuration file.

    Checking the apache access log file shows following error

    127.0.0.1 – – [04/Nov/2022:22:05:48 +0000] “GET /wp/wp-admin HTTP/1.1” 301 237

    Apache error log shows this

    [Fri Nov 04 22:08:12.569415 2022] [core:notice] [pid 139] AH00052: child pid 71636 exit signal Segmentation fault (11)

  • imgur: We’re sorry! Account sign-up is not possible in your region

    imgur: We’re sorry! Account sign-up is not possible in your region

    Tried to create account in imgur and got the following error:

    We’re sorry! Account sign-up is not possible in your region.

    We're sorry! Account sign-up is not possible in your region.

    This is the first of error of it’s kind I’ve ever faced in my life where a website doesn’t allow account creation from the UK.

    Unfortunately and perhaps I’m the only one from the UK getting this error. Based on comments from other users from the UK I can say that I’m not the alone so it must be country/UK specific issue.

    I’ve contacted imgur, let’s see what they have to say.

    Does ISP block imgur?

    In the past some ISPs, including Virgin and sky, have been blocking imgur but this error has nothing to do with being blocked by ISP. imgur website is accessible so there is no block from my ISP. If it was blocked by ISP then it would show error from the ISP and not on imgur website.

  • Safari Web Content High CPU And Memory Usage on MacOS [Solved]

    Safari Web Content High CPU And Memory Usage on MacOS [Solved]

    Safari has become fucking pain in the ass recently. I’m not sure what caused it to get fucked. Safari Web Content process has been eating up more than 100% of CPU and over 2 GB of Memory.

    Safari Web Content – High CPU Usage
    Safari Web Content High Memory Usage

    I’m seeing this issue on both iMac and MacBook. I’ve macOS Big Sur on both machines.

    Till now I haven’t found a solution so far. Below are some of the solutions which I’ve tried so far and none worked.

    The Solution Which Worked For Me

    I upgraded OS to macOS Monterey and this problem was gone. I’m still observing though.

    Other Solutions Which You Can Try

    Low RAM/Memory

    The first culprit which anyone would point is low RAM. I’ve fucking 32GB of RAM on my iMac so it doesn’t solve problem. Try adding more RAM if you could, it will certainly improve performance but it will not solve the underlying issue.

    Disable Safari Extensions

    Another common culprit for Safari or any browser could be extension/plugins. I don’t have any plugin installed so this solution isn’t applicable to me. If you have any extension installed in Safari then you can disable/remove them and try.

    To disable/remove extensions go to Safari -> Preferences -> Extensions and disable/remove extensions and try.

    Safari Extensions

    Disable Develop Menu

    Being a developer having Develop menu showing up all the time is a requirement for us. Some folks have suggested that disabling Develop menu may solve the issue but for me it also didn’t work.

    To disable Develop menu go to Safari -> Preferences -> Advanced and uncheck Show Develop menu in menu bar.

    Disable Show Develop menu in menu bar

    Clear Cache

    To clear cache you need to enable Develop menu again. From Develop menu click on Empty Caches. For me this solution also didn’t work.

    Safari – Empty Caches

    Reboot

    Remember the fucking Windows PCs where the most obvious solution to all problems was to reboot PC? Try doing the same, sometimes it may work. For me this magic also didn’t work in fixing the issue.

    Log out of Google Account

    Some have suggested that logging out from Google account fixes the issue but that’s not true. In my case Safari Web Content keeps eating CPU and Memory even when I haven’t opened Google pages. Logging out also didn’t resolve the issue.

    Quit All Apps

    I’m in the habit of keeping plenty of apps and tabs in these apps opened. Quitting all apps doesn’t resolve the issue as it has nothing to do with anything else than Safari itself.

  • How To Disable Save changes to the Adobe Photoshop document before closing? Dialogue

    How To Disable Save changes to the Adobe Photoshop document before closing? Dialogue

    This is an annoying dialogue when you are working on a multiple files and don’t want this to popup every time you close a document in Photoshop 2022.

    Save changes to the Adobe Photoshop document before closing?

    This is a very useful feature, imagine closing a file without saving it and losing all your hard work. I’m in a situation where I don’t need to worry about saving the file, I just need this dialogue not to show up.

    The Solution

    I haven’t found a solution yet, I’ll update this post when I find a solution to this problem.

    I’ve posted it on Adobe forum let’s see if we can get a solution there.

    https://community.adobe.com/t5/photoshop-ecosystem-discussions/how-to-disable-save-changes-to-the-adobe-photoshop-document-before-closing-dialogue/td-p/12616873

  • Why Is Eclipse So Fucking Slow?

    Why Is Eclipse So Fucking Slow?

    I hate Eclipse with passion. I’ve never used it and whenever I tried to use it I just give up on fucking installation procedures itself.

    It’s just fucking piece of crap IDE software to install and work. I’ve state of the art iMac with maximum configuration possible and whenever I launch it, it just starts frying up iMac provided I can get pass the installation process.

    Eclipse IDE is slow to install on MacOS

    The reason I keep coming back to Eclipse IDE is that it’s free and the nearest best IDE software is fucking paid where you end up paying ยฃ499 or so per year to use IDE which should be fucking free.

    As a developer I find it so fucking annoying just to keep wasting time in fucking figuring out how to install software.

    Today was another day where I had to get Eclipse installed on MacOS and it fucking got stuck on installation hence I decided to finally rant on this topic.

    So Why Eclipse Is So Slow In Everything?

    It’s slow because it’s free and it is supported by bunch of people in community who couldn’t fucking get it working. They keep on adding support for everything and it all ends up in a giant mess.

    Apart from ranting the main reason why it’s slow with everything is because it connects with servers and not just few servers but millions of them and it all ends up in timing out because those servers are unreachable. Why are those servers unreachable? It’s again the name of fucking foundation and free and open source crap.

    What Is The Solution To Fix Eclipse’s Slow Response?

    As per my knowledge the slowness of Eclipse comes down to the Network. No it’s not your network connection but the sites Eclipse connects to download software.

    Unfortunately there is no solution which can fix the slowness of Eclipse. You can try some of the followings.

    Network Connection

    On Eclipse Installer application open Network Connection from Eclipse-Inst->Preference menu.

    Select Direct/Manual/Native from Active Provider and try it.

    For me none of these options helped.

    Eclipse Installer – Network Connection

    Download and Install Eclipse From Command Line – Worked for me

    Download the latest Eclipse IDE package from https://www.eclipse.org/downloads/packages/

    I’m trying to install Eclipse IDE for Java Developers and at the point of writing this post the latest version of the package was https://www.eclipse.org/downloads/download.php?file=/technology/epp/downloads/release/2021-12/R/eclipse-java-2021-12-R-macosx-cocoa-x86_64.dmg

    After downloading double click on .dmg file and follow instructions to install Eclipse IDE. This is the solution which worked for me.

    Solution For Fixing Slowness Of Installing PyDev

    I was trying to install PyDev today which is where all the problem starts to appear again (millionth time).

    To install PyDev on MacOS, launch Eclipse IDE and click Help -> Install New Software

    On Install Window enter http://pydev.org/updates and select the PyDev.

    Uncheck Contact all update sites during install to find required software

    Install PyDev on MacOS

    You would assume that it will all go well and it will install PyDev, but it will not at least not in my case. Now you will realise why I decided to rant on this topic. Here is the next error I encountered while installing PyDev.

    PyDev Installation Error on MacOS

    To fix above error, double click on following in Problems pane and continue to install the required packages.
    Unknown referenced nature: org.eclipse.wst.jsdt.core.jsNature. .project /Blog Unknown Unknown nature

    This is not the end, you may encounter another problem shown below.

    Unable to read repository at https://download.eclipse.org/releases/latest.
    Unable to read repository at https://download.eclipse.org/releases/2021-12/.
    Communication with repository at https://download.eclipse.org/releases/2021-12/202112081000/content.xml.xz failed.
    Read timed out
    Another PyDev installation Problem

    Eclipse is like a big onions of problems where you fix one problem only to find out another problem underneath it and it keeps going. Layer after layer of fucking problems.

    Looking at the problem it seems it is same issue, the server time out.

    Try again and keep trying till it installs. Good luck with that though!

    Well I need to take a break before my brain fries up in fixing problem after problem. I’ll come back as I find solutions.

    Okie so I found what is the real issue. Click on this https://www.pydev.org/updates/ on this page click on all the links. You will find that all pages don’t exist. So basically PyDev is fucked up.

    I gave up this point only to find that Eclipse I’ve installed so far has nowhere to be found on my iMac. Lol!!

    So what application was I running if it didn’t install Eclipse? I’ve no clue what is going on!!!

    It turns out that I didn’t copy Eclipse.app to Application folder. To fix this issue double click on dmg file again and drag and drop Eclipse.app to Application folder

    Drag and drop Eclipse.app to Application folder

    I’ve to conclude this post. I’ll try to provide solution to other issues in another posts.

    Update – Is RAM an issue?

    While browsing through Internet I came across a few threads where so called fucking experts have expressed their opinion that Eclipse is slow because computer has less RAM. I just died laughing ๐Ÿ˜‰ What a bunch of morons!!! Slowness of Eclipse has nothing to do with RAM. I’ve 32 GB on my iMac yet Eclipse is just slow. From my personal experience less RAM is not the real cause of slowness.

  • How To Change Width of Post Content Area In TWENTY TWENTY-ONE WordPress Theme

    How To Change Width of Post Content Area In TWENTY TWENTY-ONE WordPress Theme

    By default the post/page/category/archive content area’s width is less than header/footer/nav/post or page title’s width in the desktop view or large screen size. It’s fucking annoying, not sure why they would do that. Ideally the post etc content area should have same width as title, nav, header footer etc.

    WordPress TwentyTwenty-One Theme Change Post Content Area
    WordPress TwentyTwenty-One Theme Change Post Content Area

    There is very simple way to change it. Just copy following code in your theme’s css or custom CSS in the theme customisation and it will be fixed in no time

    /* Change the content width to be same as header/nav/footer's width */
    @media only screen and (min-width: 822px) {
    	:root {
    		--responsive--aligndefault-width: min(calc(100vw - 8 * var(--global--spacing-horizontal)), 1240px);
    	}
    }

  • This job has been flagged and must be sponsored to go live on Indeed

    This job has been flagged and must be sponsored to go live on Indeed

    I’ve always hated indeed.com for one reason or another and have never been able to hire any single candidates in the past.

    Firstly it takes hell lot of time to post a job. They have got those stupid fields on job posting page which don’t make any sense.

    Once you bear with their lengthy job posting process and manage to post the job, they will close the job sighting one or other reasons. In some cases they even close account.

    In the latest fuck up, indeed.com is showing me following message all of sudden. The message doesn’t make any sense and there is no explanation for the same.

    This job has been flagged and must be sponsored to go live on Indeed
    This job has been flagged and must be sponsored to go live on Indeed

    This job has been flagged and must be sponsored to go live on Indeed.

    So it’s a nice way to extort money.

    Why don’t they just make it paid job posting site and save our precious time.

    Searching for this error doesn’t show many results however you will find an interesting site where some of the other employers have also complained about the same issue. Interesting site BTW ๐Ÿ™‚

    https://indeed.pissedconsumer.com/review.html

    Solution

    There is no solution other than post jobs on other good and free job sites. Some of these totally free job sites are listed below. If you know any free job sites then let me know in the comments below and I’ll check it out before adding in the list below.

    Free Job Sites

    Jobs Armada

    100% free job sites, no restrictions whatsoever. Jobs are approved same day. It has very good response rate. Job stays active for long time. You can also request them to list it for long time if you wish.

    GOV.UK Advertise a job

    Who would have known that GOV.UK will have a job site. I discover it by accident. I posted a job, got some response but nothing serious though. Give it a try.

    Tech Forum Jobs

    It is a tech forum and it has Jobs category where you can post jobs for free. You can post jobs in any sector.

  • How To Redirect www and http to https

    How To Redirect www and http to https

    First Rant..

    Since the men in tower dictated that SSL will become norm for websites we common men are forced to follow their dogma and do as they dictate us to do.

    Not too far in the future, non ssl domains may be blocked by the men in tower all together. So it’s better you start having SSL on your website and redirect http and www to https.

    Redirect http & www to https on Linux and Apache

    Copy following code towards the top of .htaccess file in your web root and all job will be taken care of.

    RewriteEngine On
    RewriteCond %{HTTPS} off [OR]
    RewriteCond %{HTTP_HOST} ^www. [NC]
    RewriteCond %{HTTP_HOST} ^(?:www.)?(.+)$ [NC]
    RewriteRule ^ https://%1%{REQUEST_URI} [L,NE,R=301]

    Why to redirect www to https?

    It’s simply because you don’t want users to type r extra letters to reach your website. https://yourdomain.com is the best url you can have unless you have subdomains in which case www may become a necessity.

    Test

    Type http://yourdomain.com and http://www.yourdomain.com in browser one by one and it should redirect to https://yourdomain.com.

    Don’t forget to replace yourdomain.com with your actual domain ๐Ÿ˜‰

    How to add redirect on a self hosted WordPress blog?

    Firstly you should fix the url of your blog. From WordPress Dashboard go to Settings -> General

    Enter your url with https:// in it. This will be your target and default URL.

    WordPress Address (URL)

    Next is to redirect www and http to https. If this is a brand new WordPress installation then you can simply copy and paste above code in .htaccess towards the top.

    Here is what a typical .htaccess file will look like after adding redirect code in it. I’ve highlighted redirect code in bold.

    Don’t forget to test your blog urls after updating .htaccess code.

    # BEGIN WordPress
    # The directives (lines) between "BEGIN WordPress" and "END WordPress" are
    # dynamically generated, and should only be modified via WordPress filters.
    # Any changes to the directives between these markers will be overwritten.
    <IfModule mod_rewrite.c>
    RewriteEngine On
    
    #### Redirect www, http to https ##########
    RewriteCond %{HTTPS} off [OR]
    RewriteCond %{HTTP_HOST} ^www. [NC]
    RewriteCond %{HTTP_HOST} ^(?:www.)?(.+)$ [NC]
    RewriteRule ^ https://%1%{REQUEST_URI} [L,NE,R=301]
    ######################
    
    RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>
    
    # END WordPress
    # php -- BEGIN cPanel-generated handler, do not edit
    # Set the โ€œea-php74โ€ package as the default โ€œPHPโ€ programming language.
    <IfModule mime_module>
      AddHandler application/x-httpd-ea-php74 .php .php7 .phtml
    </IfModule>
    # php -- END cPanel-generated handler, do not edit

    If your WordPress blog is not fresh then there are chances that some of the plugins may have been already taking care of the redirect. To check it type http, www urls and if it is already redirecting to https then it’s all good. If not then you can copy and paste code as described above.

  • 400 Bad Request Request – Header Or Cookie Too Large – nginx [SOLVED]

    400 Bad Request Request – Header Or Cookie Too Large – nginx [SOLVED]

    This is a weird problem I faced when I was using my namecheap account to setup SSL.

    400 Bad Request Request - Header Or Cookie Too Large - nginx
    400 Bad Request Request – Header Or Cookie Too Large – nginx

    If you search for the above error you will mostly find answer for the server side issue. For me it wasn’t server side issue.

    The Solution

    With some thinking I manage to figure out that it was the AdBlock chrome extension which was causing issue. Disable AdBlock from the site for which you are facing this issue and problem will be gone.

    If above solution doesn’t resolve your issue then it may be server side issue and you will have to contact website’s technical support.

  • What Is The Best CMS?

    What Is The Best CMS?

    A Brief Introduction

    For those who are new to CMS, it stands for Content Management System which you use to build a website and publish your content. Your content can be as simple as blog post or a more complex full fledge web app. For any website or web app which requires you to add/edit content/product or articles you need to have a CMS.

    What is the best CMS?
    What is the best CMS?

    Which is the best CMS?

    It’s an enigma and a total mess to ask this question – What is the best CMS – which has been asked millions times by millions of developers and others and which never has a single straight forward answer no matter how many times you ask.

    Sorry to disappoint you, and save your time, that there is no such thing as best CMS. There is no single CMS which can satisfy all your requirements. To save your time further I want to say that don’t delve further into this subject as you will never find an answer.

    In my over two decades of experience in messing with various CMS, I haven’t been zeroed on any single CMS which can take care of any project’s requirements.

    So what CMS to use for my project?

    This is a right question and you will certainly get answer for that provided you have figured out your requirements. I’m also going to list the requirements and the best CMS to use for the same.

    Towards the end of this post I’ve listed the most popular CMSs and their intended usage.

    Best CMS for a Blog

    WordPress and full stop. Don’t look for anything else.

    You can use WordPress do do more than just a blog but it will all end up in a total fucking mess so don’t do that. I’ve seen people using WordPress for a full fledge eCommerce shop and even a web app it’s just totally wrong, and it will end up in a big failure in the end.

    WordPress is a 100% insecure script which can be hacked easily. My guess is that over 90% of all self hosted WordPress sites are hacked or have a backdoor entry where hackers exploit various loopholes to do whatever they want.

    Best CMS for eCommerce Shop

    The first ever full fledge eCommerce CMS which I used was osCommerce. I’ve used it successfully in the past for many online shops. The good news is that it is still around and doing, let’s say, quite ok however world has moved on and we have far better eCommerce solution than osCommerce. I haven’t touched osCommerce in past decade. I wouldn’t recommend using osCommerce any more.

    If I’ve to build a full fledge eCommerce solution then I prefer to use a php framework and I recommend you doing the same. Take any php framework which you are familiar with and customize that to suit your requirements. You may also use Node.js based solution which is gaining popularity now a days.

    Best CMS for Backend For Mobile Apps

    I use yii framework as backend for all mobile apps as it’s flexible and it offers integrated solution for Web App, APIs, Backend for Mobile Apps, Content for front End and everything else you intend to do.

    Now a days Node.js and associated front end solution are also being used but Ive never managed to build a complete system using just Node.JS and front end scripts as it’s fucking mess to get it going.

    List of Top and Most Popular Framework and Usage

    Framework/System/ScriptUsage
    yii framework

    It is PHP based framework and
    my no. 1 choice for everything.
    Web App
    eComemrce Shop
    Backend for Mobile Apps
    Blog
    Forum
    Company Website
    Symfony, Zend and other PHP based frameworkThese are very hard to work with and can be frustrating in the long term, better avoid them.
    WordPressUse only for blog and nothing else. Don’t use wordpress.com though.
    DrupalDon’t use, it’s insecure system
    JoomlaDon’t use, it’s insecure system
    Node.js & related front end solutionsCan be used for anything you require.
    phpBB
    PHP based free open source forum script
    Don’t use, it’s insecure system.
    Django
    Python based framework
    Never got it working, can be good if you can make it work. Can be used for any requirement.