-4

I don't know why everything works fine in my server but when I download the code and try to run it in my localhost using WAMP I get thousands of warnings & notices.

Why am I not getting these errors in my server and why am I getting those here?

Sometimes I am wondering if markup is left as <? it works fine in my hosting server but not in my localhost server.

Is there anyway to ignore PHP markup errors so that it runs as it runs in my server?

Kerry
  • 1,041
  • 5
  • 13
  • 23
  • That is `short_open_tag` and for the sake of programming and mobility you should avoid using them. other wise you can open them from `php.ini` - `short_open_tag = On`. Check http://stackoverflow.com/questions/2185320/how-to-enable-php-short-tags – Mihai Iorga Mar 25 '13 at 13:38
  • 2
    Keep in mind the difference between "warnings" and "errors." You can't ignore errors, you have to fix them. And while you _can_ ignore warnings, you probably _shouldn't_ as it would be better to fix those as well. Having said that, what are the actual errors and/or warnings you're seeing? – David Mar 25 '13 at 13:38

2 Answers2

0

In development you turn on all warnings und error, for example by error_reporting http://www.php.net/manual/en/function.error-reporting.php

In live system you dont want this, so normaly its turned completly off by error_reporting(0);

JaMaBing
  • 1,051
  • 14
  • 32
-1

You could try putting:

error_reporting(0);

and see if that makes any difference. It may be that when you downloaded the files, there are some paths that are wrong, or a configuration file isn't set up to run locally with your paths.

It may be that your site was set up to point to http://blah.com and now it's locally on http://localhost/blah and can't find any files.

Ben Harvey
  • 1,793
  • 2
  • 16
  • 23
  • I totally deserve that downvote. I didn't elaborate any more on the answer.I usually turn errors and warnings off to see if anything works (to see if it's some kind of server configuration issue) then turn errors back on - `error_reporting(ERRORS)` - and fix them. Then I'll turn the warnings back on and work through those. – Ben Harvey Mar 25 '13 at 22:48