[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

how to debug a php script

Posted on 2014-12-18
10
Medium Priority
?
75 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
Independent Software Vendors: 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!

 
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

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

This article discusses four methods for overlaying images in a container on a web page
Many old projects have bad code, but the budget doesn't exist to rewrite the codebase. You can update this code to be safer by introducing contemporary input validation, sanitation, and safer database queries.
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 and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
Suggested Courses

650 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