Re: [PHP] Articles system

2007-05-09 Thread Stut

Richard Lynch wrote:

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

:-)


"People" are stupid, and they believe what they want to believe. If 
they're looking for an answer, they'll take any answer that comes along, 
usually without any concern about the source.


So no, I'm not saything that every site on "the 'net" IS authoritative, 
I'm saying that anyone publishing information in any medium needs to 
understand that people will assume they know what they're talking about.



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. :-)


I agree that the reader should realise that not everything they read 
will be accurate, but readers tend to be people and are therefore 
generally stupid. Anyone who disagrees with that either lives in a box 
or demonstrates the point.


Where do I draw the line? I draw the line at mis-information. However, I 
could have phrased my comment slightly better, and for that I apologise.


-Stut

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



[PHP] Disable Soap Client and Soap Server in php5

2007-05-09 Thread Don Don
How can i disable soap client and server for php5, reason is that i've got 
NuSOAP (which i must use) and its classes clash with that of PHP5.  My php 
configuration (when using  displays soap client and server enabled 
for php5.  I need to disable if ..amd looking into the configs..to see how

cheers

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

Re: [PHP] PhP and Java login trouble

2007-05-09 Thread itoctopus
I agree with Chris, if you can do it this way, then it's much better. 
Working with FCKEditor's code was not one of the easiest things I did in my 
life.

-- 
itoctopus - http://www.itoctopus.com
"Chris" <[EMAIL PROTECTED]> wrote in message 
news:[EMAIL PROTECTED]
> 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:
>
>  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



[PHP] Re: Disable Soap Client and Soap Server in php5

2007-05-09 Thread itoctopus
I think the only way, and I really hope I'm mistaken, is to recompile php 
with "--disable-soap".
I don't think you can do it from php.ini.

-- 
itoctopus - http://www.itoctopus.com
"Don Don" <[EMAIL PROTECTED]> wrote in message 
news:[EMAIL PROTECTED]
> How can i disable soap client and server for php5, reason is that i've got 
> NuSOAP (which i must use) and its classes clash with that of PHP5.  My php 
> configuration (when using  displays soap client and server 
> enabled for php5.  I need to disable if ..amd looking into the configs..to 
> see how
>
> cheers
>
>
> -
> 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



Re: [PHP] Re: Disable Soap Client and Soap Server in php5

2007-05-09 Thread Don Don
I guess i installed php using apt-get along with the necessary modules e.g. 
soap etc, is it then the case of removing the soap library ? I dont want soap 
removed but just disabled.  Am not really sure if that will work.

itoctopus <[EMAIL PROTECTED]> wrote: I think the only way, and I really hope 
I'm mistaken, is to recompile php 
with "--disable-soap".
I don't think you can do it from php.ini.

-- 
itoctopus - http://www.itoctopus.com
"Don Don" 
 wrote in message 
news:[EMAIL PROTECTED]
> How can i disable soap client and server for php5, reason is that i've got 
> NuSOAP (which i must use) and its classes clash with that of PHP5.  My php 
> configuration (when using 
 displays soap client and server 
> enabled for php5.  I need to disable if ..amd looking into the configs..to 
> see how
>
> cheers
>
>
> -
> 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





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

RE: [PHP] Re: session cookies enabled?

2007-05-09 Thread Ford, Mike
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
> Sent: 08 May 2007 20:57

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

Check the SID constant after you've done session_start(). If it has an
empty value, the session is using cookies; otherwise, it'll have a value
of the form 'sessionname=sessionid', which is what is appended to the
URL (or inserted in forms as a hidden value) to propagate the
session-id.

Cheers!

Mike
 


Mike Ford, Electronic Information Services Adviser,
JG125, The Headingley Library, James Graham Building,
Headingley Campus, Beckett Park, LEEDS, LS6 3QS
United Kingdom
Tel: +44 113 812 4730 Fax: +44 113 812 3211


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

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



[PHP] Re: DBA flatfile mode

2007-05-09 Thread Al

See if there is a optimize, clean. vacuum or refresh command.  Most DBs have 
them by whatever name.

Maybe SQLite would be an alternate choice.

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

Thanks in advance,
Fidel



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



[PHP] Search function

2007-05-09 Thread Ryan A
Hey!

.A little background:
We have a site that has already been made.. a couple of hundred pages displayed 
via SMARTY templates, the site's in Swedish.

The navigation and other parts except for the center is taken care of by the 
templates and other scripts... the center main text is taken from the 
database(mySql) based on $page_id...its in a MySql TEXT field and has all the 
html etc that will be displayed in the center of the page.

End of background..

Now they want to add a "search function" to the site... a simpe textbox where a 
user enters a word or sentance and they get 20 results per page... with a "x.xx 
% closest to your query"  can anybody give me basic pointers on where to start?
Any links/software or articles too would be appreciated...

(I can do the pagentation etc... just the search logic...)

Thanks!
R





--
- The faulty interface lies between the chair and the keyboard.
- Creativity is great, but plagiarism is faster!
- Smile, everyone loves a moron. :-)
   
-
Ahhh...imagining that irresistible "new car" smell?
 Check outnew cars at Yahoo! Autos.

Re: [PHP] Killing a process with php

2007-05-09 Thread Myron Turner

[EMAIL PROTECTED] wrote:
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


One way to do this would be to let the script check itself:

 $end_of_day) {
   exit(0);
   }
   }

   pcntl_signal(SIGALRM, "signal_handler", true);
   pcntl_alarm(300);

?>
Here you set an alarm that checks every 5 minutes to see if the current 
timestamp is greater than the timestamp a minute before midnight.  If it 
is, then exit.  Or set a flag in the signal handler that is accessed 
elsewhere in your script which tells the script that it's time to exit.


--

_
Myron Turner
http://www.room535.org
http://www.bstatzero.org
http://www.mturner.org/XML_PullParser/

--
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-09 Thread Brad Fuller
[EMAIL PROTECTED] wrote:
> 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.


SELECT * FROM domains WHERE (date = '-00-00' OR date = '$today')

-B

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



RE: [PHP] Disable Soap Client and Soap Server in php5

