Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

500 error in Lemp 16.04 with PHP7 #81

Open
ebuy-4-you opened this issue Jan 3, 2017 · 14 comments
Open

500 error in Lemp 16.04 with PHP7 #81

ebuy-4-you opened this issue Jan 3, 2017 · 14 comments

Comments

@ebuy-4-you
Copy link

read of php info shows correct installation while index.php returns unable to handle this request.
HTTP ERROR 500 with the correct credentials .The setup is over letsEncrypt SSL

@shannah
Copy link
Owner

shannah commented Jan 3, 2017 via email

@ebuy-4-you
Copy link
Author

ebuy-4-you commented Jan 3, 2017

No errors in log must be in my security settings but i can not figer it out

@shannah
Copy link
Owner

shannah commented Jan 3, 2017

That is a problem if there are no errors in your error log. That error log is your only window into what PHP is doing. If there is a 500 error, it is reported in some log. Try creating a simple hello world php script, and confirm that it runs ok.
Then try adding an intentional syntax error in that script, and see if it writes anything to your error log. If not, you need to find our where the error is written, and/or add configuration to direct it to your log.

@ebuy-4-you
Copy link
Author

Hello World works fine when syntax error is given reports 500 again the thing is that i am not able to find where the error is my knowledge is limited ;)

@shannah
Copy link
Owner

shannah commented Jan 3, 2017 via email

@ebuy-4-you
Copy link
Author

ebuy-4-you commented Jan 3, 2017

huh this for Apache i am with Nginx the .htaccess i mean

@shannah
Copy link
Owner

shannah commented Jan 3, 2017 via email

@ebuy-4-you
Copy link
Author

ebuy-4-you commented Jan 3, 2017

thank you very much for your fast responds :) i thing the problem is Nginx's settings

@ebuy-4-you
Copy link
Author

ebuy-4-you commented Jan 4, 2017

Uninstalling and reinstalling reading here and there with out any mod in any part i found this in Nginx's error log

``Stack trace:
#0 /var/www/html/xataface/installer.php(533): xf_db_connect('localhost', 'root', 'XXXXXXXXXXXX...')
#1 /var/www/html/xataface/installer.php(548): db()
#2 {main}
thrown in /var/www/html/xataface/xf/db/drivers/mysql.php on line 2" while reading response header from upstream, client: 192.168.1.3, server: XXXXXXXXX.ga, request: "GET /xataface/installer.php HTTP/2.0", upstream: "fastcgi://unix:/run/php/php7.0-fpm.sock:", host: "XXXXXXXXX.ga"
2017/01/03 22:40:13 [error] 1958#1958: *57 FastCGI sent in stderr: "PHP message: PHP Fatal error: Uncaught Error: Call to undefined function mysql_connect() in /var/www/html/xataface/xf/db/drivers/mysql.php:2
Stack trace:
#0 /var/www/html/xataface/installer.php(533): xf_db_connect('localhost', 'root', 'XXXXXXXXXXX...')
#1 /var/www/html/xataface/installer.php(548): db()
#2 {main}
thrown in /var/www/html/xataface/xf/db/drivers/mysql.php on line 2" while reading response header from upstream, client: 192.168.1.3, server: XXXXXXXXXX.ga, request: "GET /xataface/installer.php HTTP/2.0", upstream: "fastcgi://unix:/run/php/php7.0-fpm.sock:", host: "XXXXXXXXX.ga"
2017/01/03 22:42:54 [error] 1958#1958: *57 FastCGI sent in stderr: "PHP message: PHP Fatal error: Uncaught Error: Call to undefined function mysql_connect() in /var/www/html/xataface/xf/db/drivers/mysql.php:2

php7.0-fpm.log

[03-Jan-2017 19:53:48] NOTICE: fpm is running, pid 2047 [03-Jan-2017 19:53:48] NOTICE: ready to handle connections [03-Jan-2017 19:53:48] NOTICE: systemd monitor interval set to 10000ms [04-Jan-2017 00:44:19] NOTICE: Terminating ... [04-Jan-2017 00:44:19] NOTICE: exiting, bye-bye! [04-Jan-2017 00:50:14] NOTICE: configuration file /etc/php/7.0/fpm/php-fpm.conf test is successful

