php-general Digest 8 May 2007 11:29:57 -0000 Issue 4779

2007-05-08 Thread php-general-digest-help

php-general Digest 8 May 2007 11:29:57 - Issue 4779

Topics (messages 254526 through 254544):

Re: CMS Systems
254526 by: itoctopus

Re: PHP4 and SQLite
254527 by: Suhas Pharkute

Solution For Undefined Function mysql_connect()
254528 by: Jason Paschal

How to know a requets from web page or client.
254529 by: Le Phuoc Canh
254531 by: Jim Lucas
254532 by: clive
254533 by: itoctopus
254534 by: Le Phuoc Canh

Re: mail() only working with php-cli
254530 by: Andy B.

CMS
254535 by: Jyoti
254536 by: Zoltán Németh
254537 by: Kevin Waterson
254538 by: itoctopus
254540 by: Paul Novitski

Image Resize with LibGD
254539 by: Christian Haensel

Problem to insert the field
254541 by: uni uni
254542 by: Zoltán Németh

google translation
254543 by: Marco Sottana

defining a folder on localhost
254544 by: blueboy

Administrivia:

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

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

To post to the list, e-mail:
[EMAIL PROTECTED]


--
---BeginMessage---
I use wordpress, easy, clean, and lots of plugins.
Joomla is also good.

-- 
itoctopus - http://www.itoctopus.com
Joey [EMAIL PROTECTED] wrote in message 
news:[EMAIL PROTECTED]
 Does anyone know of any good open source CMS system? ( content management
 system )



 Thanks!


 Joey



 
---End Message---
---BeginMessage---

Yep, PDO was one more question that I had and could not find dll for it.

Upgrade is an option but there are some custom dlls that we developed for
4.1.1 and do not want to spend time in checking it for higher version. But
if it is not possible then I guess we will do that

Thx
SUhas


On 5/7/07, Richard Lynch [EMAIL PROTECTED] wrote:


On Mon, May 7, 2007 5:29 pm, Suhas Pharkute wrote:
 Can someone please point me to a tutorial for PHP4.x.x and SQLite
 installation on Windows with Apache web server?

 I searched in Google and PHP mailing list but nothing useful. It seems
 like
 I am missing php_pdo.dll for 4.1.1 version.

First, make sure PDO was available for 4.1.1 at:
http://php.net/pdo

Even if it *was* it may not have made it into the Windows version...

Upgrade?

The instructions mostly consist of find the php_pdo.dll in your zip
file and put it in the right place where http://php.net/phpinfo says
is your extension_dir

--
Some people have a gift link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?


---End Message---
---BeginMessage---

SOLUTION FOUND!

i copied libmysql.dll and php_mysql.dll to my c:\windows\ folder

suddenly my script connects.  that's all it took.

my extension directory is set to C:\PHP in php.ini, but for some reason,
placing the dlls in
the windows folder did the trick.  i searched httpd.conf and php.ini for
WINDOWS and did not find
a reference, but it works.

thank you for taking the time to help.  maybe this info can help you or

someone you know.


On 5/7/07, Richard Lynch [EMAIL PROTECTED] wrote:


Compare what ?php phpinfo();? says is REALLY your extension dir with
what you think is your extension dir...

On Mon, May 7, 2007 6:12 am, Jason Paschal wrote:
 I use this setup locally for testing/playing.  I recently installed
 the
 latest and greatest of the AMP collection.

 Apache 2.2.4
 PHP 5.2.2
 MySQL 5.0.37

 Apache and PHP work fine together, but I wanted to hook it up to a
 local
 test database, so  I installed MySQL.

 In php.ini, i have:

 ; Directory in which the loadable extensions (modules) reside.
 extension_dir = C:\PHP

 i made sure that i moved the dll to that folder, just like i did with
 the gd
 dll.

 And then i uncommented this line:

 extension=php_mysql.dll

 I restarted Apache, and ran a simple test script:

 ?php
 ini_set(display_errors,1);
 $cn = mysql_connect(localhost,root,password);
 ?

 and I get the error:

 *Fatal error*: Call to undefined function mysql_connect()

 any ideas?

 thanks in advance,
 jason



--
Some people have a gift link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?





--
Crunchmutt Studios
Latest News Headlines: http://www.rssvideonews.com
http://www.crunchmutt.com
http://www.deadjoe.com
http://www.dailymedication.com
http://www.extremesportclips.com
http://www.coolanimalclips.com
http://www.robotclips.com
http://www.newsfinger.com
http://www.postyourimage.com
http://www.nakedalarmclock.com
---End Message---
---BeginMessage---
Dear all,
How can we know a request from web page( ex : firefox, IE..) or from client(
ex : window media, winamp, ...). Please help me !
 
Thanks  Best Regard.
 
Le Phuoc Canh
 
Arrive Techologies
Cell Phone : 0902147449
Home Phone  : (08)9915349
Email: [EMAIL 

Re: [PHP] How to know a requets from web page or client.

2007-05-08 Thread Jim Lucas

Le Phuoc Canh wrote:

Dear all,
How can we know a request from web page( ex : firefox, IE..) or from client(
ex : window media, winamp, ...). Please help me !
 
Thanks  Best Regard.
 
Le Phuoc Canh
 
Arrive Techologies

Cell Phone : 0902147449
Home Phone  : (08)9915349
Email: [EMAIL PROTECTED]
 

some will say that it is unreliable/unsafe/inconsistent/etc...  whatever 
else they can come up with, but...


$_SERVER['HTTP_USER_AGENT'] should give you insight into what you are 
looking for.


It should contain a unique description for the above listed agents.

Jim

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



Re: [PHP] How to know a requets from web page or client.

2007-05-08 Thread clive

Le Phuoc Canh wrote:


How can we know a request from web page( ex : firefox, IE..) or from client(
ex : window media, winamp, ...). Please help me !


you need to look at the http request header, you can use the 
$_SERVER['HTTP_USER_AGENT'] variable to access that.


Please note some application may provide a false identity, ie Opera 
identifying itself as IE.



--
Regards,

Clive.

Real Time Travel Connections


{No electrons were harmed in the creation, transmission or reading of 
this email. However, many were excited and some may well have enjoyed 
the experience.}


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



[PHP] Re: How to know a requets from web page or client.

2007-05-08 Thread itoctopus
http://ca.php.net/function.get-browser

-- 
itoctopus - http://www.itoctopus.com
Le Phuoc Canh [EMAIL PROTECTED] wrote in message 
news:[EMAIL PROTECTED]
 Dear all,
 How can we know a request from web page( ex : firefox, IE..) or from 
 client(
 ex : window media, winamp, ...). Please help me !

 Thanks  Best Regard.

 Le Phuoc Canh

 Arrive Techologies
 Cell Phone : 0902147449
 Home Phone  : (08)9915349
 Email: [EMAIL PROTECTED]

 

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



RE: [PHP] How to know a requets from web page or client.

2007-05-08 Thread Le Phuoc Canh
Thanks every body for helping me ! :)


Le Phuoc Canh
 
Arrive Techologies
Cell Phone : 0902147449
Home Phone  : (08)9915349
Email: [EMAIL PROTECTED]

-Original Message-
From: clive [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, May 08, 2007 1:56 PM
To: Le Phuoc Canh
Cc: php-general@lists.php.net
Subject: Re: [PHP] How to know a requets from web page or client.

Le Phuoc Canh wrote:

 How can we know a request from web page( ex : firefox, IE..) or from 
 client( ex : window media, winamp, ...). Please help me !

you need to look at the http request header, you can use the
$_SERVER['HTTP_USER_AGENT'] variable to access that.

Please note some application may provide a false identity, ie Opera
identifying itself as IE.


-- 
Regards,

Clive.

Real Time Travel Connections


{No electrons were harmed in the creation, transmission or reading of 
this email. However, many were excited and some may well have enjoyed 
the experience.}


[PHP] CMS

2007-05-08 Thread Jyoti
Hi

Can anyone can tell me what CMS is?

How can we make it?

What are the requirements for it?

 

Thanks for every response.

 

Regards

Jyoti

 



Re: [PHP] CMS

2007-05-08 Thread Zoltán Németh
means quite a lot of things:
http://en.wikipedia.org/wiki/Cms
the one you are probably interested in is:
http://en.wikipedia.org/wiki/Content_management_system

STFW yourself next time please before asking here

greets
Zoltán Németh

2007. 05. 8, kedd keltezéssel 13.17-kor Jyoti ezt írta:
 Hi
 
 Can anyone can tell me what CMS is?
 
 How can we make it?
 
 What are the requirements for it?
 
  
 
 Thanks for every response.
 
  
 
 Regards
 
 Jyoti
 
  
 

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



Re: [PHP] CMS

2007-05-08 Thread Kevin Waterson
This one time, at band camp, Jyoti [EMAIL PROTECTED] wrote:

 Hi
 
 Can anyone can tell me what CMS is?
Content Management System

 How can we make it?
A CMS can be quite simple and many use it as a first project for PHP.
I guess this is why many of them are full of holes.

 What are the requirements for it?
There are no requirements as you simply define your own content. Rather than
kill yourself within the CMS mine field, take a look at a mature system like
ezPublish, http://www.ez.no

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



[PHP] Re: CMS

2007-05-08 Thread itoctopus
CMS is Customer Management System. It allows anyone with no programming 
skills to create and update a content-driven website.

There are lots of free CMSs available for download (just search for CMS on 
google).

As for the requirements, nothing fancy is required, any modern day hosting 
will allow you to install  your CMS (some hosting companies have even 
created their own wizards to create your CMS site, which will make your job 
even easier)
-- 
itoctopus - http://www.itoctopus.com
Jyoti [EMAIL PROTECTED] wrote in message 
news:[EMAIL PROTECTED]
 Hi

 Can anyone can tell me what CMS is?

 How can we make it?

 What are the requirements for it?



 Thanks for every response.



 Regards

 Jyoti



 

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



[PHP] Image Resize with LibGD

2007-05-08 Thread Christian Haensel

Good morning,

I am using imagecreatetruecolor() and imagecopyresampled() to resize 
oversized images and am overlaying them with an transparent PNG to add a 
watermark. That works just well for oversized images.


Now, let's say I have a small image and would like to stretch it by 50 to 
100% of its original size... I know there will be a loss of quality. But 
maybe someone out there has had to deal with the same before and knows the 
best way to do that?


Any suggestion would be very much appreciated :o)

Greetings from germany,

Chris

--
Chriatian Haensel
Fulltime WebSlave
http://www.chftp.com 


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



Re: [PHP] CMS

2007-05-08 Thread Paul Novitski

At 5/8/2007 12:47 AM, Jyoti wrote:

Can anyone can tell me what CMS is?

How can we make it?

What are the requirements for it?



A CMS is a software system for managing website content.

To begin, click on these links:

http://google.com/search?q=what+is+a+cms

http://google.com/search?q=define%3Acontent+management+system

If this is for a school project, please ask your instructor to teach 
you how to use the internet to find answers to questions.


After you have done your basic research, come back with some informed 
questions.


Remember: listserves help those who help themselves. 


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



[PHP] Problem to insert the field

2007-05-08 Thread uni uni
im having problem in making php news.

I have session variables in login prosses:

$_SESSION['username']=$rec['username'];
$_SESSION['registered_admin']=TRUE;

$_SESSION['username'] is taken from admin table

registered_admin can publish the news, and i want to insert the value that were 
sent from the add_news form into news table, one of them is admin_id which 
is a foreign key to admin table.

the problem is i do not know how to insert admin_id into news table. becoz 
the session which is taken from admin table is username

can anyone help me please...





   
-
Ahhh...imagining that irresistible new car smell?
 Check outnew cars at Yahoo! Autos.

Re: [PHP] Problem to insert the field

