logs archiveIRC Archive / Freenode / #php / 2006 / April / 6 / 1
CrazyTux
Koda, "the file is not being uploaded properly on the remote site" is sort of vague, what exactly is happening?
Xyphoid
forget the other site, get it working on a local test form
that way you can log what you're receiving or something
||cw
Koda: I don't see any use of $_FILES or you mime encoding it to your post fields
kaydara
i am a linux user, can anyone tell me a good php/html editor ? ( not emacs or vim plz )
itrebal
!tell kaydara about editors
nater
kaydara: i use nedit
biodan
eclipse
crrj
gvim ;D
kaydara
im work a lot with emacs but emacs dont make the php/html code right aligned
vim i have to make the tabs myself
         

itrebal
kaydara: look into the php-mode.el extension
[RainMkr]
kaydara: both emacs and vim will auto indent.
kaydara
so i am the noob
:s
let me check for that
[RainMkr]
kaydara: If you're into the whole GUI thing, Zend Studio isn't that bad, but also not free.
kaydara
i will check emacs first, im very used to it
synch
kaydara: www.php-editors.com
mick_home
so how is everyone?
:)
justathe1ry
Can anyone help me with an issue compiling on Mac OS X 10.4 "Tiger"?
espresso
kapishonas: that was it!!!
justathe1ry
I'm using ./configure --enable-embed --enable-maintainer-zts --with-pgsq=/usr/local/pgsql --with-readline --with-apxs=/usr/local/apache/bin/apxs
jbpros
I have a DOM/XSLT problem (php5); internal entities in XPath expressions should not be substitued, can someone help me? http://pastebin.com/642943
espresso
I got rid of all those methods and crap and just did some core statements, and now it works beautifully!!! Thanks a bunch!!!
kapishonas
espresso, good, plus use error_reporting(E_ALL);
justatheory
The error I'm getting: http://pastebin.com/642950
OrbX
Is there a function that gives you the current files directory as in "/forum" or "/articles" ?
stevarino
quick question: how do i instantiate a class, given it's name in a string?
OrbX: dir() and it's associates :)
OrbX
Okay thanks, new to php :)
guigouz__
Hello, I'm writing a php app, and I'm using PEAR DB. I don't know if the server I'll deploy it has pear or not, so, can I embed with my application ?
||cw
steve: $foo = 'bar'; $bar = new $foo()
tempest1
stevarino: new ClassName(args..);
oh, didn't read
         

