[PHP] PHP5, Windoze, Extensions

2006-09-27 Thread Dave Carrera

Hi List,

Sorry to bore most of you with this one but i cannot get extensions to 
load using latest php5, apache 2.0xxx


I have std php running and it tells me that my php.ini is being read 
from c:\php\php.ini. This is correct.


But what ever i change "extension_dir" to it always says "c:\php5". By 
the way i am using phpinfo() for this info.


I make c:\php5 and copy extentions in there, but they still dont load 
and yes i have uncommented out the relevant extension in php.ini


I always stop -> start apache for changes to take affect but nothing 
changes.


I have php in the system path.

I also have tried copying the extension to windoze and system32 but 
still they will not load.


ANy ideas ??


Dave

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



[PHP] Re: Re: Re: Frustrated trying to get help from your site

2006-09-27 Thread David Robley
Michelle Konzack wrote:

> Am 2006-09-25 08:33:52, schrieb Ray Hauge:
> 
>> It's not the best in the world, but it works.
>> 
>> http://xchm.sourceforge.net/index.html
>> 
>> But since the documentation is online and always updated that way, I
>> prefer to just use the website.
> 
> Me too, but IF you live mobil like me (I have an 88-tons MAN-SuperTruck
> as MotorCaravan) you wil not have Internet Access all the time.  OK, I
> have GlobelSat but it is quiet expensive because I pay for the traffic.

88 tons!! Point us to an image of that please.



Cheers
-- 
David Robley

"I'd love some Chinese food," said Tom wantonly.
Today is Setting Orange, the 51st day of Bureaucracy in the YOLD 3172. 

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



[PHP] Re: reading a remote directory

2006-09-27 Thread Kae Verens

Jay Blanchard wrote:

I have to read a directory (on a windows machine) from another box (a
linux machine) and I thought that I could set the handle to the IP
address of the windows box, but that does not work. Do I have to open a
socket or is there another way?


the directory must be explicitly shared by the Windows box. I'm really a Linux 
guy, but I think you do this by right-clicking on the folder icon and clicking 
"share...".


then, make sure that the Windows machine's firewall allows Samba connections.

then, mount the Samba share using Linux.

(for more info, search for "linux samba mount")

Kae

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



Re: [PHP] PHP5, Windoze, Extensions

2006-09-27 Thread Dave Carrera

Thanks for that George,

I managed to isolate the problem

PEAR had slapped its own include_path at the bottom of my php.ini, 
removing it cleared up the extension_dir problem.


BUT now if i use the include_path var the extension_dir fails and 
phpinfo displays my php.ini from include_path down.


my php.ini include_path looks like this

include_path = "c:\php\pear"

If i comment out include_path, extension_dir works but now php wants to 
find the include path as "c:\php5\pear"


I made c:\php5\pear and copied my pear dir into it and pear works but 
this really is not tidy is it.


What could be wrong 

Dave

George Pitcher wrote:

Dave,

I would suggest putting your extension path in your system path.

I have encountered problems getting extensions to load where there have been
multiple instances of dll files. reducing these to one instance solved that
problem.

I once found that my php.ini settings weren't being loaded - but that was on
Debian and it was the method used to stop-start apache that was the cause of
that problem.

I'm running PHP5/Apache2 on WinNT and am restarting Apache on an almost
daily basis using the Services panel. I'm not encountering any extension
problems though. In fact I just upgraded from PHP5.0.4 to 5.1.4 and it was
really easy (much to my surprise).

Good luck

George in Oxford

  

-Original Message-
From: Dave Carrera [mailto:[EMAIL PROTECTED]
Sent: 27 September 2006 8:04 am
To: php-general@lists.php.net
Subject: [PHP] PHP5, Windoze, Extensions


Hi List,

Sorry to bore most of you with this one but i cannot get extensions to
load using latest php5, apache 2.0xxx

I have std php running and it tells me that my php.ini is being read
from c:\php\php.ini. This is correct.

But what ever i change "extension_dir" to it always says "c:\php5". By
the way i am using phpinfo() for this info.

I make c:\php5 and copy extentions in there, but they still dont load
and yes i have uncommented out the relevant extension in php.ini

I always stop -> start apache for changes to take affect but nothing
changes.

I have php in the system path.

I also have tried copying the extension to windoze and system32 but
still they will not load.

ANy ideas ??


Dave

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






  


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



[PHP] Best open source project/framework to support a php training course?

2006-09-27 Thread Pinocchio007
I am in charge of outlining a PHP/mySQL course (intro and advanced) for an
education institute. I would like to include in the course program an
in-depth study of an existing open-source project, allowing the students to
be confronted, from an early stage, to a real-world environment. My problem
is simple: which project/framework to choose in order to bring the current
"best practice" to our students, and prepare them for the future. Not being
a professional PHP developer myself, I would appreciate any recommendation.
Which OS project would you include? Which framework? And why?

My first idea was "osCommerce", then somebody recommended "Typo3", followed
by a "go for Joomla". Well, I am hesitating.
Anybody can recommend an article/paper comparing the different PHP
frameworks/application architectures?
Is there a list where such topics are discussed?

Thanks for your help and recommendations.

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



Re: [PHP] PHP5, Windoze, Extensions

2006-09-27 Thread Dave Carrera

Hi George,

That worked :-)

Many thanks for setting me on the straight and narrow.

Dave

George Pitcher wrote:

Dave,

Why not put your ext path into your include path :

 include_path = "c:\php\pear;c:\php;c:\php\ext"

That might solve the problem. Just a bit of lateral thinking.

George

  

-Original Message-
From: Dave Carrera [mailto:[EMAIL PROTECTED]
Sent: 27 September 2006 9:28 am
To: George Pitcher; php-general@lists.php.net
Subject: Re: [PHP] PHP5, Windoze, Extensions


Thanks for that George,

I managed to isolate the problem

PEAR had slapped its own include_path at the bottom of my php.ini,
removing it cleared up the extension_dir problem.

BUT now if i use the include_path var the extension_dir fails and
phpinfo displays my php.ini from include_path down.

my php.ini include_path looks like this

include_path = "c:\php\pear"

If i comment out include_path, extension_dir works but now php wants to
find the include path as "c:\php5\pear"

I made c:\php5\pear and copied my pear dir into it and pear works but
this really is not tidy is it.

What could be wrong 

Dave

George Pitcher wrote:


Dave,

I would suggest putting your extension path in your system path.

I have encountered problems getting extensions to load where
  

there have been


multiple instances of dll files. reducing these to one instance
  

solved that


problem.

I once found that my php.ini settings weren't being loaded -
  

but that was on


Debian and it was the method used to stop-start apache that was
  

the cause of


that problem.

I'm running PHP5/Apache2 on WinNT and am restarting Apache on an almost
daily basis using the Services panel. I'm not encountering any extension
problems though. In fact I just upgraded from PHP5.0.4 to 5.1.4
  

and it was


really easy (much to my surprise).

Good luck

George in Oxford


  

-Original Message-
From: Dave Carrera [mailto:[EMAIL PROTECTED]
Sent: 27 September 2006 8:04 am
To: php-general@lists.php.net
Subject: [PHP] PHP5, Windoze, Extensions


Hi List,

Sorry to bore most of you with this one but i cannot get extensions to
load using latest php5, apache 2.0xxx

I have std php running and it tells me that my php.ini is being read
from c:\php\php.ini. This is correct.

But what ever i change "extension_dir" to it always says "c:\php5". By
the way i am using phpinfo() for this info.

I make c:\php5 and copy extentions in there, but they still dont load
and yes i have uncommented out the relevant extension in php.ini

I always stop -> start apache for changes to take affect but nothing
changes.

I have php in the system path.

I also have tried copying the extension to windoze and system32 but
still they will not load.

ANy ideas ??


Dave

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






  




  


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



[PHP] Re: Best open source project/framework to support a php training course?

2006-09-27 Thread Tony Marston
If you want a web application framework that your students can play with may 
I suggest http://www.radicore.org  This is already being used as a training 
aid by a university in the far east, so it must have some merit.

-- 
Tony Marston
http://www.tonymarston.net
http://www.radicore.org

""Pinocchio007"" <[EMAIL PROTECTED]> wrote in message 
news:[EMAIL PROTECTED]
>I am in charge of outlining a PHP/mySQL course (intro and advanced) for an
> education institute. I would like to include in the course program an
> in-depth study of an existing open-source project, allowing the students 
> to
> be confronted, from an early stage, to a real-world environment. My 
> problem
> is simple: which project/framework to choose in order to bring the current
> "best practice" to our students, and prepare them for the future. Not 
> being
> a professional PHP developer myself, I would appreciate any 
> recommendation.
> Which OS project would you include? Which framework? And why?
>
> My first idea was "osCommerce", then somebody recommended "Typo3", 
> followed
> by a "go for Joomla". Well, I am hesitating.
> Anybody can recommend an article/paper comparing the different PHP
> frameworks/application architectures?
> Is there a list where such topics are discussed?
>
> Thanks for your help and recommendations. 

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



[PHP] Re: Best open source project/framework to support a php training course?

2006-09-27 Thread Pinocchio007
Thanks.

Is any open source project using your framework? I couldn't find this
information on your website.


""Tony Marston"" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> If you want a web application framework that your students can play with
may
> I suggest http://www.radicore.org  This is already being used as a
training
> aid by a university in the far east, so it must have some merit.
>
> -- 
> Tony Marston
> http://www.tonymarston.net
> http://www.radicore.org
>
> ""Pinocchio007"" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
> >I am in charge of outlining a PHP/mySQL course (intro and advanced) for
an
> > education institute. I would like to include in the course program an
> > in-depth study of an existing open-source project, allowing the students
> > to
> > be confronted, from an early stage, to a real-world environment. My
> > problem
> > is simple: which project/framework to choose in order to bring the
current
> > "best practice" to our students, and prepare them for the future. Not
> > being
> > a professional PHP developer myself, I would appreciate any
> > recommendation.
> > Which OS project would you include? Which framework? And why?
> >
> > My first idea was "osCommerce", then somebody recommended "Typo3",
> > followed
> > by a "go for Joomla". Well, I am hesitating.
> > Anybody can recommend an article/paper comparing the different PHP
> > frameworks/application architectures?
> > Is there a list where such topics are discussed?
> >
> > Thanks for your help and recommendations.

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



Re: [PHP] People who bought this also bought (amazon style) functionality...logic problem

2006-09-27 Thread Ryan A
 Warning, this email's a bit long 




> You have a User table and a Product table, then a
> linking table that
> joins users with products that they have bought.



Hey David,Curt,Richard!

Thanks for replying.

Looks like I will really have to brush up on my Sql,
been using "lazy sql" for a long time... you know, the
kind that you use over and over again
(insert,update,delete etc) so the other stuff pretty
much goes in the backroom/celler of your brain




> All
> this is possible in
> one SQL statement, the SQL is left as an exercise to
> the reader.


Cool! There goes my afternoon! :D
 
> As this is an O(n^2) query it won't scale
> particularily well, so you
> should cache the results somewhere, probably in the
> product table.  This
> could be regenerated every week or two as it doesn't
> actually need to be
> very current.

I usually cache my stuff in a local file and serve the
cached file if x minutes are not up... can you give me
an example of cacheing DB side?





Richard;
//**
> I'm trying to work out the logic to do this... and
> quite frankly have hit a brick wall.

Possibly because Amazon's algorithm does not
down-scale well...
**//

That way of looking at it makes me feel better ;)



//**
You want something like this:
...
The point being that you get the 5 things that are
MOST purchased in
other orders with this same product.

The above query may well bring your DB to its knees,
and you may need
to optimize the heck out of it.
**//
Will def look into it, I have seen this functionality
on a lot of "e-com" sites which use shared hosting so
i know its do-able, will try and when I run into
problems will post again.



//**
The problem is that unless you have the volume of
Sales that Amazon
has, there may not be enough people buying enough
stuff for this to
make sense.

It also won't group accessories or anything -- It goes
solely based on
who bought what.

This is possibly great for "e-commerce" but might not
be the ideal.
**//
Volume of sales would be *no where close*, to even
mention the site this will be used on and Amazon in
the same sentance would be a sin, and grounds to be
struck down from above.
I do have another part/block below the product that
suggests accessories.

This is for a site that sells R/C helicopters online,
i have seen two other sites that sell the same
products and from my experience this "customers
who" feature seems to work pretty well to squeeze
in a little more (maybe 1 or two items) into the
order.I think any edge for a startup is a good
thing..no matter how small.


//**
I *much* prefer the CDBaby approach where somebody
listens to the CD
and then recommends artists they think are
complementary. :-)
**//
You dont suggest I have both?
Maybe a customer suggestions for this item 'box'?



