Solved

how to debug a php script

Posted on 2014-12-18
10
66 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
10 Comments
 
LVL 58

Accepted Solution

by:
Gary earned 125 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
 
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 125 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
What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

 
LVL 14

Assisted Solution

by:Giovanni Heward
Giovanni Heward earned 125 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 108

Assisted Solution

by:Ray Paseur
Ray Paseur earned 125 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

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Both Easy and Powerful How easy is PHP? http://lmgtfy.com?q=how+easy+is+php (http://lmgtfy.com?q=how+easy+is+php)  Very easy.  It has been described as "a programming language even my grandmother can use." How powerful is PHP?  http://en.wikiped…
Things That Drive Us Nuts Have you noticed the use of the reCaptcha feature at EE and other web sites?  It wants you to read and retype something that looks like this.Insanity!  It's not EE's fault - that's just the way reCaptcha works.  But it is …
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The viewer will learn how to dynamically set the form action using jQuery.

758 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now