« first day (1746 days earlier)      last day (3426 days later) » 

00:20
why does $ssh->exec(..) doesn't execute when we have dynamic variables as part of command
you are missing the context
0
Q: why does $ssh->exec(..) doesn't execute when we have dynamic variables as part of command

manaI am unable to run the below command when i pass the values as $start & $end but it runs successfully when i give the date values directly. Is there any other way of running the command? Note : I am using phpseclib and able to successfully login and execute basic commands. $start value is "2015-...

and, you seem to have no idea how variables actually work in php
if you write 'aaa "$foo" bbb', then it is just a string
sorry, but what is the best way to add it in exec command. I have been trying this for a while now
do you understand how strings work in php?
do you know what is the difference between:
'"$foo"'
"$foo"
'$foo'
"'$foo'"
?
00:28
yes, I do. I wanted to put this : /tpo/umc/bin/cmu_monitoring_dump -n r02bv01 -m cpunumber -t0 "2015-07-21 18:03:00" -t1 "2015-07-21 18:03:00" -f line
I concatinated time value
so that i get double quotes in the command value
lets say $foo = 'x';, what will you see when you do echo '"$foo"' ?
should be 'x'
I understand single quote prints the string as it is
and double quotes print the variable in it
@GoutamAdwant no
because that's not how strings work in PHP
see here @GoutamAdwant 3v4l.org/hKU7v
01:27
I need help with some logic, can't think straight at the moment
it's 04:28 here .. I can try
but that's all I can offer
I need some kind of cycling... giving a range of 1-9 if I have a value 2, I want to get the opposite number within that range -> 8
1 will map to 9
2 will map to 8
and so on
got it
5 maps to 5
so what you want is: 10 - x
01:32
oh... I'm running mad... Thanks.
@PeeHaa, for your future JS studies: leanpub.com/understandinges6/read
01:44
I don't know why people would down vote a question like that. It's a perfectly valid question and would likely help anyone confused by the same problem.
The guy provided code and explained what he tried. Why down vote?
0
A: why does $ssh->exec(..) doesn't execute when we have dynamic variables as part of command

