Re: [PHP] Randomly rotate image on page load? File under: Image Manipulation

2006-07-10 Thread Chris

Micky Hulse wrote:

Hi,

I have not done much Googling yet... thought I would ask here before I 
spend a bunch of time searching for some guidance... What would be the 
best function set for on-the-fly image manipulation (specifically image 
rotation?)


Is it easily done? Possible? Worth the trouble?

Any links and/or guidance would be appreciated (hopefully the answer is 
 not a blatantly obvious RTFM.) :)


It is.

http://www.php.net/image

There's even a function to do the rotations for you

http://www.php.net/manual/en/function.imagerotate.php

--
Postgresql & php tutorials
http://www.designmagick.com/

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



Re: [PHP] Randomly rotate image on page load? File under: Image Manipulation

2006-07-10 Thread Micky Hulse

Chris wrote:

It is.
http://www.php.net/image
There's even a function to do the rotations for you
http://www.php.net/manual/en/function.imagerotate.php


OMFG... I am such a schmuck!

:: Bangs head on keyboard ::

JK:Luhey;	fdksahuioreufkjL:	KHgfuidksja;	fkdlsaah;	lkhfkldjhsaljk 
fdsaU^TYGHBJFhjfdj ...


Um, time for me to turn off puter and get some sleep.

Thanks for pointing that one out... :: blushes ::

Night!  :)

Cheers,
Micky

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



Re: [PHP] combine implode() and array_keys() to get a string of key names

2006-07-10 Thread Larry Garfield
On Friday 07 July 2006 10:03, Janet Valade wrote:

> Actually, it doesn't matter what the indexes are when you use implode.
> Implode just puts the values into a string. Here's code that will work.
>
>$field_array = array_keys($fields_form);
>$fields = implode(",",$field_array);
>$values = implode('","',$fields_form);
>$query = "INSERT INTO Table1 ($fields) VALUES (\"$values\")";
>$result = mysqli_query($cxn,$query);
>
> $fields_form is an associative array of all the fields to be entered
> into the database, with the field names as keys and the field values as
> values. This code quotes the values in the $values string in the query,
> as needed if the values are strings.

It is slightly more complicated than that, since if the value is numeric and 
going into a numeric field, then it's not supposed to be quoted.  (MySQL 
generally doesn't care, but some other databases may; I'm not certain.)  

I'm actually currently in the midst of getting this functionality added to the 
Drupal CMS.  Feel free to look at the patch I've submitted[1].  It has some 
Drupal-isms in it, but for the most part is fairly clear.  It also handles 
insert, update, and delete, too.

[1] http://drupal.org/node/30334

-- 
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] Randomly rotate image on page load? File under: Image Manipulation

2006-07-10 Thread Paul Scott

On Mon, 2006-07-10 at 16:59 +1000, Chris wrote:

> http://www.php.net/image
> 
> There's even a function to do the rotations for you
> 
> http://www.php.net/manual/en/function.imagerotate.php

That all depends on what you mean by image rotation. A bunch of folks
define image rotation as displaying a set of images as a rotating "slide
show" while others (like Chris) see it as rotating a single image on an
axis (correct definition). 

--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] Randomly rotate image on page load? File under: Image Manipulation

2006-07-10 Thread David Robley
Chris wrote:

> Micky Hulse wrote:
>> Hi,
>> 
>> I have not done much Googling yet... thought I would ask here before I
>> spend a bunch of time searching for some guidance... What would be the
>> best function set for on-the-fly image manipulation (specifically image
>> rotation?)
>> 
>> Is it easily done? Possible? Worth the trouble?
>> 
>> Any links and/or guidance would be appreciated (hopefully the answer is
>>  not a blatantly obvious RTFM.) :)
> 
> It is.
> 
> http://www.php.net/image
> 
> There's even a function to do the rotations for you
> 
> http://www.php.net/manual/en/function.imagerotate.php
> 

If you actually want to load a different image each time, start with
php.net/rand Perhaps the image names could be integer based, or you could
oad the image paths into an array and use rand to select based on a numeric
key. Or you could store the image paths in a mysql database and use mysql's
RAND to select an image path for display.

The possibilities are endless, but seeing this is a php list I won't mention
J...st :-)



Cheers
-- 
David Robley

Disc space - the final frontier!
Today is Sweetmorn, the 45th day of Confusion in the YOLD 3172. 

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



Re: [PHP] Randomly rotate image on page load? File under: Image Manipulation

2006-07-10 Thread Chris

David Robley wrote:

Chris wrote:


Micky Hulse wrote:

Hi,

I have not done much Googling yet... thought I would ask here before I
spend a bunch of time searching for some guidance... What would be the
best function set for on-the-fly image manipulation (specifically image
rotation?)

Is it easily done? Possible? Worth the trouble?

Any links and/or guidance would be appreciated (hopefully the answer is
 not a blatantly obvious RTFM.) :)

It is.

http://www.php.net/image

There's even a function to do the rotations for you

http://www.php.net/manual/en/function.imagerotate.php



If you actually want to load a different image each time, start with
php.net/rand Perhaps the image names could be integer based, or you could
oad the image paths into an array and use rand to select based on a numeric
key. Or you could store the image paths in a mysql database and use mysql's
RAND to select an image path for display.


The OP mentioned image manipulation, hence the pointer to the manual 
about editing images..


It's always interesting to see so many interpretations of the one thing :)

--
Postgresql & php tutorials
http://www.designmagick.com/

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



Re: [PHP] Randomly rotate image on page load? File under: Image Manipulation

2006-07-10 Thread Micky Hulse

Hi,

Hehe, looks like I did not hit the hay just yet... too much geeking to do!

Chris wrote:

It's always interesting to see so many interpretations of the one thing :)


Yeah, no doubt! I found this on AlistApart:



Took me a few mins to figure out that thy author was talking about 
*random image display* and not *image manipulation* Personally I 
think "Rotation" should mean "rotating a single image on an

axis". Lol... I need some sleep.

Thanks all for the responses, I really appreciate all of your help(s).

:: tear comes to eye ::

I love you guys/gals!

Cheers,
M

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



[PHP] Software shopping cart

2006-07-10 Thread Ryan A
Hey all,

While on the subject of shopping carts, (and i didnt
want to hijack the other thread) can anybody recommend
a shopping cart that sells ( or: to sell) software
rather than material goods?

Something simple, would prefer free (surprising eh?)
but am open to commercial.

Something simple (fast, minimum bloat, minimum db
calls), and should be able to offer discounts and
"package discounts" (buy 2 softwares get 30% less, 3
softwares 45% less etc)
Would be nice if it connects to paypal and 2checkout
but not a big deal if it does not, I can do that.

Quite a few on hotscripts, offering the moon dipped in
melted green cheese, would prefer a recommendation
from one of you guys.

Would really like to avoid making this from scratch.

Thanks!
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



Re: [PHP] php_mysql.dll

2006-07-10 Thread M. Sokolewicz
although not specifically mentioned anywhere, make sure that your 
libmysql.dll file is *also* in the PATH of windows. If PHP misses that 
lib, it will bail out with the error below aswell.


- tul

Bagus Nugroho wrote:

if windows, you may add php directory to the PATH of Windows [Environment 
Variables].
 
 




