logs archiveIRC Archive / Freenode / #php / 2006 / May / 28 / 1
Wyleyrabbit
What do you guys (and gals) use and recommend for a shopping cart? I need to have approximately 300 skus in various categories.
Krunk
MarkR42: Well, since the site's been up on the other IP for nearly four years w/o probs, can't be that . . .
MarkR42
You say "the other IP", do you mean that you simply changed the IP address of the server for some administrative reason?
Krunk
MarkR42: well there are many more recent bug reporrts: PHP says it's not a bug -- hmmm . . don't think so . .
Luckys__
Wolfpaws, thanks, got it working, will take my dinner now :( [01:01 AM]
Krunk
MarkR42: output of ls | wc: 390 390 6628
MarkR42
hmm that's quite a lot
But not too many
390 should be well within any reasonable limits
Krunk
MarkR42: Correction. That was for local. Production site: ls | wc: 764 764 13168
kennyt
anyone know of a library to parse algebraic expressions?
         

MarkR42
Still that's not too many. I'd expect 10k before any real problems happen (and even then, it should still work)
Krunk: There is a php sessions parameter which controls how often it cleans up its old sessions. Have you changed that at all?
Wolfpaws
(Action) wags tail
Krunk
MarkR42: Nope last time I checked there were 98 sessions in tmp
MarkR42
It's possible that that error is caused by the cleanup code being triggered- that would explain why it's random, as it is (by design)
Krunk
MarkR$2: nope still set on standard dist paramters.
MarkR42
Krunk: AS far as I can tell, that error message doesn't exist at all in PHP 5.1
Which would be why it doesn't happen in 5.1 - rather, they've refined the session error handling to give more detailed messages
(Action) has been reading the src
Krunk
MarkR42: Well, I'm hoping that's the case. Otherwise I'll have to dump the new IP and go back to the old one. I'm grateful they've kept all my files/database intact.
Wyleyrabbit
can anyone recommend a good shopping cart?
MarkR42
Wyleyrabbit: Not really, I can not-recommend several poor ones though
Wyleyrabbit
MarkR42, that's been my problem
and there are SO many of them now, it's like a minefield.
I suppose I could roll my own, but dang that's a lot of work
MarkR42
I think the people who made oscommerce thought it was easy, and they made a really bad job of it, but didn't realise, and kept making it worse by adding more features that didn't work right
I actually made an entire ecommerce system
Wyleyrabbit
heh
MarkR42
on the grounds that all the OS ones were sooo terrible
Krunk
Mark42: Thanks for your suggestions. Will do more research now. Ciao
MarkR42
it's not open source yet, but might be eventually
Wyleyrabbit
MarkR42, that's EXACTLY my experience with OSCommerce (and CRELOADED)
MarkR42
Oscommerce does lots and lots of things very badly wrong and they've not realised
and never fixed them, but kept adding new features
Wyleyrabbit
and it has been abandoned. People will argue that, but they haven't released a new version since 2003 (I think)
MarkR42
Ours has a lot fewer features
There was an update to oscommerce in December
It was minor and mostly fixed glaring security holes
Wyleyrabbit
yes, exactly
         

MarkR42
Our shop was designed to run a real shop
And also works with quite a lot of payment systems, which oscommerce was really bad at. Also our modules are 1000x easier to write and make more sense
bluelotus
If you create an array outside of a function and you want to use it in the function, do you set it to global outside of the function or inside of the function or both?
Wolfpaws
MarkR42: Well.. OSC is okay... If you rewrite session management, SQL stuff and dependency on register_globals from scratch :)
Jymmm
bluelotus you can just pass the array to the function
Wyleyrabbit
Wolfpaws, yeah, but it's bad
Wolfpaws
Wyleyrabbit: That's my point.
bluelotus
Jymmm: you mean as an argument? Would there be any other way? the function allready has 12 arguments and the array is used in multiple functions.
Wyleyrabbit
Wolfpaws, yup. I concur.
perlski
hey guys, I have a script that I wrote to test mail sending using phpmailer. This is the error I get: PHP Warning: fsockopen(): unable to connect to localhost.localdomain.com:25 (Connection timed out) in /var/www/php/class.smtp.php on line 105
mail sent failed!
Any ideas?
Jymmm
bluelotus 12 args?! Tha'ts not a function, that's a full course meal!
MarkR42
Wolfpaws: There are a lot of major design errors, like the way it doesn't use templates. The way it's got a hard-coded non-negotiable html-table system. The way it doesn't allocate order IDs until after the order it (notionally) paid
Wolfpaws
Wyleyrabbit: The only codebase I've seen worse was of phpnuke... Had to add the SOAP support to the core.. Ouch.
Wyleyrabbit
Wolfpaws, the big question is though, what isn't inheritly bad? I need to have 300 skus across 10 categories. One little imaginary guy on my shoulder is telling me to write my own. Argh, I don't wanna!
Tuxthepenguin
I need some help, i am transfering my site to another server but on the server I am getting this message in my forums directory: "This PHP environment doesn't have MySQL support built in. MySQL support is required if you want to use a MySQL database to run this forum. Consult the PHP documentation for further assistance." I tried to change some things in my php.ini file but did not work, any suggestions
Wolfpaws
MarkR42: I never got that far...
Jymmm
bluelotus: http://www.php.net/global
bluelotus
Jymmm: thanks
MarkR42
perlski: Just use mail() to send mail. If you are on a win32 box, either run a local MTA or point it at one which will definitely relay for you
I wish everyone would stop writing their own smtp clients or using PEAR smtp, phpmailer etc
Wolfpaws
Wyleyrabbit: Google for cpcommerce... Never tried it, but I hear it's the real thing...
Wyleyrabbit
I also find things like PHPCart entertaining. "PhpCart™ is a popular free shopping cart system" then "order now" and get out your credit card. Free??? Bah!
perlski
MarkR42: I'm on a linux machine and the mails will have attachments in the future
Wolfpaws
MarkR42: Oh, to hell with it... LEt's just stop using SMTP protocol.
MarkR42
Wyleyrabbit: The difficult thing is, you will probably only really know whether it's any good atfer you do the integration work
Jymmm
sounds like a plan to me
Wolfpaws
:)
MarkR42
Wolfpaws: I really do believe we should. PHP has its own method of putting mails into the MTA, and it's not (necessarily) by smtp. Certainly we shouldn't rely on using a (probably broken) SMTP implementation that's not even part of PHP
You can still send attachments with mail() provided you use somethign to make a MIME message first
perlski
i've googled this and a lot of hits come up but nothing really solves the issue
Wolfpaws
MarkR42: Yes, but if you want to use any other mail server other than localhost on Linux, you're screwed.
MarkR42
Wolfpaws: No, you're not, you simply get the local MTA to relay on to that smart host. It's not difficult. Plus then you get the benefit of having the mails automatically queued in case it's down
Wolfpaws
MarkR42: In every case you need a local MTA... Or some kind of wrapper for it...
MarkR42
Having a local MTA is not a major hassle, plus also, you can then use it from things other than PHP
for example, the output from cron jobs etc
Wolfpaws
MarkR42: But what is so bad with principle of phpmailer?
MarkR42
Using a PHP-implementation of SMTP, when you don't need to; relying on SMTP to send to localhost
I guess if it gives a "connection timed out" it may be firewalled
Wolfpaws
MarkR42: not necessary... phpmailer can use php's mail() as well...
MarkR42
Not everyone creates a firewall rule to allow everything from localhost
In which case, that's the ideal solution, get phpmailer to use mail()
Wolfpaws
MarkR42: So we basically came to the starting point...
Wyleyrabbit
thanks for the tip about cpCommerce. Reading up on it now
perlski
I don't think my firewall is blocking port 25
Wolfpaws
mine does.
matthewcrane
hey room a million bucks to the person who can solvemy mystery script first, www.spacerenovation.org.uk/html/contact.php http://pastebin.com/741847 is the validator code
[NP]Tangent
hey guys
matthewcrane
the problem is on submit the redirect doesnt work
[NP]Tangent
I'm having trouble with getting PHP and MySQL to work together
Wolfpaws
!+doesn't work
php-bot
Look buddy, doesn't work is a strong statement. Does it sit on the couch all day? Does it want more money? Is it on IRC all the time? Please be specific! Examples of what doesn't work tend to help too. Finally, showing us the code is helpful (after you've explained your problem). /msg php-bot pastebin for more information
[NP]Tangent
well you see
I've installed php5 and MySQL
perlski
is there any disadvantage to not using smtp
[NP]Tangent
and the stuff that should make them work together
Wolfpaws
[NP]Tangent: What are you using? Screwdrives and screwes or welding machine?
[NP]Tangent
but I keep getting this when I run my script
MarkR42
perlski: Well, it's more likely to work, even in the event that the mail server is down
However, smtp to localhost should also work, provided your local mail server allows relaying from localhost
[NP]Tangent
jcox@jcntbk:~$ php -f Phox.php
Fatal error: Call to undefined function mysql_connect() in /home/jcox/Phox.php on line 32
Wolfpaws
[NP]Tangent: Do you acctually *have* mysql support in PHP?
php -m
[NP]Tangent
erm
no
MarkR42
perlski: I recommend you have a go at manually connecting to the smtp server on localhost (for example, "telnet localhost 25") and see if that works, then try to send a mail by manually putting in smtp, and if that all works, then your problem is very weird
[NP]Tangent
odd
could have sworn I set it up
Wolfpaws
[NP]Tangent: nothing is odd... Have you installed php5-mysql?
[NP]Tangent
yes
Seadog
hrm, when I'm writing an RSS feed in PHP how do I append an item to the end? it seems like I'd have to delete the </channel></rss> and then write another item with the two end tags added again?
matthewcrane
its so weird the contact.php just goes white nd blanmk
Wolfpaws
[NP]Tangent: um... Does this work under apache and not for CLI?
perlski
MarkR42: I can telnet to port 25 and calling sendmail from the cli works
[NP]Tangent
haven't tried under apache
Wolfpaws
then try
[NP]Tangent
alright
one sec
well
richjkl
Does list() get all wacky if I'm assigning more than 10 values at a time?
[NP]Tangent
phpmyadmin works
Wolfpaws
[NP]Tangent: Try your script
[NP]Tangent
it's an irc bot
MarkR42
perlski: Well, I'm not totally sure why it's trying to connect to localhost.localdomain.com, but that is NOT the same as localhost
And indeed, for me, localhost.localdomain.com resolves to a real IP address
Seadog
anyone?
Wolfpaws
[NP]Tangent: just phpinfo in one script and check, if there is mysql support in
perlski
MarkR42: you're right about that, a real ip for me too ... maybe the isp is blocking port 25 for me then
MarkR42
Seadog: Well, use a DOM to put the document together
Wolfpaws
MarkR42: What's "real IP address"?
MarkR42
perlski: You should not be using using "localhost.localdomain.com" as a smtp server
I guess
aneurysm
Wolfpaws: remote ip
perlski
i'm assuming he ment an outside ip
MarkR42
Wolfpaws: I mean, "real" as in "internet-routable"
Wolfpaws
MarkR42: ah, okay
MarkR42
As opposed to localhost reserved address, or lan reserved IPs
(say)
[NP]Tangent
dunno exactly where to put the script
/etc/apache2 ?
Wolfpaws
[NP]Tangent: ha?
Seadog
MarkR42, that seems a bit drastic really
Wolfpaws
[NP]Tangent: do you know, where your PMA is kept?
[NP]Tangent
PMA?
Wolfpaws
!+pma
right...
Seadog
the simpler way is to include the RSS file, str_replace the tags, add the new item tag and the new end tags
Wolfpaws
PMA ========= phpmyadmin
MarkR42
Seadog: However, manipulating XML documents inside a big string is extremely inconvenient and error-prone. A DOM is really much better if you want to add bits at arbritary places
« 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 next »