« first day (1249 days earlier)      last day (3713 days later) » 

5:00 PM
@vs7 Of course it does, but the regex first matches the URIs - the behavior you're looking for.
 
vs7
Is there any way by which we can check if any word start with http .. push that in a array
left rest all
 
vs7
so that we can generate a Array of all the URL present in string
 
That's a different questions. Do you want to test a string for a given prefix or do you want to search for all URIs present in a string?
 
vs7
search all the url and than put them in a array
 
5:04 PM
Read this article for example.
(you only have to use the regex)
 
Im doing this and it returns false:
$ruta = JPATH_BASE.DS.'media'.DS.'com_cstudomus'.DS.'documentacion'.DS.'altas'.DS.$data['cid'][0];
$borrar = scandir($ruta);
 
var_dump($ruta) - does it output a valid folder path? @MONZTAAA
 
$ruta returns this: string(114) "/var/zpanel/hostdata/desarrollo/public_html/complusoft_net/dev/tudomus/media/co‌​m_cstudomus/documentacion/altas/177"
ahh
I found it I think
 
@Jack If I may give another hint: If the parent userland function already has a symtable, copy it; otherwise use rebuild_symbol_table and directly use the symtable it creates (no copying). That should both avoid the issue and be faster/less memory intensive
 
nvm.. xD
 
5:12 PM
@DaveRandom Manually trying to get autodiscover working is like a tumor in your brain at best
 
Any ideas on my issues ?
@ComFreek
 
Now we have a man on the inside, maybe we can all be beta testers.
 
@MONZTAAA Which issue?
You wrote "nvm".
 
I mean nvm, I thought I had it but it gave false again
haha
 
5:13 PM
Check the path again
 
the path is still the same
 
@Fabien :-)
 
Try "var_dump(file_exists($your-path));
What does it output?
 
@ircmaxell If not you can let us know how awesome it is :P
 
vs7
@ComFreek the e.g. u gave only extract first link
 
5:15 PM
@ComFreek false
 
@MONZTAAA The file/folder does not exist. Check the path again.
 
vs7
but i need all links in array
 
@vs7 Use preg_match_all()
 
user image
16
happy birthday to me ... pretty cool right ?
:D
 
Happy Birthday @JoeWatkins :)
 
5:18 PM
^ I second that :)
 
Looks delicious
 
You were right, I had the path wrong very sorry :)
 
vs7
@ComFreek thanks buddy , you really help me out ...
 
Now I know who to ask when I need to implement multithreading ;)

But seriously, happy birthday!
 
@MONZTAAA its okay to do it once for clarity purposes, i believe. just don't spam it..
 
5:22 PM
@JoeWatkins you got bday?
 
@JoeWatkins awesome.. +1
 
I do, just one ...
 
++1
 
@JoeWatkins happy birthday then =D
 
fanx ;)
 
5:24 PM
there's an octocat but where's the elephpant?
 
Man I really want that cake.
 
she didn't know about the elephant
 
Why does scandir($ruta) return it all in the same array?
array(5) { [0]=> string(1) "." [1]=> string(2) ".." [2]=> string(26) "1395160730933_IMG_2234.JPG" [3]=> string(26) "1395160981675_IMG_2233.JPG" [4]=> string(26) "1395161419061_IMG_2235.JPG" }
And what are those dots?
 
@MONZTAAA "." = root, ".." = one dir up
 
Is there a way to only get the file names returned?
 
5:26 PM
@MONZTAAA there are at least 50 ways to do that
 
@JoeWatkins still cool anyway ;)
 
@salathe could you let me know 1? Im fine with just one haha
 
next year ... :D
 
:-)
 
@MONZTAAA Figure it out. It's not difficult and you'll become a slightly better programmer for it.
 
5:30 PM
I've never seen the utility in returning the root and one dir up entries in functions like that. the DirectoryIterator too. I struggle to think of a usecase where that is useful.
 
@JoeWatkins Ha, KEWL, happy birthday!
 
fanx :)
 
@ThW sweet
that's quite useful!
 
ThW
no more at() horror
 
5:46 PM
@ircmaxell nice!
i only knew that motorola was now owned by google today.. lol
 
noooooob
 
@reikyoushin wat.
 
@Danack hahaha. yeah. i suck
 
First, Google bought motorola years ago, second, they sold it to Lenovo a few months ago.
 
