Please login or register. Welcome to the Studio, guest!


Quick Links:


newBookmarkLockedFalling

Eric

Eric Avatar



1,442


November 2005
Just out of curiosity, who all runs local servers on their boxes?

I have one LAMP system on my desktop, and I have a WAMP server on my laptop. My laptop has about 50 different vhosts (all of which are 2 letter combinations).

Chris

Chris Avatar

******
Head Coder

19,519


June 2005
I run XAMPP on this laptop. It's the easiest way to test coding for a big project... like the SZ website or YakBB, when I was working on it. I also use it to have a local calendar stored on my computer. :P

I don't have any virtual hosts. Had a bit of trouble (for some reason) setting up the first one, so I gave up and deleted it.

Michael

Michael Avatar
*Has a custom title*



1,462


October 2007
Nope, I just upload to test! :-/

Simie

Simie Avatar

******
ProScripter

1,052


May 2006
I have XAMPP on my desktop, and MAMP on my laptop. :P

Eric

Eric Avatar



1,442


November 2005
Chris Avatar
I don't have any virtual hosts. Had a bit of trouble (for some reason) setting up the first one, so I gave up and deleted it.

Really? It's all in the apache config.

Nope, I just upload to test! :-/
That seems... painful.

I have XAMPP on my desktop, and MAMP on my laptop. :P
Mac's. I love the way MAMP sounds when you pronounce it.

Chris

Chris Avatar

******
Head Coder

19,519


June 2005
I know it's all in the config, but for some reason it gave me plenty of trouble. I mean, I got the first working, but after that I just decided it wasn't worth it. :P

Eric

Eric Avatar



1,442


November 2005
NameVirtualHost *
<VirtualHost *>
   ServerName dbs
   DocumentRoot C:/Users/Eric/Zend/workspaces/DefaultWorkspace/DBSys
</VirtualHost>

<Directory C:/Users/Eric/Zend/workspaces/DefaultWorkspace/DBSys>
AllowOverride all
Options +Indexes
Order deny,allow
deny from all
allow from 127.0.0.1
</Directory>
<Directory C:/Users/Eric/Zend/workspaces/DefaultWorkspace/DBSys/*>
AllowOverride all
Options +Indexes
Order deny,allow
deny from all
allow from 127.0.0.1
</Directory>


An example of a config. You just need one for each VHost. Then you add in the ServerName to your etc/hosts file.


Last Edit: Jun 19, 2009 20:57:33 GMT by Eric

Simie

Simie Avatar

******
ProScripter

1,052


May 2006
I just use directories on one server :-X

Eric

Eric Avatar



1,442


November 2005
But then the incredibly easy use of "/" for absolute paths is removed. It's terrible and makes me want to cry inside!

Simie

Simie Avatar

******
ProScripter

1,052


May 2006
um. I guess I just use a constant in PHP for the root URL to solve that :P (and a constant value in any template engine I use) <a href="{root_url}index.php">Index</a>


Last Edit: Jun 19, 2009 21:32:10 GMT by Simie

Eric

Eric Avatar



1,442


November 2005
Simie Avatar
um. I guess I just use a constant in PHP for the root URL to solve that :P (and a constant value in any template engine I use) <a href="{root_url}index.php">Index</a>
To be honest, using constants like that makes me cringe. I use constants fairly often, but using them in every link, image, and script reference just seems wrong.

Simie

Simie Avatar

******
ProScripter

1,052


May 2006
Actually, I just thought of using
<base href ="http://localhost/blah" />

then any links with / would work fine.


... not sure if that works in every browser.

Eric

Eric Avatar



1,442


November 2005
Simie Avatar
Actually, I just thought of using
<base href ="http://localhost/blah" />

then any links with / would work fine.


... not sure if that works in every browser.
Well, you could do that or you could utilize apache properly. Or the route that I'd choose if I didn't feel like setting up VHosts would be a content parser that automatically adds it in for me.


BTW, how are templating engines for you?


Last Edit: Jun 19, 2009 22:36:14 GMT by Eric

Simie

Simie Avatar

******
ProScripter

1,052


May 2006
I normally just make a simple one myself. (just tags, no ifs or anything like that)
But a few months ago I experimented with one that supports basic functions...
svn.assembla.com/svn/proworks/trunk/Core/Modules/template.class.php

This was before I knew what a design pattern is =P (Which I only really understood when I started C++)

Eric

Eric Avatar



1,442


November 2005
Simie Avatar
I normally just make a simple one myself. (just tags, no ifs or anything like that)
But a few months ago I experimented with one that supports basic functions...
svn.assembla.com/svn/proworks/trunk/Core/Modules/template.class.php

This was before I knew what a design pattern is =P (Which I only really understood when I started C++)
Hm. I found it made much more sense just to use basic PHP. (if():, endif;, etc). When you get into something like smarty, it becomes just as complex as a whole new language. Even the simpler ones add additional processing to the load.

newBookmarkLockedFalling