« first day (1142 days earlier)      last day (4031 days later) » 

08:00
you obviously did not bother to read the rules
what you mean ?
hmm... dumping a question link is perfectly fine in the javascript room
@JanDvorak then let's wait for one of room-owners. He/she will move it there
@tereško not to PHP Q's, however
spoilsport
> half of everything you know will be obsolete in 18-24 months
08:11
hello everyone
hello @EmilioGort
I've been having problems callin a SP from php...someone know sql-server php?
hi @mamdouhalramadan how are you
fine, sleepy, so bored and don't want to sleep :D
jejej..i cant sleep because Error 102 severity 15 state 1
lol
a very illustrative error from mssql
here are 3:15am...
haven't you found anything relevant in SO here?
08:19
nothing yet
the case with that error include the line error at least
umm. sorry but I'm not expert in mssql :(
I read that the space betwen 2 and 8 but isn't my case
Exception Error 102 severity 15 state 1
SQL:BatchStarting EXEC DBO.TEST_sp_SET_Claim Status @ClaimID=20,@Status=4,@UserID=22
SQL:BatchCompleted EXEC DBO.TEST_sp_SET_Claim Status @ClaimID=20,@Status=4,@UserID=22
this the only I get from SqL profiler
what are you executing ?
08:22
a Stored Procedure
0
Q: How to debug error 102 severity 15 state 1

Emilio GortHow can find a solution to fix a SP that when I run from php I get Error 102 severity 15 state 1 PHP: $stmt = mssql_init('DBO.TEST_sp_SET_Claim Status'); mssql_bind($stmt, '@ClaimID', $claimID, SQLINT4); mssql_bind($stmt, '@Status', $status, SQLINT4); mssql_bind($stmt, '@UserID', $userID, SQLIN...

are you sure that your php variables are set in your query string?
in that question isn't better make an array an implode
yes when I execute the sp in the profiler I get
EXEC DBO.TEST_sp_SET_Claim Status @ClaimID=20,@Status=4,@UserID=22
the parameters are ok...I think
when call the sp from php
if you replace variables with values in the SP, do you still see the error ?
yes
wait you are saying directly in the sp code, in the sql server?
08:30
yes
I didnt try that
I try runing from a query you can see in my question the last part
$query="code of SP";
mssql_query($query)
there I pass the variables directly and work fine
also, WHERE P_CH.ClientClaimID = @ClaimID <-- shouldn't it have semicolon there ?
is the last sentence...but let me add it
the same
with the semicolon added
0
Q: Get the id of the last updated record

Kamran AhmedI am able to get the last inserted id using $this->db->insert_id(); in codeigniter, is there any way that I can get the id of the last updated record? I tried it with the same i.e. $this->db->insert_id(); but it doesn't work (returns 0 instead).

Anyone please!
so ... if you used that stored procedure with all the parameters replaced with values , then it worked .. right ?
08:37
yes
no...I'm going to try that now
what if you replaced only some of the parameters - the ones in CASE
@tereško in sql the sp run fiine
fine
what you are suggesting is set the values for the parameters inside the SP?
sorry if I repeat..english isn't my strong
you are from Miami
yes
I'm form cuba...living in miami
same question I was going to throw :D
08:40
Is it snowing there?
no...66 f
my current guess is that the exception you see is caused by something going wrong with assignment of values for params
@EmilioGort - as I told you I'm not an expert. but as you said it is working in SP but when you try it in php the syntax error happens. Hence, it is something related to the PHP variables
08:42
@reikyoushin got twice as money offer from site5 :) I'm going to dinner with them in 7 days, for "senior" aka manager position, unlikely to happen, but I'll give it a try...
I think the same but if you see...when I call the sp from php this is what I get in the SQL PROFILER
EXEC DBO.TEST_sp_SET_Claim Status @ClaimID=20,@Status=4,@UserID=22
and the values are correct
@webarto - hope you the best mate. and don't say it's unlikely to happen, it will happen :D
as I said, update (or maybe - duplicate) that procedure, with one that has not parameters .. only hard-coded values
see how that reacts when called from PHP
even though, try the rough coding. it might make a difference
working on that
08:45
@mamdouhalramadan thanks :D well I would be, but I have no clue how to manage anyone, even myself :) Being a developer that follows tasks is easier but less paid :)
hahhah, but you are an experienced developer. That should change the equation here.
#php: phpdbg v0.2.0 tagged http://phpdbg.com/ grab it :D
seems interesting!
Just change the name and is working
was the space in the Sp name
I didn't get your question?!
08:51
@EmilioGort nite, then =P
the DB developer should know that this can cause problems
I did waht you suggest...a copy fo the sp...with a different name without space
and work fine
@mamdouhalramadan Thank you for kind words, I'm so pumped up now :D
you could try to escape the space in PHP end of things
.. not sure if that's an available functionality though
the Sp name has space
'DBO.TEST_sp_SET_Claim Status'
look before Status
mssql_init('DBO.TEST_sp_SET_Claim\ Status');
i meant something like this
08:54
I didnt know that
@webarto - :) you are welcome.
@webarto good luck in your new position as manager
@EmilioGort i have NO idea if it even works
I'll try now
but that's a common behavior in other "line-feed" systems
08:55
I think if you try msql_init('DBO.TEST_sp_SET_Claim Status'); would be a good test
didnt work the \
then "rename" it is, unless there is a way in mssql to alias procedures globally
well I meant using the ` char
@mamdouhalramadan that's what I have
but SO chat is changing it to code
I know
08:56
this is my line $stmt = mssql_init('DBO.TEST_sp_SET_Claim Status');
wrap it with ` char after '
sorry I dont get you
just a sec
check this link pastebin.com/6vFpTZQG
you mean backstick like mysql?
08:58
in sql are bracket like []
let me try
just try those couple options, you might get somewhere with it
$stmt = mssql_init('DBO.[TEST_sp_SET_Claim Status]');
work in this way
then you got what you needed
yeah
very much thaks for the idea
well, teresko pointed it out, so thank him :D
09:04
thanks to him too
:)
it's good talk with more people...in my country we say "dos cabezas piensan mas que una"...two heads are better than one
great quote :)
if you want answer the question I made on SO
1
Q: How to debug error 102 severity 15 state 1

Emilio GortHow can find a solution to fix a SP that when I run from php I get Error 102 severity 15 state 1 PHP: $stmt = mssql_init('DBO.TEST_sp_SET_Claim Status'); mssql_bind($stmt, '@ClaimID', $claimID, SQLINT4); mssql_bind($stmt, '@Status', $status, SQLINT4); mssql_bind($stmt, '@UserID', $userID, SQLIN...

you can answer it, and after 2-3 days you can accept your answer.
oh!!
I have to read more
to the bottom
09:10
well..have a good night...now I can have sweet dreams...whitout Error 102 severity 15 state 1
sure, night :)
and thanks to you and @tereško for the help
you're welcome
and now I will make something edible
Damn, I'm hungryyyyyyyyy'
09:57
@zerkms - I didn't get your answer on the index problem of MySQL!
would you mind to elaborate more?
@JoeWatkinsthe website you've built for phpgdb is AWESOME
10:18
@Ocramius actually credit for the website goes entirely to @webarto ... he is our frontend guy and as you say, doing an awesome job :)
if I had done the website it would be terrible ... definitely ...
well, then gj @webarto :O
user924016
10:32
MoooOOOrning =]
who can ask for in chatoverflow?!
10:57
@mamdouhalramadan everyone
and it with "s"
but to actually vote on question to get the closed, you need to get 3k rep
At the moment I'm busy with my studies. So I'm also learning new languages like C and Java
Otherwise I try to clean up SO and answer (mostly) regex questions
@HamZa - are you one of SO team members?
@mamdouhalramadan nope, by cleaning I mean close bad questions or improve Q/A
11:04
:x
Paul Walker dies in a car crash
Not sure if that was destined
user924016
Hmm do you guys use capital first letter in naming Object variables.. like in silex they name Application $app (versus $App)
@mamdouhalramadan most of regulars here have "pet subjects" that they focus on .. mostly to avoid the crap of general stream
@RonniSkansing $variableName = new ClassName;
that makes sense.
user924016
@tereško thank you.
@tereško - are you a physicist?
11:12
@mamdouhalramadan no, but I have above average grasp on the subject
well, I did have a good hunch on that
@tereško You certainly don't :)
@MackieeE can you prove it :P ?
What's your happiest moment in life?
Take your time!
@MackieeE that's almost impossible to mention for some people
11:18
@HamZa Marriage, first kiss, first date? First N64 game? :|
!!
@MackieeE Well, I didn't have those you mentioned at all :)
N64 comparison to marriage :P
hehe :D
@MackieeE I wonder, how did you come to this conclusion
@MackieeE What was yours ?
11:21
When she said yes ;) and @tereško for the relentless negativity
wow ... that made no sense, bye
I did have happy moments :)
lolz
He'll have a better grasp of the English language soon then
Releasing ProxyManager 0.5.0 today - https://github.com/Ocramius/ProxyManager/releases/tag/0.5.0 - 44 issues resolved, 5 new proxy types supported - grab it until it's hot!
moar magic for everyone :D
good night everyone, :)
12:07
Hi everyone
@bwoebi nah, just asking
@NikiC I think it should have to do something with informatics… just no idea what^^
@bwoebi for example, do you intend to go to university?
yes
why?
12:17
why not?
I don't really know what to do
@NikiC going to university = easier to get VISAs if needed
just one possible reason imo
@bwoebi Likely won't learn particularly much ^^
@NikiC I don't know what to do then…
You're usually paid more if you have a higher degree, no?
@bwoebi Not saying that it's a bad idea, just isn't the only possible choice ^^
@NikiC I dropped out of university. If I get stuck with some jobs because of that
Also (marginally relevant) corporates WON'T hire you without a degree
and not because the degree matters, but because of legal/image issues
if something goes bonkers, they can't afford saying to media "it was the guy without a degree"
so yeah, that piece of paper is worth it if you have a chance to get it
12:24
@Ocramius they basically don't have to say who it was
@bwoebi they have to if there's an official process
doesn't mean that they will blame the employee
ah ok
@bwoebi you should continue your studies. Trust me. You'll need the paper.
I've known/seen people who dropped/stopped from school
but they still have to expose the facts, and that's a problem for bigger companies
Indeed. If I had the time/money, I'd go back to university now
@Gordon hey, sorry for the elephpants, but there were no green ones, and only 1 red one per person
12:41
^ Is this a "good" way of including files ?
Or do you have another better idea. Even links/title of books are appreciated
At my last project, I did something noobish as :
$DS = DIRECTORY_SEPARATOR;	// Directory separator, it may differ depending on the OS
$sitePath = dirname(__FILE__) . $DS;	// Path to the website

include_once $sitePath . 'config.php';
include_once $sitePath . 'session.php';
what is the problem ?
what are you trying to solve ?
tereško The problem I wanted solve was that I kept using relative paths. And it became complicated when I included a file in a file.
My current code works. I'm just wondering if there are better ways of including files.
just use autoloader
@HamZa I always use __DIR__ for any path references I have
Good morning
user924016
12:46
@ircmaxell goood morning
I see, will take a look. Thanks
@NikiC I think that does not address his problem
wow so __DIR__ is the same as dirname(__FILE__) (facepalm)
yes ^^
and it offers PHP 5.2 incompatibility as a nice extra ;)
12:50
haha
@HamZa And of course, you don't need to use DIRECTORY_SEPARATOR
@NikiC huh ? So if I wrote '/classes/query.php' it would work on both linux/windows ?
yes
thx, new things. Gotta edit it right away :P
All known generator bugs fixed :)
12:54
it seems I need to staph regex and start seriously with other languages :P
https://github.com/kamranahmedse/dead-links-finder/blob/master/index.php
I've written this script and it works as I expect it to but it crashes the browser window as sending packet to each and every link found and then waiting for the responce may take a large amount of time. Any idea how may I make it efficient...
Here is what it does:
1. Takes a url.
2. Validates it i.e. if not gibberish checks to see if it exists by sending a test packet to the link..
3. Checks the Status code from the header of response.
4. If URL does exist, crawl it to find all the URLs on the page in an array.
5. For every url found, send a packet to it and wait for the response to see if it is dead or not...
Step 5 is making it freeze i.e. sending packets to 100s of links and waiting for the response for each..
Any ideas how may get that to work..
I am thinking of performing it asynchronously using Ajax, but let me hear what you people suggest?
@KamranAhmed define "freeze" ? Do you get an error ? Does your browser stop and crash ?
ehh ... it's nice go get some ego-boost on sunday
@HamZa by freeze I mean I have to wait alot..
@KamranAhmed lol, isn't it "normal" that you need to wait a lot ?
13:07
@HamZa lol I mean, how can I make it more efficient? What do you suggest?
@tereško what do you mean by that?
@KamranAhmed Wait, I think I saw a great answer ...
@HamZa no problem.. waiting..
10
A: pcntl runs the same code several times, assistance required

BabaIntroduction I see you are trying to send mails $this->sendMail($html, $myTask['task_schedule_id']); and I think it's a really bad idea trying to use multiple process for this task. You should consider using message queue for this task because emails can be very slow. Use a Queue System You sh...

@HamZa thanks. Let me check that :-)
@KamranAhmed btw your regex doesn't make much sense with (.*)?. Just use (.*?). And since you don't need the groups, you might as well remove the groups .*?. Let me rewrite that ...
garfieldtech.com/blog/two-types-of-devs <-- Thoughts? (and then my comment)?
@HamZa (.*)? and (.*?) mean two different things
(.*)? is not reducible to (.*?) because the first is greedy, and the second is not.
(.*)? is reducible to (.*)
13:19
I see what you mean
@Ocramius @krakjoe thanks! :D
user924016
@ircmaxell the author is just simply wrong, a php dev is not black or white
@KamranAhmed a quick fiddle regex101.com/r/mU7dO3
> Root Devs have a lot of power. That flexibility leads to a mindset that PHP is glue code between various C libraries,
@ircmaxell IMHO developer can be anyone that develops, and the other thing is engineer...
I didn't have access to even to repository (done pull requests), so that makes me a bad "shared dev"?
13:30
there are no "shared developers" .. only "wordpress/drupal/moodle/oscommerce users"
hosting company I worked for named those as "designer developers"...
and that was main niche, target
@tereško well, developers who target those platforms would be "shard devs" no?
they do not develop
they add themes, modules and plugins ... oh, and language files
Sup people
no, those who write the plugins
13:33
hmm ...
> Many people in them do know C (as if that meant anything as far as "professional developer" was concerned), but that's not really useful or applicable.
lol
I am both: when I work for single clients, I have the control, when I write commercially licensed plugins, I have to take old PHP versions into account. So it is more a matter of the context than the person.
essentially, by the end of second paragraph I was too annoyed to be objective
@toscho You just can't separate in two groups, it's not black and white :)
I can't really tell what the post is about ...
13:37
How can startups move from a single server to making their own datacenters?
@JoeWatkins the recent pace of PHP version development is a problem.
@HamZa thanks for that :-)
Facebook for example.
now I will go and look for my happy place ... maybe I managed to even find my power animal (fyi: there is a reference buried here)
billions in investment, several hundred million in the first 15 months ... is what facebook got ...
13:39
@toscho it is a problem because people forgot the lessons we learned in GOPHP5. If projects would keep sane version requirements, adoption would be smooth
Yeah, but how they can stay up and change servers?
Didn't they have to go down at a point and move to their own servers?
@KamranAhmed welcome
ah right, that's what you're asing
you can do it with DNS switches
that's a much more sensible question
13:40
setup a new server, point DNS to new servers, and then once it propegates, shutdown old server and re-purpose
or, if you were smart and used a VIP (Virtual IP) in the first place, just change the router software and you're done
That will likely require a read-only period during the switch, right?
why?
@ircmaxell chicken-egg-problem. I understand both sides, but I think it would be easier if both would try to find a working compromise.
@NikiC depends on details. You may be able to spin up a new DB cluster, and point both to the same DB...
well, my question got answered. Thanks :)
13:41
@tereško It's likely pretty hard to keep everything in sync between two data centers
I don't think that was the question the question was how to scale out to multiple machines from one
not how to move
oh maybe it was ...
Ah, right
@toscho it's not chicken-egg. It only looks like it on the surface. If projects require 5.4, hosts will provide it. If not, hosts have no incentive to (cheap ones at least). The project is in control, whether or not they agree or not...
1 min pause :)
@HamZa what's the difference between ("|') and ['"]?
13:42
@NikiC unless you are relocating to a different data center, then it might need something like that. But for simple migration to an updated software this would not be necessary.
" how to scale out to multiple machines from one" Will be too advanced for me @JoeWatkins I just wanted to know how it works roughly
@tereško yeah sure. I thought that's what this was about
Unless your are using some "in da cloud" provider
@NikiC Yes, going from a single DC location to a geolocated app, yes. That would require some quite significant planning
@ircmaxell the host are not the problem. users are. you can get 5.4 or 5.5 almost everywhere, it requires just too much efforts
13:43
Anyone from Europe?
Hosting companies adapt to client needs.
@KamranAhmed I used ("|') to put it in group 1, I then use a backreference \1. For example, ("|').*?\1. It will match either a double or a sinlge quote, then it will match anything until what was matched in the first group
Europe is the island underneath me, I'm in UK ...
@toscho complete BS in my opinion.
we would then prevent false matched like "hello ' world"
13:44
How good is the protection of privacy in Europe/UK?
You can't immediately deploy newest PHP on shared hosting because of security.
I have dark curtains, work pretty well ...
@ircmaxell I have to migrate a client to 5.4 next week. 20 GB backup, has to move to a different server … he could never do that without help.
In terms of hosting @JoeWatkins xD
13:45
But since that requires compiling things, you immediately lose 95% of the Shared Dev market; they have no use for a compiler in their normal job, so never developed the skills needed to compile PHP from scratch on a VM to experiment with it. And why should they? Trying out PHP.next is the only time they'd ever use those skills in the first place.
@webarto you can't deploy anything on shared hosting because of security
@webarto I don't think that's true
@toscho the host should take care of that for you. If you need to do that, you should find a better host
Shared host can't really rely on any security from the PHP side of things
@ircmaxell changing hosts is difficult too. there is always something. :/
13:45
Users information will be in the servers and privacy is key...
@toscho So blame the hosts, not the devs...
they might also use those skills if ever they got a different, dare I say it, serious job, they aren't additional at all ... there are no commercially successful ideas being run on shared hosting, if they are going to work for successful companies then of course they need to be able to compile software ... it's a prerequisite as far as I can see ...
@ircmaxell @NikiC I know, but it's not a smooth process, they can't update with each minor release and they wait until it's "ironed out".
I've used shared hosting, and they suck
Depends on the host
13:47
Most oversell
@webarto No, I mean if security actually matters, shared hosting is not what would be used
Webfaction rocks for me, I've used 1and1.co.uk in the past and that was terrible
@HamZa maybe you could be a contributor at Github ^_^ ^#(^
I use a cheap $1 hosting and it got 100% uptime so far LMAO
@KamranAhmed who knows :)
13:48
Is it possible to call current case name?
eg:

case "ETC":
$factory->create(casename) // it will create "ETC"
no
u would do switch(($var=val)) {} then you can ...
in first approximation at least ^^
you might not get the actual case label due to == semantics
NikiC/ircmaxell have you see multi-catch exceptions in java ?
no, what's that?
13:50
catch (Exception | OtherException | LastException $ex) {}
@NikiC how long have you been coding?
catch (IOException|SQLException ex) {
    logger.log(ex);
    throw ex;
}
@JoeWatkins I've thought about it, and on the surface it seems ok
@ircmaxell Of course, it's a paradox... shared hosting is a lie these days, and IMHO you are only paying for support... (sorry, I suck at wording meaningful sentences)
13:50
I like it, never seen it before, never usually use an ide, and netbeans does a hinting thing when you can switch ...
@JoeWatkins Doesn't seem particularly useful
An "I'll use this once in two years" kind of feature
anyway, the big problems with "my server has 5.1 and I cannot upgrade" are caused by fact that the DID NOT upgrade as new PHP version were released (or, in corporate environment: as PHP versions reached EOL). Now making the jump from 5.1 to 5.4 is really complicated .. and of course - since nobody was upgrading, the "senior developers" have not learned anything in past 10 years and are pushing even more against the upgrade
4
@JoeWatkins the great thing about try/catch in Java is resource management with disaposable stuff - they did a good job there.
I've no idea how long java has supported it, but I think it is useful, or at least it is in java where an exceptions name usually means something ... I guess less so in php where Exception can be, and is anything ...
@HamZa It'd be my pleasure :-)
13:53
Exception names are pretty meaningless in Java, they're usually just markers. Not that they're too special in other languages. Usually exceptions are empty classes (that extend some base exception or another one).
@webarto well, if you're only paying for support, then you should be getting some! And not being told to do it all yourself
but their name is meaningful in the sense the vm doesn't emit an Exception, ever ...
@tereško bingo
@JoeWatkins AutoCloseable
@tereško this is likely complemented by no testing, no build system and people who are terrified by their own code base.
@Ocramius no problem. thanks for trying to get some.
13:55
what I'm saying is that exceptions are distinguishable by name from each other, they aren't in php because the engine will throw an Exception (literally the base class Exception for several different reasons)
@tereško That's a developer/management problem, when I got in previous company, first thing I did was demand to upgrade 5.2 to 5.4 on most crucial company server. If upgrade wasn't "possible" for some reason, I would probably quit.
@JoeWatkins in JavaScript people throw strings, that makes me want to cry. Just becasue you can throw something doesn't mean you should.
@BenjaminGruenbaum ya, complacency. "it works fine, let's not touch it"
@BenjaminGruenbaum if it makes you happy, I throw around random things, flip tables, throw dirt
@ircmaxell I can speak for Site5, I worked on helpdesk/support application, and all I saw is that staff is dying to please customers. Sometimes 5 people work together on 1 ticket. Having 100 support staff costs money, therefore they weren't cheapest hosting.
13:57
@JoeWatkins seriously though. Proper resource disposal in try/catch is nice. It's one of the things Java got better than C#. Exceptions in Java, namely since they're all checked is pretty horrible.
@webarto which hits the nail on the head. You get what you pay for
@Ocramius You can throw null; if you really want to.
woah
@BenjaminGruenbaum i will have to incorporate it in my next project

« first day (1142 days earlier)      last day (4031 days later) »