@Danack so the lenovo phones and motorola phones would be somewhat similar now?
 
5:50 PM
Not yet, (the acquisition is still going through I think) but yeah eventually.
 
hmm, i hope lenovo would speed up its LTE support now.. until now i think there's only one model that is LTE capable
 
vs7
I got an error "ERR_EMPTY_RESPONSE " when i request a file from AJAX
 
@reikyoushin you suck, booooo
 
@vs7 Have you checked these points: stackoverflow.com/a/13097424/603003
Your server probably closes the connection due to errors.
 
@webarto ikr =p
 
vs7
5:56 PM
@ComFreek you are right its the error i think from php , but when i run page directly its working fine
I think these two lines cause the error
$raw_data=  file_get_contents("http://jhalawar.biz/getContact/FB.php?from=10&to=50");
$reg_exUrl = "/(http|https|ftp|ftps)\:\/\/[a-zA-Z0-9\-\.]+\.[a-zA-Z]{2,3}(\/\S*)?/";
 
What are the errors?
Check your logs
 
vs7
error log is empty too
 
vs7
$raw_data= file_get_contents("http://jhalawar.biz/getContact/FB.php?from=10&to=50");
if i comment this line ajax works
 
6:00 PM
@ircmaxell why (and when) would a hash need a rehash? (noob question, sorry)
 
Does your server allow reading external URIs?
 
@reikyoushin you change settings (increasing cost, etc)
 
@ircmaxell ahh okay.. so you rehash only when a user logs in and not rehash everything after changing settings? oh wait, you cannot rehash without knowing the old password, so user needs to input it again..
 
vs7
I think
or should i use CURL ?
 
Try the line in another PHP file
cURL is faster, but not needed for such simple cases
 
vs7
6:02 PM
same error
 
What error?
 
vs7
i think cause is get_file_content
 
You have to get the actual error
 
exactly. So if it verifies, it checks to see if the settings match, and if not, rehash
 
10 mins ago, by vs7
I got an error "ERR_EMPTY_RESPONSE " when i request a file from AJAX
 
6:03 PM
This is the error from the browser
- not from PHP
 
@ircmaxell cool. thanks!
 
vs7
same error comes from firefox
IE
Chrome
 
@vs7 what do you get when you go to the URL directly? (not via ajax)
maybe there's an error 500 or something.
 
vs7
no Error at all
@ComFreek and @reikyoushin ... If i use curl rather than get_file_content
its working fine i just check
 
I suspect some limiations in your PHP configuration
which disallow file_get_contents(), but allow cURL
 
vs7
6:08 PM
its on request URI or on my server
I think get_file_contents() doesn't suite the AJAX
 
No, that has nothing to do with AJAX
You said that this single line also fails if used in a separate file
 
where do you use file_get_contents vs curl?
those are server side, and has nothing to do with ajax
 
@ircmaxell Nice article on scrypt's weaknesses! Thanks.
 
:-)
 
vs7
@reikyoushin I agree but direct URL is working ... but using ajax it cause problem
?
 
6:12 PM
Hey I'm having problems with setting up a webserver and I could use some help :S
 
@vs7 That's strange. I could only imagine that specific headers only sent by AJAX cause the problem.
 
@vs7 maybe there is something like "if(accessed_through_ajax) die();" thing on the script?
 
There are no differences otherweise.
 
vs7
@reikyoushin both code are on my server
I didnt put script like that
 
@Loko I don't think this is the right room for your question. Anyway, just ask it :)
 
6:14 PM
@Loko you could try, but dont expect it would be answered.. ;)
 
vs7
may be its server security
 
I tried installing apache and when I try to start the server I get:"The requested operation failed!" I tried different webservers and also giving me errors... :S
 
@vs7 Try to replicate an AJAX request in your browser
 
@Loko you have skype?
 
(not via actual AJAX, but using a developer console or the like or Chrome app "REST")
 
6:16 PM
 
yes
 
@Loko most probably skype is using port 80, so apache wouldn't start.. see this
 
thanks
 
@Loko np
 
vs7
ahw ... got the cause ...
 
6:18 PM
@vs7 so what is it?
 
vs7
I have use WP in main directory
which stop get_file_content using AJAX i think
 
Hmmm
I rather think that WP redirects requests when made from AJAX
 
wp redirects ajax and expects them to be catched by root i think?
either exclude that from WP on htaccess or use the built in way to request ajax on WP?
 