2007-05-08 Thread Zoltán Németh
2007. 05. 8, kedd keltezéssel 03.35-kor uni uni ezt írta:
 im having problem in making php news.
 
 I have session variables in login prosses:
 
 $_SESSION['username']=$rec['username'];
 $_SESSION['registered_admin']=TRUE;
 
 $_SESSION['username'] is taken from admin table
 
 registered_admin can publish the news, and i want to insert the value that 
 were sent from the add_news form into news table, one of them is admin_id 
 which is a foreign key to admin table.
 
 the problem is i do not know how to insert admin_id into news table. becoz 
 the session which is taken from admin table is username

solution 1: look up the id of the admin in the db when he logs in, store
it in the session and later use that value
solution 2: look up the id of the admin before inserting into the news
table

greets
Zoltán Németh

 
 can anyone help me please...
 
 
 
 
 

 -
 Ahhh...imagining that irresistible new car smell?
  Check outnew cars at Yahoo! Autos.

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



[PHP] google translation

2007-05-08 Thread Marco Sottana
hi there is any function that use google translation for translation some html ?

[PHP] defining a folder on localhost

2007-05-08 Thread blueboy
I want to define a folder like this

define('IMAGE_FOLDER',$_SERVER['DOCUMENT_ROOT']./mysite/property_images);

I am working on a windows machine running apache and this does not work. It
doesn't seem to like the forward slashes.
the document_root gives C:/Apache/htdocs/

Does anyone know a way to define the root folder on localhost so then when I
upload to the web server I either have to make no changes or just change
this one definition.

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



[PHP] Re: defining a folder on localhost

