« first day (160 days earlier)      last day (4801 days later) » 

6:00 PM
and after 10 minutes of debugging i've got no clue why that happens
 
besides that there's no error check on file_get_contents?
Or if preg_replace encounters an error:
> If matches are found, the new subject will be returned, otherwise subject will be returned unchanged or NULL if an error occurred.
And I see the error already from here
'/assertType\s*\((\s*["\'](string|integer|float|array|object))/imu', should be '/assertType\s*\((\s*["\'](string|integer|float|array|object)\)/imu',
notice the escaped (, but it also looks like there should be a closing ["\'] as well, not sure why
do you have an example of the assert?
 
$this->assertType("string", $foo, "afhsdfhsiz3r8ERRRO (7) asdasd ");
thats why it doesn't match for the closing )
 
ok, then change it to:
actually, there's a bunch wrong then
nevermind
 
nice to see that we went through the same thought process
"why doesn't it match the closing.. oh.. wait thats... nvm"
 
fair enough
Do you have PCRE8 installed?
 
6:13 PM
meh, changeing to a stupid foreach
 
meaning, the ability to do UTF-8 patterns?
 
php 5.2.6 or 5.3.5
no clue about anything elese
 
that doesn't matter
 
how do i find out
 
sec
try doing php -r 'var_dump(preg_match("/\\d/u", "foobar"));'
 
6:16 PM
int(0)
 
hrm
I dunno
 
yeah, doesn't matter
one time script, foreach str_replace will do
 
echo PCRE_VERSION;
 
7.6 2008-01-28
and 8.10 2010-06-25
 
first, intject var_dump into there to see where the content is getting nuked (and if it really is)
 
6:20 PM
i don't expect version numbers to contain a date
finny
yeah the preg_replace returns ""
 
the first one?
 
yes
 
'' or null?
 
and i have no clue how that is possible
empty string
an error i could live with
 
remove the u flag
And actually, the m flag as well, since there's no start or end indicators
 
6:23 PM
that did it
 
m, or u?
 
removed both, let me try
with the u it still works
 
so multi-line mode kills the match? How is that possible?
you don't have an ^ or an $
 
only the m works too
but the combination of both blows up
 
thinks you found a bug!
 
6:32 PM
no clue
I don't think i can/want to reproduce that
 
Do you think "Barbie: A Fairy Secret" is a worthwhile movie to watch?
 
I generally dislike Disney movies, so I'm going with a no
 
Barbie aint Disney
The alternative would be Red Sonja
 
Universal Studios Home Entertainment (DVD)
you got a point there
Owner(s) Comcast (51%) General Electric (49%)
 
or Bruce Lee Dragon
 
6:39 PM
Cracked 50%
Code Coverage - 48.9% (596/1219 elements)
Methods	52.2%	Conditionals	0%	Statements	48.3%
 
or Empire Strikes Back
 
that is a strange set of choices
 
that's what german TV has to offer today :)
well, there is more but I preselected for you
 
Anybody like my avatar? B)
 
Oh in that i would suggest that you use the internet
 
6:43 PM
so, @edorian: what did you think of that post?
 
Ok, got to go. My girlfriend is going to pick me up frmo work (8pm on friday, yaaah)
 
@ircmaxell i didnt get a chance to read it yet. but then again, you didnt ask me to
 
@ircmaxell Really short answer:
 
hehehe
 
What Is Security - Web Application Security - Post 1 http://t.co/M83QpSa /via @ircmaxell's blog
 
6:44 PM
yeah, I saw that.
 
i like
 
So I assume that's a good sign
 
will prepare food now, then watch tv with other half
laters
 
@Gordon: later
@edorian Enjoy!
 
6:46 PM
@edorian Yay! You get to go home!
needs to find test vectors for a bunch of hash mechanisms
 
cya :)
 
posted on March 25, 2011 by Bradley Holt