@vs7 See what happens if you add an additional header: "X-Requested-With: XMLHttpRequest" - it changes the output
(and the response headers!)
 
6:23 PM
@PeeHaa installing requestable locally - that shit is the shit :O
 
@PeeHaa your ID (***uvc) looks like a string auto increment? lol
 
@Ocramius what can it do that a chrome plugin cannot do?
 
@Gordon add page views to @PeeHaa ;)
 
6:40 PM
@Gordon it doesn't explode? :D
 
7:14 PM
phew.. i hate it when jquery explodes because of conflicts.. >.<
 
user2518044
Hello!
 
@Bartek uhh hi?
 
user2518044
Would anyone like to see my PSR-4 Autoloader class and give me some tips?
 
@Gordon yeah, but there are times when it explodes because one library needs this version and another needs that..
 
ThW
7:25 PM
@Bartek your class?
I am refactoring to PSR-4 and remove my own autoloader classes
 
user2518044
I'm trying to expand my knowledge about PHP so I'd like to have someone to rate my code and tell me what I'm doing wrong.
 
@Bartek You're asking for opinions in here. That's a big thing to do wrong if you're not thick skinned :)
 
ThW
@GordonM :-)
@GordonM but this is true for any chat
 
Yay! NetBeans 8.0 is released! ERMAHGERD! NERTBERRRNS!
 
-.- And I've installed 7.4 some hours ago
 
ThW
7:33 PM
Definitely not my IDE
 
@ThW Which one do you use?
 
@DanLugg neat! gonna try it out this time :)
I left NB at 7.0 or so
 
ThW
PHPStorm (before that Eclipse, and before that my own)
 
I am getting an integrity error when trying to write a hashed comment (key) to the DB, i checked the DB, there is no line with such hash. Thoughts?
 
Just watching Anthony Ferrara's lecture that was linked in the starred comments.
 
7:35 PM
@Ocramius Don't get your hopes up
 
I think he missed a trick by not doing $lion -> sleep (TONIGHT)
 
@DanLugg it's still useful to refresh knowledge of alternatives :-)
 
@rodling Have you verified your final SQL statements which gets actually sent to the DB?
 
I mean, I tried laravel before telling that I didn't like it must.stop.flaming.
 
@rodling Have you verified your final SQL statements which gets actually sent to the DB?
 
7:36 PM
@Ocramius Likewise. I said "Gee this routing is pretty convenien... NOPE.JPG"
 
Does anyone else experience timeout issues on StackOverflow? I've got an 108ms ping :o
@rodling Have you verified your final SQL statements which gets actually sent to the DB?
 
ThW
@Ocramius btw got an arduino yet?
 
@ComFreek I don't think @rodling saw your question, ask again!
 
@ThW nope :\ I got dragged in ZF2 core and since then I'm super-busy :(
 
@rodling Have you verified your final SQL statements which gets actually sent to the DB?
@rodling Have you verified your final SQL statements which gets actually sent to the DB?
 
ThW
7:38 PM
@Ocramius to bad, I was hoping for some outside ideas :-(
But good for SF2
 
@ThW I'll have to delay arduino for a while atm...
@ThW ZF2 :P
 
ThW
:-P
 
I know the letters on the kb are near :D
 
ThW
Hey, I have that keyboard for 10 years now. Some of the letters are absent :o)
 
Sorry, got logged out of the room
sek, let me get final line
@ComFreek getting duplicate entry when i take sql line and run it stand alone, same error on primary key
 
7:45 PM
Today is the day I start to write <?Php tags this way because it looks more like an Elephant :D
 
@ComFreek i have loop that adds items to the list, but it seems like ALL but one usually get rejected and occasionally one does get through
its really strange
 
@rodling You have to re-play the scenario in order to find the bug. Log all SQL statements and save your DB (table) state. Then go manually through all queries. This is quite feasible if you do not have a vast amount of queries which could cause the problem.
 
ahh first error, missed a forced exit to a loop if it is successful
oh the little things
 
8:16 PM
lol, in "Add or Remove Programs" on XP (and 7 I think) there's a little spot where it tells you how often the program is used. It says one of a few ambiguous values; "rarely", "occasionally", "frequently", and possibly others. It's never right.
 
just got an email with this in the subject line: "Just read your blog. Can I call you?"
 
Sounds legit. Better give em' your personal number.
 
