[PHP] Parse Error in Last Line of PHP Script
Hello! My problem is a Parse Error in the last line of the script. I checked all the brackets { and semicolons ; but I did`nt find any error. Perhaps you can help me. Cu Thomas Here is the Code: ?php $_custom_enable_custom_auth = true; $_custom_db_name = 'horde'; $_custom_db_host = 'localhost'; $_custom_db_user = 'horde'; $_custom_db_pass = 'horde'; if ($_custom_enable_custom_auth) { $_custom_user_uid = trim($HTTP_POST_VARS['imapuser']); $_custom_user_pass = trim($HTTP_POST_VARS['pass']); $_custom_db = mysql_connect($_custom_db_host, $_custom_db_user, $_custom_db_pass); mysql_select_db($_custom_db_name, $_custom_db); require_once '/usr/local/httpd/htdocs/horde/imp/_custom/key.php'; $_custom_result = mysql_query(SELECT imp_imapuser, decode(imp_pass, '$_custom_key'), imp_server FROM horde_users, custom_imp_users WHERE user_uid = '$_custom_user_uid' AND user_pass = md5('$_custom_user_pass') AND horde_user_uid = user_uid AND enabled = '1', $_custom_db); if ($_custom_row = mysql_fetch_row($_custom_result)) { $_custom_imp_imapuser = $_custom_row[0]; $_custom_imp_pass = $_custom_row[1]; $_custom_imp_server = $_custom_row[2]; } else { $_custom_imp_imapuser = null; $_custom_imp_pass = null; $_custom_imp_server = null; } } else { $_custom_imp_imapuser = trim(.$HTTP_POST_VARS['imapuser'].); $_custom_imp_pass = trim(.$HTTP_POST_VARS['pass'].); $_custom_imp_server = trim(.$HTTP_POST_VARS['server'].); } .$HTTP_POST_VARS['imapuser']. = .$_custom_imp_imapuser.; .$HTTP_POST_VARS['pass']. = .$_custom_imp_pass.; .$HTTP_POST_VARS['server']. = .$_custom_imp_server.; ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Parse Error in Last Line of PHP Script
On Friday 16 August 2002 14:13, Thomas Meinke wrote: Hello! My problem is a Parse Error in the last line of the script. I checked all the brackets { and semicolons ; but I did`nt find any error. Perhaps you can help me. Try matching up your '' and . -- Jason Wong - Gremlins Associates - www.gremlins.com.hk Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * /* What did Mickey Mouse get for Christmas? A Dan Quayle watch. -- heard from a Mike Dukakis field worker */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] error message when run /usr/share/pear
What's wrong ? I am using RH7.3. I manually compile the php and install it before. But later I install using the rpm. Thx for reply ! Content-type: text/html PHP Warning: imap: Unable to initialize module Module compiled with module API=20010901, debug=0, thread-safety=0 PHPcompiled with module API=20020429, debug=0, thread-safety=0 These options need to match in Unknown on line 0 PHP Warning: Function registration failed - duplicate name - mysql_connect in Unknown on line 0 PHP Warning: Function registration failed - duplicate name - mysql_pconnect in Unknown on line 0 PHP Warning: Function registration failed - duplicate name - mysql_close in Unknown on line 0 PHP Warning: Function registration failed - duplicate name - mysql_select_db in Unknown on line 0 PHP Warning: Function registration failed - duplicate name - mysql_create_db in Unknown on line 0 PHP Warning: Function registration failed - duplicate name - mysql_drop_db in Unknown on line 0 PHP Warning: Function registration failed - duplicate name - mysql_query in Unknown on line 0 PHP Warning: Function registration failed - duplicate name - mysql_unbuffered_query in Unknown on line 0 PHP Warning: Function registration failed - duplicate name - mysql_db_query in Unknown on line 0 PHP Warning: Function registration failed - duplicate name - mysql_list_dbs in Unknown on line 0 PHP Warning: Function registration failed - duplicate name - mysql_list_tables in Unknown on line 0 PHP Warning: Function registration failed - duplicate name - mysql_list_fields in Unknown on line 0 PHP Warning: Function registration failed - duplicate name - mysql_error in Unknown on line 0 PHP Warning: Function registration failed - duplicate name - mysql_errno in Unknown on line 0 PHP Warning: Function registration failed - duplicate name - mysql_affected_rows in Unknown on line 0 PHP Warning: Function registration failed - duplicate name - mysql_insert_id in Unknown on line 0 PHP Warning: Function registration failed - duplicate name - mysql_result in Unknown on line 0 PHP Warning: Function registration failed - duplicate name - mysql_num_rows in Unknown on line 0 PHP Warning: Function registration failed - duplicate name - mysql_num_fields in Unknown on line 0 PHP Warning: Function registration failed - duplicate name - mysql_fetch_row in Unknown on line 0 PHP Warning: Function registration failed - duplicate name - mysql_fetch_array in Unknown on line 0 PHP Warning: Function registration failed - duplicate name - mysql_fetch_assoc in Unknown on line 0 PHP Warning: Function registration failed - duplicate name - mysql_fetch_object in Unknown on line 0 PHP Warning: Function registration failed - duplicate name - mysql_data_seek in Unknown on line 0 PHP Warning: Function registration failed - duplicate name - mysql_fetch_lengths in Unknown on line 0 PHP Warning: Function registration failed - duplicate name - mysql_fetch_field in Unknown on line 0 PHP Warning: Function registration failed - duplicate name - mysql_field_seek in Unknown on line 0 PHP Warning: Function registration failed - duplicate name - mysql_free_result in Unknown on line 0 PHP Warning: Function registration failed - duplicate name - mysql_field_name in Unknown on line 0 PHP Warning: Function registration failed - duplicate name - mysql_field_table in Unknown on line 0 PHP Warning: Function registration failed - duplicate name - mysql_field_len in Unknown on line 0 PHP Warning: Function registration failed - duplicate name - mysql_field_type in Unknown on line 0 PHP Warning: Function registration failed - duplicate name - mysql_field_flags in Unknown on line 0 PHP Warning: Function registration failed - duplicate name - mysql_escape_string in Unknown on line 0 PHP Warning: Function registration failed - duplicate name - mysql_get_client_info in Unknown on line 0 PHP Warning: Function registration failed - duplicate name - mysql_get_host_info in Unknown on line 0 PHP Warning: Function registration failed - duplicate name - mysql_get_proto_info in Unknown on line 0 PHP Warning: Function registration failed - duplicate name - mysql_get_server_info in Unknown on line 0 PHP Warning: Function registration failed - duplicate name - mysql in Unknown on line 0 PHP Warning: Function registration failed - duplicate name - mysql_fieldname in Unknown on line 0 PHP Warning: Function registration failed - duplicate name - mysql_fieldtable in Unknown on line 0 PHP Warning: Function registration failed - duplicate name - mysql_fieldlen in Unknown on line 0 PHP Warning: Function registration failed - duplicate name - mysql_fieldtype in Unknown on line 0 PHP Warning: Function registration failed - duplicate name - mysql_fieldflags in Unknown on line 0 PHP Warning: Function registration failed - duplicate name - mysql_selectdb in Unknown on line 0 PHP Warning: Function registration failed - duplicate name - mysql_createdb in Unknown on line 0 PHP Warning: Function
[PHP] sessions don't work
Hello, I have a problem with php sessions. I have a php file like: ? session_start(); session_register('pagina'); ? html head ... /head body ? include('file'); ? ... /html I have done diferent proofs and I have seen that the problem is that when I put include don't work sessions and if I left session it works. When I put all together it prints in the browser the code from html to body. It don't continue. If I reload the page it works properly. But I haven't found the way to do it automaticaly. Are there somebody who knows how to fix it? Thanks. Un saludo.
Re: [PHP] error message when run /usr/share/pear
when running the ./configure for PHP did you use --with-mysql Adam On Fri, 16 Aug 2002, Ryan wrote: What's wrong ? I am using RH7.3. I manually compile the php and install it before. But later I install using the rpm. Thx for reply ! Content-type: text/html PHP Warning: imap: Unable to initialize module Module compiled with module API=20010901, debug=0, thread-safety=0 PHPcompiled with module API=20020429, debug=0, thread-safety=0 These options need to match in Unknown on line 0 PHP Warning: Function registration failed - duplicate name - mysql_connect in Unknown on line 0 PHP Warning: Function registration failed - duplicate name - mysql_pconnect in Unknown on line 0 PHP Warning: Function registration failed - duplicate name - mysql_close in Unknown on line 0 PHP Warning: Function registration failed - duplicate name - mysql_select_db in Unknown on line 0 PHP Warning: Function registration failed - duplicate name - mysql_create_db in Unknown on line 0 PHP Warning: Function registration failed - duplicate name - mysql_drop_db in Unknown on line 0 PHP Warning: Function registration failed - duplicate name - mysql_query in Unknown on line 0 PHP Warning: Function registration failed - duplicate name - mysql_unbuffered_query in Unknown on line 0 PHP Warning: Function registration failed - duplicate name - mysql_db_query in Unknown on line 0 PHP Warning: Function registration failed - duplicate name - mysql_list_dbs in Unknown on line 0 PHP Warning: Function registration failed - duplicate name - mysql_list_tables in Unknown on line 0 PHP Warning: Function registration failed - duplicate name - mysql_list_fields in Unknown on line 0 PHP Warning: Function registration failed - duplicate name - mysql_error in Unknown on line 0 PHP Warning: Function registration failed - duplicate name - mysql_errno in Unknown on line 0 PHP Warning: Function registration failed - duplicate name - mysql_affected_rows in Unknown on line 0 PHP Warning: Function registration failed - duplicate name - mysql_insert_id in Unknown on line 0 PHP Warning: Function registration failed - duplicate name - mysql_result in Unknown on line 0 PHP Warning: Function registration failed - duplicate name - mysql_num_rows in Unknown on line 0 PHP Warning: Function registration failed - duplicate name - mysql_num_fields in Unknown on line 0 PHP Warning: Function registration failed - duplicate name - mysql_fetch_row in Unknown on line 0 PHP Warning: Function registration failed - duplicate name - mysql_fetch_array in Unknown on line 0 PHP Warning: Function registration failed - duplicate name - mysql_fetch_assoc in Unknown on line 0 PHP Warning: Function registration failed - duplicate name - mysql_fetch_object in Unknown on line 0 PHP Warning: Function registration failed - duplicate name - mysql_data_seek in Unknown on line 0 PHP Warning: Function registration failed - duplicate name - mysql_fetch_lengths in Unknown on line 0 PHP Warning: Function registration failed - duplicate name - mysql_fetch_field in Unknown on line 0 PHP Warning: Function registration failed - duplicate name - mysql_field_seek in Unknown on line 0 PHP Warning: Function registration failed - duplicate name - mysql_free_result in Unknown on line 0 PHP Warning: Function registration failed - duplicate name - mysql_field_name in Unknown on line 0 PHP Warning: Function registration failed - duplicate name - mysql_field_table in Unknown on line 0 PHP Warning: Function registration failed - duplicate name - mysql_field_len in Unknown on line 0 PHP Warning: Function registration failed - duplicate name - mysql_field_type in Unknown on line 0 PHP Warning: Function registration failed - duplicate name - mysql_field_flags in Unknown on line 0 PHP Warning: Function registration failed - duplicate name - mysql_escape_string in Unknown on line 0 PHP Warning: Function registration failed - duplicate name - mysql_get_client_info in Unknown on line 0 PHP Warning: Function registration failed - duplicate name - mysql_get_host_info in Unknown on line 0 PHP Warning: Function registration failed - duplicate name - mysql_get_proto_info in Unknown on line 0 PHP Warning: Function registration failed - duplicate name - mysql_get_server_info in Unknown on line 0 PHP Warning: Function registration failed - duplicate name - mysql in Unknown on line 0 PHP Warning: Function registration failed - duplicate name - mysql_fieldname in Unknown on line 0 PHP Warning: Function registration failed - duplicate name - mysql_fieldtable in Unknown on line 0 PHP Warning: Function registration failed - duplicate name - mysql_fieldlen in Unknown on line 0 PHP Warning: Function registration failed - duplicate name - mysql_fieldtype in Unknown on line 0 PHP Warning: Function registration failed - duplicate name - mysql_fieldflags in Unknown on
[PHP] Re: i some more help on the whole ereg thingy please
preg_match('!div class=Section1[^]+(.*)/div!Uis',$str,$regs[1]); $everything_between_divs = $regs[1]; when calling preg_match just pass $regs as param and not $regs[1] Elias [EMAIL PROTECTED] wrote in message 000101c244c9$08401d50$86a96518@jumpy">news:000101c244c9$08401d50$86a96518@jumpy... Hi, I hope you can help me a bit more, this is is my current script: (look after for more messages) ?php $file_name = $page_name.$ext or die ('Error 2'); $file = file($path.$file_name) or die ('Error 3'); $str = implode(' ', $file) or die ('Error 4'); // This is to check if the above code works // echo $str; // End check // Original first tag from the document I need to parse // div class=Section1 // Original last tag // /div preg_match('!div class=Section1[^]+(.*)/div!Uis',$str,$regs[1]); $everything_between_divs = $regs[1]; //echo $everything_between_divs; $good = implode(' ', $regs) or die ('Error 5'); // This is for later use to edit the contents of stuff between // the div tags - if I get the div tags to ever work $clean = ereg_replace(o:p/o:p, , $good); echo $clean; ? it doesn't work, what do you think I'm doing wrong? I get this error: Notice: Undefined offset: 1 in /home/victor/argilent-www/sites/malibu_place_2/index.php on line 104 Warning: Bad arguments to implode() in /home/victor/argilent-www/sites/malibu_place_2/index.php on line 106 Error 5 Thanks, - Vic __ Post your ad for free now! http://personals.yahoo.ca -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Getting PHP to submit a form to google
by simple ways, you can do that: $query = urlencode(your query string) $result_string = join('', file(http://www.google.com/search?q=$query)); Elias Henry [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Hi all I would like to be able to get the result of a search from google. Namely I would like to write a PHP script that will generate and submit a form (internally i.e. on the server) using the GET method to http://www.google.com/search setting the field q to the search words. It should then parse the results so that I can feed them back to the user in a form that I choose. How should/can I go about this? TIA. Henry. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: How retrieve database data from email?
How and where can I add an alias and associate PHP with that alias? Elias Bogdan Stancescu [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... You can set up php to run from console if it doesn't already, and add an alias to your mail server (stocks) which would parse the incoming mail and do the appropriate deeds. Bogdan M wrote: Hello People: I have my pages built in PHP / Mysql, all working ok, but now I need solve a problem I don't know how to solve or even how search about. Case this problem was already discussed in this list, I would be grateful if someone pass to me correct date so I can search about. My problem is very simple: I have customers who dont want enter into html pages to retrieve some info (suppose info are stock values), but rather they want to send email with formatted query into mail subject (or at least in body) , and then receive response again by email. For instance, customer could send this for [EMAIL PROTECTED] to: [EMAIL PROTECTED] subject: name=ibm, year=2001 body: (empty) In response, he should receive an email with all IBM stock prices day by day. That't all, I hope this will have solution, but I can't figure how email could communicate automatically with PHP/Mysql. Thanks Miguel -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] error message when run /usr/share/pear
Yes, I do use --with-mysql now i am using the rpm version of php. Adam Williams wrote: when running the ./configure for PHP did you use --with-mysql Adam On Fri, 16 Aug 2002, Ryan wrote: What's wrong ? I am using RH7.3. I manually compile the php and install it before. But later I install using the rpm. Thx for reply ! Content-type: text/html PHP Warning: imap: Unable to initialize module Module compiled with module API=20010901, debug=0, thread-safety=0 PHPcompiled with module API=20020429, debug=0, thread-safety=0 These options need to match in Unknown on line 0 PHP Warning: Function registration failed - duplicate name - mysql_connect in Unknown on line 0 PHP Warning: Function registration failed - duplicate name - mysql_pconnect in Unknown on line 0 PHP Warning: Function registration failed - duplicate name - mysql_close in Unknown on line 0 PHP Warning: Function registration failed - duplicate name - mysql_select_db in Unknown on line 0 PHP Warning: Function registration failed - duplicate name - mysql_create_db in Unknown on line 0 PHP Warning: Function registration failed - duplicate name - mysql_drop_db in Unknown on line 0 PHP Warning: Function registration failed - duplicate name - mysql_query in Unknown on line 0 PHP Warning: Function registration failed - duplicate name - mysql_unbuffered_query in Unknown on line 0 PHP Warning: Function registration failed - duplicate name - mysql_db_query in Unknown on line 0 PHP Warning: Function registration failed - duplicate name - mysql_list_dbs in Unknown on line 0 PHP Warning: Function registration failed - duplicate name - mysql_list_tables in Unknown on line 0 PHP Warning: Function registration failed - duplicate name - mysql_list_fields in Unknown on line 0 PHP Warning: Function registration failed - duplicate name - mysql_error in Unknown on line 0 PHP Warning: Function registration failed - duplicate name - mysql_errno in Unknown on line 0 PHP Warning: Function registration failed - duplicate name - mysql_affected_rows in Unknown on line 0 PHP Warning: Function registration failed - duplicate name - mysql_insert_id in Unknown on line 0 PHP Warning: Function registration failed - duplicate name - mysql_result in Unknown on line 0 PHP Warning: Function registration failed - duplicate name - mysql_num_rows in Unknown on line 0 PHP Warning: Function registration failed - duplicate name - mysql_num_fields in Unknown on line 0 PHP Warning: Function registration failed - duplicate name - mysql_fetch_row in Unknown on line 0 PHP Warning: Function registration failed - duplicate name - mysql_fetch_array in Unknown on line 0 PHP Warning: Function registration failed - duplicate name - mysql_fetch_assoc in Unknown on line 0 PHP Warning: Function registration failed - duplicate name - mysql_fetch_object in Unknown on line 0 PHP Warning: Function registration failed - duplicate name - mysql_data_seek in Unknown on line 0 PHP Warning: Function registration failed - duplicate name - mysql_fetch_lengths in Unknown on line 0 PHP Warning: Function registration failed - duplicate name - mysql_fetch_field in Unknown on line 0 PHP Warning: Function registration failed - duplicate name - mysql_field_seek in Unknown on line 0 PHP Warning: Function registration failed - duplicate name - mysql_free_result in Unknown on line 0 PHP Warning: Function registration failed - duplicate name - mysql_field_name in Unknown on line 0 PHP Warning: Function registration failed - duplicate name - mysql_field_table in Unknown on line 0 PHP Warning: Function registration failed - duplicate name - mysql_field_len in Unknown on line 0 PHP Warning: Function registration failed - duplicate name - mysql_field_type in Unknown on line 0 PHP Warning: Function registration failed - duplicate name - mysql_field_flags in Unknown on line 0 PHP Warning: Function registration failed - duplicate name - mysql_escape_string in Unknown on line 0 PHP Warning: Function registration failed - duplicate name - mysql_get_client_info in Unknown on line 0 PHP Warning: Function registration failed - duplicate name - mysql_get_host_info in Unknown on line 0 PHP Warning: Function registration failed - duplicate name - mysql_get_proto_info in Unknown on line 0 PHP Warning: Function registration failed - duplicate name - mysql_get_server_info in Unknown on line 0 PHP Warning: Function registration failed - duplicate name - mysql in Unknown on line 0 PHP Warning: Function registration failed - duplicate name - mysql_fieldname in Unknown on line 0 PHP Warning: Function registration failed - duplicate name - mysql_fieldtable in Unknown on line 0 PHP Warning: Function registration failed - duplicate name - mysql_fieldlen in Unknown on line 0 PHP Warning: Function registration failed - duplicate name - mysql_fieldtype in Unknown on line 0 PHP Warning: Function registration failed - duplicate name - mysql_fieldflags in Unknown on line
[PHP] Re: How do I customize the User-Agent when opening a remote file?
one of the solutions is not using fopen() instead use another class that is able to post to pages and retrieve them. check phpclasses.org Dallas Thunder [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... How do I customize the User-Agent when using fopen() or file() to open a remote file? PHP use PHP/4.2.3-dev on my system as the User-Agent when I using file() function to retrive a remote file. Howerver, some servers will refuse to serve browsers other than Mozilla compatible and return a 403 code. Is there any method to let me define User-Agent for my own? Thanks! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] help with making appropriate indexes.
Thanks Miles. But i'm not satisfied with your answer. I instinctly created indexes on every field that I'm using w/ conditions. But I feel that my script can be rewritten more efficiently using JOINTs or other things. Any site with reading material regarding how to index and make complex queries fast? I use the 'table_' just to hide the original table names prefixes. Elias Miles Thompson [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... General rule of thumb - create indexes on any fields which will be used in the conditional part of a select statement, whether where or join. Since you are working with tables, you can save yourself a lot of typing by dropping the table_ from the table names. After all, that's what they are. (You can do this unless you've gone too far with your system.) Miles Thompson At 02:15 PM 8/14/2002 +0200, lallous wrote: give this query: SELECT table_routing.id AS routeid, table_pricing.units AS price, table_routing.providerAS providerid, table_country.nameAS countryname, table_country.id AS countrycode FROM table_pricing, table_routing, table_country WHERE table_country.id = table_routing.country AND table_routing.country = table_pricing.country AND table_routing.provider = table_pricing.provider AND table_country.enabled = 1 ORDER BY routeid what keys / indexes should I create on whatever tables to make this query efficient? I don't know if this query can be re-written even with JOINs and stuff. Please advise, If you've got an online doc. about that it will help too. Elias -- 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] date problem
when I place date(h:i a) in a page on my server, and view it in a browser, I am returned: 02:51 pm. According to the server itself, though (logged in through ssh), using date, it is 3:51. gmdate(h:i a) returns the same 2:51 time. They are both one hour off from the server time. Any ideas of a solution to this? Anyone have a ready-to-use function which can add/subtract an hour or two to/from the date/time? -- Kae Verens http://www.contactjuggling.org/users/kverens/ http://www.contactjuggling.org/ (webmaster) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP, MySQL and Transaction
Hello, In an MySQL table, I insert some records. Before each insert (just before), I do a Select max() ... and I increment the result by one, to give a number (unique), and I have an auto_incremente field too. I'd like to know if there is a mechanism in PHP, if several person do the same thing in the same moment, to not have several record with the same number. Christian, -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] help with making appropriate indexes.
On Friday 16 August 2002 18:05, lallous wrote: But i'm not satisfied with your answer. This is not the appropriate list for your question in the first place. I instinctly created indexes on every field that I'm using w/ conditions. But I feel that my script can be rewritten more efficiently using JOINTs or other things. Possibly. The manual for your database should have tips on optimisation. Any site with reading material regarding how to index and make complex queries fast? Possibly the website for whatever DB you're using and its associated mailing-list? -- Jason Wong - Gremlins Associates - www.gremlins.com.hk Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * /* It's Like This Even the samurai have teddy bears, and even the teddy bears get drunk. */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP, MySQL and Transaction
On Friday 16 August 2002 17:37, Christian Ista wrote: Hello, In an MySQL table, I insert some records. Before each insert (just before), I do a Select max() ... and I increment the result by one, to give a number (unique), and I have an auto_incremente field too. Not sure why you would have a field that is manually incremented and also one that is auto_incremented. I'd like to know if there is a mechanism in PHP, if several person do the same thing in the same moment, to not have several record with the same number. PHP does not have such a mechanism. You can lock the relevant table, then query, then increment and update value, then unlock table. For further info 1) ask on php-db list 2) ask on mysql list -- Jason Wong - Gremlins Associates - www.gremlins.com.hk Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * /* What ever happened to happily ever after? */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Checkbox question
I have a page with a checkbox, when i submit to the next page the variable $whatever (the checkboxes name.) will be On if its checked, and it will be undefined if its not checked. Shouldn't it be a empty string? and not undefined? /José -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] date problem
On Friday 16 August 2002 17:24, Kae Verens wrote: when I place date(h:i a) in a page on my server, and view it in a browser, I am returned: 02:51 pm. According to the server itself, though (logged in through ssh), using date, it is 3:51. gmdate(h:i a) returns the same 2:51 time. They are both one hour off from the server time. Any ideas of a solution to this? Anyone have a ready-to-use function which can add/subtract an hour or two to/from the date/time? mktime() -- Jason Wong - Gremlins Associates - www.gremlins.com.hk Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * /* Since a politician never believes what he says, he is surprised when others believe him. -- Charles DeGaulle */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Checkbox question
On Friday 16 August 2002 17:54, José Jeria wrote: I have a page with a checkbox, when i submit to the next page the variable $whatever (the checkboxes name.) will be On if its checked, and it will be undefined if its not checked. Shouldn't it be a empty string? and not undefined? That is how it works. If it's not checked it does not get defined. -- Jason Wong - Gremlins Associates - www.gremlins.com.hk Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * /* We cannot command nature except by obeying her. -- Sir Francis Bacon */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Fw: Java and php domainname validation
Hi, I have write a domain control function in php, the php function will working fine. I have create a simpel form with 2 textboxes and 1 button, i will put in this fields a domainname and the extention like yahoo com if i click on the button, then we want to validate the domainname and the extention This will not working ?php function controle($Domainname, $extention) if ($extention ==com) { $server = whois.internic.net; $query = $Domainname . . . $extention; $data = whois_request($server, $query); if(strstr($data, No match for)) { return ok } else { return notok } } ? script function controledomainname(f) { if (controle(window.document.form1.domainname.value, window.document.form1.extention.value) = notok) { alert(your domainname allready exist) } } /script form name=form1 input TYPE=text NAME=domainname size=20 input TYPE=text NAME=extention size=20 input type=button value=validate onClick=controledomainname() /Form Best regards, Manu
Re: [PHP] Checkbox question
Hmmm, then the book Beginning PHP from Wrox is wrong... /J Jason Wong wrote: On Friday 16 August 2002 17:54, José Jeria wrote: I have a page with a checkbox, when i submit to the next page the variable $whatever (the checkboxes name.) will be On if its checked, and it will be undefined if its not checked. Shouldn't it be a empty string? and not undefined? That is how it works. If it's not checked it does not get defined. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Java and php domainname validation
Hi, I have write a domain control function in php, the php function will working fine. I have create a simpel form with 2 textboxes and 1 button, i will put in this fields a domainname and the extention like yahoo com if i click on the button, then we want to validate the domainname and the extention This will not working ?php function controle($Domainname, $extention) if ($extention ==com) { $server = whois.internic.net; $query = $Domainname . . . $extention; $data = whois_request($server, $query); if(strstr($data, No match for)) { return ok } else { return notok } } ? script function controledomainname(f) { if (controle(window.document.form1.domainname.value, window.document.form1.extention.value) = notok) { alert(your domainname allready exist) } } /script form name=form1 input TYPE=text NAME=domainname size=20 input TYPE=text NAME=extention size=20 input type=button value=validate onClick=controledomainname() /Form Best regards, Manu
[PHP] RE: sessions don't work
why do you think the session isn't working? If there is a run time error in 'file' then an error would be reported and the output terminated. If you have error reporting off then you would expect to get eactly what you see. Sounds like a problem inside 'file'. Tim Ward St Ives Direct Please refer to the following disclaimer in respect of this message: http://www.stivesdirect.com/e-mail-disclaimer.html -Original Message- From: Félix García Renedo [mailto:[EMAIL PROTECTED]] Sent: 16 August 2002 08:51 To: php Subject: sessions don't work Hello, I have a problem with php sessions. I have a php file like: ? session_start(); session_register('pagina'); ? html head ... /head body ? include('file'); ? ... /html I have done diferent proofs and I have seen that the problem is that when I put include don't work sessions and if I left session it works. When I put all together it prints in the browser the code from html to body. It don't continue. If I reload the page it works properly. But I haven't found the way to do it automaticaly. Are there somebody who knows how to fix it? Thanks. Un saludo. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: sessions don't work
May be the session is diable in the php.ini Félix garcía renedo wrote: Hello, I have a problem with php sessions. I have a php file like: ? session_start(); session_register('pagina'); ? html head ... /head body ? include('file'); ? ... /html I have done diferent proofs and I have seen that the problem is that when I put include don't work sessions and if I left session it works. When I put all together it prints in the browser the code from html to body. It don't continue. If I reload the page it works properly. But I haven't found the way to do it automaticaly. Are there somebody who knows how to fix it? Thanks. Un saludo. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] tricky preg_replace and how to escape the \{occurencenumber}
? $fn = 'test.gif'; echo preg_replace('/(.+?)(\..+?)/', '\1a\2', $fn); ? This script will output 'testa.gif' now how can i make it produce 'test1.gif' ? if i replace the: '\1a\2' with '\11\2' it will understand to replace with occurence number 11 ! How can i escape the 2nd '1' so it is considered as a string an not another number. Elias -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: tricky preg_replace and how to escape the \{occurencenumber}
probably this will be faster? $fn = str_replace(.gif, 1.gif, $fn); Lallous wrote: ? $fn = 'test.gif'; echo preg_replace('/(.+?)(\..+?)/', '\1a\2', $fn); ? This script will output 'testa.gif' now how can i make it produce 'test1.gif' ? if i replace the: '\1a\2' with '\11\2' it will understand to replace with occurence number 11 ! How can i escape the 2nd '1' so it is considered as a string an not another number. Elias -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] tricky preg_replace and how to escape the \{occurencenumber}
On Friday 16 August 2002 19:49, lallous wrote: ? $fn = 'test.gif'; echo preg_replace('/(.+?)(\..+?)/', '\1a\2', $fn); ? This script will output 'testa.gif' now how can i make it produce 'test1.gif' ? if i replace the: '\1a\2' with '\11\2' it will understand to replace with occurence number 11 ! How can i escape the 2nd '1' so it is considered as a string an not another number. Try: echo preg_replace('/(.+?)(\..+?)/', '\1'. '1' . '\2', $fn); -- Jason Wong - Gremlins Associates - www.gremlins.com.hk Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * /* IBM's original motto: Cogito ergo vendo; vendo ergo sum. */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Array query - finding the key for a value
This may be a silly question, but I'm used to being able to find PHP functions to do whatever I want, but I can't find one to do this! If I have an array like this: [0] - 'apple'; [1] - 'pear'; [2] - 'orange'; [3] - 'apricot'; I know I can use in_array() to check whether, say, 'orange' is in the array; but how do I then find out which index 'orange' is at? -- Tim Fountain ([EMAIL PROTECTED]) http://www.tfountain.co.uk/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Array query - finding the key for a value
On Friday 16 August 2002 19:50, Tim Fountain wrote: This may be a silly question, but I'm used to being able to find PHP functions to do whatever I want, but I can't find one to do this! If I have an array like this: [0] - 'apple'; [1] - 'pear'; [2] - 'orange'; [3] - 'apricot'; I know I can use in_array() to check whether, say, 'orange' is in the array; but how do I then find out which index 'orange' is at? array_search() -- Jason Wong - Gremlins Associates - www.gremlins.com.hk Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * /* The more things change, the more they'll never be the same again. */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Array query - finding the key for a value
From: Tim Fountain [mailto:[EMAIL PROTECTED]] Sent: Friday, August 16, 2002 7:51 AM Subject: [PHP] Array query - finding the key for a value This may be a silly question, but I'm used to being able to find PHP functions to do whatever I want, but I can't find one to do this! If I have an array like this: [0] - 'apple'; [1] - 'pear'; [2] - 'orange'; [3] - 'apricot'; I know I can use in_array() to check whether, say, 'orange' is in the array; but how do I then find out which index 'orange' is at? http://www.php.net/manual/en/function.array-search.php Note that it will return 0 if the value is in the first element of the array so use ( === ) to determine if it's a key or really not found. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Drop down reload
Hello, Could you tell me if it possible to reload the current page when I select a value in a drop down ? On a page, I have 2 drop down, the content on the first one come from the database. The content of the second one too (from database) but depend of the first drop down value. An idea to do that ? Bye -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Drop down reload
On Friday 16 August 2002 19:53, Christian Ista wrote: Hello, Could you tell me if it possible to reload the current page when I select a value in a drop down ? On a page, I have 2 drop down, the content on the first one come from the database. The content of the second one too (from database) but depend of the first drop down value. An idea to do that ? Use javascript. -- Jason Wong - Gremlins Associates - www.gremlins.com.hk Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * /* In Lexington, Kentucky, it's illegal to carry an ice cream cone in your pocket. */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Drop down reload
http://www.zend.com/zend/tut/drop-down.php -- Julio Nobrega Me empurraram pra chegar lá mais rápido! http://www.inerciasensorial.com.br Christian Ista [EMAIL PROTECTED] wrote in message 000201c2451b$94fe4300$c000a8c0@p3portable">news:000201c2451b$94fe4300$c000a8c0@p3portable... Hello, Could you tell me if it possible to reload the current page when I select a value in a drop down ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Drop down reload
Hi there. You would need to use JavaScript for this, specifically an onChange( ) event for the select field(s). Your JavaScript should basically reload the page once an option has been selected from the first select field, passing through a variable containing the value of the option which has just been selected, you can then use php to retrieve the appropriate records for the second select field when the page is reloaded. Cheers Scott - Original Message - From: Christian Ista [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, August 16, 2002 1:53 PM Subject: [PHP] Drop down reload Hello, Could you tell me if it possible to reload the current page when I select a value in a drop down ? On a page, I have 2 drop down, the content on the first one come from the database. The content of the second one too (from database) but depend of the first drop down value. An idea to do that ? Bye -- 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] Conditional Popup Menus with PHP/mySQL and Java?
This is a javascript thing. Try comp.lang.javascript... the only thing u really need to know is that you have to send ALL the data to the page with javascript, then effectively, it's a static HTML page. Justin French There is an ariticle on Zend out there: http://zend.com/zend/tut/drop-down.php Look after and have fun. regards robert -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Can I use iframes as if I was using a new thread in Java?
Hi; Here is a brief description of my problem: There is a file called index.php in some directory. The guy who wrote this file didn't bother creating another file where the functions are defined. More precisely, there is a big switch statement in the file. Depending on the outcome of the switch statement, one of the functions is called. For some reason, I cannot call the function itself. I have to access it via the switch statement. However as it as index.php, it also prints some HTML stuff, which I do not want to be displayed... Can I use an iframe do call this index.php and passing a parameter to be used in the switch statement? Anything I have to be careful with? Any way of knowing when the iframe has finished doing its job from the calling page? (maybe use parent.form.submit()) Any help will be appreciated Serdar Sokmen -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] tricky preg_replace and how to escape the \{occurencenumber}
James, Actually the interpreter will evaluate the '\1'. '1' . '\2' into one string before passing it to preg_replace So it will yield up as I originally wrote it, and it won't work. Elias Jason Wong [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... On Friday 16 August 2002 19:49, lallous wrote: ? $fn = 'test.gif'; echo preg_replace('/(.+?)(\..+?)/', '\1a\2', $fn); ? This script will output 'testa.gif' now how can i make it produce 'test1.gif' ? if i replace the: '\1a\2' with '\11\2' it will understand to replace with occurence number 11 ! How can i escape the 2nd '1' so it is considered as a string an not another number. Try: echo preg_replace('/(.+?)(\..+?)/', '\1'. '1' . '\2', $fn); -- Jason Wong - Gremlins Associates - www.gremlins.com.hk Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * /* IBM's original motto: Cogito ergo vendo; vendo ergo sum. */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: tricky preg_replace and how to escape the \{occurencenumber}
Oh well, I could have solved it w/ too many other methods, but how can I escape the \{occurence} as in my case? Elias B.C. Lance [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... and if you are gonna append '1' for all extension, try this: echo preg_replace('/(\..+?)/', '1$1', $fn); Lallous wrote: ? $fn = 'test.gif'; echo preg_replace('/(.+?)(\..+?)/', '\1a\2', $fn); ? This script will output 'testa.gif' now how can i make it produce 'test1.gif' ? if i replace the: '\1a\2' with '\11\2' it will understand to replace with occurence number 11 ! How can i escape the 2nd '1' so it is considered as a string an not another number. Elias -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Re: Getting PHP to submit a form to google
a more OO approach might be to use the Snoopy PHP class (http://snoopy.sourceforge.net) This will allow you to do GET/POST method requests on URLS with query variables, ie: POST $snoopy = new Snoopy; $submit_vars[q] = [ form variables ]; $submit_url = http://www.google.com/search;; $snoopy-submit($submit_url,$submit_vars); $result = $snoopy-results; GET $snoopy = new Snoopy; $submit_url = http://www.google.com/search?q=;.[ form variables ]; $snoopy-fetch($submit_url); $result = $snoopy-results; Then simply parse through $result; -Original Message- From: lallous [mailto:[EMAIL PROTECTED]] Sent: Friday, August 16, 2002 4:24 AM To: [EMAIL PROTECTED] Subject: [PHP] Re: Getting PHP to submit a form to google by simple ways, you can do that: $query = urlencode(your query string) $result_string = join('', file(http://www.google.com/search?q=$query)); Elias Henry [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Hi all I would like to be able to get the result of a search from google. Namely I would like to write a PHP script that will generate and submit a form (internally i.e. on the server) using the GET method to http://www.google.com/search setting the field q to the search words. It should then parse the results so that I can feed them back to the user in a form that I choose. How should/can I go about this? TIA. Henry. -- 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] progress bar for uploading files
hi guys i was wondering if there was anyway to have a progress bar for uploading images ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] [Session-objects] Call to a member function on a non-object
Hi people, As I understand it, object are unserialized into their former Class, if that Class is in memory. That's right, right? Well, consider the following code: include_once(../config.inc.php); include_once($WORKDIR.obj/foto.obj.php); if($type == 1) { $foto = new Foto(); } if(isset($_SESSION['foto'])) { $foto = unserialize($_SESSION['foto']); } $foto-makeInputFoto($type); $_SESSION['foto']=serialize($foto); It's for a page that can edit or add a foto in(to) the database. If I run it like this, with ?type=1 in the URL, it works the first time, but after a reload of the exact same page, I get a 'Call to a member function on a non-object' in the line '$foto-makeInputFoto($type);'. Why is that? It's already a Foto-object, because I unserialized it, isn't it? I also tried: if($type == 1 !isset($_SESSION['foto'])) { $foto = new Foto(); } elseif(isset($_SESSION['foto'])) { $foto = unserialize($_SESSION['foto']); } With exactly the same effect. Any idea on how I can solve this? Tia! -- Kind regards, Tim -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Array query - finding the key for a value
can do this: $array = array('apple', 'pear', 'orange', 'apricot'); $array = array_flip($array); $keyword = 'orange'; echo found '$orange' @ index: . $array[$keyword]; Don't use this method though! It makes your program slow! Elias Tim Fountain [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... This may be a silly question, but I'm used to being able to find PHP functions to do whatever I want, but I can't find one to do this! If I have an array like this: [0] - 'apple'; [1] - 'pear'; [2] - 'orange'; [3] - 'apricot'; I know I can use in_array() to check whether, say, 'orange' is in the array; but how do I then find out which index 'orange' is at? -- Tim Fountain ([EMAIL PROTECTED]) http://www.tfountain.co.uk/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] OO code and private functions
Can I make a function private in PHP, so that it can only be called from within an object of that class??? Just discovering the wonders of OO PHP... :-) == Richard Black Systems Programmer, DataVisibility Ltd - http://www.datavisibility.com Tel: 0141 435 3504 Email: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] OO code and private functions
Nope On Fri, 16 Aug 2002, Richard Black wrote: Can I make a function private in PHP, so that it can only be called from within an object of that class??? Just discovering the wonders of OO PHP... :-) == Richard Black Systems Programmer, DataVisibility Ltd - http://www.datavisibility.com Tel: 0141 435 3504 Email: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] OO code and private functions
Hi there. Not at the moment, but I think this is a feature of the new Zend engine 2, currently in development. Cheers Scott - Original Message - From: Richard Black [EMAIL PROTECTED] To: Php-General [EMAIL PROTECTED] Sent: Friday, August 16, 2002 4:24 PM Subject: [PHP] OO code and private functions Can I make a function private in PHP, so that it can only be called from within an object of that class??? Just discovering the wonders of OO PHP... :-) == Richard Black Systems Programmer, DataVisibility Ltd - http://www.datavisibility.com Tel: 0141 435 3504 Email: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] OO code and private functions
Not currently, but this will be added in the Zend2 engine. You can find out about this on the Zend website. - Original Message - From: Richard Black [EMAIL PROTECTED] To: Php-General [EMAIL PROTECTED] Sent: Friday, August 16, 2002 9:24 AM Subject: [PHP] OO code and private functions Can I make a function private in PHP, so that it can only be called from within an object of that class??? Just discovering the wonders of OO PHP... :-) == Richard Black Systems Programmer, DataVisibility Ltd - http://www.datavisibility.com Tel: 0141 435 3504 Email: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] session lost when back button hit?
I have two pages, page one links to page two via a form button. The browser does not accept cookies. On page two I create a session variable with: $_SESSION[id] = 1; But if I hit the back button to go back to page one $_SESSION[id] is not set. If I hit the reload button on page one it is still not set. How can I get a session var to stay set when someone hits the back button? Jc PS I have session.auto_start ON and enabled trans-sid -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] using PHP on forms submitted to other sites - HELP
We have a client that has a form that submits to a payment processor to handle the cc processing. The visitor gets what he wants and then comes to a verification page on our clients site. He wants to buy it so he clicks the submit button and hes gone, to the payment processors site. We want to send a notification that someone has placed an order, not that they got to the payment page. So I have tried using onSubmit on the form and then placing the function name in there, but that doesnt work, its a function written in PHP to send a mail alert. Any thoughts we dont want the alert going to the guy until the visitor actually hits the submit button, and once it leaves the return notification from the processor is very limited, so I can't send it on the return from teh processor. Help please :) = Theres no such thing as a problem unless the servers are on fire! __ Do You Yahoo!? HotJobs - Search Thousands of New Jobs http://www.hotjobs.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] OO code and private functions
not yet (Zend engine 2.0 I believe has this) Currently the convention is to name private functions _* (variables the same) This denotes to other coders that you intended this to be a private function. =C= * * Cal Evans * The Virtual CIO * http://www.calevans.com * -Original Message- From: Richard Black [mailto:[EMAIL PROTECTED]] Sent: Friday, August 16, 2002 9:24 AM To: Php-General Subject: [PHP] OO code and private functions Can I make a function private in PHP, so that it can only be called from within an object of that class??? Just discovering the wonders of OO PHP... :-) == Richard Black Systems Programmer, DataVisibility Ltd - http://www.datavisibility.com Tel: 0141 435 3504 Email: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] SQL Injection/Data Balidation
Please CC me as I'm on digest: -- Are there any libraries for data validation available? If one reads papers like these: http://www.nextgenss.com/papers/advanced_sql_injection.pdf http://www.nextgenss.com/papers/more_advanced_sql_injection.pdf It becomes apparent that sites using databases are incredibly open to attack because of the ingenuity of the attackers. I think there should be a PHPGuardLib or something. After reading those articles, I plan on filtering ALL input for semi-cololons and 'chr(' character strings. In the cases where I want to accept apostrophes, I'm going to be very careful. Also, are there any attacks to email programs on linux that can be done through input forms? PS, for those who think escaping user input only on apostrophes, THINK AGAIN! And read the aticles above. -- If You want to buy computer parts, see the reviews at: http://www.cnet.com/ **OR EVEN BETTER COMPILATIONS**!! http://sysopt.earthweb.com/userreviews/products/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] session lost when back button hit?
HI make ser youre using session_start() before performing any action on sessions, also make sure you´re registering properly the variables. -Mensaje original- De: Jean-Christian Imbeault [mailto:[EMAIL PROTECTED]] Enviado el: viernes, 16 de agosto de 2002 9:43 Para: [EMAIL PROTECTED] Asunto: [PHP] session lost when back button hit? I have two pages, page one links to page two via a form button. The browser does not accept cookies. On page two I create a session variable with: $_SESSION[id] = 1; But if I hit the back button to go back to page one $_SESSION[id] is not set. If I hit the reload button on page one it is still not set. How can I get a session var to stay set when someone hits the back button? Jc PS I have session.auto_start ON and enabled trans-sid -- 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] sessions: what to do when browser won't accept cookies?
I'm finding myself in a strange situation. I am trying to build a a web site that will use sessions and work even if a user decides not to accept cookies. So far the site design is working fine by using the trans-sid functionality of PHP. But I have this on case where things break down. 1- user comes to the top page of my site 2- I try and start a session. user refuses to accept cookies 3- user click on links to visit my site, session works before SID is passed along in the URL 4 user clicks back button all the way back to my top page 5 session is lost because the SID is not in the URL of the top page ... How can I get around the problem of not having the SID in the URL of the first page to my site the user comes to? It kind of a chicken-or-the-egg problem ... Thanks for any and all suggestions! Jc -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] session lost when back button hit?
Daniel Masson wrote: make ser youre using session_start() before performing any action on sessions, also make sure you´re registering properly the variables. Did you see my PS at the end of my question? PS I have session.auto_start ON and enabled trans-sid I don't need seesion_start() and I don't need to register the variable since I am setting it directly with $_SESSION[id] = 1 If I am wrong about this please correct me, I'm still new to sessions. Jc -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: How retrieve database data from email?
I'm not very proficient with e-mail configuration, so if someone finds I'm saying something wrong, don't think twice before correcting it. AFAIK, you can create an alias typically in /etc/aliases - or /etc/sendmail/aliases, as I've heard for newer versions of sendmail. In any case, the file has to be there already because that's where you have the root/webmaster/postmaster aliases defined. Add a line reading stocks: | /usr/bin/php /path/to/your/script.php I'm not sure if sendmail should be restarted after this, so you'd better do it just to make sure. You'll obviously need root access to do these. After this point, you don't anymore. In /path/to/your/script.php, you'll receive the whole e-mail message from standard input, so you'll have to check out those functions here http://www.php.net/manual/en/features.commandline.php Then all you have to do is parse the incoming mail message - I'm sure you'll be able to google out plenty of functions/classes to do that - drop me an e-mail if you don't find any and I'll send you mine. Bogdan Lallous wrote: How and where can I add an alias and associate PHP with that alias? Elias Bogdan Stancescu [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... You can set up php to run from console if it doesn't already, and add an alias to your mail server (stocks) which would parse the incoming mail and do the appropriate deeds. Bogdan M wrote: Hello People: I have my pages built in PHP / Mysql, all working ok, but now I need solve a problem I don't know how to solve or even how search about. Case this problem was already discussed in this list, I would be grateful if someone pass to me correct date so I can search about. My problem is very simple: I have customers who dont want enter into html pages to retrieve some info (suppose info are stock values), but rather they want to send email with formatted query into mail subject (or at least in body) , and then receive response again by email. For instance, customer could send this for [EMAIL PROTECTED] to: [EMAIL PROTECTED] subject: name=ibm, year=2001 body: (empty) In response, he should receive an email with all IBM stock prices day by day. That't all, I hope this will have solution, but I can't figure how email could communicate automatically with PHP/Mysql. Thanks Miguel -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: using PHP on forms submitted to other sites - HELP
Dan McCullough [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... We have a client that has a form that submits to a payment processor to handle the cc processing. The visitor gets what he wants and then comes to a verification page on our clients site. He wants to buy it so he clicks the submit button and hes gone, to the payment processors site. We want to send a notification that someone has placed an order, not that they got to the payment page. So I have tried using onSubmit on the form and then placing the function name in there, but that doesnt work, its a function written in PHP to send a mail alert. Any thoughts we dont want the alert going to the guy until the visitor actually hits the submit button, and once it leaves the return notification from the processor is very limited, so I can't send it on the return from teh processor. Help please :) try this... ? global $submit; if($submit){ Do whatever... } ? input type=submit name=sent value=submit = Theres no such thing as a problem unless the servers are on fire! __ Do You Yahoo!? HotJobs - Search Thousands of New Jobs http://www.hotjobs.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: How retrieve database data from email?
Bogdan Stancescu wrote: Add a line reading stocks: | /usr/bin/php /path/to/your/script.php Sorry, it should be stocks: | /usr/bin/php /path/to/your/script.php Also, first make sure php works from command line and check its location. Bogdan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] HTML-based mail with PHP
Now, this may be more of an e-mail question than a PHP question. For that, I apologize. I'm having trouble with some HTML-based mail with PHP. It's not the regular thing where I can't get it to use the tags instead of just printing them. That part's fine; it comes out HTML-based. My problem is the way it's not accessing a certain image. I get a broken link instead of an image at the top of my e-mail. I had it print the URL at which it should find the image, and then cut and paste that in my browser, and the image comes up fine. But, as far as putting it in the e-mail, it's not working out. Any ideas? __ Do You Yahoo!? HotJobs - Search Thousands of New Jobs http://www.hotjobs.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: progress bar for uploading files
You're best bet would be to make an animated gif that looks like a progres bar (or twirling icon or whatever). Then when the users hits submit, turn it on... in the same way you do image rollovers, etc... Then it will spin until the form is submitted... On Fri, 16 Aug 2002, electroteque wrote: hi guys i was wondering if there was anyway to have a progress bar for uploading images ? -- 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] PHP Java Extension
Hi I wanted to learn some new stuff and experiment with the PHP Java extension, what are the possibilities, what's cool about it, what are you guys using it for and where can i find some tutorials for it ? Had a look at php.net but can't find much info suitable for a newbie to this particular extension. Thanks :) Girish -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Session variable in query
not entirely sure what you mean, but perhaps this is what you're after??? $sql = SELECT * FROM tablename WHERE username='{$_SESSION['userid']}'; Justin French on 17/08/02 2:08 AM, Christian Ista ([EMAIL PROTECTED]) wrote: Hello, Is it possible to use a session variable in a query (mysql_query) without passé by an temp variable ? Bye -- 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] Variable
On Wed, Aug 14, 2002 at 08:23:18AM +, Remon Redika wrote: input type=text name=namasa size=40 input type=text name=namadu size=40 input type=text name=namati size=40 $Namak = $namasa; $Namak = $Namak.$namadu; $Namak = $Namak.$namati; Is that REALLY what you want to do? There are no spaces between the names. Try: $Namak = $namsa $namadu $namati; But, that's probably not the problem. I suspect none of the three variables are being set because you have register_globals turned off. Use the $_POST or $_GET variables. Read the manual on these topics for more information. --Dan -- PHP classes that make web design easier SQL Solution | Layout Solution | Form Solution sqlsolution.info | layoutsolution.info | formsolution.info T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y 4015 7 Av #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: sessions: what to do when browser won't accept cookies?
In article [EMAIL PROTECTED], [EMAIL PROTECTED] (Jean-Christian Imbeault) wrote: How can I get around the problem of not having the SID in the URL of the first page to my site the user comes to? It kind of a chicken-or-the-egg problem ... I kind of hate it when sites do this, but you could have the first page reload itself if it doesn't have an SID, and add an SID to itself. This way, if they use the back button, the first first page they come to has the SID. You might then be able to use window.forward() in Javascript first, before giving them an SID. If they used the back button to get to you, window.forward() moves forward to a page that has an SID (which should look exactly like the page they thought they wanted that didn't have an SID). If they didn't use the back button to get to you, window.forward shouldn't do anything. As a fall-back, you would probably want to have a warning on the front page that says, if the front page has no SID, that if they used the back button get here, use the forward button to go back or they might lose their session data. This depends on your audience, of course. If you did that to me as a general browser, I probably wouldn't ever visit your site again :*) Note that some sites do come right out and tell you not to use your back button to get around. You might just do this, and if they use their back button anyway, they get a new session. Jerry -- http://www.hoboes.com/jerry/ Give a man a fish and you feed him for a day. Teach him to fish, and you've depleted the lake.--It Isn't Murder If They're Yankees (http://www.hoboes.com/jerry/Murder/) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Re: progress bar for uploading files
Bet this would be perfect for combining Flash and PHP. -Original Message- From: Philip Hallstrom [mailto:[EMAIL PROTECTED]] Sent: Friday, August 16, 2002 11:57 AM To: electroteque Cc: [EMAIL PROTECTED] Subject: [PHP] Re: progress bar for uploading files You're best bet would be to make an animated gif that looks like a progres bar (or twirling icon or whatever). Then when the users hits submit, turn it on... in the same way you do image rollovers, etc... Then it will spin until the form is submitted... On Fri, 16 Aug 2002, electroteque wrote: hi guys i was wondering if there was anyway to have a progress bar for uploading images ? -- 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 General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Credit Card Transactions and Micropayment
Sascha: On Wed, Aug 14, 2002 at 04:06:39PM +0200, Sascha Braun wrote: Are there some ways of using a micropayment system together with PHP? What do you mean by micropayment? Paying for small fees? How small are you talking about? Maybe something where Customers can see the Amount of Money they have to pay, and then they do a phonecall to e specific number and then the page redirects teh customer to a downloads page where the user can receive his picturepackage. Sounds like an overly complex process. Why not do it all automatically with a well designed payment script? --Dan PS: Please turn on line wrapping in your email program. -- PHP classes that make web design easier SQL Solution | Layout Solution | Form Solution sqlsolution.info | layoutsolution.info | formsolution.info T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y 4015 7 Av #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Session variable in query
Hello, Is it possible to use a session variable in a query (mysql_query) without passé by an temp variable ? Bye -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Re: progress bar for uploading files
I had a rather weird thought, but it is Friday after all :^] How about setting a small IFRAME in the upload diaog box? Then you could do a couple of things; a.) Place a small animated GIF in the IFRAME that moves left to right or from side to side until the upload completes. 2.) Use the GD library and do something similar in the IFRAME. Now, there are some issues such as calcing the time it takes to upload or measuring the amount of the file upload and updating the IFRAME image accordingly, and maybe some other little details that I am not thinking about, but it just a weird little thought. I'd love to see some solutions based on this though, and maybe when I get a little time next week I'll give it a go. HTH! Jay *** * Texas PHP Developers Conf Spring 2003 * * T Bar M Resort Conference Center * * New Braunfels, Texas* * San Antonio Area PHP Developers Group * * Interested? Contact [EMAIL PROTECTED] * *** Rasmus, how much would it cost to get you or someone like you to come to this? :^] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] tricky preg_replace and how to escape the \{occurencenumber}
On Friday 16 August 2002 22:12, lallous wrote: Actually the interpreter will evaluate the '\1'. '1' . '\2' into one string before passing it to preg_replace So it will yield up as I originally wrote it, and it won't work. Hmm, you're right. The interpreter is smarter than I thought :-/ -- Jason Wong - Gremlins Associates - www.gremlins.com.hk Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * /* Why should we subsidize intellectual curiosity? -Ronald Reagan */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Moving Files - Stupid Error
Hey all, I need a little help with moving a file on the server after an upload. Our company site is hosted, so I don't have full access to the configuration files, but I can do a PHP_info dump if you need more clarification. Using 4.0.1pl2. What I'm doing is uploading a file from a form, and that goes through just fine. I can print the file name to a database, along with the size. The trouble is, no matter how I try to move it from the tmp directory, I get the same error. I've tried referencing it by the name given in the form, I've tried referencing it by $_Files. No matter how I call it, it never seems to go back to the tmp directory to look for the file. Here's a sample error: Warning: Unable to create '/test/data/test.txt': No such file or directory in /usr/local/www/vhosts/healthtvchannel.org/htdocs/test/upload.php on line 17 That's with using: copy({$UploadedFile},/test/data/.$UploadedFile_name); $UploadedFile being the name I'm using. Both variables seem to be returning correctly. $UploadedFile returns the temp name, and $UploadedFile_name returns the actual name. The file is also far under the maximum file size. The /test/data has Nobody write permissions, I know because I'm writing to a file in it with another script, and there's no file in there with the same file name to cause overwriting ownership conflicts. So where am I being stupid? Here's the full code: ? print($UploadedFile); print(br /); $filename = $UploadedFile_name; print $filename was uploaded successfulybr\n; $realname = $UploadedFile_name; print realname is $realnamebr\n; print copying file to uploads dirbr\n; copy({$UploadedFile},/test/data/.$UploadedFile_name); ? form enctype=multipart/form-data action=?$php_self? method=post input type=hidden name=MAX_FILE_SIZE value=4096 input name=UploadedFile type=file input type=submit value=upload -- S. Keller UI Engineer The Health TV Channel, Inc. (a non - profit organization) 3820 Lake Otis Pkwy. Anchorage, AK 99508 907.770.6200 ext.220 907.336.6205 (fax) Email: [EMAIL PROTECTED] Web: www.healthtvchannel.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] progress bar for uploading files
On 16 Aug 2002 at 23:40, electroteque wrote: hi guys i was wondering if there was anyway to have a progress bar for uploading images ? TMTOWDI, but here is a way I did something similar. I was spidering remote sites and to get user's data and store in a database and the user could not continue until the spider spun it's web. I accpeted the data I needed and then returned a page with the HTTP-REFRESH tag in it with something like this meta http-equiv=Refresh content=10; URL=http://yoursite.com/verify_upload?process_id=Xamp;action=check_uploadamp;timer=X So it refreshes every 10 seconds and checks to see if process X has finished, if so then redirect to the next step, if not then just return but upgrade the timer so you can increase your counter (perhaps a percentage in a table cell). Peter -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Re: sessions: what to do when browser won't accept cookies?
Good idea but remember some people turn off javascript and cookies :) Make your site as accessible as you can, using Jerry's suggestion is a good idea and then accept some people will be bent on not being able to use your site by disabling as much functionality in their browsers as they can or they use old browsers that don't support the functionality you are using. Jason -Original Message- From: Jerry [mailto:[EMAIL PROTECTED]] Sent: Friday, August 16, 2002 10:20 AM To: [EMAIL PROTECTED] Subject: [PHP] Re: sessions: what to do when browser won't accept cookies? In article [EMAIL PROTECTED], [EMAIL PROTECTED] (Jean-Christian Imbeault) wrote: How can I get around the problem of not having the SID in the URL of the first page to my site the user comes to? It kind of a chicken-or-the-egg problem ... I kind of hate it when sites do this, but you could have the first page reload itself if it doesn't have an SID, and add an SID to itself. This way, if they use the back button, the first first page they come to has the SID. You might then be able to use window.forward() in Javascript first, before giving them an SID. If they used the back button to get to you, window.forward() moves forward to a page that has an SID (which should look exactly like the page they thought they wanted that didn't have an SID). If they didn't use the back button to get to you, window.forward shouldn't do anything. As a fall-back, you would probably want to have a warning on the front page that says, if the front page has no SID, that if they used the back button get here, use the forward button to go back or they might lose their session data. This depends on your audience, of course. If you did that to me as a general browser, I probably wouldn't ever visit your site again :*) Note that some sites do come right out and tell you not to use your back button to get around. You might just do this, and if they use their back button anyway, they get a new session. Jerry -- http://www.hoboes.com/jerry/ Give a man a fish and you feed him for a day. Teach him to fish, and you've depleted the lake.--It Isn't Murder If They're Yankees (http://www.hoboes.com/jerry/Murder/) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] session lost when back button hit?
By any chance, is page one the entrance page to your application? I.e. is there a session id in either the query string of the page URL or was there one passed to it via a POST? Without cookies enabled, there is no way to allow users to use the back button to go back to the entrance page while maintaining the session. One (hackish) solution to this is to cause the entrance page to immediately redirect to itself using either PHP's header function, or a meta refresh. Your goal here is to make it so that hitting back from a secondary page would take you to the post-refreshed entrance page which has the session ID. Good luck. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] .net] On Behalf Of Jean-Christian Imbeault Sent: Friday, August 16, 2002 10:43 AM To: [EMAIL PROTECTED] Subject: [PHP] session lost when back button hit? I have two pages, page one links to page two via a form button. The browser does not accept cookies. On page two I create a session variable with: $_SESSION[id] = 1; But if I hit the back button to go back to page one $_SESSION[id] is not set. If I hit the reload button on page one it is still not set. How can I get a session var to stay set when someone hits the back button? Jc PS I have session.auto_start ON and enabled trans-sid -- 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] SQL Injection/Data Balidation
Yeah, I'm scared... Please excuse me but may I say that it seems like you've sent some wrong info to the wrong mailing list? I use PHP NOT ASP, I use MySQL or PostgreSQL or Oracle but NOT M$ SQL Server. And IIS? Of course, some people use it (perhaps) because of some unavoidable circumstances but I don't--I use Apache NOT IIS. Of course, there's nothing bad about being cautious... However, please send some links (or documents) that are more relevant... Thanks anyway, now *I* have something to scare my friends... ;) - E Please CC me as I'm on digest: -- Are there any libraries for data validation available? If one reads papers like these: http://www.nextgenss.com/papers/advanced_sql_injection.pdf http://www.nextgenss.com/papers/more_advanced_sql_injection.pdf It becomes apparent that sites using databases are incredibly open to attack because of the ingenuity of the attackers. I think there should be a PHPGuardLib or something. After reading those articles, I plan on filtering ALL input for semi-cololons and 'chr(' character strings. In the cases where I want to accept apostrophes, I'm going to be very careful. Also, are there any attacks to email programs on linux that can be done through input forms? PS, for those who think escaping user input only on apostrophes, THINK AGAIN! And read the aticles above. -- If You want to buy computer parts, see the reviews at: http://www.cnet.com/ **OR EVEN BETTER COMPILATIONS**!! http://sysopt.earthweb.com/userreviews/products/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php _ MSN Hotmail è il provider email più grande al mondo cosa aspetti a farti un account? http://www.hotmail.it -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Invoking sendmail with PHP
On a unix box, you can supply the arguments to the sendmail command in php.ini file, when you specify the sendmail path. Daren Cotter [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... To recap, my problem is: I need some mailings sent immediately (confirmation emails, welcome emails, password lookup emails, etc), while others simply get thrown into the queue, and get sent the next time the queue processes. I contacted a sendmail guru, and he told me that if Sendmail is run with the -odb arguments, the mail will process immediately, while if it's run with the -odd arguments, it will only be queued. So the question is, using PHP, how do I invoke sendmail with the different arguments separately? __ Do You Yahoo!? HotJobs - Search Thousands of New Jobs http://www.hotjobs.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Keyword exact phrase search
On Thursday 15 August 2002 23:50, David Buerer wrote: Because to my knowledge the limitation of a TEXT field is 64K. I need to store entire documents in the database which far exceed the 64K limitation. Given that criteria, the only option is to use blob fields which have an upper limit of roughly 4GB. TEXT fields in MySQL can store the same amount as their BLOB counterparts. -- Jason Wong - Gremlins Associates - www.gremlins.com.hk Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * /* Rule of Defactualization: Information deteriorates upward through bureaucracies. */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Apache2
Upgraded to Apache2, and now most of my php scripts won't work. No error msg att all, just that nothing happens. Guess I missed some standard security setting, got any clues to this newbie? Thanks Björn Hilliges, Sweden. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: php and classes
the problem is that i dont have access to php.ini :/ on a shared webhotel :( regards patrick Jason Wong [EMAIL PROTECTED] skrev i meddelandet [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... On Friday 16 August 2002 11:40, Pafo wrote: nm, now it works,, forgot the silly () Always set error reporting to FULL, and always error log to a file (see settings in php.ini). That way you probably could have figured out what the problem was by examining the logs. -- Jason Wong - Gremlins Associates - www.gremlins.com.hk Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * /* Your fly might be open (but don't check it just now). */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] array and a class
i got my nice looking class like this: ?php class Relic { var $RelicName; var $RelicType; var $RelicRealm; var $RelicOwner; function PrintInfo() { print $this-RelicName : $this-RelicType : $this-RelicRealm : $this-RelicOwnerbr; } function CheckForPrint() { if ($this-RelicName == || $this-RelicType == || $this-RelicRealm == || $this-RelicOwner == ) { return false; } else { return true; } } function Clean() { $this-RelicName = ; $this-RelicType = ; $this-RelicRealm = ; $this-RelicOwner = ; } function SetName($name) { $this-RelicName = $name; } function SetType($type) { $this-RelicType = $type; } function SetRealm($realm) { $this-RelicRealm = $realm; } function SetOwner($owner) { $this-RelicOwner = $owner; } function DebugPrint() { print $this-RelicName; } } $temp = new Relic(); $temp-SetName(test); $temp-DebugPrint(); ? but the thing is i want an array that is based on my class, so i want to use $relicarray[1]-DebugPrint(); how does it work,, anyone that can give me a working example, cause i cant find any :/ regards patrick -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Apache2
It will be a while before Apache 2 is properly supported. Switch back to Apache 1.3.x for now. We are working on it and PHP 4.3 should be significantly better with Apache 2. -Rasmus On Fri, 16 Aug 2002, Björn Hilliges wrote: Upgraded to Apache2, and now most of my php scripts won't work. No error msg att all, just that nothing happens. Guess I missed some standard security setting, got any clues to this newbie? Thanks Björn Hilliges, Sweden. -- 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] Apache2
Upgraded to Apache2, and now most of my php scripts won't work. No error msg att all, just that nothing happens. Guess I missed some standard security setting, got any clues to this newbie? What does phpinfo() say? What does httpd -l say? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] test
test = Theres no such thing as a problem unless the servers are on fire! __ Do You Yahoo!? HotJobs - Search Thousands of New Jobs http://www.hotjobs.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Protocol on handling empty checkbox values
Hi all. For a universal form script I'm writing I want to store a 'Y' in a table field if a checkbox is checked and an 'N' if it's not. The problem is that when the form is posted if the checkbox is not checked the checkbox variable is not passed. E.g. form method=POST action=submit.php input type=checkbox name=my_checkbox_var value=Y /form If the checkbox is checked, I get $_POST['my_checkbox_var'] == 'Y', but if not $_POST['my_checkbox_var'] is not even set. So what I've been doing is putting the variable names of the checkbox fields into an array, serializing it, and then pass the string as a hidden input on the form. Then in the page that handles the POST I unserialize the array to determine if checkbox fields were passed and then handle accordingly. But I'm wondering is there a better way (or at least a standard way) of doing this? David -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: tricky preg_replace and how to escape the \{occurencenumber}
hm... this should work, notice the double quotes echo preg_replace('/(.+?)(\..+?)/e', '\1.1.\2', $fn); Lallous wrote: Oh well, I could have solved it w/ too many other methods, but how can I escape the \{occurence} as in my case? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Protocol on handling empty checkbox values
On Fri, 2002-08-16 at 19:24, David Yee wrote: Hi all. For a universal form script I'm writing I want to store a 'Y' in a table field if a checkbox is checked and an 'N' if it's not. The problem is that when the form is posted if the checkbox is not checked the checkbox variable is not passed. E.g. form method=POST action=submit.php input type=checkbox name=my_checkbox_var value=Y /form If the checkbox is checked, I get $_POST['my_checkbox_var'] == 'Y', but if not $_POST['my_checkbox_var'] is not even set. So what I've been doing is putting the variable names of the checkbox fields into an array, serializing it, and then pass the string as a hidden input on the form. Then in the page that handles the POST I unserialize the array to determine if checkbox fields were passed and then handle accordingly. But I'm wondering is there a better way (or at least a standard way) of doing this? I'll assume here that you're dynamically building the table and thus the checkboxes, which is why you cannot know whether a checkbox exists on the form or not. If this is true, I would get a variable $loop, set it to 0, then on outputting every checkbox, append this value to the checkbox's name. Then you have predicatable checkbox names. When you have finished drawing the checkboxes, note in a hidden input field the $loop value so you know what maximum possible checkbox number is. On receiveing the POST, do a for loop, and perform an if (isset($_POST[checkbox_number_$loop])) then you know if it's set or not. I think that just about covers it. Apologies if I have misread/misinterpreted what you have asked. James Green -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Extending PHP 4.0
Does anyone know how to build the first_module example shown at Zend (http://www.zend.com/apidoc/) ? I'd like to start coding extensions (preferably not directly into the PHP binary because of my hosting situation) but I just don't understand the explanation of compiling them. Any one know how? ~ Matthew /** Matthew Metnetsky [EMAIL PROTECTED] **/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] SQL Injection/Data Balidation
I didn't see that, what a waste of paper Randy - Original Message - From: Edwin @ [EMAIL PROTECTED] To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Friday, August 16, 2002 1:14 PM Subject: Re: [PHP] SQL Injection/Data Balidation Yeah, I'm scared... Please excuse me but may I say that it seems like you've sent some wrong info to the wrong mailing list? I use PHP NOT ASP, I use MySQL or PostgreSQL or Oracle but NOT M$ SQL Server. And IIS? Of course, some people use it (perhaps) because of some unavoidable circumstances but I don't--I use Apache NOT IIS. Of course, there's nothing bad about being cautious... However, please send some links (or documents) that are more relevant... Thanks anyway, now *I* have something to scare my friends... ;) - E Please CC me as I'm on digest: -- Are there any libraries for data validation available? If one reads papers like these: http://www.nextgenss.com/papers/advanced_sql_injection.pdf http://www.nextgenss.com/papers/more_advanced_sql_injection.pdf It becomes apparent that sites using databases are incredibly open to attack because of the ingenuity of the attackers. I think there should be a PHPGuardLib or something. After reading those articles, I plan on filtering ALL input for semi-cololons and 'chr(' character strings. In the cases where I want to accept apostrophes, I'm going to be very careful. Also, are there any attacks to email programs on linux that can be done through input forms? PS, for those who think escaping user input only on apostrophes, THINK AGAIN! And read the aticles above. -- If You want to buy computer parts, see the reviews at: http://www.cnet.com/ **OR EVEN BETTER COMPILATIONS**!! http://sysopt.earthweb.com/userreviews/products/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php _ MSN Hotmail è il provider email più grande al mondo. cosa aspetti a farti un account? http://www.hotmail.it -- 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] AllTheWeb.com design contest
I wanted to pass along the details of a contest that I thought you might find interesting. AlltheWeb is the public search engine of Fast Search Transfer and currently it is one of the largest search engines in the industry with over 2.1 billion pages in the web index. Recently, AlltheWeb.com announced the first ever design contest to personalize the look and feel of www.alltheweb.com and invites all web designers and technically minded people to submit an entry using CSS. Below is some information about the contest and if you have any questions, please feel free to [EMAIL PROTECTED] --- AlltheWeb is looking for the most innovative and creative designs using AlltheWeb Alchemist. AlltheWeb Alchemist renders AlltheWeb in the most basic HTML tags, with no layout, design, positioning or formatting rules. This enables designers to get creative and work some CSS magic to transform the site from its bare bones into a work of art. Designs will be judged in one of three categories: 1. Simple, Yet Beautiful (the most minimalistic design) 2. To CSS Infinity and Beyond (the best use of CSS technology) 3. So 22nd Century (the most innovative, best looking design) The winning design in each category will win a $750 gift certificate to Amazon.com and the CSS files will be posted on the AlltheWeb site for use by AlltheWeb users. Second and third place winners will also win gift certificates and have their designs posted for use. The contest is open to the general public. All submissions must be received by September 22. More details and submission form for the contest can be found at http://www.alltheweb.com/contest. We're looking for some great entries and would very much appreciate your support in getting the word out to the design community about the contest. If you have any technical questions, feel free to contact Frode Lundgren at [EMAIL PROTECTED] -- -Andrei http://www.gravitonic.com/ It's an emergent property of connected human minds that they create things for one another's pleasure and to conquer their uneasy sense of being too alone. -- Eben Moglen -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] SQL Injection/Data Balidation
Actually, I DID read the articles before I replied. If you read it again, the basic problem is not about any extended SQLServer functionality--it's about how ASP works AND how the database server was configured AND how Window$ works. Sorry, but the attacks mentioned CANNOT be done on any of the database servers that I've used. And with PHP, Apache, Linux combination, they just don't apply. Hey, don't get me wrong. I really appreciate any security info but personally I don't think they apply here... - E HINT: PHP doesn't use another ' (single quote) character to escape another single quote character--it's just basically stupid to do so. HINT 2: Configure your database server to have, for example, (1) a database username/password that can only SELECT -- enough for dynamically generated pages (2) a username/password that can only do INSERT or UPDATE, etc. Why would I make a username/password for my web pages that can delete important table or the entire database itself? If you'll thoroughly read the articles, most of those attacks that don't involve the use of extended SQLServer functionality, CAN be done on other RDBMS's. And if nothing else, you'll see the ingenuity of the attackers. Hey, take what you liked, and leave the rest lay. -- If You want to buy computer parts, see the reviews at: http://www.cnet.com/ **OR EVEN BETTER COMPILATIONS**!! http://sysopt.earthweb.com/userreviews/products/ _ Charle con sus amigos online usando MSN Messenger: http://messenger.msn.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: progress bar for uploading files
This wouldn't work for uploading files however since the long part of the process is the act of uploading the file and until that completes your save.php (or whatever) isn't called. So in regards to file uploading it has to be done with Javascript. What you do below is great for scripts that just take a long time though. -philip On Fri, 16 Aug 2002, Peter J. Schoenster wrote: On 16 Aug 2002 at 23:40, electroteque wrote: hi guys i was wondering if there was anyway to have a progress bar for uploading images ? TMTOWDI, but here is a way I did something similar. I was spidering remote sites and to get user's data and store in a database and the user could not continue until the spider spun it's web. I accpeted the data I needed and then returned a page with the HTTP-REFRESH tag in it with something like this meta http-equiv=Refresh content=10; URL=http://yoursite.com/verify_upload?process_id=Xamp;action=check_uploadamp;timer=X So it refreshes every 10 seconds and checks to see if process X has finished, if so then redirect to the next step, if not then just return but upgrade the timer so you can increase your counter (perhaps a percentage in a table cell). Peter -- 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] SQL Injection/Data Balidation
Oops! Sorry! I meant to say apostrophe and not single quotes... And sorry 'bout this additional post... Regards, - E Actually, I DID read the articles before I replied. If you read it again, the basic problem is not about any extended SQLServer functionality--it's about how ASP works AND how the database server was configured AND how Window$ works. Sorry, but the attacks mentioned CANNOT be done on any of the database servers that I've used. And with PHP, Apache, Linux combination, they just don't apply. Hey, don't get me wrong. I really appreciate any security info but personally I don't think they apply here... - E HINT: PHP doesn't use another ' (single quote) character to escape another single quote character--it's just basically stupid to do so. HINT 2: Configure your database server to have, for example, (1) a database username/password that can only SELECT -- enough for dynamically generated pages (2) a username/password that can only do INSERT or UPDATE, etc. Why would I make a username/password for my web pages that can delete important table or the entire database itself? If you'll thoroughly read the articles, most of those attacks that don't involve the use of extended SQLServer functionality, CAN be done on other RDBMS's. And if nothing else, you'll see the ingenuity of the attackers. Hey, take what you liked, and leave the rest lay. -- If You want to buy computer parts, see the reviews at: http://www.cnet.com/ **OR EVEN BETTER COMPILATIONS**!! http://sysopt.earthweb.com/userreviews/products/ _ Charle con sus amigos online usando MSN Messenger: http://messenger.msn.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php _ Charle con sus amigos online usando MSN Messenger: http://messenger.msn.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] question about executing a bash shell script...
Hi folks, I'm learning shell scripting via linux, and have written a script that creates the core files necessary for a users website from a master set of files. Works from the shell just fine (bash makethesite.sh username pathtoputfiles pathtogetfiles) Trying to execute this via php, and it literally does nothing. If I try something like: $bashoutput=shell_exec('bash makethesite.sh username pathtoputfiles pathtogetfiles'); echo $bashoutput; I get nothing output, and the script doesn't execute. Any ideas? Kelly
Re: [PHP] question about executing a bash shell script...
Kelly Meeks wrote: Hi folks, I'm learning shell scripting via linux, and have written a script that creates the core files necessary for a users website from a master set of files. Works from the shell just fine (bash makethesite.sh username pathtoputfiles pathtogetfiles) Trying to execute this via php, and it literally does nothing. If I try something like: $bashoutput=shell_exec('bash makethesite.sh username pathtoputfiles pathtogetfiles'); echo $bashoutput; I get nothing output, and the script doesn't execute. I'm asuming you are executing something like the following: php myPhpScript.php The following will probably give you the desired results... php -qC myPhpScript.php This prevents PHP from switching out of the current directory. HTH, Rob. -- .-. | Robert Cummings | :-`. | Webdeployer - Chief PHP and Java Programmer | :--: | Mail : mailto:[EMAIL PROTECTED] | | Phone : (613) 731-4046 x.109 | :--: | Website : http://www.webmotion.com | | Fax : (613) 260-9545 | `--' -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] question about executing a bash shell script...
try something like: $bashoutput=shell_exec('/usr/bin/bash makethesite.sh username pathtoputfiles pathtogetfiles'); if that doesn't work can you use the system() function instead? James -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] question about executing a bash shell script...
Hi Robert, Thanks so much for the prompt reply. Actually, I'm not trying to execute a php script, I'm trying to execute a shell (bash) script. This works at the command line: bash makethesite.sh param1 param2 param3 This doesn't work via php $bashresult=shell_exec('bash makethesite.sh param1 param2 param3'); echo $bashresult; Doesn't execute the script, nothing in $bashresult Kelly - Original Message - From: Robert Cummings [EMAIL PROTECTED] To: Kelly Meeks [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Friday, August 16, 2002 4:44 PM Subject: Re: [PHP] question about executing a bash shell script... Kelly Meeks wrote: Hi folks, I'm learning shell scripting via linux, and have written a script that creates the core files necessary for a users website from a master set of files. Works from the shell just fine (bash makethesite.sh username pathtoputfiles pathtogetfiles) Trying to execute this via php, and it literally does nothing. If I try something like: $bashoutput=shell_exec('bash makethesite.sh username pathtoputfiles pathtogetfiles'); echo $bashoutput; I get nothing output, and the script doesn't execute. I'm asuming you are executing something like the following: php myPhpScript.php The following will probably give you the desired results... php -qC myPhpScript.php This prevents PHP from switching out of the current directory. HTH, Rob. -- .-. | Robert Cummings | :-`. | Webdeployer - Chief PHP and Java Programmer | :--: | Mail : mailto:[EMAIL PROTECTED] | | Phone : (613) 731-4046 x.109 | :--: | Website : http://www.webmotion.com | | Fax : (613) 260-9545 | `--' -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] question about executing a bash shell script...
Kelly Meeks wrote: Hi Robert, Thanks so much for the prompt reply. Actually, I'm not trying to execute a php script, I'm trying to execute a shell (bash) script. This works at the command line: bash makethesite.sh param1 param2 param3 This doesn't work via php $bashresult=shell_exec('bash makethesite.sh param1 param2 param3'); echo $bashresult; You are trying to execute a bash script from PHP though. When you invoke the php engine it usually changes directory (to the root defined in the php.ini I think). To stop this so that it will remain in the current directory so that when you run bash it will see the bash script in the current directory, you need to use the -C command line option. I believe your environment is inherited by php and subsequently bash and so if you don't use the -C option bash will be looking in the wrong directory. Cheers, Rob. Doesn't execute the script, nothing in $bashresult Kelly - Original Message - From: Robert Cummings [EMAIL PROTECTED] To: Kelly Meeks [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Friday, August 16, 2002 4:44 PM Subject: Re: [PHP] question about executing a bash shell script... Kelly Meeks wrote: Hi folks, I'm learning shell scripting via linux, and have written a script that creates the core files necessary for a users website from a master set of files. Works from the shell just fine (bash makethesite.sh username pathtoputfiles pathtogetfiles) Trying to execute this via php, and it literally does nothing. If I try something like: $bashoutput=shell_exec('bash makethesite.sh username pathtoputfiles pathtogetfiles'); echo $bashoutput; I get nothing output, and the script doesn't execute. I'm asuming you are executing something like the following: php myPhpScript.php The following will probably give you the desired results... php -qC myPhpScript.php This prevents PHP from switching out of the current directory. HTH, Rob. -- .-. | Robert Cummings | :-`. | Webdeployer - Chief PHP and Java Programmer | :--: | Mail : mailto:[EMAIL PROTECTED] | | Phone : (613) 731-4046 x.109 | :--: | Website : http://www.webmotion.com | | Fax : (613) 260-9545 | `--' -- .-. | Robert Cummings | :-`. | Webdeployer - Chief PHP and Java Programmer | :--: | Mail : mailto:[EMAIL PROTECTED] | | Phone : (613) 731-4046 x.109 | :--: | Website : http://www.webmotion.com | | Fax : (613) 260-9545 | `--' -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] secure files acess
I have a bunch of files which need to be kept secure. I need to allow a user access to them them based on a criteria which I can programmatically determine. My question, is how can I allow the user to download or view only one file on my computer without allowthem to just enter the URL into their browser of the file and view it?
Re: [PHP] secure files acess
David Buerer wrote: I have a bunch of files which need to be kept secure. I need to allow a user access to them them based on a criteria which I can programmatically determine. My question, is how can I allow the user to download or view only one file on my computer without allowthem to just enter the URL into their browser of the file and view it? Have a php script authenticate the user, then if authenticated, use the reafile() function to output it to the user directly. Since PHP can see more than just the web space the files just need to reside outside of the websapce. Cheers, Rob. -- .-. | Robert Cummings | :-`. | Webdeployer - Chief PHP and Java Programmer | :--: | Mail : mailto:[EMAIL PROTECTED] | | Phone : (613) 731-4046 x.109 | :--: | Website : http://www.webmotion.com | | Fax : (613) 260-9545 | `--' -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] secure files acess
Robert Cummings wrote: David Buerer wrote: I have a bunch of files which need to be kept secure. I need to allow a user access to them them based on a criteria which I can programmatically determine. My question, is how can I allow the user to download or view only one file on my computer without allowthem to just enter the URL into their browser of the file and view it? Have a php script authenticate the user, then if authenticated, use the reafile() function to output it to the user directly. Since PHP can see ^ readfile() even :p Cheers, Rob. -- .-. | Robert Cummings | :-`. | Webdeployer - Chief PHP and Java Programmer | :--: | Mail : mailto:[EMAIL PROTECTED] | | Phone : (613) 731-4046 x.109 | :--: | Website : http://www.webmotion.com | | Fax : (613) 260-9545 | `--' -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] secure files acess
Hi there !!! I had the same problem once ... This will save you !! http://www.zend.com/zend/trick/tricks-august-2001.php I have a bunch of files which need to be kept secure. I need to allow a user access to them them based on a criteria which I can programmatically determine. My question, is how can I allow the user to download or view only one file on my computer without allowthem to just enter the URL into their browser of the file and view it? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] secure files acess
Thankyou Robert, THat is a great and easy way to do it. What if I need to initiate a download to the user? -Original Message- From: Robert Cummings [mailto:[EMAIL PROTECTED]] Sent: Friday, August 16, 2002 2:06 PM To: David Buerer Cc: '[EMAIL PROTECTED]' Subject: Re: [PHP] secure files acess David Buerer wrote: I have a bunch of files which need to be kept secure. I need to allow a user access to them them based on a criteria which I can programmatically determine. My question, is how can I allow the user to download or view only one file on my computer without allowthem to just enter the URL into their browser of the file and view it? Have a php script authenticate the user, then if authenticated, use the reafile() function to output it to the user directly. Since PHP can see more than just the web space the files just need to reside outside of the websapce. Cheers, Rob. -- .-. | Robert Cummings | :-`. | Webdeployer - Chief PHP and Java Programmer | :--: | Mail : mailto:[EMAIL PROTECTED] | | Phone : (613) 731-4046 x.109 | :--: | Website : http://www.webmotion.com | | Fax : (613) 260-9545 | `--'
Re: [PHP] secure files acess
David Buerer wrote: Thankyou Robert, THat is a great and easy way to do it. What if I need to initiate a download to the user? If you set the mime type properly the browser will automatically make it a download versus displaying it. Cheers, Rob. -- .-. | Robert Cummings | :-`. | Webdeployer - Chief PHP and Java Programmer | :--: | Mail : mailto:[EMAIL PROTECTED] | | Phone : (613) 731-4046 x.109 | :--: | Website : http://www.webmotion.com | | Fax : (613) 260-9545 | `--' -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] problem with mail()
On Wed, Aug 14, 2002 at 10:04:46AM -0700, Gui Guy wrote: ...: SYSERR(nobody): Can't create transcript file ./xfg7E9Jlr03988: Permission denied : SYSERR(nobody): Cannot create ./dfg7E9Jlr03988: Permission denied Does it mean that php is trying to send mail from user nobody? Good guess! Sounds like a file permissions thing. What directory are those files being created in? Provide nobody with adequate permissions on that directory. --Dan -- PHP classes that make web design easier SQL Solution | Layout Solution | Form Solution sqlsolution.info | layoutsolution.info | formsolution.info T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y 4015 7 Av #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php