@# Quotes DB     useful, funny, interesting





Google
 
Web www.quotesdb.info
Undernet  |  EFnet  |  Quakenet  |  Freenode  |  Dalnet  |  Ircnet  |  Galaxynet
Page: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19



Comments:

<0> Tarantulafudge: Add exit; after all those header location lines just so we can rule that out as the problem
<1> MarkL: done, but no change, want me to update the pastebin?
<0> Yeah .. with just auth.php though ;)
<0> Tarantulafudge: And put error_reporting(E_ALL); at the top of auth.php too
<0> Tarantulafudge: You can remove it once it works stand alone
<0> Tarantulafudge: Also .. all those global calls are not needed, as there's no functions here
<1> MarkL: well you see those variables are pulled from another included file
<0> By 'all those' i mean that one line btw ;)
<1> http://pastebin.com/717274 UPDATED
<0> Tarantulafudge: global is only useful inside a function to pull vars into scope
<1> lemme do the error_reporting
<1> MarkL: what about includes?
<0> Tarantulafudge: They will be in scope
<1> / INDEX \
<1> config.php auth.php
<1> ok error reporting is there but still nothing



<1> UPDATED http://pastebin.com/717277
<2> $a = -3.14; $b = (int)$a; Shouldn't $b == -4
<2> ugh
<1> hmmm
<0> electrofreak: When converting from float to integer, the number will be rounded towards zero
<0> Tarantulafudge: auth.php as you have it now works fine for me if i access it directly
<1> MarkL: as an include?
<0> Tarantulafudge: No .. access it directly .. http://whatever/auth.php
<0> Tarantulafudge: You said that gave you a blank page
<1> MarkL: your right
<1> MarkL: hmm
<1> MarkL: wtf, I poked a hole in my htaccess and it works...
<0> Tarantulafudge: Before include_once($catgot . $pgext); in index.php put die('INCLUDING: '.$catgot.$pgext); and see what it says
<0> Tarantulafudge: ah ;)
<1> MarkL: thats not right..
<1> ok, I'll do what you said
<0> Tarantulafudge: What does 'poked a hole in my htaccess' mean btw?
<1> MarkL: exceptions for files visitors are physically allowed to see un-rewritten
<1> MarkL: pm?
<0> ok
<2> MarkL, calculus... in math I learned that the int of negative decimals would do as I show in my example. Perhapes I misunderstood?
<0> electrofreak: If you want to round, use round() floor() or ceil() , (int) is really just a blunt instrument to perform a type cast
<3> If I declare a db connection in file A, and a variable $var in file A, how is it that I can use the $var in file B without redeclaring, but not the db connection in file B?
<1> MarkL: lemme switch to xchat, gaim seems to hate private messaging
<3> err, I include file B within file A
<4> how can i send commands for PHP GTK ( Command.com ? )
<4> i want to create an .exe for that
<2> MarkL, ok
<4> when i clicked it ( it can send this response to my system after it can be closed or minimize )
<5> how would I go about inserting a string at the beginning of every line (including the first) in a big, multiline string?
<6> Urthogie, search for line breaks
<7> why is it when entering 00038 into mysql, it only enters 38
<6> Axsuul, type is integer ?
<6> it should be varchar to accept 00038
<5> fourat:1)any way to do it without a loop? 2)How will I get the first line, then?
<6> Urthogie, no need to loop, str_replace() "\n" with "\n$string"
<6> Urthogie, this will not affect the first line, do $data = $string . $data;
<5> ok
<5> thanks, ill try that
<8> i got a question about $filesize on an uploaded file
<8> err, filesize rather
<5> fourat:One problem remains-- the script lags indefinitely when confronted with spaceas.
<5> *spaces
<8> I am making a basic upload script and I want to check the filesize of the file.. do I move the file first, and than check the file size ?
<0> [Ex0r]: Naw, check first
<0> [Ex0r]: If the size is out then you don't have to move it and it will be zapped at the end of script execution
<8> I'm trying to figure out how to go about doing it. I have a form that is setting the $file as $_POST['upload'], and than I use filesize($upload), but it's telling me somethings wrong
<0> [Ex0r]: If you first move it then you'll need to remove it if the size is off
<0> [Ex0r]: Uploaded files don't go in the $_POST array, see $_FILES
<8> ah, that would be a problem, wouldn't it? :P
<9> [Ex0r]: not really...
<0> [Ex0r]: So check filesize($_FILES['whatever']['tmp_name']) or just $_FILES['whatever']['size']
<0> [Ex0r]: You could still use the file name stored in the $_POST but you might as well just use $_FILES as all the info is already there
<8> yeah, I am doing $file = $_FILE['upload']; and if (filesize($file) < 1)
<0> But $file will be an array
<0> if (filesize($file['tmp_name']) < 1)
<8> ah, I see.
<10> I'm trying to use the 'mail()' function and it just fails I see no errors in the error_log file
<0> or if ($file['size'] < 1)
<8> not showing either way
<0> naknomik: Even with a simple hardcoded test like mail('whoever', 'subject', 'message'); ?



