logs archiveIRC Archive / Freenode / #php / 2015 / September / 22 / 1
mchelen1
explode($string,",")
if its a csv though you should probably parse it as csv properly to start with
SokkaDiSokk
ProNoob13, another ) in the end of the line .. so it will be 4 in total in the end ? ...
ProNoob13
SokkaDiSokk: No, after the '5'). There it should be '5')") since the bracket closes the MySQL statement, not the function.
SokkaDiSokk
hmm I can try, but that will make it a total of 6 )... and only 5 of (
ahhh
and then remove one from the end I guess :)
ProNoob13
Indeed.
SokkaDiSokk
but when I change it to: mysqli_query($dsb,"INSERT INTO devices('refNo','name','deviceType','colour','stockLevel','salesThisMonth','customerRating') VALUES('1100','Nexus 100','Phablet','KrunkaSvart','3','4','5')") or die (mysqli_error($dsb))"; I get a error saying unexpected "
ahhhh
it should also be removed from the end
NoiseEee
SokkaDiSokk: a decent text editor / IDE should alert you to these problems before you run the code, ie: syntax highlighting, inspections, etc
lenswipe
hey guys
wondered if someone could help me interpret the output of php -d?
https://gist.github.com/robertmain/62fa36f8526508cb46b5
ccolorado
Hi I have something like this while($row = $res->fetch_assoc()){ echo $i++; }. other than the $row = $res there is no other asignation, however I have hit an error about consuming all alowed memory which is a 2GB already. Is there some cleanup I should be doing on each iteration that I am not aware ?
         

bango2
ccolorado this looks relevant http://stackoverflow.com/questions/9243070/why-allowed-memory-size-exhausted
ccolorado
bango2: thanks will look into this
aolko
hi guys
any ideas why xml is not being saved? http://pastie.org/private/7fuvhzyrqp0gakixwki9q
RonWhoCares
Does anyone know the deb software source I would use for Ubuntu
themightyabby
for what?
ccolorado
bango2: unfortunatley this is for mysql not mysqli, but i'll keep looking
aolko
so...anyone?
ProNoob13
aolko: Why are you trying to save chat history in XML anyway?
SHA-7
How do I make phpmd to just tell me the number of code coupling 1 - 13. Since it is below 13 and isn't sever. It isn't reported
Any ideas?
severe*
bango2
Batch
Bad_Advice_Cat, back
aolko
@ProNoob13 xml informer
mrtAkdeniz
RonWhoCares, you want what?
which software's .deb package?
Alphos
aolko why are you 1) using xml to store data 2) using php to handle a chat ?
smassa84
Hi, can anyone help me out? http://pastebin.com/sr3EDPH4 On localhost this declaration is giving no problems, once I uploaded i'm getting an unexpected [ error
RonWhoCares
mrtAkdeniz: I am trying to install PHP 7 in Ubuntu 15.04
aolko
i have a form which sends data to php, then to xml, then flash informer (yes) catches it up (i need this for my streams)
__adrian
smassa84, the contents of the error message might be helpful
Alphos
smassa84 your server uses an old and unsupported version of php (5.3 or below), your localhost a more recent one
smassa84
<b>Parse error</b>: syntax error, unexpected '[' in <b>/home/shiftystudio/shifty.com.br/mdd/lib/SessionStart.php</b> on line <b>29</b><br />
Here Alphos, sorry
         

__adrian
oh, ok. misunderstood that.
you need to upgrade php on your server.
mrtAkdeniz
i think there is no package form of php7 RonWhoCares, you can build yourself on ubuntu
ProNoob13
aolko: Does it arrive in the function? And in the if?
smassa84
What version do I need?
RonWhoCares
mrtAkdeniz: How do I build it myself? Are these the steps I need https://robotsystematic.com/compile-php7-rc-01-on-ubuntu-15-04-vivid
aolko
well, it should 'cos it echoes just fine
__adrian
smassa84, any current version. the most current version (5.6) is the most reasonable choice.
smassa84
k.. thanks
Alphos
aolko hold on a second, do you have an /xml directory ?
RonWhoCares
mrtAkdeniz: I am getting this error when I try the 2nd command http://pastebin.com/ebwxvasP
Alphos
aolko paths are from the absolute root, not the web root
ProNoob13
aolko: But the echoes are outside the function.
mrtAkdeniz
RonWhoCares, absolutely!
Let me check your error.
Alphos
aolko !+error reporting
php-bot
aolko, 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.
mrtAkdeniz
Can't check RonWhoCares, use another paste site please. Maybe pastie?
RonWhoCares
mrtAkdeniz: Is this better @ http://pastie.org/10436362
smassa84
Adrian, that did it, thanks
Bad_Advice_Cat
Batch, welcome back. Did you enjoyed the modulus % operator?
mrtAkdeniz
try "sudo apt-get -f install" to fix dependency problems RonWhoCares
RonWhoCares
mrtAkdeniz: 1 moment
mrtAkdeniz: Is this what you were expecting to happen http://pastie.org/10436364
aolko
fixed (i think) the paths, tried vardump aaaaand nothing http://pastie.org/private/xtfohizuwtc244i5hjoq
Alphos
aolko stop flying blind. !+error reporting
php-bot
aolko stop flying blind., 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.
aolko
srsly? http://i.imgur.com/fbFUXaQ.png
no errors btw
Alphos
in your php.ini
__adrian
aolko, NO. read the advice again.
mrtAkdeniz
yeah RonWhoCares :)
you can go on on the commands
Alphos
and depending on your php version, considering you're using short tags, this whole page may well do nothing. use <?php instead of <?, always
__adrian
^
aolko
Alphos
aolko what's funny is that the line above it doesn't look a BIT like error_reporting=-1
aolko i have to tell you i really dislike repeating myself
__adrian
not "nothing" - so something else is going on :) http://viper-7.com/wxM37I
RonWhoCares
mrtAkdeniz: Please hold the line. I will provide you with Cheezy elevator music while I try the rest of the commands
Alphos
in any case, error_reporting should be -1 at all times
aolko
set to -1, still no errors
Alphos
aolko where and how do you check for errors ?
ProNoob13
(Action) is playing waiting music on his piano for mrtAkdeniz
aolko
in both ini.php and my script on pasting (on top)
pastie*
Alphos
ini.php ?
__adrian
don't do it in your script. there's no point.
what is the problem you're trying to solve
?
aolko
yes, php.ini**
Alphos
aolko : errors aren't logged in php.ini. that is a configuration file, not a log file
RonWhoCares
mrtAkdeniz: I now have this error configure: error: xml2-config not found. Please check your libxml2 installation. How do I proceed?
Alphos
RonWhoCares why do you want to install a php 7 RC yourself ?
aolko
checked the logs, empty, no errors
__adrian
aolko also, E_ALL.
you're excluding errors!
RonWhoCares
Alphos: To match the production server. We are prepping for ZF3
Alphos
aolko what is your current error reporting ?
« prev 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 next »