Solved

how to debug a php script

Posted on 2014-12-18
10
67 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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Generating table dynamically is the most common issue faced by php developers.... So it seems there is a need of an article that explains the basic concept of generating tables dynamically. It just requires a basic knowledge of html and little maths…
Author Note: Since this E-E article was originally written, years ago, formal testing has come into common use in the world of PHP.  PHPUnit (http://en.wikipedia.org/wiki/PHPUnit) and similar technologies have enjoyed wide adoption, making it possib…
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

920 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

11 Experts available now in Live!

Get 1:1 Help Now