Re: [PHP] LightBox click detection

2013-06-15 Thread Julian Wanke

They do, afaik...

Am 15.06.2013, 20:11 Uhr, schrieb Tamara Temple tamouse.li...@gmail.com:


Marc Guay marc.g...@gmail.com wrote:

$('.lightbox-image-class').click(function(){
$.post('ajax.php', {click: true});
});


Do javascript DOM events stack? If they do, this is definitely the
simplest way to go. If they don't, you need to capture the previous
click handler and call it.




--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Using Table prefixes

2013-06-10 Thread Julian Wanke

Tell this the facebook, google or nsa data team ^^

Am 10.06.2013, 16:15 Uhr, schrieb Tedd Sperling tedd.sperl...@gmail.com:


On Jun 8, 2013, at 4:17 PM, Julian Wanke jswp...@gmx.at wrote:

A database for each client? Isn't that over-powered? If you have 1000  
clients, you would loose the overview over your databases...


What -- people have more than one client?!?

My thoughts:

A client is like a girlfriend -- if you have too many, things can get  
real ugly, real fast.


If you have over 10 clients (let alone 1000), then you're probably  
overworked and not doing your best for each.


My advise -- raise your rates until you narrow those clients down to a  
manageable size. Both you and your clients will be happier.


At least, that's been my experience -- YMMV.

Cheers,

tedd

_
tedd.sperl...@gmail.com
http://sperling.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Using Table prefixes

2013-06-10 Thread Julian Wanke
There servers are so good configured, that they don't need much  
maintainance.
Facebook has 1,11 Billion Accounts. If we divide this through 1000 members  
per data team member they need 1 Million data team mebers, each of them  
has a salary which I would say is about 2000$.
That means they have to pay 2 Billion US$ (!) per month to the data team  
which is very unrealistic.


I know such great companies are a bad example but my opinion is that a  
system should be as scalable as possible.


Am 10.06.2013, 20:16 Uhr, schrieb Tedd Sperling tedd.sperl...@gmail.com:


Hi:

I am sure they do not turn over a 1000 clients to a single person.

Cheers,

tedd

_
tedd.sperl...@gmail.com
http://sperling.com





On Jun 10, 2013, at 2:11 PM, Julian Wanke jswp...@gmx.at wrote:


Tell this the facebook, google or nsa data team ^^

Am 10.06.2013, 16:15 Uhr, schrieb Tedd Sperling  
tedd.sperl...@gmail.com:



On Jun 8, 2013, at 4:17 PM, Julian Wanke jswp...@gmx.at wrote:

A database for each client? Isn't that over-powered? If you have 1000  
clients, you would loose the overview over your databases...


What -- people have more than one client?!?

My thoughts:

A client is like a girlfriend -- if you have too many, things can get  
real ugly, real fast.


If you have over 10 clients (let alone 1000), then you're probably  
overworked and not doing your best for each.


My advise -- raise your rates until you narrow those clients down to a  
manageable size. Both you and your clients will be happier.


At least, that's been my experience -- YMMV.

Cheers,

tedd

_
tedd.sperl...@gmail.com
http://sperling.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] basic authentication usage

2013-06-10 Thread Julian Wanke
I think that the problem here is, that the unset of the  
$_SERVER[PHP_AUTH_USER] variable is not affecting the client's browser.
If you've got a directory protection, the browser needs a restart to show  
the login dialog before.
I may be wrong because I'm using forms normally but the Authentification  
cannot be reset so easily...


Am 10.06.2013, 22:28 Uhr, schrieb Jim Giner jim.gi...@albanyhandball.com:

Trying to learn how this works for a simple security need I have.  
Nothing serious, hence this experiment.


My code:
if (!isset($_SERVER['PHP_AUTH_USER']))
{
header('WWW-Authenticate: Basic realm=My Realm');
header('HTTP/1.0 401 Unauthorized');
echo 'h3You have chosen not to signinbrbr';
echo Click a href='/index.php'here/a to go back to the menu;
unset($_SERVER['PHP_AUTH_USER']);
unset($_SERVER['PHP_AUTH_PW']);
unset($_ENV['PHP_AUTH_USER']);
unset($_ENV['PHP_AUTH_PW']);
exit;
}
else
{
echo checking credsbr;
if ($_SERVER['PHP_AUTH_USER']  validuser)
{
   unset($_SERVER['PHP_AUTH_USER']);
   unset($_SERVER['PHP_AUTH_PW']);
   unset($_ENV['PHP_AUTH_USER']);
   unset($_ENV['PHP_AUTH_PW']);
   echo 'h3You have entered invalid information.brbr';
   echo Click a href='/index.php'here/a to go back to the menu;
   exit();
}
}
(if we get here we have signed on)
(continue on with script)

***
My problem is trying to remove the invalid credentials (unsets) so that  
when the user attempts to access the page again, the signin dialog gets  
displayed.  On my second attempt I always get the invalid path and  
never get a chance to re-enter the credentials.


What am I missing (besides it's a lousy security solution)?
Can one NOT unset a SERVER variable?  How does one get around that in  
this case if so?




--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] basic authentication usage

2013-06-10 Thread Julian Wanke

I just mentioned that as an example.

For this authentification the server sends a Authorization header.
The client's browser requests the credentials from the user and save them  
in the RAM.

