[PHP] afraid !
Hi! i've just joined ur mailing list! i used to work on asp with oracle and access! i'm working on windont NT but i want to publish my site at a provider that has linux? do i have to change my code for that ? do u know any provider that accepts acces and mysql with php4? i'm afraid of using mysql with php cause i'm in hurry and that i discovered that mysql interface is not as good and easy as of oracle and access! is it true that if i want to insert data to a table i have to do it from the commend line? Thanks a lot _ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] PHP Framework
How does Smarty compare with PHP FAST Template?? - Original Message - From: "Danny Shepherd" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, February 03, 2003 2:51 PM Subject: Re: [PHP] PHP Framework > Well, Yahoo! have moved/are moving to Smarty and they get a few million > views a day. > > The killer part with smarty is that it converts the Smarty tags, in your > template, to real PHP code - that's what makes it so fast. It's also very > easy to extend. > > Danny. > > > - Original Message - > From: "John Wards" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Monday, February 03, 2003 2:41 PM > Subject: Re: [PHP] PHP Framework > > > On Monday 03 Feb 2003 2:01 pm, karthikeyan.balasubramanian wrote: > > Hi All, > > > > I finally decided to upgrade my PHP. Just want to know your thoughts on > > which Framework is the best with a clear seperation of content from > > presentation. > > > > Please let me know which do you think is the best and why? > > I use SMARTY (smarty.php.net) and think its the dogs bolxs. > > Its fast, its easy to use. The template pasing language is simple. > > My site gets somewhere in the region on 100,000 p.v.s a day and it copes > easily. > > But, there is a pertender lurking in the shadows. > > phorum.org, yes its a message board. But phorum 5 which is not pre alpha yet > has its own built in templating system which I thnk with a bit of tweaking > could be used as a full blown templating system. > > John > > -- > 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] Creating associative array
I am trying to create associative array in a while loop.. $image_array = array(); $image_array = array_push("$file_name"=>"$image_url"); what i am doing wrong??
[PHP] Re-passing array varibles
I have a quite complex search form where I have multi select drop down menu..the form can be seen at http://www.bangladeshimatch.com/advance_search.php. I can pass the array variables from the form to another page to process the form without any problem, but when I try to pass the same array variables to the same page into a function for record navigation purposes I have problem, I tried to put the variables into sessions and it seemed worked fine on my local systems but not on the live site. I was wondering if someone came across same problem and how it was solved? Thanks in advance.. Awlad
Re: [PHP] Client Side PHP
PHP codes gets executed at the server (server side), so I wonder how you can make it to work at the client side? But good thinking :) huzz - Original Message - From: "Pete" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, February 06, 2003 12:55 PM Subject: [PHP] Client Side PHP > Has any one ever considered creating browser / client-side php to > replace Javascript and vb?? > > One language across the whole web ;-) > > Posted this question in the evangelism so I'd be interested in more > reaction: > > Pete > > > > -- > 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] Confirmation e-mail
There is a good article on user management @ www.devarticles.com - Original Message - From: "Davy Obdam" <[EMAIL PROTECTED]> To: "PHP" <[EMAIL PROTECTED]>; "PHP-WIN" <[EMAIL PROTECTED]>; "PHP-DB" <[EMAIL PROTECTED]> Sent: Sunday, February 09, 2003 7:03 PM Subject: [PHP] Confirmation e-mail > Hello people., > > I am developing a website with a user login system, i would like to send > an confirmation e-mail to the user when he/she registers for the site, > asking for confirmation...for instance click on a link to activate thier > account. > My question is what would be the best approach to achieve this? How is > this usualy done? Any thoughts and help is appreciated. > > Best regards, > > Davy Obdam > > -- > > Davy Obdam - Obdam webdesign© > mailto:[EMAIL PROTECTED] web: www.davyobdam.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] when is OOP a good choice?
On 12 Feb 2003 at 21:50, anders thoresson wrote: > I've just started to read about - and will soon try to write - object > oriented code. I think I've got the basics both from the PHP-books I have, > and from various sources on the web. > > But nowhere have I read a good explanation to two of my questions: > > 1. What are the main benefits from OOP? > 2. When is OOP a good choice for a PHP script, and when is ordinary > functions a better call? Whenever it's obvious :) ... Actually I think there is a BIG difference between simply using object oriented syntax and actually *developing* in OO. Personally, I've been doing OO in Perl for quite awhile and use it for PHP as well, but I still do it more in a modular sense. imho, OO is a paradigm shift in thinking about how you will architect (of course I've seen some work that just throws everything in one file and repeats the exact same code every 50 lines) your application. I'm trying to squeeze myself into fully understanding the OO way. I like it. In the end, TMTOWTDI, don't get caught by the hype but the apps that I've had the most success with evolving and debugging where those written more like the OO way than just any old way. Peter "Reality is that which, when you stop believing in it, doesn't go away". -- Philip K. Dick -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Templates
On 13 Feb 2003 at 17:00, Darren Young wrote: > I'm looking around for some options on using templates with PHP. I've > used several Perl solutions in the past, but never tried it in PHP. > Digging on the web yields several options so I'd love some thoughts or > comments. The real driver is that the basic site design could change > over time and I'd like to have the basic HTML in the templates, and the > real logic in the PHP code. Well, it seems every Perl programmer at one point or another wrote their own templating system. I went from my own to HTML::Template to a big fan of Template::Toolkit. The best one imho in PHP is Smarty. I'd rank it up there with Template::Toolkit. Take a look: http://smarty.php.net/ Of course it's very easy to change not only the look and feel but the actual layout and everything else about it. Best thing about not writing your own personal propriertary system is you benefit from the world at at large. I haven't used Smarty in a awhile as I've been mired in a CMS but I just recently had a chance to use it and I see it has been improving. Take a good look at it. Peter "Reality is that which, when you stop believing in it, doesn't go away". -- Philip K. Dick -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: preg_match question: locating unmatched HTML tags
you could consider configuring a prebuild html editor (just WYSIWYG) without any problems of users having to write code at all check out: http://www.interactivetools.com/products/htmlarea/ "Andy Crain" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > My apologies in advance if this too basic or there's a solution easily > found out there, but after lots of searching, I'm still lost. > > > > I'm trying to build a regexp that would parse user-supplied text and > identify cases where HTML tags are left open or are not properly > matched-e.g., tags without closing tags. This is for a sort of > message board type of application, and I'd like to allow users to use > some HTML, but just would like to check to ensure that no stray tags are > input that would screw up the rest of the page's display. I'm new to > regular expressions, and the one below is as far as I've gotten. If > anyone has any suggestions, they'd be very much appreciated. > > Thanks, > > Andy > > > > > > $suspect_tags = "b|i|u|strong|em|font|a|ol|ul|blockquote "; > > $pattern = '/<(' . $suspect_tags . '[^>]*>)(.*)(?!<\/\1)/Ui'; > > if (preg_match($pattern,$_POST['entry'],$matches)) { > >//do something to report the unclosed tags > > } else { > >echo 'Input looks fine. No unmatched tags.'; > > } > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] no session id
this code doesn't ouput a session-id. is the code right? and if not, any suggestions what's wrong? i'm new into sessions, so forgive me for stupid questions.. thanx michiel -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] sessions and mysql: easy question
i'm using session on my page basically my need is this: certain values wil be set for every visitor some for only certain visitors (for example: only if they fill out their name&adress) when the session is closed i want the ones that have those values filled out (let's say their name&address) stored in a mysql-table i have 2 ideas: * only storing the ones needed in a mysql-table >> because of a lot of traffic and variables and places where they can modify them, i'd prefer to store all of it at closing the session: is this possible?? (since i don't have control on when they close the session: is it possible to have php run a mysql-query after their browser is closed, with their inserted data?) * storing all the sessions in a mysql-table, deleting the ones that aren't relevant >> pretty much the same question: how can I check on their variables after they've closed the session, and delete their record if needed? does this make sense? any other suggestions? anything most welcome grace michiel -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] convert .asp page .php
Hi all, I joined your list hoping to find-out how to convert a .asp page to .php I do realize that I am off the mark on this and there is much to learn in this area. Perhaps one of you could point me to a place where I get small sample pages in php so that I can get started with .php in a simple way. My problems are: 1 I want to have a page which will send me emails You know, a kind of form where one types the message in and then click send and off it goes to an specified email address 2 I need the below page which is mirrored from a Win environment to be converted to a .php page on my Linux 8.0 system Well If this is asking for too much, then please forgive this post. regards Metta <!-- function ValidateFields() { if (document.frmSubscription.cboSalutation.value=="") { alert("Select Saluation"); document.frmSubscription.cboSalutation.focus(); return false; } if (document.frmSubscription.txtName.value=="") { alert("Enter Name"); document.frmSubscription.txtName.focus(); return false; } if (document.frmSubscription.txtAddress.value=="") { alert("Enter Address"); document.frmSubscription.txtAddress.focus(); return false; } if (document.frmSubscription.txtCity.value=="") { alert("Enter City Name"); document.frmSubscription.txtCity.focus(); return false; } if (document.frmSubscription.txtCountry.value=="") { alert("Enter Country Name"); document.frmSubscription.txtCountry.focus(); return false; } if (document.frmSubscription.txtEmail.value=="") { alert("Enter Email Address"); document.frmSubscription.txtEmail.focus(); return false; } else { var intPos; intPos = frmSubscription.txtEmail.value.search(/^[a-z0-9](\.\w|\w)[EMAIL PROTECTED](\.\w|\w)*\.[a-z]{2,3}$/i); if(intPos==-1) { alert("Enter Valid Email Address"); document.frmSubscription.txtEmail.focus(); return false; } } frmSubscription.SubClicked.value="Ok"; return true; } //--> Subscription Form <!-- function radMember_onclick() { frmSubscription.radAM(0).disabled=true; frmSubscription.radAM(1).disabled=true; } //--> Subscription Form Address all correspondence to: Buddhist Publication Society 54, Sangharaja Mawatha Kandy, Sri Lanka Annual subscription (valid for one calendar year): Air Mail U.S. $20.00; Pounds Sterling 12.50. Remittances may be sent by personal cheque, international money order or bank-draft made payable to: Buddhist Publication Society. Please mark all cheques etc.: A/C Payee Only, Hongkong & Shanghai Banking
[PHP] proc_open() and SSH [still unresolved]
Hey folks, Iam trying to call the ssh program and have it connect to a remote host and authenticate, however I havent been able to do it. I used this script but all i get when I run it on port 80 is: command returned 255 At the error log i specified i get: Permission denied, please try again. Permission denied, please try again. Permission denied (publickey,password,keyboard-interactive). Note that it doesnt even ask for a password.. just says denied immediately. array("pipe", "r"), // stdin is a pipe that the child will readfrom 1 => array("pipe", "w"), // stdout is a pipe that the child will writeto 2 => array("file", "tmp/error", "a") // stderr is a file to write to ); $process = proc_open("ssh -T -l user server.com", $descriptorspec, $pipes); if (is_resource($process)) { // $pipes now looks like this: // 0 => writeable handle connected to child stdin // 1 => readable handle connected to child stdout // Any error output will be appended to /tmp/error-output.txt //fwrite($pipes[0], "password"); //I have tried with and without writing anything however its the same. while(!feof($pipes[1])) { echo fgets($pipes[1], 1024); } fclose($pipes[1]); //fclose($pipes[0]); $return_value = proc_close($process); echo "command returned $return_value\n"; } ?> -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Imgs in Database
An Image file is just text typically If you know the format of the images it should be a case of extracting the 'text' that is the file and sending the appropriate headers... - Original Message - From: "Craig" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, June 04, 2003 12:09 PM Subject: [PHP] Imgs in Database > Im converting a site from asp to php, Its db driven and some images are > stored in the db. > > The previous developer stored the image files in a text string format, Im > assuming I have to convert the text back into a binary format, anyone had > any experience with this or can shed some light on this for me? > > Regards, > > Craig > > > > -- > 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] Generate PHP using PERL???
Well, I'm a little light on techniqueso bare with me... I've got pages that are dynamically created via a perl program. The final HTTP output depends upon input to the perl script. I would like the output of this script to be interpreted as a .PHP page so that I can take advantage of PHP functionality within that page. Since I dont know what my page will look like prior to running the perl script with its various inputs, I dont think I can do what your suggesting. Maybe I'm not understanding what your saying and I'll admit I'm a novice at all of this. Todd Snyder
[PHP] ErrorDocument doesn't work for PHP scripts
I'm having a problem configuring my web server to redirect 404 errors to a custom error page. It almost looks like the PHP parser is getting hold of the request before apache has checked to see if the file exists. It works fine if you request an unknown page on the server that isn't a PHP script, but fails if it is. Examples: http://www.jeamland.org/blah.htm Displays the custom error page Logs: [Fri Jun 20 14:25:51 2003] [error] [client X.X.X.X] File does not exist: /spool/web/www.jeamland.org/html/blah.htm http://www.jeamland.org/blah.html (or blah.php) Displays a browser generated 404 error page Logs: [client 194.72.110.12] script not found or unable to stat Here's most of my virtualhost configuration, any thoughts appreciated! Thanks, Andy ServerName www.jeamland.org DocumentRoot /spool/web/www.jeamland.org/html php_value include_path ".:/opt/php/lib/php" php_value auto_prepend_file none php_value auto_append_file none ErrorDocument 404 /_error.html AddType application/x-httpd-php .html php_value include_path ".:/spool/web/www.jeamland.org/lib" php_value auto_prepend_file header.php php_value auto_append_file footer.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Extensions?
I'm trying to configure my php.ini file on my local Windows 2000 system so I can use the extensions such as GD, etc. I have changed the line: extension_dir = C:\php\extensions ; (which is where php_gd.dll resides) and uncommented: extension=php_gd.dll and when I restart the web service and hit a page, I get the error: Unable to load dynamic library . the specified procedure could not be found. Any ideas? Thanks! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: fopen(http:...) problems
Why don't you try chmoding the file 777. Next use readfile: http://www.php.net/manual/en/function.readfile.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP and VISA cards? help!
Hi How is possible to charge some products on E-Shop in php to users with VISA cards??? Are there some good tutorials on net about this??? Or examples??? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Compiling as BOTH DSO and CGI under apache.
Hi all, I need to build php as a CGI for some scripts that need to run as the user (image gallery scripts, where safe mode isn't enough to write to user directories, I need the files written AS a user, and chmodding the directory 6777 is just nuts.). To this end I figure I can add a new mime type to apache and a new extension to the scripts, and be good to go. What I've seen a lot of on the lists is either some requirement that the php binary be installed in each user's cgi-bin, or that all scripts start with php. (I run suexec, but I'm not sure if the suexec restrictions apply to "HANDLERS" (I'm pretty sure they don't, but then again I'm not 100 percent sure they will run as the user if defined this way.) Has anyone here successfully set up php to work both ways? You would think searching the entirety of the lists and google groups I'd find one working config file. -Dan Mahoney -- "If you need web space, give him a hard drive. If you need to do something really heavy, build him a computer." -Ilzarion, late friday night Dan Mahoney Techie, Sysadmin, WebGeek Gushi on efnet/undernet IRC ICQ: 13735144 AIM: LarpGM Web: http://prime.gushi.org finger [EMAIL PROTECTED] for pgp public key and tel# --- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Unable to flush output
Hi all, Until yesterday i was running Apache/2.0.36 (Unix) mod_ssl/2.0.36 OpenSSL/0.9.6c PHP/4.2.1 and was able to flush script output to browser (using flush() ), before the script stops executing. I upgraded to Apache/2.0.40 (Unix) mod_ssl/2.0.40 OpenSSL/0.9.6g PHP/4.2.3 and on the same script/browser configuration i have to wait untill the script stops running before i can see any output. I wish to say that it is not browser-related, because i tried different browsers, tried sending spaces to browser before the actual contents (300 spces for IE) and data is not in a table. I am running Slackware 8.1 I did't find any information on how to change this behaviour up to now, so i would be thankfull for any ideas
Re: [PHP] Unable to flush output
I do not have compression in apache - Original Message - From: "Marek Kilimajer" <[EMAIL PROTECTED]> To: "PHP" <[EMAIL PROTECTED]> Sent: Wednesday, September 11, 2002 3:38 PM Subject: Re: [PHP] Unable to flush output > Didn't you enable some apache extentions, like compression. > > PHP wrote: > > >Hi all, > >Until yesterday i was running Apache/2.0.36 (Unix) mod_ssl/2.0.36 OpenSSL/0.9.6c PHP/4.2.1 and was able to flush script output to browser (using flush() ), before the script stops executing. I upgraded to Apache/2.0.40 (Unix) mod_ssl/2.0.40 OpenSSL/0.9.6g PHP/4.2.3 and on the same script/browser configuration i have to wait untill the script stops running before i can see any output. I wish to say that it is not browser-related, because i tried different browsers, tried sending spaces to browser before the actual contents (300 spces for IE) and data is not in a table. I am running Slackware 8.1 > >I did't find any information on how to change this behaviour up to now, so i would be thankfull for 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
[PHP] Sorting Quesiton
Hello All. I have a small 'to-do list' that is working just fine. the db-table structor is close to this: id datetime (for date of doing the task) into (quick title/intro about task) text (guts of work I have to do) active (is task active or done) Here is the question I've got: My datestamp is simply m/d/y. (I need to keep that format) I would like to be able to move a specific to-do up-or-down the list, for the given days tasks. Adding a new table field is not a problem, I'm just not sure how to control the sort-order, or the re-arrange. I'm also not against using an array (as a friend suggested) but I'm not understanding what he was getting at. (quick conversation with him) Anyway, any ideas on this sort of thing would be great! Thanks. John B. Abela -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Array getting chopped up
Hello, I'm having a problem on my server where any time there is more than one element in an array, all elements prior to the last one get a portion of the beginning chopped off. This portion is pretty random (I have yet to find any pattern) other than it seems if there is a space it will chop off anything before the first space in a particular element. Every time a new element is added to the array, more characters are deleted from the previous one(s). This is best shown by going to http://66.192.46.41/~serverso/phpBB/index.php - create a new post and add a poll to it. As you add options to the poll, you will see the effect on the other options which you had already created. This is not a phpBB problem, as it occurs in other non-related php files on the server, but as I said this illustrates the effect well. You can also see what it did to a menu in postnuke on the server at www.dmcstop.com. Does anyone have any ideas??? -Jordan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] about mssql.....
If I want to use sql to access MS Access's database, is it necessary to have mssql server? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] How to access MS ACCESS's database files
By Using mssql_??? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] news related
I have set up my own news submission system, basically you write an article and it is posted into a mysql database and then anyone can use a couple of lines of java script to access the various news articles. I have noticed a bug though, in that when I put in particularly long articles and then click to view them only part of the article is shown. Now firstly I thought it might be the formatting of my show article page but its not and then I changed field in my database that stores the article from a text data type to a longtext which can handle a ridiculous amount of characters. So I'm not sure why this is happening, when I perform a select query in mysql the article is displayed but I can't see at what point it finishes, plus after text flashes up it is followed by the character - mulitple times. I'm not sure if this is normal. Not sure either if it has anything to do with my submission form. Think it must be something to do with storing it in the database because the show file would show all of what is in that field in the database. Here are the two files. add form: Upload a News Article http://www.testhouse.org.uk";> Upload a News Article Article Title: Article Body: This is the show part, very simple. %s",nl2br($row[2])); } ?> back Probably something very simple but thanks in advance as usual. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] IP addresses
$_SERVER['REMOTE_ADDR'] - Original Message - From: "Bret L Conard" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, October 28, 2002 4:46 PM Subject: [PHP] IP addresses Hi all, I've been away for a while but I'm back and have a question about IP addresses. How do I retrieve / capture a users IP? I need to have it to process electronic payments. Thanks. Bret -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Double execution trouble with procmail script invoke
I have a fairly obscure setup where I have procmail directly executing a PHP script specially made for this purpose. This php script uses the same code (classes) used for the web applications, and the classes works just fine. The symptom: I am getting double INSERT's into database. Conclusion: The php script is getting invoked twice. I concluded this by inserting some dummy rows into the DB wtih 'getmypid()' as the values, and two rows get inserted, each with a PID one digit apart, yet all other data the same. Attempts: I have attempted to diddle all kinds of stuff, turned of register_globals, register_argc_argv, surfed usenet archives, web. seems I have no clue who is invoking this. Interestingly, only one process' output gets piped to the MAIL_IMPORT_LOG log file (see below). Any suggestions greatly appreciated. Using 4.1.1 and ADODB 2.12 on RedHat 7.2 Here is my procmail if anyone cares... DOCUMENT_ROOT=/home/app/htdocs/classes MAIL_IMPORT_LOG=/home/app/tmp/import.log PROC_SUBJECT=`formail -xSubject: ` PROC_FROM=`formail -xFrom: ` PROC_TO=`formail -xTo: ` TRAP="php -q /home/app/poller/mail_importer.php" :0 * ^To:.*test.host.com { :0 c | $TRAP >> $MAIL_IMPORT_LOG :0 mail/import } -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] session problems....
Anyone know why php would complain about not having permission to write the session file in /tmp (and to check the session.save_path var in my php.ini file. when it does specify /tmp in the php.ini and /tmp has drwxrwxrwt for permissions? I need a resolution... even if we have to pay for it... so if anyone feels they are good enough to fix this we can compensate you for your time. Thanks, Rick -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP as a proxy to an htaccess protected site. (STILL UNRESOLVED)
Hi people, Iam trying to make a script that you give it the login and password for a determined password protected site, and it logs you in. It will be like a proxy. So, what I have is something like this: So now.. here I have two problems: 1.) If the user enters a login/pass that is not the correct this appears on the screen hundreds of times: "Warning: Supplied argument is not a valid File-Handle resource .." 2.) /protected_area/index.html is a frame site, which means that if the pass/login are ok it will show you only the index.html, but this is made of frames, so then I have another login prompt for the frames. My question is, is there anyway I can fix problem 1, and in problem 2 is there anyway to proxy this in a better way, where you input the login once and it stay there so i dont get any more login prompts? Thank You. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] diffrance : require(); a file from localhost and from a domain.
tecnically whats the diffrance if I do: require("http://localhost/image.gif";); or require("http://www.domain.com/image.gif";); ? Thanks. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] diffrance : require(); a file from localhost and from a domain.
I think thats more than obvious Erik.. I asked for the tecnical diffrance. Anybody? > > On Wednesday, June 26, 2002, at 03:19 PM, <[EMAIL PROTECTED]> wrote: > > > tecnically whats the diffrance if I do: > > > > require("http://localhost/image.gif";); > > or > > require("http://www.domain.com/image.gif";); ? > > The first one requires the file at "localhost/image.gif", and the second > one requires the file at "www.domain.com/image.gif". > > > Erik > > > > > > > Erik Price > Web Developer Temp > Media Lab, H.H. Brown > [EMAIL PROTECTED] > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Vars to use in stats program
Note: For a couple who seem to be wondering there is a PHP news server which works in conjunction with this mailing list. The address is: news.php.net Currently collect the following vars in a early stage stats program(Working on the KISS principle) for my own use. Here are the user vars I think I should collect. $_SERVER[REMOTE_HOST] $_SERVER[HTTP_REFERER] $_SERVER[HTTP_USER_AGENT] How can I get the remote DNS name? $_SERVER[REMOTE_HOST] gives an ip. What other info could I collect that would be useful? For $_SERVER[HTTP_REFERER] does any one have script that will get the http://www.foobar.com bit out of http://www.foobar.com/dir1/page1.htm? Some sort of explode would probably work but I am not sure on this one. For $_SERVER[HTTP_USER_AGENT] What is the best way to get seperate OS and Browser Vars? Thanks, JJ Harrison [EMAIL PROTECTED] www.tececo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] fopen(); deciding if going for the IP or domain.
Hello, Is there anyway I can do fopen to try to open a connection to a domain name, if it cant try opening it to the IP? For some weird reason today a domain name wont resolve and Iam getting this error: Warning: php_network_getaddresses: getaddrinfo failed: Name or service not known Thanks. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] How to put these 2 IF statements into 1, with regex?
Hi People, I was wondering if there is anyway to combine these two IF statements into one: if (preg_match("@siteUserList.cgi?group=site177@", $QUERY_STRING)) and: if (preg_match("@siteUserList.cgi?group=site177&@", $QUERY_STRING)) In other words I need it to match if the query string HAS or DOESNT HAVE a "&" at the end. Thanks. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] help with regex in preg_match();
Hi people, I got this line that is relly giving me a pain..: if (preg_match("@siteUserList.cgi\?group=site177(&?)@", $QUERY_STRING)) As you can see it just matches the query string when it looks like this: siteUserList.cgi?group=site177& (with or without a "&") The thing is I need it to match also if after the "&" there is a number (that will have more than 1 digit) Ive tried many diffrent thing with \d+ but I can get it to work.. can somebody give me some light? Thanks. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] $_POST into a formatted string, help!
Hello, I need to get _$POST into a string in this form: tree=green&sky=blue&sun=yellow , how can i accomplish this? THanks. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] SESSION newbie question
Hello, I got this example of sessions: www.net.co.cr/test/test.php , however, as you can see in the code at /test/text.txt , isnt $_SESSION ['tree'] suppose to contain a value and not be NULL? Thanks. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: SESSION newbie question ***STILL UNRESOLVED***
I did as you said Richard, however I still encounter the same problem, you can take a look at the code in test.txt, I updated it too. For other people, here is the original message: Hello, I got this example of sessions: www.net.co.cr/test/test.php , however, as you can see in the code at /test/text.txt , isnt $_SESSION ['tree'] suppose to contain a value and not be NULL? Thanks. > > >www.net.co.cr/test/test.php > > > > > if ($QUERY_STRING == "") > > { > > session_start(); > > $_SESSION['tree'] = "green"; > > > > > > > > Change the line above to these two lines: > > session_register('tree'); > > $tree = 'green'; > > > > Think of $_SESSION (and the other $_XXX vars) as "read-only" > > > > Use session_register() to say which variables should "live long and > prosper" > > and then just use them like regular variables. > > > > > > echo ' > > > > frame session test > > > > > > > > MARGINHEIGHT="0" > > border=0 frameborder=0 FRAMESPACING="0" NORESIZE SCROLLING="no"> > > border=0 > > frameborder=0 FRAMESPACING="0"> > > > > > > > > '; } > > > > if ($QUERY_STRING == "1.html") > > { echo "This is just a dummy frame."; } > > > > if ($QUERY_STRING == "2.html") > > { > > echo ""; > > echo "The value of \$_SESSION['tree'] is:"; > > echo gettype($_SESSION['tree']); > > echo ""; > > } > > > > ?> > > > > > > -- > > Like Music? http://l-i-e.com/artists.htm > > > > > > -- > > 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] Re: SESSION newbie question ***FINALLY RESOLVED*** =-)
Kevin you got it! Wow.. that gave many of us pain.. however I thought about that and said to myself that would just start a new session.. anyways that didnt. For the rest of the people looking at this e-mail, you may look at the code, its updated. Thanks. Josepablo Pérez > You must understand that although it's all the same script each frame is its > own HTML page and Session vars will not be called into a frame unless you > specify it. So.. > > if ($QUERY_STRING == "2.html") > { > session_start(); // call session vars into this frame. > // .. blah blah blah.. > } > > Also set your variables before you register them into the session. If you > don't have register globals on it won't work the other way around. Hope > this helps. Very clever by the way I never thought of doing it this way. > I'd always called the PHP into the SRC tag. :-) > > Good luck > -Kevin > > > > - Original Message - > From: <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Wednesday, July 03, 2002 11:33 AM > Subject: Re: [PHP] Re: SESSION newbie question ***STILL UNRESOLVED*** > > > > I did as you said Richard, however I still encounter the same problem, > > you can take a look at the code in test.txt, I updated it too. > > > > > > For other people, here is the original message: > > > > Hello, > > > > I got this example of sessions: www.net.co.cr/test/test.php , > > however, as you can see in the code at /test/text.txt , isnt $_SESSION > > ['tree'] suppose to contain a value and not be NULL? > > > > Thanks. > > > > > > > > >www.net.co.cr/test/test.php > > > > > > > > > > > if ($QUERY_STRING == "") > > > > { > > > > session_start(); > > > > $_SESSION['tree'] = "green"; > > > > > > > > > > > > > > > > Change the line above to these two lines: > > > > session_register('tree'); > > > > $tree = 'green'; > > > > > > > > Think of $_SESSION (and the other $_XXX vars) as "read-only" > > > > > > > > Use session_register() to say which variables should "live long and > > > prosper" > > > > and then just use them like regular variables. > > > > > > > > > > > > echo ' > > > > > > > > frame session test > > > > > > > > > > > > > > > > > > MARGINHEIGHT="0" > > > > border=0 frameborder=0 FRAMESPACING="0" NORESIZE SCROLLING="no"> > > > > > > border=0 > > > > frameborder=0 FRAMESPACING="0"> > > > > > > > > > > > > > > > > '; } > > > > > > > > if ($QUERY_STRING == "1.html") > > > > { echo "This is just a dummy frame."; } > > > > > > > > if ($QUERY_STRING == "2.html") > > > > { > > > > echo ""; > > > > echo "The value of \$_SESSION['tree'] is:"; > > > > echo gettype($_SESSION['tree']); > > > > echo ""; > > > > } > > > > > > > > ?> > > > > > > > > > > > > -- > > > > Like Music? http://l-i-e.com/artists.htm > > > > > > > > > > > > -- > > > > 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 General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] manual/eng
Hi all, I tried to download the manual of php wget http://www.php.net/manual/en/ I got a lot of files but not linked to read off line the links where all to the website. http://www.php.net/manual/en/faq.php http://www.php.net/manual/en/zend.configuration-macros.php Can someone please help me with a site that I can download the manual of php in a format that I can read off line. regards Metta -- A saying of the Buddha from http://metta.lk/ Whoever tries to seek happiness without hurting others, can find happiness. Random Dhammapada Verse 132 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] manual/eng
On Sun, Aug 31, 2003 at 02:38:45PM +0300, Paul Marinas wrote: Hi all, Thanks to all of you that answered That was nice and will get me started. regards Metta > try http://www.php.net/download-docs.php > u have a link there for diferent languages -- A saying of the Buddha from http://metta.lk/ Whosoever rejects the words of the noble, righteous Arahants, such a fool, because of his false views, brings forth on his head ruin and destruction, like the banana-tree which dies when it has borne fruit. Random Dhammapada Verse 164 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Header won't redirect
Jay, good guess, but wrong! While register_globals does equal off, I am using $_GET['pagename'] to assign the value to $pagename before the snippet of code that I sent. Sorry I didn't mention that earlier. I tried putting the _GET in my header redirection directly, but that didn't help. Any other ideas? Anyone else have an idea? Thanks, Jonathan Duncan "Jay Blanchard" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] [snip] This used to work before I upgraded my PHP. [/snip] Let me guess, you upgraded without actually reading the README or update notes. I am going to guess that register_globals = off in php.ini. You can either fix the variables $_GET['pagename'] or turn RG back on. Jay Blanchard "Jonathan Duncan" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > This is code that I have in my index that check whether or not SSL is being > used when accessing certain pages and if not then it redirects to the same > address but with SSL. > > if ($pagename=="login" || $pagename=="signup" || $pagename=="checkout") { > if (!$HTTPS) { >//header("Location: > https://".$_SERVER['SERVER_NAME'].$_SERVER['PHP_SELF']."?pagename=$pagename"); >exit; > } > } > > This used to work before I upgraded my PHP. Now when I click on a link that > matches my SSL checker it just hangs: > > http://www.routerbitworld.com/index.php?pagename=checkout > > If I change the header to redirect to a location without any variable > directive like this > > http://www.routerbitworld.com/index.php > > ...works fine. Why can't I send a variable this way? > > Thanks, > Jonathan Duncan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Saving Form Data
Hi, Is there anyway of saving a form with layout and data, without knowing what the fields are? I would like to be able to have the use "Upload" there own form. Then that form can be later viewed and filled out by someone else and be able to save all the data that was entered. I can do this easy enough with Text and Textarea type fields, but things like selects, radios, etc I can't think of a way to save them. Basically It would be like save a screen capture of the filled out form for viewing/altering later. Thanks for any help.
Re: [PHP] Saving Form Data
Unfortuanetly that would only work for Text and Textarea types. It wouldn't really for for a select, bcause how do you know which option of the form was selected? How do you select the correct option without knowing what the other options are? Ex, a user uploads a form with a select type like so: Jan Feb To: "PHP" <[EMAIL PROTECTED]>; "php" <[EMAIL PROTECTED]> Sent: Wednesday, October 08, 2003 12:58 PM Subject: RE: [PHP] Saving Form Data > [snip] > Is there anyway of saving a form with layout and data, without knowing > what the fields are? > I would like to be able to have the use "Upload" there own form. Then > that form can be later viewed and filled out by someone else and be able > to save all the data that was entered. > I can do this easy enough with Text and Textarea type fields, but things > like selects, radios, etc I can't think of a way to save them. > Basically It would be like save a screen capture of the filled out form > for viewing/altering later. > [/snip] > > If the form method is POST all of the data is in the $_POST array which > could be saved to a text file, if GET all of the data is in the $_GET > array. You would have to read out of the saved text file to re-populate > the form for editing or viewing later > > -- > 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] Saving Form Data
Thanks, I thought of this, unfortuanetly the user uploading the form would have no clue in being able to build the form with the $_POST tags already in it. > PHP wrote: > > Hi, > > Is there anyway of saving a form with layout and data, without knowing what the fields are? > > I would like to be able to have the use "Upload" there own form. Then that form can be later viewed and filled out by someone else and be able to save all the data that was entered. > > I can do this easy enough with Text and Textarea type fields, but things like selects, radios, etc I can't think of a way to save them. > > Basically It would be like save a screen capture of the filled out form for viewing/altering later. > > > > Thanks for any help. > > > radio: > checked': '') ?>> > $_POST['name']=='2') ? ' checked': '') ?>> > > select: > > > ONE > > > > TWO > > checkbox: > checked': '') ?>> > > You cannot save file input that easily, you have to keep the file on the > server and give the user oportunity to change it. > > Marek > > -- > 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] Saving Form Data
Here is the real life idea: A Supervisor, knows nothing about php, creates a simple form, say a time sheet, in something like FrontPage. He then uploads that form to the server. An employee then looks at a page on the server that will retrieve the form data that the supervisor made, and automatically fill in the form action and submit buttons. The employee then fills out the time sheet and submits it. Easy to do so far, the hard part: The supervisor can now get the form data that was filled out. BUT, he sees the data in the same form he created but pre-filled with all the employees data. I know it would be easy to simple print out a list of all the form values and fields like: Hours = 5 Day 1 Week 1 = 2 Day 2 Week 1 = 1 But it doesn't look as nice as the looking at the same form but with the values pre-filled in. Now, I can do this easily enough with and fields and fields. The hard but is the multiple choice type form fields, like selects. I think I need some kind of HTML parser that will break up the supervisors form, then insert any values need for the form values and then re-display the form data. > PHP wrote: > > Thanks, > > I thought of this, unfortuanetly the user uploading the form would have no > > clue in being able to build the form with the $_POST tags already in it. > > > > > > I lost you. What are you trying to do? > > -- > 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] Undefined variable using hyperlink
I'm having some basic problems with the following pages, index.php (frames base), email.php, and body.php. I can retrieve email from the email account, but when I click on a link in the email.php to open the email in body.php, $msgid is not defined in body.php. It's got to be something basic, but right now, it escapes me. Right now this is running on my Windows 2000 Pro machine. Any help would be appreciated. Thank you in advance. Chuck Index.php Email.php Email Test Body, TR, TD, Table { color : Black; font : 11px Arial, Helvetica, sans-serif; } From Subject Date Nmsgs; $overview = imap_fetch_overview($mbox, "1:$mnum", 0); $headers = imap_headers ($mbox); // Data Table $nbm = sizeof($overview); for($x= $nbm-1; $x >= 0; $x--) { $val=$overview[$x]; $nb = $val->msgno; $sFrom =$val->from; $sSubject = $val->subject; if($sSubject == '') { $sSubject = "No Subject Included"; } $dDate=$val->date; // Inbox Output print " $sFrom $sSubject $dDate "; } imap_close($mbox); ?> Body.php New Document subject); $msubject=$rawsubject[0]->text; $mfrom=htmlspecialchars(str_replace("\"","",$mailheader->fromaddress)); $mto=htmlspecialchars(str_replace("\"","",$mailheader->toaddress)); $mcc=htmlspecialchars(str_replace("\"","",$mailheader->ccaddress)); $mreply=$mailheader->reply_toaddress; $mdate=$mailheader->Date; $mailcheck = imap_check($mbox); $mailnumber = $mailcheck->Nmsgs; // Get the structure of the email $structure = imap_fetchstructure($mbox,$msgid); /* if (isset($msgid)) { //$msgid = "$msgid"; } if (empty($msgid)) { //$mnum = $mcheck->Nmsgs; //$msgid = "$mnum"; } */ imap_close($mbox); ?> -- End of Forwarded Message -- End of Forwarded Message -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Undefined variable using hyperlink
That seems to have corrected the problem. Thank you very much. On 12/10/03 11:56 AM, "Richard Davey" <[EMAIL PROTECTED]> wrote: > Hello, > > Wednesday, December 10, 2003, 4:53:18 PM, you wrote: > > P> I can retrieve email from the email account, but when I click on a link in > P> the email.php to open the email in body.php, $msgid is not defined in > P> body.php. It's got to be something basic, but right now, it escapes me. > P> Right now this is running on my Windows 2000 Pro machine. > > At the start of body.php try adding this: > > $msgid = $_GET['msgid']; -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] picking up a form name
Hi, If I have more than one form on a page, how can I get the name of the form that was sent on the recieving page without using javascript? tia, Craig TOP DRAW INC. p 780.429.9993 f 780.426.1199 [EMAIL PROTECTED] www.topdraw.com 10210 - 111 Street, Edmonton, Alberta T5K 1K9 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] connecting to progress db
Hi, I am not sure how to go about this. =( I think my problems are twofold. problem 1. I have to connect to a progress database, for which there is no built-in php support. I have been looking at the unified ODBC functions, but progress isn't one of the supported dbs there either. problem 2. the db is not specifically a web db. It is the clients' production db that is located on their facility and it is behind a firewall. I know I will get a performance hit with this setup, but I can live with this. question 1: do I need a progress driver, or do the ODBC functions take care of that? question 2: is it possible for the db connection to get thru a firewall, and then connect to a db? TIA, Craig -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] i need help help with include
Hi I created a directory and files 3 directory's down root/dir1/dir2/dir3/files now i need to include my function file out of the root root/dir/funtionfile How do i do this? I cannot create a htacess file on this server nor set my include path. Can anyone help please Thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Image raw data
Hello I've been using the image functions to resize images and do very basic stuff. I have PHP 4.2.2 with the built in GD. I was wondering if there's a way to access the raw image data, somethiung like image_get_as_array() so that you can do more nifty things, such as applying convolution matrices or even do the resizing by hand with different algorythms. Please reply privately because I'm not subscribed to the list, I don' teven know how to subscribe Aristide -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] convert date from UK to US for strtotime
> What I really need is to re-order the string that a user inputs, say, > 21/04/2004, so that it becomes 04/21/2004 so I can use strtotime. I use preg_match() (http://www.php.net/manual/de/function.preg-match.php): $dateuk = '21/04/2004'; preg_match("/([0-9]{1,2})\/([0-9]{1,2})\/([0-9]{2,4})/", $dateuk, $m=''); $dateus = "$m[2]/$m[1]/$m[3]"; [0-9]{1,2} matches one or two numbers from 0 to 9 \/ matches / (...) the first brackets-pair will go to $m[1] the second to $m[2] ... g. martin luethi -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Image Header Issues
hiho, it could be a ie-problem, see http://support.microsoft.com/default.aspx?scid=kb;EN-US;810978 g. martin luethi Thu, 15 Jan 2004 14:18:29 -0800 Bob Eldred <[EMAIL PROTECTED]>: > Well, I've done a lot of web searching, and a lot of experimentation, but > haven't hit upon a fix for my issue yet. > > Currently, images are served on a site I'm working on in two ways: > > 1) Free Images are served normally (). > 2) Non-Free Images are served through a PHP wrapper with authentication > functionality in it (). > > The issues I'm having *only* occur in Internet Explorer, but it's not the > full-cache issue that Microsoft acknowledges, and I don't honestly believe > it to be a total bug in IE, since the free images, served up through a > normal tag work fine. > > The issue is that, if the user right-clicks the image, and chooses "Save > As", it will only save as a BMP. Interestingly, if the user right-clicks on > a link to a picture, and chooses "save target as", it works just fine. > > So far, I've tried the following, with no success: > > 1) Mod-Rewrite, rewriting a request of /secure/111384.img to > /showpicture.php?pid=111384. I did this because it was suggested that IE > might be looking at the file name in the link, not seeing an image type, and > therefore defaulting to bmp. The rewrite works successfully, and the > picture is shown, but the "save as" function still doesn't work. Getting > the image properties from within IE gives a Type of "Not Available". > > 2) Adding, rewriting, subtracting, etc, many many header combinations. > > 3) All Microsoft-suggested full-cache problem fixes, just in case. > > So, the scripts involved are these: > > in functions.php: > > function showpix($picture_id) > { > $sql="SELECT ug.group_name, p.name from usenet_groups as ug, > ipictures as > p WHERE p.id='$picture_id' AND ug.id=p.group_id"; > $result=mysql_query($sql) or die(mysql_error()); > $row=mysql_fetch_array($result); > $dirhash=get_storage_dir($row["name"]); > $picturedirectory=STORAGEDIR."/".$row["group_name"]; > $fullpicturename=$picturedirectory."/".$dirhash."/".$row["name"]; > header("Content-Type: image/jpeg"); > header("Content-Length: ".(string)filesize($fullpicturename)); > header("Content-Disposition: inline; > filename=\"".$row["name"]."\""); > > readfile("$fullpicturename"); > return(true); > } > > The page serving the image: > > .jpg" target="_BLANK"> > "> > ".$row["date_added"]?> > { > echo " src=\"/graphics/rethumbnail.png\">".SPACER. > " src=\"/graphics/trashcan.png\">"; > } > ?> > > > showpicture.php: > include('dbconnect.php'); > include('defines.php'); > include('functions.php'); > if($_GET["type"]=="temp"||$_GET["type"]=="thumbtemp") > { > $sec_level=4; > } > else > { > $sec_level=2; > } > include('validate_user.php'); > switch($_GET["type"]) > { > case "thumb": > { > showthumb($_GET["pid"]); > break; > } > case "temp": > { > showpixtemp($_GET["pname"], $_GET["gid"]); > break; > } > case "thumbtemp": > { > showthumbtemp($_GET["pname"], $_GET["gid"]); > break; > } > default: > { > showpix($_GET["pid"]); > } > } > ?> > > Because of the fact that IE can properly determine the image type when > statically served, I have to believe that something is not being sent > properly to the browser from within one of these functions. > > I apologize for asking this question twice, but having done more research, > and having unsuccesfully implemented the suggestions given to me last time, > I'm hoping that someone can point me in the right direction, before I'm > simply forced to do Apache redirection, which isn't as good as actually > checking in the session for logged-in status. > > Thanks in advance for anything you can throw my way. > > Bob > > -- > 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] Regexp help (simple)
$string = 'ab12345-1'; if (preg_match('/^([a-zåäö]{2,3})([0-9]{4,5}(\-[0-9]{1,2}){0,1})$/i', $string, $m='')) { echo $m[1]; // -> ab echo $m[2]; // -> 12345-1 } g. martin luethi Tue, 20 Jan 2004 09:59:37 +0100 Victor Spång Arthursson <[EMAIL PROTECTED]>: > Hi! > > Anyone who could help me with this regexp problem? > > I want to verify that a string is made up of 2-3 letters, (a-z + åäö, > A-Z + ÅÖÄ), directly followed by 4 or 5 digits, which could, but may > not, be followed by a minus and one or two digits. > > Examples of valid strings: > > abc12345 > ABC12345 > abc1234 > ABC12345-1 > ABC12345-01 > > I would also like to split them into an array consisting of 2 elements; > > [0] = the first 2 or 3 letters > [1] = the rest > > Example: > > string = ab12345 > [0] = ab > [1] = 12345 > > string = åäö1234-66 > [0] = åäö > [1] = 1234-66 > > Lots of thanks in advance, > > sincerely > > Victor > -- > 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: FW: [PHP] Re: Generating an Excel file?
if you are using sessions: remove session_start() inside the downloadscript or play around with http-headers, e.g.: session_start(); header("Expires: ".gmdate("D, d M Y H:i:s", 0)." GMT"); header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); header("Cache-Control: private, max-age:0"); header("Pragma: no-cache"); or download the file without the php-script and analyse the http-headers with a network-sniffer (http://www.ethereal.com) g. martin luethi Tue, 20 Jan 2004 10:14:29 -0500 Ben Ramsey <[EMAIL PROTECTED]>: John W. Holmes wrote: > From what I've seen on here, the only workaround is to pass > an extra variable in the URL that ends in ".csv", even though > you don't need to use that variable. > file.php?var=whatever&dummy=f.csv Olwen - Sal Williams wrote: > Name it for example something.csv > > The in your .htaccess file put > > ForceType application/x-httpd-php > Vincent Jansen wrote: > I use > > header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); > header("Cache-Control: no-store, no-cache, must-revalidate"); > header("Cache-Control: post-check=0, pre-check=0", false); > header("Pragma: no-cache"); > header( "Content-type: application/x-excel" ); > header( "Content-Disposition: attachment; filename=MyFile.xls" > ); > header( "Content-Description: PHP Generated Data" ); > > For me this works in both IE6 and Mozilla 1.5 None of these ideas seem to work. In fact, I don't think .htaccess files even work on a Windows server running IIS. But I could probably achieve the save results by playing with the extensions in IIS. At any rate, I tried it in IE6, and it prompts me to download it correctly and without the ".php" extension on the end. I had been trying it in Mozilla Firebird 0.7 prior to that. Since the client uses IE rather than Mozilla, then I won't worry about it for now. However, it still would be a good idea to find a way to resolve it. Any other ideas? Thanks, Ben -- 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: FW: [PHP] Re: Generating an Excel file?
save the data from the script to a file and download this file Tue, 20 Jan 2004 12:56:49 -0500 Ben Ramsey <[EMAIL PROTECTED]>: [EMAIL PROTECTED] wrote: > or download the file without the php-script and analyse the > http-headers with a network-sniffer There is no way to download the "file" without the PHP script. It is being generated by the PHP script from data in a database. The "file" does not actually exist. -Ben -- 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] mysql_connect() with timeout
A few months ago I modified PHP 3.0.16 to add an optional fourth parameter to the mysql_connect() functions. The parameter specifies a timeout (in seconds) on the connect(). The patch simply uses the existing mysql_options() function in the MySQL library so it's quite stable code. I'm in the process of upgrading to PHP 4.0.4pl1 and so I've made a comparable change to that code base. Here are the patches for each version: http://www.winux.com/php/connection_timeout_php-3.0.16.txt http://www.winux.com/php/connection_timeout_php-4.0.4pl1.txt Since the timeout parameter is optional, the change is completely upward compatible with the existing languages. It's a wonderful thing. Is there any chance either of these might make it into the official release? Larry -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Post XML to PHP via XMLHTTP VB Object
Hi, I'm trying to the MSXML DOM 3 from Visual Basic and send XML to a PHP page that sits on my Apache web server on SCO Unix. This is my VB Code: Dim xmlstr As New XMLHTTP30 Dim sXML As String sXML = "Content-Type: text/xml;" sXML = sXML & "" sXML = sXML & "Initialize" sXML = sXML & "True" sXML = sXML & "" xmlstr.open "POST", "http://mywebserver/somepage.php";, False xmlstr.send sXML Set xmlstr = Nothing Pretty basic stuff. This succeeds, and at the Apache server level, in the logs I can see the POST request go through. In the file "somepage.php" - all I'm doing is running phpinfo() to see what the server thinks it's receiving. Back at the VB level, I can see xmlstr.responseText which is the output from phpinfo(); I am not getting any HTTP_POST_VARS like I expected to receive. Has anyone done anything like this before? Is this mainly an issue with Apache rather than PHP? Thanks, Sam -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] files
Good day to you all How can I keep php scripts from reading the /etc/passwd (for example) or any other file? Sincerely, G. Dimitrov -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Safe mode upload
Hi everyone. I have trouble uploading files while in safe mode .Warning: SAFE MODE Restriction in effect. The script whose uid is 206 is not allowed to access /tmp/php6wtDUc owned by uid 0 Can someone help me pass around this problem? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: bcc
// here's a nice example for a bcc adress, just generate a header $headers .= "From: Birthday Reminder <[EMAIL PROTECTED]>\r\n"; $headers .= "Cc: [EMAIL PROTECTED]\r\n"; $headers .= "Bcc: [EMAIL PROTECTED]\r\n"; /* and now mail it */ mail($to, $subject, $message, $headers); gurix "Tim Ward" <[EMAIL PROTECTED]> schrieb im Newsbeitrag 01D892A483EAD511926A00500416D3C004767A@HUNTERS-MAIL">news:01D892A483EAD511926A00500416D3C004767A@HUNTERS-MAIL... > If you mean blind carbon copy on e-mails then > www.php.net/manual/en/function.mail.php > <http://www.php.net/manual/en/function.mail.php> explains how to do it. If > you mean anything else please elaborate > > Tim > www.chessish.com <http://www.chessish.com> > > ------ > From: Deependra B. Tandukar [SMTP:[EMAIL PROTECTED]] > Sent: 07 January 2002 03:29 > To: PHP General > Subject: bcc > > Greetings ! > > Is Bcc supported in PHP? > > Looking forward to hearing from you. > > Warm Regards, > DT > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Pop3 and php
Is it possible to create a new pop account and a new alias on a server with php ? How ? Ilic. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] phpLISTMAN
On Sun, 21 Apr 2002 20:52:17 +0100, you wrote: >Is that a nice way of saying that I am wasting my time in doing such a >project? I just get frustrated at not having a Mailing List Manager that I >can use to manage large lists of users. > >Is it more bother than it is worth? Probably is. What would be useful is a set of PHP programmatical interfaces to other list managers (eg, Mailman), let them do what they do well, and have PHP talk to them to add/subscribe/etc. It's a real pity that they don't have XML-RPC interface (that I know of). Alister -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] extracting a html file name
Hello, Anybody have any suggestions on how i could get the test.html from the following: http://www.mydomain.com/member.php/randy/test.html Here is the part that I am having trouble with: the randy is not a directory it is a member name so it can change ie bill, car, jack, moneypower etc... example http://www.mydomain.com/member.php/moneypower/test.html I have experimented with the php variables that come in , but the only way I could figure out to get test.html out of there is If I captured the $PATH_INFO AND did a str_replace on all the html filenames on that site and did another one to get rid of the / . then I would have the member name and then i could do a string replace on the member name from the path info, which works , for now but as I get more files etc, it's gonna be a pain in the butt, there has to be a better way to do it. Any suggestions? Randy -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Load data infile
Hello, Is it possible to do the load data info mysql command via PHP I get an access denied error from mysql when i try to do that. Thanks Randy -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Need help with a PHP script
http://infinitep.t35.com/countmein/control.phtml\";>"; echo ""; echo ""; echo "Username:"; echo ""; echo "Password:"; echo " "; echo ""; } ?> I can't determine what's wrong. It prints T, but nothing else! -- - Roy W. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Need help with a PHP script
http://infinitep.t35.com/countmein/control.phtml\";>"; echo ""; echo ""; echo "Username:"; echo ""; echo "Password:"; echo " "; echo ""; } ?> I can't determine what's wrong. It prints T, but nothing else! -- - Roy W. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] ask for suggestion about printing
Dear Sir, We are choosing some tools for building applications. Php is a very good tools to build web applications, but we don't know if it can generate printable reports. "Printable reports" mean the report you can print what you see on screen (like winword). We are asking if at here, there are good solutions to generate reports. Simply generate html files and print them are not good solutions to us, becuase you have to remove header / footer of html files, and html files seems not to be used for printing. We know we can use pdflib to generate pdf files, but it is very expensive (at least US $1,000) . If there are no other ways, we will be forced to use the old client-server approach again because printing report is very important to us. Many thanks!!! Boris --- PLEASE READ: The information contained in this e-mail is confidential and intended for the named recipient(s) only. If you are not an intended recipient of this e-mail you must not copy, distribute or take any further action in reliance upon it and you should delete it and notify the sender immediately. E-mail is not a secure method of communication. GuruBase Technology Limited cannot accept responsibility for the accuracy or completeness of this message or any attachment(s). This transmission could contain viruses, be corrupted, destroyed, incomplete, intercepted, lost or arrive late. If verification of this e-mail is sought then please request a hard copy. Unless otherwise stated any views or opinions presented are solely those of the author and do not represent those of GuruBase Technology Limited. This e-mail is intended for information purposes only. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Can't AddType .htm
Thanks for the suggestion but it didn't make any difference. Currently my http.conf file has AddType application/x-httpd-php .htm .php .php4 .php3 AddType application/x-httpd-php-source .phps I also have no .htaccess file to overide these settings. Anyone got any more ideas? Regards Dan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] anyone using CVS for PHP dev?
What CVS software do you recommend? Dan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] setuid cgi calling a php script.
Hello, I am running the module version of php(4.0.5) AND have a cgi version compiled. The cgi version is php 4.1.1(compiled with --enable-discard-path) and this is on a sunOS 5.8 box. I am trying to run a setuid wrapper that calls a .php4 script. Whenever I enter the url to the .cgi wrapper it appears to echo the binary as opposed to executing it? If I execute the cgi from the command line it works fine. Also if I change the file that the cgi wrapper is pointing to to a .sh file it runs fine via command line or a url through apache. If I enter the url directly to the .php4 in the url it works and is parsed by the cgi version of php. Because of these symptoms I beleive it has something to do with my apache configuration? However below I am pasteing the cgi wrapper code, the apache configuration, and the unf.php4 file that the wrapper points to. I hope that someone will be kind enough to help me out. //cgi wrapper after gcc i would then chmod 4755. #include #include #include int main(void){ setuid(1001); setgid(10); system("/path/to/cgi-bin/unf.php4"); } //I have tried many different types of configurations with the following apache directives. //my current settings that should be relevant are below. AddHandler cgi-script .cgi .pl Action application/x-httpd-php /usr/local/bin/php AddType application/x-httpd-php .php .php4 //then where the virtual host is defined I have this. //i have replaced the directory path and real domain name with /path/to/mydomain AllowOverride None Options ExecCGI Order allow,deny Allow from all ScriptAlias /cgi-bin/ "/path/to/mydomain/public_html/cgi-bin/" ServerAdmin [EMAIL PROTECTED] DocumentRoot /path/to/mydomain/public_html ServerName www.mydomain.com ErrorLog /path/to/mydomain/public_html/logs/error_log CustomLog /path/to/mydomain/public_html/logs/access_log common //finally I will post the code to the unf.php4 file that is being called by the wrapper //removing the -q has no effect #!/usr/local/bin/php -q I apologize if I left out any important details. Josh -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Desparate... rebuild gone wrong
Hi, I have been toying with my php builds (on linux), and upgraded my mcrypt library and subsequently killed php. make[1]: Entering directory `/usr/src/1/php4/Zend' /bin/sh ../libtool --silent --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I../main -I../TSRM -g -O2 -prefer-non-pic -s tatic -c -o zend_language_parser.lo `test -f zend_language_parser.c || echo './'`zend_language_parser.c zend_language_parser.c: In function `zendparse': zend_language_parser.c:3088: Internal error: Segmentation fault. Please submit a full bug report. See http://bugzilla.redhat.com/bugzilla/> for instructions. make[1]: *** [zend_language_parser.lo] Error 1 make[1]: Leaving directory `/usr/src/1/php4/Zend' make: *** [all-recursive] Error 1 have tried new cvs, ./buildconf etc Any tips? sean -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Desparate... rebuild gone wrong
Sorry, wrong list -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] libxml
Firstly, thanks to those who replied to me last week about xmldom support with this error: Warning: Unknown list entry type in request shutdown (0) in Unknown on line 0 I've since tried a few combinations of versions of libxml, and expat (dont know if expat would matter), any was wondering if anyone who is using dom support correctly could tell me which versions work for them. Thank you, Sean -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] libxml
Hi, I need to use PHP from cvs for other reasons. Anyway, libxml 2.3.9 -> Configure wants a higher version (2.4.2). libxml 2.4.6 -> Causes the trouble. libxml 2.4.2 -> Wont build - dies after configre libxml 2.4.5 -> same problem BTW, this error appears for xmltree calls. am wokring on clearing out bad redhate 7.1 libraries which may be causing conflicts, before attempting again. Its my poorly educated guess, that this may be the cause. Sean -Original Message- From: Tamas Arpad [mailto:[EMAIL PROTECTED]] Sent: Wednesday, 24 October 2001 11:55 PM To: php; [EMAIL PROTECTED] Subject: Re: [PHP] libxml On Wednesday 24 October 2001 11:38, php wrote: > Firstly, > I use php 4.0.5 and libxml 2.3.9 on several machines without any problem. Older php and libxml combinations however caused many segmentation faults, especially with not well-formatted xmls. Are you sure that you warning message is related to libxml library? If you compile php without domxml the warning message disappears? Arpi > thanks to those who replied to me last week about xmldom support > with this error: > > Warning: Unknown list entry type in request shutdown (0) in > Unknown on line 0 > > I've since tried a few combinations of versions of libxml, and > expat (dont know if expat would > matter), any was wondering if anyone who is using dom support > correctly could > tell me which versions work for them. > > > Thank you, > > Sean -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] PHP templates vs XML
On Mon, 29 Oct 2001 14:02:32 -, you wrote: >The idea of a template system is that the HTML code/presentation of the final view to >the user/browser, can be >devised/maintained quite separately from the PHP code required to pull data out of >the back-end >db/processing/whatever. Correct? > >The systems I've looked at do this by allowing you to put 'tags' into the HTML which >are subsequently >expanded/replaced with 'real data' by the template processor immediately before >presentation to the browser. > >Now, again broadly speaking, XML allows us to define our own tags, which are >subsequently ... Correct? > >So: when would you use a template system and when would you use XML? >(and thus: on which one should I concentrate my research? ) I tend to use FastTemplate or similar systems to template most of my output - be that output HTML, Javascript - or XML. That, and the way a program is structured (collecting, processing and only then outputting it in whatever format) makes adding in different assortments of data in a variety of output formats truely trivial. In the current case, it's book information, so I collect ISBN data, which gets output. In an upcoming project, it will be news snippets - press releases and the like, where the templates will be updated and added to at will for different styles of output, as well as serialised (PHP/WDDX) and XML/RDF/Javascript output . The XML related templates of which you speak are generally XSL Templates, which are a programming language in themselves, and the XML parsing into XSL is an extensive overhead to carry. Alister -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] A primary practicall for the pros- the easiest way to sort files in a directory by name or date.?
Hello friends, Here's the question that's bugging me, explanations are under the - line. How do you 1)Sort files in a directory by date and print/echo into an html format (and the latest article is.) 2)Fastest way to list files by "Page name" -- Say you have a directory that you want to sort by date/size/whatever/ What do you think would be the best way to do it? arrays? MYSQL/or other DB? string comparison? other ideas? -- My sysadmin insists on database implementation- however, i have a variety of clients that are scared of databases , or are simply content with the provider they have, that doesn't offer DB (yes, there are those still!) What do you think would be the fastest and easiest way to This is close to the famous "resource grabber" script, but not quite- we are talking about the basic principles of {parsing a document for certain info and echo/printing it out into html. To keep the long question short- - I, must confess that i have little experience with PHP-programming- the wonderful implementation of php-MySQL and ZEND makes it too easy for me to put everything into a database and forget the whole thing. I believe that this matter is paramount because what we're dealing with is the most fundamental and practicall execution of a "site engine"/ "content management system"- i.e . the best and fastest code for sorting a directory by "sort by html name " or "sort by date" It is easily executed by XML or (RDF, etc)but, the question remains -what do you think is the best way to execute the sorting by PHP's sorting abilities? As far as i know, there is no title sorting in php, as opposed to perl/ Am i wrong? -- Best regards, php mailto:[EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] php dir listing a couple of solutions
Hello Jeremiah, There is a variety of options to list files in a directory. This will list sort files by date. $file".date( "F d Y H:i:s",$time)." "; } } krsort($data); while(list($key,$val) = each($data)){ echo $val; } ?> This one gets a tag out of a document (.*)", $file, $title_array); $fd="$date$title_array[1]"; echo $fd; } } ?> The actual script is very small- this is the basic snippet from the manual for readdir. Hope this helps. I am just starting out in this- anybody know how to combine a list by date with the parser, so that a script will display titles of html files sorted by latest document first? i can't seem to get the two arrays to work together,silly as it sounds. Someone help! Thank's to Dina for sharing this with me- and she says it ways guys on the #php irc channel that helped her out... There are some sample scripts in the php manual and the comments in the online documentation. Sorry guys, i keep these snippets in one file, so i don't know who wrote what. Don't get all upset now, it's not like i am using this for my benefit ;0 Monday, December 17, 2001, 5:55:48 PM, you wrote: JJ> Anyone have a php directory listing script that creates clickable links for JJ> all items in folder list? JJ> JJ -- Best regards, phpmailto:[EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Max file size of 2 bytes exceeded
Hi guys, I seem to be having a problem uploading images. My server is running on FreeBSD and i am using PHP ver 4 I have checked all the settings in my php.ini file. max_execution_time = 30 memory_limit = 8M post_max_size = 8M file_uploads = On upload_max_filesize = 2M I have a form that a user inputs data and can include an image file, using which i create a html page. Now the html page is being created in the particular directory but the image upload gives an an error saying Warning: Max file size of 2 bytes exceeded - file [image1] not saved in Unknown on line 0 Warning: Cannot send session cache limiter - headers already sent Could you please help me out on this. Regards, Arun -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] mail problem...
hai... I have install php and i want to create email direct but when i run my php...but i get error message Warning: Failed to Connect in e:/learn/php/mail.php on line 24 email failed or i need to add object mail in php anyone help me with this... my code like this... = Update User
Fw: [PHP] mail problem...
I have see my php.ini and i fill with my stmp server in my network but still i can't... which stmp server should i add it. in my network, there are smtp serverbut i not the server note : i have add to php.ini my smtp server is mail.pesat.net.id but still not working... can any one help me...? - Original Message - From: Ivan Balazs <[EMAIL PROTECTED]> To: php <[EMAIL PROTECTED]> Cc: Php Mailing List <[EMAIL PROTECTED]> Sent: Wednesday, July 04, 2001 6:52 PM Subject: Re: [PHP] mail problem... > Hi! > > It seems to be a php-specific problem. Check your php config file (in php4 > it is php.ini). There you should find a line related to the smtp server. > Fill it with its correct content. > > Balazs > > On Wed, 4 Jul 2001, php wrote: > > > hai... > > > > I have install php and i want to create email direct > > > > but when i run my php...but i get error message > > > > Warning: Failed to Connect in e:/learn/php/mail.php on line 24 > > email failed > > > > or i need to add object mail in php > > anyone help me with this... > > > > my code like this... > > = > > > > > > > > > > > > Update User > > > > > > > > > > > > > $applicant = "Hendra"; > > $company = "PT. Sistem Intergra Indonesia"; > > $phone = "324592"; > > > > $to= "[EMAIL PROTECTED]"; > > $subjek = "Testing php script"; > > $header ="\nForm: hrd.co.id\n"; > > $body = "\nName : " .quotemeta($application). > > "\nCompany : " .quotemeta($company). > > "\phone : " .quotemeta($phone); > > > > $success = mail($to, $subjek, $body, $header); > > > > if ($success) > > { > > echo("email has been send"); > > }else > > { > > echo("email failed"); > > > > } > > > > ?> > > > > > > > > > > > > > > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] VERY URGENT
> > > >I look forward to your earliest reply through my email > >address or by my > >Tel:874-762-727947, > >fax:874-762-727949. > > > >yours truly > > > >SOLOMON BALOGUN. > > this supposed banker is using a phone number that if dialed from anywhere in the world, can charge your phone bill $24,000. Yes twenty four thousand dollars. this is a scam to get you to dial the number, then you contest the bill, then they opt out of putting it on your credit report for $500 or something similiar. Its an extortion ripoff from the carribean. [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Iterating varibales
One solution $HTTP_POST_VARS['input_field'.$inc]; - Original Message - From: "Brian Ricks" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, July 05, 2001 3:08 PM Subject: [PHP] Iterating varibales > I have a site which uses two pages. The first page generates an HTML > form with multiple rows which is then POSTed to the second page. Sometimes > on the first page I have to create multiple rows of INPUT fields. To allow > a dynamic number of INPUT fields (say someone wants to add seven new numbers > to there online address book), set up a while look and echo " TYPE=text NAME=input_field".$inc.">"; where $inc is the incremented variable > in a loop. The result is something like this: > > > > > > The difficulty comes when I try to access these variables on the second > page. Currently I am using a script like this: > > $String = 'input_field'.$inc; > echo($$String); > > Sometimes my code requires multiple variables and conditions. When this > happens, using the above code is confusing a lengthy. Is there a way to > simplify this code at all? > > > _____ > Do You Yahoo!? > Get your free @yahoo.com address at http://mail.yahoo.com > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] _ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] session variable name into form
This works for me... echo ' '; - Original Message - From: "Andrew Austin" <[EMAIL PROTECTED]> To: "Php Lists (E-mail)" <[EMAIL PROTECTED]> Sent: Monday, July 09, 2001 12:25 AM Subject: [PHP] session variable name into form I have a session variable called auth_user and want to put the variable into a form field. I have tried the following and similar but am not succeeding. how else might it be done aa -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] _ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] HTML/PHP's static state problem.
As a matter of fact you can create dynamic comboboxes, but not with soley PHP. Because PHP is server-side, it has no idea what the user has selected on a form, etc. JavaScript, on the other hand, is client-side, so it keeps track of what the user is doing. I've done this very thing for a leasing company. I used PHP and MySQL to create a series of arrays in Javascript. When the user clicked on a value in the first combobox I used onClick to call a function which loaded information into the second box. - Original Message - From: "Alexander Deruwe" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, July 09, 2001 12:17 PM Subject: [PHP] HTML/PHP's static state problem. > Hey all, > > I've run into a little problem: > Take, for example, combobox A and combobox B. Suppose B's s depend on what is > selected in A.. > Is it possible to update B according to what is selected in A? > > Thanks, > > Alexander 'ad' Deruwe > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] _____ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] mail from
Hello all. Does anyone know how i can set up the "from " and "Return Address" fields in the mail functions in php? thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Debug problem
Hello, This "issue" has got me beaten. Have been trying for days to make some progress identifying a problem either with my php installation, or a class I am attempting to make use of: The error I receive is : Unknown list entry type in request shutdown (0) in Unknown on line 0 How can I find the "offending code"? To make matters worse, if apache segfaults, there is no core dump. No idea why, ulimit allows core files on the machine. I believe the problem is within either mcrypt and/or xml functions, but I cannot pinpoint the problem. Thank you for any advice, Sean -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] when logic fails, PHP randomly skips execution of lines
How about: $enc="abcdefe"; echo "swap: ".$enc."\n"; // swap 1st and 2nd half of string $len= (int)strlen($enc)/2; $enc=substr($enc,$len).substr($enc,0,$len); echo "swp2: ".$enc."\n"; echo "end\n"; Your /2 system wont' work when strlen is an odd number. Sean -Original Message- From: Jens Kisters [mailto:[EMAIL PROTECTED]] Sent: Wednesday, 19 September 2001 2:43 AM To: [EMAIL PROTECTED] Subject: [PHP] when logic fails, PHP randomly skips execution of lines Hello everbody, I have noticed something quite strange, i have a piece of code that looks like, i removed some of it to make it readable: there are no statements in the code that would cause the termination of the method before reaching the last line, no return, die or whatever. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] bugs.php.net - xmltree
Hello all, bugs.php.net is down, and I want to know if there is a current bug in xmltree in the current cvs. Anyone know? Sean -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Feature?
On Tue, 25 Sep 2001 09:36:57 -0500, you wrote: >>> >> function foo($p) { echo $p['fred'] . $p['banana']; } >>> foo(array('fred' => 'hello', 'banana' => 'world')); >>> ?> >> Yeap, I know that. I thought about this bit of hack but this breaks the >> conception on giving parameters. Also this trick cannot >> solve the problem with default parameters. If I have function with 5 >> params and all of them have default values and I want to pass >> value only to the second parameter what I have to do? >Maybe this? A bit verbose, but functional. >function foo($p) >{ > if (empty($p['fred'])) > $p['fred'] = 'hello'; // same for banana > echo $p['fred'] . $p['banana']; >} >foo(array('fred' => 'hello', 'banana' => 'world')); >?> >steve I'm not keen on adding lots of multi-line if statements - I prefer tp put things into arrays where I can. Easier to update them. 'default fred', 'foo_banana' => 'default bananananana', ); extract ($p, EXTR_PREFIX_ALL, 'foo'); // get params extract ($foodefault, EXTR_SKIP, "foo");// get defaults echo "$foo_fred / $foo_banana"; } echo "Both in place: "; foo(array('fred' => 'hello', 'banana' => 'world')); echo " Now with a missing param: "; foo(array('fred' => 'hello')); echo " Now both missing params: "; foo(array()); ?> -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] PHP is a Bloated Kludge, discuss!
On a conceptual level, I for one am a great fan of the kludge. Every piece of software is a trade off between performance and speed of development. You can have the fastest app in the world for $1,000,000 in development time OR you can write up a in-elegant solution in 5minutes ($50) and if its slow buy a bigger server for < $5000. You choose. Taken in relation to PHP. I would rather have the developers of it release new code that is not optimized, then have 1 release every two years, full of very pretty blocks of code designed to make the hardcore OOP textbook fanatic orgasm. Check out mozilla.org if you want to see what elegant programmers can do. - 2 years later a web browser intended to be small and fast, can know take out your trash, wash your car - and guess what? no release 1.0 yet. Sean -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] PHP is a Bloated Kludge, discuss!
I think the implication of the oringal poster was not the include/requires stuff, but more a build of PHP with --enable-100 options vs php-sharedetc -Original Message- From: Maxim Maletsky (PHPBeginner.com) [mailto:[EMAIL PROTECTED]] Sent: Friday, 5 October 2001 11:33 AM To: 'Opec Kemp'; [EMAIL PROTECTED] Subject: RE: [PHP] PHP is a Bloated Kludge, discuss! > > PHP on the other hand seems to load in ALL the code that > MAY be run. > > i.e. an include brings things in which are inside an if, > even if the > > if equates to false. > > A quick check in the manual, it states that: > > "Unlike include(), require() will always read in the target > file, even if the line it's on never executes. If you want to > conditionally include a file, use include(). The conditional > statement won't affect the require(). However, if the line on > which the require() occurs is not executed, neither will any > of the code in the target file be executed. " > http://www.php.net/manual/en/function.require.php > and > http://www.php.net/manual/en/function.require-once.php > > > So to do what you said i.e. conditionally load the > function/files that you want then you should use include(). > http://www.php.net/manual/en/function.include.php > and > http://www.php.net/manual/en/function.include-once.php > > So I don't buy this agument. This is outdated. Look int othe archives - I had this discussion with Zeev close to a year ago - since PHP 4.0.(something) require and include behaves in the exactly same way. Test it yourself on the latest release of PHP: require.test.php require.error.test yup!'; parse error; ?> Access it with: 1. require.test.php?go=e And then try it with: 2. require.test.php What do you buy now? Maxim Maletsky www.PHPBeginner.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Cookie Question
Hi, I am trying to get a cookie to set in Internet Explorer 7, I have tried several different setcookie() configurations, this is the latest. Yes, I read the manual and the user notes, but can't find anything specific about the different security levels in IE. $szCookieName = "MyCookie"; $nID = 2; $expireTime = 60*60; setcookie($szCookieName, $nID, time()-$expireTime,"/",www.mysite.com,false); However, they all work, only if I have the Privacy slider set to low in IE's options. As soon as I go up to medium, it will not work. And it works fine with firefox. The only difference I can see is that Medium Security adds the rule: Restricts first-party cookies that save information that can be used to contact you without your implicit consent. All I am storing is an integer value, why is IE seeing that as information that can contact you? Thanks for any help. Chris
Re: [PHP] Cookie Question
Oops, copy and paste error, that is the cookie I was using to delete. The one I am using to set is acutally: setcookie($szCookieName, $nID, time()+$expireTime,"/","www.mysite.com",false); 2009/1/17 PHP Hi, I am trying to get a cookie to set in Internet Explorer 7, I have tried several different setcookie() configurations, this is the latest. Yes, I read the manual and the user notes, but can't find anything specific about the different security levels in IE. $szCookieName = "MyCookie"; $nID = 2; $expireTime = 60*60; setcookie($szCookieName, $nID, time()-$expireTime,"/",www.mysite.com ,false); is there any reason that you set the expire in the past? That is usually used to delete a cookie, not set it. I had many problems with IE in general, but cookies were never a problem. However, they all work, only if I have the Privacy slider set to low in IE's options. As soon as I go up to medium, it will not work. And it works fine with firefox. The only difference I can see is that Medium Security adds the rule: Restricts first-party cookies that save information that can be used to contact you without your implicit consent. All I am storing is an integer value, why is IE seeing that as information that can contact you? Thanks for any help. Chris -- Torok, Alpar Istvan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Speed Opinion
Hi all, I am seeking some knowledge, hopefully I explain this right. I am wondering what you think is faster. Say you have 1000 records from 2 different tables that you need to get from a MySQL database. A simple table will be displayed for each record, the second table contains related info for each record in table 1. Is if faster to just read all the records from both tables into two arrays, then use php to go through the array for table 1 and figure out what records from table 2 are related. Or, you dump all the data in table 1 into an array, then as you go through each record you make a database query to table 2. PS: I know I can use a join, but I find anytime I use a join, the database query is extremely slow, I have tried it for each version of mysql and php for the last few years. The delay difference is in the order of 100x slower or more.
[PHP] Re: Classes in PHP5 || Puzzling Problem || Trying to Set $this->$name = $value
Hey all. Problem: Class test { var $foo = 0; function __construct() { $this->myfunc("foo", 1); } function myfunc($name, $val) { $this->$name = $val; } } Now, PHP correctly evaluates $this->$name as 0; i.e. the default property value of $this->foo. However, what I really need to have happen is for $this->$name = $val to be evaluated as $this->foo = 1; I have tried variations of $this->$$name = $val, $this->${$name} = $val, etc., but none of them work -- I keep getting an "Undefined variable: foo" error from PHP, when very clearly foo has been defined. This is a very simple example of what I'm actually attempting to implement, so please do not reply with, "Well, why not just do: $this->foo = $val" I'm sure intermediate to advanced PHP developers have run across this issue before -- feel free to chime in ;--) Thanks! --Noah -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Classes in PHP5 || Puzzling Problem || Trying to Set $this->$name = $value
Hey Stu. Well, isn't that special ;--) Jesus, I kept echoing $this->$foo within the parent class and getting 0, instead of 1. You wrote your reply; I checked the results again, and, voila, it worked -- obviously I must have been missing something and corrected the mistake in my endless trial and error process, lol. In any case, thanks for sorting me out! -Noah "Stut" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > PHP wrote: >> Problem: >> >> Class test { >> >> var $foo = 0; >> >> function __construct() { >> $this->myfunc("foo", 1); >> } >> >> function myfunc($name, $val) { >> $this->$name = $val; >> } >> } >> >> Now, PHP correctly evaluates $this->$name as 0; i.e. the default property >> value of $this->foo. >> >> However, what I really need to have happen is for $this->$name = $val to >> be evaluated as $this->foo = 1; > > Works fine here: http://dev.stut.net/php/classvar.php > > What do you get? > > -Stut -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php