ElePHPant alliance by DragonBe, on Flickr Cal Evans, PHP community member extraordinaire, has started a new podcast called Voices of the ElePHPant. The podcast is a series of short “interviews with the people that are making the PHP community special.” So far, Cal has interviewed ten different members of the PHP community: Jeremy Kendall, Anna Filina, Matthew Turland, Paul M. Jones, Kathy Re

posted on March 25, 2011 by Stuart Herbert

In my Beyond Frameworks talk, I explained how a component-based architecture can help answer some of the important (i.e. expensive!) questions you might face when creating long-lived apps that rely on a PHP framework. In this series of blog posts, I’m going to look at how to go about creating and working with components. I’ve started work on creating the components for my simple app. The fi

 
7:06 PM
@ircmaxell You have told me that PHP isn;t scripting language?
 
yes
 
"PHP is a popular general-purpose scripting language that is especially suited to web development.

Fast, flexible and pragmatic, PHP powers everything from your blog to the largest social networking site in the world. "
Own'd!
Check it out: php.net/?beta=1 BTW: Own'd! :D
 
It's still a programming language
 
No it is not. Even PHP creators are telling that it is script.
 
It's still a programming langauge
 
7:14 PM
No it is not.
Ok then it is.
 
It depends on your definition of programming language, and by mine, it is
 
Sure( for real ). PHP creators are making mistake. It is programming language.
 
I stand behind my point, it depends on your definition.
 
It is language. Programming for real, script from definition.
 
You know it's a busy day when you don't open your IDE until hour 6...
 
7:21 PM
You mean close?
 
even scripting language is programming language...
script == short program
 
My deliniation is Turing completeness. Scriping languages (such as bash) are not Turing complete... Whereas interpreted and compiled programming languages are...
 
@ircmaxell bash is turing-incomplete programming language
still programming language
 
@KamilTomšík which is why I call it a scripting language
 
Welp, there goes my day.
 
7:31 PM
Welcome to my world
What happened @Charles?
 
You know how Col. Shrapnel has had his panties in a twist about mysql_real_escape_string?
 
@ircmaxell you told me that i should create more classes?
 
I just managed to prove him right.
MySQL versions prior to 5.0.77 are vulnerable to the GBK single quote bug.
The only protection is mysql_set_charset, which is only available in PHP 5.2 or later.
 
I proved him right about that a while ago ;-)
 
SET NAMES does nothing. Basically anyone using older versions of MySQL and PHP together could be open to a vulnerability.
 
7:33 PM
@Robik No, I said you should create classes where appropriate
 
@ircmaxell Hatechu. Anyway, this is going to make the "how do I protect myself" answer harder.
 
So do you think that code is okay, or something more to change?
<?php
/*
 * Graphix Example
 * Example 2: Drawing shapes
 * @package Examples
 */


# Include Graphix class
include '../Graphix.class.php';


try
{
    // Create new object
    $graphix = new Graphix();

    // Load image
    $graphix->load('water.jpg');
}
# Appears when you are trying to load image that doesn't exists
catch(FileExistsException $e)
{
    echo $e->getMessage();
}
# Appears when you haven't installed GD, If you are sure that you have installed
#  you can delete this catch
catch(ExtenstionNotInstalled $e)
 
@Charles It does something. It affects how the strings are parsed. But it doesn't affect the charset the client uses to escape strings
 
@ircmaxell Sorry, mis-spoke -- does nothing for this specific problem.
 
@Charles No it's not. Use a reasonably modern version of PHP. Otherwise what's the point in trying to secure something that already has holes in it you can't fix?
 
7:35 PM
@ircmaxell Except that shared hosting + modern PHP versions = lolno. It's hard to get people to upgrade when they don't control the server.
I mean, upgrading is the right thing to do, it's just an answer nobody will want to hear.
@Robik Other than possibly considering the new built-in SPL exceptions instead of your own, I have no constructive feedback for that code. The exceptions are kind of new, so if you aren't already requiring 5.3, you probably don't want to use them.
 