2007-05-09 Thread Brad Fuller
Don Don wrote:
> How can i disable soap client and server for php5, reason is
> that i've got NuSOAP (which i must use) and its classes clash
> with that of PHP5.  My php configuration (when using
>  displays soap client and server enabled for php5.
>  I need to disable if ..amd looking into the configs..to see how
> 
> cheers

I also use NuSOAP with PHP5, all I did is edit nusoap.php and rename the
class "soapclient" to "soap_client".

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



[PHP] Re: Search function

2007-05-09 Thread David Robley
Ryan A wrote:

> Hey!
> 
> .A little background:
> We have a site that has already been made.. a couple of hundred pages
> displayed via SMARTY templates, the site's in Swedish.
> 
> The navigation and other parts except for the center is taken care of by
> the templates and other scripts... the center main text is taken from the
> database(mySql) based on $page_id...its in a MySql TEXT field and has all
> the html etc that will be displayed in the center of the page.
> 
> End of background..
> 
> Now they want to add a "search function" to the site... a simpe textbox
> where a user enters a word or sentance and they get 20 results per page...
> with a "x.xx % closest to your query"  can anybody give me basic pointers
> on where to start? Any links/software or articles too would be
> appreciated...
> 
> (I can do the pagentation etc... just the search logic...)
> 
> Thanks!
> R

Don't reinvent the wheel - mnogosearch has php compatibility.

http://www.mnogosearch.org/



Cheers
-- 
David Robley

Tried to play my shoehorn... all I got was footnotes!
Today is Prickle-Prickle, the 56th day of Discord in the YOLD 3173. 

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



[PHP] Problem with mssql_query()

2007-05-09 Thread Chris Boget

I noticed the following in my logs:

22:04:42  [warning] [D:\PHP\pear\DB\mssql.php][439]: mssql_query(): Unable 
to set query
22:04:42  [info]   Backtrace: [D:\PHP\pear\DB\mssql.php][439]; function( 
mssql_query ); args( 1[value:select @@ERROR as ErrorCode] 2[value:Resource 
id #21] )
22:04:42  [info]   Backtrace: [D:\PHP\pear\DB\mssql.php][489]; function( 
errornative )
22:04:42  [info]   Backtrace: [D:\PHP\pear\DB\mssql.php][145]; function( 
mssqlraiseerror )
22:04:42  [info]   Backtrace: [D:\PHP\pear\DB\common.php][1146]; function( 
simplequery ); args( 1[value:SELECT * FROM wording WHERE wording_id = 
'8' ] )
22:04:42  [critical] Error in the following query:SELECT * FROM 
wording WHERE wording_id = '8' DB Error: unknown error
22:04:52  [warning] [D:\PHP\pear\DB\mssql.php][439]: mssql_query(): Unable 
to set query
22:04:52  [info]   Backtrace: [D:\PHP\pear\DB\mssql.php][439]; function( 
mssql_query ); args( 1[value:select @@ERROR as ErrorCode] 2[value:Resource 
id #21] )
22:04:52  [info]   Backtrace: [D:\PHP\pear\DB\mssql.php][489]; function( 
errornative )
22:04:52  [info]   Backtrace: [D:\PHP\pear\DB\mssql.php][145]; function( 
mssqlraiseerror )
22:04:52  [info]   Backtrace: [D:\PHP\pear\DB\common.php][1146]; function( 
simplequery ); args( 1[value:SELECT * FROM wording WHERE wording_id = 
'8' ] )
22:04:52  [critical] Error in the following query:SELECT * FROM 
wording WHERE wording_id = '8' DB Error: unknown error


Why is mssql_query() saying that it's unable to set the query?  I did some 
searching on Google and found that people were having this problem but that 
was back in 2001 using an earlier version of PHP.  We are using version 
4.3.11 and Microsoft SQL Server  2000 - 8.00.2039 (Intel X86).


Has anyone had a similar problem?  What was your solution?  Why is this 
happening?


thnx,
Chris 


--
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-09 Thread Eric Trahan
After some other tests, I think the problem is with the rights of the  
file.


I made tests on my personnal Mac that runs Apache/1.3.33 (Darwin) PHP/ 
4.4.4.


Settings in PHP:
file_uploads: On
upload_tmp_dir: no value (so it uploads in /var/tmp/)
upload_max_filesize: 2M


My destination folder is page5, same as my server (everyone can read  
and write).  But when the files are droped in that folder, with the  
move_uploaded_file function, the owner is www and group is wheel.  So  
I can't open it...  But when I change the rights on the file, I can  
the see the images.


Is there a way to change the owner or the group of a file in PHP.

Eric

Le 2007-05-08 à 17:52, itoctopus a écrit :


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:



Une image
Du texte: 




Here is my PHP upload code:

";

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

echo $tmp_name . "" . $type . "" . $name . "";

$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 General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Isset Errors

2007-05-09 Thread Davide Bernard
Anyone got any suggestions on getting rid of these errors below?


[Wed May 09 08:59:05 2007] [error] [client 192.168.225.246] PHP Notice:  
Undefined index:  userstate in /srv/www/htdocs/resetpw.php on line 31, referer: 
https://ams.unt.edu/resetpw.php 
[Wed May 09 08:59:05 2007] [error] [client 192.168.225.246] PHP Notice:  
Undefined index:  userstate in /srv/www/htdocs/resetpw.php on line 36, referer: 
https://ams.unt.edu/resetpw.php 

 
Here's the lines of code I am getting the errors in PHP 5...Where can I insert 
some code to define 'userstate' ?


24. if (identifyUser()) {
25.   if ((isset($_SESSION['clientinfo']['ssn'][0]) && strcmp('9', 
$_SESSION['clientinfo']['ssn'][0]))
26.   || isset($_SESSION['clientsinfo'])) {
27.   $_SESSION['userstate'] = 'confirmssn';
28.  } else {
29.   $_SESSION['userstate'] = 'ssnverified';
30.  }
31. } elseif ($_SESSION['userstate'] == 'confirmssn' && confirmSSN()) {
32.  $_SESSION['userstate'] = 'ssnverified';
33. }
34. initMenu();
35. if (isset($_SESSION['userstate'])) return 0;
36. if ($_SESSION['userstate'] == 'confirmssn') {
37.   themeHeader();

--
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-09 Thread Daniel Brown

   PHP has two functions that may help you here, Eric --- chmod() and
chown().

   http://php.net/chmod
   http://php.net/chown

   It should be enough to chmod($filename,0644); the file if it's just an
image, or chmod($filename,0755); the file if it's a script.

On 5/9/07, Eric Trahan <[EMAIL PROTECTED]> wrote:


After some other tests, I think the problem is with the rights of the
file.

I made tests on my personnal Mac that runs Apache/1.3.33 (Darwin) PHP/
4.4.4.

Settings in PHP:
file_uploads: On
upload_tmp_dir: no value (so it uploads in /var/tmp/)
upload_max_filesize: 2M


My destination folder is page5, same as my server (everyone can read
and write).  But when the files are droped in that folder, with the
move_uploaded_file function, the owner is www and group is wheel.  So
I can't open it...  But when I change the rights on the file, I can
the see the images.

Is there a way to change the owner or the group of a file in PHP.

Eric

Le 2007-05-08 à 17:52, itoctopus a écrit :

> 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:
>>
>> > method="post">
>> 
>> Une image
>> Du texte: 
>> 
>> 
>>
>>
>> Here is my PHP upload code:
>>
>> >
>> echo $_POST['untexte'] . "";
>>
>> $tmp_name = $_FILES['uneimage']['tmp_name'];
>> $type = $_FILES['uneimage']['type'];
>> $name = $_FILES['uneimage']['name'];
>> $size = $_FILES['uneimage']['size'];
>>
>> echo $tmp_name . "" . $type . "" . $name . "";
>>
>> $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 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


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

2007-05-09 Thread Richard Davey

Eric Trahan wrote:


Is there a way to change the owner or the group of a file in PHP.


http://uk2.php.net/chown

But remember the chown will fail if the user Apache is running under 
does not have sufficient rights to perform the task.


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



RE: [PHP] Isset Errors

2007-05-09 Thread Edward Kay


> -Original Message-
> From: Davide Bernard [mailto:[EMAIL PROTECTED]
> Sent: 09 May 2007 15:18
> To: php-general@lists.php.net
> Subject: [PHP] Isset Errors
> 
> 
> Anyone got any suggestions on getting rid of these errors below?
> 
> 
> [Wed May 09 08:59:05 2007] [error] [client 192.168.225.246] PHP 
> Notice:  Undefined index:  userstate in 
> /srv/www/htdocs/resetpw.php on line 31, referer: 
> https://ams.unt.edu/resetpw.php 
> [Wed May 09 08:59:05 2007] [error] [client 192.168.225.246] PHP 
> Notice:  Undefined index:  userstate in 
> /srv/www/htdocs/resetpw.php on line 36, referer: 
> https://ams.unt.edu/resetpw.php 
> 
>  
> Here's the lines of code I am getting the errors in PHP 5...Where 
> can I insert some code to define 'userstate' ?
> 
> 
> 24. if (identifyUser()) {
> 25.   if ((isset($_SESSION['clientinfo']['ssn'][0]) && 
> strcmp('9', $_SESSION['clientinfo']['ssn'][0]))
> 26.   || isset($_SESSION['clientsinfo'])) {
> 27.   $_SESSION['userstate'] = 'confirmssn';
> 28.  } else {
> 29.   $_SESSION['userstate'] = 'ssnverified';
> 30.  }
> 31. } elseif ($_SESSION['userstate'] == 'confirmssn' && confirmSSN()) {
> 32.  $_SESSION['userstate'] = 'ssnverified';
> 33. }
> 34. initMenu();
> 35. if (isset($_SESSION['userstate'])) return 0;
> 36. if ($_SESSION['userstate'] == 'confirmssn') {
> 37.   themeHeader();
> 

If identifyUser() returns false, $_SESSION['userstate'] is not defined.

Edward

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



RE: [PHP] Articles system

2007-05-09 Thread bruce
hi rich(ard)!!

kind of an off point/topic reply. but here goes. the issue you mention is in
my opinion a part of a much larger issue that has to do with the anonymous
nature of the internet with regards mailing lists, as well as the kinds of
product review sites/blogs/etc...

there is no 'good' way for the average user/reader to know if what someone
says is really valid!!! if you, (or anyone else) created a kind of
ranking/rating process so that when a given person posts something, you
could quickly check that user's credentials, then you'd make yourself a nice
chunk of change...



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


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

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



[PHP] Ajax?

2007-05-09 Thread Emil Edeholt

Hi!

What do you guys use to develop ajax applications and do you have any 
good articles on the subject?


I've just about finished an ajaxish site but it wasn't fun. A lot of 
nesting javascript inside php calls, having to write the logic both in 
javascript and php and so on. The source looks ugly and was time 
consuming to debug.


Thanks!

Kind regards Emil

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



Re: [PHP] Problem with mssql_query()

2007-05-09 Thread Dan Shirah

Post your block of code from your connection string (Leave out your
username/password info please) to the end of the result set for your query
so I can take a look at it.

On 5/9/07, Chris Boget <[EMAIL PROTECTED]> wrote:


I noticed the following in my logs:

22:04:42  [warning] [D:\PHP\pear\DB\mssql.php][439]: mssql_query(): Unable
to set query
22:04:42  [info]   Backtrace: [D:\PHP\pear\DB\mssql.php][439]; function(
mssql_query ); args( 1[value:select @@ERROR as ErrorCode] 2[value:Resource
id #21] )
22:04:42  [info]   Backtrace: [D:\PHP\pear\DB\mssql.php][489]; function(
errornative )
22:04:42  [info]   Backtrace: [D:\PHP\pear\DB\mssql.php][145]; function(
mssqlraiseerror )
22:04:42  [info]   Backtrace: [D:\PHP\pear\DB\common.php][1146]; function(
simplequery ); args( 1[value:SELECT * FROM wording WHERE wording_id =
'8' ] )
22:04:42  [critical] Error in the following query:SELECT * FROM
wording WHERE wording_id = '8' DB Error: unknown error
22:04:52  [warning] [D:\PHP\pear\DB\mssql.php][439]: mssql_query(): Unable
to set query
22:04:52  [info]   Backtrace: [D:\PHP\pear\DB\mssql.php][439]; function(
mssql_query ); args( 1[value:select @@ERROR as ErrorCode] 2[value:Resource
id #21] )
22:04:52  [info]   Backtrace: [D:\PHP\pear\DB\mssql.php][489]; function(
errornative )
22:04:52  [info]   Backtrace: [D:\PHP\pear\DB\mssql.php][145]; function(
mssqlraiseerror )
22:04:52  [info]   Backtrace: [D:\PHP\pear\DB\common.php][1146]; function(
simplequery ); args( 1[value:SELECT * FROM wording WHERE wording_id =
'8' ] )
22:04:52  [critical] Error in the following query:SELECT * FROM
wording WHERE wording_id = '8' DB Error: unknown error

Why is mssql_query() saying that it's unable to set the query?  I did some
searching on Google and found that people were having this problem but
that
was back in 2001 using an earlier version of PHP.  We are using version
4.3.11 and Microsoft SQL Server  2000 - 8.00.2039 (Intel X86).

Has anyone had a similar problem?  What was your solution?  Why is this
happening?

thnx,
Chris

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




[PHP] Ajax Developer

2007-05-09 Thread Efrain Sarmiento
AJAX Developer  (Web Designer / Developer).  MUST HAVE:  1 year AJAX
Experience, HTML, CSS, DHTML, OOJS, XML, JAVASCRIRPT, J2EE, and at lease
an IDE like Photoshop, Dreamweaver, Eclipse or similar.  Jersey City,
NJ, 6 months ongoing.  $560/day C2C.




 

_

Efrain Sarmiento
Technical Recruiter
MISI company

p: 212.355.5585 x332
f: 212.751.5964
c: 917.365.5656
[EMAIL PROTECTED]

Informed Usability  |  Innovative Solutions   |  Reliable Sourcing 
www.misicompany.com  
_

The information contained in this message is sent in the strictest
confidence for the addressee only. It is intended only for the use of
the addressee and may contain legally
privileged/confidential/proprietary information. If you have received
this email in error you are requested to preserve its confidentiality
and advise the sender.

 


Re: [PHP] Ajax Developer

2007-05-09 Thread Stut

Efrain Sarmiento wrote:

AJAX Developer  (Web Designer / Developer).  MUST HAVE:  1 year AJAX
Experience, HTML, CSS, DHTML, OOJS, XML, JAVASCRIRPT, J2EE, and at lease
an IDE like Photoshop, Dreamweaver, Eclipse or similar.  Jersey City,
NJ, 6 months ongoing.  $560/day C2C.


Hands up everyone who uses the Photoshop IDE...

-Stut

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



Re: [PHP] Ajax Developer

2007-05-09 Thread Davi
Em Quarta 09 Maio 2007 12:12, Stut escreveu:
> Efrain Sarmiento wrote:
> > AJAX Developer  (Web Designer / Developer).  MUST HAVE:  1 year AJAX
> > Experience, HTML, CSS, DHTML, OOJS, XML, JAVASCRIRPT, J2EE, and at lease
> > an IDE like Photoshop, Dreamweaver, Eclipse or similar.  Jersey City,
> > NJ, 6 months ongoing.  $560/day C2C.
>
> Hands up everyone who uses the Photoshop IDE...
>

=P

_o/

hehehe

How can I do an while loop in Photoshop CS 3?? =]
Using the pen tool? On which layer?

thanks! =]

-- 
Davi Vidal
[EMAIL PROTECTED]
[EMAIL PROTECTED]
--
"Religion, ideology, resources, land,
spite, love or "just because"...
No matter how pathetic the reason,
it's enough to start a war. "


pgpWAyX29KtcQ.pgp
Description: PGP signature


RE: [PHP] Problem with mssql_query()

2007-05-09 Thread Chris Boget
We use PEAR's DB class as our abstration layer.  Here is the connection
function from DB\mssql.php:
 
function connect($dsninfo, $persistent = false)
{
if (!DB::assertExtension('mssql') &&
!DB::assertExtension('sybase')
&& !DB::assertExtension('sybase_ct'))
{
return $this->raiseError(DB_ERROR_EXTENSION_NOT_FOUND);
}
$this->dsn = $dsninfo;
$dbhost = $dsninfo['hostspec'] ? $dsninfo['hostspec'] :
'localhost';
$dbhost .= $dsninfo['port'] ? ',' . $dsninfo['port'] : '';
 
$connect_function = $persistent ? 'mssql_pconnect' :
'mssql_connect';
 
if ($dbhost && $dsninfo['username'] && $dsninfo['password']) {
$conn = @$connect_function($dbhost, $dsninfo['username'],
   $dsninfo['password']);
} elseif ($dbhost && $dsninfo['username']) {
$conn = @$connect_function($dbhost, $dsninfo['username']);
} else {
$conn = @$connect_function($dbhost);
}
if (!$conn) {
return $this->raiseError(DB_ERROR_CONNECT_FAILED, null,
null,
 null,
@mssql_get_last_message());
}
if ($dsninfo['database']) {
if ([EMAIL PROTECTED]($dsninfo['database'], $conn)) {
return $this->raiseError(DB_ERROR_NODBSELECTED, null,
null,
 null,
@mssql_get_last_message());
}
$this->_db = $dsninfo['database'];
}
$this->connection = $conn;
return DB_OK;
}

We use the DSN: mssql://UID:[EMAIL PROTECTED]/db_name.  We are not using
persistent connections.
 
thnx,
Chris
 



From: Dan Shirah [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, May 09, 2007 11:07 AM
To: Chris Boget
Cc: PHP General
Subject: Re: [PHP] Problem with mssql_query()


Post your block of code from your connection string (Leave out your
username/password info please) to the end of the result set for your
query so I can take a look at it.


On 5/9/07, Chris Boget <[EMAIL PROTECTED]> wrote: 

I noticed the following in my logs:

22:04:42  [warning] [D:\PHP\pear\DB\mssql.php][439]:
mssql_query(): Unable 
to set query
22:04:42  [info]   Backtrace: [D:\PHP\pear\DB\mssql.php][439];
function(
mssql_query ); args( 1[value:select @@ERROR as ErrorCode]
2[value:Resource
id #21] )
22:04:42  [info]   Backtrace: [D:\PHP\pear\DB\mssql.php][489];
function( 
errornative )
22:04:42  [info]   Backtrace: [D:\PHP\pear\DB\mssql.php][145];
function(
mssqlraiseerror )
22:04:42  [info]   Backtrace: [D:\PHP\pear\DB\common.php][1146];
function(
simplequery ); args( 1[value:SELECT * FROM wording WHERE
wording_id = 
'8' ] )
22:04:42  [critical] Error in the following query:SELECT
* FROM
wording WHERE wording_id = '8' DB Error: unknown error
22:04:52  [warning] [D:\PHP\pear\DB\mssql.php][439]:
mssql_query(): Unable 
to set query
22:04:52  [info]   Backtrace: [D:\PHP\pear\DB\mssql.php][439];
function(
mssql_query ); args( 1[value:select @@ERROR as ErrorCode]
2[value:Resource
id #21] )
22:04:52  [info]   Backtrace: [D:\PHP\pear\DB\mssql.php][489];
function( 
errornative )
22:04:52  [info]   Backtrace: [D:\PHP\pear\DB\mssql.php][145];
function(
mssqlraiseerror )
22:04:52  [info]   Backtrace: [D:\PHP\pear\DB\common.php][1146];
function(
simplequery ); args( 1[value:SELECT * FROM wording WHERE
wording_id = 
'8' ] )
22:04:52  [critical] Error in the following query:SELECT
* FROM
wording WHERE wording_id = '8' DB Error: unknown error

Why is mssql_query() saying that it's unable to set the query?
I did some 
searching on Google and found that people were having this
problem but that
was back in 2001 using an earlier version of PHP.  We are using
version
4.3.11 and Microsoft SQL Server  2000 - 8.00.2039 (Intel X86).

Has anyone had a similar problem?  What was your solution?  Why
is this
happening?

thnx,
Chris

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






Re: [PHP] Ajax Developer

2007-05-09 Thread Edward Vermillion


On May 9, 2007, at 10:12 AM, Stut wrote:


Efrain Sarmiento wrote:

AJAX Developer  (Web Designer / Developer).  MUST HAVE:  1 year AJAX
Experience, HTML, CSS, DHTML, OOJS, XML, JAVASCRIRPT, J2EE, and at  
lease

an IDE like Photoshop, Dreamweaver, Eclipse or similar.  Jersey City,
NJ, 6 months ongoing.  $560/day C2C.


Hands up everyone who uses the Photoshop IDE...



Ohh! That's in CS3 right?!? Cool! I've gotta get me one of those!

Ed

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



[PHP] Re: session cookies enabled?

2007-05-09 Thread ccspencer
Ford, Mike writes: 

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


Check the SID constant after you've done session_start(). If it has an
empty value, the session is using cookies; otherwise, it'll have a value
of the form 'sessionname=sessionid', which is what is appended to the
URL (or inserted in forms as a hidden value) to propagate the
session-id.


Interesting idea. 


This brings up a question.  In order to decide whether to use cookies
or SID the built-in sessions must be testing to see if the user's
browser will accept the session cookies.  How do they do that? 


If they do it by the "2 page", send a cookie and see if it comes
back to the second page method we have been talking about, then
somehow, they are sureptiously inserting a forward to a non-
existant page!  Right?  How do they do that? 

Best, 

Craig 



--
- Virtual Phonecards - Instant Pin by Email  -
-   Large Selection - Great Rates-
- http://speedypin.com/?aff=743&co_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] Ajax Developer

2007-05-09 Thread Robert Cummings
On Wed, 2007-05-09 at 10:23 -0500, Edward Vermillion wrote:
> On May 9, 2007, at 10:12 AM, Stut wrote:
> 
> > Efrain Sarmiento wrote:
> >> AJAX Developer  (Web Designer / Developer).  MUST HAVE:  1 year AJAX
> >> Experience, HTML, CSS, DHTML, OOJS, XML, JAVASCRIRPT, J2EE, and at  
> >> lease
> >> an IDE like Photoshop, Dreamweaver, Eclipse or similar.  Jersey City,
> >> NJ, 6 months ongoing.  $560/day C2C.
> >
> > Hands up everyone who uses the Photoshop IDE...
> >
> 
> Ohh! That's in CS3 right?!? Cool! I've gotta get me one of those!

I'm much more partial to the Gimp IDE :)

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] Ajax Developer

2007-05-09 Thread Davi
Em Quarta 09 Maio 2007 12:41, Robert Cummings escreveu:
> On Wed, 2007-05-09 at 10:23 -0500, Edward Vermillion wrote:
> > On May 9, 2007, at 10:12 AM, Stut wrote:
> > > Efrain Sarmiento wrote:
> > >> AJAX Developer  (Web Designer / Developer).  MUST HAVE:  1 year AJAX
> > >> Experience, HTML, CSS, DHTML, OOJS, XML, JAVASCRIRPT, J2EE, and at
> > >> lease
> > >> an IDE like Photoshop, Dreamweaver, Eclipse or similar.  Jersey City,
> > >> NJ, 6 months ongoing.  $560/day C2C.
> > >
> > > Hands up everyone who uses the Photoshop IDE...
> >
> > Ohh! That's in CS3 right?!? Cool! I've gotta get me one of those!
>
> I'm much more partial to the Gimp IDE :)
>

MS Paint or Xpaint sounds little better to me... =]


-- 
Davi Vidal
[EMAIL PROTECTED]
[EMAIL PROTECTED]
--
"Religion, ideology, resources, land,
spite, love or "just because"...
No matter how pathetic the reason,
it's enough to start a war. "


pgpwVNnRgmJnk.pgp
Description: PGP signature


RE: [PHP] Ajax?

2007-05-09 Thread Edward Kay


> -Original Message-
> From: Emil Edeholt [mailto:[EMAIL PROTECTED]
> Sent: 09 May 2007 16:05
> To: php-general@lists.php.net
> Subject: [PHP] Ajax?
>
>
> Hi!
>
> What do you guys use to develop ajax applications and do you have any
> good articles on the subject?
>
> I've just about finished an ajaxish site but it wasn't fun. A lot of
> nesting javascript inside php calls, having to write the logic both in
> javascript and php and so on. The source looks ugly and was time
> consuming to debug.
>
> Thanks!
>
> Kind regards Emil
>

Have a look at the various frameworks available since these handle much of
the nasty details:
http://en.wikipedia.org/wiki/List_of_web_application_frameworks#PHP

I've been using Qcodo (http://www.qcodo.com) for a recent web app and am
impressed at how quickly I've been able to develop with it. For
JavaScript/CSS, I've also been using Yahoo User Interface (YUI) components
which I'm also really impressed with: http://developer.yahoo.com/yui/

The thing with frameworks and libraries is that everyone will have their
favourite for one reason or another. You just have to find the one you feel
most comfortable with.

Hope that helps,
Edward

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



[PHP] Apache 2.2.x and PHP 5.2.x

2007-05-09 Thread Philip Thompson
Hi. I've searched the archives, but haven't found anything recent  
that has helped me. I am wanting to install AMP on my new computer  
(32-bit Vista) and was interested in the stability/compatibility/etc  
with Apache 2.2.x and PHP 5.2.x. The PHP site doesn't seem to really  
*encourage* the installation for Apache 2.2.x, but still provides the  
ability. I was wondering what other developers thought. Any opinions?  
My system will be no more than a development and testing environment  
- nothing put into widespread production.


Thanks in advance,
~Philip

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



RE: [PHP] Ajax Developer

2007-05-09 Thread Edward Kay


> -Original Message-
> From: Robert Cummings [mailto:[EMAIL PROTECTED]
> On Wed, 2007-05-09 at 10:23 -0500, Edward Vermillion wrote:
> > On May 9, 2007, at 10:12 AM, Stut wrote:
> >
> > > Efrain Sarmiento wrote:
> > >> AJAX Developer  (Web Designer / Developer).  MUST HAVE:  1 year AJAX
> > >> Experience, HTML, CSS, DHTML, OOJS, XML, JAVASCRIRPT, J2EE, and at
> > >> lease
> > >> an IDE like Photoshop, Dreamweaver, Eclipse or similar.  Jersey City,
> > >> NJ, 6 months ongoing.  $560/day C2C.
> > >
> > > Hands up everyone who uses the Photoshop IDE...
> > >
> >
> > Ohh! That's in CS3 right?!? Cool! I've gotta get me one of those!
>
> I'm much more partial to the Gimp IDE :)
>

Ah, but can you code JAVASCRIRPT in the Gimp IDE? ;)

I'm not sure why the job requires you to lease the IDE though - Photoshop is
a bit pricey, but it's not that bad!

E

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



Re: [PHP] Apache 2.2.x and PHP 5.2.x

2007-05-09 Thread Daniel Brown

   I think you answered your own question at the bottom of your email:


My system will be no more than a development and testing environment
- nothing put into widespread production.


   If you're just testing and developing on it, it's absolutely safe to try
things to see how they work.


On 5/9/07, Philip Thompson <[EMAIL PROTECTED]> wrote:


Hi. I've searched the archives, but haven't found anything recent
that has helped me. I am wanting to install AMP on my new computer
(32-bit Vista) and was interested in the stability/compatibility/etc
with Apache 2.2.x and PHP 5.2.x. The PHP site doesn't seem to really
*encourage* the installation for Apache 2.2.x, but still provides the
ability. I was wondering what other developers thought. Any opinions?
My system will be no more than a development and testing environment
- nothing put into widespread production.

Thanks in advance,
~Philip

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


Re: [PHP] Ajax Developer

2007-05-09 Thread Edward Vermillion


On May 9, 2007, at 10:41 AM, Robert Cummings wrote:


On Wed, 2007-05-09 at 10:23 -0500, Edward Vermillion wrote:

On May 9, 2007, at 10:12 AM, Stut wrote:


Efrain Sarmiento wrote:
AJAX Developer  (Web Designer / Developer).  MUST HAVE:  1 year  
AJAX

Experience, HTML, CSS, DHTML, OOJS, XML, JAVASCRIRPT, J2EE, and at
lease
an IDE like Photoshop, Dreamweaver, Eclipse or similar.  Jersey  
City,

NJ, 6 months ongoing.  $560/day C2C.


Hands up everyone who uses the Photoshop IDE...



Ohh! That's in CS3 right?!? Cool! I've gotta get me one of those!


I'm much more partial to the Gimp IDE :)



Do I need to update to RH5.2 to get that? I don't see it in my 5.0  
distribution


Ed

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



Re: [PHP] Ajax Developer

2007-05-09 Thread Daniel Brown

On 5/9/07, Edward Kay <[EMAIL PROTECTED]> wrote:



Ah, but can you code JAVASCRIRPT in the Gimp IDE? ;)



   Is JAVASCRIRPT another of those Web 2.0 languages?  ;-P

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


[PHP] getting $_ENV variables

2007-05-09 Thread C.R.Vegelin
Hi All,

I get nothing when using: echo $_ENV['OS'];
Also nothing when using: print_r($_ENV);
However, phpinfo(); show a full list of ENV settings.
How to get $_ENV variables ?
I am using PHP version 5.2.0.

TIA, Cor

RE: [PHP] Ajax?

2007-05-09 Thread bruce
hey edward...

from my reading.. i thought yahoo's user interface (yui) components where
for interfacing with yahoo am i missing something here??

thanks

-bruce


-Original Message-
From: Edward Kay [mailto:[EMAIL PROTECTED]
Sent: Wednesday, May 09, 2007 8:44 AM
To: Emil Edeholt; PHP General List
Subject: RE: [PHP] Ajax?




> -Original Message-
> From: Emil Edeholt [mailto:[EMAIL PROTECTED]
> Sent: 09 May 2007 16:05
> To: php-general@lists.php.net
> Subject: [PHP] Ajax?
>
>
> Hi!
>
> What do you guys use to develop ajax applications and do you have any
> good articles on the subject?
>
> I've just about finished an ajaxish site but it wasn't fun. A lot of
> nesting javascript inside php calls, having to write the logic both in
> javascript and php and so on. The source looks ugly and was time
> consuming to debug.
>
> Thanks!
>
> Kind regards Emil
>

Have a look at the various frameworks available since these handle much of
the nasty details:
http://en.wikipedia.org/wiki/List_of_web_application_frameworks#PHP

I've been using Qcodo (http://www.qcodo.com) for a recent web app and am
impressed at how quickly I've been able to develop with it. For
JavaScript/CSS, I've also been using Yahoo User Interface (YUI) components
which I'm also really impressed with: http://developer.yahoo.com/yui/

The thing with frameworks and libraries is that everyone will have their
favourite for one reason or another. You just have to find the one you feel
most comfortable with.

Hope that helps,
Edward

--
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] getting $_ENV variables

2007-05-09 Thread Daniel Brown

   When I print_r($_ENV); from the CLI on 5.0.4 I get a bunch of results,
no problem but no $_ENV['OS'] variable.  Further, when I check my
phpinfo(); output, there are even fewer $_ENV variables printed than the CLI
offers.

   I'm not certain about this, Cor, but my guess is that PHP 5.x.x may have
altered the default $_ENV output to hide some of this information --- which
is a good thing, in my opinion, because then you won't just have some
run-of-the-mill script kiddie checking out the details of a box for known
security holes.

   Of course, that doesn't necessarily stop  or checking the $_SERVER['SERVER_SIGNATURE'] variable for the OS
information so perhaps this response is just one of those white-bread
responses.  Something to chew on, but you really don't get anything from it.


On 5/9/07, C.R.Vegelin <[EMAIL PROTECTED]> wrote:


Hi All,

I get nothing when using: echo $_ENV['OS'];
Also nothing when using: print_r($_ENV);
However, phpinfo(); show a full list of ENV settings.
How to get $_ENV variables ?
I am using PHP version 5.2.0.

TIA, Cor





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


Re: [PHP] Ajax?

2007-05-09 Thread Greg Donald

On 5/9/07, bruce <[EMAIL PROTECTED]> wrote:

from my reading.. i thought yahoo's user interface (yui) components where
for interfacing with yahoo am i missing something here??


Yes.  :)

The Yahoo! User Interface (YUI) Library is a set of utilities and
controls, written in JavaScript, for building richly interactive web
applications using techniques such as DOM scripting, DHTML and AJAX.

http://developer.yahoo.com/yui/


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

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



Re: [PHP] getting $_ENV variables

2007-05-09 Thread Greg Donald

On 5/9/07, C.R.Vegelin <[EMAIL PROTECTED]> wrote:

I get nothing when using: echo $_ENV['OS'];
Also nothing when using: print_r($_ENV);
However, phpinfo(); show a full list of ENV settings.
How to get $_ENV variables ?
I am using PHP version 5.2.0.


You can get it other ways:


php -r 'system("set|grep OS");'

HOSTNAME=neptune.local
HOSTTYPE=powerpc
OSTYPE=darwin8.0
POSIXLY_CORRECT=y



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

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



Re: [PHP] Ajax?

2007-05-09 Thread Satyam
I´ve been using the YUI library and, specifically for AJAX, the Connection 
Manager (http://developer.yahoo.com/yui/connection/), but also many of the 
other components in YUI.


I find that some of the frameworks are a little heavy, covering both the 
JavaScript side and the PHP server side. In some you deal with the PHP side 
and in some misterious way JavaScript gets sent to the client, but they are 
too obscure for my taste, I prefer to know what goes on.


YUI coupled with Firefox with the FireBug debugger plugin is a great 
combination and on the server side you are quite free to do and use whatever 
you want. And don't miss the videos of the presentations of  Douglas 
Crockford on JavaScrit and the DOM.


Satyam



- Original Message - 
From: "Emil Edeholt" <[EMAIL PROTECTED]>

To: 
Sent: Wednesday, May 09, 2007 5:04 PM
Subject: [PHP] Ajax?



Hi!

What do you guys use to develop ajax applications and do you have any good 
articles on the subject?


I've just about finished an ajaxish site but it wasn't fun. A lot of 
nesting javascript inside php calls, having to write the logic both in 
javascript and php and so on. The source looks ugly and was time consuming 
to debug.


Thanks!

Kind regards Emil

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



--
No virus found in this incoming message.
Checked by AVG Free Edition. Version: 7.5.467 / Virus Database: 
269.6.6/794 - Release Date: 08/05/2007 14:23





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



Re: [PHP] Ajax?

2007-05-09 Thread Martin Marques

Greg Donald escribió:

On 5/9/07, bruce <[EMAIL PROTECTED]> wrote:

from my reading.. i thought yahoo's user interface (yui) components where
for interfacing with yahoo am i missing something here??


Yes.  :)

The Yahoo! User Interface (YUI) Library is a set of utilities and
controls, written in JavaScript, for building richly interactive web
applications using techniques such as DOM scripting, DHTML and AJAX.

http://developer.yahoo.com/yui/


Prototype is very good too.

http://www.prototypejs.org/

Combined with Rico you can do very interesting things:

http://www.openrico.org/

--
select 'mmarques' || '@' || 'unl.edu.ar' AS email;
-
Martín Marqués  |   Programador, DBA
Centro de Telemática| Administrador
   Universidad Nacional
del Litoral
-

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



RE: [PHP] Ajax?

2007-05-09 Thread bruce
hey greg!

thanks for the update... have to have my guys check it out..

to be honest, i'm not sure where i got the impression that the yui was for
yahoo!!!

thanks mukch!


-Original Message-
From: Greg Donald [mailto:[EMAIL PROTECTED]
Sent: Wednesday, May 09, 2007 9:28 AM
To: php-general@lists.php.net
Subject: Re: [PHP] Ajax?


On 5/9/07, bruce <[EMAIL PROTECTED]> wrote:
> from my reading.. i thought yahoo's user interface (yui) components where
> for interfacing with yahoo am i missing something here??

Yes.  :)

The Yahoo! User Interface (YUI) Library is a set of utilities and
controls, written in JavaScript, for building richly interactive web
applications using techniques such as DOM scripting, DHTML and AJAX.

http://developer.yahoo.com/yui/


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

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

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



Re: [PHP] getting $_ENV variables

2007-05-09 Thread Richard Lynch
On Wed, May 9, 2007 11:57 am, C.R.Vegelin wrote:
> I get nothing when using: echo $_ENV['OS'];
> Also nothing when using: print_r($_ENV);
> However, phpinfo(); show a full list of ENV settings.
> How to get $_ENV variables ?
> I am using PHP version 5.2.0.

If phpinfo() shows them, then that is what is there...

There's nothing magical about phpinfo() function.

It doesn't do much more than your print_r($_ENV)

So unless you are running your script in a *DIFFERENT* environment
(e.g., CLI or CGI versus Apache Module) you ought to see the same
things if you spell $_ENV correctly...

You can't even mess up variable scope, since it's a superglobal...

No, wait...

I think if you write it as a function and then declare $_ENV as
'global' you might actually manage to mess up and end up with your own
$_ENV instead of the real one...  Never tried that, but it might
"break" it.

-- 
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] getting $_ENV variables

2007-05-09 Thread Richard Lynch
On Wed, May 9, 2007 11:26 am, Daniel Brown wrote:
> When I print_r($_ENV); from the CLI on 5.0.4 I get a bunch of
> results,
> no problem but no $_ENV['OS'] variable.  Further, when I check my
> phpinfo(); output, there are even fewer $_ENV variables printed than
> the CLI
> offers.

CLI and CGI and Apache module *are* different environments.

Different things will be available to ENV when PHP runs.

> I'm not certain about this, Cor, but my guess is that PHP 5.x.x
> may have
> altered the default $_ENV output to hide some of this information ---
> which
> is a good thing, in my opinion, because then you won't just have some
> run-of-the-mill script kiddie checking out the details of a box for
> known
> security holes.

Almost for sure, PHP just blindly passes on anything you are stupid
enough to have crammed into ENV... :-)

I doubt that it strips out anything, for any reason.

-- 
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] Apache 2.2.x and PHP 5.2.x

2007-05-09 Thread Richard Lynch
On Wed, May 9, 2007 10:48 am, Philip Thompson wrote:
> Hi. I've searched the archives, but haven't found anything recent
> that has helped me. I am wanting to install AMP on my new computer
> (32-bit Vista) and was interested in the stability/compatibility/etc
> with Apache 2.2.x and PHP 5.2.x. The PHP site doesn't seem to really
> *encourage* the installation for Apache 2.2.x, but still provides the
> ability. I was wondering what other developers thought. Any opinions?
> My system will be no more than a development and testing environment
> - nothing put into widespread production.

There's nothing wrong with installing Apache 2.

However...

As I understand it:

The biggest "win" in Apache 2 is probably the thread stuff.

Some PHP extensions are not thread-safe.

So you have to do "pre-fork mode" of Apache, which, for the most part,
puts you back into an Apache 1.x environment.

For a dev box, Apache 2 would be a FINE selection, especially if the
production server is already Apache 2, or you want to be sure you'll
be able to move forward safely.

Just be sure to stress-test it once in a while, to make sure you're
not introducing a thread-safe issue, if you decide to turn on Apache
thread stuff.

-- 
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] Ajax Developer

2007-05-09 Thread Richard Lynch
On Wed, May 9, 2007 10:09 am, Efrain Sarmiento wrote:
> AJAX Developer  (Web Designer / Developer).  MUST HAVE:  1 year AJAX
> Experience, HTML, CSS, DHTML, OOJS, XML, JAVASCRIRPT, J2EE, and at
> lease
> an IDE like Photoshop, Dreamweaver, Eclipse or similar.  Jersey City,
> NJ, 6 months ongoing.  $560/day C2C.

Photoshop as an IDE?

That must be pretty interesting... :-)

Where's the 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] Ajax Developer

2007-05-09 Thread Richard Lynch
On Wed, May 9, 2007 10:12 am, Stut wrote:
> Efrain Sarmiento wrote:
>> AJAX Developer  (Web Designer / Developer).  MUST HAVE:  1 year AJAX
>> Experience, HTML, CSS, DHTML, OOJS, XML, JAVASCRIRPT, J2EE, and at
>> lease
>> an IDE like Photoshop, Dreamweaver, Eclipse or similar.  Jersey
>> City,
>> NJ, 6 months ongoing.  $560/day C2C.
>
> Hands up everyone who uses the Photoshop IDE...

I switch to GIMP IDE ages ago.

All the same features, albeit under different menus, but OpenSource
and Free and runs on my OSes of choice.

-- 
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] Ajax Developer

2007-05-09 Thread Efrain Sarmiento
Can someone clarify that for me...I got that directly off job
description from Lehman.  Thanks 


_

Efrain Sarmiento
Technical Recruiter
MISI company

p: 212.355.5585 x332
f: 212.751.5964
c: 917.365.5656
[EMAIL PROTECTED]

Informed Usability  |  Innovative Solutions   |  Reliable Sourcing 
www.misicompany.com
_

The information contained in this message is sent in the strictest
confidence for the addressee only. It is intended only for the use of
the addressee and may contain legally
privileged/confidential/proprietary information. If you have received
this email in error you are requested to preserve its confidentiality
and advise the sender.


-Original Message-
From: Richard Lynch [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, May 09, 2007 1:56 PM
To: Efrain Sarmiento
Cc: php-general@lists.php.net
Subject: Re: [PHP] Ajax Developer

On Wed, May 9, 2007 10:09 am, Efrain Sarmiento wrote:
> AJAX Developer  (Web Designer / Developer).  MUST HAVE:  1 year AJAX 
> Experience, HTML, CSS, DHTML, OOJS, XML, JAVASCRIRPT, J2EE, and at 
> lease an IDE like Photoshop, Dreamweaver, Eclipse or similar.  Jersey 
> City, NJ, 6 months ongoing.  $560/day C2C.

Photoshop as an IDE?

That must be pretty interesting... :-)

Where's the 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] Ajax Developer

2007-05-09 Thread Richard Lynch
On Wed, May 9, 2007 10:54 am, Daniel Brown wrote:
> On 5/9/07, Edward Kay <[EMAIL PROTECTED]> wrote:
>> Ah, but can you code JAVASCRIRPT in the Gimp IDE? ;)
>
>
> Is JAVASCRIRPT another of those Web 2.0 languages?  ;-P

No, but here's a Tip:

If you spell it that way, the code you write just plain doesn't run,
and nothing tells you what went wrong.

*THAT* particular typo only wasted a half-day for me a couple weeks ago.

Sigh.

-- 
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] Ajax Developer

2007-05-09 Thread Daniel Brown

   Is it just me, or does it seem like everyone things AJAX is some sort of
PHP extension or "new way of programming in PHP"?

   The name alone more or less says otherwise AJAX is supposed to be
Asynchronous JavaScript And XML, right?

   Or am I just talking out of my ass again?  I seem to be doing that a lot
today for some reason



On 5/9/07, Richard Lynch <[EMAIL PROTECTED]> wrote:


On Wed, May 9, 2007 10:09 am, Efrain Sarmiento wrote:
> AJAX Developer  (Web Designer / Developer).  MUST HAVE:  1 year AJAX
> Experience, HTML, CSS, DHTML, OOJS, XML, JAVASCRIRPT, J2EE, and at
> lease
> an IDE like Photoshop, Dreamweaver, Eclipse or similar.  Jersey City,
> NJ, 6 months ongoing.  $560/day C2C.

Photoshop as an IDE?

That must be pretty interesting... :-)

Where's the 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





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


Re: [PHP] Ajax Developer

2007-05-09 Thread Daniel Brown

On 5/9/07, Richard Lynch <[EMAIL PROTECTED]> wrote:


On Wed, May 9, 2007 10:54 am, Daniel Brown wrote:
> Is JAVASCRIRPT another of those Web 2.0 languages?  ;-P

No, but here's a Tip:

If you spell it that way, the code you write just plain doesn't run,
and nothing tells you what went wrong.

*THAT* particular typo only wasted a half-day for me a couple weeks ago.

Sigh.



   The same basic thing happened to me when I was working on an interface
to the PayPal NVP API for their Website Payments Pro setup yesterday.  It
took me almost four hours of debugging with no error return to realize I had
an ending slash on a non-directory URI (it was an "extensionless" file).

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


Re: [PHP] Ajax Developer

2007-05-09 Thread Richard Lynch
On Wed, May 9, 2007 10:54 am, Edward Vermillion wrote:
>> I'm much more partial to the Gimp IDE :)
>>
>
> Do I need to update to RH5.2 to get that? I don't see it in my 5.0
> distribution

I thought *I* was way behind with my RH 7 main desktop/dev/production
box. [Don't ask why it is all three of those at once...]

Though, I guess, now that the network card conked out (afaict) it's
not a production server anymore.  Oh well.

I don't think I'll ever really grok /sbin/route -n output, but it
looks just like the one that's working, and it's still not working,
and I can swap cat5 cables and the other one works, so I guess it
almost has to be the network card just up and died...  Right???

-- 
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] Ajax Developer

2007-05-09 Thread Richard Lynch
On Wed, May 9, 2007 12:58 pm, Efrain Sarmiento wrote:
> Can someone clarify that for me...I got that directly off job
> description from Lehman.  Thanks

Dude, it's kind of your JOB to know these things, and if you don't
know them, you can use Google to find out...

Asking a few thousand PHP Developers to explain what Photoshop is, and
isn't, to you...

Well, it's kind of like walking into a crowded barber shop and asking
what a carbeurator is...

Don't be surprised if the answers you get are 100% wrong, or jokes, or
both at once.

-- 
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] Isset Errors

2007-05-09 Thread Richard Lynch


On Wed, May 9, 2007 9:17 am, Davide Bernard wrote:
> Anyone got any suggestions on getting rid of these errors below?
>
>
> [Wed May 09 08:59:05 2007] [error] [client 192.168.225.246] PHP
> Notice:  Undefined index:  userstate in /srv/www/htdocs/resetpw.php on
> line 31, referer: https://ams.unt.edu/resetpw.php
> [Wed May 09 08:59:05 2007] [error] [client 192.168.225.246] PHP
> Notice:  Undefined index:  userstate in /srv/www/htdocs/resetpw.php on
> line 36, referer: https://ams.unt.edu/resetpw.php
>
>
> Here's the lines of code I am getting the errors in PHP 5...Where can
> I insert some code to define 'userstate' ?
>
>
> 24. if (identifyUser()) {
> 25.   if ((isset($_SESSION['clientinfo']['ssn'][0]) &&
> strcmp('9', $_SESSION['clientinfo']['ssn'][0]))
> 26.   || isset($_SESSION['clientsinfo'])) {
> 27.   $_SESSION['userstate'] = 'confirmssn';
> 28.  } else {
> 29.   $_SESSION['userstate'] = 'ssnverified';
> 30.  }
> 31. } elseif ($_SESSION['userstate'] == 'confirmssn' && confirmSSN())
> {

elseif (isset($_SESSION['userstate']) && $_SESSION['userstate'] ==
'confirmssn' && confirmSSN()){

> 32.  $_SESSION['userstate'] = 'ssnverified';
> 33. }
> 34. initMenu();
> 35. if (isset($_SESSION['userstate'])) return 0;
> 36. if ($_SESSION['userstate'] == 'confirmssn') {
> 37.   themeHeader();
>
> --
> 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] Problem with mssql_query()

2007-05-09 Thread Richard Lynch
I dunno 100% for sure about MSsql, but I know for sure that MySQL lets
you do wording_id = '8' when wording_id is an INT and PostgreSQL will
simply throw an error, because '8' is not no way no how an INT.  It's
a string.

I suspect MS SQL may be doing the same, in its own unique bland
non-desript way of just saying "error"...

Try losing the '8' and use just 8

On Wed, May 9, 2007 8:57 am, Chris Boget wrote:
> I noticed the following in my logs:
>
> 22:04:42  [warning] [D:\PHP\pear\DB\mssql.php][439]: mssql_query():
> Unable
> to set query
> 22:04:42  [info]   Backtrace: [D:\PHP\pear\DB\mssql.php][439];
> function(
> mssql_query ); args( 1[value:select @@ERROR as ErrorCode]
> 2[value:Resource
> id #21] )
> 22:04:42  [info]   Backtrace: [D:\PHP\pear\DB\mssql.php][489];
> function(
> errornative )
> 22:04:42  [info]   Backtrace: [D:\PHP\pear\DB\mssql.php][145];
> function(
> mssqlraiseerror )
> 22:04:42  [info]   Backtrace: [D:\PHP\pear\DB\common.php][1146];
> function(
> simplequery ); args( 1[value:SELECT * FROM wording WHERE wording_id =
> '8' ] )
> 22:04:42  [critical] Error in the following query:SELECT *
> FROM
> wording WHERE wording_id = '8' DB Error: unknown error
> 22:04:52  [warning] [D:\PHP\pear\DB\mssql.php][439]: mssql_query():
> Unable
> to set query
> 22:04:52  [info]   Backtrace: [D:\PHP\pear\DB\mssql.php][439];
> function(
> mssql_query ); args( 1[value:select @@ERROR as ErrorCode]
> 2[value:Resource
> id #21] )
> 22:04:52  [info]   Backtrace: [D:\PHP\pear\DB\mssql.php][489];
> function(
> errornative )
> 22:04:52  [info]   Backtrace: [D:\PHP\pear\DB\mssql.php][145];
> function(
> mssqlraiseerror )
> 22:04:52  [info]   Backtrace: [D:\PHP\pear\DB\common.php][1146];
> function(
> simplequery ); args( 1[value:SELECT * FROM wording WHERE wording_id =
> '8' ] )
> 22:04:52  [critical] Error in the following query:SELECT *
> FROM
> wording WHERE wording_id = '8' DB Error: unknown error
>
> Why is mssql_query() saying that it's unable to set the query?  I did
> some
> searching on Google and found that people were having this problem but
> that
> was back in 2001 using an earlier version of PHP.  We are using
> version
> 4.3.11 and Microsoft SQL Server  2000 - 8.00.2039 (Intel X86).
>
> Has anyone had a similar problem?  What was your solution?  Why is
> this
> happening?
>
> thnx,
> Chris
>
> --
> 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] Search function

2007-05-09 Thread Richard Lynch
On Wed, May 9, 2007 7:34 am, Ryan A wrote:
> Now they want to add a "search function" to the site... a simpe
> textbox where a user enters a word or sentance and they get 20 results
> per page... with a "x.xx % closest to your query"  can anybody give me
> basic pointers on where to start?
> Any links/software or articles too would be appreciated...

You could google for "full text search" and "weighted search" and find
more than enough reading to fill the rest of your life... :-)

With only a couple hundred pages of content, it's kinda hard to really
make a good search engine...

You'd almost be better off just building a form that leads to Google
and using theirs, really.

-- 
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-09 Thread Richard Lynch
On Wed, May 9, 2007 10:36 am, [EMAIL PROTECTED] wrote:
> This brings up a question.  In order to decide whether to use cookies
> or SID the built-in sessions must be testing to see if the user's
> browser will accept the session cookies.  How do they do that?

The same way you would do it.

Actually, they might have just used:

$cookie_name = session_name();
if (isset($_COOKIE[$cookie_name])){
  $session_id = $_COOKIE[$cookie_name];
}
elseif (isset($_REQUEST[$cookie_name])){
  $session_id = $_REQUEST[$cookie_name];
}
else{
  $session_id = uniquid();
}

> If they do it by the "2 page", send a cookie and see if it comes
> back to the second page method we have been talking about, then
> somehow, they are sureptiously inserting a forward to a non-
> existant page!  Right?  How do they do that?


No, that's not how it works.

JUST send the dang cookie on every page.

And check if it's there on every page.

And whatever first page the user gets to, with no cookie, be sure you
send them suitable content for having no cookie.

-- 
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] Disable Soap Client and Soap Server in php5

2007-05-09 Thread Richard Lynch


On Wed, May 9, 2007 8:27 am, Brad Fuller wrote:
> Don Don wrote:
>> How can i disable soap client and server for php5, reason is
>> that i've got NuSOAP (which i must use) and its classes clash
>> with that of PHP5.  My php configuration (when using
>>  displays soap client and server enabled for php5.
>>  I need to disable if ..amd looking into the configs..to see how
>>
>> cheers
>
> I also use NuSOAP with PHP5, all I did is edit nusoap.php and rename
> the
> class "soapclient" to "soap_client".

It depends how "smart" apt-get is gonna be, but you might try:
uninstall soap
uninstall php
re-install php FIRST
re-install SOAP

Since PHP will think SOAP was not there, it won't add in the PHP SOAP
stuff.

If apt-get is "smart" and figures out that you wanted SOAP + PHP
because you already have PHP, you have no choice but to compile from
source and choose what you want, instead of taking whatever apt-get
feels like giving 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] Killing a process with php

2007-05-09 Thread Richard Lynch


On Tue, May 8, 2007 8:26 pm, [EMAIL PROTECTED] wrote:
> 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.

su to root

ps auxwww | grep socketxxx.php

If 'xxx' changes, you could just maybe do:

ps aux | grep socket | grep php

Once you're sure you know what you want to kill, you could use 'kill'
to kill it.

You'll need the process ID number, which is the first number you see
in the row, right after the username.

Now that I've answered your question...


Almost for sure, whatever it is you THINK you should be doing, you've
done something else horribly wrong that is making you THINK you should
be searching for and killing these processes, but you shouldn't.  :-)

Since they already ARE php, it would probably be MUCH simpler to alter
the PHP in your socketxxx.php script, and add a couple lines like
this:



This presumes you actually need the process to die in the first place,
which sounds kinda hinky in and of itself, to tell you the truth...

Most Un*x socket-based processes start at boot and run forever until
the machine is shutdown, or somebody trips over the power-cord.

-- 
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] Ajax Developer

2007-05-09 Thread Sancar Saran
On Wednesday 09 May 2007 21:03, Richard Lynch wrote:
> On Wed, May 9, 2007 10:54 am, Edward Vermillion wrote:
> >> I'm much more partial to the Gimp IDE :)
> >
> > Do I need to update to RH5.2 to get that? I don't see it in my 5.0
> > distribution
>
> I thought *I* was way behind with my RH 7 main desktop/dev/production
> box. [Don't ask why it is all three of those at once...]
>
> Though, I guess, now that the network card conked out (afaict) it's
> not a production server anymore.  Oh well.
>
> I don't think I'll ever really grok /sbin/route -n output, but it
> looks just like the one that's working, and it's still not working,
> and I can swap cat5 cables and the other one works, so I guess it
> almost has to be the network card just up and died...  Right???
Cat 5 ?
Red Hat 5.0 ?

Noobs...

-- 
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-09 Thread Richard Lynch
On Wed, May 9, 2007 9:15 am, Eric Trahan wrote:
> After some other tests, I think the problem is with the rights of the
> file.
>
> I made tests on my personnal Mac that runs Apache/1.3.33 (Darwin) PHP/
> 4.4.4.
>
> Settings in PHP:
> file_uploads: On
> upload_tmp_dir: no value (so it uploads in /var/tmp/)
> upload_max_filesize: 2M
>
>
> My destination folder is page5, same as my server (everyone can read
> and write).  But when the files are droped in that folder, with the
> move_uploaded_file function, the owner is www and group is wheel.  So
> I can't open it...  But when I change the rights on the file, I can
> the see the images.
>
> Is there a way to change the owner or the group of a file in PHP.

There probably is a http://php.net/chown, but unless you are running
Apache as 'root' (DON'T DO THAT!) then it won't work.

However, you can use http://php.net/chmod to make the file readable by
you as well as the 'www' user.

It is very frightening, however, to see the group 'wheel' on the file,
since 'wheel' is usually reserved for users that can 'su' to root, and
having uploaded image files in that group just doesn't feel right.

-- 
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] Every Wednesday....

2007-05-09 Thread Daniel Brown

   I've noticed a pattern every Wednesday, I start to go a little loopy
around 1-2:00p in the afternoon.  I can't concentrate, I get restless,
circus music plays louder in my head than normal

   So it should come as no surprise that, when trying to execute a file
that just wouldn't work on one partition, I started literally banging my
head off the wall.  However, when I looked back at my progress up to this
point, it was almost like the command-line history was telling some sort of
story this is actually taken from my log a few minutes ago.

[EMAIL PROTECTED] adventure]$ ./adv
bash: adv: cannot execute binary file
[EMAIL PROTECTED] adventure]$ ./adv
bash: adv: cannot execute binary file
[EMAIL PROTECTED] adventure]$ ./adv
bash: adv: cannot execute binary file
[EMAIL PROTECTED] adventure]$ vi /alaska/research/calc/calc.c
[EMAIL PROTECTED] adventure]$ gcc -o calc /alaska/research/calc/calc.c
[EMAIL PROTECTED] adventure]$ ./calc MONEY_REMAINING
There is an estimated $2,120 remaining as of 9 May, 2007, at 13:53 EDT.
[EMAIL PROTECTED] adventure]$ echo "So I can run binary"
So I can run binary
[EMAIL PROTECTED] adventure]$ #Talking to myself gets me nowhere. This is 
pissing
me off! I'll try a new program written on this partition.
[EMAIL PROTECTED] adventure]$ vi whore.c
[EMAIL PROTECTED] adventure]$ gcc -o whore whore.c
[EMAIL PROTECTED] adventure]$ ./whore MONEY_REMAINING
There is an estimated $2,120 remaining as of 9 May, 2007, at 13:59 EDT.
[EMAIL PROTECTED] adventure]$ strip whore
[EMAIL PROTECTED] adventure]$ ./whore MONEY_REMAINING
There is an estimated $2,020 remaining as of 9 May, 2007, at 14:00 EDT.

   At the end there, it just so happened that in the course of less than 60
