Re: [PHP] This is weird, this script does/doesn't work
Øystein Håland wrote: on my own machine, W2k+Apache+php4.2 this works without problem, on the Internet-server though, (Linux), the following script produces a blank page: ?php require ../utils.php; $link=openDB(); $file = $target.form; // Queries for student if ($target == student) { // Add student Query to add // Change student info Query to change info // Delete student Query to delete } // Queries for result if ($target == result) { // Delete result Query to delete } if(!isset($administrate) $goal) { if ($logga_in == ok ) { $adm_user = admin; $adm_pass = password; if ($operation == logon) { if ($password == $adm_pass $admin == $adm_user) { setcookie(administrate, OK, 0); include(../recycle/head.php); include ($file.php); } else { include(../recycle/head.php); echo CENTERFONT SIZE=\5\ COLOR=\#C9\Please try again. Check your spelling./FONTCENTER; include (loginform.php); } } } else { include(../recycle/head.php); include (loginform.php); } } elseif ($target) {//When logged in this load the right form include(../recycle/head.php); include ($file.php); } if (!$target) {//This happens when first loaded. In the head.php there's a menu and the different targets are set include(../recycle/head.php); echo H2Administration of SUBIMG BORDER=0 SRC=\../pics/mypicmin.gif\ WIDTH=135 HEIGHT=30/SUB/H2 ; } include(../recycle/bottom.php); ? Explanation: utils.php with the two functions openDB() and queryDB() connect to the database and do the query. loginform.php contains the html to the loginform. $file = $target.form; so the right form will be loaded. So, what is wrong, why does it 'behave' so different? Does not look that there are any problems in your script. The real problem could be in the include files though! You might start doing the following 1) check if your internet server allows access to the other directories (like ../recycle and ../). I suppose that you did not forget to copy these files too ;-) 2) compare the php.ini of your test system and the internet server. Differences might give a clue to the problem 3) view the source code of the 'blank page' . Is it realy blank? It might contain a bit of HTML output that can give a hint of were your script stops 4) include error_reporting(E_ALL); as first line of code in your php-scripts. It might help debugging 5) does your internet server have access to the database? Is it the same database? Arre the access rights the same? 6) run this script on both machines and look for differences in the outputs: ?php php_info() ? Good luck René -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: PHP OOP
Rodrigo Dominguez wrote: I made a mistake while I was writting the example, in my original code I wrote it as you did, with $this-b[0] = new one(); but it doesn't work. Thank you. Philip Hallstrom [EMAIL PROTECTED] escribió en el mensaje [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Not tested, but what if you change $b[0] = new one(); $b[1] = new one(); to: $this-b[0] = new one(); $this-b[1] = new one(); On Tue, 3 Sep 2002, Rodrigo Dominguez wrote: I have a problem, I can't create an array of classes into a class, for example: class one { var $a; function foo() { echo foo; } } class two { var $b; function initialize() { $b[0] = new one(); $b[1] = new one(); } } $test = new two(); $test-initialize(); $test-b[0]-foo(); //It doesn't work $test-b[1]-foo(); //It doesn't work Any suggestion? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Eh.. unchecked code, but what about: $this-b[0] = new one; $this-b[1] = new one; $test = new two; Instead of $this-b[0] = new one(); $this-b[1] = new one(); $test = new two(); If no luck try to include error_reporting(E_ALL); as first line of your script. Good luck René -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Please help with fresh fish.
Anh wrote: Hello everyone, I would like to study PHP but do not have any experience about PHP or programming. Could you please give me some advice to begin such as books, news, forum... Many thanks in advance, Anh You already found the best PHP forum there is ;-) René -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] SMS
what are the components to be use if you want to set up a site that SENDS Free SMS and uses PHP? -- Lejanson C. Go, SDE I -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Pass array in HTTP_POST_VARS question
you can also join() the elements and pass as a single string, then explode() the elements back again. Elias Paul Maine [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Is it possible to pass an array in a form post? If so, how do I reference the array on the next page? Thank You Paul php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Pass array in HTTP_POST_VARS question
If you are in a session you can register the array and it will be available on the next page, once you finish working with the array, just unregister the array. File1.php action= file2.php session_start(); session_register(foo); var $foo = array(); File2.php session_start(); Work with $foo session_unregister(foo); Paul Maine [EMAIL PROTECTED] escribió en el mensaje [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Is it possible to pass an array in a form post? If so, how do I reference the array on the next page? Thank You Paul php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] how get a image?
Hi all, I have a input button like this: input name=imagen type=FILE id=imagen height=1 How can i get this image? I need to receive it as a attachment file or insert it into a MySQL database. Any Ideas? Thanks for help. Peace Love skitum
RE: [PHP] how get a image?
Hi there Have a look at http://www.php.net/manual/en/features.file-upload.php It should explain all. Regards -Scott -Original Message- From: skitum [mailto:[EMAIL PROTECTED]] Sent: Wednesday, September 04, 2002 10:35 AM To: [EMAIL PROTECTED] Subject: [PHP] how get a image? Hi all, I have a input button like this: input name=imagen type=FILE id=imagen height=1 How can i get this image? I need to receive it as a attachment file or insert it into a MySQL database. Any Ideas? Thanks for help. Peace Love skitum -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] script mysql date picker
Hi, There are somewhere a script to manage mysql table in this way: -In table i have a date field(format -mm-dd). I tried webmin, PHPMyEdit etc, for editing this field from web page, but field is displayed as textbox and i have to write manually date field. I want next to textfield a button with popup window with calendar inside, when i select a day, popup window is closed and value selected is written in textbox. In html with javascript is easy, but here i mess. tx in adv for any help
Re: [PHP] Uploading file
i have the same problem. Where is the kind soul who can help us? Peace Love skitum - Original Message - From: Clemson Chan [EMAIL PROTECTED] To: Juan Pablo Aqueveque [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Wednesday, September 04, 2002 12:25 AM Subject: RE: [PHP] Uploading file Thanks Juan, and other listers, I have this example, HTML HEAD TITLEFigure 7-3/TITLE /HEAD BODY ? //check for file upload if(isset($UploadedFile)) { unlink($UploadedFile); print(Local File: $UploadedFile BR\n); print(Name: $UploadedFile_name BR\n); print(Size: $UploadedFile_size BR\n); print(Type: $UploadedFile_type BR\n); print(HR\n); } ? FORM ENCTYPE=multipart/form-data ACTION=7-3.php METHOD=post INPUT TYPE=hidden name=MAX_FILE_SIZE value=4096000 INPUT NAME=UploadedFile TYPE=file INPUT TYPE=submit VALUE=Upload /FORM /BODY /HTML and the result is this after I uploaded a file Local File: /tmp/phpnYLV2J Name: 323lake.jpg Size: 48254 Type: image/pjpeg But I couldn't find the uploaded file, nor the /tmp/phpnYLV2J path. Do I normally do a copy after the upload? Can I just change the tmp path and filename when I upload? Thanks. --Clemson -Original Message- From: Juan Pablo Aqueveque [mailto:[EMAIL PROTECTED]] Sent: Tuesday, September 03, 2002 7:58 AM To: Clemson Chan; [EMAIL PROTECTED] Subject: Re: [PHP] Uploading file Hi friend, http://www.php.net/manual/en/features.file-upload.php And take a look to the User Contributed Notes --jp At 13:03 03-09-2002 -0700, Clemson Chan wrote: Hi, I am new to this group. I am trying to figure out how to let people to upload image files to my website. My ISP is using PHP 3 (I believe). If someone can give me simple example, that will be great. Thanks. --Clemson How can I tell what version of PHP is running on the system (linux)? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Juan Pablo Aqueveque [EMAIL PROTECTED] Ingeniero de Sistemas Departamento de Redes y Comunicaciones http://www.drc.uct.cl Universidad Católica de Temuco. Tel:(5645) 205 630 Fax:(5645) 205 628 -- 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
[PHP] Re: script mysql date picker
This script is not mine, but I modified it so that it can work with any form field... take a look at the sources: http://lgwm.org/ozone/calcall.htm Good luck. Adi [EMAIL PROTECTED] wrote in message 001701c253f3$5ce58820$9600a8c0@adi">news:001701c253f3$5ce58820$9600a8c0@adi... Hi, There are somewhere a script to manage mysql table in this way: -In table i have a date field(format -mm-dd). I tried webmin, PHPMyEdit etc, for editing this field from web page, but field is displayed as textbox and i have to write manually date field. I want next to textfield a button with popup window with calendar inside, when i select a day, popup window is closed and value selected is written in textbox. In html with javascript is easy, but here i mess. tx in adv for any help -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
php-general Digest 4 Sep 2002 10:21:21 -0000 Issue 1565
php-general Digest 4 Sep 2002 10:21:21 - Issue 1565 Topics (messages 115102 through 115151): Re: Refering to an object from within an array variable in another class 115102 by: Andy Warwick XML vs Everything Else 115103 by: Taylor York 115104 by: nicos.php.net 115113 by: Geoff Hankerson 115134 by: Rodrigo Dominguez Re: Uploading file 115105 by: Clemson Chan 115111 by: Rodrigo Dominguez 115114 by: Clemson Chan 115115 by: Clemson Chan 115150 by: skitum Re: posting form values doesn't work 115106 by: timo stamm Re: Safe_Mode problem 115107 by: timo stamm Re: RE : include interpreted php file 115108 by: timo stamm Re: mysql string comparison not working 115109 by: timo stamm creating mail on submitting a form. 115110 by: Anil Garg 115139 by: Paul Nicholson PHP 4.2.2 install problem 115112 by: Mark McCulligh 115140 by: Paul Nicholson Re: php back? 115116 by: Manuel Lemos mod_php / apache config 115117 by: Lee Doolan mod_php4 / apache config question 115118 by: Lee Doolan Please help with fresh fish. 115119 by: Anh 115121 by: Philip Hallstrom 115125 by: Dan Ostrowski 115127 by: Anh 115143 by: René Moonen bugs/master are back 115120 by: nicos.php.net 115122 by: eriol 115123 by: nicos.php.net 115124 by: eriol 115126 by: nicos.php.net I need a useful sample code for opening from ftp servers using fopen() or file() commands 115128 by: Javier Campo Martinez 115129 by: nicos.php.net 115130 by: nicos.php.net Re: PHP / Bulk E-Mail 115131 by: Justin French 115136 by: Tomasz Orzechowski Re: exit() function question 115132 by: Tom Rogers Pass array in HTTP_POST_VARS question 115133 by: Paul Maine 115135 by: David Robley 115145 by: lallous 115146 by: Rodrigo Dominguez Re: Please, help with Sourceforge's PHP command-line not working at all 115137 by: Tomasz Orzechowski php/mysql slow with zone alarm 115138 by: ed Re: This is weird, this script does/doesn't work 115141 by: René Moonen Re: PHP OOP 115142 by: René Moonen SMS 115144 by: Lejanson C. Go how get a image? 115147 by: skitum 115148 by: Scott Houseman script mysql date picker 115149 by: adi 115151 by: lallous 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] -- ---BeginMessage--- On Tue, 3 Sep 2002 18:59:01 +0100, Bas Jobsen wrote (in message 02090319590102.02043@bjobsen): Any insight appreciated. In a best case if someone can add in the required ''s to the following code that would be great. snip solution Thanks for that Bas, works a treat. And thanks Javier for the heads up on the material at http://safari.oreilly.com; looks like some good stuff there. -- Andy Warwick Creed New Media Design http://www.creed.co.uk/src/unet/index.htm ---End Message--- ---BeginMessage--- Ok, Help me out on this one. As far as i can tell, xml documents store data..pretty much just a dababase. Now please, correct me on anything I say incorrectly...But i just cannot seem to grasp the point of using XML over MySQL. Can anyone direct me to a page with xml in use? Something that can help me grasp what its all about. Thank you, Taylor York DreamStar Group ---End Message--- ---BeginMessage--- Hi, XML, eXtensible Markup Language. Meta-language. XML allows you to create your own variables and meta names. You should read some doc about it. Btw your question has nothing to do with PHP but really with XML you should take a look to the XML's mailing list they will help you better than we can. -- Nicos - CHAILLAN Nicolas [EMAIL PROTECTED] www.WorldAKT.com - Hébergement de sites Internet Taylor York [EMAIL PROTECTED] a écrit dans le message de news: [EMAIL PROTECTED] Ok, Help me out on this one. As far as i can tell, xml documents store data..pretty much just a dababase. Now please, correct me on anything I say incorrectly...But i just cannot seem to grasp the point of using XML over MySQL. Can anyone direct me to a page with xml in use? Something that can help me grasp what its all about. Thank you, Taylor York DreamStar Group ---End Message--- ---BeginMessage--- Can anyone direct me to a page with xml in use? Something that can help me grasp what its all about. I didn't understand xml at all until I started using it . I asked pretty much the same question as you (what is it good for?). Now I will almost always use xml in any app I work on. One application that is simply wonderful is xsl
[PHP] RE: Pass array in HTTP_POST_VARS question
you just name the form elements as array elements, e.g. with explicit keys name='array[0]' name='array[1]' etc. or allowing php to assign the keys name='array[]' name='array[]' etc. then the array is an element of $HTTP_POST_VARS[] when the form is posted Tim Ward www.chessish.com -Original Message- From: Paul Maine [mailto:[EMAIL PROTECTED]] Sent: 04 September 2002 03:25 To: PHP PHP Subject: Pass array in HTTP_POST_VARS question Is it possible to pass an array in a form post? If so, how do I reference the array on the next page? Thank You Paul php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: PHP / Bulk Email
Hi Guys / gals, I ran a test recently sending emails to a list of clients (1000 or so) from a PHP / MySQL powered system. When sending via Sendmail this was VERY slow, taking several minutes to complete. When I switched over to Qmail the whole process takes only 10 or 15 seconds. Seems it's the MTA that causes the biggest overhead in the equation... and Qmail is so much nicer than Sendmail! Cheers, Andy Andrew Cowles KAPOW! SMS Gateway http://www.kapow.co.uk/ --- To text or not to text.. that is A question. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: PHP / Bulk Email
Hi Guys / gals, I ran a test recently sending emails to a list of clients (1000 or so) from a PHP / MySQL powered system. When sending via Sendmail this was VERY slow, taking several minutes to complete. When I switched over to Qmail the whole process takes only 10 or 15 seconds. Seems it's the MTA that causes the biggest overhead in the equation... and Qmail is so much nicer than Sendmail! IIRC it is also an area where the Windows implementation of PHP is superior (for a pleasant change) on a volume/performance basis (I read somewhere that this is because a stub SMTP service is included in the interface). Regards, =dn -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Remote file download and https
Hi Guys, I'm trying to create a transparent download using a script (the script would run from my local machine) that will request a file from a remote server, that looks like this (https request): https://www.httpsserver.net/Pages/Download.asp?usr=testpass=testfrom=05/01 /02to=09/03/02 This link will trigger an excel file download. I tryed with fsockopen() and fopen() but no luck. Also the Header (Location: $myurl) starts the download but redirect the user to httpsserver. Any ideas and hints to start this transparent download would be much appreciated. Maybe to use a popup window? Many Thanks, Radu -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Pass array in HTTP_POST_VARS question
Don't forget to use urlencode after serializing. David Robley wrote: In article [EMAIL PROTECTED], [EMAIL PROTECTED] says... Is it possible to pass an array in a form post? If so, how do I reference the array on the next page? Thank You Paul php I believe you may need serialize/unserialize here. Use serialize($array) to create a simple variable that can be passed, then at the other end, use unserialize to restore it. http://www.php.net/serialize for more info -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Remote file download and https
Do you have SSL library installed? check that PHPINFO() i guess. You can also try to run curl() (if they have SSL support). Otherwise, It will be hard to implement SSL from pure PHP sockets functions. Elias Radu Manole [EMAIL PROTECTED] wrote in message 001401c25404$a52baae0$[EMAIL PROTECTED]">news:001401c25404$a52baae0$[EMAIL PROTECTED]... Hi Guys, I'm trying to create a transparent download using a script (the script would run from my local machine) that will request a file from a remote server, that looks like this (https request): https://www.httpsserver.net/Pages/Download.asp?usr=testpass=testfrom=05/01 /02to=09/03/02 This link will trigger an excel file download. I tryed with fsockopen() and fopen() but no luck. Also the Header (Location: $myurl) starts the download but redirect the user to httpsserver. Any ideas and hints to start this transparent download would be much appreciated. Maybe to use a popup window? Many Thanks, Radu -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: SMS
Hi, This has nothing really to do with PHP, but, you can't excepted if you work for a company that got the right to do it. -- Nicos - CHAILLAN Nicolas [EMAIL PROTECTED] www.WorldAKT.com - Hébergement de sites Internet Lejanson C. Go [EMAIL PROTECTED] a écrit dans le message de news: [EMAIL PROTECTED] what are the components to be use if you want to set up a site that SENDS Free SMS and uses PHP? -- Lejanson C. Go, SDE I -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] socket_read
I'm having a problem with socket read, it's only reading one character. This may not sound so bad, but when you think that while it's reading all those one characters, it cannot read anyone else's (it blocks). Can anyone explain, or have a better way of doing this? Code below: ?php set_time_limit(0); define('MAXLINE', 255); define('LISTENQ', 10); define('PORT', 1); function killDaemon() { global $listenfd, $client; socket_close($listenfd); $msg = Daemon going down!\n; for ($i = 0; $i count($client); $i++) { if ($client[$i] != null) { socket_write($client[$i], $msg, strlen($msg)); socket_close($client[$i]); } } print Shutting down the daemon\n; exit(); } function closeClient($i) { global $client, $remote_host, $remote_port; print closing client[$i] ({$remote_host[$i]}:{$remote_port[$i]})\n; socket_close($client[$i]); $client[$i] = null; unset($remote_host[$i]); unset($remote_port[$i]); } $listenfd = socket_create(AF_INET, SOCK_STREAM, 0); if ($listenfd) print Listening on port . PORT . \n; else die(AIEE -- socket died!\n); socket_setopt($listenfd, SOL_SOCKET, SO_REUSEADDR, 1); if (!socket_bind($listenfd, 127.0.0.1, PORT)) { socket_close($listenfd); die(AIEE -- Couldn't bind!\n); } socket_listen($listenfd, LISTENQ); for ($i = 0; $i 1; $i++) $client[$i] = null; while(1) { $rfds[0] = $listenfd; for ($i = 0; $i count($client); $i++) { if ($client[$i] != null) $rfds[$i + 1] = $client[$i]; } $nready = socket_select($rfds, $null, $null, null); if (in_array($listenfd, $rfds)) { print listenfd heard something, setting up new client\n; for ($i = 0; $i = count($client); $i++) { if ($client[$i] == null) { $client[$i] = socket_accept($listenfd); socket_setopt($client[$i], SOL_SOCKET, SO_REUSEADDR, 1); socket_getpeername($client[$i], $remote_host[$i], $remote_port[$i]); socket_write($client[$i], Welcome to my test server\r\n); print Accepted {$remote_host[$i]}:{$remote_port[$i]} as client[$i]\n; break; } } if (--$nready = 0) continue; } for ($i = 0; $i count($client); $i++) { if ($client[$i] == null) continue; if (in_array($client[$i], $rfds)) { $rawStr = ; $n = ; while (false !== ($n = socket_read($client[$i], MAXLINE))) { if (ord($n) == 0 || ord($n) == 13) break; if (ord($n) == 8) $rawStr = substr($rawStr, 0, -1); $rawStr .= $n; } if (trim($rawStr) == ) continue; if ($rawStr == /killme) killDaemon(); else if ($rawStr == /quit) closeClient($i); else { print From {$remote_host[$i]}:{$remote_port[$i]}, client[$i]: $rawStr\n; for ($j = 0; $j count($client); $j++) { if ($client[$j] != null) socket_write($client[$j], From client[$i]: $rawStr\r\n); } if (--$nready = 0) break; } } } //end of for loop } //end of master loop ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Uploading file
There is a perfecting good working example of file uploads on php.net... never quite sure why people re-invent the wheel all the time. In the example (at http://www.php.net/manual/en/features.file-upload.php), they make a call to move_uploaded_file()... until you do that, and move it to where you want, it IS in the temporary location, set my php.ini, although it may get deleted at the end of the script if it hasn't been moved elsewhere... you need to move the uploaded file to an area within your disc hierarchy. Justin on 04/09/02 8:16 PM, skitum ([EMAIL PROTECTED]) wrote: i have the same problem. Where is the kind soul who can help us? Peace Love skitum - Original Message - From: Clemson Chan [EMAIL PROTECTED] To: Juan Pablo Aqueveque [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Wednesday, September 04, 2002 12:25 AM Subject: RE: [PHP] Uploading file Thanks Juan, and other listers, I have this example, HTML HEAD TITLEFigure 7-3/TITLE /HEAD BODY ? //check for file upload if(isset($UploadedFile)) { unlink($UploadedFile); print(Local File: $UploadedFile BR\n); print(Name: $UploadedFile_name BR\n); print(Size: $UploadedFile_size BR\n); print(Type: $UploadedFile_type BR\n); print(HR\n); } ? FORM ENCTYPE=multipart/form-data ACTION=7-3.php METHOD=post INPUT TYPE=hidden name=MAX_FILE_SIZE value=4096000 INPUT NAME=UploadedFile TYPE=file INPUT TYPE=submit VALUE=Upload /FORM /BODY /HTML and the result is this after I uploaded a file Local File: /tmp/phpnYLV2J Name: 323lake.jpg Size: 48254 Type: image/pjpeg But I couldn't find the uploaded file, nor the /tmp/phpnYLV2J path. Do I normally do a copy after the upload? Can I just change the tmp path and filename when I upload? Thanks. --Clemson -Original Message- From: Juan Pablo Aqueveque [mailto:[EMAIL PROTECTED]] Sent: Tuesday, September 03, 2002 7:58 AM To: Clemson Chan; [EMAIL PROTECTED] Subject: Re: [PHP] Uploading file Hi friend, http://www.php.net/manual/en/features.file-upload.php And take a look to the User Contributed Notes --jp At 13:03 03-09-2002 -0700, Clemson Chan wrote: Hi, I am new to this group. I am trying to figure out how to let people to upload image files to my website. My ISP is using PHP 3 (I believe). If someone can give me simple example, that will be great. Thanks. --Clemson How can I tell what version of PHP is running on the system (linux)? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Juan Pablo Aqueveque [EMAIL PROTECTED] Ingeniero de Sistemas Departamento de Redes y Comunicaciones http://www.drc.uct.cl Universidad Católica de Temuco. Tel:(5645) 205 630 Fax:(5645) 205 628 -- 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] Remote file download and https
There is a download script (commonly used for restricting downloads to members, etc) on Zend.com... if you can't find it (in tutorials or articles), let me know. It should give you a good understanding of the principals, and a decent head start on the code, as it did for me. I don't think there will be any problem with SSL (https://) as long as your server is set-up for it... Justin on 04/09/02 9:17 PM, Radu Manole ([EMAIL PROTECTED]) wrote: Hi Guys, I'm trying to create a transparent download using a script (the script would run from my local machine) that will request a file from a remote server, that looks like this (https request): https://www.httpsserver.net/Pages/Download.asp?usr=testpass=testfrom=05/01 /02to=09/03/02 This link will trigger an excel file download. I tryed with fsockopen() and fopen() but no luck. Also the Header (Location: $myurl) starts the download but redirect the user to httpsserver. Any ideas and hints to start this transparent download would be much appreciated. Maybe to use a popup window? Many Thanks, Radu -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP and LDAP over SSL
I'm new to both PHP, LDAP and SSL so I'm really asking for direction on where to start. I have an OpenLDAP server on a Linux box, and a Microsoft ISS on Windows 2000 with PHP-scripting. I have made a couple of PHP scripts that access the LDAP database for reading and writing. All works fine so fare. I have installed a certificate on both the Web server and the LDAP server and moved to https communication between the client and the Web server. Now I want to move to SSL communication between the Web server and the LDAP server. I can make an ldap_connect with the ldaps://hostname/ parameter but what next: How can make an ldap_bind command? How can I encrypt and decrypt the data? How do I specify a key/certificate for encrypting and decrypting? Søren Henning Dalgaard -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Apache 2.0
Hi all, I'm setting up a test server with Apache 2.0.40 and php. I downloaded the latest php4 snapshot, compiled and installed it (a real PITA, but I managed), added LoadModule php4_module modules/libphp4.so and AddType application/x-httpd-php .php to httpd.conf, but my browser still doesn't show a php test page, it rather prompts for download. This is on Solaris 8, and AFAICT apache is configured for prefork. What did I miss? # ./bin/httpd -l Compiled in modules: core.c mod_access.c mod_auth.c mod_include.c mod_log_config.c mod_env.c mod_setenvif.c mod_ssl.c prefork.c http_core.c mod_mime.c mod_status.c mod_autoindex.c mod_asis.c mod_cgi.c mod_negotiation.c mod_dir.c mod_imap.c mod_actions.c mod_userdir.c mod_alias.c mod_so.c -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP and LDAP over SSL
I'm new to both PHP, LDAP and SSL so I'm really asking for direction on where to start. I have an OpenLDAP server on a Linux box, and a Microsoft ISS on Windows 2000 with PHP-scripting. I have made a couple of PHP scripts that access the LDAP database for reading and writing. All works fine so fare. I have installed a certificate on both the Web server and the LDAP server and moved to https communication between the client and the Web server, and now I want to move to SSL communication between the Web server and the LDAP server. I can make an ldap_connect with the ldaps://hostname/ parameter but what next: How can make an ldap_bind command? How can I encrypt and decrypt the data? How do I specify a key/certificate for encrypting and decrypting? Søren Henning Dalgaard -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] News Feeds....
Hi I'd like to get some news from any reputable news site, bbc.co.uk... yahoo.co.uk etc etc UK news would be best, if not then some hints to how to go about it would be much appreciated! TIA... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: PHP / Bulk Email
Hello, On 09/04/2002 08:05 AM, Andrew Cowles wrote: I ran a test recently sending emails to a list of clients (1000 or so) from a PHP / MySQL powered system. When sending via Sendmail this was VERY slow, taking several minutes to complete. When I switched over to Qmail the whole process takes only 10 or 15 seconds. Seems it's the MTA that causes the biggest overhead in the equation... and Qmail is so much nicer than Sendmail! That is because you have configured sendmail to send messages immediatly if possible. If you configure it to just queue the messages and not wait for having them delivered right away, it will pratically as fast as qmail because it will be doing as less. -- Regards, Manuel Lemos -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: PHP / Bulk Email
On 09/04/2002 07:52 AM, Dl Neil wrote: I ran a test recently sending emails to a list of clients (1000 or so) from a PHP / MySQL powered system. When sending via Sendmail this was VERY slow, taking several minutes to complete. When I switched over to Qmail the whole process takes only 10 or 15 seconds. Seems it's the MTA that causes the biggest overhead in the equation... and Qmail is so much nicer than Sendmail! IIRC it is also an area where the Windows implementation of PHP is superior (for a pleasant change) on a volume/performance basis (I read somewhere that this is because a stub SMTP service is included in the interface). I don't get where people get these ideas. Queuing messages to the local SMTP server as is done in PHP for Windows, is the slowest way to queue messages because it requires a TCP connection where each address has to be accepted individually by the SMTP server. This is very slow when compared with direct injection of messages in the mail queue which is what Unix MTAs do. There seems to be better ways to queue messages under Windows than just send them to the local SMTP server. -- Regards, Manuel Lemos -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] News Feeds....
Try www.moreover.com HTH Stas - Original Message - From: Brian McGarvie [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, September 04, 2002 1:52 PM Subject: [PHP] News Feeds Hi I'd like to get some news from any reputable news site, bbc.co.uk... yahoo.co.uk etc etc UK news would be best, if not then some hints to how to go about it would be much appreciated! TIA... -- 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] XML vs Everything Else
Rodrigo Dominguez wrote: I'm writting an application, a control panel for a web site, and it will be great if I can separe data from presentation, I know that I have to work with XML and XSL but I didn't understand how it works. Can you give me a simple example? Let guess that a client request index.php, and I have index.xml for the data, index.xsl for the data transformation and index.php, how it works? From the php manaul: ?php // Allocate a new XSLT processor $xh = xslt_create(); // Process the document if (xslt_process($xh, 'sample.xml', 'sample.xsl', 'result.xml')) { print SUCCESS, sample.xml was transformed by sample.xsl into result.xml; print , result.xml has the following contents\nbr\n; print pre\n; readfile('result.xml'); print /pre\n; } else { print Sorry, sample.xml could not be transformed by sample.xsl into; print result.xml the reason is that . xslt_error($xh) . and the ; print error code is . xslt_errno($xh); } xslt_free($xh); ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Please help with fresh fish.
Hello Rene, Thanks a lots. You already found the best PHP forum there is ;-) I believe so :-) Anh René moonen [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Anh wrote: Hello everyone, I would like to study PHP but do not have any experience about PHP or programming. Could you please give me some advice to begin such as books, news, forum... Many thanks in advance, Anh You already found the best PHP forum there is ;-) René -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Apache 2.0
Lars Hecking wrote: Hi all, I'm setting up a test server with Apache 2.0.40 and php. I downloaded the latest php4 snapshot, compiled and installed it (a real PITA, but I managed), added LoadModule php4_module modules/libphp4.so and AddType application/x-httpd-php .php to httpd.conf, but my browser still doesn't show a php test page, it rather prompts for download. Add the following to the bottom of your httpd.conf FilesMatch \.php$ SetOutputFilter PHP SetInputFilter PHP /FilesMatch HTH Erwin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Apache 2.0
Add the following to the bottom of your httpd.conf FilesMatch \.php$ SetOutputFilter PHP SetInputFilter PHP /FilesMatch No luck. error_log: [Wed Sep 04 15:01:44 2002] [notice] Apache/2.0.40 (Unix) mod_ssl/2.0.40 OpenSSL/0.9.6g PHP/4.3.0-dev configured -- resuming normal operations access_log: 10.1.65.81 - - [04/Sep/2002:15:01:51 +0100] GET /home/lhecking/test.php HTTP/1.1 304 0 Do I need to do something special to generally enable such filters? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] fun with register_globals
Hi folks, I might be late to the game with these questions, but I've just been bit by the register_globals=off situation. I'm trying to figure out the scope of what I need to change to accomodate register_globals=off, and I need some help. Looking around php.net, for example: 'If register_globals = on, the url http://www.example.com/test.php?id=3 will produce $id.' I can only assume with register globals being set to off, the reverse of this would be true. If so, how do I get the value of id in that case? Kelly
Re: [PHP] fun with register_globals
use $_GET[id] in the place of $id for each instance. Like if you had $new = $id + 1 change it to $new = $_GET[id] + 1 and such... Adam On Wed, 4 Sep 2002, Kelly Meeks wrote: Hi folks, I might be late to the game with these questions, but I've just been bit by the register_globals=off situation. I'm trying to figure out the scope of what I need to change to accomodate register_globals=off, and I need some help. Looking around php.net, for example: 'If register_globals = on, the url http://www.example.com/test.php?id=3 will produce $id.' I can only assume with register globals being set to off, the reverse of this would be true. If so, how do I get the value of id in that case? Kelly -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Help with inserting Flash into MySQL database
Right, but you need to insert your code block in a way that it is executed and then returns the name of a swf to load. Right now you are loading the client side object/embed tags that then calls another PHP file that returns the name or value of your SWF. You need to combine the two files and return the value of the SWF on the first parse so the filepath is there once the object/embed tags are rendered on the client side. I hope that makes sense, -- Mike -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] question
I have a php question. I would like to enter a while loop, but: I want it to be like this: when $a has a value, while $a... when $b has a value, while $b... (same statements as with $a) when $a has a value, and $b has a value, while $a and $b this is based on a search system in which the user can enter a, b or a and b. Can you help me with my problem, or help me find someone who can?! Thanks. Dore van Hoorn. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] question
Can you provide a bit more info??? Maybe a real life example of what you're trying to accomplish??? Richy == Richard Black Senior Developer, DataVisibility Ltd - http://www.datavisibility.com Tel: 0141 951 3481 Email: [EMAIL PROTECTED] -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: 04 September 2002 15:26 To: [EMAIL PROTECTED] Subject: [PHP] question I have a php question. I would like to enter a while loop, but: I want it to be like this: when $a has a value, while $a... when $b has a value, while $b... (same statements as with $a) when $a has a value, and $b has a value, while $a and $b this is based on a search system in which the user can enter a, b or a and b. Can you help me with my problem, or help me find someone who can?! Thanks. Dore van Hoorn. -- 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] question
Maybe try somthing like this, write a function containing all your like statements. function likeStatements( ){ //write your statements in this function if they are always the same. } //then have an if structure like the following that calls that function in a while loop. if ( isset($a) !isset($b) ){ while ($a){ likeStatements(); //you could also pass any needed info to the function. } }elseif( isset($b) !isset($a) ){ while ($b){ likeStatements(); } }elseif( isset($a) isset($b) ){ while ($a $b){ likeStatements(); } } HTH, Steve. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Wednesday, September 04, 2002 10:26 AM To: [EMAIL PROTECTED] Subject: [PHP] question I have a php question. I would like to enter a while loop, but: I want it to be like this: when $a has a value, while $a... when $b has a value, while $b... (same statements as with $a) when $a has a value, and $b has a value, while $a and $b this is based on a search system in which the user can enter a, b or a and b. Can you help me with my problem, or help me find someone who can?! Thanks. Dore van Hoorn. -- 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] Closing Frames...
How can I go about closing a Frame using PHP would this be possible considering that PHP is Server Side? I am assuming Frame closing is similar to Window closing (I am trying to avoid doing this in JavaScript in case someone has JavaScript disabled on their browser)... Thanks in advance... Spike... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Closing Frames...
Kondwani Spike Mkandawire wrote: How can I go about closing a Frame using PHP would this be possible considering that PHP is Server Side? I am assuming Frame closing is similar to Window closing (I am trying to avoid doing this in JavaScript in case someone has JavaScript disabled on their browser)... Closing frames and windows is done client side, so PHP can't do that. Besides, closing these things is done with Javascript, so you can't around it if you want to add this functionality. HTH Erwin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] How do I keep a page from caching in I.E
Hi, Using I.E. 5.5. I can't seem to keep a page from caching. When I click on the browser BACK button, I get the cached page so I have to click on Refresh to get the actual page content. I've placed the following at the top of the HTML file but it doesn't seem to do anything. Any help would be appreciated. ?PHP header(Expires: Mon, 26 Jul 1997 05:00:00 GMT); header(Last-Modified: . gmdate(D, d M Y H:i:s) . GMT); header(Cache-Control: no-store, no-cache, must-revalidate); header(Cache-Control: post-check=0, pre-check=0, false); header(Pragma: no-cache); ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] question
I'm not sure what do you want to do, but maybe this can help you: if($a == $value $b == $value) { //do something } elseif($a == $value $b != $value) { //... } elseif($a != $value $b == $value) { //... } else { //... } I hope this help Peace Love skitum - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, September 04, 2002 4:26 PM Subject: [PHP] question I have a php question. I would like to enter a while loop, but: I want it to be like this: when $a has a value, while $a... when $b has a value, while $b... (same statements as with $a) when $a has a value, and $b has a value, while $a and $b this is based on a search system in which the user can enter a, b or a and b. Can you help me with my problem, or help me find someone who can?! Thanks. Dore van Hoorn. -- 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] cyrillics
Hi, I just created a forum and now beta-testing it, I am having problems submitting entries written in cyrillics. It sort of recognizes cyrillics in textarea but recodes it so that it makes it unreadable, while in input text= name= it doesn't recognize cyrillics at all and acts as though no input has been made. If someone has had similar problems, please help. Thanks, Vlad
[PHP] String operation
Hi Given string1 = /home/web/ string2 = /home/web/www/index.php How can I elegantly do an exclusive or of string1 with string2, that is, I want to end up with string3 = www/index.php Thanks!
Re: [PHP] String operation
$string3 = str_replace($string1,'',$string2); ??? Op woensdag 04 september 2002 17:04, schreef Richard Fox: Hi Given string1 = /home/web/ string2 = /home/web/www/index.php How can I elegantly do an exclusive or of string1 with string2, that is, I want to end up with string3 = www/index.php Thanks! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: Betr: RE: [PHP] question
Where are you generating the query and fetching the row? And what are the queries being run? Possibly a better way to do the first bit would be as follows: $and = ; if ($itemname) { echo $n.nbsp;.$name./font; $and = and ; } if ($itemcolor) { echo $and.$c.nbsp;.$color./font; } (I've condensed the multiple echo statements into one to reduce the number of lines, but this is more about the logic) Depending on what your query is searching on and returning, you may be able to do it in a single query. HTH, Richy == Richard Black Senior Developer, DataVisibility Ltd - http://www.datavisibility.com Tel: 0141 951 3481 Email: [EMAIL PROTECTED] -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: 04 September 2002 15:41 To: Richard Black Subject: Betr: RE: [PHP] question if ($gevonden = 1) { echo nbsp;bThe search for ; if ($itemname) { echo $n; echo nbsp;; echo $name; echo /font; } if ($itemcolor) { if ($itemname) { echo and ; } echo $c; echo nbsp;; echo $color; echo /font; } echo delivers the following results/bp/; } so the above if statements handle the same problem. if $itemname has a value, print $n and $name if $itemcolor has a value, print $c and $color if $itemcolor has a value and $itemname has a value, the following will be printed: $n $name and $c $color After this if statement, a while statement is entered: while ($myrow = mysql_fetch_row($itemname)) { a lot of echo's } but what if, itemname is empty, but itemcolor is not. or what to do if both have a value?! I hope this explanes my problem more clearly!? Dore van Hoorn. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] LOC counters
Hi, Firstly, please resist the opportunity to flame I'm looking for a PHP (among other things) Line Of Code counter. Has anyone used any descent ones? I was thinking of writing one myself, but, if there are others available, I might as well save the time. There is much debate over the appropriateness of LOC as a measurement, I have chewed up a lot of time with discussion over this so I'm not going to bite this time :) Thanks, Todd. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] LOC counters
Todd Pasley wrote: Hi, Firstly, please resist the opportunity to flame I'm looking for a PHP (among other things) Line Of Code counter. Has anyone used any descent ones? I was thinking of writing one myself, but, if there are others available, I might as well save the time. There is much debate over the appropriateness of LOC as a measurement, I have chewed up a lot of time with discussion over this so I'm not going to bite this time :) I like this quick and dirty solution which doesn't count lines with just braces or just whitespace. nor does it count C++ style comment lines. I have it in my .bashrc file: alias countcode='cat *.inc */*.inc */*/*.inc */*/*/*.inc */*/*/*/*.inc */*/*/*/*/*.inc */*/*/*/*/*/*.inc */*/*/*/*/*/*/*.inc | grep -v '\''^[[:space:]]*$'\'' | grep -v '\''^[[:space:]]*[{}][[:space:]]*$'\'' | grep -v '\''^[[:space:]]*//'\'' | grep -v '\''^?//'\'' | grep -c '\''.*'\''' Then from my linux command line I just type countcode. And yes I know I could have come up with something better than */*/*/..., but like I said QUICK AND DIRTY :) 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
[PHP] Re: How do I keep a page from caching in I.E
Hi, Donpro wrote: Hi, Using I.E. 5.5. I can't seem to keep a page from caching. When I click on Have you read HOWTO: Prevent Caching in Internet Explorer? http://support.microsoft.com/default.aspx?scid=kb;EN-US;q234067 the browser BACK button, I get the cached page so I have to click on Refresh to get the actual page content. I've placed the following at the top of the HTML file but it doesn't seem to do anything. Any help would be appreciated. Victor. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: XML vs Everything Else
Spend some time learning about xml and you won't regret it Could you (or anyone else on the list) recommend some good resources (Books / Websites) for learning XML and XSLT? Thanks, Javier _ MSN Photos is the easiest way to share and print your photos: http://photos.msn.com/support/worldwide.aspx -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: XML vs Everything Else
Javier Montserat wrote: Spend some time learning about xml and you won't regret it Could you (or anyone else on the list) recommend some good resources (Books / Websites) for learning XML and XSLT? Thanks, Javier http://www.devshed.com/Server_Side/XML http://www.xml.com (look for the essentials articles on the left) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] xml to mysql
Hi, Is there a way to create a DB from a xml file or it's better to use the xml file for DB, i have lot of files so i think a DB will be better. If you know a program or tutorial let me know. thanx. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Project Suggestions
I have a project that I need some help/suggestions on (actually, it's been there for over 3 years now, I just never addressed it.) I need to, somehow, make our company website easier. When I say easier, I'm referring to how data gets posted on it. 90% of all of our pages contain prices for our products/services. A typical product/service page would consist of three main elements: - a description of said product/service - a price matrix - comments, notes and other pertinent information Some products are listed together right now and this will change (I will be listing everything on its own page, makes it easier to maintain later.) The price matrix varies by product/service. Some are small (a few columns, few rows), others are massive. I could possibly break down the comments section as well into smaller pieces (service time, notes, links to related services, etc., etc.), but for now these are the three main parts I will concentrate on. Right now, we have well over 500 pages of static information, and it gets to be a real pain whenever things get updated, or we change our products/services (some disappear, new one get added.) Things I want to do: - convert this site into a dynamic one, where I can very easily change the layout of things whenever it comes time to revamp the site into a new design. - insert all the products, their prices and related data into a database (which would tie in with the above item, maybe by means of functions, say, 'function show_product('inkjet_prints')' and have it create a page to present) - make it so that those responsible for price changes can make their own changes to the database, so I don't have to deal with it every time. I suspect many of you will tell me to use phpMyAdmin for the latter, however I need to keep in mind that these people are illiterate, and trying to teach them how to use something is like teaching a cat how to use the toilet (and even that has better success.) So, I would prefer some other method. Maybe a form page that has everything on it (top field for description, bunch of little input fields for the price matrix, and the stuff at the end), however I don't know how efficient that would be, specially on large matrices. I'd like to hear from people with some real life experience doing this. My whole issue with wanting to do this now is because of health issues. I'm trying to cut back on the amount of work I need to do. For those wanting to browse and see what kind of structure I have to deal with now, feel free. The site is listed in my signature. -- W | I haven't lost my mind; it's backed up on tape somewhere. + Ashley M. Kirchner mailto:[EMAIL PROTECTED] . 303.442.6410 x130 IT Director / SysAdmin / WebSmith . 800.441.3873 x130 Photo Craft Laboratories, Inc.. 3550 Arapahoe Ave. #6 http://www.pcraft.com . . .. Boulder, CO 80303, U.S.A. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: XML vs Everything Else
http://www.w3schools.com/xml/default.asp has some tutorials.. It helped me understand the basics of XML and what it can be used for.. They also have some XSL(T) information and tutorials (http://www.w3schools.com/xsl/default.asp) as well.. Take care.. peace.. eriol Javier Montserat [EMAIL PROTECTED] disgorged: : Could you (or anyone else on the list) recommend some good resources (Books : / Websites) for learning XML and XSLT? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] question
while($a) { [statments] } while($b) { [statments] } while($c) { [statments] } or while(isset($a)) { [statments] } while(isset($b)) { [statments] } while(isset($c)) { [statments] } would both work well depending on your particular situation -Original Message- From: Richard Black [mailto:[EMAIL PROTECTED]] Sent: Wednesday, September 04, 2002 7:32 AM To: [EMAIL PROTECTED]; Php-General Subject: RE: [PHP] question Can you provide a bit more info??? Maybe a real life example of what you're trying to accomplish??? Richy == Richard Black Senior Developer, DataVisibility Ltd - http://www.datavisibility.com Tel: 0141 951 3481 Email: [EMAIL PROTECTED] -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: 04 September 2002 15:26 To: [EMAIL PROTECTED] Subject: [PHP] question I have a php question. I would like to enter a while loop, but: I want it to be like this: when $a has a value, while $a... when $b has a value, while $b... (same statements as with $a) when $a has a value, and $b has a value, while $a and $b this is based on a search system in which the user can enter a, b or a and b. Can you help me with my problem, or help me find someone who can?! Thanks. Dore van Hoorn. -- 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] XML vs Everything Else
On Tue, 3 Sep 2002, Geoff Hankerson wrote: Spend some time learning about xml and you won't regret it Sorry for the off topic, but in fact XML is not that hard to learn, it's just custom markup that needs to follow certain rules. The important part is the parser or the program logic to work with the XML documents, IMHO. Sorry again. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Caching Problem
Hi I have a problem with caching on IE 5.1.4 on Mac Os X. (PHP 4.0.5) The page I want to use is a simple file upload page that works by: ?php if ($HTTP_POST_VARS['submit'] == submit) { then upload the file... } ? Rest of document. The form action returns to the same page (to allow you to upload another file). This works fine, but if you press the refresh btn, the file keeps uploading pictures. If you click in the address bar press return, this does not happen. I have included the http headers to prevent caching as described in the documentation, but this hasn't seemed to work. Is this a quirk of the browser/os combination or is there something i'm missing. TIA Roland -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Caching Problem
Hi, Roland, There might be a better way to do this, but you could try to use the header() function after your upload takes place to redirect the browser to the same page, using GET. Something like... ?php if ($HTTP_POST_VARS['submit'] == submit) { then upload the file... header(Location: http://.$_SERVER['HTTP_HOST'].$_SERVER['PHP_SELF'].); } ? Or something like that. HTH, Jed On the threshold of genius, Roland Swingler wrote: Hi I have a problem with caching on IE 5.1.4 on Mac Os X. (PHP 4.0.5) The page I want to use is a simple file upload page that works by: ?php if ($HTTP_POST_VARS['submit'] == submit) { then upload the file... } ? Rest of document. The form action returns to the same page (to allow you to upload another file). This works fine, but if you press the refresh btn, the file keeps uploading pictures. If you click in the address bar press return, this does not happen. I have included the http headers to prevent caching as described in the documentation, but this hasn't seemed to work. Is this a quirk of the browser/os combination or is there something i'm missing. TIA Roland -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Caching Problem
Use header(Location: page.php); to redirect the browser, you should allways do it after a post that changes or adds or deletes some data on the server. Roland Swingler wrote: Hi I have a problem with caching on IE 5.1.4 on Mac Os X. (PHP 4.0.5) The page I want to use is a simple file upload page that works by: ?php if ($HTTP_POST_VARS['submit'] == submit) { then upload the file... } ? Rest of document. The form action returns to the same page (to allow you to upload another file). This works fine, but if you press the refresh btn, the file keeps uploading pictures. If you click in the address bar press return, this does not happen. I have included the http headers to prevent caching as described in the documentation, but this hasn't seemed to work. Is this a quirk of the browser/os combination or is there something i'm missing. TIA Roland -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Caching Problem
Oops. There was an extra period at the end there (after PHP_SELF). ?php if ($HTTP_POST_VARS['submit'] == submit) { then upload the file... header(Location: http://.$_SERVER['HTTP_HOST'].$_SERVER['PHP_SELF']); } ? On the threshold of genius, Jed Verity wrote: Hi, Roland, There might be a better way to do this, but you could try to use the header() function after your upload takes place to redirect the browser to the same page, using GET. Something like... ?php if ($HTTP_POST_VARS['submit'] == submit) { then upload the file... header(Location: http://.$_SERVER['HTTP_HOST'].$_SERVER['PHP_SELF'].); } ? Or something like that. HTH, Jed On the threshold of genius, Roland Swingler wrote: Hi I have a problem with caching on IE 5.1.4 on Mac Os X. (PHP 4.0.5) The page I want to use is a simple file upload page that works by: ?php if ($HTTP_POST_VARS['submit'] == submit) { then upload the file... } ? Rest of document. The form action returns to the same page (to allow you to upload another file). This works fine, but if you press the refresh btn, the file keeps uploading pictures. If you click in the address bar press return, this does not happen. I have included the http headers to prevent caching as described in the documentation, but this hasn't seemed to work. Is this a quirk of the browser/os combination or is there something i'm missing. TIA Roland -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] xml to mysql
Hi, Virtuoso http://www.openlinksw.com/virtuoso can do the opposite - represent tables and SQL queries, either from relational data in Virtuoso or another back-end database (including MySQL and all the usual suspects) and provide an XML document in real time for PHP to use. Virtuoso Universal Server is available as a free download - let me know what you think. Best regards, Andrew Hill Director of Technology Evangelism OpenLink Software http://www.openlinksw.com Universal Data Access Virtuoso Universal Server -Original Message- From: DtM [mailto:[EMAIL PROTECTED]] Sent: Wednesday, September 04, 2002 11:28 AM To: [EMAIL PROTECTED] Subject: [PHP] xml to mysql Hi, Is there a way to create a DB from a xml file or it's better to use the xml file for DB, i have lot of files so i think a DB will be better. If you know a program or tutorial let me know. thanx. -- 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] Help with inserting Flash into MySQL database
I don't thin I understand that... :) Can you give me an example. Or if I understand correctly, I have to use interface, a .swf file (caled with object tags) and this .swf file have to get information (data form database) throught .php file...? -- Lp, Mitja Mike Krisher [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Right, but you need to insert your code block in a way that it is executed and then returns the name of a swf to load. Right now you are loading the client side object/embed tags that then calls another PHP file that returns the name or value of your SWF. You need to combine the two files and return the value of the SWF on the first parse so the filepath is there once the object/embed tags are rendered on the client side. I hope that makes sense, -- Mike -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] php mysql error
Our box recently went down and after reconfiguring it we're left with a semi-operation mySQL. One error I'm getting is this: mysql select region from clip_art where region is not null and released = 'yes' group by region; ERROR 1: Can't create/write to file '/tmp/#sqld0e_76_1.MYI' (Errcode: 13) Removing the group by clause prevents the error. Can anybody tell me how to fix this? Thank you. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php mysql error
whats the permissions on /tmp? it should be set to 1777 Adam On Wed, 4 Sep 2002, ROBERT MCPEAK wrote: Our box recently went down and after reconfiguring it we're left with a semi-operation mySQL. One error I'm getting is this: mysql select region from clip_art where region is not null and released = 'yes' group by region; ERROR 1: Can't create/write to file '/tmp/#sqld0e_76_1.MYI' (Errcode: 13) Removing the group by clause prevents the error. Can anybody tell me how to fix this? Thank you. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] php mysql error
[snip] Our box recently went down and after reconfiguring it we're left with a semi-operation mySQL. One error I'm getting is this: mysql select region from clip_art where region is not null and released = 'yes' group by region; ERROR 1: Can't create/write to file '/tmp/#sqld0e_76_1.MYI' (Errcode: 13) Removing the group by clause prevents the error. [/snip] Using perror 13 I get; root@myserver:/var/www/htdocs# perror 13 Error code 13: Permission denied So perhaps /tmp/ or #sqld0e_76_1.MYI has the wrong permissions HTH! Jay -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Apache 2.0
No luck. error_log: [Wed Sep 04 15:01:44 2002] [notice] Apache/2.0.40 (Unix) mod_ssl/2.0.40 OpenSSL/0.9.6g PHP/4.3.0-dev configured -- resuming normal operations access_log: 10.1.65.81 - - [04/Sep/2002:15:01:51 +0100] GET /home/lhecking/test.php HTTP/1.1 304 0 Found the problem: following the PHP INSTALL document, I put php.ini into $prefix/lib. But I was using the --with-config-file-path configure option to search for it in apache's conf directory (I'm using the same meta- configure script for php across all servers - why I set the conf file path up like this in the first place, I can't remember). Sorry for bothering everyone :) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php mysql error
Check file and drectory permisions. ROBERT MCPEAK wrote: Our box recently went down and after reconfiguring it we're left with a semi-operation mySQL. One error I'm getting is this: mysql select region from clip_art where region is not null and released = 'yes' group by region; ERROR 1: Can't create/write to file '/tmp/#sqld0e_76_1.MYI' (Errcode: 13) Removing the group by clause prevents the error. Can anybody tell me how to fix this? Thank you. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] How do I get milliseconds?
Using the following code, date(His) I get the hours, minutes and seconds. Is there a way to extend this so that I get the milliseconds too? Thanks, Don -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] How do I get milliseconds?
[snip] Using the following code, date(His) I get the hours, minutes and seconds. Is there a way to extend this so that I get the milliseconds too? [/snip] $ms = (date(s)/1000); I don't think that there is a method to return it. I looked through php.net (searched millisecond and milliseconds) and found some things which might point you in the right direction. HTH! Jay * * Texas PHP Developers Conf Spring 2003* * T Bar M Resort Conference Center* * New Braunfels, Texas * * Contact [EMAIL PROTECTED] * * * * Want to present a paper or workshop? Contact now! * * -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] XML doubt
I don't know how to work with XML... I know that it's a good standard to pass information between computer or applications, but I don't know how to separe my data from my presentation on my PHP projects. I always use OOP, I organize all the data in databases and clases, but I always have to put some code on my presentation files, like index.php, viewstock.php, and it will be great if I can organize my projects so the presentation can be handled by any designersm, at this time I always have to make the changes on the presentation files because I am the one who know about PHP. Can you give some example about how to separate the data from the presentation using XML and databases? Or can you tell me about a project where I can see it? Thank you. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] How do I get milliseconds?
[snip] [snip] Using the following code, date(His) I get the hours, minutes and seconds. Is there a way to extend this so that I get the milliseconds too? [/snip] $ms = (date(s)/1000); I don't think that there is a method to return it. I looked through php.net (searched millisecond and milliseconds) and found some things which might point you in the right direction. [/snip] Have a look at http://www.php.net/manual/en/printwn/function.microtime.php HTH! Jay * * Texas PHP Developers Conf Spring 2003* * T Bar M Resort Conference Center* * New Braunfels, Texas * * Contact [EMAIL PROTECTED] * * * * Want to present a paper or workshop? Contact now! * * -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] How do I get milliseconds?
microtime(); will return microseconds. That is not milliseconds, but it may or may not solve your problem. I don't think there is a way to get milliseconds. -Jackson On Wed, 2002-09-04 at 14:47, DonPro wrote: Using the following code, date(His) I get the hours, minutes and seconds. Is there a way to extend this so that I get the milliseconds too? Thanks, Don -- 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] simple problem
what would be the best, most efficient way to print something every three times a loop runs for ($i=0; $i$num_products; $i++) { echo something; } this happens every time it runs and has to stay that way but every three times i want to print additional info. Any help appreciated. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: simple problem
add the following: if( $i % 3 == 0 ) { print(something else); } You might need to vary the zero in that equation to get it to print at the right time by which I mean, the above will print something else on the first iteration of the below loop. -philip On Wed, 4 Sep 2002, Cirkit Braker wrote: what would be the best, most efficient way to print something every three times a loop runs for ($i=0; $i$num_products; $i++) { echo something; } this happens every time it runs and has to stay that way but every three times i want to print additional info. Any help appreciated. -- 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 problem
Inside the loop do: if(!($i%3)) { whatever } -Rasmus On Wed, 4 Sep 2002, Cirkit Braker wrote: what would be the best, most efficient way to print something every three times a loop runs for ($i=0; $i$num_products; $i++) { echo something; } this happens every time it runs and has to stay that way but every three times i want to print additional info. Any help appreciated. -- 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] XML doubt
Rodrigo Dominguez wrote: I don't know how to work with XML... I know that it's a good standard to pass information between computer or applications, but I don't know how to separe my data from my presentation on my PHP projects. I always use OOP, I organize all the data in databases and clases, but I always have to put some code on my presentation files, like index.php, viewstock.php, and it will be great if I can organize my projects so the presentation can be handled by any designersm, at this time I always have to make the changes on the presentation files because I am the one who know about PHP. Can you give some example about how to separate the data from the presentation using XML and databases? Or can you tell me about a project where I can see it? Thank you. 1. Convert sql queries into xml (I'm glad to send a copy of my class if you'd like) basically its: A. Loop over query as you normally would B. Loop through each column in a record for a query and make an xml compatible string like: record fieldname value /fieldname /record 2. Then just follow the xslt section of the php manual it's pretty straight forward Give it a shot, if you have trouble send specific questions to the list I and quite a few other will be glad to help -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] simple problem
if ($i%3 = 0) { echo something; } On Wed, 4 Sep 2002, Cirkit Braker wrote: what would be the best, most efficient way to print something every three times a loop runs for ($i=0; $i$num_products; $i++) { echo something; } this happens every time it runs and has to stay that way but every three times i want to print additional info. Any help appreciated. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: simple problem
Hi, On every loop, just put the text you want to add to a variable. like if($i == 0) echo first print; elseif($i == 1) echo second; elseif($i == 2) echo third; etc... -- Nicos - CHAILLAN Nicolas [EMAIL PROTECTED] www.WorldAKT.com - Hébergement de sites Internet Cirkit Braker [EMAIL PROTECTED] a écrit dans le message de news: [EMAIL PROTECTED] what would be the best, most efficient way to print something every three times a loop runs for ($i=0; $i$num_products; $i++) { echo something; } this happens every time it runs and has to stay that way but every three times i want to print additional info. Any help appreciated. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] XML doubt
Forgot a step: (1C) make an xslt stylesheet which is basically just a beefed-up html page. Check out devshed.cm xml.com and w3c.org for info on xslt stlyesheets Geoff Hankerson wrote: Rodrigo Dominguez wrote: I don't know how to work with XML... I know that it's a good standard to pass information between computer or applications, but I don't know how to separe my data from my presentation on my PHP projects. I always use OOP, I organize all the data in databases and clases, but I always have to put some code on my presentation files, like index.php, viewstock.php, and it will be great if I can organize my projects so the presentation can be handled by any designersm, at this time I always have to make the changes on the presentation files because I am the one who know about PHP. Can you give some example about how to separate the data from the presentation using XML and databases? Or can you tell me about a project where I can see it? Thank you. 1. Convert sql queries into xml (I'm glad to send a copy of my class if you'd like) basically its: A. Loop over query as you normally would B. Loop through each column in a record for a query and make an xml compatible string like: record fieldname value /fieldname /record 2. Then just follow the xslt section of the php manual it's pretty straight forward Give it a shot, if you have trouble send specific questions to the list I and quite a few other will be glad to help -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: simple problem
Sorry I hadn't read well, yes use if(!($i %3)) echo lala; -- Nicos - CHAILLAN Nicolas [EMAIL PROTECTED] www.WorldAKT.com - Hébergement de sites Internet [EMAIL PROTECTED] a écrit dans le message de news: [EMAIL PROTECTED] Hi, On every loop, just put the text you want to add to a variable. like if($i == 0) echo first print; elseif($i == 1) echo second; elseif($i == 2) echo third; etc... -- Nicos - CHAILLAN Nicolas [EMAIL PROTECTED] www.WorldAKT.com - Hébergement de sites Internet Cirkit Braker [EMAIL PROTECTED] a écrit dans le message de news: [EMAIL PROTECTED] what would be the best, most efficient way to print something every three times a loop runs for ($i=0; $i$num_products; $i++) { echo something; } this happens every time it runs and has to stay that way but every three times i want to print additional info. Any help appreciated. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] How do I get milliseconds?
If you are looking for milliseconds on the current time, see the examples on microtime(): http://www.php.net/manual/en/function.microtime.php Here is a summary of how to get milliseconds: list($usec, $sec) = explode( ,microtime()); $milliseconds = (((float)$usec/1000) + (float)$sec); I haven't tested this out, but it looks right. Michael phpzen Richardson -Original Message- From: DonPro [mailto:[EMAIL PROTECTED]] Sent: Wednesday, September 04, 2002 11:47 AM To: php list Subject: [PHP] How do I get milliseconds? Using the following code, date(His) I get the hours, minutes and seconds. Is there a way to extend this so that I get the milliseconds too? Thanks, Don -- 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/XML (Validation)
Hello, From reading the docs on XML functions for PHP, I understand that validation is not included. Does any one know where there is a package for PHP that is already developed or resources where I can learn how to do this myself? Thank you. -Samuel
RE: [PHP] Project Suggestions
Things I want to do: - convert this site into a dynamic one, where I can very easily change the layout of things whenever it comes time to revamp the site into a new design. I have not worked with any of the templating systems, but here is a home-grown one. Separate the page HTML into 3 pieces. Two of the pieces form the shell, which is the HTML that is constant across groups of pages. The third piece is the HTML that varies with each page. Build the two shell files so that they form an empty td, into which the dynamic piece goes: ? include(htmlShellHead.inc); buildCurrentPage(); // or another include() include(htmlShellFoot.inc); ? Then, if you need to add a right-hand sidebar, for example, you just edit the shell files, and all the pages using that shell get updated at once. Simple way to update the look and feel across the whole site. - insert all the products, their prices and related data into a database (which would tie in with the above item, maybe by means of functions, say, 'function show_product('inkjet_prints')' Sounds good. - make it so that those responsible for price changes can make their own changes to the database, so I don't have to deal with it every time. Making your own forms is probably best. We have done this with Java applets, which may be overkill for you. The main thing to think about here is authentication: making sure people can access only their own data and nobody else's. Also, make sure everyone involved shares a clear idea of who bears responsibility for update mistakes. If the user has the ability to change their data, they have the ability to screw it up. Make a clear oversight plan: how much reviewing of their changes you will do before the changes go live, etc. Good luck! Kirk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Project Suggestions
Johnson, Kirk wrote: The main thing to think about here is authentication: making sure people can access only their own data and nobody else's. Also, make sure everyone involved shares a clear idea of who bears responsibility for update mistakes. If the user has the ability to change their data, they have the ability to screw it up. Only three people will ever get to do these updates, and I'm one of them. Make a clear oversight plan: how much reviewing of their changes you will do before the changes go live, etc. Zip, none, no reviewing at all. At least, not from my part. They get to do their own damned reviewing, and if they screw up, being that they're the president and VP, they get to deal with the customer, not me. Not customer service. -- W | I haven't lost my mind; it's backed up on tape somewhere. + Ashley M. Kirchner mailto:[EMAIL PROTECTED] . 303.442.6410 x130 IT Director / SysAdmin / WebSmith . 800.441.3873 x130 Photo Craft Laboratories, Inc.. 3550 Arapahoe Ave. #6 http://www.pcraft.com . . .. Boulder, CO 80303, U.S.A. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] LDAP Authentication problem
I'm trying to retrieve information from an NDS server using LDAP functions in PHP 4.06. I am able to establish the connection and bind to the server using an anonymous bind, but when I try to bind as a valid user, the app seems to run in an infinite loop. I'm not sure where to look for the cause of this problem. Any suggestions would be appreciated. Thanks in advance, Brad -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] check for a number
I am using substr($f, 0, 1); to get the first character of a string but what to be able to tell if the first character is a digit or a letter is there a way to do this?
RE: [PHP] check for a number
is_int($f) will return true if $f is an integer, false otherwise. Check http://www.php.net/manual/en/function.is-int.php HTH, Steve. -Original Message- From: Fifield, Mike [mailto:[EMAIL PROTECTED]] Sent: Wednesday, September 04, 2002 4:04 PM To: [EMAIL PROTECTED] Subject: [PHP] check for a number I am using substr($f, 0, 1); to get the first character of a string but what to be able to tell if the first character is a digit or a letter is there a way to do this? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] check for a number
I am using substr($f, 0, 1); to get the first character of a string but what to be able to tell if the first character is a digit or a letter is there a way to do this? ereg( ^[0-9], $f ) will let you know if the first character is a digit or not... Chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: check for a number
Hi, if(is_numeric($return = substr($f, 0, 1))) etc... You can look at the manual to get the list of the is_() functions: is_array is_bool is_callable is_double is_float is_int is_integer is_long is_null is_numeric is_object is_real is_resource is_scalar is_string etc. -- Nicos - CHAILLAN Nicolas [EMAIL PROTECTED] www.WorldAKT.com - Hébergement de sites Internet Mike Fifield [EMAIL PROTECTED] a écrit dans le message de news: [EMAIL PROTECTED] I am using substr($f, 0, 1); to get the first character of a string but what to be able to tell if the first character is a digit or a letter is there a way to do this? begin 666 box-0.gif M1TE.#EAP`'`(#_`,# P ```'Y! $`+ `+```0 (-A(\6FAK? )HI0+U/1@*@`[ ` end begin 666 box-1.gif M1TE.#EAP`'`(#_`,# P ```'Y! $`+ `+```0 (,A(\6ZGL (HI2LNH*`#L` ` end -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] multiple keywords in search boxes
Hi, What is the necessary code to return a recordset from a single text box with more than one keyword in it (like most search engines do)? Thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] sorting array question
Hi Javier, I think parsing the listing into a multidemensional array is the answer. But actually, I do not yet know how that would look like in PHP. But I can give you an example of how it is done in ActionScript (Ecmascript). file_arr[n] = [name, date] Now you can sort file_arr by file_arr[n][0] (name) or file_arr[n][1] (date). Hope it helps, Timo Am Dienstag den, 3. September 2002, um 12:27, schrieb Javier Montserat: i have the following code which reads a list of files from a directory - $listcmd = ls .$dirPath; $temp = exec($listcmd, $listoffiles, $status); if($status == 0) { for ($i =0; $i sizeof($listoffiles); $i++) { $this-fileName[$i] = $listoffiles[$i]; $this-sizeofFile[$i] = sprintf(%01.2f, (filesize($dirPath./.$listoffiles[$i])/1024)/1024); $this-fileDate[$i] = date(d-M-y H:i, filemtime($dirPath./.$listoffiles[$i])); } $this-displayFiles(); What I want to do is display the files sorted by date. Okay, so I've just realised that the really easy way to do this is by adding -St (sort by time) to the ls command... $listcmd = ls -St .$dirPath; But how could this be achieved by sorting the three arrays? What if I alternately wanted to sort the files by name, size or date without re-reading the directory each time? Would an associative array structure be better suited to this type of operation? Thanks for your insight, Javier _ Chat with friends online, try MSN Messenger: http://messenger.msn.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] continuation to the ftp story
Hi Victor, the error code (you are currently suppressing) should give you some directions. Timo -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] multiple keywords in search boxes
Jason wrote: Hi, What is the necessary code to return a recordset from a single text box with more than one keyword in it (like most search engines do)? Thanks This is basic, and syntax is not checked... if( is_array( ($words = split( '[[:space:]]+', $GET['keywordInput'] )) ) count( $words ) 0 ) { // // Initialize query. // $qString = 'SELECT xx, yy, .. FROM foo_table ' .'WHERE '; // // Create condition clause from word list. // foreach( $words as $word ) { $qString .= zz LIKE '%.addSlashes( $word ).% AND ; } // // Trim the extraneous AND. // $qString = substr( $qString, whatever goes here to trim AND ); // // Perform query. // } -- .-. | 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] XML doubt
Ok, thank you just one more doubt Is it threading safe? For example: At 13:30:10 [Proccess 1] cliente request index.php At 13:30:11 [Proccess 1] index.php is putting the content of the querey into index.xml At 13:30:12 [Proccess 2]a new client request index.php At 13:30:13 [Proccess 2]a new instance of index.php is invoked and it starts to put the content of the query into index.xml, but [Proccess 1] is still working with index.xml What happends? Geoff Hankerson [EMAIL PROTECTED] escribió en el mensaje [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Forgot a step: (1C) make an xslt stylesheet which is basically just a beefed-up html page. Check out devshed.cm xml.com and w3c.org for info on xslt stlyesheets Geoff Hankerson wrote: Rodrigo Dominguez wrote: I don't know how to work with XML... I know that it's a good standard to pass information between computer or applications, but I don't know how to separe my data from my presentation on my PHP projects. I always use OOP, I organize all the data in databases and clases, but I always have to put some code on my presentation files, like index.php, viewstock.php, and it will be great if I can organize my projects so the presentation can be handled by any designersm, at this time I always have to make the changes on the presentation files because I am the one who know about PHP. Can you give some example about how to separate the data from the presentation using XML and databases? Or can you tell me about a project where I can see it? Thank you. 1. Convert sql queries into xml (I'm glad to send a copy of my class if you'd like) basically its: A. Loop over query as you normally would B. Loop through each column in a record for a query and make an xml compatible string like: record fieldname value /fieldname /record 2. Then just follow the xslt section of the php manual it's pretty straight forward Give it a shot, if you have trouble send specific questions to the list I and quite a few other will be glad to help -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] limit in a loop function to prevent server load
Hi Electroteque, Am Dienstag den, 3. September 2002, um 10:14, schrieb Bas Jobsen: hi there i was wondering if there was a way to limit the ammount of items in a loop to execute sleep then execute the rest of the items to prevent server load ? for($i=0;...) { if($i0$i%100==0)sleep(10); } I think for($i=0; $i100;$i++){ // do something sleep(1); }; makes more sense. If that is already to much sleep: $sleepinterval = 10; $s = $sleepinterval; for ($i=0; $i100;$i++) { // do something if (!$s--) {sleep(1);$s = $sleepinterval;}; }; On every 10th (or whatever you define as $sleepinterval) iteration, the interpreter will sleep for a second. But this still aint a sophisticated load balancing :-) Timo -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] phpdoc CHM 9th sample out
Hi! For those Windows users who are interested in a useable help system, the 9th sample of our new CHM edition is out at http://weblabor.hu/php-doc-chm It includes a workaround for the most annoying IE6 bug we ever met (thanks to Brendan for the tips!), and also simplifies skin switching. For those who beta tested the sample, this is the same file, no need to download it again. Goba -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] post doesn't work?
I have a form that posts to another php file. But it won't display the var? It just shows a blank screen. For example test.php has form input name test2.php prints name On test2.php it shows a blank screen, but if I assign $name on test2.php and reload, it will print the var. Is there something in the php.ini that I have to change to get vars to post? or some setting somewhere else? -Matt -- Matt Zur [EMAIL PROTECTED] http://www.zurnet.com Need a Web Site??? - Visit... www.zurnet.com 1997 - 2002 - 5th Anniversary!!! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: post doesn't work?
If you have register globals off, you must use $_POST['name'] and not $name. Check your php.ini (? phpinfo(); ?) -- Nicos - CHAILLAN Nicolas [EMAIL PROTECTED] www.WorldAKT.com - Hébergement de sites Internet Matt Zur [EMAIL PROTECTED] a écrit dans le message de news: [EMAIL PROTECTED] I have a form that posts to another php file. But it won't display the var? It just shows a blank screen. For example test.php has form input name test2.php prints name On test2.php it shows a blank screen, but if I assign $name on test2.php and reload, it will print the var. Is there something in the php.ini that I have to change to get vars to post? or some setting somewhere else? -Matt -- Matt Zur [EMAIL PROTECTED] http://www.zurnet.com Need a Web Site??? - Visit... www.zurnet.com 1997 - 2002 - 5th Anniversary!!! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: post doesn't work?
Didn't seem to fix it. -Matt [EMAIL PROTECTED] wrote: If you have register globals off, you must use $_POST['name'] and not $name. Check your php.ini (? phpinfo(); ?) -- Nicos - CHAILLAN Nicolas [EMAIL PROTECTED] www.WorldAKT.com - Hébergement de sites Internet Matt Zur [EMAIL PROTECTED] a écrit dans le message de news: [EMAIL PROTECTED] I have a form that posts to another php file. But it won't display the var? It just shows a blank screen. For example test.php has form input name test2.php prints name On test2.php it shows a blank screen, but if I assign $name on test2.php and reload, it will print the var. Is there something in the php.ini that I have to change to get vars to post? or some setting somewhere else? -Matt -- Matt Zur [EMAIL PROTECTED] http://www.zurnet.com Need a Web Site??? - Visit... www.zurnet.com 1997 - 2002 - 5th Anniversary!!! -- Matt Zur [EMAIL PROTECTED] http://www.zurnet.com Need a Web Site??? - Visit... www.zurnet.com 1997 - 2002 - 5th Anniversary!!! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php