Solved

how to debug a php script

Posted on 2014-12-18
10
71 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 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
Why Off-Site Backups Are The Only Way To Go

You are probably backing up your data—but how and where? Ransomware is on the rise and there are variants that specifically target backups. Read on to discover why off-site is the way to go.

 
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
 
LVL 15

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 110

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

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

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

Part of the Global Positioning System A geocode (https://developers.google.com/maps/documentation/geocoding/) is the major subset of a GPS coordinate (http://en.wikipedia.org/wiki/Global_Positioning_System), the other parts being the altitude and t…
This article discusses how to create an extensible mechanism for linked drop downs.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
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 …

690 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