Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Is there a way to debug php/css code remotely?
I know there are a addon to firefox but that seem to just work on "pure" php and can't handle the rest of the code (or I can't use it correctly)
If I get a whole forums code/database from a site to my own server I want to make changes and debug that easily, like step by step as you can do in debugging other code,
I want to debug the code on this "remote" server.
My knowledge of php is not even close to what it should be and now I've been asked to make a big change to that forum so I need lots of help doing it.
This change involves functions that are only there for moderators but some of that code I want to add for normal users, so the basic of it all I can take from different places.
This probably needs some changes in the database too, most likely adding of columns to some tables.
Anyone know that I can use and if that involves the FF-addon then what am I missing.
a browser add on can't really help much with server side code, as it never reaches the browser in the first place. php and css don't have much of anything in common either, as, unlike php, css is client side, so the two do their thing potentially thousands of miles apart...
so there's really no chance of debugging the code then
So why the AddOn to firefox then? most stuff of the php code comes from a database and are used to generate html code, I don't get it :P
how is a browser on your desk meant to have any input on code which is executed on the server? And "coming from the database" is even further away from a browsers remit.
It sounds like you're not really sure what you want to achieve in the first place, given the confusion between php and css. There are excellent tools like Firebug, but you need to know why you want to use them first.
Last edited by acid_kewpie; 03-23-2012 at 02:27 PM.
I'm an old programmer from the C# side(sorry for cussing) and in that you can debug every line of code include database code.
Since I'm not good enough at php I need to do a lot of debugging and see what happens in the code and how it will use the database data to produce the
html code that later will be shown.
Is the only thing I can do to learn php up to 90% so I can write all the code by hand and in my mind "see" what'll happen?
Firebug, think that was the thing I tried and sorry for asking, what is that? I thought it was a debug tool for php
and hence php inside html. Pure php, for me anyways, is useless since it's used to produce html code.
Yes, you're way off, you're making invalid comparisons between things that are not possible to compare, and you don't seem to understand the difference between clientside and serverside execution. Don't compare C# and PHP. Compare ASP or JSP to PHP. There are plenty of ways to debug it, but you need to first understand what there is to debug. you can enable PHP warnings etc, to let errors be printed into your code, you can write debugging messages to log files on the server, but this code runs on a SERVER, not a BROWSER.
When set, it'll barf out errors and warnings (depending on how the error_reporting directive is set) to your rendered page. Note the caveat about using it on production systems.
I know the difference between server side and client side execution but then I wonder how my old work mates debugged asp code in Visual Studio as I saw them stepped through the code line by line... ah well... lol
I got too little time to learn php and I'm gonna study that link you got me a lot, thx.
This type of thing though, just have to take a lot longer to debug then what I'm used to if you are like me a novice of the art of php, since you have to put like message boxes of variables and stuff
all over the place, nothing to do then just learn I guess lol
I develop a handful of small, internally-facing PHP apps, so display_errors and some contrived tests (with echo statements) has been sufficient for me. YMMV.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.