seconds, a transfer for $100 went out on an automated payment at 2:00p local
time from one account to the next (checking to savings, which I have set to
do at 2:00p every Wednesday afternoon automatically).

   The moral of the story?  It's better to do this:
[EMAIL PROTECTED] adventure]$ file adv
adv: Linux/i386 demand-paged executable (ZMAGIC), stripped

    than to `strip whore`



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


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

2007-05-09 Thread Daniel Brown

   I was thinking the same thing, Richard, but didn't say anything because
of my limited experience with MacOS.  I know it's built on BSD, but to be
honest, I have no clue what may have changed over the years.


On 5/9/07, Richard Lynch <[EMAIL PROTECTED]> wrote:


On Wed, May 9, 2007 9:15 am, Eric Trahan wrote:
> After some other tests, I think the problem is with the rights of the
> file.
>
> I made tests on my personnal Mac that runs Apache/1.3.33 (Darwin) PHP/
> 4.4.4.
>
> Settings in PHP:
> file_uploads: On
> upload_tmp_dir: no value (so it uploads in /var/tmp/)
> upload_max_filesize: 2M
>
>
> My destination folder is page5, same as my server (everyone can read
> and write).  But when the files are droped in that folder, with the
> move_uploaded_file function, the owner is www and group is wheel.  So
> I can't open it...  But when I change the rights on the file, I can
> the see the images.
>
> Is there a way to change the owner or the group of a file in PHP.

