logs archiveIRC Archive / Freenode / #php / 2006 / June / 7 / 1
ammar
ChrisC35: yes, but depending on your mail server config, you might also need to provide a username and password to authenticate and allow sending.
Vlet
FlyingNun: It's not the browsers job to tell the server to parse anything. If it was, that would be a huge security problem
xshad
(Action) waves at Wolfpaws
Vlet
FlyingNun: are you sure firefox isn't just showing you a cached version?
colder
ehy there
ammar
ChrisC35: why not use sendmail, though?
Elazar
#pecl appears to be specifically for developers. It's not granting me access.
FlyingNun
Vlet: that's what I believe, from when the problem started, but I can't get Firefox to "forget"
Dangermouse
FlyingNun: Clear the cache? Do a ctrl+f5?
         

Vlet
maybe try telnet-ing into the http server and typing out the http request
FlyingNun
Dangermouse: can't do it ... can't get to that page without it prompting to download the PHP file
Can access other sites on that server that I didn't access before and it processes properly
borland
hey, is there a 'dump all variables' function?
Vlet
FlyingNun: Is this server open to the world?
FlyingNun
still, the two sites I had problems with, it wants me to download the index.php file
borland
or can one be written?
FlyingNun
Vlet: yes
Vlet
care for us to try?
||cw
borland: $GLOBALS
borland
FlyingNun: your content types and handlers are not right then
Elazar
Not seeing any other channels on the room list that appear to be PECL-related, either.
FlyingNun
It's a Firefx problem ...
||cw
FlyingNun: it can't be. the SERVER tells firefox what to do
Wolfpaws
FlyingNun: Clear cache
linux3
http://pastebin.com/763424
that is what i was able to come up with
FlyingNun
Bah ... Here is a site using PHP on the server: http://www.octanecrew.com
It will parse for you fine ...
linux3
only problem is is that it only shows one menu item
FlyingNun
I have tested in MSIE, Safari and Firefox running on a BSD machine
borland
seems to work fine in both FF and IE for me
FlyingNun
It is the firefox that I was using when I got the original error that won't snap out of it ..
I have determined this is a Firefox problm
         

