What I'm trying to do is use Zend_Auth for authentication with the issuing being that the 'identity' is stored in a different table then then 'credential.' I'm able to pass an array for the credential and the identity but when it comes to the actual tables I'm not able to get it to accept the array. It ignores the 2nd table name. I was wondering if anyone has ever made this work in this way without extending the Zend_Auth class or if I will need to do so.
Thanks in advance.
I want to Zend_Auth and Zend_Session to save user sessions and logins information
whats the easy and best way for implements following items:
1-Disallow multiple concurrent logins for the specific user
2-List all of all user currently logged in
3-Admin could logout of specific user or destroy specific session
Is there any special ZF or PHP API or library that can do the above?
thanks
Hello,
We're using path-based-authorization module for Apache SVN.
It all works fine, except that when users try to check out code they have access to, their SVN clients get confused if they don't have at least read access to the parent directories - all the way up to root. It works, but some clients just get confused sometimes.
Because SVN path-based-authorization is recursively applied, we don't want to give all users read access to root, because that would give them access to all source code in the repository. It would, however, be acceptable if users could get directory listings (just not actual lines of code) for the entire repository. This would prevent the svn clients from getting confused.
Does any one know how to grant permissions to get directory listings without granting permissions to the actual contents of the files?
Thanks!
My VB6 application which runs successfully on many machines is producing the above error on just 1 users machine. Machine has Vista SP1 which means the MDAC installer will not work since MDAC 2.8 is already included.
Code that leads up to the error:
'Temp file to users temp directory:
FileName = C:\DOCUME~1\nmiller\LOCALS~1\Temp\TmpPrint.mdb
Dim catADO As New ADOX.Catalog
catADO.Create "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & FileName
Error happens on the .Create line.
Any help getting this user going would be greatly appreciated!
Hello all,
I am pretty new to the Zend framework and looking to build an application with pretty tight password security. I have been trying to follow the user guides in relation to password salting but haven't had any luck so far. I have setup my database and table adapter (As described in the documentation on the Zend Framework site but it didn't seem to finish the example (or I am not following well enough!) I have started with:
$authAdapter = new Zend_Auth_Adapter_DbTable($dbAdapter,
'users',
'username',
'password', "MD5(CONCAT('".Zend_Registry::get('staticSalt')."', ?, password_salt))"
);
But from here, what is done with the password salt? I just need an example and I'll be away! Does anyone have an example or point me in the right direction??
Many thanks!
I am trying to set up the Django Helper for App Engine on PyDev in Mac OsX. Unfortunately, I keep getting the message in the title in the following line:
from django.conf import settings
How can I fix this?
If I set test mode in Authorize.net account on their website, everything is OK. But if I set live mode, I get:
There has been an error processing your credit card
Please try again and if problems persist, please try another payment method.
I suspected SSL certificate, shall I have purchased SSL certificate, or I can set self-issued on PROD server?
What's the best way to integrate my flv player in drupal ? Using SWF tools ?
In case I use SWF tools, should I somehow pass the flv video path to the player, right ? Is there any documentation about this ?
thanks
Hi friends,
The issue is this:
I have a web application that runs on a PHP server. I'd like to build a REST api for it.
I did some research and I figured out that REST api uses HTTP methods (GET, POST...) for certain URI's with an authentication key (not necessarily) and the information is presented back as a HTTP response with the info as XML or JSON (I'd rather JSON).
My question is:
1. How do I, as the developer of the app, build those URI's? Do I need to write a PHP code at that URI?
2. How do I build the JSON objects to return as a response?
I hope I was clear enough.
Thanks!
I am use drupal 6.
it seems like permission page can not save too many settings.
I have try to save permission setting, but it is just not saved into DB.
I have found out this is due to "too many fields". (use content permission module).
if i uncheck some fields, and then checking lesser fields, permission will be saved.
for example, if I am unchecking 2 check boxes, then checking one check box, permission will be saved.
does any one know which function the permission page used to insert result into db?
my php memory limit is 256M.
I'm writing a little python script to get stats from several servers or a single server, and I'm using OptionParser to parse the command line input.
#!/usr/bin/python
import sys
from optparse import OptionParser
...
parser.add_option("-s", "--server", dest="server", metavar="SERVER", type="string",
help="server(s) to gather stats [default: localhost]")
...
my GOAL is to be able to do something like
#test.py -s server1 -s server2
and it would append both of those values within the options.server object in some way so that I could iterate through them, whether they have 1 value or 10.
Any thoughts / help is appreciated. Thanks.
From the documentation:
os.path.realpath(path)
Return the canonical path of the specified filename, eliminating any
symbolic links encountered in the path (if they are supported by the
operating system).
When I invoke this with an extant file's name, I get the path to it: /home/myhome/myproject.
When I invoke this with a 'nonsense.xxx' string argument, I still get a path to /home/myhome/myproject/nonsense.xxx. This is a little inconsistent because it looks like nonsense.xxx is taken to be a directory not a file (though it is neither: it does not exist).
When I invoke this with a null string file name, I still get a path to /home/myhome/myproject.
How can I account for this behaviour when the documentation says so little about realpath()? (I am using Python 2.5.)
Edit: Somebody suggested a way to test if files exist. My concern is not to test if files exist. My concern is to account for behaviour.
I have a directory structure:
example.py
templates/
__init__.py
a.py
b.py
a.py and b.py have only one class, named the same as the file (because they are cheetah templates). For purely style reasons, I want to be able to import and use these classes in example.py like so:
import templates
t = templates.a()
Right now I do that by having this in the template folder's __init__.py:
__all__ = ["a", "b"]
from . import *
However, this seems pretty poor (and maybe superfluous), and doesn't even do what I want, as I have to use the classes like this:
t = templates.a.a()
Thoughts?
We have a content type with two imagefield / filefield fields, and after migrating our site to a new server, we have the following problem:
When we submit a new item for this content type, with two images for those fields, drupal gives us the following error and does not upload the images:
warning:
fopen(sites/default/files/.htaccess)
[function.fopen]: failed to open
stream: Permission denied in
/websites/sitename/data/sites/all/modules/filefield/field_file.inc
on line 349. warning:
fopen(sites/default/files/.htaccess)
[function.fopen]: failed to open
stream: Permission denied in
/websites/sitename/data/sites/all/modules/filefield/field_file.inc
on line 349. An image thumbnail was
not able to be created. warning:
fopen(sites/default/files/.htaccess)
[function.fopen]: failed to open
stream: Permission denied in
/websites/sitename/data/sites/all/modules/filefield/field_file.inc
on line 349. warning:
fopen(sites/default/files/.htaccess)
[function.fopen]: failed to open
stream: Permission denied in
/websites/sitename/data/sites/all/modules/filefield/field_file.inc
on line 349. An image thumbnail was
not able to be created.
I understand this is a permissions error, but it is not clear to me where do I have to change permissions.
Line 349 of file.inc has the following code:
if (($fp =
fopen("$directory/.htaccess", 'w')) &&
fputs($fp, $htaccess_lines)) {
fclose($fp);
chmod($directory .'/.htaccess', 0664);
}
else {
$repl = array('%directory' = $directory, '!htaccess' =
nl2br(check_plain($htaccess_lines)));
form_set_error($form_item, t("Security warning: Couldn't write
.htaccess file. Please create a
.htaccess file in your %directory
directory which contains the following
lines:!htaccess",
$repl));
I know it's a Windows PE32, but I also know that the unit of deployment in .NET is an assembly which in turn has a manifest and can be made up of multiple managed modules.
My questions are :
1) How would you create multiple managed modules when building a project such as a class lib or a console app etc.
2) Is there a way to specify this to the compiler(via the project properties for example) to partition your source code files into multiple managed modules.
If so what is the benefit of doing so?
3)Can managed modules span assemblies?
4)Are separate file created on disk when the source code is compiled or are these created in memory and directly embedded in an assembly?
class Crypt_Data {
protected $_mcrypt=null;
protected $_iv=null;
protected $_key=null;
public function __construct() {
$this->_mcrypt = mcrypt_module_open('rijndael_256', '', 'cbc', '');
$key_size = mcrypt_enc_get_key_size($this->_mcrypt);
for($i=0;$i<$key_size;$i++) $test_key .= "0";
$this->_iv = $test_key;
$this->_key = $test_key;
mcrypt_generic_init($this->_mcrypt,$this->_key,$this->_iv);
}
public function dataEncrypt($data) {
return base64_encode(mcrypt_generic($this->_mcrypt, $data));
}
public function dataDecrypt($data) {
return mdecrypt_generic($this->_mcrypt, base64_decode($data));
}
}
$crypt = new Crypt_Data();
$string = "encrypt me";
$encrypted = $crypt->dataEncrypt($string);
echo $encrypted."<BR>";
$decrypted = $crypt->dataDecrypt($encrypted);
echo $decrypted."<BR>";
output:
JJKfKxZckkqwfZ5QWeyVR+3PkMQAsP0Gr1hWaygV20I=
qÌÌi_ÖZí(®`iÜ¥wÝÿ ô0€Í6Ÿhf[%ër
No idea why this isn't working, everything seems to be fine on my end.. i tried decrypting it with mcrypt_cbc(); and it decrypted it properly.. so it has something to do with my mdecrypt_generic.. any ideas?
I am writing a tomcat app, and have a need to do authentication within the URL like this:
https://user:[email protected]
Except for the life of me i'm not sure how to set it up or able to find the docs to read up on it, clearly my google skills need work.
Can anyone tell me where i should be looking for this kind of info or where to start?
Cheers
Andy
I have a lot of development versions of packages installed with virtualenv under the default /src directory in the environment. Normally, I decided to do the development of my project under the /src directory afterwards.
To add my directory to the Python path, I decided to eschew from using any absolute paths, since I'm going to have to move the project around with my friends. It's a Django application, so I was happy with putting environment.pth under the root that contained the path to my project and a wsgi in the same directory would call the sites module to parse environment.pth. All good.
I was also looking to move the .pth file into site-packages, but I'm having trouble with relative paths that move up the directory tree.
For:
/env
/lib
/site-pacakges
/src
/myproject
So, the .pth entry in site-packages to myproject should look like ../../src/myproject, but this doesn't seem to be working for me on Windows.
Hi all,
In the Getting things gnome code base I stumbled upon this import statement
from GTG import _
and have no idea what it means, never seen this in the documentation and a quick so / google search didn't turn anything up.
Thank you all in advance
Paul
I cannot get rid of this in my VS 2008 web project when debugging. I've checked that it's in debug mode on the non-web project in question and it's in Active(Debug). Deleted all items in my .NET 2.0 temp folder in Windows. Not sure what else to do here.
hi to all i have to crete one pre approve expence batch
when i crete batch and then go to india local payble (MHE)
but when i run the request
Expense Report Import Report
then i got following out put hear some error
Rejection Reason = no location
so my problem is that where i have to define location
please give me guidance for that
Total Functional Currency Invoice Amount: 100.00
Elecon Engineering Co. Ltd. Expense Report Import Report 17-MAY-10 16:57 Page: 2
Source: Oracle Projects
Exceptions Report
Supplier Supplier Invoice Invoice Invoice Invoice
Name Number Name Number Number Date Currency Amount Rejection Reason
------------
Megha, Nilesh M. 90054 XSAM R17-MAY-1 31-MAY-10 INR 400.00 No Location
Megha, Nilesh M. 90054 XT2 R17-MAY-10 31-MAY-10 INR 100.00 No Location
Total Expense Reports Rejected: 2
Total Functional Currency Invoice Amount: 500.00
Edited by: user12921822 on May 17, 2010 9:00 PM
I have a library of common functions that I use in several different projects, which works fine on my local machine where I can just add the path to the library, but now that I've put several of my projects on GoogleCode, I'm not sure how to deal with the external library. Do I put copies of it in each project and try to keep them all synchronized with each other, or is there a better way?