From: João Cândido de Souza Neto [mailto:[EMAIL PROTECTED]
Sent: Mon 10-Jul-2006 09:08
To: php-general@lists.php.net
Subject: Re: [PHP] php_mysql.dll



Yes. I thik it's because windows set all folders by default as read only and
i can't change that.

"Chris" <[EMAIL PROTECTED]> escreveu na mensagem
news:[EMAIL PROTECTED]


João Cândido de Souza Neto wrote:


Excuse me.

PHP Warning: PHP Startup: Unable to load dynamic library
'./ext/php_mysql.dll' - The especified module was not found. in Unknown
on line 0


Thanks for the translation..

Does the php_mysql.dll file exist in the php/ext folder?

Note that mysql isn't enabled by default with php5. Read
http://www.php.net/mysql for information on how to set this up.

--
Postgresql & php tutorials
http://www.designmagick.com/



--
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



Re: [PHP] Software shopping cart

2006-07-10 Thread Ma Siva Kumar
On Mon July 10 2006 2:59 pm, Ryan A wrote:
> Hey all,
>
> While on the subject of shopping carts, (and i didnt
> want to hijack the other thread) can anybody recommend
> a shopping cart that sells ( or: to sell) software
> rather than material goods?
>
Hi Ryan

OS Commerce does all that you are asking for. 
http://www.oscommerce.com

It has options to set up various types of products/downloads and various 
payment options (paypal, credit cards etc). It is easy to install and use.

Best regards,

Ma Sivakumar

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



[PHP] string problem

2006-07-10 Thread weetat

Hi all ,

 I am using PHP 4.3.2 , MYSQL database and Red Hat Entreprise OS.

 I have the SQL statement which store in $str variable  as shown below :
 How to get the '%WS-X5225R%' from $str variable ?



$str = " SELECT DISTINCT(tbl_chassis.serial_no),tbl_card.card_model, ";
"tbl_chassis.host_name,tbl_chassis.chasis_model,tbl_chassis.country,";
"tbl_chassis.city,tbl_chassis.building, 
"tbl_chassis.other,tbl_chassis.status,tbl_chassis.chasis_eos,tbl_chassis.chasis_eol,tbl_chassis.chasis_user_field_1,tbl_chassis.chasis_user_field_2,tbl_chassis.chasis_user_field_3" 
"from tbl_chassis tbl_chassis,tbl_card tbl_card "
"WHERE tbl_chassis.serial_no = tbl_card.serial_no AND 
tbl_card.card_model LIKE'%WS-X5225R%'";



thanks

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



[PHP] Re: [Full-disclosure] Postfix configuration

2006-07-10 Thread nicolas figaro

Bartlomiej Szymanski a écrit :

Hello,


Hi
I have a problem with message delivery via Postfix. I build a network, 
using VMware, consisting of three standalone FreeBSD machines.

I named them: FREEBSD1, FREEBSD2 and FREEBSD3.


do you know postfix has also a very good mailing list ?

On each of the machine I installed Postfix 2.2 and configured it.

Now I have a problem: when I am sending message from FREEBSD1 using 
Postfix on FREEBSD2, I am getting the following error:


Jul  5 16:38:31 FREEBSD2 postfix/smtp[1059]: 7C1FEB0B2: 
to=<[EMAIL PROTECTED]>, orig_to=<[EMAIL PROTECTED]>, relay=none, 
delay=1, status=bounced (Host or domain name not found. Name service 
error for name=FREEBSD1.FREEBSD2 type=A: Host not found)


I know, that some settings in main.cf are wrong, but I cannot find out.
I added the names and IPs to /etc/hosts. I can ping FREEBSD1 and so on.
In my opinion smth. wrong with relaying and domains/hostnames.
postfix tries to resolve FREEBSD1.FREEBSD2 using dns resolution. I don't 
know if you can tell postfix to use /etc/hosts.
try to add the name of your machines to the DNS, or use FQDN (like 
freebsd1.mynetwork.net).


with short hostnames (like freebsd1), postfix tries to add the hostname 
of the server it's running on

to the mail extension.

postfix won't give you good results unless you have a dns server up and 
running so you don't see messages like the one above

anymore.

If you have any ide just email me.


hope this'll help

N F

Regards,
Bartek Szymanski


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

[PHP] sorry for the previous mail, mixed mailing list

2006-07-10 Thread nicolas figaro

/me really need some sleep ...

N F

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

RE: [PHP] string problem

2006-07-10 Thread Jay Blanchard
[snip]
  I have the SQL statement which store in $str variable  as shown below
:
  How to get the '%WS-X5225R%' from $str variable ?

$str = " SELECT DISTINCT(tbl_chassis.serial_no),tbl_card.card_model, ";
 
"tbl_chassis.host_name,tbl_chassis.chasis_model,tbl_chassis.country,";
"tbl_chassis.city,tbl_chassis.building, 
"tbl_chassis.other,tbl_chassis.status,tbl_chassis.chasis_eos,tbl_chassis
.chasis_eol,tbl_chassis.chasis_user_field_1,tbl_chassis.chasis_user_fiel
d_2,tbl_chassis.chasis_user_field_3" 
"from tbl_chassis tbl_chassis,tbl_card tbl_card "
"WHERE tbl_chassis.serial_no = tbl_card.serial_no AND 
tbl_card.card_model LIKE'%WS-X5225R%'";
[/snip]

What do you mean " get the '%WS-X5225R%' from $str variable" ? Do you
want to be able to change that value?

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



RE: [PHP] Randomly rotate image on page load? File under: Image Manipulation

2006-07-10 Thread Jay Blanchard
[snip]
If you actually want to load a different image each time, start with
php.net/rand Perhaps the image names could be integer based, or you
could
oad the image paths into an array and use rand to select based on a
numeric
key. Or you could store the image paths in a mysql database and use
mysql's
RAND to select an image path for display.

The possibilities are endless, but seeing this is a php list I won't
mention
J...st :-)
[/snip]

Script That Shall Not Be Named!

Selecting a random image from a directory using only PHP is not
tremendously difficult;

/*random picture picker*/
define ("ALBUM", "the/place/where/pictures/are/kept");
$albumOpen = opendir(ALBUM);
while(FALSE !== ($pic = readdir($albumOpen))){
   $picParts = explode(".", $pic);
  if("jpg" === $picParts[1]){
   $arrDisplayPic[] = $pic;
}
}
closedir($albumOpen);
$randImgIndex = rand(0, (count($arrDisplayPic)-1));

/* test for the image size and reformat if needed, 
 * in this case one 350 px wide 
 */
$imgInfo = getimagesize(ALBUM.$arrDisplayPic[$randImgIndex]);
if("350" <= $imgInfo[0]){
   echo "";
} else {
   echo "";
}

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



[PHP] Where is phpinfo getting this?

2006-07-10 Thread Robert Hicks

include_path.;C:\php5\pear  .;C:\php5\pear

I have PHP5 sure but it is in C:\PHP. I have looked in my ENV and I have 
scoured the registry and nothing comes up for "php5". So where is it 
getting this entry?


:Robert

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



Re: [PHP] Where is phpinfo getting this?

2006-07-10 Thread Brad Bonkoski

