Re: [PHP] Session Vars and Performance

2005-02-18 Thread Marek Kilimajer
Greg Donald wrote: On Wed, 16 Feb 2005 09:36:26 -0800 (PST), Richard Lynch [EMAIL PROTECTED] wrote: It's literally an hour's work to alter the code to use MySQL to store the sessions instead of the hard drive. Not really, maybe 5 minutes.. here's the code: The code misses one important thing -

Re: [PHP] My FIRST php atempt

2005-02-18 Thread Bret Hughes
On Fri, 2005-02-18 at 01:47, David Freedman wrote: I am trying my FIRST php file with an attempt to connect to my mySql server. ?php // Connecting, selecting database $link = mysql_connect('localhost', 'host', 'my_passqword') or die('Could not connect: ' . mysql_error()); echo

Re: [PHP] My FIRST php atempt

2005-02-18 Thread M. Sokolewicz
Bret Hughes wrote: On Fri, 2005-02-18 at 01:47, David Freedman wrote: I am trying my FIRST php file with an attempt to connect to my mySql server. ?php // Connecting, selecting database $link = mysql_connect('localhost', 'host', 'my_passqword') or die('Could not connect: ' . mysql_error()); echo

Re: [PHP] My FIRST php atempt

2005-02-18 Thread M. Sokolewicz
M. Sokolewicz wrote: Bret Hughes wrote: On Fri, 2005-02-18 at 01:47, David Freedman wrote: I am trying my FIRST php file with an attempt to connect to my mySql server. ?php // Connecting, selecting database $link = mysql_connect('localhost', 'host', 'my_passqword') or die('Could not connect: ' .

Re: [PHP] Password Protection] -- My solution

2005-02-18 Thread Christophe Chisogne
Mailit, LLC a écrit : $userName = $_POST[userName]; $passw= $_POST[passw]; (...) $cmd = SELECT * FROM theTable . WHERE userName='$userName' ; $res = mysql_query( $cmd ) or die( Password search failed. ); Without validating userName in $_POST, that code is vulnerable to

RE: [PHP] [php] -help me

2005-02-18 Thread Tyler Replogle
$str_array = explode(/, /home/karthik/welcome.php/view.php); // $str_array[4] shoud be view.php From: K Karthik [EMAIL PROTECTED] To: php-general@lists.php.net Subject: [PHP] [php] -help me Date: Fri, 18 Feb 2005 11:20:29 +0530 MIME-Version: 1.0 Received: from lists.php.net ([216.92.131.4]) by

[PHP] PHP to C interface?

2005-02-18 Thread N Deepak
Hi, Is there a way to invoke C functions in a library (.so) from PHP? Like Xs in Perl? Thanks, Deepak -- N Deepak || http://www.ndeepak.info/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] PHP to C interface?

2005-02-18 Thread Zareef Ahmed
Hi, Please Visit http://pear.php.net/package/Inline_C may be usefull zareef ahmed On Fri, 18 Feb 2005 01:19:19 -0800, N Deepak [EMAIL PROTECTED] wrote: Hi, Is there a way to invoke C functions in a library (.so) from PHP? Like Xs in Perl? Thanks, Deepak -- N Deepak ||

Re: [PHP] create forum

2005-02-18 Thread AdamT
On Fri, 18 Feb 2005 07:35:02 +0100, Stefan [EMAIL PROTECTED] wrote: Hi. Are there some code-examples how to build a forum with php and xml? Why yes, there are... A quick google of: http://www.justfuckinggoogleit.com/?q=forum+php+xml reveals the top result to be a page called 'PHP/XML forum'

Re: [PHP] PHP security

2005-02-18 Thread AdamT
On Thu, 17 Feb 2005 20:47:28 -0600, .hG [EMAIL PROTECTED] wrote: It makes me wonder how secure in reallity it is to place your UN and Passwords on a PHP file. Best idea is to place such information in an include file, which you can call using the include() or require() statements - and

Re: [PHP] PHP to C interface?

