Web Dev Questions That Don't Need Their Own Thread v4
5,001 replies, posted
Thanks anderson.
Also what is the stance on HTML and CSS checkers or 'validators', are they good for checking code?
[QUOTE=xianlee;41554211]Thanks anderson.
Also what is the stance on HTML and CSS checkers or 'validators', are they good for checking code?[/QUOTE]
They will tell you if your HTML / CSS is syntactically correct or not.
I figured this might be where I could get the quickest answer, anyway:
So I'm just helping someone doing website design, not professionally. I have very small knowledge in html, but I have come quite far with a good design using Microsoft FrontPage.
Now, that program is really ancient and I wondered if anyone of you knew a program that has pretty advanced but most importantly modern WYSIWYG (I think its called that way) editor and a html editor for some advanced bits. Of course preferred free, could cost up to 50 €.
Any help would be appreciated!
[QUOTE=phuwnaren;41557147]I figured this might be where I could get the quickest answer, anyway:
So I'm just helping someone doing website design, not professionally. I have very small knowledge in html, but I have come quite far with a good design using Microsoft FrontPage.
Now, that program is really ancient and I wondered if anyone of you knew a program that has pretty advanced but most importantly modern WYSIWYG (I think its called that way) editor and a html editor for some advanced bits. Of course preferred free, could cost up to 50 €.
Any help would be appreciated![/QUOTE]
Dreamweaver, Microsoft Expression Web.
[QUOTE=phuwnaren;41557147]I figured this might be where I could get the quickest answer, anyway:
So I'm just helping someone doing website design, not professionally. I have very small knowledge in html, but I have come quite far with a good design using Microsoft FrontPage.
Now, that program is really ancient and I wondered if anyone of you knew a program that has pretty advanced but most importantly modern WYSIWYG (I think its called that way) editor and a html editor for some advanced bits. Of course preferred free, could cost up to 50 €.
Any help would be appreciated![/QUOTE]
WYSIWYG always results in horrible HTML which is hard to maintain. It's far better to take a little while and learn some HTML and CSS which aren't hard and view the site in the actual browsers that people use.
People here would recommend Sublime Text 2, notepad++ and eclipse with PDT as non-WYSIWYG editors. Dreamweaver might be the best WYSIWYG HTML editor but I'd avoid it still.
Would you say its possible to learn html and css in ~1 weeks time, and create good looking web pages from scratch?
[QUOTE=phuwnaren;41557405]Would you say its possible to learn html and css in ~1 weeks time, and create good looking web pages from scratch?[/QUOTE]
What is the website you are working on and why does it need to be done in a week?
[QUOTE=KmartSqrl;41557715]What is the website you are working on and why does it need to be done in a week?[/QUOTE]
Its my dads company website. I usually don't work for him but since its summer break we've planned I could work for him this week.
Right now I'm planning to use WYSIWYG editor, and not care about how wonky the html code is going to be.
It's not that big of a site, and it doesn't need a very flashy homepage, so I'll go with Microsoft Expression Web for now.
If you're wondering, the more advanced bits is a google map plugin, and possibly some sort of a menu.
The google map plugin is not more advanced than knowing where to paste the html code from google, the menu is something I'll read more about, isntead of the whole html/css language.
Does it sound like a good idea or am doing something absolutely horrible to my dad now? I honestly don't know.
So I'm trying to send a form to a VPS with PHP and all that stuff installed. There are two scripts at the moment:
The default one, which works and does the job. I want to improve it, so I also have
The special one, with more features and redone code.
However, the special one for some reason doesn't display [B]anything[/B]. It doesn't send any output to the browser but a single space (even when I have a print "AAAAAAA"; right at the start of the script). I have apache2's error.log on another window, and it hasn't gotten any errors since I restarted it yesterday.
It's like sending data to a blackhole. Any ideas? I'm using Apache/2.2.22 (Ubuntu) PHP/5.3.10-1ubuntu3.6
[QUOTE=Coment;41558170]So I'm trying to send a form to a VPS with PHP and all that stuff installed. There are two scripts at the moment:
The default one, which works and does the job. I want to improve it, so I also have
The special one, with more features and redone code.
However, the special one for some reason doesn't display [B]anything[/B]. It doesn't send any output to the browser but a single space (even when I have a print "AAAAAAA"; right at the start of the script). I have apache2's error.log on another window, and it hasn't gotten any errors since I restarted it yesterday.
It's like sending data to a blackhole. Any ideas? I'm using Apache/2.2.22 (Ubuntu) PHP/5.3.10-1ubuntu3.6[/QUOTE]
Check your PHP configuration for output buffering and make sure you're not starting and not flushing it. Other than that, no idea. It's hard to guess the problem with so few information you've provided.
[QUOTE=phuwnaren;41557928]Its my dads company website. I usually don't work for him but since its summer break we've planned I could work for him this week.
Right now I'm planning to use WYSIWYG editor, and not care about how wonky the html code is going to be.
It's not that big of a site, and it doesn't need a very flashy homepage, so I'll go with Microsoft Expression Web for now.
If you're wondering, the more advanced bits is a google map plugin, and possibly some sort of a menu.
The google map plugin is not more advanced than knowing where to paste the html code from google, the menu is something I'll read more about, isntead of the whole html/css language.
Does it sound like a good idea or am doing something absolutely horrible to my dad now? I honestly don't know.[/QUOTE]
Your dad will survive.
I would however, if I were you, learn HTML/CSS and later remaking the whole site.
[QUOTE=Coment;41558170]So I'm trying to send a form to a VPS with PHP and all that stuff installed. There are two scripts at the moment:
The default one, which works and does the job. I want to improve it, so I also have
The special one, with more features and redone code.
However, the special one for some reason doesn't display [B]anything[/B]. It doesn't send any output to the browser but a single space (even when I have a print "AAAAAAA"; right at the start of the script). I have apache2's error.log on another window, and it hasn't gotten any errors since I restarted it yesterday.
It's like sending data to a blackhole. Any ideas? I'm using Apache/2.2.22 (Ubuntu) PHP/5.3.10-1ubuntu3.6[/QUOTE]
Do you have shell access? If you do run it from command line with the php -f option. This is often useful for finding issues.
[QUOTE=CBastard;41557371]WYSIWYG always results in horrible HTML which is hard to maintain. It's far better to take a little while and learn some HTML and CSS which aren't hard and view the site in the actual browsers that people use.
People here would recommend Sublime Text 2, notepad++ and eclipse with PDT as non-WYSIWYG editors. Dreamweaver might be the best WYSIWYG HTML editor but I'd avoid it still.[/QUOTE]
Sublime Text 3 is the new favourite.
Fixed positioning seems to have done it
[QUOTE=Dorkslayz;41563357]Sublime Text 3 is the new favourite.[/QUOTE]
Many big improvements over 2? Also, anyone know if old packages are still supported?
[QUOTE=Shadow801;41564378]Also, anyone know if old packages are still supported?[/QUOTE]
I don't think ST2 packages work in ST3 as they are, but AFAIK porting them isn't a big hassle.
I've seen that ST3 launches [B]much[/B] faster, nearly instant now.
I converted fully from ST to Bracket for some months ago. The live edit and simple layout is amazing. Only thing I've missed so far is multi line editing.
[QUOTE=xmariusx;41567693]I converted fully from ST to Bracket for some months ago. The live edit and simple layout is amazing. Only thing I've missed so far is multi line editing.[/QUOTE]
That's actually really neat; I'll have to play around with this.
Will people stone you with rocks if you use <b> and <i> instead of <strong> and <em>?
[QUOTE=Cronos Dage;41568284]Will people stone you with rocks if you use <b> and <i> instead of <strong> and <em>?[/QUOTE]
I'd suggest reading [url=http://html5doctor.com/i-b-em-strong-element/]this article[/url]. It explains on what is the official purpose of all the elements you mentioned in HTML5. They surely have an official purpose in HTML4 too - if that's what you're using.
Generally, I think you should consider <span> if your usage of those tags doesn't match with the official intended one.
edit: what else can you be stoned with?
[QUOTE=Cronos Dage;41568284]Will people stone you with rocks if you use <b> and <i> instead of <strong> and <em>?[/QUOTE]
Yes, consider using CSS if it's large chunks of text.
[QUOTE=khuba;41568350]I'd suggest reading [URL="http://html5doctor.com/i-b-em-strong-element/"]this article[/URL]. It explains on what is the official purpose of all the elements you mentioned in HTML5. They surely have an official purpose in HTML4 too - if that's what you're using.
Generally, I think you should consider <span> if your usage of those tags doesn't match with the official intended one.
edit: what else can you be stoned with?[/QUOTE]
hallucinogen and depressant drugs
[QUOTE=andersonmat;41561002]Do you have shell access? If you do run it from command line with the php -f option. This is often useful for finding issues.[/QUOTE]
After checking again the httpd.conf, looks like I set LogLevel to emergencies for some weird reason, so it wasn't telling me about the stupid ELSEIF that was provoking a fatal error...
...Now the problem is that it times out uploading 3KB files and operating with them. Great.
In fact, it happens on every script that isn't related to index one in any way. I mean, if I have functions_manager.php included on index.php, it will work when accessing index , and it will work as intended. However, if I have test.php and try to open it alone, it will bring up Cloudflare's Website Unreachable crap.
It's not about vhosts (I can access to that index with or without subdomain link), or about .htaccess (the only thing there is an extension hider and some custom error images).
I've tried the same script locally and it works (giving an error about mysql, but it shouldn't matter, 'cause that would make it print errors instead of resetting the connections, right?). However, on the server, not even a <?php phpinfo(); ?> file works.
I don't even...
[QUOTE]Other than that, no idea. It's hard to guess the problem with so few information you've provided. [/QUOTE]
Feel free to ask. I just don't want to blotter posts with links to not needed things.
Could somebody give me quick/easy/simple image resizing bit of code for PHP using GD library?
Don't need fancy stuff, just basic:
Get->Resize->Replace
Nothing else, the stuff I tried finding online just has too much things I don't need.
Thank you.
To anyone that is using/has used Node.js extensively: would you suggest it for general web dev? Or would you say it's only to be used in specific cases?
[QUOTE=Coment;41571741]However, if I have test.php and try to open it alone, it will bring up Cloudflare's Website Unreachable crap. (...) I've tried the same script locally and it works (giving an [b]error[/b] about mysql, but it shouldn't matter, 'cause that would make it print errors instead of resetting the connections, right?).[/QUOTE]
I've never worked with CloudFlare, but are you sure the "Connection unavailable" page isn't brought up because of a PHP error thrown out? If possible, try accessing the site via it's direct IP (bypass CloudFlare and see if it's still the same/timeout/whatever).
[QUOTE=Coment;41571741]However, on the server, not even a <?php phpinfo(); ?> file works.[/QUOTE]
The [i]phpinfo()[/i] function can be disabled on the server. Trying to call a disabled function gives an E_WARNING, but it could've been suppressed. If you have access to php.ini, check it for "disabled_functions". Check your "error_reporting" too - if it's set not to display warnings, there goes your explanation for phpinfo() returning an empty page.
[QUOTE=khuba;41574100]I've never worked with CloudFlare, but are you sure the "Connection unavailable" page isn't brought up because of a PHP error thrown out? If possible, try accessing the site via it's direct IP (bypass CloudFlare and see if it's still the same/timeout/whatever).[/QUOTE]
Nope, still Connection reset...
[QUOTE=khuba;41574100]
The [I]phpinfo()[/I] function can be disabled on the server. Trying to call a disabled function gives an E_WARNING, but it could've been suppressed. If you have access to php.ini, check it for "disabled_functions". Check your "error_reporting" too - if it's set not to display warnings, there goes your explanation for phpinfo() returning an empty page.[/QUOTE]
It's not, I've already used it previous times. Also, LogLevel is set to warn, and error_reporting is set to ALL except Notice, so it shouldn't be suppressed.
Plus, it's not that it gives an empty page, it's that it gives the Connection reset error page. At this point I'd kill for a white page.
[QUOTE=jetboy;41574013]To anyone that is using/has used Node.js extensively: would you suggest it for general web dev? Or would you say it's only to be used in specific cases?[/QUOTE]
I'm not going to say it is a one-size-fits-all language, there definitely are merits for it in a large number of cases. I personally think it is suited for a lot of work, and there are a large number of modules for node which allow it to do some pretty cool stuff.
[editline]24th July 2013[/editline]
I've had a few more thoughts so let me expand:
- node.js is great when you want granular control of how you want to handle HTTP traffic; something that you would [b]never[/b] have to do in PHP. This allows you to directly interact with the server.
- node.js, when deployed properly, has better support for concurrent sessions because it is asynchronous.
- [url=https://github.com/joyent/node/wiki/modules#wiki-templating]templating in node.js[/url] is super easy, both when paired with a front-end engine and doing rendering on the backend.
- it is very nice to have your interface and your back-end speaking the same language.
- unlike a language like PHP, you can very easily do in-memory storage that persists across multiple sessions. Because you have granular control over the environment, you can create "globally" accessible session data.
- node.js modules allow you to interface with C / C++ code. A lot of the libraries you will find for node.js will do this. Not only does this widen node's capabilities, but I imagine that it would yield a performance increase.
[editline]24th July 2013[/editline]
Also, this is a pretty good usage guide from one of the early contributors to node.js: [url]http://nodeguide.com/convincing_the_boss.html[/url]
[editline]24th July 2013[/editline]
Followed up with some disadvantages here: [url]http://facepunch.com/showthread.php?t=1250244&p=41579126&viewfull=1#post41579126[/url]
I have an email form on my website and if the message gets sent it directs them to my php with the message 'Email Sent'.
How do I customize the page more? just add html to the php file? and can I view it locally (offline) like when coding a website?
Sorry, you need to Log In to post a reply to this thread.