Curt;
//**
The one thing I
would do is generate some sort of table on a scheduled
bases that
links ids of the items that were bought into a some
sort of group. and
then just use that table on the page you are showing.
**//
Can you give me a little example of this?


Thanks again guys,
Ryan

--
- The faulty interface lies between the chair and the keyboard.
- Creativity is great, but plagiarism is faster!
- Smile, everyone loves a moron. :-)

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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



[PHP] RE: Print or Echo takes lots of time

2006-09-27 Thread Sancar Saran
Hi,

Thanks for supporting, because of the approaching to the problem, I don't want 
to change generate once echo once style.

And I found solution like this,
I split  variable into an array and generate loop for printing, mostly fix the 
problem. 

And more interesting, some times problem repeates himself. I believe this was 
connected to php memory performance.

Anyhow is there any information about optimal echo or print size ?

Regards

Sancar

On Wednesday 27 September 2006 01:22, Richard Lynch wrote:
> On Mon, September 25, 2006 7:11 am, Sancar Saran wrote:
> > When I was check the performance of my system I found interesting
> > resuts.
> >
> > My code stores html output into a variable. When page creation
> > complete I
> > printed out the variable.
> >
> > Problem was generation html code takes 0.5 second and just
> > echo $strPage takes 2.0 or more second.
> >
> > my code structure was.
> >
> > $strPage = " yada dayda";
> > ...
> > $strPage.= " another html tags";
> > ...
> > $strPage.= getSqlDataAndCreateSomeHtmlCOde();
> > ...
> > end of page creation.
> > Current Total execution time 0.5 seconds.
> > print $strPage;
> > Current Total execution time 2.5 seconds.
> >
> > $strPage carries entire html structure (for example equal of 100K html
> > code);
> >
> > excluding the cookie and other kind of header transfers and error
> > messages,
> > there was no print or echo command was submitted.
> >
> > Is there any idea about this latency and any idea to find problem...
>
> You could try echo-ing it out in "chunks" instead of waiting until the
> very end.
>
> echo/print has to send the data "out" through the very narrow pipe to
> Apache -> the browser
>
> If you send every little snippet one tiny piece at a time, you waste
> resources.
>
> If you wait until the end and send out some huge monster string, you
> waste resources.
>
> Find the balance if you can.
>
> Depends on your hardware/bandwidth exactly where optimum is.

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



[PHP] Various errors being generated from an apache/php combo

2006-09-27 Thread Steve Walker
Hi there,

I have a number of errors coming from our dedicated box and was hoping
someone could shed some light on what might be happening. These errors could
be independent or inter-related.

We see the errors when running content management systems on the server, I
posted to their forum
http://ez.no/community/forum/install_configuration/method_not_implemented_er
ror_php_fatal_error but have got no joy.

A summary of 3 of the errors are:

The first is:

Method Not Implemented
iefing.co.uk to /index.html not supported.

This happened when saving an item in the cms - hitting refresh then took it
to the page it should have landed on rather than giving this error.

The second is deleting an product item from another cms site on the same
box. It gives a Fatal Error Ez message and the logs show:

[client 80.58.205.38] PHP Fatal error: Call to undefined function:
cleanupbynode() in
/var/www/vhosts/demos.oneworldmarket.co.uk/httpdocs/gems/kernel/classes/ezco
ntentobjecttreenode.php on line 2684

Again, hitting refresh the page then loads fine, with the item deleted

The third - on mambo site we have a problem when saving a page, it error
400's and the logs say:

[client 80.58.205.38] PHP Warning:  fopen(../configuration.php): failed to
open stream: Permission denied in
/var/www/vhosts/oneworldmarket.co.uk/httpdocs/demo_business/administrator/co
mponents/com_config/admin.config.php on line 463

I realise these could just be independent problems - but the box is very
new, it was an out the box 1and1 dedicated server - we have added config
tweaks to httpd.conf, eaccelerator, zend optimiser (for running encoded
script only), mod_security (disabling this doesn't seem to solve the
issues). We downgraded php from 5 to 4.3, I wondered if this might have
something to do with it..?

What seems very odd is that with all these problems hitting refresh on the
browser then takes you to the point the script would have ended up at if it
hadn't errored...

If an one could give some instruction on nailing this down I would be very
grateful. I have pasted our phpinfo below, let me know if you require
httpd.conf

Kind regards, Steve

-

PHP Version 4.3.11

System  Linux s15223417.onlinehome-server.info 2.6.16-rc6-060427a #1 SMP Thu
Apr 27 10:38:19 CEST 2006 i686
Build Date  Nov 8 2005 06:25:44
Configure Command   './configure' '--build=i386-redhat-linux'
'--host=i386-redhat-linux' '--target=i386-redhat-linux-gnu'
'--program-prefix=' '--prefix=/usr' '--exec-prefix=/usr' '--bindir=/usr/bin'
'--sbindir=/usr/sbin' '--sysconfdir=/etc' '--datadir=/usr/share'
'--includedir=/usr/include' '--libdir=/usr/lib' '--libexecdir=/usr/libexec'
'--localstatedir=/var' '--sharedstatedir=/usr/com' '--mandir=/usr/share/man'
'--infodir=/usr/share/info' '--cache-file=../config.cache'
'--with-config-file-path=/etc' '--with-config-file-scan-dir=/etc/php.d'
'--enable-force-cgi-redirect' '--disable-debug' '--enable-pic'
'--disable-rpath' '--enable-inline-optimization' '--with-bz2'
'--with-db4=/usr' '--with-curl' '--with-exec-dir=/usr/bin'
'--with-freetype-dir=/usr' '--with-png-dir=/usr' '--with-gd=shared'
'--enable-gd-native-ttf' '--without-gdbm' '--with-gettext'
'--with-ncurses=shared' '--with-gmp' '--with-iconv' '--with-jpeg-dir=/usr'
'--with-openssl' '--with-png' '--with-pspell' '--with-xml'
'--with-expat-dir=/usr' '--with-dom=shared,/usr' '--with-dom-xslt=/usr'
'--with-dom-exslt=/usr' '--with-xmlrpc=shared' '--with-pcre-regex=/usr'
'--with-zlib' '--with-layout=GNU' '--enable-bcmath' '--enable-exif'
'--enable-ftp' '--enable-magic-quotes' '--enable-sockets' '--enable-sysvsem'
'--enable-sysvshm' '--enable-track-vars' '--enable-trans-sid' '--enable-yp'
'--enable-wddx' '--with-pear=/usr/share/pear' '--with-imap=shared'
'--with-imap-ssl' '--with-kerberos' '--with-ldap=shared'
'--with-mysql=shared,/usr' '--with-pgsql=shared' '--with-snmp=shared,/usr'
'--with-snmp=shared' '--enable-ucd-snmp-hack' '--with-unixODBC=shared,/usr'
'--enable-memory-limit' '--enable-shmop' '--enable-calendar' '--enable-dbx'
'--enable-dio' '--enable-mbstring=shared' '--enable-mbstr-enc-trans'
'--enable-mbregex' '--with-mime-magic=/usr/share/file/magic.mime'
'--with-pic' '--with-apxs2=/usr/sbin/apxs'
Server API  Apache 2.0 Handler
Virtual Directory Support   disabled
Configuration File (php.ini) Path   /etc/php.ini
Scan this dir for additional .ini files /etc/php.d
additional .ini files parsed/etc/php.d/dom.ini,
/etc/php.d/eaccelerator.ini, /etc/php.d/gd.ini, /etc/php.d/imap.ini,
/etc/php.d/mbstring.ini, /etc/php.d/mysql.ini, /etc/php.d/mysqli.ini,
/etc/php.d/sitebuilder.ini, /etc/php.d/xmlrpc.ini, /etc/php.d/xsl.ini,
/etc/php.d/zip.ini
PHP API 20020918
PHP Extension   20020429
Zend Extension  20021010
Debug Build no
Thread Safety   disabled
Registered PHP Streams  php, http, ftp, https, ftps, compress.bzip2,
compress.zlib

Zend logo This program makes use of the Zend Scripti

[PHP] Re: Various errors being generated from an apache/php combo

2006-09-27 Thread Kae Verens

Steve Walker wrote:

[client 80.58.205.38] PHP Fatal error: Call to undefined function:
cleanupbynode() in
/var/www/vhosts/demos.oneworldmarket.co.uk/httpdocs/gems/kernel/classes/ezco
ntentobjecttreenode.php on line 2684


could be that the function cleanupbynode() is defined in the wrong place (ie; 
after it is actually needed)



[client 80.58.205.38] PHP Warning:  fopen(../configuration.php): failed to
open stream: Permission denied in
/var/www/vhosts/oneworldmarket.co.uk/httpdocs/demo_business/administrator/co
mponents/com_config/admin.config.php on line 463


could be that configuration.php is saved using your oneworldmarket username 
instead of the httpd's username.



What seems very odd is that with all these problems hitting refresh on the
browser then takes you to the point the script would have ended up at if it
hadn't errored...


it might be that there is a redirect happening, so refreshing the page doesn't 
send data to the same location as before.



just a few thoughts,

Kae

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



[PHP] hotel reservation system.

2006-09-27 Thread Faisal Sahar
hi to everyone, 

   i want to create a hotel reservation system. how can i keep track of dates . 
suppose i have booked a room from 12/10/2006 till 14/10/2006 ( two night ) 
how can i make a system that will check for room availability and if it will 
find a
room available from  specified date till specified date it will report me back. 

i wish to find a suitable and technical answer .. 

faisal 


Re: [PHP] hotel reservation system.

2006-09-27 Thread Jochem Maas
Faisal Sahar wrote:
> hi to everyone, 
> 
>i want to create a hotel reservation system. how can i keep track of dates 
> . 
> suppose i have booked a room from 12/10/2006 till 14/10/2006 ( two night ) 
> how can i make a system that will check for room availability and if it will 
> find a
> room available from  specified date till specified date it will report me 
> back. 
> 
> i wish to find a suitable and technical answer .. 

finding insinuates looking:

http://www.google.com/search?q=hotel+reservation+system+php

alternatively pick up the phone and call a travel agent.

> 
> faisal 
> 

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



Re: [PHP] Re: Best open source project/framework to support a php training course?

2006-09-27 Thread Miles Thompson

At 07:02 AM 9/27/2006, Tony Marston wrote:


If you want a web application framework that your students can play with may
I suggest http://www.radicore.org  This is already being used as a training
aid by a university in the far east, so it must have some merit.

--
Tony Marston
http://www.tonymarston.net
http://www.radicore.org

""Pinocchio007"" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
>I am in charge of outlining a PHP/mySQL course (intro and advanced) for an
> education institute. I would like to include in the course program an
> in-depth study of an existing open-source project, allowing the students
> to
> be confronted, from an early stage, to a real-world environment. My
> problem
> is simple: which project/framework to choose in order to bring the current
> "best practice" to our students, and prepare them for the future. Not
> being
> a professional PHP developer myself, I would appreciate any
> recommendation.
> Which OS project would you include? Which framework? And why?
>
> My first idea was "osCommerce", then somebody recommended "Typo3",
> followed
> by a "go for Joomla". Well, I am hesitating.
> Anybody can recommend an article/paper comparing the different PHP
> frameworks/application architectures?
> Is there a list where such topics are discussed?
>
> Thanks for your help and recommendations.

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



For a start, there are a lot of frameworks, with passionate adherents and 
users, so there is no one "best".


I wouldn't suggest a framework - how about a component that works with 
something else. The AMFPHP project which provides a data link to Flash, or 
PDO (Persistent Data Objects)?


If you really think a framework is the way to go, contact Michael Ho, whose 
QCODO framework is somewhat different than many others as it has evolved 
from VB roots and is a code-generation framework. It works v. cleverly with 
the database, is highly modular, has a reasonably active group of 
developers working on custom controls, etc. PHP5 and MySQL 5 - definitely 
current. You might also have a look at Seagull or Cake, the latter being a 
PHP-like adaptation of Ruby on Rails.


The thing to remember is that PHP is a templating language and doesn't 
necessarily need another structure built atop it.  If you take students 
down the framework path watch that they do not stop learning PHP but start 
learning the templating language instead.


PHP Architect has run some interesting articles on frameworks, and Chris 
Shifflet has a regular security column - always worth reading.


Hope this has been helpful - Miles


--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.405 / Virus Database: 268.12.9/457 - Release Date: 9/26/2006

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



[PHP] Stored procs and transactions using Linux/PHP and Windows/MSSQL

2006-09-27 Thread Rick Emery
Is anyone using PHP5 on Linux to connect to MS SQL Server 2000 on  
Windows and execute stored procedures with output parameters within a  
transaction? If so, how?


I'm trying to do something like this in the PHP application:

begin transaction
execute a stored procedure, receiving an identity back
if certain conditions are met
   execute another stored procedure, getting an identity
if certain other conditions are met
   execute another stored procedure, getting an identity
if any of the above procedures fail
   rollback transaction
else
   commit transaction

I ran into some problems using both PDO and the mssql_* functions (if  
someone is successful using one of these, I'll likely be asking in a  
future message for help with the problems I'm encountering).


I'm just asking to see if anyone is successfully doing what I'm trying  
to do, and if so, what method is being used to accomplish it.


Thanks in advance,
Rick

--
Rick Emery

"When once you have tasted flight, you will forever walk the Earth
 with your eyes turned skyward, for there you have been, and there
 you will always long to return"
  -- Leonardo Da Vinci

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



Re: [PHP] hotel reservation system.

2006-09-27 Thread Sancar Saran
On Wednesday 27 September 2006 15:16, Faisal Sahar wrote:
> hi to everyone,
>
>i want to create a hotel reservation system. how can i keep track of
> dates . suppose i have booked a room from 12/10/2006 till 14/10/2006 ( two
> night ) how can i make a system that will check for room availability and
> if it will find a room available from  specified date till specified date
> it will report me back.
>
> i wish to find a suitable and technical answer ..
>
> faisal
very tough and long question...

If I wrote that kind of system..
1-) I want to know rooms
2-) I want to knwo room occupation dates...

System have to mark roop occupation day basis...

for example...
room_occupation_table

roomId, occupationDate, customerId

room_table
roomId,roomName,roomType

get occupied rooms

select roomId
from room_occupation_table
where occupationDate >11/10/2006
and occupationDate < 15/10/2006


get rooms

selec roomId,roomName
from room_table

extract occupied rooms from rooms then show the unoccupied rooms at that time. 
Then mark yoru newly occupied rooms...

Regards

Sancar.

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



RE: [PHP] Re: Various errors being generated from an apache/php combo

2006-09-27 Thread Steve Walker
Thanks Kae and Rick for your replies.

One of things I should have mentioned is that all these sites have been
migrated from another box on which they were working fine, which is why I've
been questioning the box itself rather than the cms's. 

Kind regards, Steve.

> -Original Message-
> From: Kae Verens [mailto:[EMAIL PROTECTED] 
> Sent: Wednesday, September 27, 2006 13:58
> To: Steve Walker
> Cc: php-general@lists.php.net
> Subject: [PHP] Re: Various errors being generated from an 
> apache/php combo
> 
> Steve Walker wrote:
> > [client 80.58.205.38] PHP Fatal error: Call to undefined function:
> > cleanupbynode() in
> > 
> /var/www/vhosts/demos.oneworldmarket.co.uk/httpdocs/gems/kernel/classe
> > s/ezco
> > ntentobjecttreenode.php on line 2684
> 
> could be that the function cleanupbynode() is defined in the 
> wrong place (ie; after it is actually needed)
> 
> > [client 80.58.205.38] PHP Warning:  fopen(../configuration.php): 
> > failed to open stream: Permission denied in 
> > 
> /var/www/vhosts/oneworldmarket.co.uk/httpdocs/demo_business/administra
> > tor/co mponents/com_config/admin.config.php on line 463
> 
> could be that configuration.php is saved using your 
> oneworldmarket username instead of the httpd's username.
> 
> > What seems very odd is that with all these problems hitting 
> refresh on 
> > the browser then takes you to the point the script would 
> have ended up 
> > at if it hadn't errored...
> 
> it might be that there is a redirect happening, so refreshing 
> the page doesn't send data to the same location as before.
> 
> 
> just a few thoughts,
> 
> Kae
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 

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



[PHP] FDF > PDF - Content-type: application/vnd.fdf

2006-09-27 Thread Sam Smith


When loaded into a browser that can display PDF files (Win IE and  
Firefox, Mac Safari) the FDF file (snip below) should open linked PDF  
and populated it with the data from the FDF file.


It works fine when the FDF file is loaded from within the browser  
with "Open File" (or simply double-clicked from the desktop).


It works fine in Win IE (because IE doesn't play by the rules).

I just don't understand the header thing, the "Content-type" deal.

Why is the FDF file loaded as plain text when loaded via a URL?




PHP creates the .fdf file:

Content-type: application/vnd.fdf
%FDF-1.2
%‚„œ”
1 0 obj
<<
/FDF << /Fields [ << /T (pg1_familyname1) /V (SMITH)>>

... dozens of other fields...

 << /T (pdf_ExtraPages) /V (Additional other names from page 1 part  
1 section C\rOTHER4 OTHER4 OTHER4 OTHER5 OTHER5 OTHER5)>> ]
/F (http://www.citizenshipzip.local/pdf/ud/SAM_SMITH_FORM_AND_DATA/ 
sys/naturalization.pdf) /ID [ <138ff91476c2ae9c9f192e15ac50d7bf>

] >>
>>
endobj
trailer
<<
/Root 1 0 R

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



Re: [PHP] Display dynamic progress bar

2006-09-27 Thread tedd

At 9:00 AM +1000 9/27/06, Choy, Wai Yew wrote:

Like to get some advice from you guys...

I've a html form page and the "Action" is link to a php script to
process the form dataI would like to have a progress bar once the
user hit the Submit button...The php script take quite sometime to
produce the result since it is connecting to a remote database...

How can I do this using PHP to display the progress bar..


No can do from php. You'll need javascript to do that.

OR, just do it the way I do it by providing a faux delay display, like:

http://xn--ovg.com/a/wait.php


Thanks a million...


Just send it to me via PayPal (tedd at sperling dot com).

tedd
--
---
http://sperling.com  http://ancientstones.com  http://earthstones.com

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



Re: [PHP] Display dynamic progress bar

2006-09-27 Thread clive

tedd wrote:

At 9:00 AM +1000 9/27/06, Choy, Wai Yew wrote:

Like to get some advice from you guys...

I've a html form page and the "Action" is link to a php script to
process the form dataI would like to have a progress bar once the
user hit the Submit button...The php script take quite sometime to
produce the result since it is connecting to a remote database...

How can I do this using PHP to display the progress bar..


No can do from php. You'll need javascript to do that.

well actually you can , firstly you have some element you can update 
like a text box and then use javascript to up this text box.
what you then do is flush the content to php file generates and spit out 
some javascript to change the text box data



OR, just do it the way I do it by providing a faux delay display, like:

http://xn--ovg.com/a/wait.php


Thanks a million...


Just send it to me via PayPal (tedd at sperling dot com).

tedd



--
Regards,

Clive

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



Re: [PHP] Display dynamic progress bar

2006-09-27 Thread clive

clive wrote:

tedd wrote:

At 9:00 AM +1000 9/27/06, Choy, Wai Yew wrote:

Like to get some advice from you guys...

I've a html form page and the "Action" is link to a php script to
process the form dataI would like to have a progress bar once the
user hit the Submit button...The php script take quite sometime to
produce the result since it is connecting to a remote database...

How can I do this using PHP to display the progress bar..


No can do from php. You'll need javascript to do that.


sorry slight typo, corrected.
well actually you can , firstly you have some element you can update 
like a text box and then use javascript to update this text box.
what you then do is flush the content the php file generates and spit 
out some javascript to change the text box data.



OR, just do it the way I do it by providing a faux delay display, like:

http://xn--ovg.com/a/wait.php


Thanks a million...


Just send it to me via PayPal (tedd at sperling dot com).

tedd






--
Regards,

Clive

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



Re: [PHP] Display dynamic progress bar

2006-09-27 Thread tedd

At 4:37 PM +0200 9/27/06, clive wrote:

tedd wrote:

At 9:00 AM +1000 9/27/06, Choy, Wai Yew wrote:

Like to get some advice from you guys...

I've a html form page and the "Action" is link to a php script to
process the form dataI would like to have a progress bar once the
user hit the Submit button...The php script take quite sometime to
produce the result since it is connecting to a remote database...

How can I do this using PHP to display the progress bar..


No can do from php. You'll need javascript to do that.

well actually you can , firstly you have some element you can update 
like a text box and then use javascript to up this text box.
what you then do is flush the content to php file generates and spit 
out some javascript to change the text box data


I'm sorry, I should have said "You'll need javascript to do that." Oh 
wait, I did.


tedd
--
---
http://sperling.com  http://ancientstones.com  http://earthstones.com

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



Re: [PHP] Display dynamic progress bar

2006-09-27 Thread Paul Scott

On Wed, 2006-09-27 at 16:42 +0200, clive wrote:
> >> No can do from php. You'll need javascript to do that.
> >>
> sorry slight typo, corrected.
> well actually you can , firstly you have some element you can update 
> like a text box and then use javascript to update this text box.
> what you then do is flush the content the php file generates and spit 
> out some javascript to change the text box data.
> >

So in other words:

>> No can do from php. You'll need javascript to do that.

Come on...you are making us South Africans look bad! ;)

--Paul

All Email originating from UWC is covered by disclaimer 
http://www.uwc.ac.za/portal/uwc2006/content/mail_disclaimer/index.htm 

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

Re: [PHP] File Upload Security and chmod

2006-09-27 Thread tedd

At 6:43 PM -0500 9/26/06, Richard Lynch wrote:

On Mon, September 25, 2006 3:58 pm, Andy Hultgren wrote:
 > -- Since I'm only allowing image uploads, I can strictly filter which

 files
 are allowed to be uploaded (with extension checks and get_image_size).


Extension check is kinda useless...

I can name any file I want with .jpg and upload it.

get_image_size() is good, as it checks the first N bytes -- But
somebody somewhere can construct a worm with the first N bytes that
LOOK like a valid image, to get_image_size()

A human eyeball check would be even better, as then you *know* that a
much larger number of bytes are a valid image.

It could still be "image+worm" with the worm tacked on at the end, and
a valid image at the front, which the browser would probably just go
ahead and display as valid image. :-(

The odds of somebody able to construct a valid-looking image whose
exact byte sequence is also a worm are pretty low, but not
impossible... :-)


That's one of the reasons why I resize images I upload -- image files 
are never stored "as-is". I figure that any possible worms contained 
therein will probably be damaged beyond working after a shuffle. 
After all, code is usually sensitive to alteration.



So when you read advice to use 0777 you can immediately change that to
0700, because the only access needed is for you, not your group, and
not the "world" of other users on that machine.


Excellent point -- thanks.

tedd
--
---
http://sperling.com  http://ancientstones.com  http://earthstones.com

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



Re: [PHP] Display dynamic progress bar

2006-09-27 Thread tedd

At 5:04 PM +0200 9/27/06, Paul Scott wrote:

On Wed, 2006-09-27 at 16:42 +0200, clive wrote:

 >> No can do from php. You'll need javascript to do that.
 >>
 sorry slight typo, corrected.
 well actually you can , firstly you have some element you can update
 like a text box and then use javascript to update this text box.
 what you then do is flush the content the php file generates and spit
 out some javascript to change the text box data.
 >


So in other words:


 No can do from php. You'll need javascript to do that.


Come on...you are making us South Africans look bad! ;)

--Paul


Well... it's about time I had some company.  :-)

tedd
--
---
http://sperling.com  http://ancientstones.com  http://earthstones.com

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



RE: [PHP] Re: Various errors being generated from an apache/php combo

2006-09-27 Thread Steve Walker
Cheers Rick.

Well, I tested with a fresh install of a tried and tested cms. We can
recreate the errors on that as well, so it may not be the migrated systems
fault.

Just to add more confusion, the errors are intermittent - sometimes it works
fine, other times we get these errors which makes it even more difficult to
pinpoint.

Steve. 

> -Original Message-
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] 
> Sent: Wednesday, September 27, 2006 15:28
> To: Steve Walker
> Subject: RE: [PHP] Re: Various errors being generated from an 
> apache/php combo
> 
> it sounds like when things were migrated not everything got 
> set down quite the way it was in the original environment.
> 
> ideally you still have the "old" environment available to 
> check against. if you do, compare the permissions of the 
> "configuration.php"
> file (and directory) between old and new. you'll also likely 
> want to check what user/group your apache server is running 
> as now, as compared to the previous environment.
> 
> on the missing function, do a search through the 
> (application/cms) libraries/classes on the old machine to see 
> where the missing one is.
> then check things on the new machine. this may be a pathing 
> issue, or it could be that something didn't get installed.
> 
> if you don't have the old machine available, then this is 
> will require more work and digging. 
> 
> [rule -- never give up the old environment until you're 
> *certain* that things work on the new - and even then, tar up 
> everything (in reasonable pieces) so that you can compare at 
> a later date if necessary.]
> 
>   - Rick
> 
> 
>  Original Message 
> > Date: Wednesday, September 27, 2006 02:58:46 PM +0200
> > From: Steve Walker <[EMAIL PROTECTED]>
> > To: php-general@lists.php.net
> > Subject: RE: [PHP] Re: Various errors being generated from an
> apache/php combo
> > 
> > Thanks Kae and Rick for your replies.
> > 
> > One of things I should have mentioned is that all these sites have 
> > been migrated from another box on which they were working 
> fine, which 
> > is why I've been questioning the box itself rather than the cms's.
> > 
> > Kind regards, Steve.
> > 
> >> -Original Message-
> >> From: Kae Verens [mailto:[EMAIL PROTECTED]
> >> Sent: Wednesday, September 27, 2006 13:58
> >> To: Steve Walker
> >> Cc: php-general@lists.php.net
> >> Subject: [PHP] Re: Various errors being generated from an 
> apache/php 
> >> combo
> >> 
> >> Steve Walker wrote:
> >> > [client 80.58.205.38] PHP Fatal error: Call to undefined 
> function:
> >> > cleanupbynode() in
> >> > 
> >> 
> /var/www/vhosts/demos.oneworldmarket.co.uk/httpdocs/gems/kernel/clas
> >> se
> >> > s/ezco
> >> > ntentobjecttreenode.php on line 2684
> >> 
> >> could be that the function cleanupbynode() is defined in the wrong 
> >> place (ie; after it is actually needed)
> >> 
> >> > [client 80.58.205.38] PHP Warning:  fopen(../configuration.php): 
> >> > failed to open stream: Permission denied in
> >> > 
> >> 
> /var/www/vhosts/oneworldmarket.co.uk/httpdocs/demo_business/administ
> >> ra
> >> > tor/co mponents/com_config/admin.config.php on line 463
> >> 
> >> could be that configuration.php is saved using your oneworldmarket 
> >> username instead of the httpd's username.
> >> 
> >> > What seems very odd is that with all these problems hitting
> >> refresh on
> >> > the browser then takes you to the point the script would
> >> have ended up
> >> > at if it hadn't errored...
> >> 
> >> it might be that there is a redirect happening, so refreshing the 
> >> page doesn't send data to the same location as before.
> >> 
> >> 
> >> just a few thoughts,
> >> 
> >> Kae
> >> 
> 
> 

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



Re: [PHP] Re: Various errors being generated from an apache/php combo

2006-09-27 Thread Jochem Maas
Steve Walker wrote:
> Cheers Rick.
> 
> Well, I tested with a fresh install of a tried and tested cms. We can
> recreate the errors on that as well, so it may not be the migrated systems
> fault.
> 
> Just to add more confusion, the errors are intermittent - sometimes it works
> fine, other times we get these errors which makes it even more difficult to
> pinpoint.

are you using an opcode cache?

> 
> Steve. 
> 
>> -Original Message-
>> From: [EMAIL PROTECTED] 
>> [mailto:[EMAIL PROTECTED] 
>> Sent: Wednesday, September 27, 2006 15:28
>> To: Steve Walker
>> Subject: RE: [PHP] Re: Various errors being generated from an 
>> apache/php combo
>>
>> it sounds like when things were migrated not everything got 
>> set down quite the way it was in the original environment.
>>
>> ideally you still have the "old" environment available to 
>> check against. if you do, compare the permissions of the 
>> "configuration.php"
>> file (and directory) between old and new. you'll also likely 
>> want to check what user/group your apache server is running 
>> as now, as compared to the previous environment.
>>
>> on the missing function, do a search through the 
>> (application/cms) libraries/classes on the old machine to see 
>> where the missing one is.
>> then check things on the new machine. this may be a pathing 
>> issue, or it could be that something didn't get installed.
>>
>> if you don't have the old machine available, then this is 
>> will require more work and digging. 
>>
>> [rule -- never give up the old environment until you're 
>> *certain* that things work on the new - and even then, tar up 
>> everything (in reasonable pieces) so that you can compare at 
>> a later date if necessary.]
>>
>>   - Rick
>>
>>
>>  Original Message 
>>> Date: Wednesday, September 27, 2006 02:58:46 PM +0200
>>> From: Steve Walker <[EMAIL PROTECTED]>
>>> To: php-general@lists.php.net
>>> Subject: RE: [PHP] Re: Various errors being generated from an
>> apache/php combo
>>> Thanks Kae and Rick for your replies.
>>>
>>> One of things I should have mentioned is that all these sites have 
>>> been migrated from another box on which they were working 
>> fine, which 
>>> is why I've been questioning the box itself rather than the cms's.
>>>
>>> Kind regards, Steve.
>>>
 -Original Message-
 From: Kae Verens [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, September 27, 2006 13:58
 To: Steve Walker
 Cc: php-general@lists.php.net
 Subject: [PHP] Re: Various errors being generated from an 
>> apache/php 
 combo

 Steve Walker wrote:
> [client 80.58.205.38] PHP Fatal error: Call to undefined 
>> function:
> cleanupbynode() in
>
>> /var/www/vhosts/demos.oneworldmarket.co.uk/httpdocs/gems/kernel/clas
 se
> s/ezco
> ntentobjecttreenode.php on line 2684
 could be that the function cleanupbynode() is defined in the wrong 
 place (ie; after it is actually needed)

> [client 80.58.205.38] PHP Warning:  fopen(../configuration.php): 
> failed to open stream: Permission denied in
>
>> /var/www/vhosts/oneworldmarket.co.uk/httpdocs/demo_business/administ
 ra
> tor/co mponents/com_config/admin.config.php on line 463
 could be that configuration.php is saved using your oneworldmarket 
 username instead of the httpd's username.

> What seems very odd is that with all these problems hitting
 refresh on
> the browser then takes you to the point the script would
 have ended up
> at if it hadn't errored...
 it might be that there is a redirect happening, so refreshing the 
 page doesn't send data to the same location as before.


 just a few thoughts,

 Kae

>>
> 

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



RE: [PHP] Re: Various errors being generated from an apache/php combo

2006-09-27 Thread Steve Walker
> are you using an opcode cache?

Yes, we have eaccelerator running.
 
> > 
> > Steve. 
> > 
> >> -Original Message-
> >> From: [EMAIL PROTECTED]
> >> [mailto:[EMAIL PROTECTED]
> >> Sent: Wednesday, September 27, 2006 15:28
> >> To: Steve Walker
> >> Subject: RE: [PHP] Re: Various errors being generated from an 
> >> apache/php combo
> >>
> >> it sounds like when things were migrated not everything 
> got set down 
> >> quite the way it was in the original environment.
> >>
> >> ideally you still have the "old" environment available to check 
> >> against. if you do, compare the permissions of the 
> >> "configuration.php"
> >> file (and directory) between old and new. you'll also 
> likely want to 
> >> check what user/group your apache server is running as now, as 
> >> compared to the previous environment.
> >>
> >> on the missing function, do a search through the
> >> (application/cms) libraries/classes on the old machine to 
> see where 
> >> the missing one is.
> >> then check things on the new machine. this may be a 
> pathing issue, or 
> >> it could be that something didn't get installed.
> >>
> >> if you don't have the old machine available, then this is will 
> >> require more work and digging.
> >>
> >> [rule -- never give up the old environment until you're
> >> *certain* that things work on the new - and even then, tar up 
> >> everything (in reasonable pieces) so that you can compare 
> at a later 
> >> date if necessary.]
> >>
> >>   - Rick
> >>
> >>
> >>  Original Message 
> >>> Date: Wednesday, September 27, 2006 02:58:46 PM +0200
> >>> From: Steve Walker <[EMAIL PROTECTED]>
> >>> To: php-general@lists.php.net
> >>> Subject: RE: [PHP] Re: Various errors being generated from an
> >> apache/php combo
> >>> Thanks Kae and Rick for your replies.
> >>>
> >>> One of things I should have mentioned is that all these 
> sites have 
> >>> been migrated from another box on which they were working
> >> fine, which
> >>> is why I've been questioning the box itself rather than the cms's.
> >>>
> >>> Kind regards, Steve.
> >>>
>  -Original Message-
>  From: Kae Verens [mailto:[EMAIL PROTECTED]
>  Sent: Wednesday, September 27, 2006 13:58
>  To: Steve Walker
>  Cc: php-general@lists.php.net
>  Subject: [PHP] Re: Various errors being generated from an
> >> apache/php
>  combo
> 
>  Steve Walker wrote:
> > [client 80.58.205.38] PHP Fatal error: Call to undefined
> >> function:
> > cleanupbynode() in
> >
> >> 
> /var/www/vhosts/demos.oneworldmarket.co.uk/httpdocs/gems/kernel/clas
>  se
> > s/ezco
> > ntentobjecttreenode.php on line 2684
>  could be that the function cleanupbynode() is defined in 
> the wrong 
>  place (ie; after it is actually needed)
> 
> > [client 80.58.205.38] PHP Warning:  
> fopen(../configuration.php): 
> > failed to open stream: Permission denied in
> >
> >> 
> /var/www/vhosts/oneworldmarket.co.uk/httpdocs/demo_business/administ
>  ra
> > tor/co mponents/com_config/admin.config.php on line 463
>  could be that configuration.php is saved using your 
> oneworldmarket 
>  username instead of the httpd's username.
> 
> > What seems very odd is that with all these problems hitting
>  refresh on
> > the browser then takes you to the point the script would
>  have ended up
> > at if it hadn't errored...
>  it might be that there is a redirect happening, so 
> refreshing the 
>  page doesn't send data to the same location as before.
> 
> 
>  just a few thoughts,
> 
>  Kae
> 
> >>
> > 
> 
> 

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



RE: [PHP] Re: Various errors being generated from an apache/php combo

2006-09-27 Thread Steve Walker
Thanks Jochem.

We tested with both modules switched off and it made no difference. I was
suspicious about mod_security, but again it doesn't seem to causing the
problem.

Steve. 

> -Original Message-
> From: Jochem Maas [mailto:[EMAIL PROTECTED] 
> Sent: Wednesday, September 27, 2006 17:31
> To: Steve Walker
> Subject: Re: [PHP] Re: Various errors being generated from an 
> apache/php combo
> 
> Steve Walker wrote:
> >> are you using an opcode cache?
> > 
> > Yes, we have eaccelerator running.
> 
> turn it off and see if your errors go away. if they do then 
> it's possibly time to find another accelerator.
> 
> APC is a good one to try: php.net/apc
> 
> otherwise you may have to look at commercial solutions ... 
> (read: 'Zend')
> 
> >  
> >>> Steve. 
> >>>
>  -Original Message-
>  From: [EMAIL PROTECTED]
>  [mailto:[EMAIL PROTECTED]
>  Sent: Wednesday, September 27, 2006 15:28
>  To: Steve Walker
>  Subject: RE: [PHP] Re: Various errors being generated from an 
>  apache/php combo
> 
>  it sounds like when things were migrated not everything
> >> got set down
>  quite the way it was in the original environment.
> 
>  ideally you still have the "old" environment available to check 
>  against. if you do, compare the permissions of the 
>  "configuration.php"
>  file (and directory) between old and new. you'll also
> >> likely want to
>  check what user/group your apache server is running as now, as 
>  compared to the previous environment.
> 
>  on the missing function, do a search through the
>  (application/cms) libraries/classes on the old machine to
> >> see where
>  the missing one is.
>  then check things on the new machine. this may be a
> >> pathing issue, or
>  it could be that something didn't get installed.
> 
>  if you don't have the old machine available, then this is will 
>  require more work and digging.
> 
>  [rule -- never give up the old environment until you're
>  *certain* that things work on the new - and even then, tar up 
>  everything (in reasonable pieces) so that you can compare
> >> at a later
>  date if necessary.]
> 
>    - Rick
> 
> 
>   Original Message 
> > Date: Wednesday, September 27, 2006 02:58:46 PM +0200
> > From: Steve Walker <[EMAIL PROTECTED]>
> > To: php-general@lists.php.net
> > Subject: RE: [PHP] Re: Various errors being generated from an
>  apache/php combo
> > Thanks Kae and Rick for your replies.
> >
> > One of things I should have mentioned is that all these
> >> sites have
> > been migrated from another box on which they were working
>  fine, which
> > is why I've been questioning the box itself rather than 
> the cms's.
> >
> > Kind regards, Steve.
> >
> >> -Original Message-
> >> From: Kae Verens [mailto:[EMAIL PROTECTED]
> >> Sent: Wednesday, September 27, 2006 13:58
> >> To: Steve Walker
> >> Cc: php-general@lists.php.net
> >> Subject: [PHP] Re: Various errors being generated from an
>  apache/php
> >> combo
> >>
> >> Steve Walker wrote:
> >>> [client 80.58.205.38] PHP Fatal error: Call to undefined
>  function:
> >>> cleanupbynode() in
> >>>
> >> 
> /var/www/vhosts/demos.oneworldmarket.co.uk/httpdocs/gems/kernel/clas
> >> se
> >>> s/ezco
> >>> ntentobjecttreenode.php on line 2684
> >> could be that the function cleanupbynode() is defined in
> >> the wrong
> >> place (ie; after it is actually needed)
> >>
> >>> [client 80.58.205.38] PHP Warning:  
> >> fopen(../configuration.php): 
> >>> failed to open stream: Permission denied in
> >>>
> >> 
> /var/www/vhosts/oneworldmarket.co.uk/httpdocs/demo_business/administ
> >> ra
> >>> tor/co mponents/com_config/admin.config.php on line 463
> >> could be that configuration.php is saved using your
> >> oneworldmarket
> >> username instead of the httpd's username.
> >>
> >>> What seems very odd is that with all these problems hitting
> >> refresh on
> >>> the browser then takes you to the point the script would
> >> have ended up
> >>> at if it hadn't errored...
> >> it might be that there is a redirect happening, so
> >> refreshing the
> >> page doesn't send data to the same location as before.
> >>
> >>
> >> just a few thoughts,
> >>
> >> Kae
> >>
> >>
> > 
> 
> 

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



Re: [PHP] Best open source project/framework to support a php training course?

2006-09-27 Thread Richard Lynch
On Wed, September 27, 2006 4:25 am, Pinocchio007 wrote:
> is simple: which project/framework to choose in order to bring the
> current
> "best practice" to our students, and prepare them for the future. Not
> being
> a professional PHP developer myself, I would appreciate any
> recommendation.
> Which OS project would you include? Which framework? And why?

Here is what I would suggest:

Instead of flooding a single project with 20 potentially uninterested
students, give the students a handful of projects to choose from, or
even a large list, or even just let them pick *any* existing PHP
project from sourceforge or any other semi-reputable source.

The productivity of an Open Source developer, even a student trying to
get a grade, is a whole lot higher when they picked a project that
interested them in the first place, instead of just being assigned to
it.

They may not get "best practices" -- But they'll sure get "real-world"
:-)

But perhaps they could even end up being the one to bring "best
practices" *TO* the project.  Which will teach them more?  Watching a
project already doing "best practices" or pushing a project to the
next level by implementing your instruction to bring "best practices"
to the table?

One other suggestion:
For the advanced class, suggest that they could also work on the PHP
source itself, rather than a PHP application.

Or, perhaps, by that point, they'd be more interested in working on
MySQL, PostgreSQL, Ming, or any of a couple hundred extensions in
PECL.

At this point, they'd be actually writing C code, but so what? :-)

They'll learn a heck of a lot more about how PHP really works that
way, that's for sure.

PS
If you don't know the history of PHP, you should ask Ze'ev and Andi
(aka Zend) how they got involved in PHP.  It is incredibly relevant to
this question/answer provided above, and well worth your time.

If you're lucky, maybe YOUR students can get sucked into a wildly
successful OSS project, and end up with an honorary degree because
they were too busy "doing" instead of studying. :-)

-- 
Like Music?
http://l-i-e.com/artists.htm

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



Re: [PHP] Print or Echo takes lots of time

2006-09-27 Thread Richard Lynch
On Wed, September 27, 2006 3:37 am, Sancar Saran wrote:
> Thanks for supporting, because of approaching the problem I don't want
> to
> change generate once echo one style.
>
> And I found solution like this,
> I split  variable into an array and generate loop for printing, mostly
> fix the
> problem.
>
> And more interesting, some times problem repeates himself. I believe
> this was
> connected to php memory performance.
>
> Anyhow is there any information about optimal echo or print size ?

You could try to generate some stats to add to the pool of knowledge.

I suspect it's so tied to hardware, load, OS, bandwidth-pipesize that
all that has to be reported to be useful.

-- 
Like Music?
http://l-i-e.com/artists.htm

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



[PHP] Java Script

2006-09-27 Thread Jo�o C�ndido de Souza Neto
Hi everyone.

Excuse me by this off topic.

Someone here know any list abaout javascript using nntp protocol?

Thanks a lot.

-- 
João Cândido de Souza Neto
Curitiba Online
[EMAIL PROTECTED]
(41) 3324-2294 (41) 9985-6894
http://www.curitibaonline.com.br 

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



Re: [PHP] PHP5, Windoze, Extensions

2006-09-27 Thread Richard Lynch
On Wed, September 27, 2006 2:03 am, Dave Carrera wrote:
> I have std php running and it tells me that my php.ini is being read
> from c:\php\php.ini. This is correct.

Tells you where/how?

In phpinfo()?...

> But what ever i change "extension_dir" to it always says "c:\php5". By
> the way i am using phpinfo() for this info.

Something is hinky, then, as PHP reads that from php.ini, if you are
doing things right...

Is php.ini actually *readable* by the Apache/PHP user?

If not, PHP doesn't read your php.ini, and reports the default values
of everything.

> I always stop -> start apache for changes to take affect but nothing
> changes.

It's Windows.

Re-boot. :-v

> I have php in the system path.
>
> I also have tried copying the extension to windoze and system32 but
> still they will not load.
>
> ANy ideas ??

First, stop copying them all over the place.

Get *one* extension to work and put all the extensions in that place
that works, or you'll end up confusing yourself when you upgrade and
have 3 copies of everything scattered all over.

-- 
Like Music?
http://l-i-e.com/artists.htm

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



Re: [PHP] File Upload Security and chmod

2006-09-27 Thread Richard Lynch
On Wed, September 27, 2006 10:11 am, tedd wrote:
>>So when you read advice to use 0777 you can immediately change that
>> to
>>0700, because the only access needed is for you, not your group, and
>>not the "world" of other users on that machine.
>
> Excellent point -- thanks.

This applies only to Andy -- or those whose server runs as "themself"

Tedd, whose server runs as "nobody" or some other user, still need
0777 or the FTP hoop-jumping.

-- 
Like Music?
http://l-i-e.com/artists.htm

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



Re: [PHP] Stored procs and transactions using Linux/PHP and Windows/MSSQL

2006-09-27 Thread Richard Lynch
On Wed, September 27, 2006 7:40 am, Rick Emery wrote:
> Is anyone using PHP5 on Linux to connect to MS SQL Server 2000 on
> Windows and execute stored procedures with output parameters within a
> transaction? If so, how?

No, but...

> I'm trying to do something like this in the PHP application:
>
> begin transaction
> execute a stored procedure, receiving an identity back
> if certain conditions are met
> execute another stored procedure, getting an identity
> if certain other conditions are met
> execute another stored procedure, getting an identity
> if any of the above procedures fail
> rollback transaction
> else
> commit transaction
>
> I ran into some problems using both PDO and the mssql_* functions (if
> someone is successful using one of these, I'll likely be asking in a
> future message for help with the problems I'm encountering).

You have to describe your problems to get useful help.

Are you losing track of your identities?  You need to snag them right
away and store them.

Did aliens invade your home and suck out your brains?   Can't help you
on that one.

See the difference? :-)

> I'm just asking to see if anyone is successfully doing what I'm trying
> to do, and if so, what method is being used to accomplish it.

The probability that *nobody* from the millions of PHP users and the
millions of MS SQL users is doing this is pretty much 0.

Unless it just plain doesn't work, and then nobody is doing it...

Which is incredibly unlikely, as these Open Source guys don't accept
"doesn't work" -- They turn it into "fixed that, now it works" :-)

-- 
Like Music?
http://l-i-e.com/artists.htm

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



Re: [PHP] FDF > PDF - Content-type: application/vnd.fdf

2006-09-27 Thread Richard Lynch
On Wed, September 27, 2006 9:00 am, Sam Smith wrote:
> When loaded into a browser that can display PDF files (Win IE and
> Firefox, Mac Safari) the FDF file (snip below) should open linked PDF
> and populated it with the data from the FDF file.
>
> It works fine when the FDF file is loaded from within the browser
> with "Open File" (or simply double-clicked from the desktop).
>
> It works fine in Win IE (because IE doesn't play by the rules).
>
> I just don't understand the header thing, the "Content-type" deal.
>
> Why is the FDF file loaded as plain text when loaded via a URL?
>
> 

Standards-based browsers (everything but IE) wants the Content-type so
they know what the [bleep] kind of document you are handing them.

IE examines the URL, the contents of the document, the META tags (in
HTML) the range of values of the bytes in the document (to guess at
charset) -- Pretty much, IE does everything it possibly can to NOT
follow the standard Content-type.  They must have an entire team of
engineers maintaining the "guess what type this might be" code-base.

So in your case, the lack of .pdf and .fdf on the end are killing you
in IE.  If it don't work in the others, the lack of an appropriate
Content-type is killing you.

Here is an article specifically about FDF|PDF:
http://phpbootcamp.com/articles/fdf.htm

NOTE:
You also can *NOT* have GET arguments for FDF->PDF if you have
configured the Adobe Reader to open in its own window on IE.  The GET
args will confuse IE and make it not launch the Reader.  In some
versions of IE, at least.

Also read the second half of this article:
http://richardlynch.blogspot.com/

It's really all about the same thing -- Don't confuse the browsers
with dynamic rich media.  Make them *think* they are getting static
rich media.  (rich media: images, PDFs, SWF, etc)

-- 
Like Music?
http://l-i-e.com/artists.htm

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



[PHP] Displaying MySQL results on runtime

2006-09-27 Thread Mário Gamito
Hi,

I have this code to create a database and a few tables.

Is there a way to display the MySQL actions at runtime, i. e., display
the MySQL commands while they are being executed ?

Any help would be appreciated.

Warm Regards,
Mário Gamito

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



[PHP] Re: hotel reservations

2006-09-27 Thread Richard Lynch
SMTP server errors and a too-quick click made me close the message I
sent with all the nifty thread-ness... sorry.

//make reservation
insert into reservation(room_number, start_date, end_date)
values ('504', '12/10/2006', '14/10/2006')

//reservation inquiry for 13/10/2006:
select room_number
from room
where room_number not in
  (select room_number
 from reservation
 where '13/10/2006' between start_date and end_date
  )

The rest of the application is left as an exercise to the reader. :-)

-- 
Like Music?
http://l-i-e.com/artists.htm

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



Re: [PHP] Displaying MySQL results on runtime

2006-09-27 Thread Leif Gregory
Hello Mário,

Wednesday, September 27, 2006, 10:25:31 AM, you wrote:
> Is there a way to display the MySQL actions at runtime, i. e.,
> display the MySQL commands while they are being executed ?

Echo the sql statements...



-- 
  TBUDL/BETA/DEV/TECH Lists Moderator / PGP 0x5D167202
 __       Geocaching:http://gps.PCWize.com
(  )  ( ___)(_  _)( ___)  TBUDP Wiki Site:  http://www.PCWize.com/thebat/tbudp
 )(__  )__)  _)(_  )__)   Roguemoticons & Smileys:http://PCWize.com/thebat
()()()(__)PHP Tutorials and snippets:http://www.DevTek.org

See - the thing is - I'm an absolutist.  I mean, kind of ... in a way.

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



[PHP] strange errors from command line vs. web

2006-09-27 Thread blackwater dev

I have some code that makes a connection to the db.  When I run this code
from the command line, it stops at the db connection.  If I call the script
from the browser, it works fine.  I've changed the permissions and that
didn't work.  The db connection is the basic, localhost, root, with no
password.

What else can I try?


Re: [PHP] Stored procs and transactions using Linux/PHP and Windows/MSSQL

2006-09-27 Thread Rick Emery

Quoting Richard Lynch <[EMAIL PROTECTED]>:


On Wed, September 27, 2006 7:40 am, Rick Emery wrote:

I'm trying to do something like this in the PHP application:

begin transaction
execute a stored procedure, receiving an identity back
if certain conditions are met
execute another stored procedure, getting an identity
if certain other conditions are met
execute another stored procedure, getting an identity
if any of the above procedures fail
rollback transaction
else
commit transaction

I ran into some problems using both PDO and the mssql_* functions (if
someone is successful using one of these, I'll likely be asking in a
future message for help with the problems I'm encountering).


You have to describe your problems to get useful help.


True. In this message, I was looking for people who had done what I  
was attempting in order to solicit advice. But recognizing that I may  
not find anybody, I guess I should try to find some help with the  
specific problems.


With PDO, I use the dblib driver (which is the driver that all of the  
documentation I can find says to use). Unfortunately, the dblib driver  
does not support transactions; I've filed an enhancement request.


With the mssql functions, the first problem was that the "bigint" data  
type is not supported. I coded around that (by using "varchar" and  
converting it in the stored procedure), but now I get:


Warning: mssql_query() [function.mssql-query]: Query failed in  
/var/www/html/business/entity.php on line 127


which is:
mssql_query('RollBack Transaction');

but can't get any information about why it failed. Running the same  
commands in Query Analyzer works without error.



I'm just asking to see if anyone is successfully doing what I'm trying
to do, and if so, what method is being used to accomplish it.


The probability that *nobody* from the millions of PHP users and the
millions of MS SQL users is doing this is pretty much 0.


Agreed. I just need to somehow find the successful one(s) :-)

Thanks,
Rick

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



Re: [PHP] File Upload Security and chmod

2006-09-27 Thread Andy Hultgren

So I've been trying to figure out where php uploads files to temporarily
store them before I move them to their permanent storage directory, and I'm
having some difficulties:

-- php_info() says the temporary file upload directory is "/tmp" but I don't
know if that's relative to my root directory or what and can't figure out
from the documentation how that path is displayed.
-- I have tried to call pathinfo() and realpath() on my
$_FILES['name']['tmp_name'] file before it is moved, but neither gives the
full path to the file (which I realized after reading the documentation that
neither is supposed to do).  Any ideas on functions that will give the full
path of the inputted file?  I've been searching the php documentation and
general list but to no avail.  On the plus side, I did get to practice
writing information to a text file, so that was fun :)

Thanks for the tips on the chmod requirements for the get_image_size()
function, I'm all about keep permissions as strict as possible at this
point!

Crap, gotta use my brain, huh?  :)  Seriously, thanks for the overview on
how "security" should be approached and for the advice to not take general
security recommendations at face value but to give them some thought, given
my unique situation.  This is really good for me to learn now, while I'm
still implementing my security rather than later when I might have to redo
everything (or might have a gaping hole based on a poor assumption).  At
least I won't be storing anyone's financial information, so I should only be
a target for people who just want to be mean, but not people who want to get
free stuff from others credit info.

Maybe I should have one of those disclaimers posted on my homepage like the
ones that you see in taxis sometimes: "This driver never carries more than
$20 cash."  -->  "This website never carries anyone's financial
information."  :)

Andy


On 9/26/06, Richard Lynch <[EMAIL PROTECTED]> wrote:


On Mon, September 25, 2006 3:58 pm, Andy Hultgren wrote:
> So I tried to implement the example code given in the php tmpfile()
> documentation and it wouldn't do anything, which suggests that I don't
> have
> access to the /tmp directory.  Also, the FAQ's section on my server's
> website say that /tmp is not shared between the servers.  So, looks
> like
> /tmp option is out...

Did they perhaps give you your own "tmp" directory elsewhere?...

