« first day (1774 days earlier)      last day (3184 days later) » 

7:01 PM
@Sajad I honestly have no idea .. I have never cared to look
 
ok !
@tereško done
 
ok, now try to start nginx service
 
@tereško service nginx onestart ?
 
@Matthcw oh... good. What you are trying to do isn't what a user will expect. If I want to see the last message, I want to see the last message it doesn't matter who sent it
 
try just "start" for now, and see if it fails
 
7:03 PM
Yeah I guess you are right, but how can I stop the duplication of messages?
 
@Matthcw The last message in that conversation is "Ok, catch you later", that is what both users should see as last message
 
For example if susy sends 5 messages, all 5 will show
I want only 1 to show
 
nginx: configuration file /usr/local/etc/nginx/nginx.conf test is successful Starting nginx.
 
@Sajad so, it worked
 
@tereško yes :)
 
7:04 PM
As you mentioned LIMIT 1, if Eric sends a message, then susy's will go missing since it's been Limited
 
what should I do now ?
 
but you still need to add nginx_enable="YES" in /etc/rc.conf , so that it starts automatically when system boots
 
ok
 
chx
Should I delete stackoverflow.com/questions/32211599/… ? When I asked this was a useful question but now it is not since it's in the handbook (because I added it :) )
 
@Sajad now you should turn off XAMMP on your windows and forward 80th port in VBox configuration
 
7:06 PM
I added nginx_enable="YES" in rc.conf after php_fpm_enable="YES" !
 
@Matthcw yes. the problem is that your query is "selecting users and joining message" it should be the other way round... "select msg and join users". Also, you'll need to check for my user id as both sender and recipient.
 
that's correct
 
@tereško I turned off XAMPP, how forward 80th port in Vbox ?
 
Ohhh yeahh!!! Hahah, that makes much more sense when you say it like that. I will give it a shot and if not you'll find me back here maybe tomorrow or something
Thanks though! Catch you later
 
remember this thing?
 
7:10 PM
yes
but I have ssh instead of apache
 
well, you can add as many as you need
 
ah ok, I will add new one
name ?
port ? 80 ?
 
yes, and you are a developer .. think of your own names
 
host port: 80
what is guest port ?
 
same
 
7:12 PM
for you they are 8888 and 80
 
that not mine
I pulled it of google
 
wow !! really ?
I thought you took a screenshot !
 
you really need to learn gow to google stuff
 
ok !
 
I havent take a single screenshot .. well .. aside from that one from phone with speedtest
 
7:13 PM
@tereško :) !
ok so ?
 
when it's done, you should try opening http://localhost
 
@tereško yes I remember !
 
(it probably will show 404 error)
 
This webpage is not available
I need to restart my vbox after set 80 port ?
 
no
 
7:16 PM
I don't know why it does not work
 
ok, step1: you need to make sure that webserver is working on the VM
 
how check it ?
 
open a new putty window and log in as "sajad", then try in command: fetch http://localhost in the terminal , then list files and see if you got anything
 
ok
so ?
fetch: http://localhost: Connection refused
 
hmm
go to directory /var/log
 
7:21 PM
so ?
 
there should be files nginx-access.log and nginx-error.log
see what's in nginx-error.log file
 
there is not nginx-access.log ! there is just nginx-error.log
 
well, you only need error log, so that's good enough
 