There probably is a http://php.net/chown, but unless you are running
Apache as 'root' (DON'T DO THAT!) then it won't work.

However, you can use http://php.net/chmod to make the file readable by
you as well as the 'www' user.

It is very frightening, however, to see the group 'wheel' on the file,
since 'wheel' is usually reserved for users that can 'su' to root, and
having uploaded image files in that group just doesn't feel right.

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





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


Re: [PHP] Ajax Developer

2007-05-09 Thread Robert Cummings
On Wed, 2007-05-09 at 13:03 -0500, Richard Lynch wrote:
> On Wed, May 9, 2007 10:54 am, Edward Vermillion wrote:
> >> I'm much more partial to the Gimp IDE :)
> >>
> >
> > Do I need to update to RH5.2 to get that? I don't see it in my 5.0
> > distribution
> 
> I thought *I* was way behind with my RH 7 main desktop/dev/production
> box. [Don't ask why it is all three of those at once...]

I've got 7 running in vmware :)

I use it to build PHP, MySQL, and Apache (and various other nick knacks)
for a customer's server.

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] Scalable Site Architecture

2007-05-09 Thread bruce
Hi..

In looking for what's required fo a site, I'm trying to find
docs/overview/mentors to talk to/etc,...

Basically, I'm considering what's required in terms of
hardware/apps/functionality for each server to be able to support a
site/system of ~100,000/day

i'm considering:
 http server
 app server (single/multiple)
 db server

Is there someone I can actually talk to who's actually been involved with
the architecting/implemenation of this kind of structure.

Any really good pointers that someone can point me to to get well versed in
this area.

Thanks

-Bruce

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



Re: [PHP] Every Wednesday....

2007-05-09 Thread Jason Pruim


On May 9, 2007, at 2:35 PM, Daniel Brown wrote:




   The moral of the story?  It's better to do this:
[EMAIL PROTECTED] adventure]$ file adv
adv: Linux/i386 demand-paged executable (ZMAGIC), stripped

    than to `strip whore`



