php-general Digest 14 Mar 2005 10:15:19 -0000 Issue 3337

Topics (messages 210625 through 210649):

Re: software catalog
        210625 by: Robbert van Andel

ayuda
        210626 by: Pedro Luis Cruz Riguetti

newbie php/mysql need help
        210627 by: p80
        210628 by: Robbert van Andel
        210644 by: Burhan Khalid

eregi expression for checking a domain
        210629 by: Ross Hulford
        210631 by: Jim Plush
        210632 by: Jim Plush

Re: passing variables between pages without sessions
        210630 by: Jim Plush

PHP Frameworks
        210633 by: Simon Reye
        210634 by: Jeffery Fernandez
        210635 by: Simon Reye
        210645 by: Burhan Khalid

Re: php 4 & php 5
        210636 by: mbneto
        210640 by: Hans Zaunere

PHP5 & JBOSS
        210637 by: david joffrin

How to Get URL?
        210638 by: Labunski
        210639 by: Jeffery Fernandez

include("sendmail.phps");
        210641 by: John Taylor-Johnston
        210642 by: Robbert van Andel
        210643 by: Burhan Khalid

Re: IMAP with ssl support
        210646 by: Bostjan Skufca . domenca.com

64-bit PHP
        210647 by: Abdul Rehman Gani

Re: Building PHP5 on Windows - VS.net?
        210648 by: M. Sokolewicz

PHP 5.0.4RC1 and PHP 4.3.11RC1 rolled
        210649 by: Zeev Suraski

Administrivia:

To subscribe to the digest, e-mail:
        [EMAIL PROTECTED]

To unsubscribe from the digest, e-mail:
        [EMAIL PROTECTED]

To post to the list, e-mail:
        php-general@lists.php.net


----------------------------------------------------------------------
--- Begin Message ---
I've used Zen Cart (http://www.zen-cart.com/modules/frontpage/) in the past.

-----Original Message-----
From: Judson Vaughn [mailto:[EMAIL PROTECTED] 
Sent: Sunday, March 13, 2005 3:05 PM
To: [EMAIL PROTECTED]
Cc: Ryan A; php
Subject: Re: [PHP] software catalog

X-Cart has a very nice feature for delivering "intangibles". But it is 
around $285.

Jud.



Judson Vaughn
[EMAIL PROTECTED] | [EMAIL PROTECTED]
Seiter Vaughn  Communications
12455 Plowman Court
Herndon, VA 20170
703.450.9740
svc


Richard Lynch wrote:
>>Hey!
>>Anybody know of a "software catalog" (or cart preferably) that is free?
>>
>>A site i am working for sells software, now they want to have a cart
>>feature
>>so people can put the packages in a cart and get discounts etc if they
>>purchase more than 1 product...they are using 2checkout for processing.
>>
>>I checked the usual places and google of "php software cart" but got back
>>garbled results, most of that carts are for tangible products :-(
> 
> 
> This might have "sells intangibles" as a feature check point:
> 
> http://l-i-e.com/compare/index.htm?date=1970-01-01
> 
> Or you can add it and check back after some people "vote"
> 
> Disclaimer: I hacked this up after the umpteen flame war about PHP
> Shopping Carts on this list in, oh, call it 2000 or so...  God only knows
> which of those solutions is way out of date or whatever.  Caveat Emptor.
> 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

--- End Message ---
--- Begin Message ---
-- 




como pueddo hacer para salir de esta lista 

---------------------------------------------------------------
Banco de Crédito BCP - Dedicados a hacerte la Banca más simple.
Visita nuestra Banca por Internet http://www.viabcp.com
---------------------------------------------------------------

--- End Message ---
--- Begin Message ---
I do a mysql request like this one:

SELECT DISTINCT (brand), COUNT( brand )FROM `machines` where category like 
'sold' group by brand"

I get this from mysql:
brand             COUNT( brand)
brandx            4
brandy            12

how can I echo this result in php?

thanx in advance

Pat

--- End Message ---
--- Begin Message ---
Simple but should work.

$query = " SELECT DISTINCT (brand), COUNT( brand )FROM `machines` where
category like 'sold' group by brand;";

$result = mysql_query($query) or die(mysql_error());

While($data = mysql_fetch_array($result)) {
        echo "<p>{$data[0]} - {$data[1]}</p>\n";
}

-----Original Message-----
From: p80 [mailto:[EMAIL PROTECTED] 
Sent: Sunday, March 13, 2005 4:35 PM
To: php-general@lists.php.net
Subject: [PHP] newbie php/mysql need help


I do a mysql request like this one:

SELECT DISTINCT (brand), COUNT( brand )FROM `machines` where category like 
'sold' group by brand"

I get this from mysql:
brand             COUNT( brand)
brandx            4
brandy            12

how can I echo this result in php?

thanx in advance

Pat

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

--- End Message ---
--- Begin Message --- p80 wrote:
I do a mysql request like this one:

SELECT DISTINCT (brand), COUNT( brand )FROM `machines` where category like 'sold' group by brand"

Try adding aliases to your query, such as :

SELECT DISTINCT (brand), COUNT (brand) AS brand_count FROM `machines` WHERE `category` LIKE 'sold' GROUP BY `brand`

Then, you can echo the result thusly:

while($row = mysql_fetch_assoc($result))
{
   echo $row['brand'];
   echo $row['brand_count'];
}

--- End Message ---
--- Begin Message ---
Does anyone know a working eregi expression for determining a domain is 
valid? don't need the http:// just looking for www.thedomain.com

cheers,


R. 

--- End Message ---
--- Begin Message ---
this should work for any web address starting with www.

// test for domain

$domain = "www.example.com";

// This pattern will match anything that STARTS with www followed by a period, followed by at least 2 characters,
// numbers and periods followed by a period followed by at least two characters
$pattern = "#^www\.([a-zA-Z0-9.-]{2,}\.[a-zA-Z]{2,})$#";


if(preg_match($pattern, $domain, $matches))
{
        echo 'Matched. Domain is: '.$matches[1];
} else {
        echo 'NO MATCHY DUDE';
}


Ross Hulford wrote:
Does anyone know a working eregi expression for determining a domain is valid? don't need the http:// just looking for www.thedomain.com

cheers,


R.

--- End Message ---
--- Begin Message --- also, note I used preg_match instead of ereg, preg is a better choice over ereg usually (flexibility, speed, etc)


Ross Hulford wrote:
Does anyone know a working eregi expression for determining a domain is valid? don't need the http:// just looking for www.thedomain.com

cheers,


R.

--- End Message ---
--- Begin Message --- Ross, is there a reason you don't want to use sessions again?
Creating an associative array of each pages answers is much cleaner than passing hidden fields or get vars.


Another option you could use it write the files to disk after each page save, that way if anything goes wrong(IE user computer shuts down) you dont have to have them start from scratch, you can load all the data from disk and have them start where they left off. If you're going to do multi page that option is the best for not pissing off customers because they can finish the form on their timeline.

Ross Hulford wrote:
I am creating a form but instead of having a long form I want to break it down into a few stages but need to pass the variables bewteen the pages.

I have done this before using sessions but would like to know if there is an alternative way to do this?

R.

--- End Message ---
--- Begin Message --- I'm moving away from Cold Fusion and am considering java or php. I've mucked around with Struts and Coccoon on the java side and think they are great. There does not however seem to be any well backed projects similar to these for php.

Can anyone point me to a good php MVC framework?
--- End Message ---
--- Begin Message ---
Simon Reye wrote:

I'm moving away from Cold Fusion and am considering java or php. I've mucked around with Struts and Coccoon on the java side and think they are great. There does not however seem to be any well backed projects similar to these for php.

Can anyone point me to a good php MVC framework?

here you go: http://wact.sourceforge.net/index.php/MvcFrameworksWrittenInPhp

cheers,
Jeffery

--- End Message ---
--- Begin Message --- Jeffery Fernandez wrote:
Simon Reye wrote:

I'm moving away from Cold Fusion and am considering java or php. I've mucked around with Struts and Coccoon on the java side and think they are great. There does not however seem to be any well backed projects similar to these for php.

Can anyone point me to a good php MVC framework?

here you go: http://wact.sourceforge.net/index.php/MvcFrameworksWrittenInPhp

cheers,
Jeffery

Thanks Jeff,

There a quite a few in that list some not even out of alpha stage and some of the more popular ones have not had much work done to them in over a year. Have you personally tried any of them?

Simon
--- End Message ---
--- Begin Message --- Simon Reye wrote:
I'm moving away from Cold Fusion and am considering java or php. I've mucked around with Struts and Coccoon on the java side and think they are great. There does not however seem to be any well backed projects similar to these for php.

Can anyone point me to a good php MVC framework?

Haven't used it personally, but looks promising http://phrame.sourceforge.net/

--- End Message ---
--- Begin Message ---
Hi Hans,

Do you mean by using virtual host directives of apache ?

But how about the configuration to make requests for certain
directories to be handled by php4 or php5.

For ex.

/var/www/html/site needs php5 but /var/www/html/legacy does not
support php5 so I have to run php4.

Any tips regarding the configuration of php and/or apache ?

- thks


On Fri, 4 Mar 2005 18:13:13 -0500, Hans Zaunere <[EMAIL PROTECTED]> wrote:
> 
> 
> > > Is there a way to install two version of php on the same machine, and
> > > use them for two different users?
> >
> > Option 1:
> > Install two copies of Apache, with different httpd.conf files, on two
> > different ports.
> > Somebody gets stuck using http://example.com:81 (or any port but 80) but
> > this gives everything you asked for.
> 
> Or make Apache listen on two IPs - if your provider will do this, or it's 
> your own box, there's not downside.  You could use two domains, or two 
> different subdomains.
> 
> > Option 4:
> > In terms of expenses/headaches, you will probably be better off just
> > buying a second machine.  Problem solved.
> 
> If you get another machine, you'll need two domains or subdomains anyway.  
> Just put them on the same box, with two IPs.
> 
> ---
> Hans Zaunere
> President, Founder
> 
> New York PHP
> http://www.nyphp.org
> 
> AMP Technology
> Supporting Apache, MySQL and PHP
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
>

--- End Message ---
--- Begin Message ---
> Do you mean by using virtual host directives of apache ?
> 
> But how about the configuration to make requests for certain
> directories to be handled by php4 or php5.
> 
> For ex.
> 
> /var/www/html/site needs php5 but /var/www/html/legacy does not
> support php5 so I have to run php4.
> 
> Any tips regarding the configuration of php and/or apache ?

Per option 1 below, they were saying two installs of Apache or one install of 
Apache directed to use different httpd.conf files, then to use different ports 
for each instance.  The same thing can be accomplished using two IP addresses 
if available, instead of two different points.


---
Hans Zaunere
President, Founder

New York PHP
http://www.nyphp.org

AMP Technology
Supporting Apache, MySQL and PHP


> > > > Is there a way to install two version of php on the same machine, and
> > > > use them for two different users?
> > >
> > > Option 1:
> > > Install two copies of Apache, with different httpd.conf files, on two
> > > different ports.
> > > Somebody gets stuck using http://example.com:81 (or any port but 80) but
> > > this gives everything you asked for.
> >
> > Or make Apache listen on two IPs - if your provider will do this, or it's 
> > your own
> box, there's not downside.  You could use two domains, or two different 
> subdomains.
> >
> > > Option 4:
> > > In terms of expenses/headaches, you will probably be better off just
> > > buying a second machine.  Problem solved.
> >
> > If you get another machine, you'll need two domains or subdomains anyway.  
> > Just
> put them on the same box, with two IPs.
> >
> > ---
> > Hans Zaunere
> > President, Founder
> >
> > New York PHP
> > http://www.nyphp.org
> >
> > AMP Technology
> > Supporting Apache, MySQL and PHP
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >

--- End Message ---
--- Begin Message ---
Hi,

I searched on the net, found a lot of articles about it... followed all the various one by one, tried a lot, but I am getting the famous error: java.lang.UnsatisfiedLinkError: no php5servlet.dll in java.library.path.

Here is the steps I folllowed:
1) Get PHP5 PECL and copy to jbossweb-tomcat50.sar the phpsrvlt jar file. I modified the content of reflect.properties and servlet.porperties to refer to the php5servlet.dll library.
2) Copied to windows/system32 the php5servlet.dll and php5ts.dll.
3) web.xml contains the following line:
<servlet>
<servlet-name>php</servlet-name>
<servlet-class>net.php.servlet</servlet-class>
<load-on-startup>2</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>php</servlet-name>
<url-pattern>*.php</url-pattern>
</servlet-mapping>


I modified my application to display the java.librara.path which lists (of course) c:/windows/system32 path.

However, I am having the message just listed above.

Any clue?
Note that I have tried with the dll extension in the both property files, but still the same.


Thanks in advance.
David.

--- End Message ---
--- Begin Message ---
How to get url of the page the php script is on?

In other words, I want to know whether I'm in page "news.php" or in 
"posts.php", or in some other page. Is there any simple way to get tis info?


Thanks,
Lab. 

--- End Message ---
--- Begin Message ---
Labunski wrote:

How to get url of the page the php script is on?

In other words, I want to know whether I'm in page "news.php" or in "posts.php", or in some other page. Is there any simple way to get tis info?


Thanks,
Lab.




if (basename($_SERVER['PHP_SELF']) == 'news.php')
{
   // do whatever you want
}

--- End Message ---
--- Begin Message ---
I want to include a phps file. But would like it to display the coloured 
formatting of a phps, instead of executing the code with in. Is this possible? 
This does not work:
include("sendmail.phps");
Thanks,
John

--
John Taylor-Johnston
-----------------------------------------------------------------------------
"If it's not Open Source, it's Murphy's Law."

  ' ' '    Collège de Sherbrooke:
 ô¿ô    http://www.collegesherbrooke.qc.ca/languesmodernes/
    -     819-569-2064

  °v°   Bibliography of Comparative Studies in Canadian, Québec and Foreign 