yeah
 
I believe the dollar sign in variable names to be a waste of precious keystrokes, and I would boldly suggest the requirement that variable names be prefixed with a dollar sign is removed.
 
@Greg I can't tell if that's a joke, or if you're serious. I know the bug report, but still
 
@ircmaxell ...
 
Man, I bet whoever wrote that would have an aneurysm if he or she ever started to learn Perl.
 
7:49 PM
I thought it was a great read :D
he is so passionate about how much of a waste of time those pesky $s are!
 
I can imagine the response from php-internals. "We can't even make our parser understand the difference between classes and namespaces so we couldn't even reuse ::, and now you want us to remove the sigil from variables? Hahahaha."
 
just for anyone who thought the above statement was my own views: bugs.php.net/bug.php?id=54325
 
posted on March 25, 2011 by Bradley Holt

At last night’s Burlington, Vermont PHP Users Group meeting a gave a presentation on Load Balancing with Apache: Load Balancing with Apache View more presentations from Bradley Holt I’ve posted the example configuration files for reference. Basic load balancing: <script src="https://gist.github.com/887395.js?file=basic-load-balancing-httpd.conf"> Sticky sessions in PHP: <script

 
yeah
 
@Greg Oh my aching head.
 
7:57 PM
Why noone told be about phpthumb.gxdlabs.com ?
 
Cause I never saw it
 
hello.
i need a help with database and php.
 
I expect the core reason is that trying to search for php thumbnail yields ten year old crap code instead of modern, useful libraries.
 
@Feeds The reason why nobody knows how to load balance with Apache, is that it's not the right too for the job. use a proper load balancer, or use a proper web server. But there's no reason to try to make a TractorTrailer into a Ferrari
 
in the database there are rows with html tags, how to remove this html tags and update it just with full txt and spaces??
 
7:59 PM
@cyberrog what's a database?
 
should i use htmlspecialchars_decode??
 
Hell no.
 
@ircmaxell you actually hate apache?
 
@Greg No. I just dislike the abuse of it. It's very good for mass hosts. But if you need performance, the first step should be uninstalling it
 
8:00 PM
It's a tactical nuke when you need a firecracker, but it is powerful, pretty easy to use, and does the job well.
(The previous answer applies both to Apache and to HTML Purifier.)
 
@ircmaxell so glad I started using lighty early on
 
@Charles It's a tactical nuke when you need a precision guided missile. It can kind of do the job, but there's a lot of collateral damage (in this case, the server count quadrupling or worse)
 
@ircmaxell I work at a hardware vendor; I am unconcerned with excessive server use, because such things are profitable for me! Muahaha!
 
@Charles good.
 
@Charles Dam. At least you admit your stance :-P
 
8:04 PM
:507009 why cant I do like that:

$string = htmlspecialchars_decode($string);
$string = strip_tags($string);

function decodeAndStripHTML($string){
    return strip_tags(htmlspecialchars_decode($string));
}
 
@ircmaxell Heh. In all seriousness, I haven't yet experienced a case where Apache was the bottleneck, and by the time that would even have happened, I'm sure we'd have put a reverse proxy in front and examined lighty or nginx.
 
@Charles I have. I had a server that was topping out at 80 req/sec under Apache. I upgraded to Lighttpd/FastCGI (only change) and that ramped up to 400 req/sec while CPU load dropped by a factor of 4...
 
@cyberrog strip_tags does rude things to left and right angle brackets that aren't actual HTML. If you don't mind the potential data loss, that will work. Your best bet is an actual HTML parser that can properly and completely clean the data.
@ircmaxell That's one hell of a performance increase. I thought newer Apaches weren't that much slower for static files nowadays?
 
@Charles but i tested a html text in the demo, and still listed the data with <li> </li>. are you sure it clean all??
 
@Charles It's not that. Apache can do perhaps 75% of what Lighttpd can do for static files (on a good day)
 
8:07 PM
@cyberrog The demo has a whitelist including certain tags. You can simply instruct it to strip all tags (though I dunno if you can do that in the demo).
 
With an older server (1st gen Xeon), I was able to saturate a 2gbps fibre connection with lighttpd (at 20% cpu usage). Apache was only able to hit about 1.2 gbps at 80% cpu usage (mostly IO/Wait)
 
@Charles ok
 
and those numbers are averaged over a 20 minute run
 
@ircmaxell Very impressive. I've had lighty/nginx investigation on my todo list for a long, long time. Now I'm looking forward to it.
 
Well, I've been running it for 5 years on at least 2 dozen servers (lighttpd). So if you have questions, or want insight, I'm here
 
8:11 PM
@ircmaxell I'll be sure to <s>pester</s> take you up on that offer when it's time.
Awww, no strikeout.
 
hehehe
 
The main thing will be just proving to my team that it's a sane choice. We know Apache configuration inside and out, so switching to something different has a learning-curve cost to it.
 
I'll be sure disappear^M^M^M^M^M^M^M^M^Mlook forward to it...
 
I've been pestering ircmaxell since I swapped onto lighty
 
@Charles Once you get the hang of Lighttpd's config, it's thousands of times easier than Apache's...
(of course getting the hang of it can be tricky at times)
 
8:14 PM
@ircmaxell This is what dev environments are for.
 
Absolutely
But for me, it was a "Why the heck would that be better" until about the third day. Then it was click, "Why doesn't everyone do this!"
 
If you don't know anything about Apache OR Lighttpd, the latter is way easier in general.
 
What do you think about own Extensions? Should i use only 1 standard exception?
 
Use a semantically appropriate exception
don't just use Exception, use the class that's appropriate for what happened
 
@ircmaxell Indeed, because all exceptions extend Exception, let the calling code decide if it wants to deal with all of them in a single block or not.
 
8:20 PM
right
 
I have created few like: BadExtensionException, ExtensionNotInstalledException, FileExistsException and ImageNotLoadedException but these all catches are owful.
 
Why?
 
owful? you mean awful?
 
ow!ful (they hurt)?
 
that's what happens when you don't catch them i guess
you gotta catch the ball or else it ends up in your face
and it knocks you out
 
8:30 PM
oyful
 
back me up @irc
 
i was making a clever analogy
no one appreciates my analogies
:(
 
:-P
 
@Robik You need to use dirname(FILE) or DIR when including other PHP files.
 
8:33 PM
dirname(__FILE__) or __DIR__
 
yeah that's it lol
And you're not using the define('FILLED', true); line.
 
@Robik: I'd name FileExistsException differently: perhaps FileNotFoundException or FileDoesNotExistException...
otherwise you're saying "Hey, this file exists! Stop now!"
 
he should get rid of $this->loaded too...clutters up the code waaay too much
 
ja
 
he should have two static methods which instantiate the object (since PHP won't let you have multiple constructors)
and then make the constructor private
 
8:40 PM
eiw
 
there's nothing wrong with static methods
as long as they're used sparingly i think
 
private constructor is usually the sign of code-rot
My rule of thumb is never try to prevent someone from purposely shooting their foot off. Try to prevent them from accidentally doing so, but if they want to, let them
 
Aghhh, im trying to use html purifier, but when try to run it return error. and dont say what error is it. chrome just show a page like that : Error on Server
 
check your logs
 
I've done private constructors before to create a pure-static class in a PHP version that lacked namespaces, so I could stick related-but-shouldn't-be-globally-present functions together.
(Translation: I abuse classes.)
 
8:45 PM
yeah...
 
static kind of screws with the whole "object oriented" thing
 
Truth.
 
but it's better than using global functions
 
@Charles you installed htmlpuriefier already??\
 
@MichaelAngstadt Not by much
 
8:48 PM
@cyberrog Yes, without a problem.
 
@Charles can you help me ??
 
@cyberrog With what, the internal server error? I presume you've already checked the error log, etc?
 
@Charles where I check it?
 
@ircmaxell yeah
 
@cyberrog It depends on a whole bunch of things, including what HTTP server you're using, whether you're on shared hosting or local, etc.
 
8:50 PM
@Charles localhost
 
but it sucks in PHP because you can't overload methods
i can't define a public function foo($bar) and also a public function foo($bar, $baz)
 
@cyberrog Using what software? Apache? Check the logs directory in your document root and/or the Apache install directory.
 
i guess i could just make the second parameter optional
 
@Charles apache, mysql
 
right
 
8:52 PM
public function foo($bar, $baz = null)
 
@Charles in mysql administrator there is a option for server log
 
@MichaelAngstadt Show me one dynamically typed language that supports taht
 
but it cant load the log files
 
haha
have you ever heard of Twig?
 
yes
 
8:54 PM
it's cool I like it
I want to use it at work, but our servers are running PHP 5.1 and Twig requires 5.2
 
@cyberrog MySQL != Apache. The error is coming from Apache, not MySQL, so you should check the Apache log, not the MySQL log, for the appropriate error.
 
@Charles its a giant file
@Charles gotta find what is the error
 
@cyberrog Scroll to the end or use "tail"
 
@MichaelAngstadt yeah
 
tail -n 100
or run tail -f and repeat the error
this will display new messages to the error log as they appear
 
8:57 PM
@Charles Serializer not writable, please chmod to 777
@Charles ive changed the permission, let me try
 
@cyberrog Ah, yeah, I forgot about that crap. That should have printed as a PHP error. Do you have display_errors turned off on your dev environment or something?
 
@Charles dunno what is it, but I guess no.. LOL
 
@Charles Yeah PHP errors will print to the Apache log
If they are not displayed, they should appear there
 
but ive changed the permission, now the error ist this: PHP Warning: require_once(/htmlpurifier-4.2.0/library/HTMLPurifier.auto.php): failed to open stream: No such file or directory in /var/www/import_script/import_script.php on line 4
PHP Fatal error: require_once(): Failed opening required '/htmlpurifier-4.2.0/library/HTMLPurifier.auto.php' (include_path='.:/usr/share/php:/usr/share/pear') in /var/www/import_script/import_script.php on line 4
 
@cyberrog Start your script out with ini_set('display_errors', true); error_reporting(-1); and be amazed. :)
@cyberrog Looks like you're trying to use an absolute path to the library instead of a relative one. Yank out the leading slash and/or change it to the proper path of the library.
 
9:02 PM
@Charles the script file is in the same directory of htmlpurifier folder.
@Charles sh*** with that tipo, it prints a huge list of warnings and erros in the page.
@Charles this is one of them /var/www/import_script/htmlpurifier-4.2.0/library/HTMLPurifier/DefinitionCache/Serializer not writable
 
@cyberrog Remove the leading slash in your "require" statement
 
@MichaelAngstadt the first one??
 
@cyberrog Whichever one is including HTMLPurifier.auto.php
So it should be like require_once 'htmlpurifier-4.2.0/library/HTMLPurifier.auto.php
 
@Charles can i set it like this?? chmod 777 -R Serializer
@Charles its all the same error, Directory /var/www/import_script/htmlpurifier-4.2.0/library/HTMLPurifier/DefinitionCache/Serializer not writable, please chmod to 777 in /var/www/import_script/htmlpurifier-4.2.0/library/HTMLPurifier/DefinitionCache/Serializer.php
 
That will probably work, but it's a little on the insecure side
 
9:06 PM
in terminal i've accessed the directory Serializer and set the command
 
@cyberrog You might not need to do that -- it's trying to cache the HTML definition somewhere. You can change the serializer path to a directory you would normally have writable for temp files only.
 
@Charles what is the code for cache the HTML definition?
 
@cyberrog Or delete the cache directory and have the web server use create it
*user
 
@Charles is it that?? $config->set('Cache.SerializerPath', '/home/user/absolute/path');
 
@cyberrog Bingo
Trying to find the "how to set up a configuration" section is proving more annoying than I remembered it.
 
9:11 PM
@Charles but for that i need to declare the $config variable. can it be like that? $config = HTMLPurifier_Config::createDefault();
 
@cyberrog One moment, let me just c&p what I have, it'll be faster than finding the docs.
 
@Charles i did that way, and its showing the same error, the 777 permission in Serializer
 
$c = HTMLPurifier_Config::createDefault();
// ...
$c->set('Cache.SerializerPath', sys_get_temp_dir());
// ...
$c->set('HTML.Allowed', 'b,i,u,strike,sup,sub,br,span,span[style],p,p[style],a[href|name],h1,h2,h3,h4,h5,h6,ul,ol,li,blockquote,pre,tt,abbr,address');
$p = new HTMLPurifier($c);
$this->html_body = $p->purify($html_body);
 
@Charles i dont want to allow this things, i want just full text
 
sys_get_temp_dir gets an appropriate system-wide temporary directory, probably /tmp for you. It should work fine, with no permission wonkery.
@cyberrog Can you guess what you need to do to the list of allowed things then? :)
 
