logs archiveIRC Archive / Freenode / #php / 2015 / June / 27 / 1
FancyCamel
Can anyone help me troubleshoot my problem I'm having here? I don't know how to tell if my issue is in my ajax request or in my php api fetching file. I'm not sure how to go about troubleshooting it.
This is a gist here for my files https://gist.github.com/JesseLeitch/db6e2b39e5db02e86639 Obviously I use my api key when testing and it is just omitted for the gist as to not give it out.
Alphos
FancyCamel what does var_dump($obj) say ?
FancyCamel
I'm not seeing anything. :/
Alphos
obviously
FancyCamel
Like it should just be dumping to the webpage, should it not? Or is that only if I embed the php in my index file?
I don't have a ton of php experience tbh.
Alphos
FancyCamel !+error reporting
php-bot
FancyCamel, Set 'error_reporting' to -1 and 'display_errors' to 1 in your php.ini and be sure to restart your webserver/fastcgi-listeners. This is more reliable than using ini_set() and error_reporting() in the script, which will fail if there are parse errors. See http://php.net/errorfunc.configuration for more.
Alphos
i insist on putting the settings in your php.ini
FancyCamel
I'm not even sure where I'd find that on my cpanel here. Is php.ini something that can be instantiated on a project basis or would it be something at the very root of my site hosting ?
(Asking if I am making a new file here or going in search of one)
         

asteele
within cpanel youll find it as like 'edit your php configuration'
who knows i havent used cpanel in awhile luckily lol
Alphos
FancyCamel google "cpanel php.ini", you'll find a lovely documentation that's spot on as a first result
FancyCamel
Yeah I'm in the process of googling. Couldn't find the file in my cpanel though, not the mentioned directories. So I'm currently going a bit more specific with my hosting site and may be on to something.
Seems to be talking about creating my own.
Alphos
seems to be something we don't support, advise, or care about :/
asteele
you shouldnt really be creating your own - your server already has one its using, which you need to modify but meh
¯\_(Ä)_/¯
clarjon1
okay
there's two parts to cpanel
WHM, the admin side
and cPanel, which customers see
in some cpanel setups, one can set a php.ini file in their home directory to tweak how php behaves on their site
tbws
Is this the best place to ask for help with the ZMQ extension?
sorabji
tbws: it is not
tbws
sorabji: Could you please direct me to the most appropriate place?
Alphos
tbws whichever support channel zero mq offers
sorabji
or a mailing list, or...i really don't know what they offer
tbws
Even for questions regarding the php extension itself?
and not libzmq
sorabji
yes
we can't support every library written in php
kephra
FancyCamel, cpanel is a bad environment! better install the php of your distribution, together with some web server like apache, lighttpd, or nginx
cpanel comes without mysqli by default - enforcing deprecicated SQL injection prone coding style
clarjon1
eh?
kephra
the cpanel webserver, libraries, tools, php and so on are outside of the distribution - and therefore outside of maintenance
cpanel + redhat + 1 year = sure root kit
FancyCamel
I plan on using a Digital Ocean server to actually host my project as I have a credit for the site. It was really just me wanting to test things on my current cpanel to not waste my creditted time on DO learning things ._. So much to learn, lol.
clarjon1
kephra: The servers i've setup in the pst few months have mysqli enabled by default.
*past
kephra
clarjon1, could also be that only the default shipped by server4you has "feature"
serend
can you unset multiple variables at once or do you need unset($var1); unset($var2) unset($var3);
         

clarjon1
kephra: it's been a few different hosting companies...
thebuccaneersden
serend : yes, unset( $a, $b, & etc & ); works
serend
thanks
SuperTyp
when I do a php header(Location: "/index.php"); why arent my jquery events binded to the elements?
clarjon1
wat
Alphos
SuperTyp not sure what you mean
clarjon1
SuperTyp: "When I punch in an address into my GPS, why is my car not forced on the road?"
SuperTyp
clarjon1: dafuq?
clarjon1
SuperTyp: exactly.
serend
Anyone see a bug in this if else statement that would cause another else if to be true? Basically its printing the the factoring collection process statement section when it should be printing the reserve processed
http://pastebin.com/nbXW0Cda
clarjon1
SuperTyp: You're asking why your jquery doesn't apply to the page when you tell the browser to change the page.
serend
been looking at it for a bit and wondering if I'm code blind
SuperTyp
clarjon1: okay...and what is the correct way of redirecting in php then? (like after logout)
clarjon1
SuperTyp: what we're wondering is what jquery has to do with this.
SuperTyp: if you want jquery to be applied to a page, then you should do the redirect via jquery/javascript
so that the page can finish loading.
serend
ah nevermind
SuperTyp
clarjon1: but usually when I call a page the js is applied to it, why not on header("Location...."); ?
I just don't understand the logic behind this
clarjon1
...
SuperTyp: The header gets sent first.
SuperTyp: It tells the browser "Immediately redirect to this page here"
SuperTyp: which makes the browser stop what it's doing and start redirecting as if a link has been clicked.
SuperTyp
sure and if in that link the js is loaded again?
clarjon1
SuperTyp: Imagine you've been given a form to fill out, and the person giving you the form says "Go over here now!"
Alphos
SuperTyp the Location: header literally tells your client to send the request to another resource, any content from the previous resource or the current one is discarded ; only the content on the next resource is loaded, and that includes any javascript
SuperTyp
sure and in my next resource which is loaded I have js loaded like this: http://pastie.org/10260917
serend
SuperTyp: Are you wanting the variables or input done on the prior page to remain once you redirect?
Gevox
Hello, i'm using stream_socket_client to establish a connection to remote socket with async flag. However, how can i know when the socket is avaliable for writing/reading?
is there any function to check the current state?
SuperTyp
serend: sorry didn't understand
serend: I don't want nothing to remain I want just to redirect to the index.php with fresh loaded js scripts =)
Gevox
also i tried using stream_select but it showed that all resources are unavaliable for reading and writing except my current host
that's because i'm using async socket so i thought about passing the socket by reference so when it's connected stream select can know that it's possible to read/write from it
then it showed that it's possible to write and write from all the sockets. and dumped only a single result from one socket
snow_ru
ok
Gevox
even registering a callback on stream_socket_client doesn't get fired
ule
anyone want to talk about HHVM vs PHP7?
ok :)
thebuccaneersden
what did you want to talk about regarding hhvm and php?
looks liek this place has cleared out for the weekend
phantombeta
Heya.
I need some help
I'm kind of a beginner...
Is there any way to do this:
"$fileArray = Some_File_Finding_Function ("post");"
?
asteele
phantombeta what do you mean can you do that, is that supposed to be a string or just getting the result of that function?
__adrian
phantombeta are you trying to work with an uploaded file?
phantombeta
I should be more specific...
__adrian
yes, please be more specific :)
phantombeta
Is there any way to find all files that match something, maybe a regex, and store the path to the files in an array?
__adrian
are you looking for file on your filesystem? in a particular directory?
phantombeta
Well...
__adrian
what is "something" that you want to match
« prev 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 next »