Web Dev Questions That Don't Need Their Own Thread v4
5,001 replies, posted
[QUOTE=01271;43773386][code]
[I][B]*/10[/B][/I] * * * * /usr/bin/php /cron/mongoUpdate.php
[/code][/QUOTE]
Is there any reason for that */10? Really curious, since I can't remember any time I've had to use it, so maybe I'm missing something.
Oh dear, I broke the forums.
*/10 is the same as doing 10,20,30,40,50
It's just faster to write.
Hey guys, perhaps this is a moron question, but I'm new to web development. I posted on Stack Overflow, but they weren't much help, so I was wondering if any of you could help. Here's a link, so as not to clutter up the thread:
[url]http://stackoverflow.com/questions/21501583/can-anybody-explain-why-these-two-actionresults-return-different-results-despite[/url]
I've heard it's poor design to use the ViewBag and that I should instead adopt a strongly-typed view, so I've started on that, but it's not really relevant to the issue. Anyone got any insight?
[QUOTE=Kwaq;43773250]What's a good portable http web server thing to use at college to get around the thing in chrome where assets cannot be loaded locally? It needs to run without admin privileges and I don't need MySQL or PHP, although it doesn't matter if those come with it!
EasyPHP crashed when I tried it and ZWAMP required admin perms so I'm a little stuck![/QUOTE]
Ruby & Sinatra, just stick everything in the public folder.
[QUOTE=01271;43773386][code]
SHELL=/bin/bash
PATH=/sbin:/bin:/usr/sbin:/usr/bin
MAILTO=
HOME=/
# For details see man 4 crontabs
# Example of job definition:
# .---------------- minute (0 - 59)
# | .------------- hour (0 - 23)
# | | .---------- day of month (1 - 31)
# | | | .------- month (1 - 12) OR jan,feb,mar,apr ...
# | | | | .---- day of week (0 - 6) (Sunday=0 or 7) OR sun,mon,tue,wed,thu,$
# | | | | |
# * * * * * user-name command to be executed
*/10 * * * * /usr/bin/php /cron/mongoUpdate.php
[/code]
what am I doing wrong? The file and folder are both 777 permissions but it doesn't run at all.
I've got engineX, php-fpm and this is a file that I can run via "php /cron mongoUpdate.php" command in my terminal.[/QUOTE]
[code]
# * * * * * user-name command to be executed
*/10 * * * * /usr/bin/php /cron/mongoUpdate.php
[/code]
I see user-name in the example above, but no user-name in the actual entry
maybe fix that?
- snip -
Slow server
[QUOTE=Moofy;43781975]I have a problem.
When I throw my files around in includes([I]require[/I]) my Less won't compile for some reason?
Everything is working, just not my Less. What the hell is wrong. Is this on purpose it won't compile? :suicide:
[editline]4th February 2014[/editline]
Also doing it clientside with the .js if that matters[/QUOTE]
And how does the code look?
[QUOTE=gokiyono;43782024]And how does the code look?[/QUOTE]
Snipped it, apparently the server was so slow it didn't quite get that I moved to includes. A good 10 minute wait fixed it all :suicide:
[QUOTE=Moofy;43782113]Snipped it, apparently the server was so slow it didn't quite get that I moved to includes. A good 10 minute wait fixed it all :suicide:[/QUOTE]
I wonder if that is the source of my troubles too
[QUOTE=gokiyono;43782204]I wonder if that is the source of my troubles too[/QUOTE]
Probably, our school sux
[QUOTE=Moofy;43782113]Snipped it, apparently the server was so slow it didn't quite get that I moved to includes. A good 10 minute wait fixed it all :suicide:[/QUOTE]
This was probably a caching issue and not the server speed.
[QUOTE=KmartSqrl;43784690]This was probably a caching issue and not the server speed.[/QUOTE]
Yea sorry about that I did mean caching, I'm just normally used to blame our school server because it literally is shite at times.
Question. When do you use AJAX on a website?
Expanding myself: I have a list of objects obtained via ajax from the server. The main reason I use it is for previous and next pages of those objects (less load on the server), some sorting...
And here comes my problem: I select different objects in different pages, so making those pages would require to make a script for each one of them, or to make a global one and rewrite all my pages, or something. (Other suggestions of how to handle this accepted)
Considering that it'd be a burden no matter what, I've been thinking of just giving it up and go back to the ol' GET. But should I?
[editline]4th February 2014[/editline]
...heh, I like how it sounds. "Expanding myself".
ARRRRRRRRRRRRRGHGHHHHGHGHSGH This is annoying me to hell. iOS 7 web app - loads jquery mobile page everything is fine on first page. Change page and it stops being fun and games, javascript isn't executed. I REALLY need help.
-- Okay so apparantly, the first page that is loaded with javascript is loaded? | Also happens on desktop
Also I'm doing $.mobile.changePage() and data-transition="slide" on <a> depending on if it needs to be change through javascript or links, both of them mess up.
------ update ----------
Works after a refresh, but A: That's stupid B: You can't do that on iOS web apps, so it won't succeed.
Why is it that on Internet explorer, my navigation bar looks like [IMG]http://puu.sh/6KUXU.jpg[/IMG] but on Chrome it looks like [img]http://puu.sh/6KV0e.jpg[/img]
I want it to look like the chrome version on all browsers...
Edit: Even on IE the nav bar has a purple outline...
Has anyone ever had any problems with symlinks slowing down page requests?
I've got a structure where I have a symlink named 'current' directing through to the latest revision stored in a seperate folder. The problem I'm having is it seems to of caused the page to generate a lot slower.
Any ideas?
[QUOTE=Shadow801;43798469]Has anyone ever had any problems with symlinks slowing down page requests?
I've got a structure where I have a symlink named 'current' directing through to the latest revision stored in a seperate folder. The problem I'm having is it seems to of caused the page to generate a lot slower.
Any ideas?[/QUOTE]
Is it linking to another drive (perhaps a slower one?)
[QUOTE=ENG.jonny;43797658]Why is it that on Internet explorer, my navigation bar looks like [IMG]http://puu.sh/6KUXU.jpg[/IMG] but on Chrome it looks like [img]http://puu.sh/6KV0e.jpg[/img]
I want it to look like the chrome version on all browsers...
Edit: Even on IE the nav bar has a purple outline...[/QUOTE]
a img{border: none;}
[QUOTE=djjkxbox360;43799704]a img{border: none;}[/QUOTE]
But that won't help the fact "CONTACT" goes to a new line...
[QUOTE=ENG.jonny;43799880]But that won't help the fact "CONTACT" goes to a new line...[/QUOTE]
It could, actually, since it'll no longer count the link borders.
It might do if the border was causing it to overflow. You might want to try using margin: 0px on the body. Otherwise you will have to shrink the navigation elements in width
I'm working on a barebones Wordpress-like content posting system (with php) and I've got a question.
I've got the automated installation working, where the user inputs the MySQL database information so the necessary tables can be set up. What is the best way to go about storing the MySQL login information so I can refer to it without the user having to input it again? Plaintext doesn't sound secure and storing it in MySQL obviously isn't an option. Any ideas?
[QUOTE=Cep.;43802263]I'm working on a barebones Wordpress-like content posting system (with php) and I've got a question.
I've got the automated installation working, where the user inputs the MySQL database information so the necessary tables can be set up. What is the best way to go about storing the MySQL login information so I can refer to it without the user having to input it again? Plaintext doesn't sound secure and storing it in MySQL obviously isn't an option. Any ideas?[/QUOTE]
You could store it in environment variables and read those from PHP, but I don't know how well you'll be able to do it that way on shared hosting. You should be find just sticking it in plaintext in a file that you include somewhere, just make sure that file is outside the web root or is disallowed via .htaccess or what not.
Finally got my VPS with 64bit Debian 7 at my hands.
Though I got told that "Why not 32bit?" - Because I don't use more than 4GB ram and whatnot. Is there some truth to this, I trust my source but I always go with 64bit but in case 32bit is a better option I would rather reinstall it with 32bit. :v:
[QUOTE=Moofy;43807973]Finally got my VPS with 64bit Debian 7 at my hands.
Though I got told that "Why not 32bit?" - Because I don't use more than 4GB ram and whatnot. Is there some truth to this, I trust my source but I always go with 64bit but in case 32bit is a better option I would rather reinstall it with 32bit. :v:[/QUOTE]
The difference should be negligible, however it's worth noting that RHEL no longer provide 32 bit images as of version 7. This may be a trend that continues.
[QUOTE=Moofy;43807973]Finally got my VPS with 64bit Debian 7 at my hands.
Though I got told that "Why not 32bit?" - Because I don't use more than 4GB ram and whatnot. Is there some truth to this, I trust my source but I always go with 64bit but in case 32bit is a better option I would rather reinstall it with 32bit. :v:[/QUOTE]
More programs are going 64-bit only so it wouldn't be a smart idea.
I've started to get into Web Development again, after being out of it for the last 10 months. And the dilemma I have right now is that I would like to develop on Windows since it's my main operating system, but at the same time I can't look over the big pros with using Linux. The fact being that everything in Linux integrates with the command line vs. Windows being mostly UI. I'm okay with running a VM on my desktop, but I would prefer not to.
And then I wonder how I should develop for most efficiency, since I have a VPS that I would like to have as main deployment server, and SVN is good and all but I want to jump onto the Git train since it's said to have more pros than cons over SVN.
[QUOTE=pdkm931;43820528]I've started to get into Web Development again, after being out of it for the last 10 months. And the dilemma I have right now is that I would like to develop on Windows since it's my main operating system, but at the same time I can't look over the big pros with using Linux. The fact being that everything in Linux integrates with the command line vs. Windows being mostly UI. I'm okay with running a VM on my desktop, but I would prefer not to.
And then I wonder how I should develop for most efficiency, since I have a VPS that I would like to have as main deployment server, and SVN is good and all but I want to jump onto the Git train since it's said to have more pros than cons over SVN.[/QUOTE]
I haven't really gotten into Git yet because I'm a slow bum. BUT from what makes sense and what I've heard, you shouldn't use git to deploy to production. Only for internal developing.
Not sure if that wasn't what you meant.
[QUOTE=Killervalon;43821400]I haven't really gotten into Git yet because I'm a slow bum. BUT from what makes sense and what I've heard, you shouldn't use git to deploy to production. Only for internal developing.
Not sure if that wasn't what you meant.[/QUOTE]
Of course so isn't SVN meant for live, but since I don't have any real projects going on. So am I currently trying to open up for more options (a bit hard when the only real backend I've used is PHP). Like currently trying to learn Ruby via CodeAcademy.
[QUOTE=Killervalon;43821400]I haven't really gotten into Git yet because I'm a slow bum. BUT from what makes sense and what I've heard, you shouldn't use git to deploy to production. Only for internal developing.
Not sure if that wasn't what you meant.[/QUOTE]
Git is way better to use for deployments than something like FTP. I use git to deploy every site that I have online right now (it's a more complex process than just 'git push' to the server, but git is definitely how the files get there)
Sorry, you need to Log In to post a reply to this thread.