Cheaper to I'd say

Jason

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



Re: [PHP] Every Wednesday....

2007-05-09 Thread Daniel Brown

   Exactly and one of the more fitting things to note on that --- I
`strip whore` and MONEY_REMAINING drops $100 in only one minute.

   With a record like that, I should expect my wife to leave me within a
few months.



On 5/9/07, Jason Pruim <[EMAIL PROTECTED]> wrote:



On May 9, 2007, at 2:35 PM, Daniel Brown wrote:


>
>The moral of the story?  It's better to do this:
> [EMAIL PROTECTED] adventure]$ file adv
> adv: Linux/i386 demand-paged executable (ZMAGIC), stripped
>
> than to `strip whore`


Cheaper to I'd say

Jason





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


RE: [PHP] Killing a process with php

2007-05-09 Thread bruce
hey chris...

can you tell us what you're trying to accomplish, and what the processes
you're looking to kill are doing? why are you trying to kill them on a daily
basis.. i'm assuming that you don't want hanging socket processes just
sitting on your system...

-bruce


-Original Message-
From: Richard Lynch [mailto:[EMAIL PROTECTED]
Sent: Wednesday, May 09, 2007 11:30 AM
To: [EMAIL PROTECTED]
Cc: php-general@lists.php.net
Subject: Re: [PHP] Killing a process with php




On Tue, May 8, 2007 8:26 pm, [EMAIL PROTECTED] wrote:
> 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.

su to root

ps auxwww | grep socketxxx.php

If 'xxx' changes, you could just maybe do:

ps aux | grep socket | grep php

Once you're sure you know what you want to kill, you could use 'kill'
to kill it.

You'll need the process ID number, which is the first number you see
in the row, right after the username.

Now that I've answered your question...


Almost for sure, whatever it is you THINK you should be doing, you've
done something else horribly wrong that is making you THINK you should
be searching for and killing these processes, but you shouldn't.  :-)

Since they already ARE php, it would probably be MUCH simpler to alter
the PHP in your socketxxx.php script, and add a couple lines like
this:



This presumes you actually need the process to die in the first place,
which sounds kinda hinky in and of itself, to tell you the truth...

Most Un*x socket-based processes start at boot and run forever until
the machine is shutdown, or somebody trips over the power-cord.

--
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] Ajax?

