Wedge
Public area => The Pub => Topic started by: sokha on June 30th, 2011, 02:27 PM
-
I guess wedge will sooner or later be in public. I know many people use apache webserver but I prefer to use lighttpd instead. As I read in the FAQ(http://wedge.org/pub/faq/), it says:
Server side:
PHP 5.1.2 or higher, 5.2 or higher recommended
MySQL 4.1.2 or higher, 5.0 or higher recommended
GD2 graphic library for PHP
I would like to ask will wedge work 100% on lighttpd?
-
lighttpd, yes, seeing how it is intended to be 100% compatible with Apache. Have they fixed the ridiculously crippling memory leaks yet?
nginx is a different story altogether, and it's possible the pretty URLs code will need tweaking to work on it.
-
Our pretty URLs shouldn't need much work. It's just a matter of changing one line basically... And I'm sure it has some suitable replacement for it ;)
-
That's not what I was thinking of. nginx doesn't use .htaccess files AT ALL. The entire way of setting up routing is different.
-
As for IIS7, it has url rewrite and web.config, also it has a converter that convert mod-rewrite to url rewrite rules, so it should work on IIS7 with no problem.
-
Since I am not php coder, I have a question. Is it possible to handle the fancy URL in php code instead of .htaccess or in webserver?
-
No.
The .htaccess file is the part that handles the fancy URL and passes it to PHP.
You can, on some configurations, get around it by constructing URLs in the form of index.php/rest-of-link/whatever but it's ugly and unreliable.
-
The .htaccess file is the part that handles the fancy URL and passes it to PHP.
Actually it's the Apache module called "mod_rewrite" that does that, all .htaccess does is store the configurations for Apache and it modules (including "mod_rewrite") per directory. :eheh:
Same applies with IIS, URL Rewrite and web.config.
-
I'd say yes, actually... You'll still need to edit .htaccess or httpd.conf once, but once it's done it's done.
Just redirect all missing files to index.php, either through ErrorDocument 404 (very bad idea since it fills the error log instead of the access log), or a rewrite rule on -f and -d parameters (missing file/folder).
Wedge comes with its own pre-made .htaccess with includes these for our pretty url implementation.
-
The .htaccess file is the part that handles the fancy URL and passes it to PHP.
Actually it's the Apache module called "mod_rewrite" that does that, all .htaccess does is store the configurations for Apache and it modules (including "mod_rewrite") per directory. :eheh:
Same applies with IIS, URL Rewrite and web.config.
Yes, I know that. I was keeping the answer as straightforward as possible.I'd say yes, actually... You'll still need to edit .htaccess or httpd.conf once
Then the answer IS no. The question asked was whether it could be done without .htaccess, which other than the index.php/url structure, pretty URLs cannot be done *just* in PHP, it relies on the web server routing properly.
-
I was just answering to his question in case he phrased it badly, i.e. he wanted to know if new URL schemes could be added without rewriting the htaccess itself (since it requires some prior knowledge). In PHP at least you can do without regex, even if it's strongly recommended to use them.
-
Hmm, well, I've come to the conclusion of assuming the lowest common denominator as far as anyone is concerned these days: if someone is interested in the finer points, they'll probably ask in a way that suggests it - while if someone asks a broad question, they probably don't want details.
Yeah, it's nice that it's extensible without having to be complicated in terms of editing the htaccess file now.
-
The .htaccess file is the part that handles the fancy URL and passes it to PHP.
Actually it's the Apache module called "mod_rewrite" that does that, all .htaccess does is store the configurations for Apache and it modules (including "mod_rewrite") per directory. :eheh:
I ever knew and work with .htaccess of apache for a while. Yes, .htaccess work only with apache as far as I know.I'd say yes, actually... You'll still need to edit .htaccess or httpd.conf once, but once it's done it's done.
Just redirect all missing files to index.php, either through ErrorDocument 404 (very bad idea since it fills the error log instead of the access log), or a rewrite rule on -f and -d parameters (missing file/folder).
Yes, this is what I was thinking.Wedge comes with its own pre-made .htaccess with includes these for our pretty url implementation.
I ever used apache2 before. At my site, there are plenty files to download and stream (audio). Before, apache always ate all of my server CPU and memory. I can't figure out how to tweak it (I used mod_php). Since it is hard to optimize, then I switched to lighttpd. It works perfectly as I need.
-
So, what did I win? :eheh:
-
It's a common configuration to have all non-existent URLs forwarded to PHP. I know that lighttpd also supports X-Sendfile, so technically I guess you could forward ALL requests to PHP even.
Although this does require configuration, basically most other PHP packages require it too, so it doesn't seem like a hefty requirement. Falling back to pathinfo (index.php/xyz) is easy enough, too.
Note that many nginx and lighttpd servers are configured to disallow pathinfo requests because of some gotchas in configuring them with PHP. There are correct ways to configure them with pathinfo working, but many people don't do this. So, pathinfo actually becomes the less universal solution.
-[Unknown]
-
And Wedge got rid of pathinfo :)