SherifThe short answer is that you cannot nest double and single quoted strings, which appears to be what you're trying to do here and expecting the result to be that PHP will expand your variables into the string. Once the string syntax begins with single quotes, no characters inside of the string wil...

 
1 hour later…
03:01
dam, some people are fast
I wouldn't be among there numbers
I added a new github repo, and within minutes had 2 stars
03:58
@JoeWatkins hello, I'm /u/shoeman22 from that pthreads self post on reddit the other day...thanks for taking the time to reply to so many questions by the way...really helped me wrap my head around threading more concretely...I have a small code sample of the collect() issue I'm running into...do you have a minute to look at it (less than 20 LOC)?
04:31
Morning
04:44
mornin
05:13
DRAG AND DROP MENU ON PHP AND MYSQL AND JQUERY
any one know
sorry DRAG AND DROP nested MENU ON PHP AND MYSQL AND JQUERY
05:34
Am I able to post a function and get help understanding whats going on?
put it 3v4l.org and post the link
user924016
Mornings
3v4l.org/u7Avv @orangepill
Hi..i'm new to PHP. I want to use IDE. Which IDE is better for core php
eclipse
@prashanthi
it highlight the start and ending easily brackets
05:47
@prashanthi stackoverflow.com/tags/php/info see the section on recommended IDEs
PHPStorm is the preferred one here but you have to pay for it.
user924016
PHPStorm
best php IDE is eclipse
user924016
no not imo
@tsea what is the problem?
sublime
user924016
05:50
@Tsea not a ide
eclipse with xampp is better
for ide and server
I do not understand $seo = $this->seo; where is the second seo with no dollar sign coming from?
user924016
@madu lol no .. why?
@tsea That is a property on the object that this method is defined within
@madu um... no
Quick question guys (I'm not really a PHP person but I'm forced to use it atm): Would it be possible to change the class of an item being added from a html file through a PHP include? For example changing a list item to class="active" when loading navbar from another file?
05:53
@Orangepill what?
eclipse is like xcode
simple fast and easy
ok . what about the '$r'
@Orangepill do you know drag and drop menu builder using php mysql jquery
any free script
with nested menu builder
@tsea that is the parameter name for the anonymous function.
morning
morning
05:58
mornging
I have eclipse and notepad++.Which is better
zan
zan
sublime
Morning
I am trying to the following SQL query
SELECT * FROM ogygafsf_pos . sales JOIN ogygafsf_pos . cash_received USING(Sale_ID) WHERE Customer_Name = '$customer_name' ORDER BY Date
But it gives me an error
Saying:
Notice: Column 'Customer_Name' in where clause is ambiguous
06:13
@prashanthi currently Sublime: sublimetext.com/3
but in about a month I will start answering "Atom": atom.io
Can anyone tell me what I'm doing wrong here ?
@ZahidSaeed first of all - use prepared statements for passing data in the query
every one saying eclipse and some other IDE's,why not notepad++
morning
user924016
@prashanthi because it is not a IDE
06:16
@prashanthi eclipse is a platform.
@tereško What do you mean ?
@tereško How ?
appearance is not good in eclipse.
But what is the cause of that error ?
like font size..
@ZahidSaeed which API do you use for MySQL? PDO or MySQLi?
06:17
@tereško MySQLi
hello all
i need help in CSS
that error is there because in the " WHERE Customer_Name" part you are not specifying from which table to use the Customer_Name column
@tereško oh
but watch the video
06:19
@tereško Thanks a lot
@tereško Now I figured that out, what was the real problem
i want to fix text within headers width
@tereško I'm watching
@tereško 1 more question
sure
06:20
What is the best API ?
MySQLi or PDO ?
Cause MySQL has been deprecated
@muneemhabib what do you mean... you want to scale the text down until it fits on a single line?
The choice between MySQLi and PDO is more a matter of taste.
@tereško What do you use ?
I personally like PDO, but both of the APIs have tricks that you have to learn. Then again, my choice is also affected by the fact taht I sometimes use PostgreSQL (when I have that option) and PDO can work with multiple RDBMS.
@MuneemHabib What's the problem with that ?
06:22
@Orangepill i want to show only those charcters that fit on 1 line
if the name is 66 char but only 30 fit on the space of the 1 line show only the first 30 char only
@MuneemHabib you can use the text-overflow property
@MuneemHabib like this
^ though I wouldnt do this for headings
wao
yup
this is what i want
@tereško why whats the issue with heading?
headings are used for various levels of titles
you should never hide part of a title
06:26
right
but its requirement of my project
@MuneemHabib I think this is the better way to do it
At least for the heading
@MuneemHabib teresko is right
You shouldn't do that for the headings
I would actually do jsfiddle.net/xrmen7n7/3
so that you can see the full title when mouseovered
@tereško I did the same thing ;)
much better
yeah
mouse over is much better option
06:31
@user126715 sure thing, ping me with a gist and I'll look sometime today
thank you everyone for help
morning all
46
A: mysql vs mysqli in php

GordonThere is a manual page dedicated to help choosing between mysql, mysqli and PDO at http://php.net/manual/en/mysqlinfo.api.choosing.php and http://www.php.net/manual/en/mysqlinfo.library.choosing.php The PHP team recommends mysqli or PDO_MySQL for new development: It is recommended to use ...

53
Q: How can i change Eclipse theme?

Bangkok ApartmentI want to change Eclipse theme like this Eclipse Dark Theme: I try to do all step in this page but eclipse theme not changed (but eclipse editor changed). I want to change all part of eclipse IDE change to black color, not only eclipse's editor.

hello
<?php
foreach($html->find('#logo') as $article)
echo $article->innertext;
 ?>
