?
Solved

how to debug a php script

Posted on 2014-12-18
10
Medium Priority
?
73 Views
Last Modified: 2014-12-19
HI

I would like to find the errors of a script Php and I do not know how to make him

tx
0
Comment
Question by:hexo dark
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
10 Comments
 
LVL 58

Accepted Solution

by:
Gary earned 500 total points
ID: 40508085
Enable error reporting, add this after your first opening <?php tag

error_reporting(E_ALL);

Open in new window

0
 
LVL 2

Author Comment

by:hexo dark
ID: 40508093
ok i test

edit
no error .. But the script not works

is possible to log all action of the script ?
0
 
LVL 58

Expert Comment

by:Gary
ID: 40508113
Post your code

(Don't edit your comment else I won't get notification of your reply)
0
Secure Your WordPress Site: 5 Essential Approaches

WordPress is the web's most popular CMS, but its dominance also makes it a target for attackers. Our eBook will show you how to:

Prevent costly exploits of core and plugin vulnerabilities
Repel automated attacks
Lock down your dashboard, secure your code, and protect your users

 
LVL 2

Author Comment

by:hexo dark
ID: 40508126
mm is not possible to Post the code for 1 raison

is not my code ( We asked me not to publish it  )
0
 
LVL 53

Assisted Solution

by:COBOLdinosaur
COBOLdinosaur earned 500 total points
ID: 40508128
If you are having a problem getting through the script, you need to track the critical variables that affect branching  just use var_dump() at the points where they are referenced and see what value is in them.

If you cannot post the code then You are not likely to get much help; and I guarantee you that you don't have anything so unques that we have not seen it.  Plus is has zero value if it does not work.

Cd&
0
 
LVL 15

Assisted Solution

by:Giovanni Heward
Giovanni Heward earned 500 total points
ID: 40508233
error_reporting(E_ALL);
ini_set('display_errors', 1);

Open in new window

0
 
LVL 2

Author Comment

by:hexo dark
ID: 40508591
is possible to create a text log to get all action of the script error or not ?

It is not the script the problem it is the changes of the concerned Web site which causes a blocking and would want to know or it block
0
 
LVL 111

Assisted Solution

by:Ray Paseur
Ray Paseur earned 500 total points
ID: 40508874
possible to create a text log to get all action of the script error or not ?
Yes.  Run this script, shown here in its entirety and look for "error_log" in the output.  
<?php phpinfo();

Open in new window


Follow the guidance here:
http://php.net/manual/en/function.error-log.php

it sounds like you might be new to PHP?  If so, this will point you to some good learning resources.
http://www.experts-exchange.com/Web_Development/Web_Languages-Standards/PHP/A_11769-And-by-the-way-I-am-new-to-PHP.html
0
 
LVL 2

Author Comment

by:hexo dark
ID: 40509630
ty  I did not find what block ...
0
 
LVL 2

Author Closing Comment

by:hexo dark
ID: 40509635
Thank  you all for your effort
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Foreword (July, 2015) Since I first wrote this article, years ago, a great many more people have begun using the internet.  They are coming online from every part of the globe, learning, reading, shopping and spending money at an ever-increasing ra…
This article discusses how to create an extensible mechanism for linked drop downs.
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
Suggested Courses

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question