-1

My PHP page is showing blank page when I try and run it on the server by calling the IP to the windows server and the directory to it, when I try and run HTML on the same server it works.

When I run it on Apache localhost it works perfectly as well!

Can someone tell me whats the problem?

Suhaib Janjua
  • 3,452
  • 14
  • 56
  • 72
Yazaw
  • 11
  • 4
  • 2
    Possible duplicate of [How to get useful error messages in PHP?](http://stackoverflow.com/questions/845021/how-to-get-useful-error-messages-in-php) – user3942918 Feb 26 '17 at 15:29
  • this could be a permissions issue, run as an admin. I've seen that happen quite a few times. – Funk Forty Niner Feb 26 '17 at 15:30
  • I do run it as an admin but still same problem – Yazaw Feb 26 '17 at 15:31
  • *"when I try and run HTML on the same server it works"* - how are you accessing this as, `http://localhost` or `file:///`? and the file extension is? – Funk Forty Niner Feb 26 '17 at 15:31
  • I use an external HTML file like for example it has "alert("hello world") my HTML file works on server. And I access the files by typing the server-ip/files – Yazaw Feb 26 '17 at 15:32
  • see if error reporting throws anything. You need to post your full cod in regards to what you just posted in comments. – Funk Forty Niner Feb 26 '17 at 15:34
  • you've been given an "answer" below, see that. Nothing that hasn't really been said in comments though. – Funk Forty Niner Feb 26 '17 at 15:35
  • When I try phpinfo on my windows it works perfectly! I just can't seem to find the problem – Yazaw Feb 27 '17 at 11:29

1 Answers1

0

yeah, check the apache logs! probably your error reporting is off, it might be setting in your php.ini file (you can run php --ini to see files being used if you have shell access to server), just remember, there might a separate php.ini file used for running php shell from with command and separate for when it's run through web, just remember, get the right php.ini - this will show you errors :) and then you can see whats wrong with your app... on a linux server logs should be in /var/logs/httpd(or apache2 depending on your version)

btw. check this one http://php.net/manual/en/function.error-reporting.php

Tom St
  • 809
  • 8
  • 14