LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 12-16-2019, 10:37 AM   #1
pizzipie
Member
 
Registered: Jun 2005
Location: Hayden, ID
Distribution: Ubuntu 20.04
Posts: 441

Rep: Reputation: 12
Include file won't load ??? PHP - Apache2 AH00035 error


Hi,

I don't know what happened because my program was running fine multiple times over several days and then I started getting this error. I don't have a clue as to how to fix it . I think it has something to do with Apache2 and PHP interface???? The code (partial) that this happened on is as follows:

Code:
<?php
error_reporting (E_ALL ^ E_NOTICE);
//set_include_path('/home/rick/DB-sql/include' );
//include('myPhpFunctions.inc');  
include('/home/rick/DB-sql/myPhpFunctions.inc');          // contains check_input())

$rows=array();

   class MyDB extends SQLite3 {
      function __construct() {
         $this->open('linuxQuest.db');
      }
   }
   $db = new MyDB();
   if(!$db) {
      echo $db->lastErrorMsg();
   } else {
      echo "Opened database successfully\n";  
}

   $sql =<<<EOF
      SELECT * from query4;    // Costs is a view Table in the database   
EOF;

?>
When this runs the RESULT is this ERROR.


Quote:

[Sun Dec 15 13:29:24.261040 2019] [core:error] [pid 1346] (13)Permission denied: [client 127.0.0.1:37806] AH00035: access to /include/index.htm denied (filesystem path '/var/www/html/DB-sql/include/index.htm') because search permissions are missing on a component of the path
 
Old 12-16-2019, 10:44 AM   #2
boughtonp
Senior Member
 
Registered: Feb 2007
Location: UK
Distribution: Debian
Posts: 3,616

Rep: Reputation: 2555Reputation: 2555Reputation: 2555Reputation: 2555Reputation: 2555Reputation: 2555Reputation: 2555Reputation: 2555Reputation: 2555Reputation: 2555Reputation: 2555
As the error message says, permissions are missing.

Follow the instructions on this page: https://cwiki.apache.org/confluence/...rmissionDenied

Alternatively, it might be because there's a path mismatch - your code is referencing "/home/rick/DB-sql/include" but the error states "/var/www/html/DB-sql/include/index.htm" - perhaps DocumentRoot has changed in Apache config without the absolute include paths being updated correspondingly...

Last edited by boughtonp; 12-16-2019 at 10:49 AM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Can tar accept an "include file" (as opposed to an include pattern)? digitalformula Linux - Newbie 1 01-24-2013 09:18 AM
Apache2 won't load index.php files foucault Linux - Software 11 03-20-2010 09:08 PM
Apache2 won't load index.php files poojatangi Linux - Software 0 07-09-2008 06:22 PM
page won't load (apache2+php on TSL 2.1) restless Linux - Software 1 08-13-2004 09:54 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 08:04 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration