« first day (2179 days earlier)      last day (2783 days later) » 

2:38 AM
Hi everybody, can anyone help me here? stackoverflow.com/questions/39823600/…
 
3:05 AM
@Danack great slides
 
3:17 AM
!!dad
 
I just watched a program about beavers It was the best dam program I've ever seen
 
...
that one is really high in the dad joke's scale
 
:P
 
3:33 AM
shiite @tereško. pretty sure you've seen the 7th chapter already, but I will reiterate. people make me <insert all encompassing term> is sad
careful folks. this^ is not something you really want to watch if you want to keep faith in humans
 
4:02 AM
Good Morning
Can anyone help me in :


http://stackoverflow.com/questions/39820933/show-hide-text-fields-on-dynamic-radio-button-selection-php-ajax
 
 
1 hour later…
5:02 AM
:P
 
5:33 AM
:D
 
5:44 AM
Is here someone who can help me about getting started with civicrm ?
 
Hi All
How to modify this sql code?
SELECT
  t1.artefact_title AS NAME
FROM
  `artefacts` t1
WHERE
  t1.artefact_title LIKE "hey%"
UNION
SELECT
  t2.project_name
FROM
  projects t2
WHERE
  t2.project_name LIKE "hey%"
^ As you can see, I am doing same WHERE clause twice
 
Is here someone who can help me about getting started with civicrm ?
Like how to install and more
 
6:26 AM
hi all, can anyone give me php mysql code for login and php , i got some online codes , but when i checked the code in http://codereview.stackexchange.com/ , they telling

code is not good for performance and security, so please give me login-registration code if you already done, or atleast please give me some good online link that have good code
 
this week is off to a good start...
moin all o/
 
Good morning
 
Can anyone please help me out in

http://stackoverflow.com/questions/39820933/show-hide-text-fields-on-dynamic-radio-button-selection-php-ajax
 
6:59 AM
 
@MazharIqbalRana stop... did you get that code from a tutorial or write it from scratch?
@MazharIqbalRana read the red box mysql_connect
 
@Patrick Yes wrote myself. Whats in this mysql_connect. It Works and connection is made.
 
@MazharIqbalRana did you read the red box on the manual page?
* and understand
 
@Patrick Yes I did but still mysql_connect works some times this me saying. This is not error here..
 
@MazharIqbalRana It does not exist anymore in the newest PHP version. Do not use it. Is reading that hard?
 
7:16 AM
$('input[type=radio][name=equip]').change(function() {
    });
@MazharIqbalRana try this one
 
mornoing
 
Thanks @Patrick lemme change

@SagarNaliyapara Thanks lemme try
 
morning
 
7:35 AM
@SagarNaliyapara I tried this

$('input[type=radio][name=equip]').change(function() {
$(#ifPrint).show();

});

ifPrint is div I wanna show
@SagarNaliyapara It did not work out
 
moin
 
Hi there..
 
Morning!
And some new terms im going to learn shortly are: The law of demeter, Liskov substitution principle, more RestFull stuf, Open Closed principle,... To understand them in theory is not that hard but to apply them is harder.
 
I have an issue with my website. I upload my ajax code for rating profile on two different pages.. but its running properly on one page, but not showing stars on second page
I am unable to find my fault.
http://smoochwithme.com/SmoochWithMe/view_profile.php?code=TmpNPQ

http://smoochwithme.com/smoochUser/view_profile.php?code=TmpNPQ

login
rasika1992wadibhasme@gmail.com - email
rasika@smooch - pass
 
7:52 AM
posted on October 03, 2016

New Cyanide and Happiness Comic

 
Can someone define me what 'an abstraction' really is? Is the abstraction the way of layers?
 
hello
can't we use a variable inside the class. which is defined outside the class
<?php
$a = 1 ;
class checkit{
function __construct(){echo $a;}
}
$obj = new checkit;
?>
 
yes we can.
 
morning
@DaveRandom I just got home
 
@Rasika
it is not working
 
8:03 AM
@JoeWatkins You've slept somewhere else for the night?
 
make it global variable
 
it took three hours to do the first 20 miles, by then I was totally exhausted, we stopped three times so I could sleep
 
@beginner
 
@JoeWatkins Also moin :-)
 
moin
 
8:04 AM
@JoeWatkins that much traffic on a road on a Sunday evening?!
 
yeah, it was 70mph roads, restricted to 40, and then loaded with football fans (I guess) ... I couldn't understand it either, and questioned it every five minutes, alas no answer came ... it was horrible ...
gonna sleep it off today ...
 
@RasikaWadibhasme It is still not working
i tried
 
moin Joe ,Bob
 
<?php
$a = 1 ;
class checkit{
function __construct(){echo global $a;}
}
$obj = new checkit;
?>
 
<?php
$a = 1 ;
class checkit{
global $a;
function __construct(){echo $a;}
}
$obj = new checkit;
?>
 
8:09 AM
morning
 
@JoeWatkins sleep well :-)
 
@RasikaWadibhasme not working error syntax error, unexpected 'global' (T_GLOBAL), expecting function (T_FUNCTION) in C:\\index.php on line 4
 
@beginner stop. do not ever use global. Thank you.
If you want to pass outside information of your class, use constructor and function arguments
 
Anonymous
morggeeeg
 
@JayIsTooCommon still drunk ? :D
 
Anonymous
8:15 AM
on fatigue, yes definitely
 
@JayIsTooCommon i could need some help in a project later, you got some time today ? tried to fix these error yesterday for about 8 errors and no fucking way
 
@JoeWatkins errr... wat
what happened?
 
Anonymous
@Traxstar Sure, though I probably won't be able to solve the issue but someone else should be able to if so
 
<?php
$a = 1 ;
class checkit{
function __construct(){echo $GLOBALS['a'];}
}
$obj = new checkit;
?>
try this @beginner
 
@DaveRandom so much traffic leaving mancs, tooks hours, then I just couldn't keep my eyes open
 
8:17 AM
@JayIsTooCommon i will create git branch soon and share it with you :)
 
wasn't even tired when we set off, worst journey in memory ... for sure ...
 
@RasikaWadibhasme wtf. stop giving out horrible advice
 
+1 wtf
 
@RasikaWadibhasme Thanks , it works, thanksalot cheers
 
:'( was just trying to help.
 
8:19 AM
@bwoebi just gotta wait for all the energy drinks and tea to wear off ...
 
@Traxstar can you please have a loook for me

http://stackoverflow.com/questions/39820933/show-hide-text-fields-on-dynamic-radio-button-selection-php-ajax
 
well done @beginner
 
@JoeWatkins Is tea making you feel awake?
 
@FélixGagnon-Grenier yeah. I have seen it. What a terrible specimen of "human"
 
@beginner DO NOT USE GLOBALS
 
8:21 AM
@MazharIqbalRana stop reposting the same every day. i give uu advices how to fix this. if you are not able to work with it you need to improve your coding skills. no other way. nobody here will give u a full solution
 
use a constructor argument... public function __construct($foo) {$this->foo = $foo;}
 
@bwoebi not usually, but I drank 10x last night, it's probably mostly energy drinks ... stopped at every service station, even when they were two miles apart ...
 
@Patrick This not gonna work
 
@JoeWatkins :-(
 
@beginner are you trolling?
 
8:22 AM
@beginner but then the failure is in the code. using globals is just bad practice... and the way @Patrick mentioned is the usual good one
 
it really was a horrible experience, I don't recommend it ... it's just bad luck, the game, and maybe an accident or two ...
 
@Traxstar its already editted and changed one. Not the previous one I asked ...
 
at least, the drive there was easy ...
google maps tells you how long you will be in traffic jams for, and every time it got to something reasonable (10 minutes or something) it would go up to half an hour shortly after ... for no obvious reason ... for hours this went on, like some kind of torture ...
 
@Patrick I get it now , thanks, your method also works
 
@beginner you are doing it wrong
 
8:24 AM
@MazharIqbalRana and you are still caming in PHP chat to ask JS questions... if i would be in the moode to solve js questions i would do so... sorry dude
 
@tereško Hello sir
what i am doing wrong now?
 
class Foo {
    private $a;
    public function __construct($a) {
        $this->a = $a;
    }

    public function bar() {
        var_dump($this->a);
    }
}
 
@JoeWatkins :-(
 
Hi everyone! I've got a quick question; as I am building PHP-7.1RC3, I came across "--enable-phpdbg", and I was wondering if and how this debugger can be integrated with PhpStorm. Does anyone know?
 
I feel like I should apologise for some reason even though it's not really my fault :-P
 
8:26 AM
$example = new Foo('something');
$example->bar();
@beginner , this should give you some direction ... also try reading php.net/manual/en/language.oop5.php
 
@DaveRandom apology accepted ...
nah, but it's not your fault ...
 
Mornings!
 
@PietervandenHam it can't
 
@RasikaWadibhasme please stop giving advice about things you DO NOT UNDERSTAND
 
moin
 
8:28 AM
@bwoebi so am I right in thinking that what would be needed to make things consistent is just to tell libuv to use 0666? (and then umask will be applied)
 
@DaveRandom I think so, and eio too
yes, I think.
 
@tereško thanks , I understand it now , we should do it using function argument , not by using $GLOBAL , Thanks alot, cheers
 
@bwoebi OK well then +1 simple solution
 
@DaveRandom Would try first to be sure, but yea
 
was just trying to help his. what was my mistake
 
8:29 AM
I hate the umask API though
 
@beginner you can always do: $foo = new Foo($_GET)
 
it's really needlessly complex/opaque, having process-global magic state like that
 
sorry for that
 
implemented as an inversed bitmask for that extra wtf layer
 
@JoeWatkins Ah that's too bad. Is phpdbg still actively being developed, seeing the latest commit on master was on Nov 14th, 2014?
 
8:32 AM
@DaveRandom I do not disagree, it's just how things currently work though
 
it's developed in php-src now @PietervandenHam
 
@MazharIqbalRana console or alert some text to get idea of it
 
@JoeWatkins Perhaps you should mark the repo as achieved somehow, as the last version it isn't included in (5.5) is EOL by now…
 
@JoeWatkins @bwoebi and perhaps the phpdbg website as well, then :)
 
8:34 AM
yeah we're only keeping for bug tracker really, but we have bugsnet for that ... I don't like to delete the repo, what other options are there ?
 
@JoeWatkins I dunno...
 
you just walked into a room of strangers and cussed, they all think less of you @CrazyDeveloper
 
@PietervandenHam Yeah, it's really outdated. …
 
"You cannot kick suspended users."
why ?
@DaveRandom ?
 
@JoeWatkins lol
 
8:36 AM
oh I just read it properly ...
 
@PietervandenHam There is github.com/bwoebi/phpdbg-docs … but WIP and I wasn't too motivated to continue on it… perhaps I should, but I do not want to do it alone though
 
@bwoebi @JoeWatkins perhaps a giant markdown header would help a little
 
@JoeWatkins must have just been suspended I guess
 
yeah I read "you cannot kick suspend users" ...
 
oic
 
8:40 AM
@bwoebi Yea I could understand that.
 
tired, it's allowed
 
@DaveRandom - Yes. You won't be seeing him for a few days
 
we do need dox for phpdbg
 
@TheLostMind :-)
 
8:41 AM
@JoeWatkins collaborate with me, then we will :-)
 
thanks @TheLostMind
 
@JoeWatkins - Anytime :)
 
ain't nobody got time for writing documentation
 
@bwoebi yeah, we did start ... thing is we need them in docbook format, we need them in that format so they are translatable and so that the community takes some responsibility for maintaining and continuing to translate them in the future ... so writing them in markdown is a good start, but in the end, we still need to deal with docbook ...
which we all hate
 
@JayIsTooCommon Here it is: https://bitbucket.org/Traxstar/searchcare_dev

I can't figure out we he cant create the search class. no fuckin clue, just did like the other classes before..
 
8:43 AM
@DaveRandom it's really just docbook nobody ain't got time fo' ...
 
@JoeWatkins Ignore my ignorance, but is translation really necessary?
 
If somebody got time please have a look at my project: https://bitbucket.org/Traxstar/searchcare_dev

I cant figure out why my class cant be created if you start using the search function
 
@PietervandenHam oh yes
 
@JoeWatkins Do not worry about this. There are enough actual helpful people who know docbook and can assist here. The most important thing is writing.
@PietervandenHam php.net manual doesn't understand anything else really
 
@JoeWatkins I have a massive internal conflict over this. Semantic docs are good (notably good for indexing, which is a really useful thing to do with docs) but docbook is semantic to the point of impossible to do correctly
Markdown or similar just isn't flexible enough, we need some kind of middle ground.
 
8:45 AM
I don't think it's so simple for phpdbg, it requires knowledge that I certainly don't have ... the only experience most of us have with docbook are extension docs, where we use function lists and stuff ... none of that fits here ...
 
A wysiwyg editor that stored the result in docbook would be awesome
 
wysiwyg would be awesome, and I don't have to care how it's stored
 
@DaveRandom look at what the kernel is doing :)
 
but it means frontend stuff, and javascript ... are you gonna do javascript stuff ?
 
they're switching from docbook to rst (sphinx)
 
8:46 AM
@JoeWatkins please, do not worry about that…
 
I have seen people talk about rst before, I should really look at it
 
dont reinvent the wheel .... riiiight: youtube.com/watch?v=RHpxuwcNJfo
 
@JoeWatkins No but we could just make @Wes do it. He loves stuff like that. He would like to marry front end work.
 
lol
 
8:48 AM
@DaveRandom rst using sphinx is almost like markdown, except you can easily add new syntax
 
we can start at the beginning with md @bwoebi ... but I think it worth worrying about the end game a little, it's not just translation and maintenance, but reach also ... might be more important than the rest, even if we have to maintain it forever, we want as many people as possible to see it, and the way to do that is get into the manual ...
 
@FlorianMargaine is that transpiling rst to docbook or something?
 
e.g. :c:func:foo_bar is a reference to foo_bar
@DaveRandom not at all
then you have a generic syntax for "this is special"
.. foo:: arg1
   arg2
 
I dunno what rst is, so totally clueless there ...
 
and you can easily implement code to create new extensions
 
8:50 AM
@JoeWatkins yes, sure. But stop worrying now, we can worry later, when we have a real finished thing to worry about. If we just worry, we won't ever move.
 
yeah that's true I guess, we can postpone worry a little I guess ...
 
.. kernel-doc:: path/to/file
   :internal:
the syntax to use it ^
 
how are we going to test our docs though, nobody is going to read 20 md documents, they want a (c)lickable thing to use ...
 
8:51 AM
(it will generate a full documentation for all the internal functions in the file)
(really, the extension just calls another script)
 
just some simple thing to turn the md into something that looks like an html manual section would be okay ... just to develop the content, internal linking and that kind of thing ...
 
That actually does already exist, sort of
 
@JoeWatkins especially if you want cross-refs, rst is worth looking into
 
@JoeWatkins you can click around in the github preview though?
… there's just no links in there yet :-D
 
@JoeWatkins There was a thing that (I think?) Hannes built to convert MD into pages that look roughly like the current PHP manual. If you wanted to use that to build something then I would be prepared to put some time into converting that to docbook using the existing editor.
 
8:54 AM
@JoeWatkins this is what RST looks like raw.githubusercontent.com/ralt/linux/docbook-to-rst/usb/…
 
@salathe do you have a link to that ^^ thing? Or even know what I'm talking about?
 
Hi...guys...i need help to understand following condition.....I have file in my server called a.txt of size 100MB and there is PHP script that will open the file for write by using fopen("a.txt", "w") and write "script executed..." . when i invoke the script it writes file with script executed, some "\u0000" and rest all old content....it seems truncate is failed in middle.... can it be possible that truncate is failed in middle....?
 