2007-05-09 Thread Sancar Saran
On Wednesday 09 May 2007 18:04, Emil Edeholt wrote:
> Hi!
>
> What do you guys use to develop ajax applications and do you have any
> good articles on the subject?
>
> I've just about finished an ajaxish site but it wasn't fun. A lot of
> nesting javascript inside php calls, having to write the logic both in
> javascript and php and so on. The source looks ugly and was time
> consuming to debug.
>
> Thanks!
>
> Kind regards Emil
Hi,
I'm using xajax www.xajaxproject.org

It was stable and  too easy to usage. If your english good enough you can do 
someting in 15 mins...

Regards

Sancar

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



[PHP] Setting Column Widths in Excel Using PHP?

2007-05-09 Thread Jay Paulson
I¹m exporting some data out of MySQL and providing it as a download in
Excel.  However, I need to set the widths of the columns.  Does anyone know
how to do this without the PEAR module?

Thanks for any help!


RE: [PHP] Ajax?

2007-05-09 Thread WeberSites LTD
You can see some examples here : http://www.php-code-search.com/?q=ajax

In most of my AJAX development I use : http://script.aculo.us/

berber

 

-Original Message-
From: Emil Edeholt [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, May 09, 2007 5:05 PM
To: php-general@lists.php.net
Subject: [PHP] Ajax?

Hi!

What do you guys use to develop ajax applications and do you have any good
articles on the subject?

I've just about finished an ajaxish site but it wasn't fun. A lot of nesting
javascript inside php calls, having to write the logic both in javascript
and php and so on. The source looks ugly and was time consuming to debug.

Thanks!

Kind regards Emil

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

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



[PHP] Apache ErrorDocument / PHP header() interaction does not work as expected

2007-05-09 Thread Marc Liyanage


I recently worked on error handling and three related issues/ 
questions came up.



1.) I am trying to trigger Apache ErrorDocument handlers by setting  
appropriate HTTP status codes in my PHP code, but I don't get the  
expected results.


