You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Ethan Rosenberg <er...@hygeiabiomedical.com> on 2015/04/14 06:53:08 UTC

[users@httpd] Apache Installation

Dear List -

After trying everything I could think of, and hitting a brick wall, I did a clean installation of 
Apache2.

Rebooted.

PING localhost (127.0.0.1) 56(84) bytes of data.
64 bytes from localhost (127.0.0.1): icmp_seq=1 ttl=64 time=0.024 ms
64 bytes from localhost (127.0.0.1): icmp_seq=2 ttl=64 time=0.029 ms
^C
--- localhost ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 999ms
rtt min/avg/max/mdev = 0.024/0.026/0.029/0.005 ms

http://127.0.0.1/start.php

The requested URL /start.php was not found on this server.

What am I doing wrong??

TIA

Ethan

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Apache Installation

Posted by Yehuda Katz <ye...@ymkatz.net>.
Check your PHP error reporting level and/or error log for PHP errors.

- Y

On Wed, Apr 15, 2015 at 11:13 PM, Ethan Rosenberg <
erosenberg@hygeiabiomedical.com> wrote:

> On 04/14/2015 10:18 PM, Yehuda Katz wrote:
>
>> On Tue, Apr 14, 2015 at 9:05 PM, Eric Covener <covener@gmail.com <mailto:
>> covener@gmail.com>> wrote:
>>
>>     On Tue, Apr 14, 2015 at 10:36 AM, Ethan Rosenberg
>>     <erosenberg@hygeiabiomedical.com <mailto:erosenberg@
>> hygeiabiomedical.com>> wrote:
>>     > [Tue Apr 14 00:51:10.502172 2015] [:error] [pid 7610] [client
>> ::1:53486]
>>     > script '/var/www/html/start.php' not found or unable to stat
>>
>>     Something non-standard under /etc/apache2 or /.htaccess or
>>     /var/.htaccess or /var/www/.htaccess is mapping that request of
>>     /start.php to /var/www/html/start.php. I'd look at anything matching
>>     "html" or php in those configuration files and see what turns up.
>>     You should be familiar with grep -ri of configuration files.
>>
>>
>> That looks like the "standard" Debian/Ubuntu configuration starting with
>> 2.4.
>> The DocumentRoot is probably in /etc/apache2/sites-enabled/
>> 000-default.conf
>>
>> - Y
>>
> ----
>
> Yehuda -
>
> Thank you.
>
> Found it!
>
> root@meow:/home/ethan# grep -i root  /etc/apache2/sites-enabled/
> 000-default.conf
>         DocumentRoot /var/www/html
>
> Changed that and it finds the files.
>
> But .....
>
> This works perfectly
>
> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "
> http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
> <html xmlns="http://www.w3.org/1999/xhtml">
> <html>
>     <head>
>         <title>Test Connect2</title>
>         <meta http-equiv="Content-Type" content="text/html; charset=utf-8"
> />
>                 <style>
>                         body{
>                                 background-color: #89caeb;
>                                 width:100%;
>                                 height:100%;
>                                 position: relative;
>                         font-family: "Helvetica", "Arial" , "Liberation
> Sans", "Free sans", sans-serif;
>                                 overflow-y: scroll;
>                         }
>                 </style>
>
>     </head>
>                 <body>
>
>                         <strong>
>                         <div align='center'>
>                           <h3>Handle Weight</h3>
>                         </div>
>                         </strong>
>
>
>
> <?php
>
>
> $hostname="localhost";
> $database="Store";
> $username="ethan";
> $password="....";
>
> global $i;
>
>
> $link = mysqli_connect($hostname, $username, $password);
> if (!$link) {
> die('Connection failed: ' . mysql_error());
> }
> else{
>      echo "Connection to MySQL server " .$hostname . " successful!
> " . PHP_EOL;
> }
>
> $db_selected = mysqli_select_db($link, $database);
> if (!$db_selected) {
>     die ('Can\'t select database: ' . mysqli_error());
> }
> else {
>     echo 'Database ' . $database . ' successfully selected!';
> }
>
> ?>
>
>                 </body>
>         </html>
>
> This fails...It does not even change the background color or print the
> header
>
> <?php
> session_name("STORE");
> session_set_cookie_params( '24000', '/' );
> session_start();
> echo 'hello world';
> ?>
> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "
> http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
> <html xmlns="http://www.w3.org/1999/xhtml">
> <html>
>     <head>
>         <title>Handle Weight</title>
>         <meta http-equiv="Content-Type" content="text/html; charset=utf-8"
> />
>                 <style>
>                         body{
>                                 background-color: #89caeb;
>                                 width:100%;
>                                 height:100%;
>                                 position: relative;
>                         font-family: "Helvetica", "Arial" , "Liberation
> Sans", "Free sans", sans-serif;
>                                 overflow-y: scroll;
>                         }
>                 </style>
>
>     </head>
>                 <body>
>
>                         <strong>
>                         <div align='center'>
>                           <h3>Handle Weight</h3>
>                         </div>
>                         </strong>
> <?php
> <snip>
>
> Totally Confused
>
> TIA
>
> Ethan
>
>
>
>

