Zen Cart Logo
Forums / Code Collaboration / easier development/ bug issues & Developers Tool Kit

easier development/ bug issues & Developers Tool Kit

Views: 3,445

Results 1 to 13 of 13
23 Nov 2014, 7:41 PM
#1
scooter avatar

scooter

New Zenner

Join Date:
Dec 2008
Posts:
80
Plugin Contributions:
1

easier development/ bug issues & Developers Tool Kit

hi,
so as many of us i hack zencart code and would like a faster way to edit
the desired file.

anyway might i suggest that if there is a click option for the title bar on a window of a
file called/searched up in the Developers Tool Kit that would actually bring up the file so it
could be edited.

imagine taking the other time wasting file searching & ftping out of the
site maintenance and development.!

24 Nov 2014, 1:51 PM
#2
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: easier development/ bug issues & Developers Tool Kit

The convenience of that would be very handy.
But there's a big problem with it ...
Editing PHP code with a browser is inherently problematic for a multitude of reasons ... including the fact that most web hosts have hacker detection tools built in to detect (and block) when someone is submitting PHP code or SQL queries via web forms. Also, most browser-based editors screw up the encoding of files, including incorrect character-sets and incorrect line-endings and adding stray characters to the files, all of which can result in hard-to-troubleshoot difficulties.
That's not to mention what the PCI people would say about it.

7 Dec 2014, 10:59 PM
#3
scooter avatar

scooter

New Zenner

Join Date:
Dec 2008
Posts:
80
Plugin Contributions:
1

Re: easier development/ bug issues & Developers Tool Kit

so maybe ..
you can still click on the title "location" and directly DL
the file to edit using php ftp calls? still would take out the

7 Dec 2014, 11:39 PM
#4
lhungil avatar

lhungil

Totally Zenned

Join Date:
Feb 2012
Location:
mostly harmless
Posts:
1,818
Plugin Contributions:
4

Re: easier development/ bug issues & Developers Tool Kit

Why not just keep all files on your local development computer / external hdd / NAS? Then test locally removing the need to be constantly using ftps (and being able to quickly search all files and file contents locally)?

In the above scenario ftp is only needed to do a single sync after changes have been verified locally (good ftps clients have an option to automatically upload only "newer files"). One can also do quick searches locally as well (no internet connection required). Saves alot of time (and steps when debugging / testing) while avoiding potential security (and other) concerns.

8 Dec 2014, 12:45 PM
#5
torvista avatar

torvista

Totally Zenned

Join Date:
Aug 2007
Location:
Gijón, Asturias, Spain
Posts:
2,874
Plugin Contributions:
7

Re: easier development/ bug issues & Developers Tool Kit

imagine taking the other time wasting file searching & ftping out of the
site maintenance and development.!

Why not just keep all files on your local development computer / external hdd / NAS? Then test locally removing the need to be constantly using ftps (and being able to quickly search all files and file contents locally)?

Exactly.
I fail to understand why people still insist on testing their hacks on a working production shop. It's making money, don't mess with it.
It appears everyone's code apart from mine always works first time with no repercussions!

(I believe) site maintenance/development/test should always be done LOCALLY and so file changes can be uploaded in one go. Its faster to find and edit locally, with no downtime or errors due to multiple files on the hosting in mid-edit.

8 Dec 2014, 6:58 PM
#6
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,812
Plugin Contributions:
15

Re: easier development/ bug issues & Developers Tool Kit

One consideration might be the database and its effect if the host and local PHP versions are different. Doesn't stop local work, just another thing to watch.

8 Dec 2014, 8:18 PM
#7
torvista avatar

torvista

Totally Zenned

Join Date:
Aug 2007
Location:
Gijón, Asturias, Spain
Posts:
2,874
Plugin Contributions:
7

Re: easier development/ bug issues & Developers Tool Kit

One consideration might be the database and its effect if the host and local PHP versions are different. Doesn't stop local work, just another thing to watch.
Every time I start hacking I import a copy of the real database to work on and I can't say I have ever had a database issue resulting from differing php versions, not to say that they don't exist.
php versions don't ever bother me as I use the latest php available locally (5.63 at the moment) and so see/sort any compatibility problems years before the hosting upgrades the production site.

8 Dec 2014, 9:10 PM
#8
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,812
Plugin Contributions:
15

Re: easier development/ bug issues & Developers Tool Kit

Shouldn't happen unless you change some password as the hash may be different. Not a common scenario but, thought it should be considered.

9 Dec 2014, 6:52 PM
#9
scooter avatar

scooter

New Zenner

Join Date:
Dec 2008
Posts:
80
Plugin Contributions:
1

Re: easier development/ bug issues & Developers Tool Kit

torvista:

Exactly.
I fail to understand why people still insist on testing their hacks on a working production shop. It's making money, don't mess with it.
It appears everyone's code apart from mine always works first time with no repercussions!
so here's a tip i learned back in '95 when building my first website..
if you name your old file that is working to bak or old you can always go home....
whats the big deal if your precious site is down for 90 sec while you rename your file.... ;~)
i am a craftsman by trade and a premio maestro (old master) told me once its not what
you can make its what you can fix!

data base has to be DL every time you want to work on your site seems like a lot of work
and coordination and not to mention the version of php has to be same .what if you have 2or 3
sites on different servers with versions of mysql or php?

of course i hack the files locally cause my editor makes all the functions ,
commands and variables such pretty colors,
but the time to find the file and download & upload time can be cut
down as said , as a easy way to DL the file to hack.
you've already searched and have the file location in the title location heading
it just has to be a clickable link.

anyway thanks for the chat

9 Dec 2014, 8:30 PM
#10
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,812
Plugin Contributions:
15

Re: easier development/ bug issues & Developers Tool Kit

.bak and .old violate PCI and make file vulnerable. Better to use your initials ( unless you're J Paul Getty.

9 Dec 2014, 10:43 PM
#11
lhungil avatar

lhungil

Totally Zenned

Join Date:
Feb 2012
Location:
mostly harmless
Posts:
1,818
Plugin Contributions:
4

Re: easier development/ bug issues & Developers Tool Kit

So your basic arguments for why you want these changes are:

  • You find yourself wasting a considerable amount time finding files on your computer (even when the location is listed in the admin search).
  • You are adamant about not keeping a copy of the files on your local computer, flash drive, external hard drive, and / or NAS (and using ftps to upload).
  • You feel anyone who has or gains access to your admin should be able to download and upload any and all files.
  • You believe the security risk is worth the convenience.
    I personally do not find these to be compelling reasons, but we can agree to disagree. IMHO, the security risks far outweigh the 5-15 seconds it takes for me to find the file and upload a new copy after testing.

scooter:

... if you name your old file that is working to bak or old you can always go home. ...
Doing this may "work" in many cases, but is not best practice and can lead to issues (not to mention security concerns). It is better to not leave backups in a public location (even with a renamed extension).

scooter:

... data base has to be DL every time you want to work on your site ...
Why? No need to be constantly synchronizing the data just to test changes to the code. More to the point I would strongly caution against testing with live customer / order data in a test environment.

scooter:

... not to mention the version of php has to be same ...
It takes me around five seconds (at most) to switch PHP versions locally.

The current issues with "passwords" and PHP versions do not affect testing code changes in a testing environment. They only affect the case where one is migrating to a new version or migrating to a new server. As we are not changing the data - just files - no reason to be overwriting the database - so no password issue.

scooter:

... the time to find the file and download & upload time can be cut down as said, as a easy way to DL the file to hack. You've already searched and have the file location in the title location heading
it just has to be a clickable link. ...
If the file is already on your computer and you know the location (either by searching your local computer or using the Zen Cart admin search function), how does letting you download a copy via the web browser save time over alternative workflows?

A good IDE can search files, folders, and contents of files quickly (local and remote files). A single click on the result will open the file for editing (downloading if needed). In a good IDE the previous click will also and focus the editor contents at the location of the search result. When done testing locally click "upload" in the IDE. Finally as a sanity check verify the changes are functional on the live site.

13 Dec 2014, 6:42 PM
#12
scooter avatar

scooter

New Zenner

Join Date:
Dec 2008
Posts:
80
Plugin Contributions:
1

Re: easier development/ bug issues & Developers Tool Kit

#youaresuchanass

i'm dyslectic and have attention deficit syndrome,you jerk.

dude i carry a flash drive to and from work with my website on it
i also rename my files with the date
where do you get off making those kind of statements ?
next time before you go on the internet go pull the wings off some flies
and take your aggressions out on them

14 Dec 2014, 1:29 PM
#13
divavocals avatar

divavocals

Totally Zenned

Join Date:
Jan 2007
Location:
Los Angeles, California, United States
Posts:
10,011
Plugin Contributions:
3

Re: easier development/ bug issues & Developers Tool Kit

torvista:

Exactly.
I fail to understand why people still insist on testing their hacks on a working production shop. It's making money, don't mess with it.
It appears everyone's code apart from mine always works first time with no repercussions!

(I believe) site maintenance/development/test should always be done LOCALLY and so file changes can be uploaded in one go. Its faster to find and edit locally, with no downtime or errors due to multiple files on the hosting in mid-edit.

nods in agreement:yes:

My experience is that sometimes shortcuts usually lead to BIGGER issues than simply taking the so-called "long way" around..