@shannah
Copy link
Owner

shannah commented Jan 4, 2017

Looks like you don't have the mysql extension installed. You should use the mysqli driver in that case http://xataface-tips.blogspot.ca/2014/06/using-mysqli-in-xataface.html

@ebuy-4-you
Copy link
Author

ebuy-4-you commented Jan 5, 2017

Done replaced (remove) mysql driver with mysqli gave me this error

2017/01/05 02:19:39 [error] 1729#1729: *15 FastCGI sent in stderr: "PHP message: PHP Warning: require_once(xf/db/drivers/mysql.php): failed to open stream: No such file or directory in /var/www/html/xataface/installer.php on line 531 PHP message: PHP Fatal error: require_once(): Failed opening required 'xf/db/drivers/mysql.php' (include_path='.:lib') in /var/www/html/xataface/installer.php on line 531" while reading response header from upstream, client: 192.168.1.3, server: XXXXXXXXX .ga, request: "GET /xataface/installer.php HTTP/2.0", upstream: "fastcgi://unix:/run/php/php7.0-fpm.sock:", host: "XXXXXXXXX.ga"

then declared the driver in line 33 at
/var/www/html/xataface/installer.php
if ( !defined('XF_DB_DRIVER') ){ define('XF_DB_DRIVER','mysqli');

and of we go works like a charm :)

@shannah
Copy link
Owner

shannah commented Jan 5, 2017 via email

@ebuy-4-you
Copy link
Author