Re: [users@httpd] Apache Installation

Posted by Ethan Rosenberg <er...@hygeiabiomedical.com>.
On 04/14/2015 10:18 PM, Yehuda Katz wrote:
> On Tue, Apr 14, 2015 at 9:05 PM, Eric Covener <covener@gmail.com <ma...@gmail.com>> wrote:
>
>     On Tue, Apr 14, 2015 at 10:36 AM, Ethan Rosenberg
>     <erosenberg@hygeiabiomedical.com <ma...@hygeiabiomedical.com>> wrote:
>     > [Tue Apr 14 00:51:10.502172 2015] [:error] [pid 7610] [client ::1:53486]
>     > script '/var/www/html/start.php' not found or unable to stat
>
>     Something non-standard under /etc/apache2 or /.htaccess or
>     /var/.htaccess or /var/www/.htaccess is mapping that request of
>     /start.php to /var/www/html/start.php. I'd look at anything matching
>     "html" or php in those configuration files and see what turns up.
>     You should be familiar with grep -ri of configuration files.
>
>
> That looks like the "standard" Debian/Ubuntu configuration starting with 2.4.
> The DocumentRoot is probably in /etc/apache2/sites-enabled/000-default.conf
>
> - Y
----

Yehuda -

Thank you.

Found it!

root@meow:/home/ethan# grep -i root  /etc/apache2/sites-enabled/000-default.conf
	DocumentRoot /var/www/html

Changed that and it finds the files.

But .....

This works perfectly

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<html>
     <head>
         <title>Test Connect2</title>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<style>
			body{
				background-color: #89caeb;
				width:100%;
				height:100%;
				position: relative;
    		        font-family: "Helvetica", "Arial" , "Liberation Sans", "Free sans", sans-serif;
				overflow-y: scroll;
  			}  			
		</style>		
	
     </head>
		<body>

			<strong>
			<div align='center'>
			  <h3>Handle Weight</h3>
			</div>
			</strong>



<?php


$hostname="localhost";
$database="Store";
$username="ethan";
$password="....";

global $i;


$link = mysqli_connect($hostname, $username, $password);
if (!$link) {
die('Connection failed: ' . mysql_error());
}
else{
      echo "Connection to MySQL server " .$hostname . " successful!
" . PHP_EOL;
}

$db_selected = mysqli_select_db($link, $database);
if (!$db_selected) {
     die ('Can\'t select database: ' . mysqli_error());
}
else {
     echo 'Database ' . $database . ' successfully selected!';
}

?>

		</body>
	</html>

This fails...It does not even change the background color or print the header

<?php
session_name("STORE");
session_set_cookie_params( '24000', '/' );
session_start();
echo 'hello world';
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<html>
     <head>
         <title>Handle Weight</title>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<style>
			body{
				background-color: #89caeb;
				width:100%;
				height:100%;
				position: relative;
    		        font-family: "Helvetica", "Arial" , "Liberation Sans", "Free sans", sans-serif;
				overflow-y: scroll;
  			}  			
		</style>		
	
     </head>
		<body>

			<strong>
			<div align='center'>
			  <h3>Handle Weight</h3>
			</div>
			</strong>
<?php
<snip>

Totally Confused

TIA

Ethan




---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Apache Installation

Posted by Yehuda Katz <ye...@ymkatz.net>.
On Tue, Apr 14, 2015 at 9:05 PM, Eric Covener <co...@gmail.com> wrote:

> On Tue, Apr 14, 2015 at 10:36 AM, Ethan Rosenberg
> <er...@hygeiabiomedical.com> wrote:
> > [Tue Apr 14 00:51:10.502172 2015] [:error] [pid 7610] [client ::1:53486]
> > script '/var/www/html/start.php' not found or unable to stat
>
> Something non-standard under /etc/apache2 or /.htaccess or
> /var/.htaccess or /var/www/.htaccess is mapping that request of
> /start.php to /var/www/html/start.php. I'd look at anything matching
> "html" or php in those configuration files and see what turns up.
> You should be familiar with grep -ri of configuration files.
>