2005-02-18 Thread N Deepak
On Fri, Feb 18, 2005 at 02:56:05PM +0530, Zareef Ahmed wrote: Hi, Please Visit http://pear.php.net/package/Inline_C Thanks very much. Have you tried using it? How mature is it? I found no documentation or installation guide. Best regards, Deepak On Fri, 18 Feb 2005 01:19:19 -0800,

Re: [PHP] [php] -help me

2005-02-18 Thread M. Sokolewicz
Tyler Replogle wrote: $str_array = explode(/, /home/karthik/welcome.php/view.php); // $str_array[4] shoud be view.php From: K Karthik [EMAIL PROTECTED] To: php-general@lists.php.net Subject: [PHP] [php] -help me Date: Fri, 18 Feb 2005 11:20:29 +0530 MIME-Version: 1.0 Received: from lists.php.net

Re: [PHP] PHP security

2005-02-18 Thread John Cage
you could also encrypt the file using one of the encoders that are out there. Some are free and some are paid for -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] a better way for the array

2005-02-18 Thread Merlin
Hi there, I am wondering if there is a nicer way to save the data into an array than I do. I do have a 2 dimensional array $para. Currently I go like this: $para[1][txt] = 'Europe'.$continent[name]; $para[1][link] = '/'.$continent[name].'.htm';

Re: [PHP] a better way for the array

2005-02-18 Thread Marek Kilimajer
Merlin wrote: Hi there, I am wondering if there is a nicer way to save the data into an array than I do. I do have a 2 dimensional array $para. Currently I go like this: $para[1][txt] = 'Europe'.$continent[name]; $para[1][link] = '/'.$continent[name].'.htm';

Re: [PHP] PHP security

2005-02-18 Thread AdamT
On Fri, 18 Feb 2005 11:42:36 +, John Cage [EMAIL PROTECTED] wrote: you could also encrypt the file using one of the encoders that are out there. Some are free and some are paid for Never thought of that ;-) http://www.zend.com/store/products/zend-encoder.php?home (Commercial)

Re: [PHP] a better way for the array

2005-02-18 Thread Merlin
Marek Kilimajer wrote: Merlin wrote: Hi there, I am wondering if there is a nicer way to save the data into an array than I do. I do have a 2 dimensional array $para. Currently I go like this: $para[1][txt] = 'Europe'.$continent[name]; $para[1][link] =

Re: [PHP] a better way for the array

2005-02-18 Thread Pablo M. Rivas
Hello Merlin: take a look to http://www.php.net/manual/en/language.types.array.php $para[5]=array('txt' = 'Europe'.$continent['name'], 'link' = '/'.$continent[name].'.htm', 'title' = 'Europe - Continent overview'); $para[]=array('txt' =

[PHP] How to open a URL directly ?

2005-02-18 Thread Vaibhav Sibal
Hey ppl, I have a scenario wherein the people logging into the system have different kinds of status as in a person can either be a admin, a user, or a supervisor etc. Now I have different web interfaces for all these kind of people. What I want to know is what function do i use to go to a URL

Re: [PHP] help me

2005-02-18 Thread Pablo M. Rivas
http://www.php.net/date On Fri, 18 Feb 2005 12:07:14 +0530, K Karthik [EMAIL PROTECTED] wrote: i am so surprised for the immediate reply.thank you so much. i'll be thank ful again if you could help me finding the current date and time using php. thanks, karthik -- PHP General Mailing

[PHP] fgetcsv() excel data missing

2005-02-18 Thread Binoy AV
Hi all, I used fgetcsv() function to get the data from a excel file. While reading the data it shows some special characters . I found the same problems in http://bugs.php.net/bug.php?id=12127edit=2 Is it a bug? Plz help me. Binoy __ __ __

RE: [PHP] fgetcsv() excel data missing

2005-02-18 Thread Jay Blanchard
[snip] I used fgetcsv() function to get the data from a excel file. While reading the data it shows some special characters . I found the same problems in http://bugs.php.net/bug.php?id=12127edit=2 Is it a bug? [/snip] What special characters does it show? -- PHP General Mailing List