Now the client's browser sends the credentials to the server.
And what's important: The browser sends the credentials in each further  
request from now.
So the browser stores the username and password for the session in the RAM  
and they can't be changed or deleted from the server's side.
In fact the authorization works similar to cookies with the difference,  
that cookies can be set server-side and the HTTP authorization can't.
That's the reason why you can't unset the invalid credentials, if entered  
one time the browser will send them in each request, it doesn't matter  
what the server does.


I hope you understood what I mean...

Am 10.06.2013, 23:14 Uhr, schrieb Jim Giner jim.gi...@albanyhandball.com:


On 6/10/2013 4:33 PM, Julian Wanke wrote:

I think that the problem here is, that the unset of the
$_SERVER[PHP_AUTH_USER] variable is not affecting the client's  
browser.

If you've got a directory protection, the browser needs a restart to
show the login dialog before.
I may be wrong because I'm using forms normally but the Authentification
cannot be reset so easily...



No - I think you misunderstood.  I am NOT using directory protection,  
hence my attempt at using this method.






--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Using Table prefixes

2013-06-08 Thread Julian Wanke
A database for each client? Isn't that over-powered? If you have 1000  
clients, you would loose the overview over your databases...


Am 08.06.2013, 21:46 Uhr, schrieb Tedd Sperling tedd.sperl...@gmail.com:

On Jun 8, 2013, at 3:00 PM, Ashley Sheridan a...@ashleysheridan.co.uk  
wrote:

dealTek deal...@gmail.com wrote:



I can see the basic need for a table prefix in a case where you may use
one mysql database for several projects at once so as to distinguish
tables per project like...

-snip-
however I was told a long time ago to use a prefix tbl_ like
tbl_Mytable but I don't really see much need for this by itself ... Am
I missing something?


I think that's a pattern that people use to distinguish their tables  
from views, etc, but personally I find it a little pointless. It  
doesn't really help in any way, and just means more typing.


Using a prefix for a set of tables in one db where you might have  
several things using the db (i.e. some hosting limits the databases you  
can have) makes sense, and especially so if you name it sensibly as in  
your first example.

Thanks,
Ash


I agree, but more than that I also set up databases specifically for  
clients such that all the tables in them are related to the client and  
not each other, such as:


client1_db

contacts
invoices
etc

and

client2_db

contacts
invoices
etc

As such, the tbl_ prefix is not needed.

Cheers,

tedd

_
tedd.sperl...@gmail.com
http://sperling.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] php links doest work when im using mod rewrite

2013-06-01 Thread Julian Wanke

Try to add

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d

that should exclude existing files and directories from rewriting...
Am 01.06.2013, 22:39 Uhr, schrieb Farzan Dalaee farzan.dal...@gmail.com:


i starting to use mod rewrite but all my images or js links doest work
my current query string is:
index.php?r=blogpage=2
i want to change it with this:
/blog/2
this is my .htaccess file
RewriteEngine On
RewriteRule ^([^/]*)/([^/]*)$ /framework/?r=$1page=$2 [L]

but none of my js or css cant find

i need a way with php to make urls
thanks


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] php links doest work when im using mod rewrite

2013-06-01 Thread Julian Wanke

localhost means the files are stored on your computer so I can't access them ;)Wait, you are trying to change the image directories? I'm a bit confused.Am 01.06.2013, 22:44 Uhr, schrieb Farzan Dalaee farzan.dal...@gmail.com:thanks for answer but it doesnt work404 Not Found - http://localhost/framework/blog/files/upload/images/
but my images folder in:http://localhost/framework/files/upload/images/
On Sun, Jun 2, 2013 at 1:11 AM, Julian Wanke jswp...@gmx.at wrote:
Try to add

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d

that should exclude existing files and directories from rewriting...
Am 01.06.2013, 22:39 Uhr, schrieb Farzan Dalaee farzan.dal...@gmail.com:


i starting to use mod rewrite but all my images or js links doest work
my current query string is:
index.php?r=blogpage=2
i want to change it with this:
/blog/2
this is my .htaccess file
RewriteEngine On
RewriteRule ^([^/]*)/([^/]*)$ /framework/?r=$1page=$2 [L]

but none of my js or css cant find

i need a way with php to make urls
thanks


-- Erstellt mit Operas E-Mail-Modul: http://www.opera.com/mail/

[PHP] Include/Require limit?

2013-05-30 Thread Julian Wanke

Hi,

I use the pretty large Library PHP Image Workshop  
(http://phpimageworkshop.com/) at my project. It is about 75,5 KB.   
Everything works fine but if I try to include a 15 KB file with country  
codes, it fails.
With the other files I easily get over 100 KB inclusion size, so my  
question;

Is there a size limitation for include?

Best regards

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Include/Require limit?

2013-05-30 Thread Julian Wanke

Hi,it outputs a corrupt image (I think the function imagepng)Am 30.05.2013, 11:17 Uhr, schrieb Alex Pojarsky divine.ra...@gmail.com:Hey.Afaik - only in case if your PHP process instance exeeds allowed memory limit.Other then this - explain how does it fail exactly. Any error messages? Errorous behavior?
On Thu, May 30, 2013 at 12:49 PM, Julian Wanke billa...@gmx.at wrote:
Hi,

I use the pretty large Library PHP Image Workshop (http://phpimageworkshop.com/) at my project. It is about 75,5 KB. Everything works fine but if I try to include a 15 KB file with country codes, it fails.

With the other files I easily get over 100 KB inclusion size, so my question;
Is there a size limitation for include?

Best regards

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


-- Erstellt mit Operas E-Mail-Modul: http://www.opera.com/mail/