Check your include_path in your php.ini file.
-Brad

Robert Hicks wrote:


include_path.;C:\php5\pear.;C:\php5\pear

I have PHP5 sure but it is in C:\PHP. I have looked in my ENV and I 
have scoured the registry and nothing comes up for "php5". So where is 
it getting this entry?


:Robert



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



Re: [PHP] Where is phpinfo getting this?

2006-07-10 Thread Robert Hicks
I should have mentioned that in my first post. I did check the PHP.INI 
file and it is not in there (nor is there a mention of php5 in it).


:Robert

Brad Bonkoski wrote:

Check your include_path in your php.ini file.
-Brad

Robert Hicks wrote:


include_path.;C:\php5\pear.;C:\php5\pear

I have PHP5 sure but it is in C:\PHP. I have looked in my ENV and I 
have scoured the registry and nothing comes up for "php5". So where is 
it getting this entry?


:Robert



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



[PHP] Re: Where is phpinfo getting this?

2006-07-10 Thread Jo�o C�ndido de Souza Neto
I found something like this too.

If you set your extension_dir to "" you´ll see that php will search the 
dynamic libraries in c:\php5.

"Robert Hicks" <[EMAIL PROTECTED]> escreveu na mensagem 
news:[EMAIL PROTECTED]
> include_path .;C:\php5\pear .;C:\php5\pear
>
> I have PHP5 sure but it is in C:\PHP. I have looked in my ENV and I have 
> scoured the registry and nothing comes up for "php5". So where is it 
> getting this entry?
>
> :Robert 

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



RE: [PHP] Where is phpinfo getting this?

2006-07-10 Thread Ford, Mike
On 10 July 2006 14:29, Robert Hicks wrote:

> I should have mentioned that in my first post. I did check
> the PHP.INI
> file and it is not in there (nor is there a mention of php5 in it).
> 
> > Robert
> 
> Brad Bonkoski wrote:
> > Check your include_path in your php.ini file.
> > -Brad
> > 
> > Robert Hicks wrote:
> > 
> > > include_path.;C:\php5\pear.;C:\php5\pear
> > > 
> > > I have PHP5 sure but it is in C:\PHP. I have looked in my ENV and
> > > I have scoured the registry and nothing comes up for "php5". So
> > > where is it getting this entry? 

Where, exactly, does phpinfo say PHP is looking for your php.ini file? Becasue 
this include_path value looks like it might be the default you get when PHP 
can't find a php.ini at all.

Cheers!

Mike

-
Mike Ford,  Electronic Information Services Adviser,
Learning Support Services, Learning & Information Services,
JG125, James Graham Building, Leeds Metropolitan University,
Headingley Campus, LEEDS,  LS6 3QS,  United Kingdom
Email: [EMAIL PROTECTED]
Tel: +44 113 283 2600 extn 4730  Fax:  +44 113 283 3211 


To view the terms under which this email is distributed, please go to 
http://disclaimer.leedsmet.ac.uk/email.htm

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



Re: [PHP] Randomly rotate image on page load? File under: Image Manipulation

2006-07-10 Thread tedd

>That all depends on what you mean by image rotation. A bunch of folks
>define image rotation as displaying a set of images as a rotating "slide
>show" while others (like Chris) see it as rotating a single image on an
>axis (correct definition).
>
>--Paul

Correct definition?

Not as I see it. The first definition in the dictionary is seldom the only 
"correct" definition.

What about "crop rotation" -- no axis there.

What about "heads of departments in rotation" -- no axis there either.

What about "she was completing a rotation in trauma surgery" -- nada on axis.

The point is that images, like any other object, can be rotated in terms of 
axis OR in order of presentation. There is no one "correct" definition for 
rotation of any object, excepting exotic particles and other such field 
specific phenomena.

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] Chnage Management in PHP aka version control?

2006-07-10 Thread tg-php
Well, I had similar problems at a previous job with SourceSafe as I'm having 
with CVS.  I totally "get" and understand the concept of these systems, but 
they're still overly headachey to use.  Maybe I DONT really get them. hah.  I 
understand mostly how they work and the concept but it seems like another case 
of "we don't need to make it easier because the people who use this are highly 
technical and they'll figure it out".  Or as the gaming community might say 
"lrn2configure noob!"

For now, CVS works fine for us.  But it still feels like we're using a go-cart 
with no engine. If we push it to the top of the hill, we can coast down the 
other side and even steer and stop if we want... but it feels incomplete usage 
and functionality-wise.

Oh well, project for another day.  Thanks for the input!

-TG

= = = Original message = = =

On Wed, July 5, 2006 10:40 am, [EMAIL PROTECTED] wrote:
> I don't know about you, Jay, but all we really want to do is keep a
> record of revisions and be able to 'diff' between them and have the
> files lock so if someone tries to open the file and it's already open,
> that the user is alerted and allowed to open read-only if they desire.

I *much* prefer the CVS/subversion paradigm of concurrent changes, but
if the above is what you want, perhaps you should look into
SourceSafe.

NOTE:
SourceSafe in the 80s on Mac PPC *ate* two of my projects when
goofballs added ".doc" files as text.

I'll never ever ever use this product again, no matter how many people
tell me it's been fixed.

YMMV


___
Sent by ePrompter, the premier email notification software.
Free download at http://www.ePrompter.com.

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



Re: [PHP] Chnage Management in PHP aka version control?

2006-07-10 Thread Jochem Maas
[EMAIL PROTECTED] wrote:
> Well, I had similar problems at a previous job with SourceSafe as I'm having 
> with CVS.  I totally "get" and understand the concept of these systems, but 
> they're still overly headachey to use.  Maybe I DONT really get them. hah.  I 
> understand mostly how they work and the concept but it seems like another 
> case of "we don't need to make it easier because the people who use this are 
> highly technical and they'll figure it out".  Or as the gaming community 
> might say "lrn2configure noob!"
> 
> For now, CVS works fine for us.  But it still feels like we're using a 
> go-cart with no engine. If we push it to the top of the hill, we can coast 
> down the other side and even steer and stop if we want... but it feels 
> incomplete usage and functionality-wise.
> 

$> cvs -q crowbar

or

$> cvs -q magicwand

or

$> cvs -q dowhatimean

unfortunately that's only in my imagination :-P

> Oh well, project for another day.  Thanks for the input!
> 
> -TG
> 
> = = = Original message = = =
> 
> On Wed, July 5, 2006 10:40 am, [EMAIL PROTECTED] wrote:
>> I don't know about you, Jay, but all we really want to do is keep a
>> record of revisions and be able to 'diff' between them and have the
>> files lock so if someone tries to open the file and it's already open,
>> that the user is alerted and allowed to open read-only if they desire.
> 
> I *much* prefer the CVS/subversion paradigm of concurrent changes, but
> if the above is what you want, perhaps you should look into
> SourceSafe.
> 
> NOTE:
> SourceSafe in the 80s on Mac PPC *ate* two of my projects when
> goofballs added ".doc" files as text.
> 
> I'll never ever ever use this product again, no matter how many people
> tell me it's been fixed.
> 
> YMMV
> 
> 
> ___
> Sent by ePrompter, the premier email notification software.
> Free download at http://www.ePrompter.com.
> 

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



