ctaque
By:
ctaque

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

January 4, 2017 462 views
Apache PHP Ubuntu

Hi,
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.
Thanks

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 195.2.253.2:60000] 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 195.2.253.2:60000] 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 195.2.253.2:60000] 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'

resolved.
It was a database driver error

Have another answer? Share your knowledge.