That looks like the "standard" Debian/Ubuntu configuration starting with
2.4.
The DocumentRoot is probably in /etc/apache2/sites-enabled/000-default.conf

- Y

Re: [users@httpd] Apache Installation

Posted by Eric Covener <co...@gmail.com>.
On Tue, Apr 14, 2015 at 10:36 AM, Ethan Rosenberg
<er...@hygeiabiomedical.com> wrote:
> [Tue Apr 14 00:51:10.502172 2015] [:error] [pid 7610] [client ::1:53486]
> script '/var/www/html/start.php' not found or unable to stat

Something non-standard under /etc/apache2 or /.htaccess or
/var/.htaccess or /var/www/.htaccess is mapping that request of
/start.php to /var/www/html/start.php. I'd look at anything matching
"html" or php in those configuration files and see what turns up.
You should be familiar with grep -ri of configuration files.


-- 
Eric Covener
covener@gmail.com

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Apache Installation

Posted by Ethan Rosenberg <er...@hygeiabiomedical.com>.
On 04/14/2015 10:45 AM, Hendrik Schmieder wrote:
> Ethan Rosenberg schrieb:
>> On 04/14/2015 07:29 AM, Richard wrote:
>>>
>>> <snip>
>> made the following change in /etc/apache2/sites-available/default-ssl.conf
>>
>> DocumentRoot /var/www/
>>
>>
>> root@meow:/var/log# cat apache2/error.log
>> <snip>'
>> [Tue Apr 14 00:51:10.502172 2015] [:error] [pid 7610] [client ::1:53486]
>> script '/var/www/html/start.php' not found or unable to stat
>>
>> restarted Apache2
>>

<snip>

With this

<Directory /var/www/>
#       Options Indexes FollowSymLinks
#       AllowOverride None
#       Require all granted
</Directory>

I get a 403 error

With this

<Directory /var/www/>
        Options Indexes FollowSymLinks
        AllowOverride None
        Require all granted
</Directory>

I get a 404 error

In /etc/apache2/sites-available/default-ssl.conf

I have

DocumentRoot /var/www/

TIA

Ethan

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Apache Installation

Posted by Hendrik Schmieder <he...@jedox.com>.
Ethan Rosenberg schrieb:
> On 04/14/2015 07:29 AM, Richard wrote:
>>
>> <snip>
>> ------------ Original Message ------------
>>
>> - your ping indicates the reachability/responsiveness of the
>> host, it says nothing about a specific service.
>>
>> - that you got a "404" indicates that the httpd service is
>> running/responding.
>>
>> - the "404" is indicating that the file "start.php" is not
>> in the directory at the top of the document root of
>> the "primary host" in your apache setup, or otherwise
>> not accessible [if it's there and accessible, but php isn't
>> properly configured you'll get the php source, rather than
>> server-parsed output]:
>>
>> -- have you reviewed your apache configuration to be certain
>> of where the "document root" of your "primary host" is?
>>
>> -- have you checked to see if the file (start.php) is there
>> (and readable by user that apache runs as on your system)?
>>
>> -- have you checked your server logs (specifically the
>> error log in this case)?
>>
>> you need to do basic troubleshooting -- we can't do it for you.
>
> Richard -
>
> Thanks.
>
> "you need to do basic troubleshooting -- we can't do it for you"
>
> Totally agree. However, in this case, I did not know what to do. I am
> NOT an expert programmer.
>
> Sorry for the questions that follow, but I am still in the dark....
>
> -- have you reviewed your Apache configuration to be certain
> of where the "document root" of your "primary host" is?
>
> Looked in Apache2.conf and did not see any reference to primary host or
> document root.
>
> start.php is in /var/www
>
> made the following change in /etc/apache2/sites-available/default-ssl.conf
>
> DocumentRoot /var/www/
>
>
> root@meow:/var/log# cat apache2/error.log
> <snip>'
> [Tue Apr 14 00:51:10.502172 2015] [:error] [pid 7610] [client ::1:53486]
> script '/var/www/html/start.php' not found or unable to stat
>
> restarted Apache2
>
> root@meow:/var/www# ls -l start.php
> -rw-r--r-- 1 ethan ethan 1047 Mar 31 23:54 start.php
> root@meow:/var/www# chmod 777 start.php
> root@meow:/var/www# ls -l start.php
> -rwxrwxrwx 1 ethan ethan 1047 Mar 31 23:54 start.php
>
> 403 error???
>
> TIA
>
> Ethan
>