2007-05-08 Thread itoctopus
define('IMAGE_FOLDER',$_SERVER['DOCUMENT_ROOT'].//mysite//property_images);

-- 
itoctopus - http://www.itoctopus.com
blueboy [EMAIL PROTECTED] wrote in message 
news:[EMAIL PROTECTED]
I want to define a folder like this

 define('IMAGE_FOLDER',$_SERVER['DOCUMENT_ROOT']./mysite/property_images);

 I am working on a windows machine running apache and this does not work. 
 It
 doesn't seem to like the forward slashes.
 the document_root gives C:/Apache/htdocs/

 Does anyone know a way to define the root folder on localhost so then when 
 I
 upload to the web server I either have to make no changes or just change
 this one definition. 

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



[PHP] Re: Selecting a special row from the database

2007-05-08 Thread Marcelo Wolfgang

Wow,

Thanks for all the ideas, I'll explore all of them. I have the content 
people messing with the adm so it's hard to try things I don't fully 
understand by now


About the sql injection, the db user I set for this has only select 
privileges, should I be worried even with this ?


Thanks again for the replies

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



RE: [PHP] Re: Selecting a special row from the database

2007-05-08 Thread Jim Moseby
 
 About the sql injection, the db user I set for this has only select 
 privileges, should I be worried even with this ?
 

Absolutely.  If I have select privs, I could possibly select passwords,
credit card numbers, or whatever else sensitive info you have in your db.

JM

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



Re: [PHP] Re: defining a folder on localhost

2007-05-08 Thread Philip Thompson

On May 8, 2007, at 6:47 AM, itoctopus wrote:

define('IMAGE_FOLDER',$_SERVER['DOCUMENT_ROOT'].//mysite// 
property_images);


I feel a bit n00bish for asking this question... however, why do  
you need '//'? I could understand if it were '\\', but not the forwards.


~Phil



--
itoctopus - http://www.itoctopus.com
blueboy [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]

I want to define a folder like this

define('IMAGE_FOLDER',$_SERVER['DOCUMENT_ROOT']./mysite/ 
property_images);


I am working on a windows machine running apache and this does not  
work.

It
doesn't seem to like the forward slashes.
the document_root gives C:/Apache/htdocs/

Does anyone know a way to define the root folder on localhost so  
then when

I
upload to the web server I either have to make no changes or just  
change

this one definition.


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



Re: [PHP] Image Resize with LibGD

2007-05-08 Thread Greg Donald

On 5/8/07, Christian Haensel [EMAIL PROTECTED] wrote:

Now, let's say I have a small image and would like to stretch it by 50 to
100% of its original size... I know there will be a loss of quality. But
maybe someone out there has had to deal with the same before and knows the
best way to do that?


Create a new image resource with imagecreatetruecolor(); then copy
your source image into it using imagecopyresampled(), adjusting your
size to whatever you need.


--
Greg Donald
http://destiney.com/

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



[PHP] Articles system

2007-05-08 Thread WeberSites LTD
Wasn't sure if to use the CMS thread or not so I opened a new one.
I'm guess I'm looking for a CMS system but I only need it for articles.
 
Preferably one that knows how to break the article into several pages
so that you don't need to see one big scroll.
 
Any recommendations?
 
thanks
berber


Re: [PHP] Articles system

2007-05-08 Thread Lester Caine

WeberSites LTD wrote:

Wasn't sure if to use the CMS thread or not so I opened a new one.
I'm guess I'm looking for a CMS system but I only need it for articles.
 
Preferably one that knows how to break the article into several pages

so that you don't need to see one big scroll.
 
Any recommendations?


bitweaver
www.bitweaver.org

And just install articles
If you find later you need another package you can simply add it, but you only 
need the core user stuff, and the package(s) you want to use.


--
Lester Caine - G8HFL
-
Contact - http://home.lsces.co.uk/lsces/wiki/?page=contact
L.S.Caine Electronic Services - http://home.lsces.co.uk
MEDW - http://home.lsces.co.uk/ModelEngineersDigitalWorkshop/
Firebird Foundation Inc. - http://www.firebirdsql.org/index.php

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



Re: [PHP] Articles system

2007-05-08 Thread Lester Caine

WeberSites LTD wrote:

Wasn't sure if to use the CMS thread or not so I opened a new one.
I'm guess I'm looking for a CMS system but I only need it for articles.
 
Preferably one that knows how to break the article into several pages

so that you don't need to see one big scroll.
 
Any recommendations?


bitweaver
www.bitweaver.org

And just install articles
If you find later you need another package you can simply add it, but you only 
need the core user stuff, and the package(s) you want to use.


--
Lester Caine - G8HFL
-
Contact - http://home.lsces.co.uk/lsces/wiki/?page=contact
L.S.Caine Electronic Services - http://home.lsces.co.uk
MEDW - http://home.lsces.co.uk/ModelEngineersDigitalWorkshop/
Firebird Foundation Inc. - http://www.firebirdsql.org/index.php

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



[PHP] unicode help

2007-05-08 Thread suresh kumar

Hi,
   
  Right now my application supports 'English' Language version,i like to 
integrate 'chinnese' language in my  application.My Application is running from 
 PHP and mysql.I don't have any idea regarding this unicode 
implementation.whether we can implement using javascript or PHP.I am looking 
forward some help from you
   

A.suresh

   
-
 Office firewalls, cyber cafes, college labs, don't allow you to download CHAT? 
Here's a solution! 

[PHP] Upload problem - final size is different

2007-05-08 Thread Eric Trahan

Hi,

I have a form to upload file on my web server, so user can upload  
their images.


The upload work.  The user file is uploaded to my destination folder  
(page5/) but the file is unreadable and the file size is smaller than  
the original file size.


I run Apache with PHP 4.1.2.

Thank you,

Eric.


Here is the form code:

form enctype=multipart/form-data action=fileupload_bd.php  
method=post

input type=hidden name=MAX_FILE_SIZE value=10 /
Une imagebr/input type=file name=uneimage /
br/br/Du texte: input type=text name=untexte /
br/br/input type=submit /
/form


Here is my PHP upload code:

?php

echo $_POST['untexte'] . br/br/;

$tmp_name = $_FILES['uneimage']['tmp_name'];
$type = $_FILES['uneimage']['type'];
$name = $_FILES['uneimage']['name'];
$size = $_FILES['uneimage']['size'];

echo $tmp_name . br/ . $type . br/ . $name . br/;

$target_path = page5/;

$target_path = $target_path . basename( $_FILES['uneimage']['name']);

echo $target_path;

if(move_uploaded_file($_FILES['uneimage']['tmp_name'], $target_path)) {
echo The file .  basename( $_FILES['uneimage']['name']).
 has been uploaded;
} else{
echo There was an error uploading the file, please try again!;
}
?

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



Re: [PHP] Articles system

2007-05-08 Thread Lester Caine

WeberSites LTD wrote:

Wasn't sure if to use the CMS thread or not so I opened a new one.
I'm guess I'm looking for a CMS system but I only need it for articles.
 
Preferably one that knows how to break the article into several pages

so that you don't need to see one big scroll.
 
Any recommendations?


bitweaver
www.bitweaver.org

And just install articles
If you find later you need another package you can simply add it, but you only 
need the core user stuff, and the package(s) you want to use.


--
Lester Caine - G8HFL
-
Contact - http://home.lsces.co.uk/lsces/wiki/?page=contact
L.S.Caine Electronic Services - http://home.lsces.co.uk
MEDW - http://home.lsces.co.uk/ModelEngineersDigitalWorkshop/
Firebird Foundation Inc. - http://www.firebirdsql.org/index.php

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



Re: [PHP] Articles system

2007-05-08 Thread Lester Caine

WeberSites LTD wrote:

Wasn't sure if to use the CMS thread or not so I opened a new one.
I'm guess I'm looking for a CMS system but I only need it for articles.
 
Preferably one that knows how to break the article into several pages

so that you don't need to see one big scroll.
 
Any recommendations?


bitweaver
www.bitweaver.org

And just install articles
If you find later you need another package you can simply add it, but you only
need the core user stuff, and the package(s) you want to use.

--
Lester Caine - G8HFL
-
Contact - http://home.lsces.co.uk/lsces/wiki/?page=contact
L.S.Caine Electronic Services - http://home.lsces.co.uk
MEDW - http://home.lsces.co.uk/ModelEngineersDigitalWorkshop/
Firebird Foundation Inc. - http://www.firebirdsql.org/index.php

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



Re: [PHP] Articles system

2007-05-08 Thread Stut

Lester Caine wrote:

WeberSites LTD wrote:

Wasn't sure if to use the CMS thread or not so I opened a new one.
I'm guess I'm looking for a CMS system but I only need it for articles.
 
Preferably one that knows how to break the article into several pages

so that you don't need to see one big scroll.
 
Any recommendations?


bitweaver
www.bitweaver.org

And just install articles
If you find later you need another package you can simply add it, but 
you only need the core user stuff, and the package(s) you want to use.


Hey Lester, kick your damn mail server!

-Stut

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



Re: [PHP] Articles system

2007-05-08 Thread Lester Caine

WeberSites LTD wrote:

Wasn't sure if to use the CMS thread or not so I opened a new one.
I'm guess I'm looking for a CMS system but I only need it for articles.
 
Preferably one that knows how to break the article into several pages

so that you don't need to see one big scroll.
 
Any recommendations?


bitweaver
www.bitweaver.org

And just install articles
If you find later you need another package you can simply add it, but you only
need the core user stuff, and the package(s) you want to use.

--
Lester Caine - G8HFL
-
Contact - http://home.lsces.co.uk/lsces/wiki/?page=contact
L.S.Caine Electronic Services - http://home.lsces.co.uk
MEDW - http://home.lsces.co.uk/ModelEngineersDigitalWorkshop/
Firebird Foundation Inc. - http://www.firebirdsql.org/index.php

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



Re: [PHP] PHP's ldap_sasl_bind tries to authenticate with KRB5CCNAME other than the one provided by mod_auth_kerb

2007-05-08 Thread Thimo Langbehn
I think the problem you mention is located in the kerbero-lib. The
Credential-cache is implemented as static and only set once per process
(in a memeory area of the lib)
Therefore, the first process of your apache will really set that
variable and be able to authenticate to the kdc. Any following request
handled by Any thread of that process  will fail since the variable
points to a now deleted (and wrong) credential-cache.
As a verification you could limit the number of precesses, threads and
the allowed request per process to 1 and try your code.

I have the very same problem while connecting to LDAP and to postgreSQL
using GSSAPI. A possible solution is discussed here:
http://www.mail-archive.com/[EMAIL PROTECTED]/msg00350.html

Regards,
Thimo Langbehn

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



Re: [PHP] Articles system

2007-05-08 Thread Robert Cummings
On Tue, 2007-05-08 at 17:21 +0100, Lester Caine wrote:
 WeberSites LTD wrote:
  Wasn't sure if to use the CMS thread or not so I opened a new one.
  I'm guess I'm looking for a CMS system but I only need it for articles.
   
  Preferably one that knows how to break the article into several pages
  so that you don't need to see one big scroll.

I'll take one big scroll any day over 10 pages of ad infestation.

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

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



[PHP] Weird results with floor compiling with -march=pentium4 -mcpu=pentium4

2007-05-08 Thread Rodolfo Gonzalez Gonzalez

Hi,

Just for the record. I compiled PHP 5.2.2 with CFLAGS=-O2 -march=pentium4 
-mcpu=pentium4, as usual (I've done so with all the 5.x.x series, and the 
proc is a Pentium 4, of course) and a customer complained about weird 
results in one of his scripts. I isolated the problem to be related to the 
floor function. The problem was that it returned weird results. Sample 
script:


?php

$nt = 100;
$promrow2['uni_gifts'] = 1;
$promrow2['unidades'] = 10;
$calc_cnt=floor(($nt*$promrow2['uni_gifts'])/$promrow2['unidades']);

print $calc_cnt;

?

printed :.01

Casting to integer the value returned by floor solved the problem. I 
recompiled with CFLAGS=-O2 -march=i686 -mcpu=i686 and the problem was 
solved too. I've compiled 5.2.2 with nocona optimizations without problems 
in other machines, so I don't consider this a normal behavior. But report 
submited. Has anyone faced the same problem?.


Software:

PHP 5.2.2
GCC 3.2.2

Regards,
Rodolfo.

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



Re: [PHP] Upload problem - final size is different

2007-05-08 Thread Richard Lynch
On Tue, May 8, 2007 11:30 am, Eric Trahan wrote:

 The upload work.  The user file is uploaded to my destination folder
 (page5/) but the file is unreadable and the file size is smaller than
 the original file size.

 $tmp_name = $_FILES['uneimage']['tmp_name'];
 $type = $_FILES['uneimage']['type'];
 $name = $_FILES['uneimage']['name'];
 $size = $_FILES['uneimage']['size'];

$error = $_FILES['uneimage']['error'];
switch($error){
  //There are at least 5 or 6 'case' statements that go here
  //read the manual to find them
}

-- 
Some people have a gift link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

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



Re: [PHP] Articles system

2007-05-08 Thread Lester Caine

Stut wrote:

If you find later you need another package you can simply add it, but 
you only need the core user stuff, and the package(s) you want to use.


Hey Lester, kick your damn mail server!


Haven't got a big enough boot to get at pigging BT :(
Currently it's saying SMTP is down - but it had still sent the message .

--
Lester Caine - G8HFL
-
Contact - http://home.lsces.co.uk/lsces/wiki/?page=contact
L.S.Caine Electronic Services - http://home.lsces.co.uk
MEDW - http://home.lsces.co.uk/ModelEngineersDigitalWorkshop/
Firebird Foundation Inc. - http://www.firebirdsql.org/index.php

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



Re: [PHP] Articles system

2007-05-08 Thread Richard Lynch
On Tue, May 8, 2007 12:17 pm, Robert Cummings wrote:
 On Tue, 2007-05-08 at 17:21 +0100, Lester Caine wrote:
 WeberSites LTD wrote:
  Wasn't sure if to use the CMS thread or not so I opened a new one.
  I'm guess I'm looking for a CMS system but I only need it for
 articles.
 
  Preferably one that knows how to break the article into several
 pages
  so that you don't need to see one big scroll.

 I'll take one big scroll any day over 10 pages of ad infestation.

+1

I don't really understand how breaking it up is good unless we're
talking about a series broken up by an author or editor for good
valid semantic reasons...

-- 
Some people have a gift link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

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



Re: [PHP] Re: Selecting a special row from the database

2007-05-08 Thread Richard Lynch
On Tue, May 8, 2007 6:54 am, Marcelo Wolfgang wrote:
 About the sql injection, the db user I set for this has only select
 privileges, should I be worried even with this ?

Only if you care about somebody constructing a query that snarfs down
your entire database so they can steal it...

Or if you ever decide to change that read only setting for a more
dynamic site, with user feedback, and suddenly you have a few zillion
queries to worry about...

This was all a not-so-subtle way of saying YES in case you missed it.

Good Practice is Good Practice

-- 
Some people have a gift link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

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



RE: [PHP] Articles system

2007-05-08 Thread WeberSites LTD
This is interesting.
I wonder if more people feel the same.

Compare the articles on weberdev.com (my site) : 
Example : http://www.weberdev.com/ViewArticle/486 

To the articles on devarticles.com for example.
http://www.devarticles.com/c/a/Java/Getting-Started-with-Java-2D/

Do more people prefer all of the info on one page?

thanks
berber

-Original Message-
From: Robert Cummings [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, May 08, 2007 7:18 PM
To: Lester Caine
Cc: php-general@lists.php.net
Subject: Re: [PHP] Articles system

On Tue, 2007-05-08 at 17:21 +0100, Lester Caine wrote:
 WeberSites LTD wrote:
  Wasn't sure if to use the CMS thread or not so I opened a new one.
  I'm guess I'm looking for a CMS system but I only need it for articles.
   
  Preferably one that knows how to break the article into several 
  pages so that you don't need to see one big scroll.

I'll take one big scroll any day over 10 pages of ad infestation.

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

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

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



Re: [PHP] defining a folder on localhost

2007-05-08 Thread Richard Lynch
On Tue, May 8, 2007 6:23 am, blueboy wrote:
 I want to define a folder like this

 define('IMAGE_FOLDER',$_SERVER['DOCUMENT_ROOT']./mysite/property_images);

 I am working on a windows machine running apache and this does not
 work. It
 doesn't seem to like the forward slashes.
 the document_root gives C:/Apache/htdocs/

 Does anyone know a way to define the root folder on localhost so then
 when I
 upload to the web server I either have to make no changes or just
 change
 this one definition.

You may want to use:  DIRECTORY_SEPARATOR

Though one User-Contributed note on the filesystem page claims you
don't need it.

Perhaps it's not the '/' versus '\\' that is messing you up in the
first place...

-- 
Some people have a gift link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

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



RE: [PHP] Articles system

2007-05-08 Thread WeberSites LTD
Notice my last mail where I give the example of how devarticles.com 
break the articles into several pages :

http://www.devarticles.com/c/a/Java/Getting-Started-with-Java-2D/

berber

-Original Message-
From: Richard Lynch [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, May 08, 2007 8:07 PM
To: Robert Cummings
Cc: Lester Caine; php-general@lists.php.net
Subject: Re: [PHP] Articles system

On Tue, May 8, 2007 12:17 pm, Robert Cummings wrote:
 On Tue, 2007-05-08 at 17:21 +0100, Lester Caine wrote:
 WeberSites LTD wrote:
  Wasn't sure if to use the CMS thread or not so I opened a new one.
  I'm guess I'm looking for a CMS system but I only need it for
 articles.
 
  Preferably one that knows how to break the article into several
 pages
  so that you don't need to see one big scroll.

 I'll take one big scroll any day over 10 pages of ad infestation.

+1

I don't really understand how breaking it up is good unless we're talking
about a series broken up by an author or editor for good valid semantic
reasons...

--
Some people have a gift link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

--
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] google translation

2007-05-08 Thread Richard Lynch
On Tue, May 8, 2007 5:59 am, Marco Sottana wrote:
 hi there is any function that use google translation for translation
 some html ?

Not built-in, but you could build one for yourself in a couple
hours/days with this:

http://php.net/curl

There might also be something at http://phpclasses.org or
http://zend.com or other various PHP code repositories.

-- 
Some people have a gift link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

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



Re: [PHP] Articles system

2007-05-08 Thread Jason Pruim


On May 8, 2007, at 2:13 PM, WeberSites LTD wrote:



Do more people prefer all of the info on one page?


For me, unless it's like a Chapters in a book setup, I'd prefer the  
info all on one page (Especially tutorials so I can scroll back and  
refer to other stuff)


Just my 2¢
--

Jason Pruim
[EMAIL PROTECTED]
Production  Technology Manager
MQC Specialist (2005 certified)
3251 132nd Ave
Holland MI 49424
616.399.2355
www.raoset.com


America will never be destroyed from the outside. If we falter and lose
our freedoms, it will be because we destroyed ourselves.
 -Abraham Lincoln




smime.p7s
Description: S/MIME cryptographic signature


Re: [PHP] Problem to insert the field

2007-05-08 Thread Richard Lynch
On Tue, May 8, 2007 5:35 am, uni uni wrote:
 im having problem in making php news.

 I have session variables in login prosses:

 $_SESSION['username']=$rec['username'];
 $_SESSION['registered_admin']=TRUE;

 $_SESSION['username'] is taken from admin table

 registered_admin can publish the news, and i want to insert the value
 that were sent from the add_news form into news table, one of them
 is admin_id which is a foreign key to admin table.

 the problem is i do not know how to insert admin_id into news table.
 becoz the session which is taken from admin table is username

If you need to get the ID you just inserted, use
http://php.net/mysql_insert_id

If you're asking how to get the ID to insert, when all you have is the
username, there are two schools of thought.

One is to just go ahead and cram the ID into $_SESSION as well, when
you get the username, with one more field in the query.

The other is to just write another query to look up the ID.

One is easier on your $_SESSION array/storage size/needs/performance.

The second is easier on your raw database query count.

Which is really better depends on the rest of your architecture, and
your own hardware/software, more than any absolute statement we could
make.

-- 
Some people have a gift link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

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



Re: [PHP] Articles system

2007-05-08 Thread Lester Caine

Stut wrote:

Hey Lester, kick your damn mail server!


Sorry about that
British Telecom crap again :(
Usually when it's busy it just says no service, and you try again later.
This time it decided to give the no service message but send a copy of the 
message anyway. SO each time I tried to send it ...
Yep I know I need another ISP, but until BT admit that they cause even more 
damage to other ISP's services that go through them there is little point in 
changing :(


--
Lester Caine - G8HFL
-
Contact - http://home.lsces.co.uk/lsces/wiki/?page=contact
L.S.Caine Electronic Services - http://home.lsces.co.uk
MEDW - http://home.lsces.co.uk/ModelEngineersDigitalWorkshop/
Firebird Foundation Inc. - http://www.firebirdsql.org/index.php

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



Re: [PHP] CMS

2007-05-08 Thread Richard Lynch
On Tue, May 8, 2007 2:47 am, Jyoti wrote:

 Can anyone can tell me what CMS is?

 How can we make it?

 What are the requirements for it?

Start here:
http://opensourcecms.com/

-- 
Some people have a gift link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

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



Re: [PHP] Image Resize with LibGD

2007-05-08 Thread Richard Lynch
On Tue, May 8, 2007 3:17 am, Christian Haensel wrote:
 I am using imagecreatetruecolor() and imagecopyresampled() to resize
 oversized images and am overlaying them with an transparent PNG to add
 a
 watermark. That works just well for oversized images.

 Now, let's say I have a small image and would like to stretch it by 50
 to
 100% of its original size... I know there will be a loss of quality.
 But
 maybe someone out there has had to deal with the same before and knows
 the
 best way to do that?

I suspect you'll never be totally happy with the result of stretching
an image...

You're basically attempting to re-construct lost pixel data that
simply isn't there...

In my limited experience, you're almost always better off just leaving
the image alone rather than expanding it.

You can make it bigger by framing it centered in a larger image of
transparent pixel border, and then your watermark will blot out huge
chunks of it, perhaps, but it will layout okay, and at least the bits
of image one can see aren't all chunky/ugly.

-- 
Some people have a gift link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

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



[PHP] session cookies enabled?

2007-05-08 Thread ccspencer
Hello, 


How does one check to see if the user's browser accepts
session cookies? 

Best, 

Craig 



--
- Virtual Phonecards - Instant Pin by Email  -
-   Large Selection - Great Rates-
- http://speedypin.com/?aff=743co_branded=1 -
-- 



**
**
*  Craig Spencer *
*  [EMAIL PROTECTED]*
**
** 


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



Re: [PHP] Articles system

2007-05-08 Thread Lester Caine

WeberSites LTD wrote:

This is interesting.
I wonder if more people feel the same.

Compare the articles on weberdev.com (my site) : 
Example : http://www.weberdev.com/ViewArticle/486 


Interesting example - I presume there should be text on the page, but all I 
see is a blue page ;)



To the articles on devarticles.com for example.
http://www.devarticles.com/c/a/Java/Getting-Started-with-Java-2D/


That one goes TOO far breaking things down - that is separate articles.


Do more people prefer all of the info on one page?


The happy medium is to download the article, but be able to select via tabs or 
something similar which page you are on, so you can go back without having to 
scroll up and down when checking things out. ( One of the options bitweaver 
provides :) )


--
Lester Caine - G8HFL
-
Contact - http://home.lsces.co.uk/lsces/wiki/?page=contact
L.S.Caine Electronic Services - http://home.lsces.co.uk
MEDW - http://home.lsces.co.uk/ModelEngineersDigitalWorkshop/
Firebird Foundation Inc. - http://www.firebirdsql.org/index.php

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



Re: [PHP] How to know a requets from web page or client.

2007-05-08 Thread Richard Lynch
On Mon, May 7, 2007 10:20 pm, Le Phuoc Canh wrote:
 Dear all,
 How can we know a request from web page( ex : firefox, IE..) or from
 client(
 ex : window media, winamp, ...). Please help me !

You can't know for sure for sure, because it can always be forged.

$_SERZVER['USER_AGENT'], I think.

var_dump($_SERVER);

and surf to it to see.

If you *need* to know, you are in deep trouble, because you can't,
because that's not how the Internet works...

-- 
Some people have a gift link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

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



RE: [PHP] Articles system

2007-05-08 Thread Richard Lynch
On Tue, May 8, 2007 1:13 pm, WeberSites LTD wrote:
 This is interesting.
 I wonder if more people feel the same.

 Compare the articles on weberdev.com (my site) :
 Example : http://www.weberdev.com/ViewArticle/486

Completely un-usable on Firefox 1.5.0.5 with current Gentoo Linux.

I've got a full-width blue screen of death, and then a 1-inch (?)
column of text (unreaedable) off screen to the right.

I *would* like this better, if the layout actually worked.

 To the articles on devarticles.com for example.
 http://www.devarticles.com/c/a/Java/Getting-Started-with-Java-2D/

There's an article on that page?

Where?

:-)

Honestly, I can almost always find the same content on a site with
much lower ad density, and will always choose a cleaner simple site
over something that cluttered/messy.

-- 
Some people have a gift link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

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



RE: [PHP] Articles system

2007-05-08 Thread Robert Cummings
On Tue, 2007-05-08 at 20:13 +0200, WeberSites LTD wrote:
 This is interesting.
 I wonder if more people feel the same.
 
 Compare the articles on weberdev.com (my site) : 
 Example : http://www.weberdev.com/ViewArticle/486 
 
 To the articles on devarticles.com for example.
 http://www.devarticles.com/c/a/Java/Getting-Started-with-Java-2D/
 
 Do more people prefer all of the info on one page?

One big page. I can at a glance scan the entire document and all
emphasized headings to get at what I want. The page loads all of the
noise once and so skipping ads between sections in a single page is
quite quick. I don't feel like I'm being conned into viewing ads. When I
see an ad that bores me it's a split second to jump past it whereas
using a link requires pointing my mouse at the link instead of scrolling
my scrollwheel. Additionally, I have to wait for the page to load, all
the garbage around the page to load, and depending on how the page was
made, the page to settle down into a stable visual display.

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

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



RE: [PHP] Articles system

2007-05-08 Thread Richard Lynch
On Tue, May 8, 2007 1:14 pm, WeberSites LTD wrote:
 Notice my last mail where I give the example of how devarticles.com
 break the articles into several pages :

 http://www.devarticles.com/c/a/Java/Getting-Started-with-Java-2D/

I should have said author/editory unconstrained by artificial
constraints imposed by ad-greedy webmaster

Because I find it hard to believe that any author would have
voluntarily chosen to break it up like that.

Sorry for the confusion.

Think of it this way:

Content is king.

When your advertising out-weighs your content, you lose visitors.

When you lose visitors, you lose revenue.

PS
Yes, I also hate the entertainment media formerly known as news.
Any questions?

-- 
Some people have a gift link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

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



RE: [PHP] session cookies enabled?

2007-05-08 Thread WeberSites LTD
I don't think that there is a difference between session or regular cookie
acceptance.
Have a look at the 1st code example here :

http://www.php-code-search.com/?q=cookie%20support

berber 

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, May 08, 2007 8:31 PM
To: PHP List
Subject: [PHP] session cookies enabled?

Hello, 

How does one check to see if the user's browser accepts session cookies? 

Best, 

Craig 


 --
 - Virtual Phonecards - Instant Pin by Email  -
 -   Large Selection - Great Rates-
 - http://speedypin.com/?aff=743co_branded=1 -
 -- 


**
**
*  Craig Spencer *
*  [EMAIL PROTECTED]*
**
** 

--
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] session cookies enabled?