<0> [Ex0r]: $file = $_FILE['upload']; should be $file = $_FILES['upload']; sorry
<10> MarkL: Yes.
<0> naknomik: Windows or *nix?
<10> This is my php file: <?php if (mail("naknomik@hotmail.com", "Mail from php", "This is a test message")) {echo "Mail Worked!<br>";} else { echo "Mail Failed!<br>";} ?>
<10> MarkL: Linux
<0> naknomik: Have you checked the mail log to see if it's getting that far?
<9> naknomik: What does the mail log say?
<8> MarkL- I seem to have lost the paper I had, what should the form's enc type be ? enctype="non-html" ?
<0> <form enctype="multipart/form-data"
<8> there we go
<10> MarkL: I see following error in maillog: May 14 11:59:26 bapat sendmail[27190]: NOQUEUE: SYSERR(apache): /etc/mail/sendmail.cf: line 0: cannot open: Permis
<9> !+file-upload
<11> Uploading files with PHP, the 101 version: http://www.php.net/features.file-upload
<9> ^-- [Ex0r]
<10> MarkL: What does that mean? apache needs to be able to read sendmail.cf?
<9> naknomik: no.
<9> naknomik: I'd ask in #yourMTA, if I were you...
<12> output buffering doesn't catch output from GD library (e.g. imagepng($image)), is that normal or I have something wrong?
<9> alienbrain: Why would you need output buffering for that?
<8> perfect, working like it should be now
<13> Iwant to learn coding. iS php hard for a beginner?
<9> yes... Harder than ***embler.
<13> that cant be
<9> sure it can
<13> why?
<12> Stormchaser, good question :D, because I'm using a php library that doesn't want to use the file parameter I p*** for it. and ouptuts the binary directly to the browser
<13> at last php code gets ***embled, or?
<9> huh?
<0> Do you want to learn coding .. or PHP? Two different things ;)
<13> ?
<9> alienbrain: How do you mean "doesn't want me to use"?
<9> Which PHP?
<14> One question, i have a php file in which i'm including a cl*** i wrote, in that file i have some functions, in one of them i did something like this: $object = new Mycl***; and it gives me the following error: Fatal error: Cannot instantiate non-existent cl***: cl***vendedor in index.php on line 132
<0> alienbrain: Which lib? Not jpgraph is it?
<12> MarkL, it's!
<0> alienbrain: Then you are doing something wrong, it works fine ;)
<12> Stormchaser, I'm sorry, meant it doesn't use the file parameter I give.
<14> it's like it's not finding my cl*** or something?
<0> alienbrain: pastebin the relevant section of code
<12> MarkL, heh, how did you guess it's JPGraph?
<0> alienbrain: Magic ;)
<9> alienbrain: And I awk again: Which PHP?
<9> *ask
<12> Stormchaser, PHP Version 4.4.0
<0> JoelR: Which file defines the cl***vendedor cl***?
<12> Stormchaser, stock mandriva 2006 (yuck!)
<9> o.O
<14> MarkL: a file called cl***Vendedor.php that is in the same directory that index.php
<0> JoelR: And that is included before the errornous file is included?
<0> JoelR: Oh, nm, the functions you mention and the cl*** are in the same file?
<14> MarkL: no..
<0> oh
<14> MarkL: the functions are on the same file (index.php), and i have a cl*** file apart
<14> MarkL: by the error it gives, i guess it is not finding my cl*** because it says "non-existent cl***"...
<0> JoelR: And the file is being included ok?
<12> MarkL, here we go: http://hashphp.org/pastebin.php?pid=6683
<0> JoelR: Put an echo at the top of the cl*** file just to be sure as a test
<14> MarkL: i think so.. in the first lines i put require_once('cl***Vendedor.php');
<12> oh, copying and pasting from terminal was never good!
<3> does PDO support mysql5+?
<14> MarkL: ok, it's not printing me anything, i already put an echo at the top of the cl***..
<14> it's not finding my files
<0> JoelR: Put error_reporting(E_ALL); as the first line of the 'main' file, see if there's errors your not seeing about your include_path
<14> MarkL: in php.ini i have this: ; UNIX: "/path1:/path2"
<14> ;include_path = ".:/usr/share/php"
<0> ; means it's commented out
<14> should i uncomment that line right?
<0> Might as well ;)
<0> (and restart apache)
<14> hehe let me try..
<0> alienbrain: Put error_reporting(E_ALL); as the first line of that file, echo out $systemPath and make sure the path exists and is writeable by the web server
<12> MarkL, roger
<12> MarkL, a better paste (previous had weird whitespaces allover, sorry) http://hashphp.org/pastebin.php?pid=6685
<14> MarkL: nothing, it didn't work :(


Name:

Comments:

Please enter the result of the sum 63 + 46 (to avoid spam):






Return to #php
or
Go to some related logs:

query between now and week ago mysql
#perl
alinux pvr-150
#ai
Debian testing dhcpd3
genkernel loop support
#gentoo
#linux
screen irssi accents
damn small linux dual display setup



Home  |  disclaimer  |  contact  |  submit quotes