[tags]yui, autocomplete, javascript, jquery, symfony[/tags]
Read full post
[tags]yui, autocomplete, javascript, jquery, symfony[/tags]
Read full post
So I started yesterday with Django, and I decided I didn’t want to futz with creating another mysql database that I’d need to manage, etc. Instead I’ll just use sqlite
.
I wanted to keep my sqlite
database within my project regardless of where I might move my project later. So I did this:
I confused a lot of people on IRC, but it’s really quite easy:
__file__
is the filename of the current script, very similar to PHP’s __FILE__
os.path.abspath
calculates the absolute path, hence the absolute path of the current fileos.path.join
does all the nasty business of joining paths together and figuring out what type of slashes are needed, etc.So really all we were doing is creating a relative path, but setting it absolutely.
Read full post
[tags]django, inheritance[/tags]
Read full post
[tags]php, python, symfony, frameworks, programming[/tags]
Read full post
I don’t fully understand utf-8 errors, but I’ve been getting this error.
Read full post
[tags]php, cgi, path_info, nginx, symfony[/tags]
symfony and other applications rely on the server’s PATH_INFO
being set properly. According to NCSA:
The extra path information, as given by the client. In other words, scripts can be accessed by their virtual pathname, followed by extra information at the end of this path. The extra information is sent as `PATH_INFO`. This information *should be decoded by the server* if it comes from a URL before it is passed to the CGI script.
Unfortunately, I use a nonstandard server that doesn’t natively support CGI, so everything sent to the FastCGI server is done so via parameters that are usually obtained from the HTTP request, but I can’t figure out how to do a urldecode
in my configuration.
So to workaround this I used the auto_prepend_file
directive in php.ini
. With OP code caching this shouldn’t hurt too much:
auto_prepend_file = /var/www/pathinfofix.php
I then added the following script:
<?php
$_SERVER['PATH_INFO'] = urldecode($_SERVER['ORIG_PATH_INFO']);
Voila, the PATH_INFO
is in a format that symfony (and any other PHP script that depends on PATH_INFO
) needs.
[tags]firefox, cache, xpi, https[/tags]
Read full post
[tags]jobs, yahoo, symfony[/tags]
Read full post