markybob
having a hard time here. following the example in http://us2.php.net/manual/en/function.echo.php, but it's not outputting in multiple lines as it should. code: echo "This spans\nmultiple lines. The newlines will be\noutput as well."; why would that all be on one line even though \n is being used?
borland
I have determined that firefox works fine, therefore it is not a firefox problem
FlyingNun
Here is the Firefox problem: Not being able to clear this error from my cache
ammar
linux3: you are looping over the first row only,
thegraham
markybob: take a look at the source its just not wrapping the lines because you don't have <br />'s
borland
clear your FF cache then
||cw
FlyingNun: ctrl-f5
thegraham
markybob: try nl2br()
borland
tools/clear private data
zombieReagan
can someone tell me how to get the return variable from a method, ie the second part of this doesn't work if (parent::__construct($server, $username, $password, $type, $database) and $this->setTable($table)) where $this->setTable is supposed to return a true or false but always returns true
FlyingNun
Whenever I go to load octanecrew, I am prompted for the index.php download
markybob
thegraham, i see. thanks
linux2
ammar: ok, hang on one sec. i shall attempt to fix it (reading how to do this is a really bda book)
Vlet
linux2: try this: http://pastebin.com/763431
borland
shouldn't you use && not 'and'??
zombieReagan
i don't believe it matters
FlyingNun
borland: Thank you very much ... that solved everything ...
borland
FlyingNun: no worries
||cw
zombieReagan: that's the exact line of code? constructors don't return anything so that's not really a valid line of code
ammar
linux2: move the call to fetch row inside the for loop
linux2
ok, hang on one sec. i gotta just check something in the database
borland
zombieReagan: it seems that the error is probably inside your setTable function.
zombieReagan
hmmm, lemme try something brb
FlyingNun
The original problem was with the PHP reinstall (had to do a new make config to build the Apache module) but Firefox was caching my bad data, that's what further confused me when I thought I had configured it correctly ...
airboy
hi
webhost sends me
Your database was disabled due server overload.
Time: 75% (53468 sec) Amount: 67% (1601 queries) Rows Examined/Sent: 7342810 / 1598 Avg. Query Exec/Lock Time: 33 / 5 sec.
Please, reconfigure your script and decrease number of connections to mysql server, then database will be unchmoded.
can anybody tell me how do i fix my script what function of php or ?
linux2
Vlet: ok it works great
thanks :-)
Vlet
np
ammar
airboy: are you properly closing your db cnxns
airboy
yes
in footer file
mysql_close;
Vlet
are you querying the database inside a loop?
zombieReagan
alright, better question. when I make a new instance of an object, how should I inform the calling program whether or not the object setup correctly (say in the case where I have a mysql connection)
ammar
airboy: are you in charge of the my.ini config
airboy
yes in loops
zombieReagan
since can't seem to return anything from the constructor
airboy
i dont have access to my.ini
ammar
airboy: what about php.ini
airboy
yes i can with .htaccess
?
Vlet
it's a bad idea to query the database in loops. look into crafting a more clever query which can return all the data you need in one resultset
airboy
vlet i try this allrady but then its used system resouce to manage
that's why i use directly mysql power
but i have to use limit
Vlet
can you paste code to pastebin.com?
airboy
yes sure wait
ammar
airboy: you can limit the number of connection made by mysql through ini, but what Vlet is saying is very true.
airboy
http://pastebin.com/763452
i have only 50,000
rows
yet
ammar
airboy: anyway, besides reworking your code for better resource usage, check if persistent connections to mysql are enabled.
airboy
i can check by phpmyadmin or phpinfo();
?
ammar
airboy: phpinfo... mysql section
airboy
mysql.allow_persistent off
ammar
airboy: that's probably part of the problem.
airboy
hm u mean its need to be on>
?
but then its use more mysql power?
ammar
airboy: yes. it won't cover up for excessive resource usage though... it just allows the connection be reused.
treeta
airboy, yeah optimize the queries. but otherwise, for now you can have your host set the limits here: http://dev.mysql.com/doc/refman/5.0/en/user-resources.html
once you get too many users in a day, they will be shut out with an error
airboy
yep when ever i have more then 100hits
a sec
otherwise all ok
Xyphoid
Hee, runkit is so cool.
treeta
so have them set those settings for your account
ammar
Xyphoid: i'm hooked on runkit.
Wolfpaws
(Action) is hooked on comics :)
airboy
so i need to query this ie. (GRANT ALL ON customer.* TO 'francis'@'localhost') line before accessing databse?
Wolfpaws
airboy: #mysql
treeta
airboy, this is something you do one time. there are more lines there that you need to include
identified by... with max_queries_per_hour ...
Wolfpaws
!+g8
stormbot
Guideline #8) SQL Q's: #sql, #mysql or #postgresql. Apache Q's: #apache. Linux Q's: Either #yourdistro, #linuxhelp or #linpeople. HTML/CSS/JavaScript Q's: #web. Just because some other channel is 'dead' does NOT mean you can ask here.
punkyMunky2000
noob here. What's the best way to keep from repeating a query accidentally due to a page refresh?
airboy
ok i got it so when ever i query i just simply add identified by cool
Wolfpaws
morning, sleepie
ammar
treeta: but all that stuff is outside airboy's control. he can control (most) ini setting from his scripts though
treeta
airboy, no this statement should be executed once. not in each php script
ammar, he might have grant access on his own db.. if not your admin will have to do it.
Xyphoid
punky: put a query ID in the form when you first generate it. when you process the query check that query ID hasn't been processed first, then store that query ID whiel processing it.
Wolfpaws
Let's see...
airboy
with phpmyadmin ok?
Wolfpaws
(Action) is pressing random buttons now
w00t
:)
enygma666
anyone here happen to be decent with shell commands?
Wolfpaws
airboy: #mysql. NOW.
borland
hrm...
if I set a variable in a function
and then include anoter PHP file
SubOne
What is the "proper" way to specify <?xml version="1.0" encoding="UTF-8"?> in a php document?
punkyMunky2000
xyphoid, thanks much
borland
will the included file be able to reference the variable as a global?
or just as a variable?
ie: how do I transfer local variables from one file to another?
Geo24
Here is a line which runs on PHP 5: function wfShellExec( $cmd, &$retval=null ) { What would the equivalent be for PHP 4.3.9 ?
tkup
do I need to escape anything in this string: "$var1@$var2&$var1" ?
Vollstrecker
Hi, didn't know if I had been disconnected as I wrote. Is it possible to give another var as default for a var in a function?
borland
Vollstrecker: no
Harry_Slaughter
having a brain freeze here, got an object, one of who's properties is an array of other objects. i want the first of the sub-objects.. what is the proper syntax for this: $first_sub_object = $object->sub_objects[0]
punkyMunky2000
xyphoid, Do I need to save the id to db in order to check it?
borland
Harry_Slaughter: that looks good to me...
Xyphoid
punky: i suggest doing that yeah
ammar
treeta: true. i just wanted to remind airboy that ini is an option... in case their host says NO.
Xyphoid
punky: then if you recieve a resubmission you can display the original results
or please wait if it's still processing or something
Harry_Slaughter
borland, thanks, then maybe i'm doing something else wrong
borland
that won't work if you have an associative one though
ie: if your array is indexed by strings not numbers
« prev 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 next »