erhanharm
By:
erhanharm

Getting 500 Error while accesing a basic PHP File ( Wordpress Ubuntu Installed)

April 20, 2014 7.2k views
Hi guys, Here is my server IP http://95.85.55.217/ You can see the wordpress is working correctly. But i upload a basic PHP file to same folder with folder name arduino-push http://95.85.55.217/arduino-push/test.php?title=test&message=test It is not working. I am getting 500 Error. I set the permission of the arduino-push folder 755 . Nothing changed :(
6 Answers
to see the error instead of just 500 error, you probably need to first tell PHP to show errors:
at the TOP
error_reporting(E_ALL);
ini_set('display_errors' 1);
i accedently sent the previos message bfore i finished it and it seams you can't edit here so:


to see the error instead of just 500 error, you probably need to first tell PHP to show errors:
at the TOP of the file
error_reporting(E_ALL);
ini_set('display_errors' 1);

if you still don't see the errors
try to see the server log for errors:
on the terminal: tail /etc/log/httpd/error_log
or: tail /etc/log/syslog
of: tail /et/log/messages
@7ecc4baa

Thanks for your help.

I've added the PHP codes to my PHP file but nothing changed.

After that i connected to the machine via SSH , but i could not find the location /etc/log/httpd/error_log or /etc/log/syslog and /et/log/messages

You could said /var/log/apache2/ other_vhosts_access.log ?

i saw these lines :

XXX.XXX.XXX.XX XX.XXX.XXX.XXX(My IP's) - - [20/Apr/2014:14:35:19 -0400] "GET /arduino-push/test.php?title=Test&message=Test45 HTTP/1.1" 500 190 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.57 Safari/537.17"
Can you try with a simple php info file? Create a file in /var/www/arduino-push called info.php containing:



<?php

// Show all information, defaults to INFO_ALL
phpinfo();

?>

Hi @Andrew SB

Here is the file : http://95.85.55.217/arduino-push/info.php

It works fine! but i can not find any mistake for this configuration ? Could you see the mistake ?

Thanks
@erhanharm It looks like you fixed your problem! If you'd like to share how you did it, I'm sure the next person to have a similar problem would appreciate it.
Have another answer? Share your knowledge.