Sometimes you just need to poke at it to figure out where your "tmp"
is, and then you can use the PHP functions that let you specify your
own directory, but not the ones that assume that system /tmp is your
"tmp"

My host has a "tmp" dir I can use, but it ain't /tmp, and PHP
routinely tries to use /tmp with some functions.  G.

> So, let me see if I understand the situation I'm looking at here:
>
> The bad side:
> -- I don't have any place to put uploaded files outside of my webtree,
> which
> makes it tough to ensure these files cannot be surfed to once they are
> uploaded, and also means I have to do my security checks while the
> files are
> within my webtree and potentially accessible.  (BAD).

Yes.

Though if file uploads are working at all, looking at the $_FILES
array may give you a clue as to a directory that you maybe *can*
access which is your own private "tmp"...

> -- Any php script on my server (created by me or somehow maliciously
> uploaded) can do whatever it wants within my account because all php
> scripts run as me.  (also BAD).

On the plus side, some of the coding gets real simple, since you are
you, and you are never somebody else. :-)

> The good side:
> -- Uploaded files can be chmod so that nobody can read them, then I
> chmod
> them when I need to use them.  This adds a layer of protection for
> completely uploaded files.  I assume this will not help with files
> while
> they are getting their security checks, since PHP has to be able to
> read and
> execute them in order to run the checks (get_image_size, etc.)?

PHP needs to read them for get_image_size, but not execute.

Use minimum force needed.

If you are flipping the chmod around within your scripts, that reduces
your risk to however long the dir remains in its 0777 (or whatever)
state, which is however long your script takes to process whatever it
has to process in that state.

So long exhaustive checks of the validity of a file are "bad" because
that leaves that window open longer, but they're "good" because the
file is then more likely to be kosher.

> -- Since I'm only allowing image uploads, I can strictly filter which
> files
> are allowed to be uploaded (with extension checks and get_image_size).

Extension check is kinda useless...

I can name any file I want with .jpg and upload it.

get_image_size() is good, as it checks the first N bytes -- But
somebody somewhere can construct a worm with the first N bytes that
LOOK like a valid image, to get_image_size()

A human eyeball check would be even better, as then you *know* that a
much larger number of bytes are a val

Re: [PHP] strange errors from command line vs. web

2006-09-27 Thread travis
> I have some code that makes a connection to the db.  When I run this code
> from the command line, it stops at the db connection.  If I call the script
> from the browser, it works fine.  I've changed the permissions and that
> didn't work.  The db connection is the basic, localhost, root, with no
> password.
> 
> What else can I try?

Try to get the error message from the DB Connection when it stops.

If MySQL something like this (from the PHP Manual for mysql_connect)

$link = mysql_connect('localhost', 'mysql_user', 'mysql_password');
if (!$link) {
   die('Could not connect: ' . mysql_error());
}


Travis Doherty

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



[PHP] LAMP benchmarking tool

2006-09-27 Thread Joseph Cheng

Is anyone using a reliable Linux/Apache/MySQL/PHP benchmarking suite?
There are benchmark software for individual pieces but I hope there is
one tool or several small tools that act together to give a picture of
how long a request takes from entering Apache, to PHP, to MySQL and
then back to the client.TIA!

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



[PHP] I can see my php code in browser?

2006-09-27 Thread afan
hi,
I just installed suse se9 on one machine and didn't have a problem. then
installed apache and works fine. installed php - didn't get any error, but
when tested I was able to see my code (tested with ) in
the browser. for installation used yast.

what could cause this?

tanks for any help.

-afan

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



Re: [PHP] I can see my php code in browser?

2006-09-27 Thread Robert Cummings
On Wed, 2006-09-27 at 21:45 +0200, [EMAIL PROTECTED] wrote:
> hi,
> I just installed suse se9 on one machine and didn't have a problem. then
> installed apache and works fine. installed php - didn't get any error, but
> when tested I was able to see my code (tested with ) in
> the browser. for installation used yast.

You need a line like one of the following in your Apache http.conf file:

LoadModule php4_module/usr/local/php/phpWeb/.libs/libphp4.so
#LoadModule php5_module   /usr/local/php/phpWeb/.libs/libphp5.so  

The actual location of the .so file will defitely be different on your
system.

You also need to register in your http.conf what file extensions cause
the content to be processed by PHP. This is done via the following line
(you may not want all of them for your system):

AddType application/x-httpd-php .php .php3 .php4 .php5 .phtml .html .htm

