[PHP-DB] upload binary into postgres
Hi! I would like to upload binary data into the PorstgreSQL. Does anyone know how to upload the code? I do not want to use OID. I want to insert binary direct into table. I create table field bytea. Is it correct? Pelase teach me how! regards, hiri -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] Install Apache/PHP where to find libphp4.so?
Hi, The problem is the following: Computer 1: Apache-2.0.48: ./configure --prefix=/www --enable-so --enable-modules=all --enable-mods-shared=most PHP-4.3.4: ./configure --with-apx2=/www/bin/apxs --with-config-file-paths=/www/conf --enable-sigchild libphp4.so is in /www/modules. I copied it from the PHP source dir (/php-4.3.4/libs). Everything works OK + Computer 2 (labtop for trial) Apache-2.0.48 and PHP-4.3.4 thus no change and same configuration as above but I don't find libphp4.so . I remember it was not easy to get it. If anybody can tell me where to get it? Without that library difficult to read a PHP script of course. + Linux-2.4.19 on both computers. -- Alain Barthélemy [EMAIL PROTECTED] http://bartydeux.be Linux User #315631 -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] field type, field length and field flags not working???
All questions on the bottom Right now I am working along with STYS php in 24hrs(Sams) I am using the following code ?php //connect to the mysql database $link = mysql_connect(localhost, $user, $pass); //make sure it worked if (!$link) die(Couldn't connect to MySQL); //get list of available databases $db_res = mysql_list_dbs($link); //loop through the available databases while($db_rows = mysql_fetch_row($db_res)) { printb$db_rows[0]/b\n; //check to see if you are able to select that database if([EMAIL PROTECTED]($db_rows[0], $link)) { print dlddcouldn't connect -- .mysql_error()./dl; continue; } //get list of tables for the above database $tab_res = mysql_list_tables($db_rows[0],$link); print \tdldd\n; //loop throught the table geting the rows while($tab_rows = mysql_fetch_row($tab_res)) { print \tb$tab_rows[0]/b\n; $query_res = mysql_query(select * from $tab_rows[0]); $num_fields = mysql_num_fields($query_res); print \t\tdldd\n; for($x = 0; $x $num_fields; $x++) { print \t\ti; print mysql_field_type($query_res, $x); print /i i; print mysql_field_len($query_res, $x); print /i b; print mysql_field_name($query_res, $x); print /b i; print mysql_field_flags($query_res, $x); print /i br\n; } print \t\t/dl\n; } print \t/dl\n; } mysql_close($link); I am having problems with the FOR LOOP. Here is a portion of the results from the query from my mozilla browser harrysdb domains unknown 1 id unknown 10 domain unknown 1 sex unknown 19 mail mysql columns_priv unknown 0 Host unknown 0 Db unknown 0 User unknown 0 Table_name unknown 0 Column_name unknown 0 Timestamp unknown 0 Column_priv db unknown 1 Host unknown 7 Db unknown 0 User unknown 1 Select_priv unknown 1 Insert_priv unknown 1 Update_priv unknown 1 Delete_priv unknown 1 Create_priv unknown 1 Drop_priv unknown 1 Grant_priv unknown 1 References_priv unknown 1 Index_priv unknown 1 Alter_priv unknown 1 Create_tmp_table_priv real 1 Lock_tables_priv Why is it coming up with unknown for the field type and the field length is wrong and field flags not showing either? -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] Re: Grab and update values (Was Re: php-db Digest 8 Feb 2004)
It's simple - no need for IF statements, as the SQL Select syntax does that for you ! Try UPDATE tablename SET value2=value1, value1=0 WHERE value1 3 You might also want to look at the REPLACE INTO syntax in the manual too, for completeness. Be aware though that this won't work if you need to do a join, as the join processor cannot know if you have changed a value which it's trying to join on. You may need to use temporary tables in that case. Cheers - Neil. At 00:44 09/02/2004 +, you wrote: Message-ID: [EMAIL PROTECTED] Date: Sun, 8 Feb 2004 15:03:52 +1100 (EST) From: JeRRy [EMAIL PROTECTED] To: [EMAIL PROTECTED] MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Subject: Re: php-db Digest 8 Feb 2004 01:40:01 - Issue 2250 Hi, I want to grab a value from one table field and place another value in another table fied. So If I had table value1 and it was set to 3 I want to recognise the value 3 and put value 1 in table value2. Example: value1: 3 value2: (blank) So now I need to check value1 and MAKE SURE 3 is the value, if a lower value I want to do nothing. If 3 than I want to use the value Example 2: value1: 0 (grab 3 and reset to 0, if higher than 3 do the same) value2: 1 (If value1 is 3 than value 1 needs to go in value2) But how can I achieve this? The queries are ran once a day, no more. So when the query is ran I could than execute the second query to change the value#'s. Would I be right in saying that I'd use a 'IF statement' for this? Or is there another way to do this? I am not sure exactly about executing a query with the IF statement, I do know how to execute a message or HTML information to output to the webpage. I've done some reading online, but have not found what I am requiring ... Could be looking in the wrong place, as usual. All help appreciated. Jerry CaptionKit http://www.captionkit.com : Production tools for accessible subtitled internet media, transcripts and searchable video. Supports Real Player, Quicktime and Windows Media Player. VideoChat with friends online, get Freshly Toasted every day at http://www.fresh-toast.net : NetMeeting solutions for a connected world. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] Question
Dear friends, I was trying to make online quiz system using php and mysql. When I added code to score the quiz, it gives me parse error at line 131. My total code line isn't more than 120. Any comments,or any other code to score the quiz, please -- --- Parse error: parse error, unexpected $end in C:\webroot\display.php on line 131 -- --- //Below is the code ?php // open the connection $conn = mysql_connect(localhost, , ); // pick the database to use mysql_select_db(testdb,$conn); // create the SQL statement $sql = SELECT * FROM testTable; // execute the SQL statement $result = mysql_query($sql, $conn) or die(mysql_error()); //go through each row in the result set and display data if (!$submit) { echo form method=post action=$PHP_SELF; echo table border=0; while ($newArray = mysql_fetch_array($result)) { // give a name to the fields $id = $newArray['id']; $testField = $newArray['testField']; $testFielda = $newArray['testFielda']; $testFieldb = $newArray['testFieldb']; $testFieldc = $newArray['testFieldc']; $testFieldd = $newArray['testFieldd']; //echo the results onscreen echo trtd colspan=4brb$id/b/td/tr; echo TD$testFieldinput type=hidden name=$testField value=\$testField\ br /td/tr TDa)input type=radio name=$testFielda value=\$testFielda\$testFielda/td/tr TDb)input type=radio name=$testFieldb value=\$testFieldb\$testFieldb/td/tr TDc)input type=radio name=$testFieldc value=\$testFieldc\$testFieldc/td/tr TDd)input type=radio name=$testFieldd value=\$testFieldd\$testFieldd/td/tr; } echo /table; echo input type='submit' value='See how you did' name='submit'; echo /form; } elseif ($submit) { { $score = 0; $total = mysql_num_rows($result); while ($result = mysql_fetch_array($result)) { $testFielde = $result[testFielde]; $q = $result[q]; if ($$q == $testFielde) { $score++; } } echo p align=centerbYou scored $score out of $total/b/p; echo p; if ($score == $total) { echo Congratulations! You got every question right!; } elseif ($score/$total 0.34) { echo Oh dear. Not the best score, but don't worry, it's only a quiz.; } elseif ($score/$total 0.67) { echo Well done! You certainly know your stuff.; } else { echo Not bad - but there were a few that caught you out!; } echo /p; echo pHere are the answers:; echo table border=0; $result = mysql_query(SELECT * FROM $testtable ORDER BY id,$testdb); while ($row = mysql_fetch_array($result)) { $testField = $row[testFieldetestFielde]; $testFielde = $row[testFielde]; $q = $row[q]; echo trtdbr$testField/td/tr; if ($$q == $testFielde) { echo trtdraquo;you answered ${$q}, which is correct/td/tr; } elseif ($$q == ) { echo trtdraquo;you didn't select an answer. The answer is $testFielde/td/tr; } else { echo trtdraquo;you answered ${$q}. The answer is $testFielde/td/tr; } } echo /table/p; ?
[PHP-DB] SMTP authentication
Good afternoon dear friends: I want to ask you, how I must setup my PHP.INI file, to send e-mail from my Web Site if my SMTP server requires authentication. Otherwise, I want to know if exits some kind of public SMTP sever that I could use. Thank you very much. mArK
Re: [PHP-DB] Question
Heyaz, You've got some unclosed statements. Try using tabs for each statement to make it easier on yourself like: if ($iusetabs == true){ echo like this ; } And in your code.. things go wrong here: == echo /table; echo input type='submit' value='See how you did' name='submit'; echo /form; } elseif ($submit) { { $score = 0; $total = mysql_num_rows($result); good luck to you laters, Fedde ~= The sum of the intelligence on the planet is a constant; the population is growing. =~
Re: [PHP-DB] SMTP authentication
I want to ask you, how I must setup my PHP.INI file, to send e-mail from my Web Site if my SMTP server requires authentication. Otherwise, I want to know if exits some kind of public SMTP sever that I could use. I think you don't need to adjust your php.ini for that, just use the right params for sending the mails. Isn't somthing like this is what you need? (got it from: http://nl3.php.net/mail) Or did i get your question wrong? ? include(Mail.php); $recipients = [EMAIL PROTECTED]; $headers[From]= [EMAIL PROTECTED]; $headers[To] = [EMAIL PROTECTED]; $headers[Subject] = Test message; $body = TEST MESSAGE!!!; $params[host] = smtp.server; $params[port] = 25; $params[auth] = true; $params[username] = user; $params[password] = password; // Create the mail object using the Mail::factory method $mail_object = Mail::factory(smtp, $params); $mail_object-send($recipients, $headers, $body); ? laters, Fedde ~= The sum of the intelligence on the planet is a constant; the population is growing. =~ -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] Question
From: [EMAIL PROTECTED] Parse error: parse error, unexpected $end in C:\webroot\display.php on line 131 I'm not going to go through all of your code, but this error means you missed a quote or bracket somewhere, i.e. you didn't supply a closing bracket for an IF() condition. ?php if($condition == 1) { dothis(); ? ---John Holmes... -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] binary data into postgresql in bytea
HI! I wrote the code how to upload and insert binary data into postgresql. ?php $original_tmp = $_FILES['UploadedFile']['tmp_name']; $original_name = $_FILES['UploadedFile']['name']; $original_size = $_FILES['UploadedFile']['size']; $original_type = $_FILES['UploadedFile']['type']; print(hr\n); $fileHandle = fopen($original_tmp, r); $binaryContent = fread($fileHandle, $original_size); $binaryContent = pg_escape_bytea($binaryContent); fclose($fileHandle); $sql_insert = INSERT INTO objects(b_col, file_name, file_size, file_type, file_date) VALUES ('$binaryContent'::bytea,'$original_name','$original_size','$original_type',now()); pg_query($sql_insert) or DIE (Could not perform INSERT to table: .pg_lst_error()); ? Does anyone know right code? I do not think this is write code for postgresql. The field which binary data is stored is bytea. Regards, hiro -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] Re: SMTP authentication
Hello, On 02/09/2004 11:40 AM, Marco A. Ortiz wrote: I want to ask you, how I must setup my PHP.INI file, to send e-mail from my Web Site if my SMTP server requires authentication. Otherwise, I want to know if exits some kind of public SMTP sever that I could use. No, the mail() function does not SMTP authentication. You may want to use this class that comes with a wrapper function named smtp_mail() that works like mail() except that it does let you specify the authentication credentials: http://www.phpclasses.org/mimemessage http://www.phpclasses.org/smtpclass -- Um abrao, Manuel Lemos Free ready to use OOP components written in PHP http://www.phpclasses.org/ Metastorage - Data object relational mapping layer generator http://www.meta-language.net/metastorage.html -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] Re: php to mysql client problem.
I've since used different combinations and discovered that I can access the database as long As I don't use Passwords... I guess it is the Webserver and not the Sql server causing the problem... Michael G. Tracey wrote: This is my setup: Not really worried about security. W2kPro w\sp4 Mysql 5.O Mysqlcc0.9.4 Php 5.0.0.b3 [As CGI] Apache2.0.48 I can now connect to my server from anywhere using Mysqlcc or another server... home, work, etc. I can run Php scripts. I can connect to the Apache Server. Login to Mysql: Works. ==C:\mysql -u mike -p ==Enter password: ==Welcome to the MySQL monitor. Commands end with ; or \g. ==Your MySQL connection id is 28 to server version: 5.0.0-alpha-max-nt ==Type 'help;' or '\h' for help. Type '\c' to clear the buffer. PhpInfo Shows: ==MySQL Support enabled ==Active Persistent Links 0 ==Active Links 0 ==Client API version 3.23.57 ==Directive Local Value Master Value ==mysql.allow_persistent On On ==mysql.connect_timeout 60 60 ==mysql.default_host localhost localhost ==mysql.default_password no value no value ==mysql.default_port 3306 3306 ==mysql.default_socket no value no value ==mysql.default_user root root ==mysql.max_links Unlimited Unlimited ==mysql.max_persistent Unlimited Unlimited ==mysql.trace_mode Off Off I Try to connect from PHP and I get: ==Not connected : Client does not support authentication protocol ==requested by server; consider upgrading MySQL client Could this be the Reason?: From the PHP info above. ==Client API version 3.23.57== I'm thinking yes, but since copying the new files to the same directory overwrote all the others, is this the client version for all servers currently?? If not how do I force it to update. I have all the servers working. I don't really at this point want to delete anything. Michael G. Tracey ___ Join Excite! - http://www.excite.com The most personalized portal on the Web! -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] Mysql and Kerberos
Hi all, Does anyone knows a way to autheticate mysql database usersusing kerberos? I'd like to know if I can use Kerberos to validate the authentication data in the mysql_connect command. Thanks for all help, Ricardo Oliveira IncrediMail - O mundo do correio eletrônico finalmente desenvolveu-se - Clique aqui
[PHP-DB] PHP_SELF and parse error
Dear friends, I tried to modify submit if elseif statement. That didn't work.I have pasted code of form and output with error. Any comments on erros, please. Asif -- --- Notice: Undefined variable: submit in C:\webroot\display.php on line 16 Notice: Undefined variable: PHP_SELF in C:\webroot\display.php on line 19 1 Treatment of Hypertension a)loop diuritics b)clonazepam c)benzodizap d)lorazepam 2 Thrombolytic treatment of Myocardial infarction a)streptokinase b)diltiazm c)aspirin d)heparin -- - //code for above output and error HTMLbody bgcolor=?php // open the connection $conn = mysql_connect(localhost, , ); // pick the database to use mysql_select_db(testDB,$conn); // create the SQL statement $sql = SELECT * FROM testTable; // execute the SQL statement $result = mysql_query($sql, $conn) or die(mysql_error()); //go through each row in the result set and display data if (!$submit) { echo form method=post action=$PHP_SELF; echo table border=0; while ($newArray = mysql_fetch_array($result)) { // give a name to the fields $id = $newArray['id']; $testField = $newArray['testField']; $testFielda = $newArray['testFielda']; $testFieldb = $newArray['testFieldb']; $testFieldc = $newArray['testFieldc']; $testFieldd = $newArray['testFieldd']; //echo the results onscreen echo trtd colspan=4brb$id/b/td/tr; echo TD$testFieldinput type=hidden name=$testField value=\$testField\ br /td/tr TDa)input type=radio name=$testFielda value=\$testFielda\$testFielda/td/tr TDb)input type=radio name=$testFieldb value=\$testFieldb\$testFieldb/td/tr TDc)input type=radio name=$testFieldc value=\$testFieldc\$testFieldc/td/tr TDd)input type=radio name=$testFieldd value=\$testFieldd\$testFieldd/td/tr; } echo /table; echo input type='submit' value='See how you did' name='submit'; echo /form; } elseif ($submit) ? /html
[PHP-DB] Re: php5/MySQL 4.1.1 connection error
I have done the same thing... but still get Could not connect: Client does not support authentication protocol requested by server; consider upgrading MySQL client So beside copying the libmySQL.dll's to the System32 folder and the settings in the .ini... Should'nt there be more files to locate since the support files are not bundled... Where would I get these files. Having a very hard time understanding how the one file is in php/dlls when it is not bundled. Kengaun wrote: Hi ALL, MySql support is not bundled with PHP 5.0.0 I have managed to connect to MySQL after I have copied the new dll libmySQL.dll(in php/dlls) folder to c:\windows\system32 And modified the php.ini as per below. In php.ini ; Directory in which the loadable extensions (modules) reside. extension_dir = c:\php\extensions ;; ; Dynamic Extensions ; ;; extension=php_mysql.dll -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] PHP_SELF and parse error
Maybe you have register globals turned off? Try this: $_SERVER[PHP_SELF] instead of $PHP_SELF. On Mon, Feb 09, 2004 at 07:49:17PM -0500, [EMAIL PROTECTED] wrote: From: [EMAIL PROTECTED] Date: Mon, 9 Feb 2004 19:49:17 EST To: [EMAIL PROTECTED] X-Mailer: 9.0 for Windows sub 5003 Subject: [PHP-DB] PHP_SELF and parse error Dear friends, I tried to modify submit if elseif statement. That didn't work.I have pasted code of form and output with error. Any comments on erros, please. Asif -- --- Notice: Undefined variable: submit in C:\webroot\display.php on line 16 Notice: Undefined variable: PHP_SELF in C:\webroot\display.php on line 19 1 Treatment of Hypertension a)loop diuritics b)clonazepam c)benzodizap d)lorazepam 2 Thrombolytic treatment of Myocardial infarction a)streptokinase b)diltiazm c)aspirin d)heparin -- - //code for above output and error HTMLbody bgcolor=?php // open the connection $conn = mysql_connect(localhost, , ); // pick the database to use mysql_select_db(testDB,$conn); // create the SQL statement $sql = SELECT * FROM testTable; // execute the SQL statement $result = mysql_query($sql, $conn) or die(mysql_error()); //go through each row in the result set and display data if (!$submit) { echo form method=post action=$PHP_SELF; -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] PHP_SELF and parse error
Try using $_SERVER[PHP_SELF] instead of $PHP_SELF. I believe $PHP_SELF is only set on servers with register variables turned on. ChrisPW - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, February 10, 2004 12:49 AM Subject: [PHP-DB] PHP_SELF and parse error Dear friends, I tried to modify submit if elseif statement. That didn't work.I have pasted code of form and output with error. Any comments on erros, please. Asif -- --- Notice: Undefined variable: submit in C:\webroot\display.php on line 16 Notice: Undefined variable: PHP_SELF in C:\webroot\display.php on line 19 1 Treatment of Hypertension a)loop diuritics b)clonazepam c)benzodizap d)lorazepam 2 Thrombolytic treatment of Myocardial infarction a)streptokinase b)diltiazm c)aspirin d)heparin -- - //code for above output and error HTMLbody bgcolor=?php // open the connection $conn = mysql_connect(localhost, , ); // pick the database to use mysql_select_db(testDB,$conn); // create the SQL statement $sql = SELECT * FROM testTable; // execute the SQL statement $result = mysql_query($sql, $conn) or die(mysql_error()); //go through each row in the result set and display data if (!$submit) { echo form method=post action=$PHP_SELF; echo table border=0; while ($newArray = mysql_fetch_array($result)) { // give a name to the fields $id = $newArray['id']; $testField = $newArray['testField']; $testFielda = $newArray['testFielda']; $testFieldb = $newArray['testFieldb']; $testFieldc = $newArray['testFieldc']; $testFieldd = $newArray['testFieldd']; //echo the results onscreen echo trtd colspan=4brb$id/b/td/tr; echo TD$testFieldinput type=hidden name=$testField value=\$testField\ br /td/tr TDa)input type=radio name=$testFielda value=\$testFielda\$testFielda/td/tr TDb)input type=radio name=$testFieldb value=\$testFieldb\$testFieldb/td/tr TDc)input type=radio name=$testFieldc value=\$testFieldc\$testFieldc/td/tr TDd)input type=radio name=$testFieldd value=\$testFieldd\$testFieldd/td/tr; } echo /table; echo input type='submit' value='See how you did' name='submit'; echo /form; } elseif ($submit) ? /html -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] Cookies ?
Friends Is there a way to read a cookie's with php , that were generated with javascript ? I am now usign : $xidp=$_COOKIE; print Xidp $xidp; Thank you for your help in advanced. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] Cookies ?
Try using $_COOKIE['cookie_name'] - Original Message - From: Omelin Morelos [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, February 10, 2004 12:55 AM Subject: [PHP-DB] Cookies ? Friends Is there a way to read a cookie's with php , that were generated with javascript ? I am now usign : $xidp=$_COOKIE; print Xidp $xidp; Thank you for your help in advanced. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] Cookies ?
-Mensaje original- De: Omelin Morelos [mailto:[EMAIL PROTECTED] Enviado el: Monday, February 09, 2004 4:56 PM Para: [EMAIL PROTECTED] Asunto: Cookies ? Friends Is there a way to read a cookie's with php , that were generated with javascript ? I am now usign : $xidp=$_COOKIE; print Xidp $xidp; Thank you for your help in advanced. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DB] Cookies ?
I have already tried it , It's not working. Thanks -Mensaje original- De: Chris Wright [mailto:[EMAIL PROTECTED] Enviado el: Monday, February 09, 2004 5:09 PM Para: Omelin Morelos; [EMAIL PROTECTED] Asunto: Re: [PHP-DB] Cookies ? Try using $_COOKIE['cookie_name'] - Original Message - From: Omelin Morelos [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, February 10, 2004 12:55 AM Subject: [PHP-DB] Cookies ? Friends Is there a way to read a cookie's with php , that were generated with javascript ? I am now usign : $xidp=$_COOKIE; print Xidp $xidp; Thank you for your help in advanced. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DB] Cookies ?
Did you refresh the page after setting the cookie? mt At 05:00 PM 2/9/2004 -0800, Omelin Morelos wrote: I have already tried it , It's not working. Thanks -Mensaje original- De: Chris Wright [mailto:[EMAIL PROTECTED] Enviado el: Monday, February 09, 2004 5:09 PM Para: Omelin Morelos; [EMAIL PROTECTED] Asunto: Re: [PHP-DB] Cookies ? Try using $_COOKIE['cookie_name'] - Original Message - From: Omelin Morelos [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, February 10, 2004 12:55 AM Subject: [PHP-DB] Cookies ? Friends Is there a way to read a cookie's with php , that were generated with javascript ? I am now usign : $xidp=$_COOKIE; print Xidp $xidp; Thank you for your help in advanced. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DB] Cookies ?
yes , i tried accesing the cookie from an other page. thank you -Mensaje original- De: Miles Thompson [mailto:[EMAIL PROTECTED] Enviado el: Monday, February 09, 2004 5:37 PM Para: [EMAIL PROTECTED] Asunto: RE: [PHP-DB] Cookies ? Did you refresh the page after setting the cookie? mt At 05:00 PM 2/9/2004 -0800, Omelin Morelos wrote: I have already tried it , It's not working. Thanks -Mensaje original- De: Chris Wright [mailto:[EMAIL PROTECTED] Enviado el: Monday, February 09, 2004 5:09 PM Para: Omelin Morelos; [EMAIL PROTECTED] Asunto: Re: [PHP-DB] Cookies ? Try using $_COOKIE['cookie_name'] - Original Message - From: Omelin Morelos [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, February 10, 2004 12:55 AM Subject: [PHP-DB] Cookies ? Friends Is there a way to read a cookie's with php , that were generated with javascript ? I am now usign : $xidp=$_COOKIE; print Xidp $xidp; Thank you for your help in advanced. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] msql perfomance: fast through mysql, slow through php
Greetings, I have search the archives over the last two years and have not found any help for this question. The basic setup: An apache/php server exists on the west coast of the US, and a linux/mysql server on the east coast. My PHP snippet looks like this: $result = mysql_query(select acolumn from atable where bcolumn=0, $db); while ($row = mysql_fetch_assoc($result)) echo 'some stuff from the row'; The problem is, that the above snippet, to return seven rows, takes about 15 seconds. Putting timing statements around the query and around the fetch calls shows that the query call takes only 0.03 seconds. However, each fetch call takes anywhere from 0.5 to 5 seconds each to complete. However, if I am logged onto the apacher server and from the user prompt run the 'mysql' client, and perform the same exact query, the 'mysql' client can peform the query and return all the results, all 7 rows, in 0.1 second. This is apache 1.3/php 4.3.4 and mysql 4.0.17-standard. I have tried all the mysql_connect flags without any change. Should I expect such a performance difference? Is there something else I need to look for? Thank you for your time, jde -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php