4 ms·
I'm doing it in a really weird way, and I'm probably alone in this setup: 1. Various IDEs on my Windows machine writing PHP & HTML/CSS. 2. Saving all files ov
by Jaruzel 8y ago
I'm doing it in a really weird way, and I'm probably alone in this setup:
1. Various IDEs on my Windows machine writing PHP & HTML/CSS.
2. Saving all files over Samba to a Debian Web Server running Apache.
3. Once the code is complete and signed off, it's migrated to a production server.
4. Have a global error hook via 'set_error_handler' in each PHP file that 'echos' out the problem into the Browser. This doesn't help me with syntax errors though.
I'm fairly new to PHP development (Previously .NET dev), so I'm probably doing many things wrong here, and I'm totally open to suggestions, however I DO have to stick with Windows as my dev machine.
- oblio 8y agoWell, generally the modern day approach would be to: 1. Use source control. A good idea in general. 2. Have an automated deployment system that does the "saving files over Samba" for you. 3. Use a proper logging system and access the log files to see the errors.
- Jaruzel 8y agoAlready do #1 (kinda), do you have any suggestions for #2 and #3?
- stef25 8y ago1. Do it propery :) Here's a good guide: https://nvie.com/posts/a-successful-git-branching-model/ https://nvie.com/posts/a-successful-git-branching-model/ 2. Gitlab has solutions, Atlassian Bamboo, Buddy, FTPloy, Jenkins, etc. 3. Monolog https://github.com/Seldaek/monolog https://github.com/Seldaek/monolog
- davedx 8y agoAgree with 1. and 3. For 2. I don't really agree he should necessarily change that. SAMBA is nice and fast and painless. It really depends on whether that target machine will ever be used by anyone else to write code on.
- pbalau 8y agoNot doing php anymore, but I used to have a similar setup as yours, with the only difference that I had a FreeBSD server instead (that acted as my nfs, dev server and at the beginning as my router too, quite fond of that server, brought it from FreeBSD 4 to 8, with no reinstall, just hardware changes and software upgrades). At the job I had back then, we used to run a virtual machine on your dev computer and the ide we were using (netbeans afaik) could function properly over ftp. Since there was no real network between netbeans and the virtual machine, things were fairly fast. These days, albeit not doing php, but python, I use a docker image with my software installed and I'm mounting a local directory (where my sources are) to the container. Needs a bit of fine tuning, but works.