@JoeWatkins this is part of the output for the thing I just linked ^
 
@Vijay for sure
 
hey is SessionID unique as Guid?
 
8:57 AM
@FlorianMargaine double backticks for code sequences o_O
 
well that doesn't look like crap at all ... I like that, I'm just reading about this rst thing for the first time today though ...
 
@QuietNaN Can you expand this question into more words please?
 
@bwoebi inline code, yes
it's not markdown
 
most times yeah. session id is generated by
IP address of the client
Current time
PHP Linear Congruence Generator - a pseudo random number generator (PRNG)
OS-specific random source - if the OS has a random source available (e.g. /dev/urandom)
 
@Traxstar thanks for your reply.....my other doubt is why didn't PHP didn't exit with exception...PHP version is 5.5
 
8:58 AM
@JoeWatkins it's pretty old :)
 
I was being serious, I like
 
@Vijay may u suppress i t?
 
@FlorianMargaine yeah, but still ^^
 
@DaveRandom I want to generate ShoppingCartID on UI Side, what is better to use for Unique ID? SessionID or generate new GUID
 
and, well, linux kernel is moving to it, so that's a guarantee of maintenance, somehow
 
8:59 AM
that's illogical
what did they use before ?
 
docbook
 
@Vijay That sounds unlikely, somehow, if you can open the file for writing there's no reason the truncate should fail. It's possible this is a PHP bug but it's more likely that you made a mistake somewhere
 
and they can move again, right ?
 
they have started moving from docbook to rst a few months ago
not even 10% is done
... it's going to be used for a while
 
@QuietNaN Ah right. Generate a new identifier specifically for the cart, don't use the session ID. GUID is probably a good way to generate that ID.
 
9:00 AM
@Traxstar i didn't get you...what you mean by suppress it...
 
@FlorianMargaine how do cross refs work in rst? Also having like automatically properly formatted function signatures etc.?
 
@QuietNaN the point here is that an identifier identifies a thing, it shouldn't identify two different things with the same ID
 
yeah but they could still move, they done it before ... if there is a guarantee, it moves with them ...
 
@DaveRandom <?php
define('ABSPATH', dirname(__FILE__) . '/');
$fp = fopen(ABSPATH."a.txt", "w");
fwrite($fp, "script executed...");
fclose($fp);
THis is the code i executed ....
 
9:01 AM
@Vijay what OS?
 
@bwoebi :c:func:function_name will make a cross-ref automatically
 
ah
 
("Internal Hyperlink Targets")
 
@DaveRandom this is what phpinfo says "Linux webd225.60gp.ha.ovh.net 3.14.60-grsec-hosting-web-3.14 #1 SMP Wed Jun 1 13:57:11 UTC 2016 x86_64"
 
And things like proper function sigs, warning blocks, note blocks, etc.? @FlorianMargaine
 
9:03 AM
.. note:: Unfinished

   This particular documentation is incomplete, especially with
   respect to the asynchronous mode. As of kernel 2.5.66 the code and
   this (new) documentation need to be cross-reviewed.
you can easily have e.g. .. warning:: or whatever
not sure if it already exists or if you need to add it...
 
@Vijay if you add ftruncate($fp, 0) before the fwrite() does it "fix" the problem?
 
@FlorianMargaine yeah, but that's then added once globally
 
@DaveRandom w
 
it happens very rarely , i try this ftruncate in my code....let's see if it could solve my problem....
 
9:06 AM
@JoeWatkins he's saying that the file isn't actually being truncated by the fopen() :-S
more than that, it's being half nulled out, but the file size is still the same and the end of the file still contains the original data
 
then it's because of the filename
 
more than one process is working on the file at a time, some clients open many connections ...
 
ahhhhh right
that @Vijay ^
 
hi guys,
 
9:08 AM
use flock($fp, LOCK_EX)
!!docs flock
 