2007-05-08 Thread Richard Lynch
On Tue, May 8, 2007 1:31 pm, [EMAIL PROTECTED] wrote:
 How does one check to see if the user's browser accepts
 session cookies?

My browser doesn't make that decision. I do. :-)

Send me one and see if it comes back.

If it does come back, use it as your cookie.

Don't send me a second cookie.

I might refuse that one.

No site needs more than one cookie, really.

If you've installed some forum/blog/whatever that has its own cookie,
I'll take it.

If you have google analytics with their goddamned 4 or 5 cookie setup,
I might take those, if I think you deserve to track my usage for site
tracking purposes -- which also sticks me with advertracking, but so
be it.

If you're sending out a bunch of cookies with names like 'username',
'user_id', 'name', 'password' (!), 'email', etc., I'm outta there,
because you clearly have no clue what you are doing...

As esoteric as this may also sound, the basic principles are also true
for supporting the most browsers and having a good clean design.

Send one cookie, see if it comes back, and if it does, tie everything
to that cookie.

You can also set up php.ini and use the built-in sessions with
http://php.net/session_start so that PHP will take care of this for
you.

-- 
Some people have a gift link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

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



RE: [PHP] Articles system

2007-05-08 Thread WeberSites LTD
I'm shocked :)
Had no idea the page was not usable on FF.

Will get on it ASAP. 

-Original Message-
From: Richard Lynch [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, May 08, 2007 8:45 PM
To: WeberSites LTD
Cc: 'Robert Cummings'; 'Lester Caine'; php-general@lists.php.net
Subject: RE: [PHP] Articles system

On Tue, May 8, 2007 1:13 pm, WeberSites LTD wrote:
 This is interesting.
 I wonder if more people feel the same.

 Compare the articles on weberdev.com (my site) :
 Example : http://www.weberdev.com/ViewArticle/486

Completely un-usable on Firefox 1.5.0.5 with current Gentoo Linux.

I've got a full-width blue screen of death, and then a 1-inch (?) column of
text (unreaedable) off screen to the right.

I *would* like this better, if the layout actually worked.

 To the articles on devarticles.com for example.
 http://www.devarticles.com/c/a/Java/Getting-Started-with-Java-2D/

There's an article on that page?

Where?

:-)

Honestly, I can almost always find the same content on a site with much
lower ad density, and will always choose a cleaner simple site over
something that cluttered/messy.

--
Some people have a gift link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

--
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] Upload problem - final size is different

2007-05-08 Thread Eric Trahan

$error = $_FILES['uneimage']['error'];

That doesn't seem work in PHP 4.1.2...  I try it but $error is empty.


And the function move_uploaded_file($_FILES['uneimage']['tmp_name'],  
$target_path) returns TRUE, so the upload work (in a way !).


The problem is the file that is upload doesn't match the original file.

Eric.


Le 2007-05-08 à 14:04, Richard Lynch a écrit :


On Tue, May 8, 2007 11:30 am, Eric Trahan wrote:


The upload work.  The user file is uploaded to my destination folder
(page5/) but the file is unreadable and the file size is smaller than
the original file size.



$tmp_name = $_FILES['uneimage']['tmp_name'];
$type = $_FILES['uneimage']['type'];
$name = $_FILES['uneimage']['name'];
$size = $_FILES['uneimage']['size'];


$error = $_FILES['uneimage']['error'];
switch($error){
  //There are at least 5 or 6 'case' statements that go here
  //read the manual to find them
}

--
Some people have a gift link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?



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



RE: [PHP] Articles system

2007-05-08 Thread WeberSites LTD
Not sure why it's not working with FF. the page passes validation at
validator.w3.org. 

-Original Message-
From: Richard Lynch [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, May 08, 2007 8:45 PM
To: WeberSites LTD
Cc: 'Robert Cummings'; 'Lester Caine'; php-general@lists.php.net
Subject: RE: [PHP] Articles system

On Tue, May 8, 2007 1:13 pm, WeberSites LTD wrote:
 This is interesting.
 I wonder if more people feel the same.

 Compare the articles on weberdev.com (my site) :
 Example : http://www.weberdev.com/ViewArticle/486

Completely un-usable on Firefox 1.5.0.5 with current Gentoo Linux.

I've got a full-width blue screen of death, and then a 1-inch (?) column of
text (unreaedable) off screen to the right.

I *would* like this better, if the layout actually worked.

 To the articles on devarticles.com for example.
 http://www.devarticles.com/c/a/Java/Getting-Started-with-Java-2D/

There's an article on that page?

Where?

:-)

Honestly, I can almost always find the same content on a site with much
lower ad density, and will always choose a cleaner simple site over
something that cluttered/messy.

--
Some people have a gift link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

--
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] Articles system

2007-05-08 Thread Robert Cummings
On Tue, 2007-05-08 at 21:28 +0200, WeberSites LTD wrote:
 Not sure why it's not working with FF. the page passes validation at
 validator.w3.org.

Are you using CSS instead of tables?

*teehee* sorry couldn't resist for all the CSS purists reading this :)

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

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



Re: [PHP] Articles system

2007-05-08 Thread Stut

WeberSites LTD wrote:

Not sure why it's not working with FF. the page passes validation at
validator.w3.org. 


Validation has never and will never mean it looks right. And it worries 
me that someone presenting themselves as an authority on web development 
would think so.


-Stut


-Original Message-
From: Richard Lynch [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, May 08, 2007 8:45 PM

To: WeberSites LTD
Cc: 'Robert Cummings'; 'Lester Caine'; php-general@lists.php.net
Subject: RE: [PHP] Articles system

On Tue, May 8, 2007 1:13 pm, WeberSites LTD wrote:

This is interesting.
I wonder if more people feel the same.

Compare the articles on weberdev.com (my site) :
Example : http://www.weberdev.com/ViewArticle/486


Completely un-usable on Firefox 1.5.0.5 with current Gentoo Linux.

I've got a full-width blue screen of death, and then a 1-inch (?) column of
text (unreaedable) off screen to the right.

I *would* like this better, if the layout actually worked.


To the articles on devarticles.com for example.
http://www.devarticles.com/c/a/Java/Getting-Started-with-Java-2D/


There's an article on that page?

Where?

:-)

Honestly, I can almost always find the same content on a site with much
lower ad density, and will always choose a cleaner simple site over
something that cluttered/messy.

--
Some people have a gift link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

--
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] Articles system

2007-05-08 Thread WeberSites LTD
Actually I'm using tables.
I have no idea what was the problem but I added a nbsp; somewhere
and it looks ok now.

FF bug?
I mean, the page passed w3 validation and didn't show on FF while
at the same time was ok on IE.