[PHP] parse error

2006-07-10 Thread Schalk

Greetings All,

Please have a look at the following code:

if ($numrows < 1)
// the member does not exist
{
   include ($adminfolderpath."/include/headeradmin.php");
   echo "That email does not exist in the members list.";
   echo "Please login.";
   include ($adminfolderpath."/include/footeradmin.php");
   exit;
}

if (md5($memberpassword) !=$dbmemberpassword)
// the password does not match the one in the database
{
   include ($adminfolderpath."/include/headeradmin.php");
   echo "Incorrect password, please try again.";
   login();
   include ($adminfolderpath."/include/footeradmin.php");
   exit;
} else {
   header("Location: 
http://demo.bdiverse.com/accessible/admin/listmypages.php";);
   exit;   
}

?>

I am getting the following error:* Parse error*: parse error, unexpected 
$ in 
*/home/httpd/vhosts/demo.bdiverse.com/httpdocs/accessible/processlogin.php* 
on line *69


In my code the last line i.e. ?> is marked as line 69

Can someone please let me know what is causing this error? Thanks!
*

--
Kind Regards
Schalk Neethling
Web Developer.Designer.Programmer.President
Volume4.Business.Solution.Developers

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



[PHP] Re: Where is phpinfo getting this?

2006-07-10 Thread Robert Hicks

Okay, that is just plain wrong!

Thanks though.  :-)

:Robert

João Cândido de Souza Neto wrote:

I found something like this too.

If you set your extension_dir to "" you´ll see that php will search the 
dynamic libraries in c:\php5.


"Robert Hicks" <[EMAIL PROTECTED]> escreveu na mensagem 
news:[EMAIL PROTECTED]

include_path .;C:\php5\pear .;C:\php5\pear

I have PHP5 sure but it is in C:\PHP. I have looked in my ENV and I have 
scoured the registry and nothing comes up for "php5". So where is it 
getting this entry?


:Robert 


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



Re: [PHP] parse error

2006-07-10 Thread Jochem Maas
Schalk wrote:
> Greetings All,
> 
> Please have a look at the following code:
> 

your missing a closing brace some where - by the looks of things
not in the code you sent.