[ flock() ] Portable advisory file locking
 
or a sensible filename
 
from what he's saying I think it's a batch processing job, I'm guessing a cronjob with no pidfile
 
I have a simple form including a textarea, I'm having issues getting the value of text area in PHP (getting undefined).
 
9:09 AM
@DaveRandom sure....thanks a lot for ur reply..... :)
 
This results in undefined, no matter what I write inside the textarea. I searched here for some solutions and found some stuff, like adding "name" and "id" and making them both different, adding htmlspecialchars($_POST['comments']) and so on, all of these solutions don't work. I will make a note and say that I can get the other fields values without any problems, just this textarea.

Any ideas what can be the problem?
 
!!docs getmypid
 
[ getmypid() ] Gets PHP's process ID
 
name it with that ...
 
I would like to ask PHPStorm users to upvote this issue, it's there since Mar 2011 and no response or action from devs
 
9:10 AM
or it depends really on how you want the batch to behave I guess
moin sergey
is okay to use file locking in that context, bit scary in web context ...
 
@JohnyNassar if a form element is not present when you submit a form, there is one of three things going on: the element has no name attribute, the element is not inside the <form>, or the data is being blocked because of PHP ini settings such as post_max_size (there are others that control what data PHP will accept)
Also make sure you have method=POST on the form and a sane enctype value
if you are using a textarea it's probably best to use multipart/form-data
 
rst looks nice, but does it get us any closer to getting docbook output ?
 
size of the textarea is varchar(200)
 
@FlorianMargaine @bwoebi @anyone else who cares
 
is there a problem with that?
 
9:13 AM
so... I can recognize danack and chris there... who else is in there? twitter.com/MrDanack/status/782555235189391360
@JoeWatkins dunno what's docbook output
 
@Vijay can you expand a bit on what exactly you are trying to do? (i.e. what's the data in the file and where did it come from)
 
@DaveRandom
 
bob is hugging danack, jimbo is trying to kiss me
 
@FlorianMargaine nine other people from this room, me included :-P
 
leigh is enourmous
 
9:14 AM
how can I change rhe PHP ini settings?
the*
 
peter is next to me, jay is next to peter
 
@JoeWatkins s/peter/pieter/
 
the rest is fuzzy, someone else will do it ...
 
@DaveRandom sure....What i am doing ....is listing all files in the file....when i invoke the script...it should truncate the file and write filelist in that file....
 
ah yeah, I forget
 
9:16 AM
*directory....
 
hi all, i am using this code for php-mysql login signup project, please review this code and tell me your feedback regarding code quality, performance, security..... : codereview.stackexchange.com/questions/143074/…
 
Morgeen
 
yomin
 
@JoeWatkins Anyway, once content is there, we can relatively easily add formatting … but no docs people will be able to add the content for us
 
good mornings
 
9:17 AM
Is here someone who can help me in civicrm ?
 
yeah I know we gotta do it, but switching to rst might be nice in the short term, but bad in the long term because it may be harder to get docbook output, there is apparently already some work been done on md->docbook ...
moin
 
@Vijay Where does the original file come from though? Is it basically like "a list of things to do" which is built up over time and then every so often you are running e.g. a cron job to process it?
 
Anonymous
@FlorianMargaine from left to right - Bob, Thomas, Chris, Danack, Jimbo, Leigh, Joe, Sean, Pieter, Most Handsome Man of the Year 2016, can't remember the username
 
9:33 AM
I have script called php_filelist.php ....what it does ...is opens a file with name filelist.txt, then reads all directory recursively and writes all file's name in that file. i have crop job that will happen everyday that will just invoke the script and store filelist....later other script on other server gets the filelist to process....and list it on my admin page....
@DaveRandom is it clear ...?
 
@FlorianMargaine Left to right: bwoebi ThW Danack DaveRandom Jimbo Leigh Joe Sean PeeHaa JayIsTooCommon pmmaga
 
Can I run a by editing a hosts file a website under an other domain to see how it acts like? :: for example: subdomain.site.xyz.com is the current live test version. But I would like to see if all paths are sill correct if I rename is to blah.dev ( Locally on my computer ofcourse) ( should I just get the IP from the sub-domain website and change it to my own test domain? )
 
@Vijay OK that seems reasonable I guess, I'm not sure why you'd run into this issue with more than one process using the file at once though, is it possible that your cron job is set up wrong? You need to make sure that only one process executing php_filelist can be running at once
You also need to make sure that the other job doesn't execute at the same time
flock() is probably a reasonable solution there though, if they are both cron jobs and it only happens once a day
 
@JayIsTooCommon have you got a look at my code ?
 
Just make sure that all processes that ever touch that file LOCK_EX it immediately after fopen()
 
9:39 AM
@DaveRandom i am very sure.... it happens only once in a day....i can also see it from my server logs.....
 
@Vijay OK well I guess that the issue is that the job on the other server is running at the same time then.
Locking the file should fix that
 
@DaveRandom that
is not possible
the other job runs after if filelist is completed successfully...
 
Anonymous
@Traxstar ah missed ping, in work right now but can take a look when I have time. Someone else may be able to help you in the meantime
 
@JayIsTooCommon nobody else answered. just ping me if you find time tho... i will explaion the problem then again, okay ? :)
 