Literatures
 /(_)\  Université de Sherbrooke
  ^ ^   http://compcanlit.ca/ T: 819.569.2064

--- End Message ---
--- Begin Message ---
Read the contents of the file into a variable and then output the contents
of the variable via print or echo.

-----Original Message-----
From: John Taylor-Johnston [mailto:[EMAIL PROTECTED] 
Sent: Sunday, March 13, 2005 10:09 PM
To: php-general@lists.php.net
Subject: [PHP] include("sendmail.phps");

I want to include a phps file. But would like it to display the coloured
formatting of a phps, instead of executing the code with in. Is this
possible? This does not work:
include("sendmail.phps");
Thanks,
John

--
John Taylor-Johnston
----------------------------------------------------------------------------
-
"If it's not Open Source, it's Murphy's Law."

  ' ' '    Collège de Sherbrooke:
 ô¿ô    http://www.collegesherbrooke.qc.ca/languesmodernes/
    -     819-569-2064

  °v°   Bibliography of Comparative Studies in Canadian, Québec and Foreign
Literatures
 /(_)\  Université de Sherbrooke
  ^ ^   http://compcanlit.ca/ T: 819.569.2064

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

--- End Message ---
--- Begin Message --- John Taylor-Johnston wrote:
I want to include a phps file. But would like it to display the coloured 
formatting of a phps, instead of executing the code with in. Is this possible? 
This does not work:
include("sendmail.phps");

http://www.php.net/highlight-file

--- End Message ---
--- Begin Message ---
For Imapd:

make slx &&
cp imapd/imapd /usr/local/sbin/ &&

cd c-client &&
cp c-client.a /usr/local/lib/libc-client.a &&
cp rfc822.h /usr/local/include/ &&
cp mail.h /usr/local/include/ &&
cp linkage.h /usr/local/include/



For PHP:
add just '--with-imap' '--with-imap-ssl'


regards,
Bostjan



On Friday 11 March 2005 21:11, Bronislav Klucka wrote:
> Hi,
> I'm trying to compile php with imap ssl support, I've downloaded imap
> source and run
>
> make lnp SSLTYPE=unix
>
> then i run php configure file with
>
> as
>
> ./configure --with-imap=/usr/src/php5/imap/ --with-openssl
> --with-imap-ssl=/usr/src/php5/imap/
>
> configuration, make and make install worked but I there is still no
> imaps support...
>
> what am I doing wrong?
>
>
> Brona

-- 
Best regards,

Bostjan Skufca
system administrator

Domenca d.o.o. 
Phone: +386 4 5835444
Fax: +386 4 5831999
http://www.domenca.com

--- End Message ---
--- Begin Message ---
Hi,

I am experiencing memory leaks when running a Mambo site on an AMD 64. This exact site ran fine on a 32-bit platform. Does anyone have experience with PHP on 64-bit platform? If so do you have any pointers for me?

Thanks,

Abdul


East Coast Access Tel: 031-566-8080 Fax: 031-566-8010 Web: http://www.eastcoast.co.za

--- End Message ---
--- Begin Message --- you'll get various problems on the way. Building php without any extensions is fairly easy, and doesn't pose any problems. However once you start compiling in extensions, you'll need to fiddle a bit with some (eg. pdo_mysql requires a couple of changes in the include paths in the c-files, icov extensions exports a symbol that doesn't actually exist, etc). Most of these are fairly simple to overcome though :)

-tul

Jim Plush wrote:
do you happen to remember what issues you may have had?
thanks again

[EMAIL PROTECTED] wrote:

Jim,
   i had only minor issues, but it builds fine otherwise.

"Jim Plush" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED]

Has anyone successfully built php5 using visual studio.net ? or is VC6 still only supported?

thanks,
Jim

--- End Message ---
--- Begin Message ---
Everyone,

We've rolled initial release candidates for PHP 5.0.4 and 4.3.11. As usual, these 3rd digit releases include a variety of bug fixes and minor updates.

PHP 5.0.4RC1 source:
http://downloads.php.net/zeev/php-5.0.4RC1.tar.bz2
http://downloads.php.net/zeev/php-5.0.4RC1.tar.gz

PHP 4.3.11RC1 source:
http://downloads.php.net/ilia/php-4.3.11RC1.tar.bz2
http://downloads.php.net/ilia/php-4.3.11RC1.tar.gz

Windows binaries will be posted and announced soon.

Changes in PHP 5.0.4RC1: http://cvs.php.net/co.php/php-src/NEWS?r=1.1760.2.286
Changes in PHP 4.3.11RC1: http://cvs.php.net/co.php/php-src/NEWS?r=1.1247.2.854

Any help in testing these release candidates would be appreciated!

Zeev
--- End Message ---

Reply via email to