9:15 PM
@Charles dont wanna guess. LOL
wait i think iot worked, let me check.
 
Pffft. Fine, fine.
$c->set('HTML.Allowed', '');
 
@Charles no. didnt worked. the file keep with html tags
 
@cyberrog With the empty allowed list?
 
@Charles let me test with your code
@Charles because i dont allow anything.
 
I'm using that exact configuration to do exactly what you're trying to do here -- strip HTML sanely.
 
9:20 PM
@Charles ok, it striped the html, but not the way i wanted.
 
@cyberrog Are you seeing things like words running together?
 
@Charles wat??
 
@cyberrog Exactly what I said!
*ahem* Let me try again. What did you want to happen, and what did you find happened?
 
@Charles ok explain.
 
Hi
Is anyone familiar with the CODEIGNITER framework here
???
 
9:22 PM
@CodemasterDarklord Sorry, I prefer frameworks that don't threaten to set my code ablaze.
 
@Charles ok wait.
 
Actually i was facing a small problem
i was not able to set cookies on my local server
 
@CodemasterDarklord What's your local environment, and in which browser(s)?
And are you using "localhost", another domain name, or an IP address to access the local site?
 
WAMP.. Firefox
using localhost
 
9:25 PM
(Some browsers don't like cookies from "localhost" and/or cookies from an IP address)
Do you have Firebug installed?
 
@Charles hey I tested htmlspecialchars_decode and it did the same as htmlpurifier. =/go figure..
 
@CodemasterDarklord Good -- you should be able to find the request for the page on the Net tab, then find the actual Set-Cookie header.
@CodemasterDarklord The Set-Cookie header can help us figure out what's wrong.
@cyberrog Figures, yeah. I mean, hsc_decode is fine, it's just strip_tags that can go haywire when dealing with long sections of code with a < at the start and a > at the end.
 
lemme check that out
 
@Charles but thanks anyway, you helped me a lot! =)
 
9:29 PM
@cyberrog Glad I could help!
 
hello, i am starting in php appreciate anybodys help, i have downloaded eclipse pdt (eclipse.org/pdt/downloads) and zend server (zend.com/en/products/server/downloads) now server is running at port 80
now i have made a test website in eclipse but when i run it, it says HTTP Error 404.4 - Not Found
The resource you are looking for does not have a handler associated with it.
 
@jaminator I'm so sorry, that must have been painful.
 
@Charles The CI session cookies has been set but i am not able to find my cookie in the context
 
@Charles g2g see ya!
 
@CodemasterDarklord Does the cookie have any domain information associated with it?
meaning a domain in the Set-Cookie text
 