`ok
 
is anything interesting in it?
 
7:23 PM
it is empty
 
what happens when you write service nginx status in root terminal (the otehr putty window) ?
 
nginx is running as pid 1481.
 
hmm , strange
 
I think XAMPP is runing now ...
 
didn't you turn it off?
 
7:27 PM
I did
I can not connect to apache via xampp, it says 80 port is busy !
so I think vbox is fine !
 
Hello I am using chrome plugin POSTMAN for testing the webapi. I am building the webapi in php. in my backend I am receiving data like this
$json = $this->request->data('json');
$data = json_decode($json, TRUE);
$first_name = $data['first_name'];
$last_name = $data['last_name'];
$email = $data['email'];
$password =$data['password'];
but I am having trouble sending the data. it isn't recognizing the variables and giving me undefined error
 
ok, let's assume it is actually working fine
use your "sajad" user account and go to folder /var/www
 
anyone could tell me how can I use the POSTMAN plugin ?
 
@tereško ok
 
and create and index.html file with some random content in it
then try to refreshing web browser
 
7:29 PM
.html or .php
?
 
html, for now
there is a high likelihood that I fucked up at some point
 
@tereško :(
does not open index.html
 
yes I think so :)
@tereško :)
@tereško do you know what is teamviewer ?
 
ok .. working hypothesis: file /usr/local/etc/nginx/sites-active/localhost.conf was not loaded
service started, but config for localhost was left out
 
7:34 PM
curl -vI http://localhost
 
16 mins ago, by Sajad
fetch: http://localhost: Connection refused
with no entry in error/access log
well .. at least we got to the interesting part: fixing stuff
 
@tereško :)
 
We are in dead end?
 
@Sajad could you make sure that there exists /usr/local/etc/nginx/sites-active/ directory
 
7:42 PM
yes there is, but it is empty ...
 
oh
so you fucked up
there should be a localhost.conf file
where did you put it?
 
can I search it ?
 
yes, but try looking in /usr/local/etc/nginx/ first
 
ok
 
Anonymous
is this an nginx problem?
 
7:44 PM
yes, it is here !
can I cut it ?
 
@samaYo more like PEBKAC
@Sajad the command is mv <origin> <destination>
stands for "move"
 
move is different with cp right ?
 
yes
 
Hi
 
it is removed from original location
 
7:45 PM
$mes = str_replace("\n", "<br />", $mes);
this code does not work for me
 
get the file in /usr/local/etc/nginx/sites-active/ and restart nginx service
 
I'm using linux
 
Anonymous
@tereško Any errors?
 
@Nabi well .. how does "doesn't work" look like?
you want to move the localhost.conf file (I think you already realized the problem)
 
Anonymous
mv path/to/file1 /path/to/destination/filename
 
7:48 PM
@tereško yes, doesn't work
 
Anonymous
@Nabi echo nl2br($mes)
 
done
 
nl2br shouldn't be a function.
 
well, kinda same way as you started nginx .. oh .. seem to be experiencing a lag between your brain and keyboard
 
@samaYo no...
 
7:51 PM
@tereško service nginx restart ?
 
yes
 
Anonymous
@Nabi yes
 
Anonymous
@Sajad if you had chosen CentOs, you would've had everything working two hours the moment you tried it the first time.
 
WOW !!!! DONE ! my website opened !!!!!!!
 
anybody tried saucelabs? I noticed it does not play any video... not even youtube
 
7:52 PM
@samaYo I will use it ..
 
@Sajad which wesite ?
 
@Nabi I'm using virtualbox and I implemented one page on it and it worked !
 
@samaYo I actually don't think myself could set up it in two hours
 
@tereško Did you hear? Worked correctly !
@tereško how many time it takes ?
 
@Sajad for me to set up a fully functional CentOS server? about 4 hours
 
7:54 PM
@tereško oh !
 
(there is significant amount of time that you have to spend on security .. also "SElinux" thing is a pain in the ass)
 
@tereško how about UbuntU ?
 
Anonymous
@tereško I offered to provide him a clean list of how to install 7-8 stuff needed to get up and running a site, without any errors.
 
@Sajad about the same time .. but with maybe 30min more for messing with repositories
 
7:55 PM
@tereško I'm not so fluent with nginx but today in the office the sysadmin came to me because he was impressed how I edited the files. he even took over some of my changes.
 
'morning php
 
ok, @Sajad, now taht your "sajad" user, and rename the index.html file to index.php
 
ok
 
("moving file" and "renaming file" is effectively the same thing, you should know how already)
 
I use /etc/nginx/sites-available and then symlink into sites-active.
 
7:57 PM
sorry friends
 
@tereško ow !
 
mistake was from myself :-D
 
Anonymous
@hakre I did this for the server{} block about 5 months ago, it may need some updates though
 
whoever finds the mistake owns it!
3
so keep it like a gem.
 
so, @Sajad , rename the file and refresh web-browser (this step is to check if it is picking up the php file)
 
7:59 PM
@tereško why I write ls in sajad@sajad:~ # it is emtpy, but when I write cd /var/www it goes to that folder ?
 
write "cd" and then "pwd"
 

« first day (1774 days earlier)      last day (3184 days later) »