> if ($numrows < 1)
> // the member does not exist
> {
>include ($adminfolderpath."/include/headeradmin.php");
>echo "That email does not exist in the members list.";
>echo "Please login.";
>include ($adminfolderpath."/include/footeradmin.php");
>exit;
> }
> 
> if (md5($memberpassword) !=$dbmemberpassword)
> // the password does not match the one in the database
> {
>include ($adminfolderpath."/include/headeradmin.php");
>echo "Incorrect password, please try again.";
>login();
>include ($adminfolderpath."/include/footeradmin.php");
>exit;
> } else {
>header("Location:
> http://demo.bdiverse.com/accessible/admin/listmypages.php";);
>exit;   }
> ?>
> 
> I am getting the following error:* Parse error*: parse error, unexpected
> $ in
> */home/httpd/vhosts/demo.bdiverse.com/httpdocs/accessible/processlogin.php*
> on line *69
> 
> In my code the last line i.e. ?> is marked as line 69
> 
> Can someone please let me know what is causing this error? Thanks!
> *
> 

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



Re: [PHP] parse error

2006-07-10 Thread Schalk

Thanks everyone.

Jochem Maas wrote:

Schalk wrote:
  

Greetings All,

Please have a look at the following code:




your missing a closing brace some where - by the looks of things
not in the code you sent.

  

if ($numrows < 1)
// the member does not exist
{
   include ($adminfolderpath."/include/headeradmin.php");
   echo "That email does not exist in the members list.";
   echo "Please login.";
   include ($adminfolderpath."/include/footeradmin.php");
   exit;
}

if (md5($memberpassword) !=$dbmemberpassword)
// the password does not match the one in the database
{
   include ($adminfolderpath."/include/headeradmin.php");
   echo "Incorrect password, please try again.";
   login();
   include ($adminfolderpath."/include/footeradmin.php");
   exit;
} else {
   header("Location:
http://demo.bdiverse.com/accessible/admin/listmypages.php";);
   exit;   }
?>

I am getting the following error:* Parse error*: parse error, unexpected
$ in
*/home/httpd/vhosts/demo.bdiverse.com/httpdocs/accessible/processlogin.php*
on line *69

In my code the last line i.e. ?> is marked as line 69

Can someone please let me know what is causing this error? Thanks!
*




  


--
Kind Regards
Schalk Neethling
Web Developer.Designer.Programmer.President
Volume4.Business.Solution.Developers

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



Re: [PHP] parse error

2006-07-10 Thread Paul Novitski

At 08:11 AM 7/10/2006, Schalk wrote:
I am getting the following error:* Parse error*: parse error, 
unexpected $ in 
*/home/httpd/vhosts/demo.bdiverse.com/httpdocs/accessible/processlogin.php* 
on line *69


In my code the last line i.e. ?> is marked as line 69



I don't see anything wrong with the code you posted, so I'd look 
earlier in your script or in your included scripts.  Generally 
speaking when the parser complains at the final ?> tag it means a 
missing close-bracket } at the end of a code block or a heredoc 
expression that isn't closed properly.  If you're using heredocs, 
remember that the closing expression must end in a semicolon and 
neither the the opening expression nor the closing may have trailing 
spaces or tabs.


Good luck,
Paul 


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



[PHP] possible IE problem

2006-07-10 Thread Schalk

Greetings All,

Now that the parse error is fixed the login script works fine in FF but 
in IE it does not do the redirect. Is there a reason why this code may 
not work in IE? Is there a better way to do this?


$_SESSION['email'] = $email;
$_SESSION['memberpassword'] = md5($memberpassword);
header("Location: 
http://demo.bdiverse.com/accessible/admin/listmypages.php";);

exit;

Thanks!

--
Kind Regards
Schalk Neethling
Web Developer.Designer.Programmer.President
Volume4.Business.Solution.Developers

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



[PHP] GD to database directly

2006-07-10 Thread Peter Lauri
Best group member,

 

I am creating images via GD and want to save them to the database. Right now
I save them to the disk and then save them to the database. Is it possible
to write them directly to the database and skip the middle step where I
temporary write it to the hard disk?

 

Best regards,

Peter Lauri

 

 

 



RE: [PHP] GD to database directly

2006-07-10 Thread Jay Blanchard
[snip]
I am creating images via GD and want to save them to the database. Right
now
I save them to the disk and then save them to the database. Is it
possible
to write them directly to the database and skip the middle step where I
temporary write it to the hard disk?
[/snip]

1. Do not store images in a database, it is just a bad idea from a
performance perspective (as has been covered many times heretofore). 
2. If you insist on storing the image in a database you can use any of
the image output functions, for instance;

INSERT INTO `table` (`picture`)
VALUE ('".imagegd($resource, 'imagename')."')

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



Re: [PHP] Randomly rotate image on page load? File under: Image Manipulation

2006-07-10 Thread Micky Hulse

tedd wrote:

Not as I see it. The first definition in the dictionary is seldom the only 
"correct" definition.


Good point...

Not to be contrary, but:

What about when you are speaking in terms of computers, and specifically 
images? Seems like if the subject is "images on the computer", 
"rotation" falls more closely to "rotating on an axis" and not "changing 
of images".


For example, I was driving down the road the other day, and I saw 
temporary road construction sign that said "Road Const ahead". Now, my 
first thought was "Constant" as in C++. But, wait, this is not 
programing, this is driving, and they must mean "Construction".


As a graphic designer maybe I have some bias... I when I use Photoshop I 
do not think of Rotation as moving images from the front of the stack to 
the back of the stack (if I have a bunch open)... Rotation clearly means 
(in the PS world) rotating an image on an axis.


Now, in terms of a slide-show, rotation makes some sense, but IMHO I 
think word is improperly used.


:)

Cheers,
Micky

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



RE: [PHP] RE: [PHP-WIN] Dynamic HTML table sort with PHP

2006-07-10 Thread Vandegrift, Ken
Thanks for the reply - I will definitely look at the link you provided!
 
I currently did get this working smoothly in pure PHP, but this
obviously creates more overhead and a query is run on the DB everytime a
column is clicked to get the sorted data back.  This is for an internal
app. that likely will not make extensive use of the sort though.
 
Thanks!
 
Ken Vandegrift
[EMAIL PROTECTED]  
Web Administrator
Sharis Mgmt. Corp
 



From: Shafiq Rehman [mailto:[EMAIL PROTECTED] 
Sent: Sunday, July 09, 2006 10:09 PM
To: Vandegrift, Ken
Cc: [EMAIL PROTECTED]; php-general@lists.php.net
Subject: Re: [PHP] RE: [PHP-WIN] Dynamic HTML table sort with PHP


Hello,

Why not you use the javascript to sort any column on client side.

http://www.kryogenix.org/code/browser/sorttable/ 

1. include the js file in your page
2. give your table an id
3. put your table in the class the code looks for.

That's it.  Sortable clientside tables!  Example:
http://pkfinance.info/analysis/

Hope this will help!

Regards
Shafiq Rehman
Sr. Web Engineer
http://www.phpgurru.com



RE: [PHP] Randomly rotate image on page load? File under: Image Manipulation

2006-07-10 Thread Jay Blanchard
[snip]
For example, I was driving down the road the other day, and I saw 
temporary road construction sign that said "Road Const ahead". Now, my 
first thought was "Constant" as in C++. But, wait, this is not 
programing, this is driving, and they must mean "Construction".
[/snip]

The other day I saw a temporary road construction sign that said "Slow
Men Working" and it gave me pause

The word 'rotation' is being improperly used, because when one swaps
images he or she does not turn them on their sides, unless one wishes
to. Image swapping is a much better term, but not reallyas swapping
would indicate a trade of some sort Replacement is about as good as
swap.  Do you pre-heat your oven?

This is exactly why one should always comment their code.

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



RE: [PHP] Randomly rotate image on page load? File under: Image Manipulation

2006-07-10 Thread Jay Blanchard
[snip]
Jay Blanchard wrote:
> The other day I saw a temporary road construction sign that said "Slow
> Men Working" and it gave me pause

Reminds me of:

"Do you come from a land down under?
Where women glow and men plunder?
Can't you hear, can't you hear the thunder?
You better run, you better take cover."

> The word 'rotation' is being improperly used, because when one swaps
> images he or she does not turn them on their sides, unless one wishes
> to. Image swapping is a much better term, but not really

For sure. "Photo Slideshow" or just "Slideshow" makes the most sense to
me.
[/snip]

While we are splitting hairs, slideshow would only be applicable if the
images continued to change without page reloading. 

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



Re: [PHP] Randomly rotate image on page load? File under: Image Manipulation

2006-07-10 Thread Micky Hulse

Jay Blanchard wrote:

While we are splitting hairs, slideshow would only be applicable if the
images continued to change without page reloading.


LOL, good point! Hehee.

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



Re: [PHP] Randomly rotate image on page load? File under: Image Manipulation

2006-07-10 Thread Micky Hulse

Jay Blanchard wrote:

The other day I saw a temporary road construction sign that said "Slow
Men Working" and it gave me pause


Reminds me of:

"Do you come from a land down under?
Where women glow and men plunder?
Can't you hear, can't you hear the thunder?
You better run, you better take cover."


The word 'rotation' is being improperly used, because when one swaps
images he or she does not turn them on their sides, unless one wishes
to. Image swapping is a much better term, but not really


For sure. "Photo Slideshow" or just "Slideshow" makes the most sense to me.

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



RE: [PHP] GD to database directly

2006-07-10 Thread Peter Lauri
[snip]
1. Do not store images in a database, it is just a bad idea from a
performance perspective (as has been covered many times heretofore). 
[/snip]

Is that really the case? Is this not depending on the application? :) My
application will never grow, and I can easily just change the file storage
procedure by changing in my file storage class if a change will be
necessary.

/Peter

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



[PHP] arrays

2006-07-10 Thread Dallas Cahker

Banging my head against a wall with arrays, maybe someone can help me with
the answer.

I have a db query that returns results from 1-100 or more.
I want to put the results into an array and pull them out elsewhere.
I want them to be pulled out in an orderly and expected fashion.

part of function

$sql="Select * FROM blah Where blahid='1'";
run sql
while ($row=mysql_fetch_array($result)) {
$oarray=array('blah1' => $row['lah1'], 'blah2' => $row['lah2'], 'blah3' =>
$row['lah3']);
}
return $oarray


part of display

$OLength=count($oarray);

for ($i = 0; $i < $OLength; $i++){
 echo "O1 : ".$oarray['blah1'][$i]."";
 echo "O2 : ".$oarray['blah2'][$i]."";
 echo "O3 : ".$oarray['blah3'][$i]."";
}

this gets me nothing, and I am unsure where I am going wrong, other then all
over the place.


Re: [PHP] GD to database directly

2006-07-10 Thread Austin Denyer
Peter Lauri wrote:
>
> [snip]
> 1. Do not store images in a database, it is just a bad idea from a
> performance perspective (as has been covered many times heretofore). 
> [/snip]
> 
> Is that really the case? Is this not depending on the application? :) My
> application will never grow, and I can easily just change the file storage
> procedure by changing in my file storage class if a change will be
> necessary.

It is generally accepted that storing things like that in a database is
a Bad Thing.  Much better to store the images as files and store the
path in the database.

Regards,
Austin.


signature.asc
Description: OpenPGP digital signature


Re: [PHP] arrays

2006-07-10 Thread Stut

Dallas Cahker wrote:

Banging my head against a wall with arrays, maybe someone can help me with
the answer.

I have a db query that returns results from 1-100 or more.
I want to put the results into an array and pull them out elsewhere.
I want them to be pulled out in an orderly and expected fashion.

part of function

$sql="Select * FROM blah Where blahid='1'";
run sql
while ($row=mysql_fetch_array($result)) {
$oarray=array('blah1' => $row['lah1'], 'blah2' => $row['lah2'], 'blah3' =>
$row['lah3']);


The above line will not add an array element per row. Change $oarray= to 
$oarray[]=



}
return $oarray


part of display

$OLength=count($oarray);

