Friday, 27 April 2012

Strange PHP/Zend/Apache2 issue

Setting up a new laptop for development on a complex system hardly ever goes according to plan. The same thing happened with me and I ended up getting my entire office involved in figuring out the problem.

I ensure I back up every single thing when I switch systems. I did the same here. I've even contemplated writing a small shell script that can install everything I'll need. But anyway, all that happened perfectly. Everything was installed and we were ready to go.

I fired a browser, hit the URL and lo, the scary 403. At commonfloor.com, we use a pretty cool .htaccess file. And for some reason, apache2 was looking for the file four directory levels above where it was pointing to. It had to look for it at /path_to_home/prog/php/commonfloor.com/another_dir/another_dir/ but it was looking for the file here /path_to_home/prog/. That wasn't even the DocumentRoot inside apache, and the errors being thrown were:

(
13)Permission denied: /home/ashesh/prog/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable
Gwibberish. The error message wasn't going to lead us anywhere.

What fixed the problem:


  • Set AllowOverride None
  • Ensure libapache2-mod-php5 is installed/loaded [install it using your package manager if not, enable it using sudo a2enmod php5 if your package manager didn't do it already
  • Restart apache2. Hit the URL and groove away in joy!


[I know that the fix is simple but the point is that it's pretty easy to overlook these problems when faced with the task of setting up a new computer.]

The king of fixes: A really cool systems guy like ours. All credits to Goutham ji.



32 comments:

  1. Thanks For Your valuable posting, it was very informative

    Guest posting sites
    Education

    ReplyDelete
    Replies
    1. Great Article
      Cyber Security Projects

      projects for cse

      Networking Security Projects

      JavaScript Training in Chennai

      JavaScript Training in Chennai

      The Angular Training covers a wide range of topics including Components, Angular Directives, Angular Services, Pipes, security fundamentals, Routing, and Angular programmability. The new Angular TRaining will lay the foundation you need to specialise in Single Page Application developer. Angular Training

      Delete
  2. Thanks For Your valuable posting, it was very informative

    Guest posting sites
    Education

    ReplyDelete
  3. Good job! Fruitful article. I like this very much. It is very useful for my research. It shows your interest in this topic very well. I hope you will post some more information about the software. Please keep sharing!!
    German Classes in Chennai
    German Language Classes in Chennai
    German Courses in Chennai
    Java Training in Chennai
    Advanced Java Training in Chennai
    Hadoop Course in Chennai
    German Language Course in Chennai
    German classes in Adyar

    ReplyDelete
  4. Bahkan juga ada juga juga bacaan mantra dengan istimewa untuk memenangkan permainan judi kartu poker online dengan mudah sekali
    asikqq
    dewaqq
    sumoqq
    interqq
    pionpoker
    bandar ceme terpercaya
    hobiqq
    paito warna
    forum prediksi

    ReplyDelete
  5. You have provided a nice article, Thank you very much for this one. And I hope this will be useful for many people. And I am waiting for your next post keep on updating these kinds of knowledgeable things
    Great info. The content you wrote is very interesting to read. This will be loved by all age groups.
    DevOps Training in Chennai
    Best DevOps Training in Chennai
    DevOps Training institute in Chennai
    Azure Training in Chennai
    VMware Training in Chennai
    RPA Training in Chennai
    DevOps Training in Velachery
    DevOps Training in Tambaram
    DevOps Training in Adyar
    DevOps Training in Vadapalani

    ReplyDelete
  6. A IEEE project is an interrelated arrangement of exercises, having a positive beginning and end point and bringing about an interesting result in Engineering Colleges for a particular asset assignment working under a triple limitation - time, cost and execution. Final Year Project Domains for CSE In Engineering Colleges, final year IEEE Project Management requires the utilization of abilities and information to arrange, plan, plan, direct, control, screen, and assess a final year project for cse. The utilization of Project Management to accomplish authoritative objectives has expanded quickly and many engineering colleges have reacted with final year IEEE projects Project Centers in Chennai for CSE to help students in learning these remarkable abilities.



    Spring Framework has already made serious inroads as an integrated technology stack for building user-facing applications. Spring Framework Corporate TRaining the authors explore the idea of using Java in Big Data platforms.
    Specifically, Spring Framework provides various tasks are geared around preparing data for further analysis and visualization. Spring Training in Chennai

    ReplyDelete
  7. This is most informative and also this post most user-friendly and super navigation to all posts.
    Online Data Science Classes
    Selenium Training in Pune
    AWS Online Classes
    Python Online Classes

    ReplyDelete
  8. Great stuff!

    Ace Infoway is a global web development company with 20+ years of experience that helps you build flexible, secure, scalable, and advanced PHP based web applications. Having expertise in the latest version as well as trends of PHP frameworks like Lumen, Laravel, Symphony, etc, our PHP web developers offer incomparable UI/UX development services for your mobile/web apps that promote your brand to the most.

    ReplyDelete
  9. Good Post! Thank you so much for sharing this pretty post, it was so good to read and useful to improve my knowledge as updated one, keep blogging.
    Offshore Engineering Services India
    3D Scanning Reverse Engineering

    ReplyDelete
  10. Our Data Science course in Hyderabad will also help in seeking the highest paid job as we assist individuals for career advancement and transformation. We carefully curate the course curriculum to ensure that the individual is taught the advanced concepts of data science. This helps them in solving any challenge that occurs. Along with that, we also make students work on real case studies and use-cases derived. data science course in hyderabad

    ReplyDelete
  11. Air hostess Escorts in Chanakyapuriare educated and bold as well.
    They belong to a Dating Call Girls in Gujarat and they will choose this profession as their choice.
    So, you don’t need to think about their Hot and Sexy Call Girls in Gujarat.
    They are interested so they are in this profession always remember that! If you are looking for the educated
    Real Call Girls Photo in Ahmedabad and bold girl,
    just try Real Call Girls Photo in Ahmedabad.
    You will love this service and want to hire again and again. Our Real Call Girls Photo in Agra
    are fully trained and they will offer you unforgettable moments. Try to grab the best deal and enjoy unlimited.
    Visit our website and check our details and grab the best deal.

    ReplyDelete
  12. I was trying to capture the solution related to Apache2 issues and then luckily I found your post. I got to know how can I use Cheap Dissertation Writing Services and eliminate my problems.

    ReplyDelete

  13. Awesome article. I enjoyed reading your articles. this can be really a good scan for me. wanting forward to reading new articles. maintain the nice work!
    Data Science Courses in Bangalore

    ReplyDelete
  14. I bookmarked your website because this site contains valuable information. I am very satisfied with the quality and the presentation of the articles. Thank you so much for saving great things. I am very grateful for this site.

    Data Science Training in Bangalore

    ReplyDelete
  15. I have voiced some of the posts on your website now, and I really like your blogging style. I added it to my list of favorite blogging sites and will be back soon ...

    Digital Marketing Training in Bangalore

    ReplyDelete
  16. I found Habit to be a transparent site, a social hub that is a conglomerate of buyers and sellers willing to offer digital advice online at a decent cost.

    Artificial Intelligence Training in Bangalore

    ReplyDelete
  17. The Extraordinary blog went amazed by the content that they have developed in a very descriptive manner. This type of content surely ensures the participants explore themselves. Hope you deliver the same near the future as well. Gratitude to the blogger for the efforts.

    Machine Learning Course in Bangalore

    ReplyDelete
  18. I am sure it will help many people. Keep up the good work. It's very compelling and I enjoyed browsing the entire blog.
    Business Analytics Course in Bangalore

    ReplyDelete
  19. Excellent Blog! I would like to thank you for the efforts you have made in writing this post. Gained lots of knowledge.
    Data Analytics Course

    ReplyDelete
  20. What an incredible message this is. Truly one of the best posts I have ever seen in my life. Wow, keep it up.
    AI Courses in Bangalore

    ReplyDelete
  21. This Is Most Useful And Give More Knowledge For Me And Let Me Share It For A lot Of People. And Don't Forget To Visit Me Back
    Python classes in Ahmednagar
    Python course in Ahmednagar
    Python training in Ahmednagar

    ReplyDelete
  22. This comment has been removed by the author.

    ReplyDelete
  23. I wonder how you became so capable to write such interesting and informative articles, anyway you are one of the best blogger in my eyes, Keep it up. Recommend every students who need programming help online

    ReplyDelete
  24. CRS Info Solutions have been shaping bright professionals in the field of salesforce by providing software training. It helps individuals train and become experts by developing their salesforce skills. The training can go from beginner level to advance while providing different certifications. Their website allows users to enroll in any of their salesforce online training programs and receive all the relevant study and practice materials to help you clear your salesforce examination. salesforce training for beginners

    ReplyDelete