Step by step installing uninstalling reinstalling (now iam with 2.1.2 vertion) i managed after all these errors to see my apps first web screen :) but does not include all my conf.ini tables :( plus all the links are redirecting back to my main page

2017/01/06 00:21:45 [error] 1702#1702: *80 FastCGI sent in stderr: "PHP message: PHP Notice: Uninitialized string offset: -1 in /var/www/html/xataface/init.php on line 34 PHP message: PHP Warning: require_once(xf/db/drivers/mysql.php): failed to open stream: No such file or directory in /var/www/html/xataface/Dataface/Application.php on line 585 PHP message: PHP Fatal error: require_once(): Failed opening required 'xf/db/drivers/mysql.php' (include_path='.:/var/www/html/xataface:/var/www/html/xataface/lib:/usr/share/php') in /var/www/html/xataface/Dataface/Application.php on line 585" while reading response header from upstream, client: 192.168.1.3, server: XXXXXXXXXX.ga, request: "GET /xafacart/index.php HTTP/2.0", upstream: "fastcgi://unix:/run/php/php7.0-fpm.sock:", host: "XXXXXXXXXX.ga" 2017/01/06 00:22:40 [error] 1702#1702: *80 FastCGI sent in stderr: "PHP message: PHP Notice: Uninitialized string offset: -1 in /var/www/html/xataface/init.php on line 34 PHP message: PHP Warning: require_once(xf/db/drivers/mysql.php): failed to open stream: No such file or directory in /var/www/html/xataface/Dataface/Application.php on line 585 PHP message: PHP Fatal error: require_once(): Failed opening required 'xf/db/drivers/mysql.php' (include_path='.:/var/www/html/xataface:/var/www/html/xataface/lib:/usr/share/php') in /var/www/html/xataface/Dataface/Application.php on line 585" while reading response header from upstream, client: 192.168.1.3, server: XXXXXXXXXX.ga, request: "GET /xafacart/index.php HTTP/2.0", upstream: "fastcgi://unix:/run/php/php7.0-fpm.sock:", host: "XXXXXXXXXX.ga" 2017/01/06 00:29:40 [error] 1702#1702: *91 FastCGI sent in stderr: "PHP message: PHP Notice: Uninitialized string offset: -1 in /var/www/html/xataface/init.php on line 34" while reading response header from upstream, client: 192.168.1.3, server: XXXXXXXXXX.ga, request: "GET /xafacart/index.php HTTP/2.0", upstream: "fastcgi://unix:/run/php/php7.0-fpm.sock:", host: "XXXXXXXXXX.ga" 2017/01/06 00:32:30 [error] 1705#1705: *100 FastCGI sent in stderr: "PHP message: PHP Notice: Uninitialized string offset: -1 in /var/www/html/xataface/init.php on line 34" while reading response header from upstream, client: 173.252.90.119, server: XXXXXXXXXX.ga, request: "GET /xafacart/index.php HTTP/1.1", upstream: "fastcgi://unix:/run/php/php7.0-fpm.sock:", host: "XXXXXXXXXX.ga" 2017/01/06 00:32:45 [error] 1704#1704: *121 FastCGI sent in stderr: "PHP message: PHP Notice: Uninitialized string offset: -1 in /var/www/html/xataface/init.php on line 34" while reading response header from upstream, client: 31.13.112.122, server: XXXXXXXXXX.ga, request: "GET /xafacart/index.php HTTP/1.1", upstream: "fastcgi://unix:/run/php/php7.0-fpm.sock:", host: "XXXXXXXXXX.ga" 2017/01/06 00:32:46 [error] 1704#1704: *123 FastCGI sent in stderr: "PHP message: PHP Notice: Uninitialized string offset: -1 in /var/www/html/xataface/init.php on line 34" while reading response header from upstream, client: 31.13.114.54, server: XXXXXXXXXX.ga, request: "GET /xafacart/index.php HTTP/1.1", upstream: "fastcgi://unix:/run/php/php7.0-fpm.sock:", host: "XXXXXXXXXX.ga" 2017/01/06 00:32:48 [error] 1704#1704: *125 FastCGI sent in stderr: "PHP message: PHP Notice: Uninitialized string offset: -1 in /var/www/html/xataface/init.php on line 34" while reading response header from upstream, client: 173.252.115.164, server: XXXXXXXXXX.ga, request: "GET /xafacart/index.php HTTP/1.1", upstream: "fastcgi://unix:/run/php/php7.0-fpm.sock:", host: "XXXXXXXXXX.ga", referrer: "http://l.facebook.com/lsr.php?u=https%3A%2F%2FXXXXXXXXXX.ga%2Fxafacart%2Findex.php%23&ext=1483655866&hash=Acm7-oV5ZBxQoO_EOJvYKhMiHlH1ta6YDg4EUANIiUI3XA" 2017/01/06 00:35:23 [error] 1702#1702: *152 FastCGI sent in stderr: "PHP message: PHP Notice: Uninitialized string offset: -1 in /var/www/html/xataface/init.php on line 34" while reading response header from upstream, client: 5.54.20.64, server: XXXXXXXXXX.ga, request: "GET /xafacart/index.php HTTP/2.0", upstream: "fastcgi://unix:/run/php/php7.0-fpm.sock:", host: "XXXXXXXXXX.ga", referrer: "https://l.facebook.com/l.php?u=https%3A%2F%2FXXXXXXXXXX.ga%2Fxafacart%2Findex.php%23&h=xAQHziFpA&s=1" 2017/01/06 00:54:38 [error] 1702#1702: *157 FastCGI sent in stderr: "PHP message: PHP Notice: Uninitialized string offset: -1 in /var/www/html/xataface/init.php on line 34" while reading response header from upstream, client: 192.168.1.3, server: XXXXXXXXXX.ga, request: "GET /xafacart/index.php HTTP/2.0", upstream: "fastcgi://unix:/run/php/php7.0-fpm.sock:", host: "XXXXXXXXXX.ga", referrer: "https://XXXXXXXXXX.ga/xafacart/index.php"

@ebuy-4-you ebuy-4-you reopened this Jan 5, 2017
@shannah
Copy link
Owner

shannah commented Jan 6, 2017

Download the latest from github
https://github.com/shannah/xataface/archive/master.zip

Version will be 2.2.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants