|
Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com |
php-general Digest 7 Feb 2004 03:39:13 -0000 Issue 2575
php-general-digest-help
lists.php.net
Date: Fri Feb 06 2004 - 21:39:13 CST
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
php-general Digest 7 Feb 2004 03:39:13 -0000 Issue 2575
Topics (messages 177018 through 177076):
Re: getting classname of current class
177018 by: Marek Kilimajer
Undefined Index Errors
177019 by: Cameron B. Prince
177023 by: Marek Kilimajer
177024 by: Adam Bregenzer
177025 by: John W. Holmes
177030 by: Cameron B. Prince
Re: thumbnail script
177020 by: Paul Furman
177050 by: David T-G
177060 by: Ryan A
177073 by: David T-G
installing php with pdflib
177021 by: merlin
177028 by: Jason Wong
177034 by: merlin
177035 by: John Nichel
177072 by: merlin
Re: Weired session problem
177022 by: Chris Shiflett
177032 by: Thomas Hochstetter
Re: Pspell Functions!! problem I explain in English
177026 by: Antonio J. Hdez. Blanco
Re: Running Apache in one machine and php in another
177027 by: Brian V Bonini
177071 by: Daniel Guerrier
CMS Question
177029 by: Ashley M. Kirchner
177031 by: Marek Kilimajer
var references
177033 by: Arthur Pelkey
177036 by: Chris W. Parker
177037 by: Arthur Pelkey
beginner question about while loops
177038 by: Paul Furman
177039 by: Eric Gorr
177040 by: Alex Hogan
177041 by: Paul Furman
177042 by: Rob Adams
177043 by: Shaunak Kashyap
177044 by: John W. Holmes
177045 by: Paul Furman
177046 by: John W. Holmes
Re: boolean search class
177047 by: David T-G
PHP/MySQL Tables - CSS and Sortable Columns (Newbie Questions)
177048 by: Freedomware
PHP, Excel, and tab delimited files question
177049 by: Jay Blanchard
177051 by: jon roig
177052 by: Jay Blanchard
177054 by: Marek Kilimajer
177062 by: jon roig
177069 by: Marek Kilimajer
Re: recursive direcotry listing
177053 by: David T-G
Surpressing a 'foreach' Error Message
177055 by: Shaun
177056 by: craig
177057 by: Chris W. Parker
177059 by: craig
177061 by: Chris Edwards
177064 by: John W. Holmes
Re: FreeBSD to Linux -- PHP Issues
177058 by: David T-G
math produces strange characters 
177063 by: Paul Furman
177065 by: Chris W. Parker
177067 by: Paul Furman
177068 by: Chris W. Parker
177070 by: Paul Furman
Re: How can I run php 5 beta 3 on windows?
177066 by: omer katz
Checking if database has been setup
177074 by: Ryan A
177075 by: Joshua D. Drake
Cannot send mail after upgrading to OS X v10.3
177076 by: gohaku
Administrivia:
To subscribe to the digest, e-mail:
php-general-digest-subscribe
lists.php.net
To unsubscribe from the digest, e-mail:
php-general-digest-unsubscribe
lists.php.net
To post to the list, e-mail:
php-general
lists.php.net
----------------------------------------------------------------------
attached mail follows:
Not an answer to your question, but you should not use function names
beginning with 2 underscores (__arr in your case) unless you want to use
special functionality associated with that name (e.g. __construct). This
will avoid possible conflicts with future version of php.
Vivian Steller wrote:
> Hi,
>
> i've just another problem concerning classes, inheritance and the '::'
> Syntax. Take a look at the following example code:
>
> <pre>
> <?php
> class MyClass extends MyParent{
> private $__arr = Array();
>
> public function __construct() {
> $this->__arr("test");
> }
>
> public function __arr($var) {
> array_push($this->__arr, $var);
> }
> }
>
> class MyParent {
> public function getClassname() {
> print("My classname: " . __class__ . "\n");
> print("My classname: " . get_class($this) . "\n");
> }
> }
>
> $obj = new MyClass();
> // print_r($obj);
>
> MyClass::getClassname();
> ?>
> </pre>
>
> Corresponding output:
>
>
>>My classname: MyParent
>>My classname:
>
>
>
> The problem is, that i want MyClass::getClassname() to return "MyClass"?!
>
> Can anybody help me?
>
> Thanks a lot.
> vivi
>
attached mail follows:
Hey guys,
Here's a chunk of code from the top of a multi-function page I converted
from Perl to PHP:
$userid = $_REQUEST['USERID']; # USERID = selected userid
$dlist = $_REQUEST['DLIST']; # DLIST = indicates who to display
$action = $_REQUEST['ACTION']; # ACTION = indicates approval or
denial
$more = $_REQUEST['MORE']; # MORE = ID of person to show
details
$delete = $_REQUEST['DELETE']; # DELETE = indicates to delete user
$ltr = $_REQUEST['LTR']; # LTR = start ltr of last name
$modpwd = $_REQUEST['MODPWD']; # MODPWD = indicates modifying pwd
$expire = $_REQUEST['EXPIRE']; # EXPIRE = indicates to expire pwd
$upduser = $_REQUEST['UPDUSER']; # UPDUSER = indicates user info
updated
$denyuser = $_REQUEST['DENYUSER']; # DENYUSER = indicates user was
denied
$reason = $_REQUEST['REASON']; # REASON = Reason user was denied
$adminID = $_ENV['HTTP_REMOTE_USER'];
I'm creating some strings from array elements obviously. The issue is, the
array elements don't always exist depending on which function you are
running. And when they don't, the server log is full of undefined index
errors. Is there a way I can avoid these errors without adding a
"if(isset(...))" around each one?
Thanks,
Cameron
attached mail follows:
You can either:
1. put
in front of each variable, e.g.
$adminID =
$_ENV['HTTP_REMOTE_USER'];
2. change your error reporting level:
error_reporting(E_ALL ^ E_NOTICE);
Cameron B. Prince wrote:
> Hey guys,
>
> Here's a chunk of code from the top of a multi-function page I converted
> from Perl to PHP:
>
> $userid = $_REQUEST['USERID']; # USERID = selected userid
> $dlist = $_REQUEST['DLIST']; # DLIST = indicates who to display
> $action = $_REQUEST['ACTION']; # ACTION = indicates approval or
> denial
> $more = $_REQUEST['MORE']; # MORE = ID of person to show
> details
> $delete = $_REQUEST['DELETE']; # DELETE = indicates to delete user
> $ltr = $_REQUEST['LTR']; # LTR = start ltr of last name
> $modpwd = $_REQUEST['MODPWD']; # MODPWD = indicates modifying pwd
> $expire = $_REQUEST['EXPIRE']; # EXPIRE = indicates to expire pwd
> $upduser = $_REQUEST['UPDUSER']; # UPDUSER = indicates user info
> updated
> $denyuser = $_REQUEST['DENYUSER']; # DENYUSER = indicates user was
> denied
> $reason = $_REQUEST['REASON']; # REASON = Reason user was denied
>
> $adminID = $_ENV['HTTP_REMOTE_USER'];
>
> I'm creating some strings from array elements obviously. The issue is, the
> array elements don't always exist depending on which function you are
> running. And when they don't, the server log is full of undefined index
> errors. Is there a way I can avoid these errors without adding a
> "if(isset(...))" around each one?
>
> Thanks,
> Cameron
>
attached mail follows:
On Fri, 2004-02-06 at 10:51, Cameron B. Prince wrote:
> I'm creating some strings from array elements obviously. The issue is, the
> array elements don't always exist depending on which function you are
> running. And when they don't, the server log is full of undefined index
> errors. Is there a way I can avoid these errors without adding a
> "if(isset(...))" around each one?
If you know which variables are required per 'function' that is being
called wrap an if around these variable declarations in blocks. You
will still have ifs, but you should have a lot fewer. If by function
you mean actual functions then you could move these lines to the top of
their respective functions.
--
Adam Bregenzer
adam
bregenzer.net
http://adam.bregenzer.net/
attached mail follows:
From: "Cameron B. Prince" <cprince
rideware.com>
> I'm creating some strings from array elements obviously. The issue is, the
> array elements don't always exist depending on which function you are
> running. And when they don't, the server log is full of undefined index
> errors. Is there a way I can avoid these errors without adding a
> "if(isset(...))" around each one?
Adjust your error_reporting() level so these notices don't show up.
---John Holmes...
attached mail follows:
> 1. put
in front of each variable, e.g.
> $adminID =
$_ENV['HTTP_REMOTE_USER'];
This worked very nicely...
Thank you!
> > Hey guys,
> >
> > Here's a chunk of code from the top of a multi-function page I converted
> > from Perl to PHP:
> >
> > $userid = $_REQUEST['USERID']; # USERID = selected userid
> > $dlist = $_REQUEST['DLIST']; # DLIST = indicates who
> to display
> > $action = $_REQUEST['ACTION']; # ACTION = indicates approval or
> > denial
> > $more = $_REQUEST['MORE']; # MORE = ID of person to show
> > details
> > $delete = $_REQUEST['DELETE']; # DELETE = indicates to
> delete user
> > $ltr = $_REQUEST['LTR']; # LTR = start ltr of last name
> > $modpwd = $_REQUEST['MODPWD']; # MODPWD = indicates
> modifying pwd
> > $expire = $_REQUEST['EXPIRE']; # EXPIRE = indicates to
> expire pwd
> > $upduser = $_REQUEST['UPDUSER']; # UPDUSER = indicates user info
> > updated
> > $denyuser = $_REQUEST['DENYUSER']; # DENYUSER = indicates user was
> > denied
> > $reason = $_REQUEST['REASON']; # REASON = Reason user
> was denied
> >
> > $adminID = $_ENV['HTTP_REMOTE_USER'];
> >
> > I'm creating some strings from array elements obviously. The
> issue is, the
> > array elements don't always exist depending on which function you are
> > running. And when they don't, the server log is full of undefined index
> > errors. Is there a way I can avoid these errors without adding a
> > "if(isset(...))" around each one?
> >
> > Thanks,
> > Cameron
> >
attached mail follows:
Jason Wong wrote:
>
>
> manual > imagejpeg() & siblings
You could take a look at the source code for "gallery" for more ideas.
Google gallery php or something like that.
attached mail follows:
Ryan --
...and then Ryan A said...
%
% Hi,
% Anybody know of a thumbnail script which does either one of the following:
[snip]
Why, yes. I call it
http://web-folio.net/
and it does everything for which you ask and then some. Just send all of
your clients to host with me and I'll give you a commission ;-)
OK... Having spent quite a bit of time developing our gallery script
and a bit of looking around at competition, I haven't seen anything that
comes close. In general, though, it's not too tough to check your source
files and both make the thumbnails and generate their image tags to
output in the page.
HTH & HAND & Good luck!
:-D
--
David T-G * There is too much animal courage in
(play) davidtg
justpickone.org * society and not sufficient moral courage.
(work) davidtgwork
justpickone.org -- Mary Baker Eddy, "Science and Health"
http://justpickone.org/davidtg/ Shpx gur Pbzzhavpngvbaf Qrprapl Npg!
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (FreeBSD)
iD8DBQFAJAoTGb7uCXufRwARArYKAJ9Md6upiwZe2UrpUtcyzHIZ8jnIPwCbB10S
k78retmu4Wlt7imNuUeSNqE=
=09mA
-----END PGP SIGNATURE-----
attached mail follows:
Hey David (my pal with the funny % prefix to replies...:-p )
Thanks for replying.
> Why, yes. I call it
> http://web-folio.net/
Nice name.
> and it does everything for which you ask and then some.
Kewl, is it free and can i download it and use it on my website?
> Just send all of
> your clients to host with me and
> I'll give you a commission ;-)
Damn, that answers my question, its not free and I cant download and use it
on my website (wahhhh)
On a more serious note, nice site mate, but realllly steep on the pocket,
$250 setup fee? my pal sets up
computers and furnature for a lot less, and $25 a month for 100mb space? I
know porn friendly sites that
charge less and offer more. Reading prices like that made my right hand jump
for the mouse and find the little
x at the top right of my browser and made me reach for a coke because of the
fright I got! :-D
I'm pretty sure you wont get anyone off the list purchasing an account and
there are a lot of people out there
who pay more for _total_ crap, and your service is good.... so....best of
luck and hope it goes well.
> OK... Having spent quite a bit of time developing our gallery script
> and a bit of looking around at competition, I haven't
> seen anything that
> comes close.
This sort of an app never really did cross my mind...so i dont know what
your compettion is like, have a couple
of urls? I promise i wont join any of them :-p
> In general, though, it's not too tough to check your source
> files and both make the thumbnails and generate their image tags to
> output in the page.
Yeah, thats what i have been told on the list and off, but I have never
really worked with GD + the image functions
and it seems better to first look around to see if anyone already made this
rather than to try to invent the wheel all over
again, although I agree with Justin saying that while "remaking the wheel"
you will understand the code better and it will
be more specific to your needs. Another problem is I have GD 1 on one server
and GD 2 on another...
I did get a few really helpful souls off the list who sent me code, mainly
for jpg stuff, will try that out.
> HTH & HAND & Good luck!
Sure did, and the same to you dude.
Cheers,
-Ryan
attached mail follows:
Ryan, et al --
...and then Ryan A said...
%
% Hey David (my pal with the funny % prefix to replies...:-p )
Hi, Ryan (my ex-logo-drawing-buddy with the non-threading mailer ;-)
% Thanks for replying.
Sure thing.
%
% > Why, yes. I call it
% > http://web-folio.net/
%
% Nice name.
Thanks!
%
% > and it does everything for which you ask and then some.
% Kewl, is it free and can i download it and use it on my website?
Heh :-) We're selling a service, dude.
%
% > Just send all of
% > your clients to host with me and
% > I'll give you a commission ;-)
%
% Damn, that answers my question, its not free and I cant download and use it
% on my website (wahhhh)
Yep.
%
% On a more serious note, nice site mate, but realllly steep on the pocket,
% $250 setup fee? my pal sets up
It's a start. We can see if the market dictates a change.
% computers and furnature for a lot less, and $25 a month for 100mb space? I
% know porn friendly sites that
% charge less and offer more. Reading prices like that made my right hand jump
Ah, but it's not just some space we're offering. Go back and look again
(and then please tell me how you missed it and what needs to clarified,
because it's supposed to be obvious :-)
Think like a person definitely *not* on this list. Your average realtor,
interior designer, quilter, flower arranger, jewelry maker, painter, or
whomever won't know the first thing (well, perhaps, but not the second
thing!) about how to put files on a web site or lay out web pages or even
what goes into making a web page.
What we do is make it incredibly easy to upload and manage pictures,
automatically handle the thumbnailing and layout into pages, and give you
plenty of space to do it (100M holds about 500 pix). I know dozens of
realtors who each paid $1k for a template site (no indivduality there!)
with a glamour shot, a couple of buttons, and maybe another picture.
Then they pay $700/yr for basic hosting with no extras. Meanwhile, they
don't know how to put up pictures, so they have to find students or,
worse yet, pay geeks to upload pictures -- and then they only get room
for a dozen or so.
In the small business market where people want reliable hosting with no
worries just like anyone else but don't have a budget for a designer and
a big hosting company, $25/mo is cheap. At least, that's the plan ;-)
% for the mouse and find the little
% x at the top right of my browser and made me reach for a coke because of the
% fright I got! :-D
*grin*
% I'm pretty sure you wont get anyone off the list purchasing an account and
% there are a lot of people out there
Well, maybe not, but we're not really targeting the people here. I know
that I can't compete on raw price (I don't have the investment capital to
create a data center that can handle the volume of customers that it would
take to do that), and I don't want to sell geeks because I've seen how
demanding and bothersome I am :-)
The value definitely has to be in the service.
% who pay more for _total_ crap, and your service is good.... so....best of
% luck and hope it goes well.
Thanks; we do, too.
%
%
% > OK... Having spent quite a bit of time developing our gallery script
% > and a bit of looking around at competition, I haven't
% > seen anything that
% > comes close.
%
% This sort of an app never really did cross my mind...so i dont know what
% your compettion is like, have a couple
% of urls? I promise i wont join any of them :-p
I don't have 'em handy, I'm afraid. Check hotscripts and the like for
any gallery or thumbnail script.
%
% > In general, though, it's not too tough to check your source
% > files and both make the thumbnails and generate their image tags to
% > output in the page.
%
% Yeah, thats what i have been told on the list and off, but I have never
% really worked with GD + the image functions
Bah. Nor have I; I use ImageMagick :-)
% and it seems better to first look around to see if anyone already made this
% rather than to try to invent the wheel all over
That's a good approach, and a good way to get started quickly. It can
bite you in the long run, though.
% again, although I agree with Justin saying that while "remaking the wheel"
% you will understand the code better and it will
% be more specific to your needs. Another problem is I have GD 1 on one server
% and GD 2 on another...
This is also a good approach, and it can still end up biting you as you
grow, so I'm all for the former and then for rewriting from scratch for
version two :-)
%
% I did get a few really helpful souls off the list who sent me code, mainly
% for jpg stuff, will try that out.
That's why we're all here :-)
%
% > HTH & HAND & Good luck!
%
% Sure did, and the same to you dude.
Thanks :-)
%
% Cheers,
% -Ryan
%
HAND
:-D
--
David T-G * There is too much animal courage in
(play) davidtg
justpickone.org * society and not sufficient moral courage.
(work) davidtgwork
justpickone.org -- Mary Baker Eddy, "Science and Health"
http://justpickone.org/davidtg/ Shpx gur Pbzzhavpngvbaf Qrprapl Npg!
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (FreeBSD)
iD8DBQFAJE87Gb7uCXufRwARAldRAJ9BsBqDaQWVQFKZYzVAtgOui6aKaQCgi5IG
7CRJtI4xdmu0ICTo4vBmn+s=
=0y2G
-----END PGP SIGNATURE-----
attached mail follows:
Hi there,
after crashing my linux machine I do have to reinstall php.
Somehow I can't figure out how I installed php with pdflib. It is
perfectly running on my live system.
I tryed to just copy the files from the other server and run --
with-pdflib like in the other config command, but it did not work out.
Then I downloaded the source from pdflib.com and tryed this:
'--with-pdflib-dir=/usr/lib/pdflib5'
Did not work as well.
Can anybody give me a hint how to solve this?
Thanx,
Merlin
attached mail follows:
On Friday 06 February 2004 23:51, merlin wrote:
> Somehow I can't figure out how I installed php with pdflib. It is
> perfectly running on my live system.
>
> I tryed to just copy the files from the other server and run --
> with-pdflib like in the other config command, but it did not work out.
>
> Then I downloaded the source from pdflib.com and tryed this:
> '--with-pdflib-dir=/usr/lib/pdflib5'
It seems that v5.x of the pdflib has a different (and seemingly more complex)
installation procedure to that of 4.x.
The installation instructions for 5.x discourages you from installing from
source and suggests that you install from the pre-built binaries.
As I haven't had time to figure out how to install 5.x yet I decided to stick
with one of the 4.x releases.
So if there's nothing compelling in 5.x that you need then you could just use
one of the 4.x versions as installation of those are straightforward:
Extract the tarball
./configure
make
make test
make install
Then add '--with-pdflib=/usr/local' in your php ./configure command.
--
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
------------------------------------------
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
------------------------------------------
/*
A jury consists of twelve persons chosen to decide who has the better lawyer.
-- Robert Frost
*/
attached mail follows:
Hi Jason,
I just need 3.x since this is the version on my live server. However, I
cant find any 4.x or 3.x version of pdflib
on pdflib.com there is a free version called pdflib lite. Pdflib 5.x
costs over 400$. I do not need 5.x, just basic pdf generating.
Can you point me to a download place for 4.x?
merlin
Jason Wong schrieb:
> On Friday 06 February 2004 23:51, merlin wrote:
>
>
>>Somehow I can't figure out how I installed php with pdflib. It is
>>perfectly running on my live system.
>>
>>I tryed to just copy the files from the other server and run --
>>with-pdflib like in the other config command, but it did not work out.
>>
>>Then I downloaded the source from pdflib.com and tryed this:
>>'--with-pdflib-dir=/usr/lib/pdflib5'
>
>
> It seems that v5.x of the pdflib has a different (and seemingly more complex)
> installation procedure to that of 4.x.
>
> The installation instructions for 5.x discourages you from installing from
> source and suggests that you install from the pre-built binaries.
>
> As I haven't had time to figure out how to install 5.x yet I decided to stick
> with one of the 4.x releases.
>
> So if there's nothing compelling in 5.x that you need then you could just use
> one of the 4.x versions as installation of those are straightforward:
>
> Extract the tarball
> ./configure
> make
> make test
> make install
>
> Then add '--with-pdflib=/usr/local' in your php ./configure command.
>
attached mail follows:
merlin wrote:
> Hi Jason,
>
> I just need 3.x since this is the version on my live server. However, I
> cant find any 4.x or 3.x version of pdflib
>
> on pdflib.com there is a free version called pdflib lite. Pdflib 5.x
> costs over 400$. I do not need 5.x, just basic pdf generating.
>
> Can you point me to a download place for 4.x?
>
> merlin
You have to jump thru hoops to get them (the pdflib people) to send it
to you, and it took me forever to find it a few months ago. So, to save
you the trouble I had to go thru....
http://www.by-tor.com/downloads/temp/pdflib-4.0.3.tar.gz
Because I'm a great guy. ;)
--
By-Tor.com
It's all about the Rush
http://www.by-tor.com
attached mail follows:
thanx guys, that has worked perfectly!
Cheers,
Merlin
John Nichel schrieb:
> merlin wrote:
>
>> Hi Jason,
>>
>> I just need 3.x since this is the version on my live server. However,
>> I cant find any 4.x or 3.x version of pdflib
>>
>> on pdflib.com there is a free version called pdflib lite. Pdflib 5.x
>> costs over 400$. I do not need 5.x, just basic pdf generating.
>>
>> Can you point me to a download place for 4.x?
>>
>> merlin
>
>
> You have to jump thru hoops to get them (the pdflib people) to send it
> to you, and it took me forever to find it a few months ago. So, to save
> you the trouble I had to go thru....
>
> http://www.by-tor.com/downloads/temp/pdflib-4.0.3.tar.gz
>
> Because I'm a great guy. ;)
>
attached mail follows:
--- Thomas Hochstetter <fisherofmen
gmx.net> wrote:
> i am using the $_SESSION array to retrieve info of users. At times,
> however, it just retrieves the wrong info, i.e. info from another user.
> how is that?
You need to provide some details. What is your exact method of testing?
What is the exact result? What is the smallest example script that you can
provide that demonstrates the problem?
Chris
=====
Chris Shiflett - http://shiflett.org/
PHP Security - O'Reilly
Coming mid-2004
HTTP Developer's Handbook - Sams
http://httphandbook.org/
attached mail follows:
Hey,
I am having users sign in on a index.php which directs them to the members
page (same: index.php). There i have links that open small windows via js.
These have session_start() in them to continue the same session variable.
Then there i would have something like:
[snip]
$tusr = $_SESSION['fn'] . " " . $_SESSION['ln'];
or
sendReceived( $_POST['title'], $_POST['tusr'], $_SESSION['email'] );
[/snip]
So it is supposed to get the right info from the current sesssion with which
one logged in.
Thomas
attached mail follows:
Hi Adams,
> Reading the manual[1] on pspell I notice at the top it says this
> function is not supported in windows.
I have read the manual several times, and also usr contributed notes where
Elizabeth, explains the installation in w2k.
I does she explained, but no work.
>However if you really do have a
> pspell library for windows that somehow came with 4.3.3 and isn't
> working with 4.3.4 you may be able to change your php.ini file to load
> the extension[2] but I doubt it.
But the problem persists, since comprobe the dinamic load by means of the
function print_r(get_loaded_extensions());
and it shows that library php_pspell.dll is loaded,
and this to me means that php.ini this good.
By that as is not the problem, if continuous will prove in * nix.
thank you very much
antonio,
PD: you said the very TRUE " We may not speak many languages but the php
manual does :)"
attached mail follows:
On Fri, 2004-02-06 at 13:57, Mrs. Geeta Thanu wrote:
> Hi all,
>
> I have configured Apache webserver executing PHP scripts on sun machine
> and everything is working fine.
>
> Now I want the web server to pass on the PHP executions to
> another machine and once done should get the result and display it.
>
> Is it possible .
>
Sure.
xml/rpc would be one possibility.
--
Brian GnuPG -> KeyID: 0x04A4F0DC | URL: www.gfx-design.com/keys
Key Server: pgp.mit.edu
======================================================================
gpg --keyserver pgp.mit.edu --recv-keys 04A4F0DC
GnuPG: http://gnupg.org
http://www.biglumber.com/x/web?qs=0x2C35011004A4F0DC
Linux Registered User #339825 at http://counter.li.org
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (GNU/Linux)
iD8DBQBAI77kLDUBEASk8NwRAn3cAJ9NtTYvLyW0sUvmO6ZLVYBfajGwbgCgrTzo
j/Rr36O0xYIfYcZTjX53qmU=
=nUtg
-----END PGP SIGNATURE-----
attached mail follows:
Make it a web service and use SOAP or XML-RPC
http://phpsoaptoolkit.sourceforge.net/phpsoap/
--- "Mrs. Geeta Thanu" <geeta
www.cdfd.org.in> wrote:
> Hi Jason,
> Thank you for your reply.
> This is an requirement in bioinformatics lab where
> they want to submit a
> huge genome sequence as a input to a program ( say
> in c) and get the
> result and display.
>
> Now i want this c program in another high end
> machine because it needs
> lot of computations, which is not possible in sun
> machine where i
> installed apache+PHP.
>
> Now I want the PHP script, like CGI has to get the
> genome from the browser
> of a user and send to the machine where C program is
> running and again get
> the results and show as output.
>
> Please reply whether this is possible.
>
> Thank u
> Geetha
>
> On Fri, 6 Feb 2004, Jason Wong wrote:
>
> > On Saturday 07 February 2004 02:57, Mrs. Geeta
> Thanu wrote:
> >
> > > I have configured Apache webserver executing PHP
> scripts on sun machine
> > > and everything is working fine.
> > >
> > > Now I want the web server to pass on the PHP
> executions to
> > > another machine and once done should get the
> result and display it.
> > >
> > > Is it possible .
> >
> > Depends on what you really want to do. What
> problem are you trying to solve?
> >
> > --
> > Jason Wong -> Gremlins Associates ->
> www.gremlins.biz
> > Open Source Software Systems Integrators
> > * Web Design & Hosting * Internet & Intranet
> Applications Development *
> > ------------------------------------------
> > Search the list archives before you post
> > http://marc.theaimsgroup.com/?l=php-general
> > ------------------------------------------
> > /*
> > The trouble with computers is that they do what
> you tell them, not what
> > you want.
> > -- D. Cohen
> > */
> >
> > --
> > 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
>
__________________________________
Do you Yahoo!?
Yahoo! Finance: Get your refund fast by filing online.
http://taxes.yahoo.com/filing.html
attached mail follows:
Does anyone know of any open source, document management type CMS?
Basically what we need is a way to keep documents stored and available
online for download/print. Most of these documents are currently in
printed form (hard copy,) so they'll get scanned in and then uploaded as
gifs or jpgs (unless I find people who are willing to actually retype it
all, but I doubt that.) opensourcecms.com doesn't specifically list
any, and I'm going through the list of what's available on there right
now, but they also don't include everything, so I thought I'd throw out
a question to the rest of the world...
--
W | I haven't lost my mind; it's backed up on tape somewhere.
+--------------------------------------------------------------------
Ashley M. Kirchner <mailto:ashley
pcraft.com> . 303.442.6410 x130
IT Director / SysAdmin / WebSmith . 800.441.3873 x130
Photo Craft Laboratories, Inc. . 3550 Arapahoe Ave. #6
http://www.pcraft.com ..... . . . Boulder, CO 80303, U.S.A.
attached mail follows:
You should search for php document management system, not cms. I quickly
found http://terracotta.sourceforge.net/ and
http://dms.markuswestphal.de/about.html
Ashley M. Kirchner wrote:
>
> Does anyone know of any open source, document management type CMS?
> Basically what we need is a way to keep documents stored and available
> online for download/print. Most of these documents are currently in
> printed form (hard copy,) so they'll get scanned in and then uploaded as
> gifs or jpgs (unless I find people who are willing to actually retype it
> all, but I doubt that.) opensourcecms.com doesn't specifically list
> any, and I'm going through the list of what's available on there right
> now, but they also don't include everything, so I thought I'd throw out
> a question to the rest of the world...
>
attached mail follows:
I have the following:
<?php
include('../../../db2.php');
$blat = $tue_5a;
$result = mysql_query("SELECT * FROM classes WHERE c_d_tue='1' AND
c_s_tue_1_hr='5' AND c_s_tue_1_dn='am'");
while($row = mysql_fetch_array($result)) {
switch($blat) {
case tue_5a:
$min_1 = $row[29];
break;
}
?>
class title:<br><input type="text" value="<? echo "$row[c_title]";
?>"></input><br>
class minute:<br><input type="text" value="<? echo "$min_1";
?>"></input><br>
class description:<br><textarea><? echo "$row[c_desc]"; ?></textarea><br>
<?
}
?>
Why can I not refence the row[29] from min_1? ive tried various ways and
nothing shows up unless i actually put the assoc array value. Any ideas?
It should display "50".
attached mail follows:
Arthur Pelkey <mailto:apelkey
northeastquality.com>
on Friday, February 06, 2004 9:46 AM said:
> $blat = $tue_5a;
[snip]
> while($row = mysql_fetch_array($result)) {
> switch($blat) {
> case tue_5a:
> $min_1 = $row[29];
> break;
> }
[snip]
> Why can I not refence the row[29] from min_1? ive tried various ways
> and nothing shows up unless i actually put the assoc array value. Any
> ideas?
i think you forgot your $ in front of the tue_5a in 'case tue_5a'?
otherwise the way you are using tue_5a the second time, appears to be a
constant and not a string or a regular variable.
hth,
chris.
attached mail follows:
Thanks!, my syntax was a bit off, havn't had much sleep, but it kept
slipping by me ;)
Chris W. Parker wrote:
> Arthur Pelkey <mailto:apelkey
northeastquality.com>
> on Friday, February 06, 2004 9:46 AM said:
>
>
>>$blat = $tue_5a;
>
>
> [snip]
>
>
>>while($row = mysql_fetch_array($result)) {
>> switch($blat) {
>> case tue_5a:
>> $min_1 = $row[29];
>> break;
>> }
>
>
> [snip]
>
>
>>Why can I not refence the row[29] from min_1? ive tried various ways
>>and nothing shows up unless i actually put the assoc array value. Any
>>ideas?
>
>
> i think you forgot your $ in front of the tue_5a in 'case tue_5a'?
> otherwise the way you are using tue_5a the second time, appears to be a
> constant and not a string or a regular variable.
>
>
>
> hth,
> chris.
>
>
>
attached mail follows:
Totally ignorant need for clarification... Should I set up a counter for
loops $integer++ or if I'm going through something, the while function
knows to just go through those and fills in array numbers accordingly?
Below is my project (while loop at the bottom):
I'm getting unexpected $end on line 18 but the file only has 17 lines!
<?php
if (isset ($_REQUEST ['IMGDIR'])){
$imagedir=$_REQUEST ['IMG_DIR'];
} else {
$imagedir = PUB_DIR . '/grasses';
#PUB_DIR coordinates my public htm location at home & school
}
if (!(chdir ($imagedir))){
print "invalid directory";
}
$fh=opendir($imagedir);
while ($file = readdir($dh)){
if (strstr ($file, '.jpg')){
$pictures[] = $file;
}
#vardump ($pictures[]);
?>
attached mail follows:
At 11:41 AM -0800 2/6/04, Paul Furman wrote:
> while ($file = readdir($dh)){
> if (strstr ($file, '.jpg')){
> $pictures[] = $file;
> }
Spotted this problem when staring at your code.
Number of open braces: 2
Number of close braces: 1
You need to close off your while loop.
>Should I set up a counter for loops $integer++ or if I'm going
>through something
You can if you like, but it is not necessary in this case.
>the while function knows to just go through those and fills in array
>numbers accordingly?
The while function has nothing to do with it. Using the syntex
$array[] simply adds an element onto the _end_ of the array and PHP
picks the next logical, numerical index.
attached mail follows:
You didn't close your loop;
while ($file = readdir($dh)){
if (strstr ($file, '.jpg')){
$pictures[] = $file;
}
#vardump ($pictures[]);
} <= here....
?>
instead of;
while ($file = readdir($dh)){
if (strstr ($file, '.jpg')){
$pictures[] = $file;
}
#vardump ($pictures[]);
?>
alex
> -----Original Message-----
> From: Paul Furman [mailto:paul
edgehill.net]
> Sent: Friday, February 06, 2004 1:41 PM
> To: php-general
lists.php.net
> Subject: [PHP] beginner question about while loops
>
> Totally ignorant need for clarification... Should I set up a counter for
> loops $integer++ or if I'm going through something, the while function
> knows to just go through those and fills in array numbers accordingly?
>
> Below is my project (while loop at the bottom):
>
> I'm getting unexpected $end on line 18 but the file only has 17 lines!
>
> <?php
> if (isset ($_REQUEST ['IMGDIR'])){
> $imagedir=$_REQUEST ['IMG_DIR'];
> } else {
> $imagedir = PUB_DIR . '/grasses';
> #PUB_DIR coordinates my public htm location at home & school
> }
> if (!(chdir ($imagedir))){
> print "invalid directory";
> }
> $fh=opendir($imagedir);
> while ($file = readdir($dh)){
> if (strstr ($file, '.jpg')){
> $pictures[] = $file;
> }
> #vardump ($pictures[]);
> ?>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
******************************************************************
The contents of this e-mail and any files transmitted with it are
confidential and intended solely for the use of the individual or
entity to whom it is addressed. The views stated herein do not
necessarily represent the view of the company. If you are not the
intended recipient of this e-mail you may not copy, forward,
disclose, or otherwise use it or any part of it in any form
whatsoever. If you have received this e-mail in error please
e-mail the sender.
******************************************************************
attached mail follows:
Eric Gorr wrote:
>
>> the while function knows to just go through those and fills in array
>> numbers accordingly?
>
>
> The while function has nothing to do with it. Using the syntax $array[]
> simply adds an element onto the _end_ of the array and PHP picks the
> next logical, numerical index.
OK thanks guys, I got the missing curly brace & some other messes.
So when assigning values to an array inside a loop, it knows to advance
to the next but then if I want to print those out at the same time, it's
complaining
while ($file = readdir($fh)){
if (strstr ($file, '.jpg')){
$pictures[] = $file;
#print $pictures[]; #Fatal error: Cannot use [] for reading
}
var_dump ($pictures[]); #Fatal error: Cannot use [] for reading
}
This one works but complains about Undefined variable: pictures NULL
array (but it dumps the contents of $pictures[]:
while ($file = readdir($fh)){
if (strstr ($file, '.jpg')){
$pictures[] = $file;
}
var_dump ($pictures);
}
attached mail follows:
"Paul Furman" <paul
edgehill.net> wrote in message
news:20040206200812.52972.qmail
pb1.pair.com...
> Eric Gorr wrote:
[snip]
>
> while ($file = readdir($fh)){
> if (strstr ($file, '.jpg')){
> $pictures[] = $file;
> #print $pictures[]; #Fatal error: Cannot use [] for reading
Which element are you trying to print? I'm guessing the current one, so
just use:
print $file;
> }
> var_dump ($pictures[]); #Fatal error: Cannot use [] for reading
> }
>
>
>
> This one works but complains about Undefined variable: pictures NULL
> array (but it dumps the contents of $pictures[]:
>
> while ($file = readdir($fh)){
> if (strstr ($file, '.jpg')){
> $pictures[] = $file;
> }
> var_dump ($pictures);
> }
attached mail follows:
1. Using [] creates a new array element. Hence the error. You can try this
piece of code inside the loop
[code]
if (strstr ($file, '.jpg')){
$refPictures = & $pictures[];
$refPictures = $file;
print $refPictures;
}
[/code]
$refPictures holds a reference to the newly created element of the $pictures
array. Therefore, by assigning $file to $refPictures, $file is actually
getting assigned to the newly created element of the $pictures array. The
same logic applies in the print statement
2. Again, using [] in the var_dump indicates that you are trying to create a
new element of the $pictures array. If dumping the contents of the entire
array along with their data types and such is what you are trying to
achieve, the correct syntax is
[code]
var_dump($pictures);
[/code]
> -----Original Message-----
> From: Paul Furman [mailto:paul
edgehill.net]
> Sent: Friday, February 06, 2004 3:09 PM
> To: php-general
lists.php.net
> Subject: Re: [PHP] beginner question about while loops
>
>
> Eric Gorr wrote:
> >
> >> the while function knows to just go through those and fills in array
> >> numbers accordingly?
> >
> >
> > The while function has nothing to do with it. Using the syntax $array[]
> > simply adds an element onto the _end_ of the array and PHP picks the
> > next logical, numerical index.
>
>
> OK thanks guys, I got the missing curly brace & some other messes.
>
> So when assigning values to an array inside a loop, it knows to advance
> to the next but then if I want to print those out at the same time, it's
> complaining
>
> while ($file = readdir($fh)){
> if (strstr ($file, '.jpg')){
> $pictures[] = $file;
> #print $pictures[]; #Fatal error: Cannot use [] for reading
> }
> var_dump ($pictures[]); #Fatal error: Cannot use [] for reading
> }
>
>
>
> This one works but complains about Undefined variable: pictures NULL
> array (but it dumps the contents of $pictures[]:
>
> while ($file = readdir($fh)){
> if (strstr ($file, '.jpg')){
> $pictures[] = $file;
> }
> var_dump ($pictures);
> }
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
attached mail follows:
----- Original Message -----
From: "Paul Furman" <paul
edgehill.net>
> Totally ignorant need for clarification... Should I set up a counter for
> loops $integer++ or if I'm going through something, the while function
> knows to just go through those and fills in array numbers accordingly?
[snip]
> while ($file = readdir($dh)){
> if (strstr ($file, '.jpg')){
> $pictures[] = $file;
> }
With this syntax, you do not need to keep an $integer variable for the array
key. When you use $array[] = "something", it just assigns that value to the
next available numeric key.
while ($file = readdir($dh)){
if (strstr ($file, '.jpg')){
$pictures[$int++] = $file;
}
Would also be correct, if you wanted to keep the count yourself. You could
also use array_push().
Just make sure $pictures is defined as an array before you try to push a
value onto it (even using the method you have now), otherwise you'll get a
warning.
---John Holmes...
attached mail follows:
OK thanks again for helping through the stumbling blocks... I'm rolling
again now.
John W. Holmes wrote:
>
> Just make sure $pictures is defined as an array before you try to push a
> value onto it (even using the method you have now), otherwise you'll get a
> warning.
It seems to be working fine this way without defining it as an array but
I guess other languages would not accept that approach.
while ($file = readdir($dh)){
if (strstr ($file, '.jpg')){
$pictures[] = $file;
}
attached mail follows:
From: "Paul Furman" <paul
edgehill.net>
> So when assigning values to an array inside a loop, it knows to advance
> to the next but then if I want to print those out at the same time, it's
> complaining
>
> while ($file = readdir($fh)){
> if (strstr ($file, '.jpg')){
> $pictures[] = $file;
> #print $pictures[]; #Fatal error: Cannot use [] for reading
> }
> var_dump ($pictures[]); #Fatal error: Cannot use [] for reading
> }
Can't do that, like it says. You just assigned $file to $print.. so just
display the value of $file.
---John Holmes...
attached mail follows:
Ray, et al --
...and then Ray Hunter said...
%
% On Fri, 2004-02-06 at 06:47, David T-G wrote:
% > Very, very simple stuff. The list of directories and files is held in an
%...
% That is simple enough, however, I dont see much flexibility in it with
Just between you and me, I tend to agree, but at this point we don't need
flexibility.
% searching. So you are doing searching on directories and file names
Not quite; the serialized array *does* contain the directory list.
Imagine
$tree =
(
[0] =>
(
[0] => ./d1 ,
[1] => ./d2 ,
[2] => ./d2/s1 ,
[3] => ./d2/s1/s2 ,
) ,
[1] =>
(
[0] => ./d1/f1 ,
[0] => ./d1/f2 ,
[1] => ./d2/f3 ,
[1] => ./d2/f4 ,
[1] => ./d2/f5 ,
[2] => ./d2/s1/f6 ,
[3] => ./d2/s1/s2/f7 ,
[3] => ./d2/s1/s2/f8 ,
)
)
or so. Now my input is 'd1' or 'f2' or even 'd1 f2' or such.
% based on what is in the serialized array? Will you need to search the
% document in the near future?
Presumably; this is a way to look through a directory tree and return
pointers to those that match. Typically we'll have an array of 20 or 30
directories; often we'll have maybe 100; on rare occasion we might have
250 or more.
%
% Lucene has that logic in it. However, not sure if lucene is the way to
% go. It will work for what you are doing. However, it might be an
OK; I'll at least read up on it. Thanks!
% overkill depending on how many files you are searching on. You might be
% able to write a regexep using preg_match that will return what you are
% looking for.
Probably, but I'm more worried about handling some wacky input like
(this or that) and the and (ot or her)
or something wonky. So I could always kick back a "no way, buddy!" error
but I don't want to throw up all over everything getting confused by it.
%
% --
% Ray
Thanks & HAND
:-D
--
David T-G * There is too much animal courage in
(play) davidtg
justpickone.org * society and not sufficient moral courage.
(work) davidtgwork
justpickone.org -- Mary Baker Eddy, "Science and Health"
http://justpickone.org/davidtg/ Shpx gur Pbzzhavpngvbaf Qrprapl Npg!
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (FreeBSD)
iD8DBQFAJAegGb7uCXufRwARAo2NAJ90YUeGDBjVkaHPOnJaaLVvjcqGEwCeKnHp
HYeeze+IOLGoZsy43DqImmg=
=lmPw
-----END PGP SIGNATURE-----
attached mail follows:
I posted three questions at
http://geowebworks.geobop.org/test/php/notes.php, if anyone is willing
to take a look.
You could reply on this list or via the e-mail address on the URL above.
Thanks!
attached mail follows:
In many of our apps we save tab delimited text files to be later opened
from the browser using the following set of headers;
header("Content-Type: application/vnd.ms-excel");
header("Content-Disposition: inline; filename=\"excel.xls\"");
header("Expires: 0");
header("Cache-Control: must-revalidate post-check=0 pre-check=0");
However, fields that start with 0 (zero) generally drop the zero so that
0201 becomes 201 (which is not correct for our purposes). Does anyone
know a quick way to specify in the header to make it text only?
TIA!
attached mail follows:
Don't do it in the header, but in the field itself just put a ' before
the first character and excel will interpret it as a text field.
-- jon
-------------------
jon roig
web developer
email: jon
trafficdesigns.com
phone: 888.230.7557
-----Original Message-----
From: Jay Blanchard [mailto:jay.blanchard
niicommunications.com]
Sent: Friday, February 06, 2004 2:40 PM
To: php-general
lists.php.net
Subject: [PHP] PHP, Excel, and tab delimited files question
In many of our apps we save tab delimited text files to be later opened
from the browser using the following set of headers;
header("Content-Type: application/vnd.ms-excel");
header("Content-Disposition: inline; filename=\"excel.xls\"");
header("Expires: 0");
header("Cache-Control: must-revalidate post-check=0 pre-check=0");
However, fields that start with 0 (zero) generally drop the zero so that
0201 becomes 201 (which is not correct for our purposes). Does anyone
know a quick way to specify in the header to make it text only?
TIA!
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.572 / Virus Database: 362 - Release Date: 1/27/2004
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.572 / Virus Database: 362 - Release Date: 1/27/2004
attached mail follows:
[snip]
Don't do it in the header, but in the field itself just put a ' before
the first character and excel will interpret it as a text field.
[/snip]
Tried that, the ' shows up. Don't want that to happen
attached mail follows:
Do double quotes around help?
Jay Blanchard wrote:
> [snip]
> Don't do it in the header, but in the field itself just put a ' before
> the first character and excel will interpret it as a text field.
> [/snip]
>
> Tried that, the ' shows up. Don't want that to happen
>
attached mail follows:
Nah... Try it in excel itself and you'll see what I'm talking about. You
have to do it in numeric fields.
Do this in an excel field:
- Type 000010 and hit return.
... It becomes 10, right?
Now try it like this: '000100
... Tada! It stays as 00100 and puts a little green tab in the top left
corner.
There's no closing ' in this example, just the opening one at the
beginning of the text.
Hope that helps... 'course, I'm using excel 2002, so maybe different
versions do different things...
-- jon
-----Original Message-----
From: Marek Kilimajer [mailto:kilimajer
webglobe.sk]
Sent: Friday, February 06, 2004 3:02 PM
To: Jay Blanchard
Cc: jon roig; php-general
lists.php.net
Subject: Re: [PHP] PHP, Excel, and tab delimited files question
Do double quotes around help?
Jay Blanchard wrote:
> [snip]
> Don't do it in the header, but in the field itself just put a ' before
> the first character and excel will interpret it as a text field.
> [/snip]
>
> Tried that, the ' shows up. Don't want that to happen
>
---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.572 / Virus Database: 362 - Release Date: 1/27/2004
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.572 / Virus Database: 362 - Release Date: 1/27/2004
attached mail follows:
jon roig wrote:
> Nah... Try it in excel itself and you'll see what I'm talking about. You
> have to do it in numeric fields.
>
> Do this in an excel field:
> - Type 000010 and hit return.
> ... It becomes 10, right?
>
> Now try it like this: '000100
> ... Tada! It stays as 00100 and puts a little green tab in the top left
> corner.
>
> There's no closing ' in this example, just the opening one at the
> beginning of the text.
>
> Hope that helps... 'course, I'm using excel 2002, so maybe different
> versions do different things...
>
> -- jon
>
This is different. You are talking about inputing data in excell
application, but Jay is building csv file.
attached mail follows:
Binay, et al --
...and then Binay said...
%
% Hi all,
Hiya!
%
% is there function which scans a particual directory recurisly and stores the content in array or other way? Listing of files should be in alphabetical way and directories should come on top.
Yep. Get the File_Find pear module and just
$find = new File_Find ;
$separate = $find->maptree(".") ;
$mixed = $find->maptreemultiple(".") ;
Now $separate looks like
Array
(
[0] =>
(
[0] => .
[1] => ./d1
),
[1] =>
(
[0] => ./f1
[1] => ./f2
[2] => ./d1/f3
)
)
and $mixed looks like
Array
(
[0] => f1
[1] => f2
[d1] =>
Array
(
[0] => f3
)
)
%
% Thanks
%
% Binay
HTH & HAND
:-D
--
David T-G * There is too much animal courage in
(play) davidtg
justpickone.org * society and not sufficient moral courage.
(work) davidtgwork
justpickone.org -- Mary Baker Eddy, "Science and Health"
http://justpickone.org/davidtg/ Shpx gur Pbzzhavpngvbaf Qrprapl Npg!
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (FreeBSD)
iD8DBQFAJA1iGb7uCXufRwARAjI/AKCLL/3A2PPHZp4lq6PHKKId+itkcgCff9L/
fN7CI13T2svQzITPZoUYspo=
=ASZQ
-----END PGP SIGNATURE-----
attached mail follows:
Hi,
I have some check boxes in a form and when the form is submitted I read the
checkboxes that have been ticked. However if no checkboxes have been ticked
the following line produces an error, is there a way to suppress this?
foreach ($project as $project_id => $value) {
$fields[] = $project_id;
$values[] = $value;
}
Many thanks
attached mail follows:
> Hi,
>
> I have some check boxes in a form and when the form is
> submitted I read the
> checkboxes that have been ticked. However if no checkboxes
> have been ticked
> the following line produces an error, is there a way to suppress this?
>
if (is_array($project))
> foreach ($project as $project_id => $value) {
> $fields[] = $project_id;
> $values[] = $value;
> }
>
if (is_array($project))
foreach ($project as $project_id => $value) {
$fields[] = $project_id;
$values[] = $value;
}
}
HTH,
Craig
attached mail follows:
craig <mailto:php
lonsbury.com>
on Friday, February 06, 2004 2:24 PM said:
> if (is_array($project))
> foreach ($project as $project_id => $value) {
> $fields[] = $project_id;
> $values[] = $value;
> }
> }
you're missing a curly brace after the if ().
attached mail follows:
> craig <mailto:php
lonsbury.com>
> on Friday, February 06, 2004 2:24 PM said:
>
> > if (is_array($project))
> > foreach ($project as $project_id => $value) {
> > $fields[] = $project_id;
> > $values[] = $value;
> > }
> > }
>
> you're missing a curly brace after the if ().
>
my bad, that's what you get when you don't actually
run the code. Thank god for compilers ;)
-Craig
attached mail follows:
The is_array will still give a warning is the variable array does not exist.
Use isset()
----- Original Message -----
From: "craig" <php
lonsbury.com>
To: <php-general
lists.php.net>
Sent: Friday, February 06, 2004 5:35 PM
Subject: RE: [PHP] Surpressing a 'foreach' Error Message
> > craig <mailto:php
lonsbury.com>
> > on Friday, February 06, 2004 2:24 PM said:
> >
> > > if (is_array($project))
> > > foreach ($project as $project_id => $value) {
> > > $fields[] = $project_id;
> > > $values[] = $value;
> > > }
> > > }
> >
> > you're missing a curly brace after the if ().
> >
>
> my bad, that's what you get when you don't actually
> run the code. Thank god for compilers ;)
>
> -Craig
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
attached mail follows:
craig wrote:
> > craig <mailto:php
lonsbury.com>
>
>> on Friday, February 06, 2004 2:24 PM said:
>>
>>
>>>if (is_array($project))
>>> foreach ($project as $project_id => $value) {
>>> $fields[] = $project_id;
>>> $values[] = $value;
>>> }
>>>}
>>
>>you're missing a curly brace after the if ().
>>
>
>
> my bad, that's what you get when you don't actually
> run the code. Thank god for compilers ;)
You'll still get the notice message with is_array(), though. Use isset().
if(isset($project))
or
if(isset($project) && is_array($project))
--
---John Holmes...
Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/
php|architect: The Magazine for PHP Professionals – www.phparch.com
attached mail follows:
Daryl, et al --
...and then Daryl Meese said...
%
% Hello all,
Hi!
%
% I am considering changing hosting providers and moving from FreeBSD to
% Linux.
Because that's what the hosting provider you have in mind runs or because
you want to go with Linux?
%
% My question is are there any PHP related issues to moving (functions that
% don't work on Linux but do on FreeBSD, etc)?
I haven't had any problems. I host my sites on FreeBSD 4.5 and 4.8 and
develop on Linux (SuSE 8.1 and 9.0 and an LFS homebrew box). I did
another project for a guy hosting Linux here at the same ISP. Everything
has been peachy.
%
% I doubt there are but have to cover the bases.
Good for you :-) Of course, you won't really know until you run your
code on the new platform!
%
% Also, if you got any suggestions for hosts with solid dedicated server plans
% I would appreciate replies of the list.
I host at DataPipe and absolutely love them. I've pushed their UNIX
techs pretty hard (my FreeBSD boxes have a pretty involved PHP build,
while the Linux box needed some custom disk layout for mail tuning) and
they've kept up well. They do everything from shared to dedicated and
their prices are pretty good -- and I've seen them match, too.
Yes, I sometimes can talk them into a free month for my cheapest server
if I send them a new customer, so if you do go to them I'd appreciate
your telling Don in sales that I sent you, but you don't have to and I
don't get anything else in any case :-)
%
% Thanks,
%
%
% Daryl Meese
HTH & HAND & Happy hunting :-)
:-D
--
David T-G * There is too much animal courage in
(play) davidtg
justpickone.org * society and not sufficient moral courage.
(work) davidtgwork
justpickone.org -- Mary Baker Eddy, "Science and Health"
http://justpickone.org/davidtg/ Shpx gur Pbzzhavpngvbaf Qrprapl Npg!
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (FreeBSD)
iD8DBQFAJBVFGb7uCXufRwARAp3bAJ4h+SmJseMLOsXs2j/mkjTjmV/C2wCdHhdm
XbsIay6qL9aMvqZubfzBcCo=
=Vsfh
-----END PGP SIGNATURE-----
attached mail follows:
What is this: 
<?php
$result= (1 * 10);
print$result
?>
10
there is a 10 in the end of that
Again, I very new to this, first time I tried doing a little simple
math, I'm befuddled.
attached mail follows:
Paul Furman <mailto:paul
edgehill.net>
on Friday, February 06, 2004 3:28 PM said:
> <?php
> $result= (1 * 10);
> print$result
>>
>
> 10
> Again, I very new to this, first time I tried doing a little simple
> math, I'm befuddled.
I'm not getting the same result. I got a plain 10. But some weird things about your code are that you don't have a space between print and $result (shouldn't cause an error, but is hard to read) and you're missing a ; on the end of the second line.
What other code is in that page?
Chris.
attached mail follows:
Chris W. Parker wrote:
> Paul Furman wrote:
>>
>> 10
>
>> I'm befuddled.
>
>
> What other code is in that page?
That was the whole page but it's being included from a template. When I
made the test math file empty:
<?php
?>
I still got the funny characters but not with any other pages I include
there.
Here it is:
http://hills.ccsf.edu/~pfurma02/index.php?SCREEN=test.php
Other pages don't produce this:
http://hills.ccsf.edu/~pfurma02/index.php?SCREEN=main.php
--------------------------------------
<?php
# index.php
$template = 'main.php'; # the template for the site
$default_screen = 'home.php'; # the default screen
define ('LIBDIR', 'C:/_Paul/web/phplib');
define ('PUB_DIR', 'C:/_Paul/web/public_html');
define ('SCREEN_DIR', LIBDIR . '/screen');
define ('UTIL_DIR', LIBDIR . '/utilities');
define ('CONFIG_DIR', LIBDIR . '/configuration');
define ('ACTION_DIR', LIBDIR . '/action');
# check which SCREEN to display
if(isset($_REQUEST['SCREEN'])) {
if(is_file(SCREEN_DIR . "/" . basename($_REQUEST['SCREEN']))) {
$SCREEN = basename($_REQUEST['SCREEN']);
} else {
$SCREEN = $default_screen;
}
} else {
$SCREEN = $default_screen;
}
if($SCREEN == 'main.php') {
$SCREEN = 'home.php';
$_REQUEST['SCREEN'] = $SCREEN;
}
include (SCREEN_DIR . "/$template");
?>
-----------------------------------------
<?php #main.php ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML>
<HEAD>
<meta name="Author" content="Paul Furman">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<TITLE>Paul Furman</TITLE>
<style type="text/css">
---snipped for brevity---
</style>
</HEAD>
<BODY
BACKGROUND="http://www.edgehill.net/paul-background.jpg"
BGPROPERTIES="FIXED"
TEXT="#444444"
>
<center>
<table cellSpacing=0 cellPadding=5 border=0>
<tr>
<td width="650" valign="top">
<p>
<?php include (SCREEN_DIR . "/header.php"); ?>
</center>
<p>
<?php include (SCREEN_DIR . "/$SCREEN"); ?>
<center>
<p>
<?php include (SCREEN_DIR . "/footer.php"); ?>
</center>
</td>
</tr>
</table>
</body>
</html>
attached mail follows:
Paul Furman <mailto:paul
edgehill.net>
on Friday, February 06, 2004 4:00 PM said:
> That was the whole page but it's being included from a template. When
> I made the test math file empty:
> I still got the funny characters but not with any other pages I
> include there.
>
> Here it is:
> http://hills.ccsf.edu/~pfurma02/index.php?SCREEN=test.php
>
> Other pages don't produce this:
> http://hills.ccsf.edu/~pfurma02/index.php?SCREEN=main.php
What happens if you make test.php completely blank inside? I'm talking no <?php ?> or anything.
Chris.
attached mail follows:
10
Chris W. Parker wrote:
>
> What happens if you make test.php completely blank inside? I'm talking no <?php ?> or anything.
Totally empty still produces the strange characters. I also had a big
complex page and printing some math in that produced the characters.
...
AH, OK, it was this code editor I just started using called PSPAD. I
made another blank file in notepad and it came out clean. Hmph, so much
for that.
attached mail follows:
Help!!!
"Omer Katz" <katz_o
bezeqint.net> ëúá
áäåãòä:20040205174529.25612.qmail
pb1.pair.com...
> Can I update PHPTraid's php files?
attached mail follows:
Hey,
Sometime back i was checking out a script and it had a very useful little
bit, in the scripts control panel there was
a text link that said "click here to see if your database has been setup"
when you click it, it will tell you if its setup
or lauches the setup script to help you set it up.
I think thats a pretty cool feature for someone who knows nothing about
setting up a database and does not know
if its setup or not. I can handle the setup in steps (the "setup wizard")
but how do i check if the database/tables have
been setup?
(and my apoligies for using "setup" so many times :-p )
Any advise, urls or bits of code would be appreciated.
Thanks,
-Ryan
attached mail follows:
> if its setup or not. I can handle the setup in steps (the "setup wizard")
> but how do i check if the database/tables have
> been setup?
>
It may be helpful to know which database as each database has there own
way...
> (and my apoligies for using "setup" so many times :-p )
>
> Any advise, urls or bits of code would be appreciated.
>
> Thanks,
> -Ryan
>
>
--
Co-Founder
Command Prompt, Inc.
The wheel's spinning but the hamster's dead
attached mail follows:
Hi everyone,
I am using OS X v10.3.2 and just discovered that I can't send mail
using the mail() function.
According to phpinfo(), PHP is configured with sendmail.
Before upgrading to v10.3, I did not check if the mail() function
worked in v10.2
The script I'm using does work on other servers.
<?
$email = $_REQUEST['email'] ;
$message = $_REQUEST['message'] ;
mail( "test
example.com", "Feedback Form Results",
$message, "From: $email" );
header( "Location: thankyou.html" );
?>
I ran Postfix Enabler and still could not email myself.
What do I need to configure to get the mail() function to work?
Thank you.
-Gohaku
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]