Apache is looking for
/var/www/html/start.php
and not for
/var/www/start.php

   Hendrik


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Apache Installation

Posted by Ethan Rosenberg <er...@hygeiabiomedical.com>.
On 04/14/2015 07:29 AM, Richard wrote:
>
> <snip>
> ------------ Original Message ------------
>
>   - your ping indicates the reachability/responsiveness of the
>       host, it says nothing about a specific service.
>
>   - that you got a "404" indicates that the httpd service is
>       running/responding.
>
>   - the "404" is indicating that the file "start.php" is not
>       in the directory at the top of the document root of
>       the "primary host" in your apache setup, or otherwise
>       not accessible [if it's there and accessible, but php isn't
>       properly configured you'll get the php source, rather than
>       server-parsed output]:
>
>       -- have you reviewed your apache configuration to be certain
>          of where the "document root" of your "primary host" is?
>
>       -- have you checked to see if the file (start.php) is there
>          (and readable by user that apache runs as on your system)?
>
>       -- have you checked your server logs (specifically the
>          error log in this case)?
>
> you need to do basic troubleshooting -- we can't do it for you.

Richard -

Thanks.

"you need to do basic troubleshooting -- we can't do it for you"

Totally agree.  However, in this case, I did not know what to do.  I am NOT an expert programmer.

Sorry for the questions that follow, but I am still in the dark....

-- have you reviewed your Apache configuration to be certain
           of where the "document root" of your "primary host" is?

Looked in Apache2.conf and did not see any reference to primary host or document root.

start.php is in /var/www

made the following change in /etc/apache2/sites-available/default-ssl.conf

DocumentRoot /var/www/


root@meow:/var/log# cat apache2/error.log
   <snip>'
[Tue Apr 14 00:51:10.502172 2015] [:error] [pid 7610] [client ::1:53486] script 
'/var/www/html/start.php' not found or unable to stat

restarted Apache2

root@meow:/var/www# ls -l start.php
-rw-r--r-- 1 ethan ethan 1047 Mar 31 23:54 start.php
root@meow:/var/www# chmod 777  start.php
root@meow:/var/www# ls -l start.php
-rwxrwxrwx 1 ethan ethan 1047 Mar 31 23:54 start.php

403 error???

TIA

Ethan



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Apache Installation

Posted by Richard <li...@listmail.innovate.net>.

------------ Original Message ------------
> Date: Tuesday, April 14, 2015 00:53:08 -0400
> From: Ethan Rosenberg <er...@hygeiabiomedical.com>
> To: Apache Mailing List <us...@httpd.apache.org>
> Cc: 
> Subject: [users@httpd] Apache Installation
>
> Dear List -
> 
> After trying everything I could think of, and hitting a brick
> wall, I did a clean installation of Apache2.
> 
> Rebooted.
> 
> PING localhost (127.0.0.1) 56(84) bytes of data.
> 64 bytes from localhost (127.0.0.1): icmp_seq=1 ttl=64 time=0.024
> ms
> 64 bytes from localhost (127.0.0.1): icmp_seq=2 ttl=64 time=0.029
> ms
> ^C
> --- localhost ping statistics ---
> 2 packets transmitted, 2 received, 0% packet loss, time 999ms
> rtt min/avg/max/mdev = 0.024/0.026/0.029/0.005 ms
> 
> http://127.0.0.1/start.php
> 
> The requested URL /start.php was not found on this server.
> 
> What am I doing wrong??
> 
> TIA
> 
> Ethan

 - your ping indicates the reachability/responsiveness of the
     host, it says nothing about a specific service.

 - that you got a "404" indicates that the httpd service is
     running/responding.

 - the "404" is indicating that the file "start.php" is not
     in the directory at the top of the document root of
     the "primary host" in your apache setup, or otherwise
     not accessible [if it's there and accessible, but php isn't
     properly configured you'll get the php source, rather than
     server-parsed output]:

     -- have you reviewed your apache configuration to be certain
        of where the "document root" of your "primary host" is?

     -- have you checked to see if the file (start.php) is there
        (and readable by user that apache runs as on your system)?

     -- have you checked your server logs (specifically the
        error log in this case)?

you need to do basic troubleshooting -- we can't do it for you.




---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org