Cheers,
Rob.
-- 
..
| InterJinn Application Framework - http://www.interjinn.com |
::
| An application and templating framework for PHP. Boasting  |
| a powerful, scalable system for accessing system services  |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for   |
| creating re-usable components quickly and easily.  |
`'

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



Re: [PHP] I can see my php code in browser?

2006-09-27 Thread afan
Sorry for not posting this: yes, I use apache 2, php 4.3.4 (old a bit :)).
I didn't configure manuelly. Thinking yast has to do itself. At least did
it on pc at home?!?



> I assume you are using Apache?!
>
> Did you configure Apache to handle PHP files appropriately?
>
> What is the extension of your source file?
>
>
>
>
>
>
> On 9/27/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>>
>> hi,
>> I just installed suse se9 on one machine and didn't have a problem. then
>> installed apache and works fine. installed php - didn't get any error,
>> but
>> when tested I was able to see my code (tested with )
>> in
>> the browser. for installation used yast.
>>
>> what could cause this?
>>
>> tanks for any help.
>>
>> -afan
>>
>> --
>> PHP General Mailing List (http://www.php.net/)
>> To unsubscribe, visit: http://www.php.net/unsub.php
>>
>>
>
>
> --
> Anas Mughal
>

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



Re: [PHP] LAMP benchmarking tool

2006-09-27 Thread Rasmus Lerdorf

Joseph Cheng wrote:

Is anyone using a reliable Linux/Apache/MySQL/PHP benchmarking suite?
There are benchmark software for individual pieces but I hope there is
one tool or several small tools that act together to give a picture of
how long a request takes from entering Apache, to PHP, to MySQL and
then back to the client.TIA!


There is no way a single tool can get you intra-request numbers for 
that.  Your best approach is to use a http benchmarking tool to measure 
your entire roundtrip (http://acme.com/software/http_load/) and then 
once you know your entire roundtrip time including latency numbers use a 
profiler (http://valgrind.org/info/tools.html#callgrind) to figure out 
where you are spending your time in your request.


-Rasmus

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



Re: [PHP] Download files outside DocumentRoot Dir

2006-09-27 Thread Christopher Weldon
Richard Lynch wrote:
> On Mon, September 25, 2006 3:57 pm, Christopher Weldon wrote:
>> On 2:36 pm 09/25/06 "Ramiro Cavalcanti" <[EMAIL PROTECTED]> wrote:
>>> Hi Christopher,
>>> at first, thank you for your answer.
>>>
>>> I'd like to know if it's possible use this when php is running like
>>> cgi (php-suexec). I've put this code at httpd.conf at ,
>>> then tryed to use it at .htaccess, but without successs.
>>>
>>> Thank you again.
>>>
>> Oh, in that case, you most definitely can't use the .htaccess
>> conditions.
>> PHP will have issues if you are running php-suexec.
>>
>> I'll see if I can think of any other ways around this, but php-suexec
>> definitely limits your usage for this simple fix right now.
> 
> If you *want* that ugly HTTP Auth popup box, you can search on php.net
> for code to do that.
> 
> If not, you can take that code, and replace the HTTP challenge with a
> simple login form.
> 
> If they aren't logged in, the download just doesn't go...
> 

How do you mean? The particular code that I was talking about included
doing authentication outside of an ugly HTTP Auth popup box and just
including a PHP script that checked that the user was authenticated, and
if not, either deny access to him or redirect them to a login page.

My proposal requires minimal amount of changes that the user would have
to do. He can keep his downloads in the web root and not have to load
ANY file into memory. The only PHP side of downloading a file that's in
the web root downloads folder is to check for authentication. Thus, a
very quick and scalable solution.

--
Chris Weldon

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



Re: [PHP] I can see my php code in browser?

2006-09-27 Thread Richard Lynch
On Wed, September 27, 2006 2:53 pm, Robert Cummings wrote:
> On Wed, 2006-09-27 at 21:45 +0200, [EMAIL PROTECTED] wrote:
>> hi,
>> I just installed suse se9 on one machine and didn't have a problem.
>> then
>> installed apache and works fine. installed php - didn't get any
>> error, but
>> when tested I was able to see my code (tested with > ?>) in
>> the browser. for installation used yast.

Didja start/stop Apache after installing PHP?

> You need a line like one of the following in your Apache http.conf
> file:
>
> LoadModule php4_module/usr/local/php/phpWeb/.libs/libphp4.so
> #LoadModule php5_module   /usr/local/php/phpWeb/.libs/libphp5.so

The configure/install scripts will only dink with httpd.conf under
certain conditions, in my humble experience...
#1. They find it where they expect it to be
#2. It "looks" like what they expect inside -- If you've made changes,
or the Apache Dev Team made changes, then they can't automate their
changes to the file anymore.

You really do need to understand how that httpd.conf file works anway.
:-)

> (you may not want all of them for your system):
>
> AddType application/x-httpd-php .php .php3 .php4 .php5 .phtml .html
> .htm

You forgot this:

.css .shtml .asp .cfm

[evil chuckle]

-- 
Like Music?
http://l-i-e.com/artists.htm

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



Re: [PHP] File Upload Security and chmod

2006-09-27 Thread Richard Lynch
On Wed, September 27, 2006 12:12 pm, Andy Hultgren wrote:
> So I've been trying to figure out where php uploads files to
> temporarily
> store them before I move them to their permanent storage directory,
> and I'm
> having some difficulties:
>
> -- php_info() says the temporary file upload directory is "/tmp" but I
> don't
> know if that's relative to my root directory or what and can't figure
> out
> from the documentation how that path is displayed.

/tmp means the /tmp on the root of the hard drive, which your webhost
allegedly isn't letting you share...

HOWEVER:
It is entirely possible (nay, even likely) that they have you in a
ch-rooted environment where your "/tmp" is not somebody else's "/tmp"
so you'll just see "/tmp" and you don't have to worry about the fact
that it's not really really /tmp but somewhere else...

> -- I have tried to call pathinfo() and realpath() on my
> $_FILES['name']['tmp_name'] file before it is moved, but neither gives
> the
> full path to the file

If $_FILES['name']['tmp_name'] does already have the full path,
something is very wrong on your system...

Note that as soon as your upload-receiving script ends, the file is
deleted.

You *have* to use move_uploaded_file() on it in the upload-receiving
script to save the file somewhere else, or it's just gonna go away,
and you ain't gonna see it never again.

> Maybe I should have one of those disclaimers posted on my homepage
> like the
> ones that you see in taxis sometimes: "This driver never carries more
> than
> $20 cash."  -->  "This website never carries anyone's financial
> information."  :)

:-)

While there are obviously people "out there" who will just attack
randomly, (spammers) I honestly believe that a
valuable/useful/warm-fuzzies site (in the eyes of the attackers) is a
much less likely target for an actual human attack.

I have absolutely zero evidence to support that claim, other than one
site that's been wide open to abuse for most of a decade, and only the
mindless spam-bots bother it... :-)

-- 
Like Music?
http://l-i-e.com/artists.htm

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



Re: [PHP] Stored procs and transactions using Linux/PHP and Windows/MSSQL

2006-09-27 Thread Richard Lynch
On Wed, September 27, 2006 11:50 am, Rick Emery wrote:
> Warning: mssql_query() [function.mssql-query]: Query failed in
> /var/www/html/business/entity.php on line 127
>
> which is:
> mssql_query('RollBack Transaction');

Smush all of that into one line in Google, and see what you get...

Oh, look:
http://bugs.php.net/bug.php?id=31498&edit=1
http://bugs.php.net/bug.php?id=31243&edit=1
.
.
.

:-)

>>> I'm just asking to see if anyone is successfully doing what I'm
>>> trying
>>> to do, and if so, what method is being used to accomplish it.
>>
>> The probability that *nobody* from the millions of PHP users and the
>> millions of MS SQL users is doing this is pretty much 0.
>
> Agreed. I just need to somehow find the successful one(s) :-)

It looks like the transactions may actually be doing the right thing,
just the return value of FALSE is fooling you into thinking they
aren't...

You may want to consider trying the Sybase drivers, if they work with
PDO...

Last I heard, the Sybase drivers were still faster and more reliable
than Microsoft's (MS SQL was a buyout-fork of Sybase at some point in
history)

No promise this is still true in normal usage, much less that funky
PDO stuff.

-- 
Like Music?
http://l-i-e.com/artists.htm

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



Re: [PHP] strange errors from command line vs. web

2006-09-27 Thread Richard Lynch
On Wed, September 27, 2006 11:36 am, blackwater dev wrote:
> I have some code that makes a connection to the db.  When I run this
> code
> from the command line, it stops at the db connection.

Show us the code, without any embedded passwords, of course...


> If I call the
> script
> from the browser, it works fine.

This almost always boils down to:
PHP runs as "nobody" or a similarly unpowered user
You log in as you, blackwaterdev or whatever, with many powers.

In this case, it looks like 'nobody' has their own database, and is
allowed to connect to it, but you are not.

> I've changed the permissions and
> that
> didn't work.

Changed which permissions?

mysql_admin?
If so, did you reload the permissions after change?

File executable?

What?

> The db connection is the basic, localhost, root, with no
> password.

Now that is an entirely separate problem.

DON'T DO THAT!

:-)

> What else can I try?

You're going to have to create a user and set a password anyway, so do
that first.

There's no point in getting localhost/root/[blank] to work when it's
not what you want anyway.

-- 
Like Music?
http://l-i-e.com/artists.htm

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



Re: [PHP] Displaying MySQL results on runtime

2006-09-27 Thread Richard Lynch
On Wed, September 27, 2006 11:25 am, Mário Gamito wrote:
> I have this code to create a database and a few tables.
>
> Is there a way to display the MySQL actions at runtime, i. e., display
> the MySQL commands while they are being executed ?

If you happened to have each SQL statement in an array, you could just
echo them as you go...

Another option would be to use backticks and cat the file into a mysql
monitor shell, I guess, and then you'd see the stuff it prints out.

If the commands are static, and don't contain ';' in the data, you
could read in the file, $statements = explode(';', $sql); and then
you'd have the aforementioned array.

-- 
Like Music?
http://l-i-e.com/artists.htm

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



Re: [PHP] Re: Various errors being generated from an apache/php combo

2006-09-27 Thread Richard Lynch
On Wed, September 27, 2006 10:25 am, Jochem Maas wrote:
>> Just to add more confusion, the errors are intermittent - sometimes
>> it works
>> fine, other times we get these errors which makes it even more
>> difficult to
>> pinpoint.

If you're using that autoload thingie, and the objects being loaded in
are complex and inter-twined enough, and if your include_once files
are loaded in some non-predictable ordering, you can easily make a
right mess of things real fast, and end up in this position...

This usually indicates (to this naive reader) that what's really going
on is that the developers don't really understand what functionality
is in what, the architect hasn't laid things out cleanly, and there's
a lot of copy&paste code floating around that works more by Voodoo
Programming than by Design.

Don't do that. :-)

I'm not claiming that this IS the situation here -- only that it's one
possible diagnosis of this symptom.

I'd have to read, or, more accurately, attempt to read and give up in
frustration, the source code to know for sure.

If you can't sit down and map out what PHP files get loaded when
throughout the course of your application, you don't have a chance of
understanding what's actually happing *IN* those files, do you?

-- 
Like Music?
http://l-i-e.com/artists.htm

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



Re: [PHP] File Upload Security and chmod

2006-09-27 Thread Andy Hultgren

Well, seeing as I have no directory anywhere in my file structure called
"/tmp" and yet my file uploads are still working, it would appear that my
temporary file upload directory "/tmp" given by php_info() is somewhere
outside of my root directory.  So that's good news!  That's were I'll be
doing my file checks anyway before moving any files into my root directory.

Anyway, at this point it looks like I need to buckle down and do some
thinkin'.  Thank you everyone for your advice, I really really appreciate
it!!  You guys have given me a really good foundation to start from on these
questions of site security, and I appreciate you taking the time to pass on
your expertise to a newcomer.

All the best,

Andy


On 9/27/06, Richard Lynch <[EMAIL PROTECTED]> wrote:


On Wed, September 27, 2006 12:12 pm, Andy Hultgren wrote:
> So I've been trying to figure out where php uploads files to
> temporarily
> store them before I move them to their permanent storage directory,
> and I'm
> having some difficulties:
>
> -- php_info() says the temporary file upload directory is "/tmp" but I
> don't
> know if that's relative to my root directory or what and can't figure
> out
> from the documentation how that path is displayed.

/tmp means the /tmp on the root of the hard drive, which your webhost
allegedly isn't letting you share...

HOWEVER:
It is entirely possible (nay, even likely) that they have you in a
ch-rooted environment where your "/tmp" is not somebody else's "/tmp"
so you'll just see "/tmp" and you don't have to worry about the fact
that it's not really really /tmp but somewhere else...

> -- I have tried to call pathinfo() and realpath() on my
> $_FILES['name']['tmp_name'] file before it is moved, but neither gives
> the
> full path to the file

If $_FILES['name']['tmp_name'] does already have the full path,
something is very wrong on your system...

Note that as soon as your upload-receiving script ends, the file is
deleted.

You *have* to use move_uploaded_file() on it in the upload-receiving
script to save the file somewhere else, or it's just gonna go away,
and you ain't gonna see it never again.

> Maybe I should have one of those disclaimers posted on my homepage
> like the
> ones that you see in taxis sometimes: "This driver never carries more
> than
> $20 cash."  -->  "This website never carries anyone's financial
> information."  :)

:-)

While there are obviously people "out there" who will just attack
randomly, (spammers) I honestly believe that a
valuable/useful/warm-fuzzies site (in the eyes of the attackers) is a
much less likely target for an actual human attack.

I have absolutely zero evidence to support that claim, other than one
site that's been wide open to abuse for most of a decade, and only the
mindless spam-bots bother it... :-)

--
Like Music?
http://l-i-e.com/artists.htm





RE: [PHP] Best open source project/framework to support a php training course?

2006-09-27 Thread Ligaya A. Turmelle
There are a number of frameworks that you can use from PEAR (though many
argue over whether it is a framework), Solar, CakePHP, Symfony, Zend's,
and many many more.  As for most OS projects - I don't know of a
particular project that uses a particular framework (someone feel free
to tell me otherwise).  Many of the larger (aka well known) OS projects
tend to be hodged podged together from what I have been told (again
someone feel free to contradict me).

Might I make a suggestion to you - no matter which framework/OS project
you use... Have it be in PHP5.  Yeah it may restrict you in options, but
that is where PHP is going and to my mind that is what someone new to
PHP should be learning.  

You should also make sure to go over security in one of your classes -
the intro would be my preferred class since security is a mindset as
well as a way of coding.  And it is easier to create habits then unlearn
and relearn them.  Just my $0.02

OK - I'll shut up now.

Respectfully,
Ligaya Turmelle

-Original Message-
From: Pinocchio007 [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, September 27, 2006 7:25 PM
To: php-general@lists.php.net
Subject: [PHP] Best open source project/framework to support a php
training course?

I am in charge of outlining a PHP/mySQL course (intro and advanced) for
an education institute. I would like to include in the course program an
in-depth study of an existing open-source project, allowing the students
to be confronted, from an early stage, to a real-world environment. My
problem is simple: which project/framework to choose in order to bring
the current "best practice" to our students, and prepare them for the
future. Not being a professional PHP developer myself, I would
appreciate any recommendation.
Which OS project would you include? Which framework? And why?

My first idea was "osCommerce", then somebody recommended "Typo3",
followed by a "go for Joomla". Well, I am hesitating.
Anybody can recommend an article/paper comparing the different PHP
frameworks/application architectures?
Is there a list where such topics are discussed?

Thanks for your help and recommendations.

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

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



[PHP] Logical OR in assignment

2006-09-27 Thread Jason Karns
I once saw the use of OR (|) in assignment.

$x = $y | $z;

Does this use bitwise OR? I'm trying to see if I could use the above
expression in place of:

$x = is_null($y) ? $z : $y;

Jason Karns
~~~
The Ohio State University [www.osu.edu]
Computer Science & Engineering [www.cse.osu.edu]

-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.405 / Virus Database: 268.12.8/455 - Release Date: 9/22/2006
 

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



Re: [PHP] Best open source project/framework to support a php training course?

2006-09-27 Thread Larry Garfield
On Wednesday 27 September 2006 20:47, Ligaya A. Turmelle wrote:
> There are a number of frameworks that you can use from PEAR (though many
> argue over whether it is a framework), Solar, CakePHP, Symfony, Zend's,
> and many many more.  As for most OS projects - I don't know of a
> particular project that uses a particular framework (someone feel free
> to tell me otherwise).  Many of the larger (aka well known) OS projects
> tend to be hodged podged together from what I have been told (again
> someone feel free to contradict me).

Varies widely with the project.  OSCommerce is a great application to study as 
an example of what NOT to do.  It's horrid.

On the other hand, Drupal is a very good example of using PHP4-era code to its 
fullest.  Modular design, plugin architecture, separation of logic and 
content and presentation, function-level polymorphism, all kinds of good 
stuff.  (Disclaimer: I am a Drupal contributor, so I am biased, but I'm a 
Drupal contributor because of how good a system it is.)  Of course, Drupal is 
not a framework per se, but a CMS/framework.  It's not for the first time PHP 
developer.  

Here's another idea: If they're just starting out, don't give them a 
framework.  Make them work without one, then write their own, realize how 
hard it is, then they'll appreciate what separates good code from bad code 
much better. :-)  One should never use a WYSIWYG HTML editor until one is 
fluent in HTML tags and CSS by hand.  Similarly, using a super-high-level 
framework before you understand how to write a decent function that 
manipulates a nested associative array to control an SQL query means that you 
will never learn how to properly manipulate a nested associative array (which 
is, frankly, what makes PHP teh awesome).

> Might I make a suggestion to you - no matter which framework/OS project
> you use... Have it be in PHP5.  Yeah it may restrict you in options, but
> that is where PHP is going and to my mind that is what someone new to
> PHP should be learning.

True, and Zend is certainly pushing that hard.  On the other hand, there's 
plenty to learn with PHP 4-era code (although that can certainly be done in 
PHP 5) before introducing advanced topics like magic object callback 
overrides.  Plus, better than 50% of the shared hosts out there today still 
run PHP 4 for a mixture of legit and stupid cop-out reasons.

> You should also make sure to go over security in one of your classes -
> the intro would be my preferred class since security is a mindset as
> well as a way of coding.  And it is easier to create habits then unlearn
> and relearn them.  Just my $0.02

The very very very first code they write after "Hello world" should be a 
secure input wrapper.  Go over ALL the issues with PHP user input *in 
historical context* (register globals, magic quotes, $_REQUEST as evil, why 
you should get out of the global namespace as soon as possible, etc.) and 
have them write code to safely get input from the user regardless of the 
server configuration.  That right there is a good solid challenge, but it 
makes them paranoid from day one, which is how they should be.  It also is 
code they can (and should) then use in all their later projects.

10 points off for every way you find to hack their code. :-)

-- 
Larry Garfield  AIM: LOLG42
[EMAIL PROTECTED]   ICQ: 6817012

"If nature has made any one thing less susceptible than all others of 
exclusive property, it is the action of the thinking power called an idea, 
which an individual may exclusively possess as long as he keeps it to 
himself; but the moment it is divulged, it forces itself into the possession 
of every one, and the receiver cannot dispossess himself of it."  -- Thomas 
Jefferson

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



Re: [PHP] Logical OR in assignment

2006-09-27 Thread Larry Garfield
The single pipe | is bitwise OR, yes.  You're probably thinking of this 
construct:

a = b || c

Which is a valid and common default-value idiom in Python and Javascript, but 
I don't think works in PHP.  (If it does, someone please correct me because 
I'd like to use it. )

On Wednesday 27 September 2006 21:05, Jason Karns wrote:
> I once saw the use of OR (|) in assignment.
>
> $x = $y | $z;
>
> Does this use bitwise OR? I'm trying to see if I could use the above
> expression in place of:
>
> $x = is_null($y) ? $z : $y;
>
> Jason Karns
> ~~~
> The Ohio State University [www.osu.edu]
> Computer Science & Engineering [www.cse.osu.edu]
>
> --
> No virus found in this outgoing message.
> Checked by AVG Free Edition.
> Version: 7.1.405 / Virus Database: 268.12.8/455 - Release Date: 9/22/2006

-- 
Larry Garfield  AIM: LOLG42
[EMAIL PROTECTED]   ICQ: 6817012

"If nature has made any one thing less susceptible than all others of 
exclusive property, it is the action of the thinking power called an idea, 
which an individual may exclusively possess as long as he keeps it to 
himself; but the moment it is divulged, it forces itself into the possession 
of every one, and the receiver cannot dispossess himself of it."  -- Thomas 
Jefferson

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



RE: [PHP] Best open source project/framework to support a php training course?

2006-09-27 Thread Paul Scott

On Thu, 2006-09-28 at 11:47 +1000, Ligaya A. Turmelle wrote:

> Might I make a suggestion to you - no matter which framework/OS project
> you use... Have it be in PHP5.  Yeah it may restrict you in options, but
> that is where PHP is going and to my mind that is what someone new to
> PHP should be learning.  
> 

What you could do, is look at http://avoir.uwc.ac.za and have a look at
our PHP4 and PHP5 frameworks. Both use modular design, both have good
code generation modules, bith are MVC based and both are really easy to
install and learn. There is also excellent tutorial documentation to get
you started on a module of your own!

The PHP4 framework also has the added benefit of being a full fledged
e-learning system (LMS) that you can even use to deliver the courses...

--Paul

All Email originating from UWC is covered by disclaimer 
http://www.uwc.ac.za/portal/uwc2006/content/mail_disclaimer/index.htm 

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

Re: [PHP] reading a remote directory

2006-09-27 Thread Stefan van der Linden

I have to read a directory (on a windows machine) from another box (a
linux machine) and I thought that I could set the handle to the IP
address of the windows box, but that does not work. Do I have to open a
socket or is there another way?

Thanks!


You'll need a webserver to read the directory, as there isn't any program that 
listens
by default. Or you could start up an FTP server and open a connection to that.

Regards,
Stefan van der Linden

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



Re: [PHP] Display dynamic progress bar

2006-09-27 Thread clive




well actually you can , firstly you have some element you can update 
like a text box and then use javascript to up this text box.
what you then do is flush the content to php file generates and spit 
out some javascript to change the text box data


I'm sorry, I should have said "You'll need javascript to do that." Oh 
wait, I did.


tedd
True, I just clarified it a bit , I hope, by adding the info about 
flushing the "javascript updater thing" from your php file.


--
Regards,

Clive

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



[PHP] Wallet based shopping cart

2006-09-27 Thread wizard007

Hi,

I am looking for a shopping cart/member script that will allow members of a
site to purchase credits and then spend their credits on my site. I have
trawled for hours but can't seem to find one anywhere. :-$
Anyone got any ideas???

Frustrated and wanting to move forward!!
-- 
View this message in context: 
http://www.nabble.com/Wallet-based-shopping-cart-tf2349014.html#a6541046
Sent from the PHP - General mailing list archive at Nabble.com.

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



[PHP] Custom Session Handler

2006-09-27 Thread Glenn Richmond
Hi guys,

I couldn't find a developers list, so I hope this is the right list to
post to. I need to create a custom session handler for our PHP server.
We have a memcache server and so want to use that to handle our session
information. I was able to get basic session code working via the custom
PHP user handler, but it has an inherent bug that means that the
following code doesn't work:

session_start();
session_write_close();
session_start();
session_write_close();

The problem is that when write_close is called, it wipes all knowledge
of the custom session handler. It's a documented bug, but hasn't been
fixed as of yet.  So here's what I want to do to resolve this:

I want to write a custom PHP module similar to mod_user that handles the
memcache interface (mod_memcache) because this would avoid the issues of
the handlers being wiped etc...  I've effectively replicated the
mod_user code (but changed it to a blank canvas) and incorporated the
appropriate makefile & configure changes to get it built & I get the
mod_memcache.lo file as an intermediate file. However, when I install
the PHP5 module in apache and set the save handler in the php.ini to
"memcache", it tells me that it can't find the memcache handler?

What's the process for setting up a new (custom) session handler in the
php build?

Thanks in advance,

Glenn.

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