whats wrong with my code ?
@winresh24 if there is something wrong it should give an error.
first guess would be that #logo should be logo but I don't know what html dom library you are use... afaik there is no find method on DomElement or DomDocument
@Orangepill its not giving me an error It couldn't parse the element on the site but when i tried other site it works fine
I have another question
the I tried to parse it in local server and it works
@Orangepill it confused me
07:02
How can I get the table name in which a certain value is found ?
For example I have joined 2 tables and I want to return the table name in which the value is found
How can I do that ?
I'm running out of options :/
http://thecodinglove.com/post/125240323649
The coding love
People using '123456' as a password
kbironneau
1438066830
@tereško You have any idea how to do it ?
@ZahidSaeed sounds like you have a problem with structure of DB itself
@tereško Ahh ?
how do I do it ?
I have heard about something like SCHEMA
07:06
what I meant was that various tables in your DB shouldnt contain the same type of data
for example, you shouldn't have two tables containing username text
@tereško yes
as for what to do in your case, simplest solution would be to use dev.mysql.com/doc/refman/5.1/en/control-flow-functions.html
but it's more of a hack, usually
i have one question ? i get friends list from facebook using Graph Api in xampp localhost. same code i have to moved kenshinkan.app-product.com server friends list showing blank page ? how to fix this issues ? help me any one ?
@Thennarasu you have to define the hostname in facebook's API config (that's in developers.facebook.com)
using facebook php sdk
07:11
that makes no difference
i have config in my app site url like this kenshinkan.app-product.com
then check for errors
@tereško can you help me please?
@winresh24 can? Probably. Want to deal with HTML parsing? Definitely no.
thank you@tereško
07:14
@Thennarasu did it fix it?
yep so sad
SDK should be reporting some data retrieval errors.
Morning
<3 @kelunik
> I ran into a fella today who said something very interesting and wanted to share it with everyone here. He said that Linux is going to be obsolete and Wlindows 10 is where "it's all going." (source)
morning @PeeHaa
07:16
o/
No@tereško its showing blank page same code working localhost xampp .Not working server .even add error_reporting on my page showing blank page
@Thennarasu you mean you are getting completely white page?
as in "php dies"?
What do you get in webserver's error log?
yes i am getting completely white page .
then you probably are getting a fatal error somewhere, most likely caused by uncaught FacebookRequestException
ok@tereško will check ..
07:20
are you running apache on that kenshinkan.app-product.com host?
how to check it ? i have only hosting details only i upload my code using FTP
you are using shared hosting?
if so, then try to put these two lines at the top of the script
error_reporting(E_ALL);
ini_set('display_errors', 1);
@tereško ok ok I finally stopped laughing
@tereško no error same blank page sir
It's kinda terrifying, when people on the internet mention "smart friend's" opinions
@Thennarasu try adding echo 1; exit; at the top of that script
just to make sure that you even get that far
also, as a side note, nobody outside India uses "sir" .. unless you are talking to someone who has been knighted by queen of England
07:32
i have one doubt my app bestapp get app id and secret and apply the code i gave permission user_friends i have to set Tell us about your website
Site URL http://Localhost// ..what i will put here when i upload my code server ?
In case you missed it, a thrilling introduction to multi-process PHP: https://medium.com/p/multi-process-php-94a4e5a4be05
the opening sentence makes me so furious, I refuse to read the rest ...
24 mins ago, by tereško
@Thennarasu you have to define the hostname in facebook's API config (that's in http://developers.facebook.com/)
23 mins ago, by Thennarasu
i have config in my app site url like this http://kenshinkan.app-product.com/
you told me, that your Site URL has already been set
hi
what kind of this this kind character is RA RA RIOT 

I want to remove this but trim() isn't working
any spl character?
its failing my json
then the problem is in your JSON
no this problem is due to this unkown character
07:38
i tired but not working.working only localhost
@Thennarasu then fined your production server's error log
without that there is nothing else I can do
I opened my notepad++ and my file encoding type is "encode in utf8 without bom"
and open blank document and pasted there
so I came to know about this character
any idea?
^ you are doing something wrong
please give me the proof...
user924016
@JoeWatkins that looks, like a crazy a way to do async.. but is it?
07:46
hello
no part of it is asynchronous ...
he's not sure what those words mean, clearly ...
user924016
okay..
@JoeWatkins "Let’s talk about asynchronous PHP code." makes you furious?
yes, because he's not talking about asynchronous code at all ...
@salathe but he has a blog. So it must be true.
07:50
@JoeWatkins but... furious?
yeah, it's annoying ...
as furious as it's appropriate to be about a blog post from a stranger anyway ... "not pleased" might be a better description ...
morning
it's not true because he has a blog, but, if you talk about something, people listen, and your ideas spread, and people base solutions and decisions on them, and if they are totally wrong, you're doing damage ... that's annoying ...
@JoeWatkins you should probably write a comment there
I've tried before with that guy I think ...
07:56
@tereško here is your answer for creating a script for connection to the database (PDO), but it is just for one database name, how can use it for several database name ?
user924016
I remember you Sajad
user924016
you had that other user the other day right?
@Sajad would you know, which DB connection each of created objects needs?
@RonniSkansing right
@JoeWatkins Do you suggest using pthreads for making (faking) async queries to mysql database?
07:59
@tereško em, I'm not really sure to understand what you are asking me .. (I'm who don't know english :-) )

« first day (1746 days earlier)      last day (3426 days later) »