@JayIsTooCommon I'm the last one on the right
 
Anonymous
9:43 AM
@pmmaga I thought that, but then your DP didn't have a beard :P
 
Anonymous
@Traxstar sure
 
:P
 
@Vijay OK well here's what I know: fopen(w) will always truncate the file, if that fails then the fopen() call will fail (return false, generate an error). The behaviour you are seeing is what happens when you truncate the file, but then you write some data near the "end" - you can replicate the behaviour with something like this:
$fp = fopen('file.txt', 'w');
fseek($fp, 100000, SEEK_SET);
fwrite($fp, 'stuff');
That will result in 100000 null bytes at the beginning of the file, then the string "stuff"
 
how long do the jobs take ?
 
As I doubt this is what you are doing in the script, a far more likely explanation is that two processes are running, one of which has a pointer a long way into the file
 
9:47 AM
@JoeWatkins less than 3 sec....
 
it only lists one directory ?
 
I wonder how flock works
is it a lock in linux VFS?
 
@FlorianMargaine see you in a few days. I look forward to reading the ridiculously niche library you find at the bottom of this rabbit hole.
:-P
 
@DaveRandom latest data is written at the beginning, in middle all "\u0000" and rest all old data....
@DaveRandom that makes me to doubt the truncate part...is not happening correctly...
 
@Vijay when you say "\u0000" you presumably mean null bytes? As in a byte with a value of 0x00?
I guess you are viewing the file in a some editor that wants it to be unicode?
 
9:49 AM
yes ....null bytes ...
 
the file is truncated
 
ya i am using UTF8
 
do you only list one directory ?
and are there any symlinks in that directory ?
 
@JoeWatkins....no all directory in the root ....recursively....
 
well that can be an infinitely long task because of symlinks
 
9:51 AM
@JoeWatkins no symlinks...
 
http://stackoverflow.com/questions/39828610/view-json-in-browser-wit‌​h-php
 
@Vijay is it nix ?
 
@Vijay and you are remembering to ignore . and ..?
 
it's a syscall
 
9:53 AM
cron isn't smart, it sounds to me like some processes are not finishing as you expect, and so cron is starting a new process while the last one is still executing ...
 
http://stackoverflow.com/questions/39828512/something-missing
 
it's just a lock in the VFS
 
@JoeWatkins what you mean by 'nix'
 
Morgen
 
@DaveRandom ya i am doing that...ignoring . and ..
 
9:54 AM
@PeeHaa moin
 
This happens once in 1000
 
mohaa
 
Anonymous
@PeeHaa mons
 
moin PeeHaa
 
@PeeHaa moin, got some time for me ^^?
 
9:59 AM
peehaa never haz times :P
 

« first day (2179 days earlier)      last day (2783 days later) »