My PHP file:


The status code is sent to the browser, but the ErrorDocument handler  
is never triggered, it looks like Apache passes the value on to the  
client, but does not interpret it.


The last posting on this page suggests something to this effect:

http://www.webmasterworld.com/apache/3205630.htm


This surprises me, is that really how it works? In my Perl  
applications running under mod_perl, returning status 500 does  
*both*, send that status to the browser and make Apache interpret and  
act upon the value. What is mod_perl doing differently?


I can actually have two separate status values, one that gets sent to  
the browser (Apache2::RequestRec::status()), and one that is returned  
to the Apache server (the handler() method's return value). Does  
something similar exist in PHP? Or do I really have to replicate the  
ErrorDocument functionality in my PHP code?



2.) In my tests with mod_perl just now I also realized that mod_perl  
will properly signal an error 500 condition to Apache if a Perl error  
such as a syntax error or an unhandled exception occurs. A configured  
ErrorDocument 500 handler will be triggered, as I would expect it to be.


It seems that PHP does not signal an error 500 to Apache when PHP  
code fails. Wouldn't this be a useful addition for exactly this  
reason (ability to use Apache ErrorDocument).



3.) While playing around with set_error_handler(), I also saw that  
syntax errors are not trappable with a custom error handler. I use an  
autoloader that loads classes on demand, and if one of the class  
files loaded at run-time has a syntax error, my error handler is  
bypassed. Combined with the inability to trigger ErrorDocuments  
described above, doesn't this mean that it is absolutely impossible  
to hide such errors from users by replacing them with a "friendly"  
error page when using PHP?


