RE: [PHP] Re: Failed to Receive in E:\...\mailscript.php on line 25
This is not my server, so I cannot change the settings in php.ini. This is my ISP's server, and I think they run SMPT om the same server. And yes, this is a Windows 2000 server. How do I set the SMTP server I shall use in the script? I have no access to the php.ini... I will contact my ISP at moonday and tell them about my problem. Regards, Håkon Strandenes -Original Message- From: Jason Wong [mailto:[EMAIL PROTECTED] Sent: 6. juli 2003 08:56 To: [EMAIL PROTECTED] Subject: Re: [PHP] Re: Failed to Receive in E:\...\mailscript.php on line 25 On Sunday 06 July 2003 03:25, Håkon Strandenes wrote: > No, actually not. But i think so. This is the server to my ISP, so I > cannot change it. But the SMTP server is set to "localhost", so I > THINK it's correct. You're using some Windows system? Are you running an SMTP server on that machine? If not then you cannot use 'localhost' for your SMTP setting. Try changing it to the SMTP server provided by your ISP. -- Jason Wong -> Gremlins Associates -> www.gremlins.biz Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development * -- Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general -- /* Default, n.: The hardware's, of course. */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php --- [This E-mail was scanned for viruses by Declude Virus] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Re: Failed to Receive in E:\...\mailscript.php on line 25
How do I specify witch SMTP server I shall use? I cannot set this in the PHP.ini file, so I must specift this in the script. Regards, Håkon Strandenes -Original Message- From: Håkon Strandenes [mailto:[EMAIL PROTECTED] Sent: 5. juli 2003 21:25 To: [EMAIL PROTECTED] Subject: RE: [PHP] Re: Failed to Receive in E:\...\mailscript.php on line 25 No, actually not. But i think so. This is the server to my ISP, so I cannot change it. But the SMTP server is set to "localhost", so I THINK it's correct. I have made a php script with only the "phpinfo()" tag in here: http://grimstad.seilforening.no/Mailinglister/phpinfo.php Regards, Håkon Strandenes -Original Message- From: Thomas Seifert [mailto:[EMAIL PROTECTED] Sent: 5. juli 2003 22:17 To: [EMAIL PROTECTED] Subject: [PHP] Re: Failed to Receive in E:\...\mailscript.php on line 25 are you sure that the smtp-settings in php.ini are correct on your host's server? Thomas On Sat, 5 Jul 2003 20:15:14 +0200 [EMAIL PROTECTED] (Håkon strandenes) wrote: > Hi, > > I am making a small PHP script for managing a simple mailing list. The > PHP script is added in the bottom of this message. > > This PHP script works great on IIS 5.1 with PHP 4.3.0, witch I have > installed locally on my system to test my scripts. But when I transfer > the script over to my host server (With IIS and PHP 4.2.1), I get an > error message when I'm trying to use it. The error message is like > this: > > Warning: Failed to Receive in > E:\inetpub\wwwroot\grimstad.seilforening\Mailinglister\mailscript.php > on line 25 Kommandoen er nå sendt. Merk at det kan ta opp til 5 > minutter før den trer i kraft.PHP Warning: Failed to Receive in > E:\inetpub\wwwroot\grimstad.seilforening\Mailinglister\mailscript.php > on line 25 > > Is there any compatibility problems between 4.2.1 and 4.3.0 for the > codes I have used in my script? > > Regards, > Håkon Strandenes > > > Here is the script (It get its inputs from this form: > http://grimstad.seilforening.no/Mailinglister/Styreskjema.html): > > > @extract($_POST); > > $Liste = stripslashes($Liste); > $Navn = stripslashes($Navn); > $Email = stripslashes($Email); > $Kommando = stripslashes($Kommando); > > if (!$Email) > { > echo ("Du må fylle inn din e-mail adresse."); > } > else > { > if (!$Navn) > { > echo ("Du må fylle inn navnet ditt."); > } > else > { > > $Message = "Automatisk generert styringsmail"; > $Headers = "From: $Navn <$Email>"; > mail( $Liste, $Kommando, $Message, $Headers ); > > echo ("Kommandoen er nå sendt. Merk at det kan ta opp til 5 minutter > før den trer i kraft."); > > } > } > ?> > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php --- [This E-mail was scanned for viruses by Declude Virus] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php --- [This E-mail was scanned for viruses by Declude Virus] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Failed to Receive in E:\...\mailscript.php on line 25
On Sunday 06 July 2003 03:25, Håkon Strandenes wrote: > No, actually not. But i think so. This is the server to my ISP, so I > cannot change it. But the SMTP server is set to "localhost", so I THINK > it's correct. You're using some Windows system? Are you running an SMTP server on that machine? If not then you cannot use 'localhost' for your SMTP setting. Try changing it to the SMTP server provided by your ISP. -- Jason Wong -> Gremlins Associates -> www.gremlins.biz Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development * -- Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general -- /* Default, n.: The hardware's, of course. */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] instanceof on class (not objects) php 5
Hi, Is it possible to determine whether a class implements an interface without instantiating an object of that class? class MyClass implements tester { function doesStuff(){} } $var = 'MyClass'; if ($var instanceof_equiv tester) { ... } ?> I really need this kind of capability to determine whether an argument is a valid class for the purposes needed. I guess if reflection makes it into beta 2, I will have what I need, but is there something in beta 1? Thanks, Greg -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Forms and PHP_SELF
Dan Anderson wrote: I assure you that server administrators can turn off the variables such as PHP SELF. It may not be common but it does happen. The only way to do that would be editing the PHP source. That's above the IQ of any sysadmin who would want to do that. -- The above message is encrypted with double rot13 encoding. Any unauthorized attempt to decrypt it will be prosecuted to the full extent of the law. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Timing out fopen using https stream wrapper?
Thanks for the reply, Well hopefully this will help narrow down the issue. With Fsockopen a timeout can be passed, however, this is using fopen. I am hoping there may be some obscure way of setting a timeout but so far, I've not been able to find one. -Original Message- From: Dan Anderson [mailto:[EMAIL PROTECTED] Sent: Saturday, July 05, 2003 6:26 PM To: Giz Cc: [EMAIL PROTECTED] Subject: RE: [PHP] Timing out fopen using https stream wrapper? >From the user comments: I think it might be useful to point out that set_time_limit() doesn't have any effect on stream operations. A stalled script, either during open operations (e.g. fsockopen()) or read operations (e.g. fgets()), can make your script run "forever". So it would be advisable to define timeouts for opening sockets (with the timeout parameter in fsockopen()) and for reading data from sockets (with socket_set_timeout()). So, yes, you would have had to go to: http://us3.php.net/manual/en/function.fsockopen.php Sorry about that but I didn't exactly have lots of time on my hands at the time to give you more details. -Dan On Sat, 2003-07-05 at 21:27, Giz wrote: > I've looked at that page extensively and seen nothing there that would > handle my issue, long before I ever mailed the problem to this list. What > in particular from there did you see that would be useful to my use of > fopen('http://etc')? > > -Original Message- > From: Dan Anderson [mailto:[EMAIL PROTECTED] > Sent: Saturday, July 05, 2003 5:28 PM > To: Giz > Cc: [EMAIL PROTECTED] > Subject: RE: [PHP] Timing out fopen using https stream wrapper? > > > This has no effect on stream operations. I have a timeout set in php.ini, > > but the script never times out, so that should further illustrate the > issue. > > But if you'd visited the page I sent you and viewed user comments you > would see how to set a time limit for socket operations (what you're > doing). > > -Dan > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: [PHP-DB] Compiling 4.2.3 with MySQL ... what does it look for?
try --with-mysql=/usr --- -{ Rene Brehmer }- <[EMAIL PROTECTED]> wrote: > X-posted to PHP General, PHP DB, and MySQL > > Hi gang > > Attempting to get my Linux test-server working, but > ran into a problem when > "making" PHP... > > System is RedHat 8, Apache 1.3.27 (compiled myself, > tested OK), MySQL 4.0.13. > > The Apache 2.0.40 and PHP 4.2.2 that came w. RH8 > didn't work correctly, > thus I've ventured into my own creation. > > Trying to build PHP 4.2.3 (because that's what my > webhost runs, so need > that version to test correctly) w. support for > MySQL. Running > > ./configure --with-mysql=/[path to mysql] > --with-apxs=/[path to apxs] > > Found the path to the apxs to be > /usr/local/apache/bin/apxs, but for the > life of me I cannot figure out what path to give it > for MySQL. I installed > MySQL from the the RPM files: > MySQL-client-4.0.13-0.i386.rpm > MySQL-devel-4.0.13-0.i386.rpm > MySQL-embedded-4.0.13-0.i386.rpm > MySQL-server-4.0.13-0.i386.rpm > MySQL-shared-4.0.13-0.i386.rpm > > client and server first, the rest second ... used > --force to get them in, > because it complained about version issues with the > one already there (even > though the package manager was told not to put the > Mysql in, it still put > MySQL 3.something in...) > > When doing the configure above, I get this error: > > configure: error: Cannot find header files under > /usr/include > > or whatever path I give it ... I'm having a hard > time figuring out where > the RPM puts everything, and an even harder time > figuring out what path to > stick to PHP ... > > Some detective work gave me these paths: > > MySQL (bins): > /usr/bin > /usr/share/mysql > MySQL daemon (mysqld): > /usr/libexec > /usr/sbin > MySQL headers (.h): > /usr/include/mysql > > I've tried them all, but they all result in the > above error. Anyone care to > guess which path I should give to the configure? > > Or is it something else that causes this? > I haven't ever used MySQL before, or any other SQL > for that matter, so got > 0 experience in getting the system up and running > with it... > > TIA > > Rene __ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Timing out fopen using https stream wrapper?
>From the user comments: I think it might be useful to point out that set_time_limit() doesn't have any effect on stream operations. A stalled script, either during open operations (e.g. fsockopen()) or read operations (e.g. fgets()), can make your script run "forever". So it would be advisable to define timeouts for opening sockets (with the timeout parameter in fsockopen()) and for reading data from sockets (with socket_set_timeout()). So, yes, you would have had to go to: http://us3.php.net/manual/en/function.fsockopen.php Sorry about that but I didn't exactly have lots of time on my hands at the time to give you more details. -Dan On Sat, 2003-07-05 at 21:27, Giz wrote: > I've looked at that page extensively and seen nothing there that would > handle my issue, long before I ever mailed the problem to this list. What > in particular from there did you see that would be useful to my use of > fopen('http://etc')? > > -Original Message- > From: Dan Anderson [mailto:[EMAIL PROTECTED] > Sent: Saturday, July 05, 2003 5:28 PM > To: Giz > Cc: [EMAIL PROTECTED] > Subject: RE: [PHP] Timing out fopen using https stream wrapper? > > > This has no effect on stream operations. I have a timeout set in php.ini, > > but the script never times out, so that should further illustrate the > issue. > > But if you'd visited the page I sent you and viewed user comments you > would see how to set a time limit for socket operations (what you're > doing). > > -Dan > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Timing out fopen using https stream wrapper?
I've looked at that page extensively and seen nothing there that would handle my issue, long before I ever mailed the problem to this list. What in particular from there did you see that would be useful to my use of fopen('http://etc')? -Original Message- From: Dan Anderson [mailto:[EMAIL PROTECTED] Sent: Saturday, July 05, 2003 5:28 PM To: Giz Cc: [EMAIL PROTECTED] Subject: RE: [PHP] Timing out fopen using https stream wrapper? > This has no effect on stream operations. I have a timeout set in php.ini, > but the script never times out, so that should further illustrate the issue. But if you'd visited the page I sent you and viewed user comments you would see how to set a time limit for socket operations (what you're doing). -Dan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Forms and PHP_SELF
> Please don't mislead users! That's plain untrue. I assure you that server administrators can turn off the variables such as PHP SELF. It may not be common but it does happen. -Dan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Forms and PHP_SELF
Dan Anderson wrote: Be careful when using PHP self. Not all servers support it. If you're planning on using this script over and over on multiple servers you may find creating a variable is helpful. $some_variable = "the_script_name.php"; Then, where you would use PHP_SELF just echo (or whatever) $some_variable. You will have to change it if the script name changes, but otherwise it's just a relative path. Please don't mislead users! That's plain untrue. You're correct that not all servers have register_globals on, so use $HTTP_SERVER_VARS['PHP_SELF']. -- The above message is encrypted with double rot13 encoding. Any unauthorized attempt to decrypt it will be prosecuted to the full extent of the law. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Forms and PHP_SELF
Be careful when using PHP self. Not all servers support it. If you're planning on using this script over and over on multiple servers you may find creating a variable is helpful. $some_variable = "the_script_name.php"; Then, where you would use PHP_SELF just echo (or whatever) $some_variable. You will have to change it if the script name changes, but otherwise it's just a relative path. -Dan On Sat, 2003-07-05 at 19:43, Beauford.2005 wrote: > Hi, > > I have a very simple form that searches a MySQL database and I want to > be able to have the search appear on the same page as the search. > > > > height"30" value="submit"> > > > The part that confuses me is how I run the code for the search. > Currently I have it in a function and at the top of the script I have an > IF statement that checks to see if the submit button has been pressed, > if it has I go to the function. This is not working, and I'm not even > sure this is the right way to go about it. > > I'm probably doing this wrong and would appreciate it if someone could > set me straight. > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Timing out fopen using https stream wrapper?
> This has no effect on stream operations. I have a timeout set in php.ini, > but the script never times out, so that should further illustrate the issue. But if you'd visited the page I sent you and viewed user comments you would see how to set a time limit for socket operations (what you're doing). -Dan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] looping through values from a field? Need hellp.
That was the trick. Just the space was messing things up. Thanks. - Original Message - From: "Lars Torben Wilson" <[EMAIL PROTECTED]> To: "Micah Montoya" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Saturday, July 05, 2003 6:18 PM Subject: Re: [PHP] looping through values from a field? Need hellp. > On Sat, 2003-07-05 at 17:13, Micah Montoya wrote: > > Ok. I gave it a shot but have run into one other question that I wasn't > > able to find that was addressed by the article. > > > > My select statement looks like this: > > > > > > > > When I create the php file, I am trying something like below but it isn't > > working and I am receiving an error. What am I not doing? > > > > $filename = $_POST["imgList"]; > > > > for each ($filename as $value) { > > echo $value; > > } > > > > thanks > > Impossible to say without know what the error says. :) Anyway, if that > code is cut-and-pasted, then 'foreach' should have no space in it. That > would cause a parse error. Otherwise, you could be getting a Notice > if you're actually passing something in via method="GET" but checking > the $_POST array instead. > > > > -- > Torben Wilson <[EMAIL PROTECTED]>+1.604.709.0506 > http://www.thebuttlesschaps.com http://www.inflatableeye.com > http://www.hybrid17.com http://www.themainonmain.com > - Boycott Starbucks! http://www.haidabuckscafe.com - > > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] looping through values from a field? Need hellp.
On Sat, 2003-07-05 at 17:13, Micah Montoya wrote: > Ok. I gave it a shot but have run into one other question that I wasn't > able to find that was addressed by the article. > > My select statement looks like this: > > > > When I create the php file, I am trying something like below but it isn't > working and I am receiving an error. What am I not doing? > > $filename = $_POST["imgList"]; > > for each ($filename as $value) { > echo $value; > } > > thanks Impossible to say without know what the error says. :) Anyway, if that code is cut-and-pasted, then 'foreach' should have no space in it. That would cause a parse error. Otherwise, you could be getting a Notice if you're actually passing something in via method="GET" but checking the $_POST array instead. -- Torben Wilson <[EMAIL PROTECTED]>+1.604.709.0506 http://www.thebuttlesschaps.com http://www.inflatableeye.com http://www.hybrid17.com http://www.themainonmain.com - Boycott Starbucks! http://www.haidabuckscafe.com - -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] sqlite_seek() problem
Hello !! When I make a query with sqlite_query() and use sqlite_fetch_array() all works well: Example: $result = sqlite_query('SELECT * FROM test', $conn); while($row = sqlite_fetch_array($resulr, SQLITE_NUM, true)){ $rows[] = $row; } $rows is: Array ( [0] => Array ( [0] => 1 [1] => toro [2] => 10 [3] => 500.00 ) [1] => Array ( [0] => 2 [1] => gallo [2] => 5 [3] => 200.00 ) [2] => Array ( [0] => 3 [1] => rana [2] => 20 [3] => 100.00 ) [3] => Array ( [0] => 4 [1] => cane [2] => 3 [3] => 500.00 ) ) if I use sqlite_seek() and sqlite_current: if(sqlite_seek($result,1)){ $row = sqlite_current($result, SQLITE_NUM, true); } $row is: Array ( [0] => 2 [1] => gallo [2] => 5 [3] => 200.00 ) in place of the first record return the second (The row number is one-based (1 is the first row) in sqlite_seek()). using sqlite_rewrite() and sqlite_current() I obtain the first record, but it is not possible to obtainthe first record of a rowset with sqlite_seek() and sqlite_current()? I am writing a pretty class for SQLite, this is the last problem that I have before the release :) but I do not find other documentation for sqlite and PHP. Thank Alan D'Angelo
Re: [PHP] looping through values from a field? Need hellp.
Ok. I gave it a shot but have run into one other question that I wasn't able to find that was addressed by the article. My select statement looks like this: When I create the php file, I am trying something like below but it isn't working and I am receiving an error. What am I not doing? $filename = $_POST["imgList"]; for each ($filename as $value) { echo $value; } thanks - Original Message - From: "Lars Torben Wilson" <[EMAIL PROTECTED]> To: "Micah Montoy" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Saturday, July 05, 2003 4:59 PM Subject: Re: [PHP] looping through values from a field? Need hellp. > On Sat, 2003-07-05 at 15:55, Micah Montoy wrote: > > I have this javascript that enables browsing and selecting of a file. This > > file location and name are then transferred further down in the form as an > > . Multiple files may be chosen as they are just added one below the > > other. Anyway, when the form is submitted it is only retrieving the last > > file name from the form. How can I get PHP to return all the values from > > the part. Basically this is what is happening: > > > > 1. Choose a file > > 2. File location and name are displayed in the > > as > > c:\images\filename.gif > > The javascript creates the option and a new option is added and appended > > when a new file is chosen. > > 3. Submit form to php script to send location and stuff to database. > > > > Anyone have any ideas of how I can get PHP to loop through and pull out each > > option value? They are separated by a comma. Right now, it only grabs the > > last file even though all files are highlighted before submission. > > > > thanks > > > http://ca2.php.net/manual/en/faq.html.php#faq.html.select-multiple > > > Hope this helps, > > Torben > > -- > Torben Wilson <[EMAIL PROTECTED]>+1.604.709.0506 > http://www.thebuttlesschaps.com http://www.inflatableeye.com > http://www.hybrid17.com http://www.themainonmain.com > - Boycott Starbucks! http://www.haidabuckscafe.com - > > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Forms and PHP_SELF
For print $PHP_SELF, or $_SERVER['PHP_SELF'] use: or the shortcur sintax: (if short_open_tag = On in php.ini) - Original Message - From: "Beauford.2005" <[EMAIL PROTECTED]> To: "PHP" <[EMAIL PROTECTED]> Sent: Sunday, July 06, 2003 1:43 AM Subject: [PHP] Forms and PHP_SELF > Hi, > > I have a very simple form that searches a MySQL database and I want to > be able to have the search appear on the same page as the search. > > > > height"30" value="submit"> > > > The part that confuses me is how I run the code for the search. > Currently I have it in a function and at the top of the script I have an > IF statement that checks to see if the submit button has been pressed, > if it has I go to the function. This is not working, and I'm not even > sure this is the right way to go about it. > > I'm probably doing this wrong and would appreciate it if someone could > set me straight. > > > -- > 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] FW: Forms and PHP_SELF
I just figured it out, so I guess I was on the right track - I just forgot to make the variable name in the form global. -Original Message- From: Beauford.2005 [mailto:[EMAIL PROTECTED] Sent: July 5, 2003 7:43 PM To: PHP Subject: Forms and PHP_SELF Hi, I have a very simple form that searches a MySQL database and I want to be able to have the search appear on the same page as the search. The part that confuses me is how I run the code for the search. Currently I have it in a function and at the top of the script I have an IF statement that checks to see if the submit button has been pressed, if it has I go to the function. This is not working, and I'm not even sure this is the right way to go about it. I'm probably doing this wrong and would appreciate it if someone could set me straight. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Compiling 4.2.3 with MySQL ... what does it look for?
X-posted to PHP General, PHP DB, and MySQL Hi gang Attempting to get my Linux test-server working, but ran into a problem when "making" PHP... System is RedHat 8, Apache 1.3.27 (compiled myself, tested OK), MySQL 4.0.13. The Apache 2.0.40 and PHP 4.2.2 that came w. RH8 didn't work correctly, thus I've ventured into my own creation. Trying to build PHP 4.2.3 (because that's what my webhost runs, so need that version to test correctly) w. support for MySQL. Running ./configure --with-mysql=/[path to mysql] --with-apxs=/[path to apxs] Found the path to the apxs to be /usr/local/apache/bin/apxs, but for the life of me I cannot figure out what path to give it for MySQL. I installed MySQL from the the RPM files: MySQL-client-4.0.13-0.i386.rpm MySQL-devel-4.0.13-0.i386.rpm MySQL-embedded-4.0.13-0.i386.rpm MySQL-server-4.0.13-0.i386.rpm MySQL-shared-4.0.13-0.i386.rpm client and server first, the rest second ... used --force to get them in, because it complained about version issues with the one already there (even though the package manager was told not to put the Mysql in, it still put MySQL 3.something in...) When doing the configure above, I get this error: configure: error: Cannot find header files under /usr/include or whatever path I give it ... I'm having a hard time figuring out where the RPM puts everything, and an even harder time figuring out what path to stick to PHP ... Some detective work gave me these paths: MySQL (bins): /usr/bin /usr/share/mysql MySQL daemon (mysqld): /usr/libexec /usr/sbin MySQL headers (.h): /usr/include/mysql I've tried them all, but they all result in the above error. Anyone care to guess which path I should give to the configure? Or is it something else that causes this? I haven't ever used MySQL before, or any other SQL for that matter, so got 0 experience in getting the system up and running with it... TIA Rene -- Rene Brehmer aka Metalbunny http://metalbunny.net/ References, tools, and other useful stuff... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] looping through values from a field? Need hellp.
Yeah, this is the behavior of select lists. What comes through in the form post is the item that was last selected. What I've found you have to do with javascript is populate a hidden field with the values, using some delimiter (I've used commas) and you can easily explode those values into an array in the processing script. In your form have an onsubmit like this: onSubmit="SetList2Values(this.yourlist,this.list2values)" (change list2values to the hidden field you define for this purpose. Here's the javascript function list2values I use: echo "function SetList2Values(box,list2values) {\n"; echo "var t = \"\";"; echo "for(var i=0; i\n"; echo "\n"; In the post script I have: $rListvalues = explode(",", $_POST['list2values']); foreach through that and do your processing. -Original Message- From: Micah Montoy [mailto:[EMAIL PROTECTED] Sent: Saturday, July 05, 2003 3:56 PM To: [EMAIL PROTECTED] Subject: [PHP] looping through values from a field? Need hellp. 1. Choose a file 2. File location and name are displayed in the as c:\images\filename.gif The javascript creates the option and a new option is added and appended when a new file is chosen. 3. Submit form to php script to send location and stuff to database. Anyone have any ideas of how I can get PHP to loop through and pull out each option value? They are separated by a comma. Right now, it only grabs the last file even though all files are highlighted before submission. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Forms and PHP_SELF
Hi, I have a very simple form that searches a MySQL database and I want to be able to have the search appear on the same page as the search. The part that confuses me is how I run the code for the search. Currently I have it in a function and at the top of the script I have an IF statement that checks to see if the submit button has been pressed, if it has I go to the function. This is not working, and I'm not even sure this is the right way to go about it. I'm probably doing this wrong and would appreciate it if someone could set me straight. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] simple query help
Bleh nevermind, it's because you were executing the query twice (calling mysql_query in the if () and then again below. -Original Message- From: Giz [mailto:[EMAIL PROTECTED] Sent: Saturday, July 05, 2003 4:37 PM To: 'Paul Ferrie'; [EMAIL PROTECTED] Subject: RE: [PHP] simple query help My guess is that you actually have 2 rows in the table for every forumID. -Original Message- From: Paul Ferrie [mailto:[EMAIL PROTECTED] Sent: Saturday, July 05, 2003 8:07 AM To: [EMAIL PROTECTED] Subject: [PHP] simple query help $query = "UPDATE forumForums SET threadCount = threadCount -1 WHERE forumID = $forumID"; if(!mysql_query($query)) { fail("Error deleting thread Count"); } $result = @mysql_query($query); -- 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] simple query help
My guess is that you actually have 2 rows in the table for every forumID. -Original Message- From: Paul Ferrie [mailto:[EMAIL PROTECTED] Sent: Saturday, July 05, 2003 8:07 AM To: [EMAIL PROTECTED] Subject: [PHP] simple query help anyways i am tyring to delete the threadCount by -1 from the db. could below does dlete the count but in multipules of 2. Anyone cheers $query = "UPDATE forumForums SET threadCount = threadCount -1 WHERE forumID = $forumID"; if(!mysql_query($query)) { fail("Error deleting thread Count"); } $result = @mysql_query($query); -- 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] Permission Problem
You need to seek help from a phpnuke support forum. -Original Message- From: Mr|P [mailto:[EMAIL PROTECTED] Sent: Saturday, July 05, 2003 7:53 AM To: [EMAIL PROTECTED] Subject: [PHP] Permission Problem I moved from myphpnuke to phpnuke. When trying to register a new user account on the website it get the error: You are trying to access a restricted area. We are Sorry, but this section of our site is for Registered Users Only. Thanks for your help. -- 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] Limit output of query field
This add a bit more functionality, in that it will adjust to the nearest end of a word, and includes a 'more' link to the full text. This also assumes that the article may already only be 50 chars or less. $maxsize = 50; // might be better as a DEFINE $post = $row->text; $post = (strlen($post) > $maxsize ) ? substr(substr($post,0,$maxsize-1), 0, strrpos(substr($post,0,$maxsize-1),' '))."... more" : $post; -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Saturday, July 05, 2003 6:59 AM To: [EMAIL PROTECTED] Subject: [PHP] Limit output of query field Hi there, Hope you can help me with the following: I have a query and i'm showing the output: echo $row->text; That goes o.k. but the text is 400 characters long and I only one to show the first 50 characters and at the end showing ... dot's.. Help! Thank you very much! Frank -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] looping through values from a field? Need hellp.
I think that will do it. thanks, - Original Message - From: "Lars Torben Wilson" <[EMAIL PROTECTED]> To: "Micah Montoy" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Saturday, July 05, 2003 4:59 PM Subject: Re: [PHP] looping through values from a field? Need hellp. > On Sat, 2003-07-05 at 15:55, Micah Montoy wrote: > > I have this javascript that enables browsing and selecting of a file. This > > file location and name are then transferred further down in the form as an > > . Multiple files may be chosen as they are just added one below the > > other. Anyway, when the form is submitted it is only retrieving the last > > file name from the form. How can I get PHP to return all the values from > > the part. Basically this is what is happening: > > > > 1. Choose a file > > 2. File location and name are displayed in the > > as > > c:\images\filename.gif > > The javascript creates the option and a new option is added and appended > > when a new file is chosen. > > 3. Submit form to php script to send location and stuff to database. > > > > Anyone have any ideas of how I can get PHP to loop through and pull out each > > option value? They are separated by a comma. Right now, it only grabs the > > last file even though all files are highlighted before submission. > > > > thanks > > > http://ca2.php.net/manual/en/faq.html.php#faq.html.select-multiple > > > Hope this helps, > > Torben > > -- > Torben Wilson <[EMAIL PROTECTED]>+1.604.709.0506 > http://www.thebuttlesschaps.com http://www.inflatableeye.com > http://www.hybrid17.com http://www.themainonmain.com > - Boycott Starbucks! http://www.haidabuckscafe.com - > > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Timing out fopen using https stream wrapper?
That only works to set a timeout on reading data once the fopen has successfully returned. The problem is that the fopen function is hanging. -Original Message- From: Arjen Brouwer [mailto:[EMAIL PROTECTED] Sent: Saturday, July 05, 2003 6:08 AM To: Giz Subject: Re: [PHP] Timing out fopen using https stream wrapper? check: http://php.net/stream_set_timeout - Original Message - From: "Giz" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Saturday, July 05, 2003 2:09 PM Subject: [PHP] Timing out fopen using https stream wrapper? > I have a class that uses fopen to read some xml data from a site with > ongoing stability issues. Fopen is using the stream wrapper for http. > > Something I've struggled with is finding a way to set a timeout value when > fopen is attempting to get a page from a site that is inaccessible for some > reason. > > On my test server, the behavior is that fopen seems to hang up, and the > script never returns. > > It seems I have been over the documentation repeatedly, but there simply > isn't any documented way of setting a timeout duration. Any ideas? > > > > > > > > -- > 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] Timing out fopen using https stream wrapper?
This has no effect on stream operations. I have a timeout set in php.ini, but the script never times out, so that should further illustrate the issue. -Original Message- From: Dan Anderson [mailto:[EMAIL PROTECTED] Sent: Saturday, July 05, 2003 5:11 AM To: Giz Cc: [EMAIL PROTECTED] Subject: Re: [PHP] Timing out fopen using https stream wrapper? > It seems I have been over the documentation repeatedly, but there simply > isn't any documented way of setting a timeout duration. Any ideas? If you want to set a time out on execution of the /script/, check out: http://us3.php.net/manual/en/function.set-time-limit.php -Dan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] looping through values from a field? Need hellp.
On Sat, 2003-07-05 at 15:55, Micah Montoy wrote: > I have this javascript that enables browsing and selecting of a file. This > file location and name are then transferred further down in the form as an > . Multiple files may be chosen as they are just added one below the > other. Anyway, when the form is submitted it is only retrieving the last > file name from the form. How can I get PHP to return all the values from > the part. Basically this is what is happening: > > 1. Choose a file > 2. File location and name are displayed in the > as > c:\images\filename.gif > The javascript creates the option and a new option is added and appended > when a new file is chosen. > 3. Submit form to php script to send location and stuff to database. > > Anyone have any ideas of how I can get PHP to loop through and pull out each > option value? They are separated by a comma. Right now, it only grabs the > last file even though all files are highlighted before submission. > > thanks http://ca2.php.net/manual/en/faq.html.php#faq.html.select-multiple Hope this helps, Torben -- Torben Wilson <[EMAIL PROTECTED]>+1.604.709.0506 http://www.thebuttlesschaps.com http://www.inflatableeye.com http://www.hybrid17.com http://www.themainonmain.com - Boycott Starbucks! http://www.haidabuckscafe.com - -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] looping through values from a field? Need hellp.
I have this javascript that enables browsing and selecting of a file. This file location and name are then transferred further down in the form as an . Multiple files may be chosen as they are just added one below the other. Anyway, when the form is submitted it is only retrieving the last file name from the form. How can I get PHP to return all the values from the part. Basically this is what is happening: 1. Choose a file 2. File location and name are displayed in the as c:\images\filename.gif The javascript creates the option and a new option is added and appended when a new file is chosen. 3. Submit form to php script to send location and stuff to database. Anyone have any ideas of how I can get PHP to loop through and pull out each option value? They are separated by a comma. Right now, it only grabs the last file even though all files are highlighted before submission. thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Delimiter must not be alphanumeric or backslash
At 2003-07-05 20:01 +0200, Alan D'Angelo wrote: >Try this: > >$text = "pot post pat patent"; >if(preg_match("/\bp\w+t\b/", $text, $array)){ >print $array[0]; >} >?> > >the pattern in preg_match() does not have correct limit :) It is probably also a good idea to use single quotes ('/\bp\w+t\b/') so PHP won't try to interpret the '\w' and '\b' itself. Greetings, Jaap -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] SSL POST problems, cURL, fsockopen, ipv6??
Hello. I've read all the documentation I can find about https POSTs using curl, fsockopen with "ssl://", even PEAR's Net_Socket package, but I'm running into a PHP problem I haven't seen before. Platform Info: OpenBSD 2.9, PHP 4.3.2, Apache 1.3.27, ModSSL 2.8.14, OpenSSL 0.9.6, curl 7.9.8 (I've installed curl 7.10.5, but PHP configure refuses to see it even when I specify the path, "--with-curl=/usr/local/curl" -- it uses the default 7.9.8 install in /usr/local no matter what I do). I'm testing all my code on my Mac OS X server and everything works fine, but I'm running into problems when I try to move it to my main server running OpenBSD 2.9 -- I can't get any of these methods to connect to a particular target server (running MS Site Server, btw) -- all attempts return nothing. Yes, I'm also talking to the admins of the target server, but some error messages on my end concern me. - Using Snoopy (which uses curl for https posts), it reports an error 6 = "Couldn't resolve host". - Using fsockopen with ssl://, my error log reads: "PHP Warning: fsockopen(): unable to connect to [secure.host.name]:443 PHP Warning: fsockopen(): php_network_getaddresses: getaddrinfo failed: no address associated with name (is your IPV6 configuration correct? If this error happens all the time, try reconfiguring PHP using --disable-ipv6 option to configure)" (I've tried reconfiguring php with "--disable-ipv6" and reinstalling, but I continue to get the same message). Anyone have any penetrating insights? Thanks in advance... Alex - - - - - - - - - - af at ax-im dot com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Q on echo phpinfo() ;
"Philip Olson" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > > You may set the location of php.ini by using the PHPRC > environment variable or during ./configure use the > --with-config-file-path directive. So, I take it that this is a setting you use during compile time. So, to fix this, as not to mandate the use of 'C:\winnt' I could just recompile everything. mmm. > Maybe you should just copy a php.ini into the directory PHP > is looking for it in, which appears to be C:\WINNIT. I was really hoping not to have to do that. It is so *Microsoft* in implementation. I was really hoping that something that came from outside the DarkSide would not be tempted. > If PHP was actually reading a php.ini, you would have instead > seen it as C:\WINNIT\php.ini as opposed to just a directory > path. So because no php.ini is being read, PHP is using all > default values as per a stock php.ini-dist. OK! Now I see. PHP is using default values since it can't "see" a php.ini file where it thinks it should be, the C:\WINNT directory. Well, I copied my php.ini into C:\winnt removed my "fix" for DB.php, restarted my Apache and sure enough, phpinfo() shows C:\WINNT\php.ini and DB.php no longer returns an error! :( [why the sad face? It thought you said it now works?] The sad face is because I am forced to place files in the windows directory. There was nothing I could do about Apache and it's use of the Registry, now it looks like I'm forced to do things "The Microsoft Way" with PHP. At least Perl is set up without using Microsoft's mandates. Thanks for the info Philip. I appreciate it. Now things are clearer. PHP now works, but I'm not happy, but that's not relevant. I'm always causing trouble. Now I 'need' to see if I can find someone who can re-compile this for me (no I don't have access to any of these tools. I'm learning PHP now since I was told that is what I need to add to my skill set if I want to get a job, again. I got laid off 6 months ago after 7 years as an Lead Internet Technologies Architect. PHP was just something I never had to deal with. The fortune 1000 didn't "want" that, so, I didn't do it. That'll teach me!) Anyway, Thanks Philip. Walter -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP crashing with using Oracle
Hello, I installed PHP-4.3.2 with oci8 and oracle support (using --with-oci8 --with-oracle). I recompile apache-1.3.27 to use the libpthread as mentioned here: http://ww.php.net/oci8 Now, I got crashes when using oracle with php. In my apache error logs, I get: [Sat Jul 5 17:24:28 2003] [notice] child pid 17496 exit signal Segmentation fault (11) [Sat Jul 5 17:24:29 2003] [notice] child pid 17558 exit signal Segmentation fault (11) and the application would just do nothing (I tried reload, submit, etc). if this happens, the only way I can fix it is by restarting apache. Could anyone give me pointer what's going on here and how to fix it? In case this matters, the Oracle 9i DB server is also in the same box. Somehow it has it's own Apache, but I don't use that. Thanks for any help. RDB -- Reuben D. Budiardja -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Authentication system
there's a good example in this article A Complete, Secure User Login System by Tim Perdue http://www.phpbuilder.com/columns/tim2505.php3 olinux > On 2 Jul 2003 at 13:00, Mike Migurski wrote: > > > You may find it easier to include, in the e-mail, > a > > uniquely-generated, limited-time URL that the > person can visit to > > verify that they have received the e-mail. This > will remove the burden > > of having to set up a system that responds to > e-mail commands. > > Thanks, Mike. I think my brain is working undertime > at the moment. > Can you give me an example? (Or point me in the > direction of one?) > > Doug __ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Q on echo phpinfo() ;
You may set the location of php.ini by using the PHPRC environment variable or during ./configure use the --with-config-file-path directive. Maybe you should just copy a php.ini into the directory PHP is looking for it in, which appears to be C:\WINNIT. If PHP was actually reading a php.ini, you would have instead seen it as C:\WINNIT\php.ini as opposed to just a directory path. So because no php.ini is being read, PHP is using all default values as per a stock php.ini-dist. http://www.php.net/manual/en/configuration.php http://www.php.net/manual/en/faq.installation.php#faq.installation.phpini Regards, Philip On Sat, 5 Jul 2003, jsWalter wrote: > I ran this as a script from my Apache and it gave me a beautiful web page > just full of wonderful information! > > But I have a question on just 1 item... > > Configuration File (piping) Path C:\WINNIT > > How does this value get set? > > My PHP is installed at 'G:\etc\php' > > My php.ini is there as well. > > The paths are set (in that ini file) as... > > include_path = ".;G:\etc\php\extensions;G:\etc\php\pear" > > extension_dir = "G:\etc\php\extensions" > > Even My Apache is told to look there as well... > > # Windows Win32 version > > LoadFile "/etc/php/gnu_gettext.dll" > > LoadModule php4_module "/etc/php/sapi/php4apache2.dll" > > Action application/x-httpd-php "/etc/php/php.exe" > > ScriptAlias /php/ "/etc/php/" > > (pls don't comment about there being volume letters missing to this block, > > I want to focus on the issue of a path being defined from out of the blue) > > Is this being hard coded somewhere? > > If so, then why does my PHP work at all? > > I have nothing that belongs to PHP in the system directory. > > Well, not completely true. > > PEAR installed a pear.ini in the system directory itself (I wish it didn't, > > but my PEAR not working properly is a different issue.) > > Nothing I've read from the web or the documentation has given me any > understand on how this is set and why PHP file are needed in the location > that the says to place them. > > I guess, this is a question for the folks who wrote the executables for > Windows. > > Thanks for any help and enlightenment. > > Walter > > > > > > > -- > 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 help needed!
Hello all, I am new to php in general and am trying to set up a user authentification system with mysql. The registration page works well and sends all of the data to the appropriate table in mysql. However, when I try to get the registered user to log in and start a session, the system will not remember the session information past the page. For instance, this page will not work (the one that initially is supposed to register the session from the login form): "; include 'login.php'; exit(); } mysql_connect(localhost,$username); @mysql_select_db($database) or die( "Unable to select database"); $sql=mysql_query("SELECT * FROM login WHERE login='$login' AND password='$password'"); $login_check = mysql_num_rows($sql); if($login_check > 0){ // This is where I register the session session_register('login'); $_SESSION['login'] = $login; mysql_close(); include 'success.php'; } else { echo "You could not be logged in! Either the username and password do not match or you have not validated your membership! Please try again!"; include 'login.php'; } ?> It proceeds to login the user for that page (I know this happens because I have played around with it looking at the error checks), but it will not display any variable that resembles "$_SESSION['login']". The next page sequentially (success.php) looks like this: Any and all variations of this page come up blank and white whenever the variable $_SESSION['login'] is called to display. It shows no memory of me registering a session. Any variation of quotes verse apostrophes changes nothing, so I figure that either I am blatantly screwing up the session code (possible for I have never written any sessions before) or my system is not supporting sessions. I have a php4 something, windows, apache 1.3.27 for my home network server, and mysql. Any help on this problem would be greatly appreciated. Thanks a lot for your time, John - Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month!
RE: [PHP] Re: Failed to Receive in E:\...\mailscript.php on line 25
No, actually not. But i think so. This is the server to my ISP, so I cannot change it. But the SMTP server is set to "localhost", so I THINK it's correct. I have made a php script with only the "phpinfo()" tag in here: http://grimstad.seilforening.no/Mailinglister/phpinfo.php Regards, Håkon Strandenes -Original Message- From: Thomas Seifert [mailto:[EMAIL PROTECTED] Sent: 5. juli 2003 22:17 To: [EMAIL PROTECTED] Subject: [PHP] Re: Failed to Receive in E:\...\mailscript.php on line 25 are you sure that the smtp-settings in php.ini are correct on your host's server? Thomas On Sat, 5 Jul 2003 20:15:14 +0200 [EMAIL PROTECTED] (Håkon strandenes) wrote: > Hi, > > I am making a small PHP script for managing a simple mailing list. The > PHP script is added in the bottom of this message. > > This PHP script works great on IIS 5.1 with PHP 4.3.0, witch I have > installed locally on my system to test my scripts. But when I transfer > the script over to my host server (With IIS and PHP 4.2.1), I get an > error message when I'm trying to use it. The error message is like > this: > > Warning: Failed to Receive in > E:\inetpub\wwwroot\grimstad.seilforening\Mailinglister\mailscript.php > on line 25 Kommandoen er nå sendt. Merk at det kan ta opp til 5 > minutter før den trer i kraft.PHP Warning: Failed to Receive in > E:\inetpub\wwwroot\grimstad.seilforening\Mailinglister\mailscript.php > on line 25 > > Is there any compatibility problems between 4.2.1 and 4.3.0 for the > codes I have used in my script? > > Regards, > Håkon Strandenes > > > Here is the script (It get its inputs from this form: > http://grimstad.seilforening.no/Mailinglister/Styreskjema.html): > > > @extract($_POST); > > $Liste = stripslashes($Liste); > $Navn = stripslashes($Navn); > $Email = stripslashes($Email); > $Kommando = stripslashes($Kommando); > > if (!$Email) > { > echo ("Du må fylle inn din e-mail adresse."); > } > else > { > if (!$Navn) > { > echo ("Du må fylle inn navnet ditt."); > } > else > { > > $Message = "Automatisk generert styringsmail"; > $Headers = "From: $Navn <$Email>"; > mail( $Liste, $Kommando, $Message, $Headers ); > > echo ("Kommandoen er nå sendt. Merk at det kan ta opp til 5 minutter > før den trer i kraft."); > > } > } > ?> > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php --- [This E-mail was scanned for viruses by Declude Virus] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
php-general Digest 5 Jul 2003 19:21:43 -0000 Issue 2158
php-general Digest 5 Jul 2003 19:21:43 - Issue 2158 Topics (messages 154036 through 154072): Re: how to :: multi select 154036 by: Thomas Hochstetter Problem about insert some chinese into MySQL db 154037 by: Erick 154040 by: Jason Wong 154041 by: Erick Re: Builing PHP with Courier-IMAP 154038 by: Jason Wong Re: mail() 154039 by: Jason Wong 154042 by: Dan Anderson 154059 by: Phil Dowson Re: Probs with a form 154043 by: Lars Torben Wilson Timing out fopen using https stream wrapper? 154044 by: Giz 154045 by: Dan Anderson Authorization script 154046 by: Kyle Babich 154047 by: Dan Anderson 154048 by: Chris Knipe Re: A php-mysql checkbox question 154049 by: Lowell Allen Limit output of query field 154050 by: fkeessen.planet.nl 154051 by: Dan Anderson 154052 by: Audun Larsen 154053 by: Marek Kilimajer 154054 by: Dan Anderson Permission Problem 154055 by: Mr|P 154058 by: Marek Kilimajer simple query help 154056 by: Paul Ferrie 154057 by: Marek Kilimajer Help a newbie. 154060 by: Michael Whiting 154063 by: Dan Anderson Help a newbie 2. 154061 by: Michael Whiting 154065 by: Reuben D. Budiardja ip's behind proxy-server 154062 by: Paul van der Linden 154064 by: Jason Sheets sqlite_seek() problem 154066 by: Alan D'Angelo Delimiter must not be alphanumeric or backslash 154067 by: Gentian Hila 154068 by: Alan D'Angelo Failed to Receive in E:\...\mailscript.php on line 25 154069 by: Håkon Strandenes 154070 by: Thomas Seifert Re: Red Hat 9, Apache 2, and PHP 154071 by: o_j_p_p.icnet.com.ve Q on echo phpinfo() ; 154072 by: jsWalter Administrivia: To subscribe to the digest, e-mail: [EMAIL PROTECTED] To unsubscribe from the digest, e-mail: [EMAIL PROTECTED] To post to the list, e-mail: [EMAIL PROTECTED] -- --- Begin Message --- Thanks guys. I will have a look at the array[] convention. Meanwhile I did my own thing by naming them all different and parsing the $QUERY_STRING for them. It is a mess! So thanks again! Cheers Thomas --- End Message --- --- Begin Message --- There will have some error of words I tried addslashes(stripslashes($String)) But also can't work --- End Message --- --- Begin Message --- On Saturday 05 July 2003 16:10, Erick wrote: > There will have some error of words What errors? > I tried addslashes(stripslashes($String)) > But also can't work Try using mysql_escape_string() or mysql_real_escape_string(). -- Jason Wong -> Gremlins Associates -> www.gremlins.biz Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development * -- Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general -- /* After the last of 16 mounting screws has been removed from an access cover, it will be discovered that the wrong access cover has been removed. */ --- End Message --- --- Begin Message --- > What errors? Can't display those words. -- "Jason Wong" <[EMAIL PROTECTED]> ¼¶¼g©ó¶l¥ó·s»D :[EMAIL PROTECTED] > On Saturday 05 July 2003 16:10, Erick wrote: > > There will have some error of words > > What errors? > > > I tried addslashes(stripslashes($String)) > > But also can't work > > Try using mysql_escape_string() or mysql_real_escape_string(). > > -- > Jason Wong -> Gremlins Associates -> www.gremlins.biz > Open Source Software Systems Integrators > * Web Design & Hosting * Internet & Intranet Applications Development * > -- > Search the list archives before you post > http://marc.theaimsgroup.com/?l=php-general > -- > /* > After the last of 16 mounting screws has been removed from an access > cover, it will be discovered that the wrong access cover has been removed. > */ > --- End Message --- --- Begin Message --- On Saturday 05 July 2003 06:05, Fisayo Adeleke wrote: > I run courier-imap, but I have problems when trying to build php with > imap support. It gives the error message > > configure: error: Cannot find imap library (libc-client.a). Please check > your IMAP installation. If you're using Redhat then you need to install imap-devel. If you're using some other distro then install whatever package supplies that file (libc-client.a). Or download from ftp://ftp.cac.washington.edu/imap/ and build it yourself. -- Jason Wong -> Gremlins Associates -> www.gremlins.biz Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development * -- Search the list archives before you
[PHP] Q on echo phpinfo() ;
I ran this as a script from my Apache and it gave me a beautiful web page just full of wonderful information! But I have a question on just 1 item... Configuration File (piping) Path C:\WINNIT How does this value get set? My PHP is installed at 'G:\etc\php' My php.ini is there as well. The paths are set (in that ini file) as... include_path = ".;G:\etc\php\extensions;G:\etc\php\pear" extension_dir = "G:\etc\php\extensions" Even My Apache is told to look there as well... # Windows Win32 version LoadFile "/etc/php/gnu_gettext.dll" LoadModule php4_module "/etc/php/sapi/php4apache2.dll" Action application/x-httpd-php "/etc/php/php.exe" ScriptAlias /php/ "/etc/php/" (pls don't comment about there being volume letters missing to this block, I want to focus on the issue of a path being defined from out of the blue) Is this being hard coded somewhere? If so, then why does my PHP work at all? I have nothing that belongs to PHP in the system directory. Well, not completely true. PEAR installed a pear.ini in the system directory itself (I wish it didn't, but my PEAR not working properly is a different issue.) Nothing I've read from the web or the documentation has given me any understand on how this is set and why PHP file are needed in the location that the says to place them. I guess, this is a question for the folks who wrote the executables for Windows. Thanks for any help and enlightenment. Walter -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Red Hat 9, Apache 2, and PHP
Hello Jeff Schwartz, I heard that Apache 2 is not a stable web server using PHP parser, for this reasoun I think that in the php.net web site have said that. bye. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Failed to Receive in E:\...\mailscript.php on line 25
are you sure that the smtp-settings in php.ini are correct on your host's server? Thomas On Sat, 5 Jul 2003 20:15:14 +0200 [EMAIL PROTECTED] (Håkon strandenes) wrote: > Hi, > > I am making a small PHP script for managing a simple mailing list. The > PHP script is added in the bottom of this message. > > This PHP script works great on IIS 5.1 with PHP 4.3.0, witch I have > installed locally on my system to test my scripts. But when I transfer > the script over to my host server (With IIS and PHP 4.2.1), I get an > error message when I'm trying to use it. The error message is like this: > > Warning: Failed to Receive in > E:\inetpub\wwwroot\grimstad.seilforening\Mailinglister\mailscript.php on > line 25 Kommandoen er nå sendt. Merk at det kan ta opp til 5 minutter > før den trer i kraft.PHP Warning: Failed to Receive in > E:\inetpub\wwwroot\grimstad.seilforening\Mailinglister\mailscript.php on > line 25 > > Is there any compatibility problems between 4.2.1 and 4.3.0 for the > codes I have used in my script? > > Regards, > Håkon Strandenes > > > Here is the script (It get its inputs from this form: > http://grimstad.seilforening.no/Mailinglister/Styreskjema.html): > > > @extract($_POST); > > $Liste = stripslashes($Liste); > $Navn = stripslashes($Navn); > $Email = stripslashes($Email); > $Kommando = stripslashes($Kommando); > > if (!$Email) > { > echo ("Du må fylle inn din e-mail adresse."); > } > else > { > if (!$Navn) > { > echo ("Du må fylle inn navnet ditt."); > } > else > { > > $Message = "Automatisk generert styringsmail"; > $Headers = "From: $Navn <$Email>"; > mail( $Liste, $Kommando, $Message, $Headers ); > > echo ("Kommandoen er nå sendt. Merk at det kan ta opp til 5 minutter før > den trer i kraft."); > > } > } > ?> > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Failed to Receive in E:\...\mailscript.php on line 25
Hi, I am making a small PHP script for managing a simple mailing list. The PHP script is added in the bottom of this message. This PHP script works great on IIS 5.1 with PHP 4.3.0, witch I have installed locally on my system to test my scripts. But when I transfer the script over to my host server (With IIS and PHP 4.2.1), I get an error message when I'm trying to use it. The error message is like this: Warning: Failed to Receive in E:\inetpub\wwwroot\grimstad.seilforening\Mailinglister\mailscript.php on line 25 Kommandoen er nå sendt. Merk at det kan ta opp til 5 minutter før den trer i kraft.PHP Warning: Failed to Receive in E:\inetpub\wwwroot\grimstad.seilforening\Mailinglister\mailscript.php on line 25 Is there any compatibility problems between 4.2.1 and 4.3.0 for the codes I have used in my script? Regards, Håkon Strandenes Here is the script (It get its inputs from this form: http://grimstad.seilforening.no/Mailinglister/Styreskjema.html): "; mail( $Liste, $Kommando, $Message, $Headers ); echo ("Kommandoen er nå sendt. Merk at det kan ta opp til 5 minutter før den trer i kraft."); } } ?> -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Delimiter must not be alphanumeric or backslash
Try this: the pattern in preg_match() does not have correct limit :) - Original Message - From: "Gentian Hila" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Saturday, July 05, 2003 7:57 PM Subject: [PHP] Delimiter must not be alphanumeric or backslash hello there, I am just learning PHP now, so i am very new to it. I was trying the following code which i received from a PHP book. I am using Version 4.3.1 installed in windows I was expecting everuthing to go normally , but i get the following error: Warning: Delimiter must not be alphanumeric or backslash in f:\apache\apache\htdocs\index.php on line 3 Does anybody have an idea what might be wrong ? Gentian Hila -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Delimiter must not be alphanumeric or backslash
hello there, I am just learning PHP now, so i am very new to it. I was trying the following code which i received from a PHP book. I am using Version 4.3.1 installed in windows I was expecting everuthing to go normally , but i get the following error: Warning: Delimiter must not be alphanumeric or backslash in f:\apache\apache\htdocs\index.php on line 3 Does anybody have an idea what might be wrong ? Gentian Hila
[PHP] sqlite_seek() problem
Hello, I would want to make a question over the function sqlite_seek(), why it is giving to me of the problems. When I make a query with sqlite_query() and use sqlite_fetch_array() all works well: Example: $result = sqlite_query('SELECT * FROM test', $conn); while($row = sqlite_fetch_array($resulr, SQLITE_NUM, true)){ $rows[] = $row; } $rows is: Array ( [0] => Array ( [0] => 1 [1] => toro [2] => 10 [3] => 500.00 ) [1] => Array ( [0] => 2 [1] => gallo [2] => 5 [3] => 200.00 ) [2] => Array ( [0] => 3 [1] => rana [2] => 20 [3] => 100.00 ) [3] => Array ( [0] => 4 [1] => cane [2] => 3 [3] => 500.00 ) ) if I use sqlite_seek() and sqlite_current:if(sqlite_seek($this->result, 1)){$row = sqlite_current($this->result, $this->type, true);}$row is: Array ( [0] => 2 [1] => gallo [2] => 5 [3] => 200.00 )in place of the first record return the second (The row number is one-based (1 is the first row) in sqlite_seek()).using sqlite_rewrite() and sqlite_current() I obtain the first record, but it is not possible to obtainthe first record of a rowset with sqlite_seek() and sqlite_current()?I am writing a pretty class for SQLite, this is the last problem that I have before the release :)but I do not find other documentation for sqlite and PHP.ThankAlan D'Angelo -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Help a newbie 2.
On Saturday 05 July 2003 11:47 am, Michael Whiting wrote: > Sorry - here's the HTML source. Don't laugh :) > > > if ($view1 = true): That statement will always evaluate to true. You may need if($view1 == true) notice the double equal sign > if ($view1 = false): Same here RDB -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] ip's behind proxy-server
By design many proxies are designed to allow the client to be anonymous as well as proxy the connection, so they will not ever reveal the clients IP address. Not only that but on some ISPS (AOL) the users proxy may change with each request, making tracking the user by the IP not practical or advisiable. Just to let you know you also can't track the user by the MAC, the mac is designed for local area network identification and not on the Internet and it is easily changable. If you are wanting to uniquely identify a user what I have done in the past is add a column to the users table in the database, when they login I generate a random identifier and store it on the client and in the DB, then each time the page is loaded I verify the two match, if they don't match I log the user out automatically. This allows you to force the user to be logged in only once but it allows them to login at one pc, then login from another pc and be able to use their account from wherever they logged in last from. If you are just trying to prevent people from voting twice, etc, or signing up for multiple accounts another technique is to force them to give you valid email and then verify the email is valid by sending them an email and having a link they must click to verify their account. Remember dialup user's ips change every time they connect anyway so blocking by IP is not that effective unless you block an entire IP range. Jason Paul van der Linden wrote: I've a problem: I need to block accounts with the same ip, but if it's a proxy-server you get only the proxy-server ip's. I downloaded somewhere this script: Proxy-ip: " . $RemoteInfo[1]; ?> But that doesn't seems to work, it will only give your proxy-server ip's, and doesn't give the real client-ip. Does someone know how to recieve the real client-ip, and not the proxy-server ip. Thanx Paul -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Help a newbie.
If I were you I would create a mySQL (or Postgresql) database containing all of the thumbnails. Use the row id of the mySQL (Postgresql) table to decide which row to display. You probably will want to look up the documentation and/or google. -Dan On Sat, 2003-07-05 at 11:44, Michael Whiting wrote: > Hey everyone. > > I was hoping you could help with something. I am trying to create a > thumbnail image gallery using PHP and cookies. The idea is that different > series of images > can be viewed by clicking on + and - links that will then show or hide the > thumbnails. Ie show/hide different rows of a table. Here is what I've > managed so far but I think it's probably a long way off from achieving what > I hope. > > Thanks for any help in advance! > > > __ > > -- > 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] ip's behind proxy-server
I've a problem: I need to block accounts with the same ip, but if it's a proxy-server you get only the proxy-server ip's. I downloaded somewhere this script: Proxy-ip: " . $RemoteInfo[1]; ?> But that doesn't seems to work, it will only give your proxy-server ip's, and doesn't give the real client-ip. Does someone know how to recieve the real client-ip, and not the proxy-server ip. Thanx Paul -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Help a newbie 2.
Sorry - here's the HTML source. Don't laugh :) ai-em.net | image gallery Image Gallery Series 1 - blah and blah and blah View Thumbnails --- Close Thumbnails \nHello World! (thumbnails go here)"); setcookie ("view1", "true"); endif; if ($view1 = false): setcookie ("view1", "false"); endif; endif; ?> Series 2 - blah blah again Series 3 - blah blah again (again) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Help a newbie.
Hey everyone. I was hoping you could help with something. I am trying to create a thumbnail image gallery using PHP and cookies. The idea is that different series of images can be viewed by clicking on + and - links that will then show or hide the thumbnails. Ie show/hide different rows of a table. Here is what I've managed so far but I think it's probably a long way off from achieving what I hope. Thanks for any help in advance! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] mail()
Perfect solution. Thanks!!! - Original Message - From: "Dan Anderson" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Saturday, July 05, 2003 4:30 am Subject: Re: [PHP] mail() > > > Could someone let me know if it is possible to pass a resultset of a query > > > to a single variable so it can be included as the message part of the mail > > > function? > > if I were you I would try something like... > > > $result = mysql_query($query); > $email = NULL; // it's bad form to dot without clearing the variable > while ($line = mysql_fetch_array($result,MYSQL_ASSOC)) > { > $email = $email . "Value 1: {$line['value_1']}\n"; > $email = $email . "Value 2: {$line['value_2']}\n"; > $email = $email . "Value 3: {$line['value_3']}\n"; > // ... > } > mail('[EMAIL PROTECTED]','subject',$email); > ?> > > > -- > 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] Permission Problem
Go to admin -> Modules, and set Your_Account to be visible to all visitors. Mr|P wrote: I moved from myphpnuke to phpnuke. When trying to register a new user account on the website it get the error: You are trying to access a restricted area. We are Sorry, but this section of our site is for Registered Users Only. Thanks for your help. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] simple query help
because you execute the query twice. Remove the last line, it is not needed as UPDATE does not return any result. Paul Ferrie wrote: Hi guys, I am working on a flash forum for my site. Came with the FOED book, anyways i am tyring to delete the threadCount by -1 from the db. could below does dlete the count but in multipules of 2. Anyone cheers $query = "UPDATE forumForums SET threadCount = threadCount -1 WHERE forumID = $forumID"; if(!mysql_query($query)) { fail("Error deleting thread Count"); } $result = @mysql_query($query); -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] simple query help
Hi guys, I am working on a flash forum for my site. Came with the FOED book, anyways i am tyring to delete the threadCount by -1 from the db. could below does dlete the count but in multipules of 2. Anyone cheers $query = "UPDATE forumForums SET threadCount = threadCount -1 WHERE forumID = $forumID"; if(!mysql_query($query)) { fail("Error deleting thread Count"); } $result = @mysql_query($query); -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Permission Problem
I moved from myphpnuke to phpnuke. When trying to register a new user account on the website it get the error: You are trying to access a restricted area. We are Sorry, but this section of our site is for Registered Users Only. Thanks for your help. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Limit output of query field
> Make it with your sql query, it will be faster: > SELECT ..., IF(LENGTH(text)>50, CONCAT(SUBSTRING(text,0,50),'...'), > text) as text I won't outright disagree, but warn fkessen to be careful. There are some scenarios in which that would not be faster. -Dan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Limit output of query field
Make it with your sql query, it will be faster: SELECT ..., IF(LENGTH(text)>50, CONCAT(SUBSTRING(text,0,50),'...'), text) as text [EMAIL PROTECTED] wrote: Hi there, Hope you can help me with the following: I have a query and i'm showing the output: echo $row->text; That goes o.k. but the text is 400 characters long and I only one to show the first 50 characters and at the end showing ... dot's.. Help! Thank you very much! Frank -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Limit output of query field
Try this: if(strlen($row->text)>50) { echo substr($row->text,0,47) . "..."; } else { echo $row->text; } - Audun -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Saturday, July 05, 2003 3:59 PM To: [EMAIL PROTECTED] Subject: [PHP] Limit output of query field Hi there, Hope you can help me with the following: I have a query and i'm showing the output: echo $row->text; That goes o.k. but the text is 400 characters long and I only one to show the first 50 characters and at the end showing ... dot's.. Help! Thank you very much! Frank -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Limit output of query field
Look up the function substr. It will allow you to create a string of the first 50 chars from your 400 char string. -Dan On Sat, 2003-07-05 at 09:58, [EMAIL PROTECTED] wrote: > Hi there, > > Hope you can help me with the following: > > I have a query and i'm showing the output: > > echo $row->text; > > That goes o.k. but the text is 400 characters long and I only one to show the first > 50 characters and at the end showing ... dot's.. > > Help! > > Thank you very much! > > Frank > > > __ > > -- > 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] Limit output of query field
Hi there, Hope you can help me with the following: I have a query and i'm showing the output: echo $row->text; That goes o.k. but the text is 400 characters long and I only one to show the first 50 characters and at the end showing ... dot's.. Help! Thank you very much! Frank -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] A php-mysql checkbox question
> From: "John T. Beresford" <[EMAIL PROTECTED]> > > I have a problem trying to show a checkbox list and have some of the > boxes checked and not others. Here are the details: > > table: features > rec_id | fName > - > 1 | Window > - > 2 | pool > - > 3 | fence > - > 4 | Drive > > > table: com_features > > rec_id | com_features_id | feature_id > -- > 1 | 2| 1 > -- > 2 | 1| 4 > -- > 3 | 1| 3 > -- > 4 | 2| 3 > -- > 5 | 4| 4 > -- > 6 | 7| 4 > -- > 7 | 8| 4 > -- > 8 | 2| 4 > > > > what I want is to display a checkbox list that would show all the > values from 'features' and have the appropriate boxes checked when > 'com_features.com_features.id = 2' > > ie > > X Window > pool > X fence > X drive > > The query I am using now is: > > $sql ="SELECT > features.rec_id AS rec_id, > features.fName AS fName, > com_features.feature_id AS feature_id, > com_features.com_rec_id AS com_rec_id > FROM features, com_features > WHERE com_features.com_rec_id = \"2\" AND features.TheTest=\"1\""; > > What I get in the return is: > > X Window > pool > fence > drive > > Window > pool > X fence > drive > > Window > pool > fence > X drive I'm not sure how you're formatting (HTML?), what "TheTest" is, or what this has to do with PHP, but how about this select statement: $sql = "SELECT features.fName, features.rec_id FROM features, com_features WHERE features.rec_id = com_features.feature_id AND com_features.com_features_id = '2'"; HTH -- Lowell Allen -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Authorization script
> I am making an authorizatoin script for the control panel of a loggin > system I have been writing. Here is what I have right now: Well, if you copied and paste'd this, then I'm surprised that you don't get a syntax error > if (!$authorized) { > header('Cache-Control: no-store, no-cache, must-revalidate'); > header('Cache-Control: post-check=0; pre-check=0', false); > header('Pragma: no-cache'); > header('WWW-Authenticate: Basic realm="phpLogK"'); > exit; ^^^ exit(); You also need some more headers... header('HTTP/1.0 401 Unauthorized'); header('status: 401 Unauthorized'); -=- me -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Authorization script
> The problem is that if a user clicks cancel the control panel loads > instead of the program dying. Why and how do I stop it? Please provide more info -- like what do you mean by "if the user clicks cancel". -Dan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Authorization script
I am making an authorizatoin script for the control panel of a loggin system I have been writing. Here is what I have right now: The problem is that if a user clicks cancel the control panel loads instead of the program dying. Why and how do I stop it? Thank you, -- Kyle -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Timing out fopen using https stream wrapper?
> It seems I have been over the documentation repeatedly, but there simply > isn't any documented way of setting a timeout duration. Any ideas? If you want to set a time out on execution of the /script/, check out: http://us3.php.net/manual/en/function.set-time-limit.php -Dan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Timing out fopen using https stream wrapper?
I have a class that uses fopen to read some xml data from a site with ongoing stability issues. Fopen is using the stream wrapper for http. Something I've struggled with is finding a way to set a timeout value when fopen is attempting to get a page from a site that is inaccessible for some reason. On my test server, the behavior is that fopen seems to hang up, and the script never returns. It seems I have been over the documentation repeatedly, but there simply isn't any documented way of setting a timeout duration. Any ideas? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Probs with a form
On Fri, 2003-07-04 at 15:02, LPA wrote: > Hey, > > I must send datas threw a form, but I dont want to have a submit button.. Is > there a way to 'simulate' the click of a submit button? > > Thnx for your help > > Laurent Hi there, This is really an HTML question, and not a PHP question, but use an instead and it should work for you. The link below will take you to everything you need to know. http://www.w3.org/TR/REC-html40/interact/forms.html#h-17.4 If you want examples etc, google for something like 'image submit html' and you'll get tons of info. Hope this helps, Torben -- Torben Wilson <[EMAIL PROTECTED]>+1.604.709.0506 http://www.thebuttlesschaps.com http://www.inflatableeye.com http://www.hybrid17.com http://www.themainonmain.com - Boycott Starbucks! http://www.haidabuckscafe.com - -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] mail()
> > Could someone let me know if it is possible to pass a resultset of a query > > to a single variable so it can be included as the message part of the mail > > function? if I were you I would try something like... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Problem about insert some chinese into MySQL db
> What errors? Can't display those words. -- "Jason Wong" <[EMAIL PROTECTED]> ¼¶¼g©ó¶l¥ó·s»D :[EMAIL PROTECTED] > On Saturday 05 July 2003 16:10, Erick wrote: > > There will have some error of words > > What errors? > > > I tried addslashes(stripslashes($String)) > > But also can't work > > Try using mysql_escape_string() or mysql_real_escape_string(). > > -- > Jason Wong -> Gremlins Associates -> www.gremlins.biz > Open Source Software Systems Integrators > * Web Design & Hosting * Internet & Intranet Applications Development * > -- > Search the list archives before you post > http://marc.theaimsgroup.com/?l=php-general > -- > /* > After the last of 16 mounting screws has been removed from an access > cover, it will be discovered that the wrong access cover has been removed. > */ > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Problem about insert some chinese into MySQL db
On Saturday 05 July 2003 16:10, Erick wrote: > There will have some error of words What errors? > I tried addslashes(stripslashes($String)) > But also can't work Try using mysql_escape_string() or mysql_real_escape_string(). -- Jason Wong -> Gremlins Associates -> www.gremlins.biz Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development * -- Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general -- /* After the last of 16 mounting screws has been removed from an access cover, it will be discovered that the wrong access cover has been removed. */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] mail()
On Saturday 05 July 2003 02:57, Phil Dowson wrote: > Could someone let me know if it is possible to pass a resultset of a query > to a single variable so it can be included as the message part of the mail > function? Short answer: yes Long answer: what exactly are you trying to do and what exactly do you need help on? -- Jason Wong -> Gremlins Associates -> www.gremlins.biz Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development * -- Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general -- /* I was born in a Hostess Cupcake factory before the sexual revolution! */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Builing PHP with Courier-IMAP
On Saturday 05 July 2003 06:05, Fisayo Adeleke wrote: > I run courier-imap, but I have problems when trying to build php with > imap support. It gives the error message > > configure: error: Cannot find imap library (libc-client.a). Please check > your IMAP installation. If you're using Redhat then you need to install imap-devel. If you're using some other distro then install whatever package supplies that file (libc-client.a). Or download from ftp://ftp.cac.washington.edu/imap/ and build it yourself. -- Jason Wong -> Gremlins Associates -> www.gremlins.biz Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development * -- Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general -- /* "Now here's something you're really going to like!" -- Rocket J. Squirrel */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Problem about insert some chinese into MySQL db
There will have some error of words I tried addslashes(stripslashes($String)) But also can't work -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] how to :: multi select
Thanks guys. I will have a look at the array[] convention. Meanwhile I did my own thing by naming them all different and parsing the $QUERY_STRING for them. It is a mess! So thanks again! Cheers Thomas -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php