for ($i = 0; $i < $OLength; $i++){
 echo "O1 : ".$oarray['blah1'][$i]."";
 echo "O2 : ".$oarray['blah2'][$i]."";
 echo "O3 : ".$oarray['blah3'][$i]."";
}


This is not the way the array is arranged. Switch your indices around so 
it's like so...


echo "O1 : ".$oarray[$i]['blah1']."";
echo "O2 : ".$oarray[$i]['blah2']."";
echo "O3 : ".$oarray[$i]['blah3']."";


this gets me nothing, and I am unsure where I am going wrong, other then 
all

over the place.


-Stut

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



Re: [PHP] arrays

2006-07-10 Thread Brad Bonkoski

When loading the array you will only ever get the last record returned...
so count($oarray) will always be 1?

Perhaps something like this:
Function
$sql = "...";
$ret = array();
while($row = mysql_feth_array($reault)) {
array_push($ret, $row);
}
return $ret;

then...
$data = function();
$c = count($data);
for($i=0; $i<$c; $i++) {
$row = $data[$i];
print_r($row);
}

Should give you what you want...
As for your "orderly" fashion, I would put this load on the database, 
and not really PHP...
if you want to make it associate you can...just push the assocative onto 
another array so you get the complete set...

-B

Dallas Cahker wrote:

Banging my head against a wall with arrays, maybe someone can help me 
with

the answer.

I have a db query that returns results from 1-100 or more.
I want to put the results into an array and pull them out elsewhere.
I want them to be pulled out in an orderly and expected fashion.

part of function

$sql="Select * FROM blah Where blahid='1'";
run sql
while ($row=mysql_fetch_array($result)) {
$oarray=array('blah1' => $row['lah1'], 'blah2' => $row['lah2'], 
'blah3' =>

$row['lah3']);
}
return $oarray


part of display

$OLength=count($oarray);

for ($i = 0; $i < $OLength; $i++){
 echo "O1 : ".$oarray['blah1'][$i]."";
 echo "O2 : ".$oarray['blah2'][$i]."";
 echo "O3 : ".$oarray['blah3'][$i]."";
}

this gets me nothing, and I am unsure where I am going wrong, other 
then all

over the place.



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



Re: [PHP] arrays

2006-07-10 Thread Dallas Cahker

Both work great.
Thanks

On 7/10/06, Brad Bonkoski <[EMAIL PROTECTED]> wrote:


When loading the array you will only ever get the last record returned...
so count($oarray) will always be 1?

Perhaps something like this:
Function
$sql = "...";
$ret = array();
while($row = mysql_feth_array($reault)) {
array_push($ret, $row);
}
return $ret;

then...
$data = function();
$c = count($data);
for($i=0; $i<$c; $i++) {
$row = $data[$i];
print_r($row);
}

Should give you what you want...
As for your "orderly" fashion, I would put this load on the database,
and not really PHP...
if you want to make it associate you can...just push the assocative onto
another array so you get the complete set...
-B

Dallas Cahker wrote:

> Banging my head against a wall with arrays, maybe someone can help me
> with
> the answer.
>
> I have a db query that returns results from 1-100 or more.
> I want to put the results into an array and pull them out elsewhere.
> I want them to be pulled out in an orderly and expected fashion.
>
> part of function
>
> $sql="Select * FROM blah Where blahid='1'";
> run sql
> while ($row=mysql_fetch_array($result)) {
> $oarray=array('blah1' => $row['lah1'], 'blah2' => $row['lah2'],
> 'blah3' =>
> $row['lah3']);
> }
> return $oarray
>
>
> part of display
>
> $OLength=count($oarray);
>
> for ($i = 0; $i < $OLength; $i++){
>  echo "O1 : ".$oarray['blah1'][$i]."";
>  echo "O2 : ".$oarray['blah2'][$i]."";
>  echo "O3 : ".$oarray['blah3'][$i]."";
> }
>
> this gets me nothing, and I am unsure where I am going wrong, other
> then all
> over the place.
>




RE: [PHP] Randomly rotate image on page load? File under: Image Manipulation

2006-07-10 Thread tedd
At 1:52 PM -0500 7/10/06, Jay Blanchard wrote:
>For sure. "Photo Slideshow" or just "Slideshow" makes the most sense to
>me.
>[/snip]
>
>While we are splitting hairs, slideshow would only be applicable if the
>images continued to change without page reloading.

I'll continue to split hairs.

As anyone who has given a "talk/presentation with slides" knows, a slide-show 
came originally via a slide-projector wherein individual "slides" where loaded 
into, and out-of, the slide-projector (i.e., refresh). So, a slide-show would 
only be applicable if the images were loaded in a complete refresh manner.

One could even say that the slides were rotated.  :-)

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] php_mysql.dll

2006-07-10 Thread Jo�o C�ndido de Souza Neto
I add c:\php and c:\php\ext in path but nothing work.

I hate Mr. Bill Gates.

""M. Sokolewicz"" <[EMAIL PROTECTED]> escreveu na mensagem 
news:[EMAIL PROTECTED]
> although not specifically mentioned anywhere, make sure that your 
> libmysql.dll file is *also* in the PATH of windows. If PHP misses that 
> lib, it will bail out with the error below aswell.
>
> - tul
>
> Bagus Nugroho wrote:
>> if windows, you may add php directory to the PATH of Windows [Environment 
>> Variables].
>>  
>>
>> From: João Cândido de Souza Neto [mailto:[EMAIL PROTECTED]
>> Sent: Mon 10-Jul-2006 09:08
>> To: php-general@lists.php.net
>> Subject: Re: [PHP] php_mysql.dll
>>
>>
>>
>> Yes. I thik it's because windows set all folders by default as read only 
>> and
>> i can't change that.
>>
>> "Chris" <[EMAIL PROTECTED]> escreveu na mensagem
>> news:[EMAIL PROTECTED]
>>
>>>João Cândido de Souza Neto wrote:
>>>
Excuse me.

PHP Warning: PHP Startup: Unable to load dynamic library
'./ext/php_mysql.dll' - The especified module was not found. in Unknown
on line 0
>>>
>>>Thanks for the translation..
>>>
>>>Does the php_mysql.dll file exist in the php/ext folder?
>>>
>>>Note that mysql isn't enabled by default with php5. Read
>>>http://www.php.net/mysql for information on how to set this up.
>>>
>>>--
>>>Postgresql & php tutorials
>>>http://www.designmagick.com/
>>
>>
>> --
>> 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



Re: [PHP] php_mysql.dll

2006-07-10 Thread Chris

João Cândido de Souza Neto wrote:

I add c:\php and c:\php\ext in path but nothing work.



That wasn't the suggestion.

Where is the libmysql.dll file located?

--
Postgresql & php tutorials
http://www.designmagick.com/

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



Re: [PHP] GD to database directly

2006-07-10 Thread Larry Garfield
On Monday 10 July 2006 09:31, Peter Lauri wrote:
> [snip]
> 1. Do not store images in a database, it is just a bad idea from a
> performance perspective (as has been covered many times heretofore).
> [/snip]
>
> Is that really the case? Is this not depending on the application? :) My
> application will never grow, and I can easily just change the file storage
> procedure by changing in my file storage class if a change will be
> necessary.
>
> /Peter