||cw
guigouz: depending on licensing, yes
stevarino
||cw: perfect!! i was missing the parens in my tests. thanks!
tempest1: :P
guigouz
i'll try to run the pear installer on my applications' root then
||cw
guigouz: you'll also need to set the include path
MohShami
hey guys, I'm not a php expert, but I was assigned to relocate a php site from one IIS server to another, and since the code was very poorly written, it has a lot of relative paths in it, and IIS is now complaining about stearms whenever fopen, or a similar function is used, any idea how I can fix this?
||cw
MohShami: search and replace
MohShami
||cw: :'(
even the guy who did the site is unwelling to check it for the time being
||cw
and while you are at it, make them a define() so you won't have aproblem next time
i used a tool called xreplace on windows once upon a time, was pretty handle for search and replace in bunches of files
duno if it's still around
MohShami
the has to be re-written, but the server is about to crash, and I need to relocate the code to a temp server while the web developers work on the code
any quick fixes?
OrbX
stevarino: With dir you have to enter a path first, is there a function that retreives the files current path?
xDest
a funny 4o4 msg :)
stevarino
OrbX: from what? the current script?
OrbX
stevarino: I am just looking to find the folder that the file is currently in.
ibob63
I am trying to round a number to the nearest 0.5 - does anyone know a quick way of doing this?
OrbX
stevarino: Yes the path of the current script
xDest
ibob, what about round()
stevarino
OrbX: check out $_SERVER["SCRIPT_FILENAME"]
ibob63: multiply by 2, floor it, then divide back
ibob63
stevarino: like your thinking - thanks
stevarino
ibob63: you might want to round instead of floor... play and see
OrbX
stevarino: That is what i sort of want, but not all of it.. I need the current folder, for example: "/forums" , "/members"
stevarino
OrbX: ........ array_pop( explode('/', $_SERVER['SCRIPT_FILENAME']));
MohShami
||cw: any ideas?
ReT
is theere a way in php to determine the absolute path to said php file
||cw
MohShami: if it's broke, fix it. i don't know what you want
OrbX
stevarino: Thanks very much for the help!
Firefox_7
instruction Google Adsense--> http://planet.nana.co.il/hartk2003/en.htm Download free Firefox® --> http://planet.nana.co.il/hartk2003/Firefox.htm
ibob63
stevarino: settled on round instead of floor. Thanks
stevarino
OrbX: no prob, but make sure to check out the manual, especially on strings and arrays
OrbX
stevarino: Yeah thats why I like using php, got a huge library of functions to work with.
stevarino
OrbX: after time you'll see that it's phps biggest problem ;)
ReT
any ideas?
MohShami
||cw: I'm truely sorry to bother you, the website is working on the old IIS server, but it keeps giving me errors on the new one, I know it needs to be re-written from scratch, but I need a quick fix so I can start working with the developers to get this site up again with fresh code
||cw
ther is NO quick fix for sloppy coding.
stevarino
ReT: _SERVER['SCRIPT_FILENAME'] - check out php_info()'s output
ReT
thanks steve
||cw
never has been, never will be
either fix it, or duplicate the old server
which i shoulnd't even have to say...
MohShami
||cw: that is true
ReT
woah elite stevarino, it worked perfect
MohShami
I don't know php myself, but one of the developers told me there is an option in php.ini to do this, but he didn't remember what it was, I've been looking for it all day :s
stevarino
ReT: i just recommended the same basic thing to OrbX.. ;)
jbpros
I have a DOM/XSLT problem (php5); internal entities in XPath expressions should not be substitued, can someone help me? http://pastebin.com/642994
ReT
hehe that's what made me remember that question
lol
||cw
MohShami: to fix paths?
MohShami
||cw: to make php or IIS accept the relative paths they are using
||cw
php has nothing to do with relitive paths
MohShami
||cw: this is the warning I keep getting: fopen(cache/2006-04-05_HomePage_leftNews_0): failed to open stream: No such file or directory in ...
Firefox_7
instruction Google Adsense--> http://planet.nana.co.il/hartk2003/en.htm Download free Firefox® --> http://planet.nana.co.il/hartk2003/Firefox.htm
||cw
MohShami: could it be permissions?
MohShami
||cw: that was my first guess, I even tried giving full access to everybody, but it still didn't work
||cw
if it's still the same relitive path, and used to work, i don't see why it would fail... unless for some reason your php has the default feature where / is translated to \ turned off
ReT
lol @ firefox7
||cw
i don't even know what that option would be though
ReT
features fabulous additional in the browser pyerpoks: »blocker pop noses loud
LOL
||cw
ReT: you clicked it? you need your head examined
MohShami
||cw: I'm checking for that option
ReT
||cw: Was bored haha
||cw
"i'm bored, guess I'll try and catch a worm, or at least crash my browser"
ReT
version improved of pyerpoks with ruler tools of google!
ah I see
wouldn't that target IE users tho
||cw
firefox has DoS holes
ReT
only remote code execution exploits are JPG
that I am aware of
||cw
hardly worth anyomes time, but you never know
ReT
Firefox DoS holes crash ff, big deal
lolz
remote code execution is a bit more worrisome
ak47
how do i check if the file "a.txt" exists in the same dir?
||cw
yeah, that's what I don't get "linux has just as many security advisories as windows" except lin is "DoS, DoS, DoS" and windows is "remote exec,remote exec,remote exec"
ak47: you'll never guesss....
ReT
lol
||cw
file_exists()
ak47
fileexists()
lol
ReT
omg lol
that's a hard one
ak47
dont worry ill get past it
ReT
you'll recover from this humiliating experience
LAFF...I'm sure you'll carry it on your shoulders for the rest of your life
surfdue
hello!
Yango
hello!
surfdue
:P
Simple question, USING PHP, I want to make a status bar that shows progress of an uploaded file.
How is this possible :P
mattmcc
It isn't.
surfdue
really?
mattmcc
At least, not without some seriously hideous hacks.
surfdue
ok mattmcc :P how about overriding the defualt php.ini upload file limit
Is that possible AT ALL, maybe with .htaccess?
mattmcc
Sure.
malverian
Can any of you recommend a specific MVC framework to use? I need one that doesn't need to be installed system wide, and would prefer one that is object oriented rather than procedural.
martin_dfw
surfdue: seems like you need the browser to communicate with the server without disturbing the ongoing upload
malverian
I've looked at PHP on Trax, Symfony and Cake
surfdue
?
malverian
But I'm having a difficult time deciding which one to use.
martin_dfw
did you google?
mattmcc
malverian: So try them out.
mick_home
mattmcc, sometimes people want to hear recommendatations / personal experiences ;)
malverian
Yes, that's what I'm after.
I've looked at the API docs and some of their tutorials..
mattmcc
That's fine, but they should really test things for themselves too.
martin_dfw
http://www.raditha.com/php/progress.php
malverian
I like the file structure Symfony uses (similar to Rails)
mattmcc
Personally, I would say Django, but it's not PHP. :)
malverian
Yeah.. many hosts don't have python..
« prev 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 next »