-Original Message-
From: Robert Cummings [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, May 08, 2007 9:33 PM
To: WeberSites LTD
Cc: [EMAIL PROTECTED]; 'Lester Caine'; php-general@lists.php.net
Subject: RE: [PHP] Articles system

On Tue, 2007-05-08 at 21:28 +0200, WeberSites LTD wrote:
 Not sure why it's not working with FF. the page passes validation at 
 validator.w3.org.

Are you using CSS instead of tables?

*teehee* sorry couldn't resist for all the CSS purists reading this :)

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


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



RE: [PHP] Articles system

2007-05-08 Thread WeberSites LTD
1st, I never said I was any authority about anything :)
I'm just building the weber sites as a hobby...

2nd, I beg to disagree. Validation has allot to do with how
pages look. In many cases, if you have differences between
browsers, or if things don't look like you expect, validating
the page solves the problem.
 
I think we are a bit OT here :)
I was looking to replace my article system and it looks like
many people prefer to see the one that I have now.

I'll look at the feedback people post here and decide what
to do.

Thanks to everyone on the input.

berber

-Original Message-
From: Stut [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, May 08, 2007 9:34 PM
To: WeberSites LTD
Cc: [EMAIL PROTECTED]; 'Robert Cummings'; 'Lester Caine';
php-general@lists.php.net
Subject: Re: [PHP] Articles system

WeberSites LTD wrote:
 Not sure why it's not working with FF. the page passes validation at 
 validator.w3.org.

Validation has never and will never mean it looks right. And it worries me
that someone presenting themselves as an authority on web development would
think so.

-Stut

 -Original Message-
 From: Richard Lynch [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, May 08, 2007 8:45 PM
 To: WeberSites LTD
 Cc: 'Robert Cummings'; 'Lester Caine'; php-general@lists.php.net
 Subject: RE: [PHP] Articles system
 
 On Tue, May 8, 2007 1:13 pm, WeberSites LTD wrote:
 This is interesting.
 I wonder if more people feel the same.

 Compare the articles on weberdev.com (my site) :
 Example : http://www.weberdev.com/ViewArticle/486
 
 Completely un-usable on Firefox 1.5.0.5 with current Gentoo Linux.
 
 I've got a full-width blue screen of death, and then a 1-inch (?) 
 column of text (unreaedable) off screen to the right.
 
 I *would* like this better, if the layout actually worked.
 
 To the articles on devarticles.com for example.
 http://www.devarticles.com/c/a/Java/Getting-Started-with-Java-2D/
 
 There's an article on that page?
 
 Where?
 
 :-)
 
 Honestly, I can almost always find the same content on a site with 
 much lower ad density, and will always choose a cleaner simple site 
 over something that cluttered/messy.
 
 --
 Some people have a gift link here.
 Know what I want?
 I want you to buy a CD from some indie artist.
 http://cdbaby.com/browse/from/lynch
 Yeah, I get a buck. So?
 
 --
 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] Articles system

2007-05-08 Thread Robert Cummings
On Tue, 2007-05-08 at 21:37 +0200, WeberSites LTD wrote:
 Actually I'm using tables.

DOH! Should have looked before slamming :)

 I have no idea what was the problem but I added a nbsp; somewhere
 and it looks ok now.
 
 FF bug?
 I mean, the page passed w3 validation and didn't show on FF while
 at the same time was ok on IE.

Like Stut said, validation only ensures you're using proper markup, not
that it will render in any given way.

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

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



RE: [PHP] Articles system

2007-05-08 Thread Robert Cummings
On Tue, 2007-05-08 at 21:42 +0200, WeberSites LTD wrote:
 1st, I never said I was any authority about anything :)
 I'm just building the weber sites as a hobby...
 
 2nd, I beg to disagree. Validation has allot to do with how
 pages look. In many cases, if you have differences between
 browsers, or if things don't look like you expect, validating
 the page solves the problem.

Nope, (X)HTML validation is about structure and semantics. It cares not
for whether your page is being rendered in FF, Opera, IE, Lynx, etc.

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

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



Re: [PHP] Articles system

2007-05-08 Thread Stut

WeberSites LTD wrote:

1st, I never said I was any authority about anything :)
I'm just building the weber sites as a hobby...


Hobby or not, when you publish information on the web without a big 
message saying I have no frickin' idea what I'm talking about, you are 
presenting yourself as an authority on the subject. And when you answer 
questions on a mailing list with links to your site you are re-enforcing 
that point.



2nd, I beg to disagree. Validation has allot to do with how
pages look. In many cases, if you have differences between
browsers, or if things don't look like you expect, validating
the page solves the problem.


That's as may be, but it doesn't mean validation guarantees it'll render 
correctly, or even as you expect.


-Stut


I think we are a bit OT here :)
I was looking to replace my article system and it looks like
many people prefer to see the one that I have now.

I'll look at the feedback people post here and decide what
to do.

Thanks to everyone on the input.

berber

-Original Message-
From: Stut [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, May 08, 2007 9:34 PM

To: WeberSites LTD
Cc: [EMAIL PROTECTED]; 'Robert Cummings'; 'Lester Caine';
php-general@lists.php.net
Subject: Re: [PHP] Articles system

WeberSites LTD wrote:
Not sure why it's not working with FF. the page passes validation at 
validator.w3.org.


Validation has never and will never mean it looks right. And it worries me
that someone presenting themselves as an authority on web development would
think so.

-Stut


-Original Message-
From: Richard Lynch [mailto:[EMAIL PROTECTED]
Sent: Tuesday, May 08, 2007 8:45 PM
To: WeberSites LTD
Cc: 'Robert Cummings'; 'Lester Caine'; php-general@lists.php.net
Subject: RE: [PHP] Articles system

On Tue, May 8, 2007 1:13 pm, WeberSites LTD wrote:

This is interesting.
I wonder if more people feel the same.

Compare the articles on weberdev.com (my site) :
Example : http://www.weberdev.com/ViewArticle/486

Completely un-usable on Firefox 1.5.0.5 with current Gentoo Linux.

I've got a full-width blue screen of death, and then a 1-inch (?) 
column of text (unreaedable) off screen to the right.


I *would* like this better, if the layout actually worked.


To the articles on devarticles.com for example.
http://www.devarticles.com/c/a/Java/Getting-Started-with-Java-2D/

There's an article on that page?

Where?

:-)

Honestly, I can almost always find the same content on a site with 
much lower ad density, and will always choose a cleaner simple site 
over something that cluttered/messy.


--
Some people have a gift link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

--
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] Articles system

2007-05-08 Thread WeberSites LTD
structure and semantics influence how the page looks.
One browser may overlook a missing /TABLE and
show the page and another may not. validating
will show where you may have gone wrong. 

Writing good HTML is good practice :)

berber

-Original Message-
From: Robert Cummings [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, May 08, 2007 9:44 PM
To: WeberSites LTD
Cc: 'Stut'; [EMAIL PROTECTED]; 'Lester Caine'; php-general@lists.php.net
Subject: RE: [PHP] Articles system

On Tue, 2007-05-08 at 21:42 +0200, WeberSites LTD wrote:
 1st, I never said I was any authority about anything :) I'm just 
 building the weber sites as a hobby...
 
 2nd, I beg to disagree. Validation has allot to do with how pages 
 look. In many cases, if you have differences between browsers, or if 
 things don't look like you expect, validating the page solves the 
 problem.

Nope, (X)HTML validation is about structure and semantics. It cares not for
whether your page is being rendered in FF, Opera, IE, Lynx, etc.

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

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



[PHP] Re: session cookies enabled?

2007-05-08 Thread ccspencer
Richard Lynch writes: 


How does one check to see if the user's browser accepts
session cookies?


Apparently I should have said cookie and left off the 's' as
that is what I had in mind. 

Send one cookie, see if it comes back, and if it does, tie 
everything to that cookie.


OK.  So how do I see if it comes back? 


I send the user a page that tries to set a session cookie.  That
page would then have to forward him to a second page which would
check for the cookie being sent.  Right? 

So I there is nothing I can check so I can do it with a single page? 


You can also set up php.ini and use the built-in sessions with
http://php.net/session_start so that PHP will take care of this 
for you.


That is what I was intending to do.  How do I find out if whether
or not the session cookie was accepted using the built-in sessions?
I found no function for such a test. 

Best, 

Craig 




--
- Virtual Phonecards - Instant Pin by Email  -
-   Large Selection - Great Rates-
- http://speedypin.com/?aff=743co_branded=1 -
-- 



**
**
*  Craig Spencer *
*  [EMAIL PROTECTED]*
**
** 


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



RE: [PHP] Articles system

2007-05-08 Thread WeberSites LTD
I get your point.

Most of the content on the site is UGC. I didn't write it,
I just send a link to it if I think it can help. 99% of the 
people on this list don't know that the site is mine.

So what about a good article system? :)

berber
 

-Original Message-
From: Stut [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, May 08, 2007 9:51 PM
To: WeberSites LTD
Cc: [EMAIL PROTECTED]; 'Robert Cummings'; 'Lester Caine';
php-general@lists.php.net
Subject: Re: [PHP] Articles system

WeberSites LTD wrote:
 1st, I never said I was any authority about anything :) I'm just 
 building the weber sites as a hobby...

Hobby or not, when you publish information on the web without a big message
saying I have no frickin' idea what I'm talking about, you are presenting
yourself as an authority on the subject. And when you answer questions on a
mailing list with links to your site you are re-enforcing that point.

 2nd, I beg to disagree. Validation has allot to do with how pages 
 look. In many cases, if you have differences between browsers, or if 
 things don't look like you expect, validating the page solves the 
 problem.

That's as may be, but it doesn't mean validation guarantees it'll render
correctly, or even as you expect.

-Stut

 I think we are a bit OT here :)
 I was looking to replace my article system and it looks like many 
 people prefer to see the one that I have now.
 
 I'll look at the feedback people post here and decide what to do.
 
 Thanks to everyone on the input.
 
 berber
 
 -Original Message-
 From: Stut [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, May 08, 2007 9:34 PM
 To: WeberSites LTD
 Cc: [EMAIL PROTECTED]; 'Robert Cummings'; 'Lester Caine'; 
 php-general@lists.php.net
 Subject: Re: [PHP] Articles system
 
 WeberSites LTD wrote:
 Not sure why it's not working with FF. the page passes validation at 
 validator.w3.org.
 
 Validation has never and will never mean it looks right. And it 
 worries me that someone presenting themselves as an authority on web 
 development would think so.
 
 -Stut
 
 -Original Message-
 From: Richard Lynch [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, May 08, 2007 8:45 PM
 To: WeberSites LTD
 Cc: 'Robert Cummings'; 'Lester Caine'; php-general@lists.php.net
 Subject: RE: [PHP] Articles system

 On Tue, May 8, 2007 1:13 pm, WeberSites LTD wrote:
 This is interesting.
 I wonder if more people feel the same.

 Compare the articles on weberdev.com (my site) :
 Example : http://www.weberdev.com/ViewArticle/486
 Completely un-usable on Firefox 1.5.0.5 with current Gentoo Linux.

 I've got a full-width blue screen of death, and then a 1-inch (?) 
 column of text (unreaedable) off screen to the right.

 I *would* like this better, if the layout actually worked.

 To the articles on devarticles.com for example.
 http://www.devarticles.com/c/a/Java/Getting-Started-with-Java-2D/
 There's an article on that page?

 Where?

 :-)

 Honestly, I can almost always find the same content on a site with 
 much lower ad density, and will always choose a cleaner simple site 
 over something that cluttered/messy.

 --
 Some people have a gift link here.
 Know what I want?
 I want you to buy a CD from some indie artist.
 http://cdbaby.com/browse/from/lynch
 Yeah, I get a buck. So?

 --
 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] Articles system

2007-05-08 Thread Stut

WeberSites LTD wrote:

I get your point.

Most of the content on the site is UGC. I didn't write it,
I just send a link to it if I think it can help. 99% of the 
people on this list don't know that the site is mine.