[PHP] Re: How to open a URL directly ?

2005-02-18 Thread Matthew Weier O'Phinney
* Vaibhav Sibal [EMAIL PROTECTED]: I have a scenario wherein the people logging into the system have different kinds of status as in a person can either be a admin, a user, or a supervisor etc. Now I have different web interfaces for all these kind of people. What I want to know is what

Re: [PHP] Session Vars and Performance

2005-02-18 Thread Greg Donald
On Fri, 18 Feb 2005 08:56:59 +0100, Marek Kilimajer [EMAIL PROTECTED] wrote: The code misses one important thing - row locking. For concurent requests, sess_open must block until the first request does sess_close(). So you need to use InnoDB's row locking or application-level GET_LOCK() and

RE: [PHP] fgetcsv() excel data missing

2005-02-18 Thread Binoy AV
Hi, Thanks for the reply. It shows ÐÏࡱá\\þÿ etc. source code I used is $handle = fopen (file.xls,r); while ($data = fgetcsv ($handle, 1000, ,)) { $num = count($data); for ($c=0; $c $num ; $c++) { $str_email = $data[$c]; echo

RE: [PHP] fgetcsv() excel data missing

2005-02-18 Thread Jay Blanchard
[snip] Thanks for the reply. It shows ÐÏࡱá\\þÿ etc. source code I used is $handle = fopen (file.xls,r); while ($data = fgetcsv ($handle, 1000, ,)) { $num = count($data); for ($c=0; $c $num ; $c++) { $str_email = $data[$c]; echo

Re: [PHP] Crontab for Windows

2005-02-18 Thread Jochem Maas
bob wrote: Hi, I am trying to schedule the running of some PHP scripts on my Win2K PC at home. On my live server I use Linux, so am fully familiar with Crontab. I am not that familiar with running scripts using the scheduler in Win2K though. So far what I have is: C:\php\php.exe -q

RE: [PHP] fgetcsv() excel data missing

2005-02-18 Thread Binoy AV
Thanks Jay. Could anybody please tell me how to read the data from an excel file ? It should work independent of the operating system. I don't want the csv format. Binoy __ __ __ __ Sent via the WebMail system at

RE: [PHP] fgetcsv() excel data missing

2005-02-18 Thread Jay Blanchard
[snip] Could anybody please tell me how to read the data from an excel file ? It should work independent of the operating system. I don't want the csv format. [/snip] Start here http://us4.php.net/com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP] Crontab for Windows

2005-02-18 Thread pjn
On W3K you could use this as the run line in Scheduled Tasks and probably the same in XP although I have not tested this. The same components exist in the W2K version although may be in different locations/names. Run: cmd /c c:\php\php.exe -q c:\path\to\php\file.php Start in: C:\path\to\php\file\

[PHP] Re: How to open a URL directly ?

2005-02-18 Thread M. Sokolewicz
Vaibhav Sibal wrote: Hey ppl, I have a scenario wherein the people logging into the system have different kinds of status as in a person can either be a admin, a user, or a supervisor etc. Now I have different web interfaces for all these kind of people. What I want to know is what function do i

Re: [PHP] fgetcsv() excel data missing

2005-02-18 Thread M. Sokolewicz
Binoy AV wrote: Thanks Jay. Could anybody please tell me how to read the data from an excel file ? It should work independent of the operating system. I don't want the csv format. excel files aren't independent of the OS, csv files are. Excel files need to be parsed, because they contain

RE: [PHP] Problem connecting to MySQL with PEAR::DB and mysqli

2005-02-18 Thread Denis Gerasimov
Hello, I suspect that all is OK in your code. I had a very similar problem three days ago. Try connecting to FQDN like [EMAIL PROTECTED] via TCP/IP, not to localhost via UNIX socket. It works in my case at least. BTW it seems to be a DB package bug... write a simple test script with mysqli_*

Re: [PHP] fgetcsv() excel data missing

2005-02-18 Thread Bret Hughes
On Fri, 2005-02-18 at 09:12, M. Sokolewicz wrote: Binoy AV wrote: Thanks Jay. Could anybody please tell me how to read the data from an excel file ? It should work independent of the operating system. I don't want the csv format. excel files aren't independent of the OS, csv

Re: [PHP] PHP security

2005-02-18 Thread .....hG
Thanks everyone for your input. I was just curios since everyone is so concern about security, yet some messageboards/CMS use passwords for their databases on the index page or an include. -- ...hG http://www.helmutgranda.com Robby Russell [EMAIL PROTECTED] wrote in message news:[EMAIL

[PHP] Re: Help with SQL statement

2005-02-18 Thread .....hG
Im a begininer at PHP but how about session? -- ...hG http://www.helmutgranda.com Jacques [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] : How can I determine which users have signed in and are still on-line during : the first minute after they have signed in? My sql statement

Re: [PHP] MySQL and MySQLi compiling

2005-02-18 Thread Marek Kilimajer
Chris wrote: Hi, I've been trying to get these 2 compiled together for a while, and have had no luck. WHere my problem lies, I think, is that I'm not sure what directory should be specified on the --with-mysql part ./configure --with-apxs2=/usr/local/apache/bin/apxs

Re: [PHP] Weird Error Help

2005-02-18 Thread Joe Harman
Thanks for your help guys... I can't seem to locate the culprut though... here is my line of code it refers to: echo /tr.$nav_bar_end; all it does is close a table though... i hate to blame this error on the PHP processor... but I am

[PHP] FATAL: emalloc()

2005-02-18 Thread George Balanos
Durring the middle of the day our website stopped woking when I checked the error logs in Apache I found this error: FATAL: emalloc() : Unable to allocate 1073741824 bytes Spammed three times, since then nothing we have tried has worked, played with memory_limit and shutting down our gallery.

[PHP] Code Analyzer Needed ..can somebody suggest ?

2005-02-18 Thread Ramya Ramaswamy
Hey people, Am in the look out for a code analyzer for PHP...can somebody help me out with that?Please... Many Thankx Ramya -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] FATAL: emalloc()

2005-02-18 Thread Matt M.
FATAL: emalloc() : Unable to allocate 1073741824 bytes I found this at http://us4.php.net/odbc_exec I kept getting FATAL: emalloc() errors when using select statements via odbc for MS SQL. I had no control over the DB as it is a commercial CRM system. I found that by 1st issuing an SQL query

Re: [PHP] FATAL: emalloc()

2005-02-18 Thread Richard Lynch
George Balanos wrote: Durring the middle of the day our website stopped woking when I checked the error logs in Apache I found this error: FATAL: emalloc() : Unable to allocate 1073741824 bytes What you have to figure out is why you are trying to allocate a GIGABYTE of RAM on your homepage.

[PHP] Referer parsing functions?

2005-02-18 Thread Brian Dunning
I've found a number of PHP classes for parsing server logs, but I just want to parse a single referer at a time. Anyone know of a class that will do this? 1) Extract just the site from the full referer string, 2) Extract the query keyword (if any) no matter what search engine the referer is

RE: [PHP] fgetcsv() excel data missing

2005-02-18 Thread Richard Lynch
Binoy AV wrote: Could anybody please tell me how to read the data from an excel file ? It should work independent of the operating system. I don't want the csv format. For your first step, you'll have to convince Microsoft to OpenSource their code... Oh, yeah. You can't do that. :-) --

Re: [PHP] How to open a URL directly ?

2005-02-18 Thread Richard Lynch
Vaibhav Sibal wrote: Hey ppl, I have a scenario wherein the people logging into the system have different kinds of status as in a person can either be a admin, a user, or a supervisor etc. Now I have different web interfaces for all these kind of people. What I want to know is what function

Re: [PHP] PHP to C interface?

2005-02-18 Thread Richard Lynch
N Deepak wrote: Is there a way to invoke C functions in a library (.so) from PHP? Like Xs in Perl? Yes. EVERYTHING in PHP, except for the core syntax of if/else/while can be loaded this way. Many times, it's compiled in static, but you can make most of the modules be shared. By

Re: [PHP] My FIRST php atempt

2005-02-18 Thread Richard Lynch
David Freedman wrote: I am trying my FIRST php file with an attempt to connect to my mySql server. ?php // Connecting, selecting database $link = mysql_connect('localhost', 'host', 'my_passqword') or die('Could not connect: ' . mysql_error()); Does this print out anything? Is it more

Re: [PHP] MySQL and MySQLi compiling

2005-02-18 Thread Richard Lynch
Chris wrote: Hi, I've been trying to get these 2 compiled together for a while, and have had no luck. WHere my problem lies, I think, is that I'm not sure what directory should be specified on the --with-mysql part Here's the deal: configure needs to find *BOTH* 'mysql.h' files and

[PHP] Destroying the Session Object

2005-02-18 Thread Jacques
I am developing an application. When the user signs in a Session ID is created (for argument sake: 123). I have a sign out page that has the script session_destroy() on it. This page directs me to the sign in page. When I sign the same or any other user in again I get the same session id (123).

Re: [PHP] Help with SQL statement

2005-02-18 Thread Bret Hughes
On Thu, 2005-02-17 at 23:21, Jacques wrote: How can I determine which users have signed in and are still on-line during the first minute after they have signed in? My sql statement currently reads: SELECT * FROM tblusers WHERE usignedin = yes AND utimesignedin = (time() - 60) Hoe does

[PHP] I got it working

2005-02-18 Thread David Freedman
I created a new user, and assigned privileges. Then tried to connect to the server and was denied access, because of a conflict between the mysql CLIENT version and the mysql server code due to the password encryption scheme installed in version 4.1 of mysql. Running the following line fixed the

Re: [PHP] Destroying the Session Object

2005-02-18 Thread Matt M.
I am developing an application. When the user signs in a Session ID is created (for argument sake: 123). I have a sign out page that has the script session_destroy() on it. This page directs me to the sign in page. When I sign the same or any other user in again I get the same session id

Re: [PHP] Crontab for Windows

2005-02-18 Thread Jason Barnett
[EMAIL PROTECTED] wrote: On W3K you could use this as the run line in Scheduled Tasks and probably the same in XP although I have not tested this. The same components exist in the W2K version although may be in different locations/names. Run: cmd /c c:\php\php.exe -q

[PHP] Newbie question

2005-02-18 Thread Adams, Tom
Does anyone know how to force PHP to require all local variables to be declared prior to use or if this is even possible? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] MySQL and MySQLi compiling

2005-02-18 Thread Chris
Chris wrote: ./configure --with-apxs2=/usr/local/apache/bin/apxs --with-mysql=/usr --with-mysql-include-dir=/usr/include/mysql --with-mysql-lib-dir=/usr/lib/mysql --with-mysqli=/usr/bin/mysql_config it might work. I've managed to stave of the need for the mysql extension for a week or two, but

Re: [PHP] Newbie question

2005-02-18 Thread Adrian
error_reporting(E_ALL); Then you will get a notice when you try to read a variable which doesn't exist. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] MySQL and MySQLi compiling

2005-02-18 Thread Chris
Richard Lynch wrote: Here's the deal: configure needs to find *BOTH* 'mysql.h' files and 'mysql.so'/'mysql.lib' files *UNDER* the directory you feed it. Figure out where your mysql.h files are. Figure out where your mysql.lib/mysql.so files are. . Thanks for the response, in fact I can't find

Re: [PHP] XHTML 1.1 + php sessions = :(

2005-02-18 Thread Your Name
Thank you very much for that solution however I need something slitely different. This is a CMS for distribution... not everybody that's going to use it can go in and edit the config files. I've heard of a command called ini_set(); which temporarily changes it just for the script. Would you