The process of loading a script that then loads a database driver and makes an 
SQL call to retrieve a bitstream and set the correct header and then print 
the bitstream is slower than the process of sending a URL to the browser 
which can then make a simple HTTP request against a static file.  Always.

There may be other reasons you'd want to store binary data in an SQL database, 
but it will always be a performance hit over just passing a normal file that 
can be streamed right off the disk to the server's NIC.

-- 
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] php_mysql.dll

2006-07-10 Thread Jo�o C�ndido de Souza Neto
It's in c:\php\ext

"Chris" <[EMAIL PROTECTED]> escreveu na mensagem 
news:[EMAIL PROTECTED]
> João Cândido de Souza Neto wrote:
>> I add c:\php and c:\php\ext in path but nothing work.
>
>
> That wasn't the suggestion.
>
> Where is the libmysql.dll file located?
>
> -- 
> Postgresql & php tutorials
> http://www.designmagick.com/ 

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



Re: [PHP] possible IE problem

2006-07-10 Thread Larry Garfield
This is an issue with the session not being closed properly on a redirect.  IE 
seems to be more bothered by this than Firefox, for reasons I don't quite 
understand.  The solution is to explicitly close the session yourself.

See: 
http://www.php.net/manual/en/function.session-start.php#57875
http://www.php.net/session_write_close

And various other user comments.

On Monday 10 July 2006 10:55, Schalk wrote:
> Greetings All,
>
> Now that the parse error is fixed the login script works fine in FF but
> in IE it does not do the redirect. Is there a reason why this code may
> not work in IE? Is there a better way to do this?
>
> $_SESSION['email'] = $email;
> $_SESSION['memberpassword'] = md5($memberpassword);
> header("Location:
> http://demo.bdiverse.com/accessible/admin/listmypages.php";);
> exit;
>
> Thanks!
>
> --
> Kind Regards
> Schalk Neethling
> Web Developer.Designer.Programmer.President
> Volume4.Business.Solution.Developers

-- 
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



[PHP] Is anyone using DBG Debugger on OS X ?

2006-07-10 Thread Graham Anderson


Has anyone successfully compiled/used  DBG debugger with OS X and  
PHPEclipse  ?

I am getting pretty cryptic compile errors as I am not a unix guru.

many thanks to the brighter folks who have been down this road.

I have:
OS X 10.4.7
PHP 5.1.4 www.entropy.ch Release 5 (Universal Binary)
Eclipse 3.1
PHPEclipse [newest update from within Eclipse]


I downloaded dbg-cli-2.13.1-src and.
./configure appears to finish without errors
'make' produces the below erros

make all-recursive
Making all in pcre
gcc -DHAVE_CONFIG_H -I. -I. -I.. -DLINK_SIZE=2 - 
DPOSIX_MALLOC_THRESHOLD=10 -g -O2 -c chartables.c
gcc -DHAVE_CONFIG_H -I. -I. -I.. -DLINK_SIZE=2 - 
DPOSIX_MALLOC_THRESHOLD=10 -g -O2 -c pcre.c
gcc -DHAVE_CONFIG_H -I. -I. -I.. -DLINK_SIZE=2 - 
DPOSIX_MALLOC_THRESHOLD=10 -g -O2 -c pcreposix.c

rm -f libpcre_1.a
ar cru libpcre_1.a chartables.o pcre.o pcreposix.o
ranlib libpcre_1.a
Making all in dbgbase
gcc -DHAVE_CONFIG_H -I. -I. -I.. -I../pcre -I../ -DDBG_USE_STDALLOCA - 
g -O2 -c dbg_net.c
c++ -DHAVE_CONFIG_H -I. -I. -I.. -I../pcre -I../ -DDBG_USE_STDALLOCA - 
g -O2 -c DbgSess.cpp
c++ -DHAVE_CONFIG_H -I. -I. -I.. -I../pcre -I../ -DDBG_USE_STDALLOCA - 
g -O2 -c DbgSpawn.cpp
c++ -DHAVE_CONFIG_H -I. -I. -I.. -I../pcre -I../ -DDBG_USE_STDALLOCA - 
g -O2 -c ListenerBase.cpp
c++ -DHAVE_CONFIG_H -I. -I. -I.. -I../pcre -I../ -DDBG_USE_STDALLOCA - 
g -O2 -c dbgbase_globals.cpp
dbgbase_globals.cpp: In function 'int dbh_check_new_client_connect 
(int, sockaddr*, int)':
dbgbase_globals.cpp:709: error: invalid conversion from 'int*' to  
'socklen_t*'
dbgbase_globals.cpp:709: error: initializing argument 3 of 'int accept 
(int, sockaddr*, socklen_t*)'

make[2]: *** [dbgbase_globals.o] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all-recursive-am] Error 2

Some have suggested that you are supposed to roll your own PHP from  
source.
As I am using Marc Lyniages Entropy PHP package 5.1.4, does anyone  
recommend the correct PHP tar to download for DBG


any help is appreciated

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



Re: [PHP] Randomly rotate image on page load? File under: Image Manipulation

2006-07-10 Thread tedd
At 11:28 AM -0700 7/10/06, Micky Hulse wrote:
>tedd wrote:
>>Not as I see it. The first definition in the dictionary is seldom the only 
>>"correct" definition.
>
>Good point...
>
>Not to be contrary, but:
>
>What about when you are speaking in terms of computers, and specifically 
>images? Seems like if the subject is "images on the computer", "rotation" 
>falls more closely to "rotating on an axis" and not "changing of images".

In other words, "in context" -- which is based upon your own experience and 
perspective of the topic.

Nothing wrong with that as long as you realize that others have different 
equally founded perspectives and opinions, even when talking about the same 
topic.

For example, when someone is talking to me about computers, the web, and 
images, then I think about images being placed somewhere on a web page. If 
someone mentions rotation, I think of banners, slide-shows, rollovers, and 
other such image manipulations. I don't think of cw or ccw rotations per angle.

On my web site, in the top left corner you will see a tree. The tree image 
changes as per my local seasons (summer, fall, winter, spring, which 
incidentally was the name of the Indian Princes in the Howdy Doody Show, but 
that dates me). I wrote code to rotate the images as per the season, thus my 
perspective of image rotation. My diction of the term "rotation" in this sense 
is perfectly proper.

However, if someone mentions transformations, then I immediately think of 
matrices and image rotation. Different keywords illicit different perspectives. 
That's what makes all of this interesting.

>Now, in terms of a slide-show, rotation makes some sense, but IMHO I think 
>word is improperly used.

As the old lady said, as she kissed the cow "To each their own."  :-)

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] Randomly rotate image on page load? File under: Image Manipulation

2006-07-10 Thread tedd
At 1:36 PM -0500 7/10/06, Jay Blanchard wrote:
>The other day I saw a temporary road construction sign that said "Slow
>Men Working" and it gave me pause

I had the same pause when I read "Slow Children Playing". I wondered if this 
was due to the fact that over 60 percent of our children are overweight.

>The word 'rotation' is being improperly used, because when one swaps
>images he or she does not turn them on their sides,...

I don't think its use is as improper as is your definition -- rotation does not 
mean "turn them on their sides" -- that would limit rotations to 90 degrees. :-)

