Php include fail, path and filename are corrects in a newly created droplet

Posted January 4, 2017 3.5k views

I have an include fail error in a website i just uploaded to a nnewly created droplet.
The website works well in my personal machine, i uploaded it with rsync ssh as root.
What can be wrong?
I would appreciate some help.

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
5 answers

What is the error? Does your personal machine environment match the Droplet?

Sorry, this is the error :
I have archlinux on my machine, with php 7.0.14, droplet has ubuntu 16.10 + php 7.0.8

[Wed Jan 04 13:43:36.976978 2017] [:error] [pid 18976] [client] PHP Warning:  include(inclusions/inc_header.php): failed to open stream: No such file or directory in /var/www/html/index.php on line 2
[Wed Jan 04 13:43:36.977383 2017] [:error] [pid 18976] [client] PHP Warning:  include(): Failed opening 'inclusions/inc_header.php' for inclusion (include_path='.:/usr/share/php') in /var/www/html/index.php on line 2
[Wed Jan 04 13:43:36.977597 2017] [:error] [pid 18976] [client] PHP Fatal error:  Uncaught Error: Class 'ProjetManager' not found in /var/www/html/index.php:53\nStack trace:\n#0 {main}\n  thrown in /var/www/html/index.php on line 53

this is ls -la in /var/www/html/inclusions/ :

drwxr-xr-x  2 1000 users 4096 Jan  4 14:09 .
drwxr-xr-x 14 root root  4096 Jan  4 14:10 ..
-rw-r--r--  1 1000 users 1592 Jan  3 14:21 inc_footer.php
-rw-r--r--  1 1000 users 7855 Jan  3 15:44 inc_header.php

actually this is the full error log after apache2 reinstall
It seems apache is crashing :

[Wed Jan 04 15:18:01.497627 2017] [mpm_prefork:notice] [pid 25384] AH00163: Apache/2.4.18 (Ubuntu) configured -- resuming normal operations
[Wed Jan 04 15:18:01.497770 2017] [core:notice] [pid 25384] AH00094: Command line: '/usr/sbin/apache2'
[Wed Jan 04 15:18:53.518668 2017] [mpm_prefork:notice] [pid 25384] AH00169: caught SIGTERM, shutting down
[Wed Jan 04 15:18:54.636550 2017] [mpm_prefork:notice] [pid 25682] AH00163: Apache/2.4.18 (Ubuntu) configured -- resuming normal operations
[Wed Jan 04 15:18:54.636658 2017] [core:notice] [pid 25682] AH00094: Command line: '/usr/sbin/apache2'

It was a database driver error