So what about a good article system? :)


Personally I use wordpress on my blog and a custom set of scripts for my 
other sites. When you say a good article system it's like asking 
what's the best fish? What exactly do you want it to do?


The best place to start is http://opensourcecms.com/ and try a few out. 
When you've found a couple that look like they meet most of your 
requirements, install them and evaluate them properly. That's how I came 
to the conclusion that custom solutions tend to work best for the kind 
of sites I develop. YMMV.


-Stut


-Original Message-
From: Stut [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, May 08, 2007 9:51 PM

To: WeberSites LTD
Cc: [EMAIL PROTECTED]; 'Robert Cummings'; 'Lester Caine';
php-general@lists.php.net
Subject: Re: [PHP] Articles system

WeberSites LTD wrote:
1st, I never said I was any authority about anything :) I'm just 
building the weber sites as a hobby...


Hobby or not, when you publish information on the web without a big message
saying I have no frickin' idea what I'm talking about, you are presenting
yourself as an authority on the subject. And when you answer questions on a
mailing list with links to your site you are re-enforcing that point.

2nd, I beg to disagree. Validation has allot to do with how pages 
look. In many cases, if you have differences between browsers, or if 
things don't look like you expect, validating the page solves the 
problem.


That's as may be, but it doesn't mean validation guarantees it'll render
correctly, or even as you expect.

-Stut


I think we are a bit OT here :)
I was looking to replace my article system and it looks like many 
people prefer to see the one that I have now.


I'll look at the feedback people post here and decide what to do.

Thanks to everyone on the input.

berber

-Original Message-
From: Stut [mailto:[EMAIL PROTECTED]
Sent: Tuesday, May 08, 2007 9:34 PM
To: WeberSites LTD
Cc: [EMAIL PROTECTED]; 'Robert Cummings'; 'Lester Caine'; 
php-general@lists.php.net

Subject: Re: [PHP] Articles system

WeberSites LTD wrote:
Not sure why it's not working with FF. the page passes validation at 
validator.w3.org.
Validation has never and will never mean it looks right. And it 
worries me that someone presenting themselves as an authority on web 
development would think so.


-Stut


-Original Message-
From: Richard Lynch [mailto:[EMAIL PROTECTED]
Sent: Tuesday, May 08, 2007 8:45 PM
To: WeberSites LTD
Cc: 'Robert Cummings'; 'Lester Caine'; php-general@lists.php.net
Subject: RE: [PHP] Articles system

On Tue, May 8, 2007 1:13 pm, WeberSites LTD wrote:

This is interesting.
I wonder if more people feel the same.

Compare the articles on weberdev.com (my site) :
Example : http://www.weberdev.com/ViewArticle/486

Completely un-usable on Firefox 1.5.0.5 with current Gentoo Linux.

I've got a full-width blue screen of death, and then a 1-inch (?) 
column of text (unreaedable) off screen to the right.


I *would* like this better, if the layout actually worked.


To the articles on devarticles.com for example.
http://www.devarticles.com/c/a/Java/Getting-Started-with-Java-2D/

There's an article on that page?

Where?

:-)

Honestly, I can almost always find the same content on a site with 
much lower ad density, and will always choose a cleaner simple site 
over something that cluttered/messy.


--
Some people have a gift link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

--
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] Articles system

2007-05-08 Thread Micky Hulse

Robert Cummings wrote:

I'll take one big scroll any day over 10 pages of ad infestation.


At my part-time job (web content editor at newspaper) we give folks the 
option of viewing the multi-page ad infested article as a print 
preview which is the same article, but on one page and print ready.


But I agree with you... I hate having to click-through. But, I do see 
the need for such things.


Hmm, bitweaver sounds interesting though.

Have a great day all!
Cheers,
Micky



--
Wishlists: http://snipurl.com/1gqpj
   Switch: http://browsehappy.com/
 BCC?: http://snipurl.com/w6f8
   My: http://del.icio.us/mhulse

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



Re: [PHP] Articles system

2007-05-08 Thread Micky Hulse

Richard Lynch wrote:

I don't really understand how breaking it up is good unless we're
talking about a series broken up by an author or editor for good
valid semantic reasons...


off-topic

Some good info from book Google Advertising Tools:


Page Size:
How much content should go on each site page? Like Goldilocks and the 
three bears, the answer is not too much, and not too little: just the 
right amount of content.


It's in the interest of the site publisher to keep pages short, because 
the same amount of content spread over shorter pages makes for more 
pages. And more pages on a site means more places for advertising, which 
in theory might mean more revenue.


Sidebar: In addition, more pages may mean more page views, implying 
better metrics to advertisers who don't look too carefully.


However, if you break an article up into many short pages that a user 
has to click through, users will find it irritating and vote with their 
time by frequenting the site less often.


The happy medium is to be natural about page lenght. The natural length 
for a content page is the content that will reasonable fit into a 
maximized browser window without having to scroll.


Sidebar: Obviously, this is a rough, rather than precise, guideline 
since different browsers on different systems will show different size 
pages.


Don't gratuitiously break an article into multiple pages unless the 
article really is longer than a few browser-sized pages. Also, don't 
break an article (even if it is long) unlsess there are natural breaks 
in the content. Anytime there is a new Level 1 header in an article, 
it's a good sign that you could break to a new content page without the 
break feeling forced.


-- Page 16-17, Chapter 1


Ideally, pages should be between 100 and 250 words. If it is shorter 
than 100 words, Google and other search engines will tend to discount 
the page as lightweight. In addition, you want to include as many 
keywords as you can without throwing the contetn off-kilter. With less 
than 100 words, any significant inclusion of keywords is going to look 
like keyword stuffing--a verboten practice.


-- Page 70, Chapter 3

/off-topic

:D

--
Wishlists: http://snipurl.com/1gqpj
   Switch: http://browsehappy.com/
 BCC?: http://snipurl.com/w6f8
   My: http://del.icio.us/mhulse

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



Re: [PHP] Upload problem - final size is different

2007-05-08 Thread Richard Davey

Eric Trahan wrote:


$error = $_FILES['uneimage']['error'];

That doesn't seem work in PHP 4.1.2...  I try it but $error is empty.


It just means there wasn't an error.

And the function move_uploaded_file($_FILES['uneimage']['tmp_name'], 
$target_path) returns TRUE, so the upload work (in a way !).


The problem is the file that is upload doesn't match the original file.


By how much is the difference? Are we talking a few bytes, a few 
megabytes, what?


If you then download the file again, is it corrupted, or does it work?

Cheers,

Rich
--
Zend Certified Engineer
http://www.corephp.co.uk

Never trust a computer you can't throw out of a window

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



[PHP] Re: Upload problem - final size is different

2007-05-08 Thread itoctopus
Have you tried your code on another server?

-- 
itoctopus - http://www.itoctopus.com
Eric Trahan [EMAIL PROTECTED] wrote in message 
news:[EMAIL PROTECTED]
 Hi,

 I have a form to upload file on my web server, so user can upload  their 
 images.

 The upload work.  The user file is uploaded to my destination folder 
 (page5/) but the file is unreadable and the file size is smaller than  the 
 original file size.

 I run Apache with PHP 4.1.2.

 Thank you,

 Eric.


 Here is the form code:

 form enctype=multipart/form-data action=fileupload_bd.php 
 method=post
 input type=hidden name=MAX_FILE_SIZE value=10 /
 Une imagebr/input type=file name=uneimage /
 br/br/Du texte: input type=text name=untexte /
 br/br/input type=submit /
 /form


 Here is my PHP upload code:

 ?php

 echo $_POST['untexte'] . br/br/;

 $tmp_name = $_FILES['uneimage']['tmp_name'];
 $type = $_FILES['uneimage']['type'];
 $name = $_FILES['uneimage']['name'];
 $size = $_FILES['uneimage']['size'];

 echo $tmp_name . br/ . $type . br/ . $name . br/;

 $target_path = page5/;

 $target_path = $target_path . basename( $_FILES['uneimage']['name']);

 echo $target_path;

 if(move_uploaded_file($_FILES['uneimage']['tmp_name'], $target_path)) {
 echo The file .  basename( $_FILES['uneimage']['name']).
  has been uploaded;
 } else{
 echo There was an error uploading the file, please try again!;
 }
 ? 

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



[PHP] Re: Articles system

2007-05-08 Thread itoctopus
Wordpress,
check http://www.pmhut.com for an idea on what you can do with it.

-- 
itoctopus - http://www.itoctopus.com
WeberSites LTD [EMAIL PROTECTED] wrote in message 
news:[EMAIL PROTECTED]
 Wasn't sure if to use the CMS thread or not so I opened a new one.
 I'm guess I'm looking for a CMS system but I only need it for articles.

 Preferably one that knows how to break the article into several pages
 so that you don't need to see one big scroll.

 Any recommendations?

 thanks
 berber
 

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



Re: [PHP] Re: Upload problem - final size is different

2007-05-08 Thread Daniel Brown

   Eric,

   If you're checking the filesize via FTP, a web-based file manager, or
even the shell if it's a cross-platform upload, it can give bad data.  Try
downloading the file and seeing if it's still working.  If it does, try
uploading it via FTP and having a script check the md5 hash on the two files
while still on the server.

   Other possibilities could include:

   * Settings in php.ini for upload_max_filesize or max_execution_time,
max_input_time, or memory_limit, among others.
   * Out of disk space on the partition you're saving to, or the /tmp
partition (or wherever PHP is set to write to).
   * A trojan horse or virus on the server side that may be infecting the
files upon upload.

On 5/8/07, itoctopus [EMAIL PROTECTED] wrote:


Have you tried your code on another server?