@ircmaxell reply with only the word "ok, if you can" =p
(without the number)
 
nah, I'd be more likely to reply with "no"
 
jk btw.. :)
 
8:20 PM
@ircmaxell Reply with "Thank you for reaching out to me; I'd be very interested in conversing with you by phone. Could I get your number instead though?"
 
he gave it in the body
 
Oh, lol.
 
^^^ won't you ask why first?
 
Reverse it, and order pizzas to his house.
 
what if the end future of humanity relies on it?
 
8:22 PM
@reikyoushin Just wanted to say...
 
@DanLugg why would I want to spend money on him
 
@ircmaxell No no no, cash on delivery.
 
lol
 
what if its an algorithm that would be the key to finding the missing plane..
 
@ircmaxell, just read your blog, and this is crazy
But here's my number, call me maybe?
7
 
8:24 PM
or something like that
 
@cspray STTTTTTTTTTTTAR.
 
@cspray that would have been funny enough to maybe get to talk to me.
 
^ noted. :P
 
Incoming cross-post:
in C#, 17 mins ago, by Johan Larsson
user image
4
 
8:42 PM
0
Q: Gradient overlay on transparent png

DJDavid98On my website I have a PHP script that turns this image into a recolored version of the same image based on a $_GET query. An example with the query being 07a is available here. Here is the PHP script that does this: <?php if (isset($_GET['color']) && $_GET['color'] !== "") $color = preg_m...

 
@DJDavid98 It sounds like using ImageMagick, either directly or through the Imagick extension, is in your future.
 
@Danack The problem with that is I don't think it's available on the server I'm using.
 
@DJDavid98 what does the fox phpinfo() say?
 
I'll do a quick check, what section should I look for?
 
search for the string "imagemagick"
 
8:48 PM
s/imagemagick/imagick
 
> Warning: phpinfo() has been disabled for security reasons
 
23
Q: Verify ImageMagick installation

Desmond LiangMy web hosting said ImageMagic has been pre-installed on the server. I did a quick search for "ImageMagick" in the output of phpinfo() and I found nothing. I can't SSH in the server so is there a way in PHP I can verify the installation?

although if phpinfo is disabled, maybe exec() is too..
 
(note: try the first and the second answer)
 
Does anyone know why PHP dropped support for Win XP in 5.5? Was it political or technical?
 
First one fails with Warning: exec() has been disabled for security reasons
 
@reikyoushin lol, even still.
 
@DanLugg Mostly political ;)
 
@NikiC Srsly?
 
There wasn't particular much to XP support
 
It's the only ethical option...
 
8:53 PM
Second answer's code says it's not loaded.
 
@DJDavid98 That's unfortunate. You cannot use ImageMagick
 
@NikiC That was my thought; I can't imagine that there'd be hordes of compatibility issues with keeping it in BC scope.
 
Can you contact your provider? @DJDavid98
 
@ComFreek can he use gd instead?
 
I can, but I'm not sure if they would install it for me.
 
8:54 PM
@DanLugg yeah. however, it probably takes a certain amount of QA ;)
 
@reikyoushin I'm not sure whether GD supports gradients
 
Knowing my luck it probably does not
 
I get that. I mean, I get the appeal in dropping support. I'm not saying it was a bad idea, but it piqued my curiosity because I couldn't have imagined so much would need to change (or not change) to retain support.
*shrug* Meh.
 
@DJDavid98 i think it does, just not sure yet though
 
8:56 PM
These are emulated @reikyoushin
Nonetheless, they might be an option for you, @DJDavid98
 
@ComFreek well, yeah.. seems you need a library for it
 
Even after creating a new image with the gradients, I would still have to burn it to the loaded image somehow
 
It's a PHP file at least @reikyoushin
 
I don't think it's possible without pixel by pixel operations
And these images are generated on the fly, I have to keep performance in mind or set up a caching script
 
Basically, you can do all possible operations.
However, these require much work and time. It's not worth it. And it's probably slow.
 
8:58 PM
still your best bet is to ask the provider to install/enable imagick
is that a hosting or your own?
 
hosting
 
shared or vps?
 
Another idea: what do you want to do with the final images? If you want to display them on a website, a (possible) workaround would be to use SVG elements.
 
But even if they do enable it (for which the chances are pretty slim), I still have no idea how to use that.
shared
 

« first day (1249 days earlier)      last day (3713 days later) »