An image rotation of one degree (or even less) would still be an image rotation.

>Image swapping is a much better term, but not reallyas swapping
>would indicate a trade of some sort

Image swapping sounds like something that many neighborhoods tried in the 70's 
-- but, that lead to numerous divorces.

>Replacement is about as good as swap.

H... I wonder how the term "Replacement Meet" would catch on? Oh, but wait, 
we're talking about the net -- so how would "Image Replacement" fit with:

http://mezzoblue.com/tests/revised-image-replacement/

I wonder if the css group would look at this solution from the same perspective?

>Do you pre-heat your oven?

George Carlin -- I love his quotes.

Of course, one of my favorites -- As Oscar Wilde once said when confronted by a 
challenge for duel. "Sir, considering that you made the challenge, I get the 
choice of weapon -- and I choose grammar."

>This is exactly why one should always comment their code.

On this we agree. :-)

Forgive me for being argumentative, but the term "rotation" does have a double 
meaning in this context and both meanings are correct.

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] arrays

2006-07-10 Thread tedd
At 3:38 PM -0400 7/10/06, Dallas Cahker wrote:
>Banging my head against a wall with arrays, maybe someone can help me with
>the answer.
>
>I have a db query that returns results from 1-100 or more.
>I want to put the results into an array and pull them out elsewhere.
>I want them to be pulled out in an orderly and expected fashion.

Dallas:

Place the sorting on MySQL -- it has great ways of providing data for you.

Perhaps this link might help:

http://www.weberdev.com/get_example-4270.html

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] Randomly rotate image on page load? File under: Image Manipulation

2006-07-10 Thread Micky Hulse

tedd wrote:

You make a great points.


As the old lady said, as she kissed the cow "To each their own."  :-)


Sounds good to me. Like you said, things like this are very interesting.

Nice site btw. I really like the simplicity of the logo, and very cool 
idea to make the tree change with the seasons.  :)


Thanks for your input.

Thanks all for shedding some light on the topic. I am excited to try 
some unique and different things with PHP image manipulation capabilities.


Cheers,
Micky

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



[PHP] Zend Platform, is it good?

2006-07-10 Thread Chris

Hi,

Have any of you used Zend Platform? Did/Do you like it?

I'm trying to evaluate it for my company, and it definitely does the 
things I need (Session Clustering and caching) and alot of what I want 
(Error management, mass configuration changes), but I was hoping someone 
may be able to relate some experiences with it (good or bad).


Any help would be appreciated.

Chris

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



Re: [PHP] Randomly rotate image on page load? File under: Image Manipulation

2006-07-10 Thread tedd
At 7:29 PM -0700 7/10/06, Micky Hulse wrote:
>tedd wrote:
>
>You make a great points.
>
>>As the old lady said, as she kissed the cow "To each their own."  :-)
>
>Sounds good to me. Like you said, things like this are very interesting.
>
>Nice site btw. I really like the simplicity of the logo, and very cool idea to 
>make the tree change with the seasons.  :)
>
>Thanks for your input.
>
>Thanks all for shedding some light on the topic. I am excited to try some 
>unique and different things with PHP image manipulation capabilities.
>
>Cheers,
>Micky

Mickey:

Thank you very much for the kind words -- they are sparse around these parts.

In any event, if you have any more questions, please feel free to post them. 
The people who attend this list really do know what they're talking about (when 
it comes to php) and they will spend the time to help. All in all, a good group.

Contact me off-list -- what kinds of image manipulations are you trying?

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



[PHP] Re: string problem

2006-07-10 Thread Rafael
	Well, if that's the pattern, you can search for >'%< and return 
anything between this and >%'<; if you can use PCRE try something like

  if ( preg_match('/'%(.+?)%'/X', $str, $matches) ) {
  echo  $matches[1];
  }
Now, if the expression can only have: upper-case letters, numbers & "-", 
then use  "/'%([-A-Z0-9]+)%'/X"  instead of  "/'%(.+?)%'/X"


weetat wrote:

Hi all ,

 I am using PHP 4.3.2 , MYSQL database and Red Hat Entreprise OS.

 I have the SQL statement which store in $str variable  as shown below :
 How to get the '%WS-X5225R%' from $str variable ?



$str = " SELECT DISTINCT(tbl_chassis.serial_no),tbl_card.card_model, ";
"tbl_chassis.host_name,tbl_chassis.chasis_model,tbl_chassis.country,";
"tbl_chassis.city,tbl_chassis.building, 
"tbl_chassis.other,tbl_chassis.status,tbl_chassis.chasis_eos,tbl_chassis.chasis_eol,tbl_chassis.chasis_user_field_1,tbl_chassis.chasis_user_field_2,tbl_chassis.chasis_user_field_3" 
"from tbl_chassis tbl_chassis,tbl_card tbl_card "
"WHERE tbl_chassis.serial_no = tbl_card.serial_no AND 
tbl_card.card_model LIKE'%WS-X5225R%'";



thanks

--
Atentamente / Sincerely,
J. Rafael Salazar Magaña

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



Re: [PHP] GD to database directly

2006-07-10 Thread Kevin Waterson
This one time, at band camp, "Jay Blanchard" <[EMAIL PROTECTED]> wrote:


> 1. Do not store images in a database, it is just a bad idea from a
> performance perspective (as has been covered many times heretofore). 

rubbish, has been proven other wise, you are quoting old wives tales
Please provide benchmarks to back this.

Kevin


-- 
"Democracy is two wolves and a lamb voting on what to have for lunch. 
Liberty is a well-armed lamb contesting the vote."

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



Re: [PHP] GD to database directly

2006-07-10 Thread Kevin Waterson
This one time, at band camp, Austin Denyer <[EMAIL PROTECTED]> wrote:


> It is generally accepted that storing things like that in a database is
> a Bad Thing.  Much better to store the images as files and store the
> path in the database.

Storing paths and databases in slower than just storing images in the db
or simnply storing them on the server. You are making a db request and a
file system request. Rather than a single request to the db.
What is a file system if not a database?

Kevin


-- 
"Democracy is two wolves and a lamb voting on what to have for lunch. 
Liberty is a well-armed lamb contesting the vote."

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



Re: [PHP] GD to database directly

2006-07-10 Thread Kevin Waterson
This one time, at band camp, Larry Garfield <[EMAIL PROTECTED]> wrote:


> There may be other reasons you'd want to store binary data in an SQL 
> database, 
> but it will always be a performance hit over just passing a normal file that 
> can be streamed right off the disk to the server's NIC.

How much of  a performance hit?

Kevin

-- 
"Democracy is two wolves and a lamb voting on what to have for lunch. 
Liberty is a well-armed lamb contesting the vote."

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



RE: [PHP] Startinga shell process with a life of its own

2006-07-10 Thread Daevid Vincent
> On some machines, on some OSes, in some configurations, with some
> commands, tacking "&" onto the end of what you exec, will sometimes
> "work"...

Sadly, in even Linux, this will not work. PHP blocks on the call.

I've even tried to call out to a shell script which in turn uses & to call a
command.

Nope.

I wish PHP would add threading. We write enterprise level products with PHP,
and we end up using DBUS and letting Ruby do all the "real work".

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