logs archiveIRC Archive / Freenode / #php / 2006 / February / 19 / 1
zimnyx
CryWolf: +1h
CryWolf: i'm almost sure it;s PEAR Date trigger it
pauliukas
Hey guys. Anyone know a very tiny, secure and simple PHP forums script? On the scale, phpBB is waaay too much (and insecure as well)
zimnyx
but i looked into PEAR Date code, and it doesn;t setlocale.
CryWolf
zimnyx: could be, if it changes the locale. Can you duplicate with a simple test script?
zimnyx
yeah, give me a minute.
CryWolf
zimnyx: I'll give you an hour, if you want
Stormchaser
lol
DogWater
Anyone know how you go about writing arrays to a session?
$this = $_SESSION['that']; is a variable
Stormchaser
$_SESSION[a'] = array();
er... missed a ' there
         

DogWater
well; what im doing is i have a form setup like this <input type=\"text\" name=\"blah[$x]\" value=\"\"> right now when it passes to the next page I have $blah = $_POST['blah']; and there is my array; and i just do my little foreach magic and away I go. is that all i really need to do with sessions? I hardly ever work with sessions as you can probably tell
zimnyx
CryWolf: http://pastebin.com/561742
ceeto
Hi all. I'm installing a library from a payment processor and php needs a path in an environment variable. Would I do that in apache or php.ini?
Stormchaser
DogWater: I have no idea, what you mean by 'foreach magic'
DogWater
Stormchaser: foreach ($blah as $key => $value) { then whatever operations i need..
Stormchaser: basically i just need to make it easier for people to change the values of blah.
after they initially submit the form
and i figured sessions would make it easier
Stormchaser
DogWater: Actually You are not giving us enough information... Why do you want to send the POST name to a session, anyways? That would only make sense, if you're creatuing a wizard...
*creating
DogWater
Stormchaser: Ok I have a large form where people select things; and then quantities of things, like they say ok this is how many people are registering for this seminar, and this is how many people want to come to the bee catcher's seminar.. right? On the next page, it shows a summary; instead of having to click back to change everything and resubmit; i thought it might be useful if they could update the selections (based on data already entered)
on the page they're already on
ComputerWarm
anyone here use sybase?
Stormchaser
DogWater: You could also have hidden fields with informations in it...
DogWater
Stormchaser: yeah Im sure that would work to but i thought the idea of sessions was kind of to do it this way
sal
hello
Stormchaser
sybase... heh... Never thought I'd heard that again :)
DogWater: Nah... I wouldn''t do it...
sal: Yes?
DogWater
especially since they have to fill out about 7 pages of information
and select a bunch of stuff
sal
if i require a file from another dir, what would be the dir to use in that file? its own or the dir of the file that required it?
Stormchaser
DogWater: Ah, that is different, then.
DogWater
My example kind of down played the application
Stormchaser
Sal: Include 'dir/file'
DogWater: Um... What happend?
sal
Stormchaser: yes.... but the in the file included, i need to include another one
so what dir should i use?
DogWater
I just used that as an example but its a bigger project than that
Stormchaser
sal: You should include the fries from where getcwd() says...
         

sal
ok, thanks
Stormchaser
DogWater: I don't see any reason why $_SESSION['stepxyz'] = $+POS; wouldn;t work...
bah... $_POST
DogWater
Thanks i'll give it a hsot
SkramX
can aapache using gd or whatever make graphs?
^Migs^
I can't seem to wrap my mind around how to make a banner that would rotate each time the user refreshes the page
tek_
^Migs^: phpadsnew.com
insin
SkramX: you can use GD with PHP, yeah
^Migs^
would a MySQL db be the best way to store the banner position? How would this work if thousands of people are viewing the page?
SkramX
^Migs^: oh, so it has to track which ips have seen which banners?
insin
SkramX: there are handy libraries out there which utilise it, too: http://pear.veggerby.dk/samples/index.php?sample=plot_all
tek_
^Migs^: that would be fairly easy to do
Stormchaser
SkramX: Well... Apache only serves pages... IU can't imagine, what it would do with GD
^Migs^
well, they're actually articles, but I thought banners would turn on a few more light bulbs
nmatrix9
hmmm is there a function which can check the permissions of a dir/file?
forexample
Stormchaser
*I
nmatrix9
something like checkperms($file);
or something
don't wanna have to write it myself
domas
^Migs^: hardcore.
nmatrix9
reinvent the wheel so to speak
Stormchaser
migs: All burnt out for you?
domas
hardcode
damnit
SkramX
I need to make a grapj.
Simplex3
Are php's lookahead and lookbehind somehow hosed or do they not work in preg_match for some reason? I have a regex that is working in perl & .net but doesn't work in php.
^Migs^
I don't want to add ips to the db
Stormchaser
then google for jpgraph, domas
tek_
^Migs^ then add session_ids, you have to have something to know whose seen what unless you want them to see the same ads over and over, you can also use cookies
Stormchaser
migs: They are usefull information
domas
Stormchaser: jpgraph? me? why?
^Migs^
hmm, okay
Stormchaser
dammit... I ment SkramX
^Migs^
I was wondering if there was just an easy way that was simply eluding me.
well, session_ids is easy anyway
Stormchaser
domas: You were in te way :/
dammit
oh, this is my nickname too ;-)
^Migs^
I thought about using Javascript, but that might get too messy
Stormchaser
dammit: Funny...
migs: Ip's are asy, too
tek_
^Migs^ You could be _overkill_ and make a session id like $_SESSION['ads_viewed'] and just add the ad id in there and just use in_array() to see which one they've viewed, then pull from one of the ids they haven't
man i've been having a hard time finishing projets
I get to a certain spot in almost all of them
then just move on
dammit
tek_: you can always hire someone else to finish them
tek_
dammit: yes but i'd like to be able to finish them myself... I just hit a block and recently it's been templates
and how to get all that to go together... it's been a pain in the ass to learn
swissmade
Hi. Using FreeBSD ports, how can I get postgres support into php? (not a sysadmin)
tek_
templates are simple, but making logic, display, all that for some reason is hard for me and i've been trying to come up with a good system but i'm getting frustrated
ComputerWarm
anyone here use sybase or know where i can get the rpm module for php
Stormchaser
swissmade: Install php-pgsql
the-drew
tek_: im in the same boat as you buddy
Stormchaser
ComputerWarm: You'd need freeDTS for that
tek_
the-drew I know I can code all the programs just fine... I Just can't seem to get a grasp on how to tie it all together
Stormchaser
Er... TDS...
(Action) never knows the tight name for that
dammit
FreeTDS!
swissmade
Stormchaser: is that a command? Where do I run this, in the ports/lang/php directory?
dammit
I've been freebsd port maintainer for it like... 7 years ago
lots of dirty stuff in it back then
the-drew
im doing mine with modules... basically just using smarty for the templates and inserting a different module for each page, be it about us, inventory, or otherwise... i associate the stylesheet with whatever template is selected
ComputerWarm
Stormchaser freedts has the module i need to connect to sybase?
dammit
ComputerWarm: use php-mssql if you find it
Stormchaser
swissmade: I have no idea... Try something like php-mssql or php-sybase...
dammit
mssql speaks [almost] same protocol as sybase anyway
ComputerWarm
oh ok thanks guys i will try it
Stormchaser
dammit: Well... Not naymore... MSSQL went trough an overhaul in version 2000, so it's safe to assume, that the conversation MSSQL<-->sybase is not compatible anymore
coolpix
Can somebody give me an example for creating a splitted window like irssi with Term::Visual which doesn't exit until I press ctrl+c ?
Stormchaser
#irssi
tek_
say that 5 times fast
irssi
irssi..
ERR-SI
roundyz
could someone hel pme with this please
<?php
coolpix
oh damn.. I want to post it in #perl :)
roundyz
http://pastebin.com/561792
Stormchaser
!tell roundyz about pastebin
roundyz
http://roundyz.com/uni/assesment1/contact.php
its a mail script that mails infor from a form
colder
*gasp*
roundyz
however, the info isn't being mailed.
Stormchaser
$subject = $_post["subject"]; <-- What the hell is this?
colder
I still wonder why I so often see "$var".
roundyz
Stormchaser: whats wrong with that?
ceeto
Hi all. Is there somewhere in the php.ini that I can add to the search path? Or does it use apache's?
colder
variables are case-sensitive
ceeto, "search path" ?
you mean the include path ?
roundyz
thats why it aint working then,
brb
ceeto
Yep. Include path.
i.e., a path that php will use to find modules that aren't in the standard dir.
colder
ceeto, here you go http://php.net/ini.core#ini.include-path
Stormchaser
roundyz: Please filter your input, if you stick it into the DB and/or mailing system...
colder
hi Storm
Stormchaser
yo, colder! :)
ceeto
Thanks.
roundyz
Stormchaser: what do you mean by filter my input?
Simplex3
FYI, the same pcre regex doesn't work in php 5.0.4 but does in php 5.1.2.
Stormchaser
roundyz: Check, if the email is email, as horrible stuff can happen...
colder
Simplex3, which is ?
Simplex3
Looking in string: <foo="bar" me="myself">
colder
and you mean, using the bundled lib ?
Simplex3
This pcre: (?<=foo=").*(?=" me)
In 5.1 it returns "bar", in 5.0 it returns nothing.
sal
is there something i could check to see if i'm on the server or just testing on my local pc?
i need to separate the db connection vars
« prev 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 next »