9:35 PM
@Charles no there is no domain information attached
 
@CodemasterDarklord Darn, that was my only hope.
Can you c&p the Set-Cookie header?
 
@Charles i am pasting the output for the var_dump($_COOKIE)
array(1) { ["ci_session"]=> string(356) "a:8:{s:10:"session_id";s:32:"2088e05cbd641f2823b434a1b501d597";s:10:"ip_address"­;s:9:"127.0.0.1";s:10:"user_agent";s:50:"Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv";s:13:"last_activity";s:10:"1301083610";s:8:"username";s:5:"admin";s:5:"email"­;s:16:"admin@pixzon.com";s:9:"log_check";s:4:"TRUE";s:6:"userid";s:1:"1";}6e281ac­749f3a2b9ef72b217a3e819cf" }
 
@CodemasterDarklord That's either unhelpful or I don't understand your question. Can you re-explain? I thought this was a problem setting cookies....
 
see this is the session cookie that is automatically set by the CI session system
i am trying to create an online poll on the web application
i am trying to set the cookie so that user is not able to vote for next 24 hrs
once he has already submitted
all the code is working fine
like updating the data and all
i am trying to save the information so that when the user has submitted the vote he is able to see the results
but the functionality of setting cookie is not working
and i am really stuck at this
 
Okay -- and you've verified that you see the new cookie as a Set-Cookie header, when you inspect the request with Firebug?
 
9:43 PM
yes
but the next time i refresh the page the header disappears
 
Set-Cookie only needs to be sent from the server to the client once.
Do you see it from the client on subsequent requests?
(In the HTTP headers, I mean)
 
@Charles this is the header
Date Fri, 25 Mar 2011 21:44:07 GMT
Server Apache/2.2.11 (Win32) PHP/5.2.8
X-Powered-By PHP/5.2.8
Set-Cookie myprefix_polls=1; expires=Thu, 24-Mar-2011 21:42:27 GMT; path=/; domain=127.0.0.1
Location http://localhost/cadd_front/index.php/main
Content-Length 405
Keep-Alive timeout=5, max=100
Connection Keep-Alive
Content-Type text/html
 
Well there's your problem :)
Thu, 24-Mar-2011 21:42:27 GMT... that's yesterday.
 
just a sec let me check
 
You're setting an incorrect expire time for the cookie. Check the code where you calculate that, and you'll probably find your bug.
 
9:46 PM
i am using time()+86500 to set the expire time
 
Are you calling setcookie / setrawcookie directly, or are you using a convenience method provided by CI?
If it's CI, check the CI docs, perhaps it expects the expire time in a different format (like a native DateTime)
Also, because you mentioned this is local, can you check your computer clock?
 
ok i'm outta here
cya guys
 
@MichaelAngstadt Take care
 
@MichaelAngstadt Take Care
@Charles wait let me check
i think this might solve my problem up
 
Is there an ActiveRecord style object for PHP
 
9:55 PM
does setting up php server like apache need Internet information services feature in windows?
 
@whatsthebeef Yes, but they all suck in their own ways. You'll want to find a different ORM pattern.
@jaminator Apache does not rely upon IIS, no.
 
@Charles like some sort of service object to interact with db
 
@Charles thts good to knw as i have windows home basic so
 
@whatsthebeef Or just write the SQL yourself, or use an SQL builder.
 
@Charles Problem solved... thanks a lot for assistance
 
9:58 PM
but if I wanted to construct the object I guess I wouldn't want the sql in the constructor
 
the problem was with the parameter that has to be passed
 
@CodemasterDarklord Glad to hear it!
 
I guess I would create some sort of class method getInstance and perform the db stuff in there?
btw I only need read access to basic models
as in I only use db data to construct objects
 
@whatsthebeef If you're following the single repsonsibility principal, no, you wouldn't want the object itself to know how to load/save itself.
 

« first day (160 days earlier)      last day (4801 days later) »