That would mean that I am not even able to emulate the ErrorDocument  
feature in PHP code.







_
Marc Liyanage   http://www.entropy.ch

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



[PHP] [EMAIL PROTECTED]

2007-05-09 Thread Farid Jamea
Hello,

To me this seems to be a very strange problem.

I have a static html page (index.html) that shows correctly on both FF2 & 
IE7.

I splitted the website up into different sections: (header, footer, ...). To 
do this I have used:
--

Some code goes here...

--
 and so on.
When I test my page (now index.php), it shows perfect on Firefox, but in IE 
some stuff are not in their right place. I have checked the source code of 
both index.html and index.php and they seem both identical to me.

Do you know why IE fails to correctly render the page?

Thanks 

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



Re: [PHP] Ajax?

2007-05-09 Thread jekillen


On May 9, 2007, at 8:04 AM, Emil Edeholt wrote:


Hi!

What do you guys use to develop ajax applications and do you have any 
good articles on the subject?


I've just about finished an ajaxish site but it wasn't fun. A lot of 
nesting javascript inside php calls, having to write the logic both in 
javascript and php and so on. The source looks ugly and was time 
consuming to debug.


Thanks!


Anything involving javascript development has several built in 
debugging facilities
1: Alert dialogs: You may find it a chore to learn how to use them 
effectively. But
   the current content of any variable can be displayed with an alert 
dialog. You
   have to pay attention to how strings are concatenated; with +, The 
actual

   variable name cannot be quoted.
2: Browser error reporting, in Netscape species, javascript console. 
Take a hint,
all source code text should be formated for Unix/Linux ( line feed 
line endings)
If you do scripting on a Classic Mac OS <= OS9, the line endings 
are carriage;

and Windows uses both carriage return and line feed.
return. You will drive your self crazy cussing the console because 
it will not refer

to lines containing syntax errors, but some disrelated lines.
3. View source window in browser to see exactly what the browser is 
getting on

page load.
4. Forms: I have coded special forms just for the sake of development 
and debug
   of javascript apps.  All globals are visible through out the script, 
WITH THE EXCEPTION
   OF SOME THAT ARE DEFINED IN SOURCED JS FILES; Opening a javascript 
window is
   in a function does not seem to register if the function is in a 
sourced file.
5. Patience, patience, patience, some masochism, Several large 
available paper back
   text books. No one will describe all you might need to know about 
issues like rollovers,
   DHTML, etc, Imagination and ingenuity, or the will to search and 
sift through others
   source code until you find what you are looking for, and then making 
it work for you.
  That's it, I have some suggestion that there are systems available 
for javascript but I

  have done without long enough to have my methods and approaches.
One more thing, php and javascript work very well together. I have even 
written a
function to display php variable values as javascript alert dialogs. It 
will not function
as break points for php like it does with javascript, but at least you 
do not have to

decipher php error smeared all over the screen.
And Ajax, even though I have not cracked that particular aspect of 
javascript as yet,

looks very worthwhile.
Jeff K

--
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-09 Thread Brad Sumrall
I have a question about your suggestion.
Would it not be easier to simply carry the sessionid from the php session
validation to the javascript?
Instead of: if(document.frmlogin.txtusername.value=="")
{
alert("Please Enter Username.");
document.frmlogin.txtusername.focus();
return false;

Why would I want to "re-enter the user name"?
My common sense "which maybe completely wrong" say, YOU ARE VALIDATED IN
PHPBB via issetid, now post to (document.frmlogin.userid.value=="")

This is why I am not catching your angle.

PhP makes so much more sense. This javascript integration is really giving
me a headache!

Suggestions?

Brad




-Original Message-
From: Chris [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, May 09, 2007 2:16 AM
To: Brad Sumrall
Cc: php-general@lists.php.net
Subject: Re: [PHP] PhP and Java login trouble

Brad Sumrall wrote:
> I have been hunting all around that website you referred me too looking
for
> javascripting information and can find nothing. I know a little bit of php
> but little to nothing about javascripting.

Eh? I never sent you to a website.

See this code:

function validatelogin()
{
if(document.frmlogin.txtusername.value=="")
{
alert("Please Enter Username.");
document.frmlogin.txtusername.focus();
return false;
}
if(document.frmlogin.txtpwd.value=="")
{
alert("Please Enter Password.");
document.frmlogin.txtpwd.focus();
return false;
}
document.frmlogin.login.value="Success";
document.frmlogin.action="operation.php?mode=login";
return true;
}


You need to create a *similar* function (eg 'BBValidateLogin()') to 
check different html field names.


For example:

function BBValidateLogin()
{
   var f = document.forms[0];
   alert('username is ' + f.username.value);
}

The username.value comes from this:



where you have name="username"

So take the name="..." and put a .value on the end.

Rinse, repeat until you have checked all of the fields you need to.

Return true for the form to submit.

Return false for it to NOT submit.

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

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

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



Re: [PHP] Search function

2007-05-09 Thread Chris

Ryan A wrote:

Hey!

.A little background:
We have a site that has already been made.. a couple of hundred pages displayed 
via SMARTY templates, the site's in Swedish.

The navigation and other parts except for the center is taken care of by the 
templates and other scripts... the center main text is taken from the 
database(mySql) based on $page_id...its in a MySql TEXT field and has all the 
html etc that will be displayed in the center of the page.

End of background..

Now they want to add a "search function" to the site... a simpe textbox where a user 
enters a word or sentance and they get 20 results per page... with a "x.xx % closest to your 
query"  can anybody give me basic pointers on where to start?
Any links/software or articles too would be appreciated...


http://dev.mysql.com/doc/refman/4.1/en/fulltext-search.html

Start off with that, if they need something more complicated down the 
line, revisit.


--
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] Scalable Site Architecture

2007-05-09 Thread Chris

bruce wrote:

Hi..

In looking for what's required fo a site, I'm trying to find
docs/overview/mentors to talk to/etc,...

Basically, I'm considering what's required in terms of
hardware/apps/functionality for each server to be able to support a
site/system of ~100,000/day


Depends on your app and what you want to do.

If it's 95% "pull content from the database and display it" (eg a page 
from an article), look at creating static html files which get 
regenerated when the content is edited 
(http://pear.php.net/packages.php?catpid=3&catname=Caching)


A webserver should handle 100k hits a day of static html pretty easily.

If you're doing complicated database queries with every page hit then 
you're going to need a lot more database servers than http servers.


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

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