--
itoctopus - http://www.itoctopus.com
Eric Trahan [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 Hi,

 I have a form to upload file on my web server, so user can upload  their
 images.

 The upload work.  The user file is uploaded to my destination folder
 (page5/) but the file is unreadable and the file size is smaller
than  the
 original file size.

 I run Apache with PHP 4.1.2.

 Thank you,

 Eric.


 Here is the form code:

 form enctype=multipart/form-data action=fileupload_bd.php
 method=post
 input type=hidden name=MAX_FILE_SIZE value=10 /
 Une imagebr/input type=file name=uneimage /
 br/br/Du texte: input type=text name=untexte /
 br/br/input type=submit /
 /form


 Here is my PHP upload code:

 ?php

 echo $_POST['untexte'] . br/br/;

 $tmp_name = $_FILES['uneimage']['tmp_name'];
 $type = $_FILES['uneimage']['type'];
 $name = $_FILES['uneimage']['name'];
 $size = $_FILES['uneimage']['size'];

 echo $tmp_name . br/ . $type . br/ . $name . br/;

 $target_path = page5/;

 $target_path = $target_path . basename( $_FILES['uneimage']['name']);

 echo $target_path;

 if(move_uploaded_file($_FILES['uneimage']['tmp_name'], $target_path)) {
 echo The file .  basename( $_FILES['uneimage']['name']).
  has been uploaded;
 } else{
 echo There was an error uploading the file, please try again!;
 }
 ?

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





--
Daniel P. Brown
[office] (570-) 587-7080 Ext. 272
[mobile] (570-) 766-8107


[PHP] Re: session cookies enabled?

2007-05-08 Thread itoctopus
setcookie(cookie_name, value);
//redirect to another page using header
header(location:.$your_url);

//check in $your_url for the presence for the cookie
if ($_COOKIE[cookie_name] == value){
//cookies are enabled - add your code
}
else{
//cookies are disabled - add your code
}

Hope that helps!


-- 
itoctopus - http://www.itoctopus.com
[EMAIL PROTECTED] wrote in message 
news:[EMAIL PROTECTED]
 Richard Lynch writes:
 How does one check to see if the user's browser accepts
 session cookies?

 Apparently I should have said cookie and left off the 's' as
 that is what I had in mind.
 Send one cookie, see if it comes back, and if it does, tie everything to 
 that cookie.

 OK.  So how do I see if it comes back?
 I send the user a page that tries to set a session cookie.  That
 page would then have to forward him to a second page which would
 check for the cookie being sent.  Right?
 So I there is nothing I can check so I can do it with a single page?
 You can also set up php.ini and use the built-in sessions with
 http://php.net/session_start so that PHP will take care of this for you.

 That is what I was intending to do.  How do I find out if whether
 or not the session cookie was accepted using the built-in sessions?
 I found no function for such a test.
 Best,
 Craig


 --
 - Virtual Phonecards - Instant Pin by Email  -
 -   Large Selection - Great Rates-
 - http://speedypin.com/?aff=743co_branded=1 -
 -- 


 **
 **
 *  Craig Spencer *
 *  [EMAIL PROTECTED]*
 **
 ** 

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



Re: [PHP] Upload problem - final size is different

2007-05-08 Thread Richard Lynch
On Tue, May 8, 2007 2:12 pm, Eric Trahan wrote:
 $error = $_FILES['uneimage']['error'];

 That doesn't seem work in PHP 4.1.2...  I try it but $error is empty.


 And the function move_uploaded_file($_FILES['uneimage']['tmp_name'],
 $target_path) returns TRUE, so the upload work (in a way !).

 The problem is the file that is upload doesn't match the original
 file.

Is it truncated?

Does have random bytes in the middle missing?

Does only the last half of the file come through?

Is it a Mac with a resource fork not getting through?

How are you measuring the two file sizes?

PS You *still* should have the error checking, if it's available in
your version of PHP.

Actually, at 4.1.2 you probably should upgrade, I suspect,
irrespective of anything else anybody can say...

-- 
Some people have a gift link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

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



Re: [PHP] Re: session cookies enabled?

2007-05-08 Thread Richard Lynch
On Tue, May 8, 2007 2:56 pm, [EMAIL PROTECTED] wrote:
 Richard Lynch writes:
 Send one cookie, see if it comes back, and if it does, tie
 everything to that cookie.

 OK.  So how do I see if it comes back?

if (isset($_COOKIE['foo'])){
  //cookie came back
}
else{
  //cookie did NOT come back
}

 I send the user a page that tries to set a session cookie.  That
 page would then have to forward him to a second page which would
 check for the cookie being sent.  Right?

Yes.

Send the cookie with the homepage, login page, or whatever they are
first going to see.

Don't show them anything they shouldn't see without the cookie.

Check if they have a cookie.

It's probably best to just do all this in an include file that you
pull in on any page that needs cookies.

You can even make the include file abort the rest of the page output
if you want to require them to login with a valid session before going
any further.

 So I there is nothing I can check so I can do it with a single page?

Oh.

No.

It does seem like that would be a Nifty thing for the browser to have
sent with the first request, but that's just not the way it works.

It's an inherent 2-request process.

HTTP Request - Reply with Cookie - HTTP Request with Cookie (or not)

You'd have to duke it out with Mozilla and Microsoft to get that to
change, and they probably aren't gonna want to send a
pre-acceptane-of-cookie letter of intent with every HTTP requrest...

Especially not when the vast majority of HTTP requests don't need
cookies anyway...  Well, I never did a statistical analysis of that,
but across the 'net as  whole?  Yeah, I think it's a pretty safe
statement...

 You can also set up php.ini and use the built-in sessions with
 http://php.net/session_start so that PHP will take care of this
 for you.

 That is what I was intending to do.  How do I find out if whether
 or not the session cookie was accepted using the built-in sessions?

You don't.

You turn on the Cookies and the trans_sid in php.ini, and let PHP
worry about whether it was cookies or not and re-write your URLs if it
wasn't.

Or maybe it just re-writes them no matter what anyway, but prefers the
Cookie if it's there?

Whatever.

If, after doing that, you still feel the need to know if they used a
cookie or not, then you can use http://php.net/set_session_params and
choose a cookie/session name, and then you can test with:
if (isset($_COOKIE['whatever_you_chose_in_set_session_params'])){
}
and then you'll know if they used Cookies or Trans SID in URL...

But you won't really care, as all the info you need is in $_SESSION
either way, so it doesn't matter if they used a cookie or the ID in
the URL or sent a little squirrel along the wire with an engraved
acorn.

-- 
Some people have a gift link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

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



Re: [PHP] Re: session cookies enabled?

2007-05-08 Thread Richard Lynch
On Tue, May 8, 2007 5:50 pm, itoctopus wrote:
 setcookie(cookie_name, value);
 //redirect to another page using header
 header(location:.$your_url);

This will fail on some legacy browsers, if you need legacy browser
support.

In *MOST* architectures, your visitor can be given the cookie on a
page before the cookie-needing page, or they can be given alternate
content (i.e., a login) until you are happy with whatever cookie (and
its implied state of existence) are presented.

-- 
Some people have a gift link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

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



[PHP] sqlite AND OR query ?

2007-05-08 Thread chris

Hello,

I want to select two dates one being todays date and the other being 
-00-00 which just a date

in the database when no proper date has been entered.

Ive tried this but it does not work...

$today = date('Y-m-d');
$result = sqlite_query($db, SELECT * FROM domains WHERE date = '-00-00' 
AND '$today');


I just get items with '-00-00' returned or if I reverse it ie...

WHERE date = '$today'AND '-00-00');

I just get  $today items returned.

I also tried using OR instead of AND ie...

WHERE date = '-00-00' OR '$today');

But that seems to be returning all items in the db.


Thanks.

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



RE: [PHP] Articles system

2007-05-08 Thread Richard Lynch
You seem to have fixed it, at least for FF 1.5.0.5 on Gentoo.

Though there are 16 warnings according to the HTML Validator plug-in.

Some of them are pretty BS (imho) about width attribute for TD tag,
which, basically, every browser supports just fine, and is not going
away any time soon, afaict.

Not to mention that a page just won't look right if you can't dictate
column width, so it's kinda important to keep that bit there.

'Course, your CSS can can still come along and totally screw up your
tables, even the ones you SHOULD have for tabular data.  I'm dealing
with that issue today on an admin page that we weren't gonna bother
styling, until we found out just how screwy the CSS made it... Sigh.

But, really, an unescaped  in the page is almost always fixable.

And stray text inside the TR tag is almost always a programming error,
though I can't actually see what it's complaining about in my brief
look-through.

PS Yes, the long-scrolling article with ads like you have is WAY
better than that icky other one.

On Tue, May 8, 2007 2:28 pm, WeberSites LTD wrote:
 Not sure why it's not working with FF. the page passes validation at
 validator.w3.org.

 -Original Message-
 From: Richard Lynch [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, May 08, 2007 8:45 PM
 To: WeberSites LTD
 Cc: 'Robert Cummings'; 'Lester Caine'; php-general@lists.php.net
 Subject: RE: [PHP] Articles system

 On Tue, May 8, 2007 1:13 pm, WeberSites LTD wrote:
 This is interesting.
 I wonder if more people feel the same.

 Compare the articles on weberdev.com (my site) :
 Example : http://www.weberdev.com/ViewArticle/486

 Completely un-usable on Firefox 1.5.0.5 with current Gentoo Linux.

 I've got a full-width blue screen of death, and then a 1-inch (?)
 column of
 text (unreaedable) off screen to the right.

 I *would* like this better, if the layout actually worked.

 To the articles on devarticles.com for example.
 http://www.devarticles.com/c/a/Java/Getting-Started-with-Java-2D/

 There's an article on that page?

 Where?

 :-)

 Honestly, I can almost always find the same content on a site with
 much
 lower ad density, and will always choose a cleaner simple site over
 something that cluttered/messy.

 --
 Some people have a gift link here.
 Know what I want?
 I want you to buy a CD from some indie artist.
 http://cdbaby.com/browse/from/lynch
 Yeah, I get a buck. So?

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




-- 
Some people have a gift link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

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



Re: [PHP] Articles system

2007-05-08 Thread Richard Lynch
On Tue, May 8, 2007 2:33 pm, Stut wrote:
 WeberSites LTD wrote:
 Not sure why it's not working with FF. the page passes validation at
 validator.w3.org.

 Validation has never and will never mean it looks right. And it
 worries
 me that someone presenting themselves as an authority on web
 development
 would think so.

The following is an unsolicited plug from an unbiased third party
for a commercial online product (though with free trials that you can
abuse indefintely by making up new emails).

http://browsercam.com

Synopsis:

You send the URL, and you pick the OS/browser combos you want to test,
and they make screen shots for you of what it looks like.

A very usable variety of OS and browser combinations is provided.

You can tweak how long it waits for slow page to render.

You can choose if Flash is installed or not.

I'm not promising it suits every user, or will catch every rendering
bug, but it sure makes it easy to test a heck of a lot more OS/browser
combos than I'd want to try to install, even with VMWare or whatever.

YMMV

-- 
Some people have a gift link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

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



Re: [PHP] Articles system

2007-05-08 Thread Richard Lynch
On Tue, May 8, 2007 3:48 pm, Micky Hulse wrote:
 Richard Lynch wrote:
 
 Page Size:
 How much content should go on each site page? Like Goldilocks and the
 three bears, the answer is not too much, and not too little: just the
 right amount of content.

Or as Sr. Andre, OSC at St. Patrick's Grade School told us, and rather
stunned us, when we asked how long our papers should be:

It should be as long as a woman's skirt;  Long enough to cover
everything important, and short enough to be interesting.

I don't think I'll ever forget that advice, coming from a nun... :-)

[Note that I don't promise to not never *follow* the advice... :-)]

-- 
Some people have a gift link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

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



Re: [PHP] Articles system

2007-05-08 Thread Micky Hulse

Richard Lynch wrote:

It should be as long as a woman's skirt;  Long enough to cover
everything important, and short enough to be interesting.


Hehehe! Great quote! :D


--
Wishlists: http://snipurl.com/1gqpj
   Switch: http://browsehappy.com/
 BCC?: http://snipurl.com/w6f8
   My: http://del.icio.us/mhulse

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



Re: [PHP] Articles system

2007-05-08 Thread Richard Lynch
On Tue, May 8, 2007 2:50 pm, Stut wrote:
 WeberSites LTD wrote:
 1st, I never said I was any authority about anything :)
 I'm just building the weber sites as a hobby...

 Hobby or not, when you publish information on the web without a big
 message saying I have no frickin' idea what I'm talking about, you
 are
 presenting yourself as an authority on the subject. And when you
 answer
 questions on a mailing list with links to your site you are
 re-enforcing
 that point.

Just to play Devil's Advocate...

Are you suggesting that every site on the 'net, or even just those
which LOOK like worthy material, without such a disclaimer, IS
authoritative?...

:-)


Taking this a step further, or dragging it out into an open discussion:

I'm not a real huge fan of the folks on this list who post almost as
often as I with links to their own ad-revenue sites, but they are at
least (usually) on-topic and with valid information available to the
reader.

It might be better if they sprinkled in links to php.net or even
(gasp!) a competitor's site sometimes, but it's not like total
spamming, eh?

There are even times where I know that there is specific content on
such a site, and I'll recommend it.

SO where do you draw the line?

Seems to me we have to be reasonable about that.

And we also have to expect the Reader to at least have half a clue and
do some basic research about the source[s] of their info, and their
vested interests, and choose for themselves what info to pursue... 
Though based on experience with some posts, that may be expecting more
than will actually happen.  Aim high. :-)

-- 
Some people have a gift link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

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



RE: [PHP] Articles system

2007-05-08 Thread Richard Lynch
On Tue, May 8, 2007 2:54 pm, WeberSites LTD wrote:
 structure and semantics influence how the page looks.
 One browser may overlook a missing /TABLE and
 show the page and another may not. validating
 will show where you may have gone wrong.

 Writing good HTML is good practice :)

To be pedantic:

Validating MIGHT show you where you have gone wrong.

Or it might not.

Or, another way, a page that validates is more likely to render
somewhat consistently cross-platform than one that doesn't, on
average.

It's much more likely to continue to render in browser version
upgrades on the same os/browser.

