Debugging in PHP5

Need help installing PHP, configuring a script, or configuring a server? Then come on in and post your questions! We'll try to help the best we can!

Moderator: General Moderators

Post Reply
bkm_ho
Forum Newbie
Posts: 19
Joined: Mon Feb 11, 2008 12:25 am

Debugging in PHP5

Post by bkm_ho »

I hope this is the right place to ask questions about debugging!

Im getting a lot of lines similar to the following in my web browser:

Warning: fopen(/localhost/sitelive.com/systems/site/usr/log/security.log) [function.fopen]: failed to open stream: No such file or directory in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\sitelive.com\lib\log.php on line 29

I've setup various logs in the correct directory, but still getting the errors. any ideas where to start to debug?
User avatar
Christopher
Site Administrator
Posts: 13596
Joined: Wed Aug 25, 2004 7:54 pm
Location: New York, NY, US

Re: Debugging in PHP5

Post by Christopher »

The "No such file or directory in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\sitelive.com\lib\log.php" is pretty specific. Does that file exist? If you open Windows Explorer and paste "C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\sitelive.com\lib\" into the address bar, do you get a directory with log.php in it?
(#10850)
bkm_ho
Forum Newbie
Posts: 19
Joined: Mon Feb 11, 2008 12:25 am

Re: Debugging in PHP5

Post by bkm_ho »

yes the files i created and put in the directory. however i am not sure if they are correct; i created themand typed .LOG then saved as the various names specified in log.php. they are all php files.

im also getting an fatal error:
Fatal error: Cannot redeclare class DateTime in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\sitelive.com\lib\datetime.php on line 3

could this be something to do with the way apache is set up?
User avatar
Christopher
Site Administrator
Posts: 13596
Joined: Wed Aug 25, 2004 7:54 pm
Location: New York, NY, US

Re: Debugging in PHP5

Post by Christopher »

You are using a Unix path "/localhost/sitelive.com/systems/site/usr/log/security.log" on a Windows system.
(#10850)
User avatar
Weirdan
Moderator
Posts: 5978
Joined: Mon Nov 03, 2003 6:13 pm
Location: Odessa, Ukraine

Re: Debugging in PHP5

Post by Weirdan »

Fatal error: Cannot redeclare class DateTime in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\sitelive.com\lib\datetime.php on line 3
Recently php introduced builtin DateTime class - so you can't use this name for your own classes anymore.
Post Reply