But there's no guarantee it will render how you want, or at all,
really, until you see that sucker actually displayed in that
browser/OS with your own eyes.

Or, in my case, with the Designer's eyes, as I'm unlikely to spot a
few zillion buglets in display...  I see what I want to see, and
probably won't even notice that image dangling over the input box
differently on all three browsers, or the one paragraph in Times
instead of Verdana or...

Designer folks tend to look at me funny when I make them point to
exactly has their knickers in a twist, but there it is.  I won't even
notice it until they point to it.

Oh well.  Maybe I just got used to a heck of a lot of ugly sites too
early on.

Remember when the IMG tag was controversial?

OMG!!! Like, 5K on a webpage?  Are you crazy?  Nobody will visit that!

:-)

-- 
Some people have a gift link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

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



RE: [PHP] Articles system

2007-05-08 Thread Robert Cummings
On Tue, 2007-05-08 at 19:40 -0500, Richard Lynch wrote:

 OMG!!! Like, 5K on a webpage?  Are you crazy?  Nobody will visit that!

5K deflated right?? ;)

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

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



Re: [PHP] sqlite AND OR query ?

2007-05-08 Thread Richard Lynch
On Tue, May 8, 2007 7:09 pm, [EMAIL PROTECTED] wrote:
 I want to select two dates one being todays date and the other being
 -00-00 which just a date
 in the database when no proper date has been entered.

 Ive tried this but it does not work...

 $today = date('Y-m-d');
 $result = sqlite_query($db, SELECT * FROM domains WHERE date =
 '-00-00'
 AND '$today');

First of all, you can't just say ... AND '$today'

You need to say ... AND date = '$today' 

When you say ... AND '$today' :

The database just converted $today into a TRUE/FALSE question.

And since the only way to answer a T/F question is with 1/0 in a
computer, it decides that $today is not 0, because it's got numbers
ands stuff in it.

So it's ALWAYS true.

So your query really turned into:

where today = '-00-00' and TRUE

The and TRUE bit doesn't really do much, you see...

$x AND TRUE === $x

Actually, NULL might turn into false, if you have NULL dates.
And for technical reasons, midnight of January 1, 1970, might turn
into 0...  But ignore that for now, as you're typing something silly
anyway, and you want  where date = '-00-00' and date = '$today' 

Next, think about this:

date = '-00-00' AND date = '2007-05-08'

Is it possible for any date to be = to both of those values at once?

No.

A date cannot be both -00-00 and also be today as well.

Unless maybe you've invented a time machine... :-)

 I just get items with '-00-00' returned or if I reverse it ie...

 WHERE date = '$today'AND '-00-00');

 I just get  $today items returned.

 I also tried using OR instead of AND ie...

 WHERE date = '-00-00' OR '$today');

 But that seems to be returning all items in the db.

This, of course, turns into:

date = '-00-00' OR TRUE

and that is always TRUE:

$x OR TRUE === TRUE


Hope that helps.

Technically, this was all SQL, but it applies equally well in PHP with
 and any programming language.

-- 
Some people have a gift link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

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



Re: [PHP] Articles system

2007-05-08 Thread Mike Shanley

Richard Lynch wrote:

Sorry for the confusion.

Think of it this way:

Content is king.

When your advertising out-weighs your content, you lose visitors.

When you lose visitors, you lose revenue.

PS
Yes, I also hate the entertainment media formerly known as news.
Any questions?
  
I haven't watched TV (except briefly when HBO had carnivale) for almost 
five years. I don't listen to the radio. I don't go to any news/culture 
websites...


Even still, I break up the pages on my site. I do it primarily because I 
write long articles, and it's better for people to bookmark the one 
short page (on my site, a page-length is about 500-750 words for me, 
maybe more) for the info they want, than to bookmark a page that they 
have to search through every single time they need that info. I'm sure 
it irks you when you want to wade through one of those EXTRA-long pages 
at php.net for some obscure usage, right?


The ads on my site are modest and not really up to google standards. 
Personally, I only ever click on ad-links when I want to support the 
website I'm on anyway. I figure other people do the same Because 
really, after the first one, whose stupid enough to Click Here to claim 
your free laptop!?


--
   ~Mike Shanley~

   ~you are almost there~

 ~no, wait. you are there!~

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



[PHP] Killing a process with php

2007-05-08 Thread chris
Hi could someone give me examples on how to detect and kill processes on 
linux.
I have a number of scripts running as socketxxx.php these stop and start 
every hour.
But I also need to at the end of each day make sure their dead before the 
next days start.


These processes are also running as root user.

Thanks

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



Re: [PHP] sqlite AND OR query ?

2007-05-08 Thread chris

Thanks Richard.


- Original Message - 
From: Richard Lynch [EMAIL PROTECTED]

To: [EMAIL PROTECTED]
Cc: php-general@lists.php.net
Sent: Wednesday, May 09, 2007 1:49 AM
Subject: Re: [PHP] sqlite AND OR query ?



On Tue, May 8, 2007 7:09 pm, [EMAIL PROTECTED] wrote:

I want to select two dates one being todays date and the other being
-00-00 which just a date
in the database when no proper date has been entered.

Ive tried this but it does not work...

$today = date('Y-m-d');
$result = sqlite_query($db, SELECT * FROM domains WHERE date =
'-00-00'
AND '$today');


First of all, you can't just say ... AND '$today'

You need to say ... AND date = '$today' 

When you say ... AND '$today' :

The database just converted $today into a TRUE/FALSE question.

And since the only way to answer a T/F question is with 1/0 in a
computer, it decides that $today is not 0, because it's got numbers
ands stuff in it.

So it's ALWAYS true.

So your query really turned into:

where today = '-00-00' and TRUE

The and TRUE bit doesn't really do much, you see...

$x AND TRUE === $x

Actually, NULL might turn into false, if you have NULL dates.
And for technical reasons, midnight of January 1, 1970, might turn
into 0...  But ignore that for now, as you're typing something silly
anyway, and you want  where date = '-00-00' and date = '$today' 

Next, think about this:

date = '-00-00' AND date = '2007-05-08'

Is it possible for any date to be = to both of those values at once?

No.

A date cannot be both -00-00 and also be today as well.

Unless maybe you've invented a time machine... :-)


I just get items with '-00-00' returned or if I reverse it ie...

WHERE date = '$today'AND '-00-00');

I just get  $today items returned.

I also tried using OR instead of AND ie...

WHERE date = '-00-00' OR '$today');

But that seems to be returning all items in the db.


This, of course, turns into:

date = '-00-00' OR TRUE

and that is always TRUE:

$x OR TRUE === TRUE


Hope that helps.

Technically, this was all SQL, but it applies equally well in PHP with
 and any programming language.

--
Some people have a gift link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

--
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] Upload problem - final size is different

2007-05-08 Thread Eric Trahan

Le 2007-05-08 à 16:50, Richard Davey a écrit :

By how much is the difference? Are we talking a few bytes, a few  
megabytes, what?


A 116Kb file produce a 68Kb file on the server.  And a 152Kb file  
produce a 48Kb file on the server...




If you then download the file again, is it corrupted, or does it work?


Download the same file twice produce the same problem...


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



Re: [PHP] Articles system

2007-05-08 Thread Robert Cummings
On Tue, 2007-05-08 at 21:21 -0400, Mike Shanley wrote:
 Richard Lynch wrote:
  Sorry for the confusion.
 
  Think of it this way:
 
  Content is king.
 
  When your advertising out-weighs your content, you lose visitors.
 
  When you lose visitors, you lose revenue.
 
  PS
  Yes, I also hate the entertainment media formerly known as news.
  Any questions?

 I haven't watched TV (except briefly when HBO had carnivale) for almost 
 five years. I don't listen to the radio. I don't go to any news/culture 
 websites...
 
 Even still, I break up the pages on my site. I do it primarily because I 
 write long articles, and it's better for people to bookmark the one 
 short page (on my site, a page-length is about 500-750 words for me, 
 maybe more) for the info they want, than to bookmark a page that they 
 have to search through every single time they need that info.

That's why anchor fragments exist!

 I'm sure it irks you when you want to wade through one of those EXTRA-long 
 pages 
 at php.net for some obscure usage, right?

No, some of them go directly to the interesting fragment of the
document.

http://ca.php.net/manual/en/language.types.string.php#id2649426

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

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



[PHP] DBA flatfile mode

2007-05-08 Thread Ultraband

Hello,

I'm using PHP's dba flatfile mode to maintain a flatfile database with a few
records. It works good, but I was wondering about how it works. I notice
that after deleting a record, only what I take to be the key part of the
record is removed (the dba_* functions now longer read this record although
it remains in the flatfile), also when I update a record the key part of the
record is removed, and another record is added with a new key.

Is this how the flatfile mode is supposed to work? Is there somewhere I can
find a little more on the inner-workings of this? It seems like it could be
relatively easy to debug if it became corrupted (as it is a textfile).

Thanks in advance,
Fidel


Re: [PHP] Weird results with floor compiling with -march=pentium4 -mcpu=pentium4

2007-05-08 Thread Chris

Rodolfo Gonzalez Gonzalez wrote:

Hi,

Just for the record. I compiled PHP 5.2.2 with CFLAGS=-O2 
-march=pentium4 -mcpu=pentium4, as usual (I've done so with all the 
5.x.x series, and the proc is a Pentium 4, of course) and a customer 
complained about weird results in one of his scripts. I isolated the 
problem to be related to the floor function. The problem was that it 
returned weird results. Sample script:


?php

$nt = 100;
$promrow2['uni_gifts'] = 1;
$promrow2['unidades'] = 10;
$calc_cnt=floor(($nt*$promrow2['uni_gifts'])/$promrow2['unidades']);

print $calc_cnt;

?

printed :.01

Casting to integer the value returned by floor solved the problem. I 
recompiled with CFLAGS=-O2 -march=i686 -mcpu=i686 and the problem was 
solved too. I've compiled 5.2.2 with nocona optimizations without 
problems in other machines, so I don't consider this a normal behavior. 
But report submited. Has anyone faced the same problem?.


Best to ask the -internals list, they will be able to help a lot better 
than we can.


--
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] DBA flatfile mode

2007-05-08 Thread Chris

Ultraband wrote:

Hello,

I'm using PHP's dba flatfile mode to maintain a flatfile database with a 
few

records. It works good, but I was wondering about how it works. I notice
that after deleting a record, only what I take to be the key part of the
record is removed (the dba_* functions now longer read this record although
it remains in the flatfile), also when I update a record the key part of 
the

record is removed, and another record is added with a new key.

Is this how the flatfile mode is supposed to work? Is there somewhere I can
find a little more on the inner-workings of this? It seems like it could be
relatively easy to debug if it became corrupted (as it is a textfile).


It's how some databases work - they don't update the record in place, 
but delete  add the record at the end.


They mainly do that for MVCC reasons (ie different transactions possibly 
see different records for varying reasons).


To work out how dba_* functions work in particular grab the php source 
code and start reading ;)


--
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] PhP and Java login trouble

2007-05-08 Thread Chris

Brad Sumrall wrote:

I am trying to create a commonlogin.php which would perform a duel login for
phpbb and a java based FCKEditor combined

I have working code for each as an individual but not a clue how to combine
them.

 


Does anyone have any suggestion on where I can go for information about
this?


Firstly that's javaSCRIPT not java. Java is an entirely different beast.


Why not just copy the validateLogin javascript functionality and put 
it in a new function and then:


form action=/phpbb/login.php method=post target=_top 
onsubmit=return BBValidateLogin();


--
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] PhP and Java login trouble

2007-05-08 Thread Chris

Firstly always CC the list - others can provide help and suggestions too.

Brad Sumrall wrote:

Any chance you can tell me what I am doing wrong?

Brad


?php
if(!isset($_SESSION[userid]))
{
?
form action=/phpbb/login.php method=post target=_top 
onsubmit=return BBValidateLogin();


You don't have a javascript function called 'BBValidateLogin'.


You have one called validateLogin which references completely different 
form fields.


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

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