Re: [PHP] fwrite not working in php3
[EMAIL PROTECTED] [EMAIL PROTECTED] wrote: hi there i have a little problem writing files on a php3 server this code worked yesterday but isnt $handle = fopen(/www_tools/apache/htdocs/phptest/temp_real/test.inc,'a'); Test your $handle to see if you successfully opened the file. if (! $handle) { // check permissions die('croak: can't open the file'); } $buffer = test; echo fwrite($handle,$buffer,4000); fclose($handle); i get a filesize of 0 and nothing writes to it what could it be ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] reading from dir and displaying thumbs
On Thursday 17 July 2003 02:44, Ryan A wrote: I want to convert my old java greetings programs into php scripts but am stuck on one little thing. I have a bunch of thumbnails in a 3 directories, the problem is the number of thumbnails in each directory is differient...how do i first make the script look into the directory, display (maybe 15 per page?) thumbnails with a link to the main program which will take one parameter depending on the thumbnail name. eg: thumbnail name is 1.jpg so that thumbnail should have a link such as a href /somescript.php?name=1 What exactly is your problem? reading from dir? manual Directory functions manual Filesystem functions displaying thumbs? manual Image functions -- Jason Wong - Gremlins Associates - www.gremlins.biz Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * -- Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general -- /* Digital circuits are made from analog parts. -- Don Vonada */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] state (Field Problem)
got it working.. -- Thank you, Louie Miranda ([EMAIL PROTECTED]) - Original Message - From: Jason Wong [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, July 17, 2003 1:49 PM Subject: Re: [PHP] state (Field Problem) On Thursday 17 July 2003 12:56, Louie Miranda wrote: Given this problem.. I have this html form that has a State option and it list all the US states. And i also have a State/Province field if ever he does not live in the US. My problem is how will i recognize both? I Mean, i will pass it over to a php program and ofcourse the php will parse the user _POST's and display it. USA / State: Washington DC Not USA / State: Whatever -- SELECT NAME=USAStateoption value=''Select Stateoption value=StateProvinceNot USA -- State or Province (Not USA):input type='text' name='StateProvince' -- How will i pass this? Double thing? and make it just one.. It's just a matter of deciding which field to use. If the user bothered to fill in 'StateProvince' then use and display that as the state. -- Jason Wong - Gremlins Associates - www.gremlins.biz Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * -- Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general -- /* Tell me, O Octopus, I begs, Is those things arms, or is they legs? I marvel at thee, Octopus; If I were thou, I'd call me us. -- Ogden Nash */ -- 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] How unsafe is register_globals?
Paul Chvostek [EMAIL PROTECTED] wrote: I've got this new server running with folks from all over uploading PHP code. I don't know all the folks, so I've turned on safe_mode, set an open_basedir to each user's documentroot, and left register_globals at its default. And now I'm getting scads of requests to turn on register_globals from folks who want to run php-nuke and some other established packages that rely on it. You could trick em and set error_reporting = E_ALL ~E_WARNING, and just say they need to get the software fixed :) I realize that register_globals isn't itself unsafe ... but do the potential insecurities put my server at risk, or only customer data? no server risks as far as I know, just security flaws in the applications. By turning register_globals on with an otherwise safe open_basedir, are there things that could be revealed about the server that would otherwise be hidden? My instinct says to leave register_globals OFF, and if folks want to run software that requires it, they should lobby the software maintainers to upgrade the software. (But how likely is php-nuke to get fixed?) I would tend to agree with you. Some influence on it depends on wether php is going to remove the ability to turn register_globals on and off through the config. As a developer myself, I'd rather see safer programming techniques used. Thoughts? -- Paul Chvostek [EMAIL PROTECTED] Operations / Abuse / Whatever it.canada, hosting and development http://www.it.ca/ Not much but I hope it gave ya my view point on it anyway Curt -- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] STRING FORMATTING QUESTION
Dale Hersh [EMAIL PROTECTED] wrote: My question is regarding strings in php. I have this form in which the user fills in a description. The problem is that if the user uses any aprostrophe's or any other unusual characters in the form, the string can not be inserted into my ms sql database. Any ideas? http://www.php.net/addslashes and http://www.php.net/manual/en/ref.sybase.php#ini.magic-quotes-sybase Thanks, Dale Curt -- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Anyone for cookies and milk? :-)
From the official doc: http://www.php.net/manual/en/function.setcookie.php All the arguments except the name argument are optional. You may also replace an argument with an empty string () in order to skip that argument. Because the expire and secure arguments are integers, they cannot be skipped with an empty string, use a zero (0) instead. setcookie(name2,1,0,,.bestwebhosters.com); or setcookie(name2,1,0,,.bestwebhosters.com,0); ;-) Curt Zirzow [EMAIL PROTECTED] a écrit dans le message de news: [EMAIL PROTECTED] Ryan A [EMAIL PROTECTED] wrote: Hey, Am just getting into PHP cookies and have gotten a problem...(surprise surprise) Am trying to set a basic cookie to see exactly how things work before I start using it in my apps, heres the code i am using: (SetCookieEx.php) ?php setcookie(name1,1,,,.bestwebhosters.com); setcookie(name2,1,,,.bestwebhosters.com); echo done; ? This is the output I am getting: ** Warning: setcookie() expects parameter 3 to be long, string given in /bestweb/public_html/testing/SetCookieEx.php on line 2 Warning: setcookie() expects parameter 3 to be long, string given in /bestweb/public_html/testing/SetCookieEx.php on line 3 done te quote site=php bool setcookie ( string name [, string value [, int expire [, string path [, string domain [, int secure]) [...] All the arguments except the name argument are optional. You may also replace an argument with an empty string () /quote at first look this appears to be a bug. but I have a fealing its only cause your error_reporting is set to E_ALL thus a warning is shown because the third paramater should be a interger so change it to: setcookie(name2,1,0,,.bestwebhosters.com); mabey documentation should be changed. This is how I am trying to read the cookies: (ReadCookieEx.php) ?php if (isset($_COOKIE ['name1'])){ echo $_COOKIE ['name1']; }else{echo wrong1;} if (isset($_COOKIE ['name2'])){ echo $_COOKIE ['name2']; }else{echo wrong2;} ? This is the output i am getting: *** wrong1wrong2 hmm.. few things: 1. is your setcookie returning true or false? 2. have you examined (or even see the cookie get set) the actual cookie to see 3. good reading for intro to cookies for programmers: http://wp.netscape.com/newsref/std/cookie_spec.html Anybody have any ideas? Cheers, -Ryan Curt -- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Code and Good Design Methods
Actually, MVC works really well with XML technologies, however, there needs alot of work in php's core to fully utilize the benefits of an mvc paradigm. -- BigDog On Wed, 2003-07-16 at 04:12, Joel Rees wrote: Hi Joel, Thanks for nice comments on the XML, XSL. I want to know more about it. can you please send me some article, links and tutorials? Thanks Hardik The ultimate source for xml related technologies is the World Wide Web Consortium at http://www.w3.org Most of the pages there are legalese, and really deep swimming. I think they do have some introductory materials, however. Model/View/Controller materials are most likely to be found in relation to SmallTalk, Objective C, and Java, since the concepts were originally worked out in those arenas. MVC and XML don't mix well, but the MVC concept is good to keep in mind if you want to use XML well. Other than that, there is plenty of material on the web. I know weeding out the bad stuff is not easy, but many of the pages that got me started have moved, I know not where. -- Joel Rees, programmer, Kansai Systems Group Altech Corporation (Alpsgiken), Osaka, Japan http://www.alpsgiken.co.jp -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] fwrite not working in php3
sorry guys the server was full again , doesnt return any error at all funny hey On Thursday 17 July 2003 09:46, [EMAIL PROTECTED] wrote: hi there i have a little problem writing files on a php3 server this code worked yesterday but isnt $handle = fopen(/www_tools/apache/htdocs/phptest/temp_real/test.inc,'a'); $buffer = test; echo fwrite($handle,$buffer,4000); fclose($handle); i get a filesize of 0 and nothing writes to it what could it be ? What does the error logs say? And try following the examples in the manual which incorporates the error checking that your code lacks. -- Jason Wong - Gremlins Associates - www.gremlins.biz Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * -- Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general -- /* The wages of sin are unreported. */ -- 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] Recomposed per instructions??? jpeg photo file upload problem
Hi All, I have a system that allows a person to upload photos to the server via an admin web form. I have been using the code for about a year with no problem. I designed it specifically for a client of mine that has just started cruising on a sailboat for a few years. They tryed uploading a photo from a public library via the web form and they got the error message that it was not a jpeg file. The relevent PHP code from my system for the checking is: if ($type != image/jpeg) { $ReturnSaying = !! The file is not a JPEG picture. Please try again; include(photo_error.php); exit; Anyway, this system has been tested and tested again on multiple platforms and conditions, except a public library. Question: Is it possible that the library is using some proxy system that is messing with the file so it comes out bad? Also, I have confirmed that the file is a jpeg file. Any ideas are greatly appreciated, John -- === John T. Beresford, Owner Digital Studio Design Edmond, OK http://www.digitalstudiodesign.com/ 405.760.0794 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Display HTML/PHP code on a web page
Jason Paschal [EMAIL PROTECTED] wrote: I've googled for it, but nothing came up. How do I display code on a page without it being executed? This has to do with how your webserver is set up, because it see's that its a php file it runs it thruough php. i want the page to display HTML code as it would look if you typed it into an editor (not encoded), and the code I want to display is being spit out by PHP. Which functions should i look at? i can get it to display with urlencode, but, of course, it's encoded. htmlentities(); Thank you, Your welcome. Jason P.S. a bit more info: Uh, oh.. I thought I had it under control :) I'm pulling a file from my site like this: $file = file(http:///file.php;); it works fine, but i want to be able to print out lines that meet a certain criteria, and that includes any of the html source that comes along with it. however, the the search script tries to execute the lines instead of displaying them. hm.. so your trying to fetch the file from a web server but don't want it to execute that file.php? See answer to first questoin. i don't want to write this to a file and then display as this is for admin purposes and i want to be able to do quick scans from a browser, and i want the matches to display underneath the search form, which I can do, but I make a note of it because the page still has to react as an html page (form submission). this make any sense? You lost me here. Curt -- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] imagecreate() error
no errors have come up yet, still getting the same problem too, I am pulling out my hair :) everything else works nice and smoothly just this whole gd thing... Marek Kilimajer [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Do you get any error at apache start up or in error logs? Michelle Bernard wrote: Hi Philip, Thanks for your response, I tried those steps, still no go, getting that same error -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Anyone for cookies and milk? :-)
Nomadeous [EMAIL PROTECTED] wrote: From the official doc: http://www.php.net/manual/en/function.setcookie.php All the arguments except the name argument are optional. You may also replace an argument with an empty string () in order to skip that argument. Because the expire and secure arguments are integers, they cannot be skipped with an empty string, use a zero (0) instead. I'm going to get a new eye doctor tomorrow :) Curt. -- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] XML
1. How efficient is to use XML+XSLT solution? Does it add processing overhead to the system? The efficientcy is relative to many factors, however I can stress this. The style sheets can be cached client side and then only xml data can be sent to the user. This reduces bandwidth and allows the transformation to be done on the client side instead of server side. Also not that xml + xslt transformations can be done server side. I usually do browser checks to determine if the browser is capable of handling xml+xslt transformations: if so then i send the files. Now if the browser is old or has issues (i.e. Internet explorer 5.5) then i can do the transformation server side and send html. Also note that you can set up a caching system at this point. If the transformation is done server side then yes you have that over head. However, if you are only serving up xml files and xslt files (part of the time on xslt) then u are reducing server load. 2. Do you have some examples which can describe the separation of layers using the XML+XSLT technology? Here are some sites that can get you started: 1. w3c.org 2. w3schools.com 3. xml.com 3. Currently i am storing the data in the mysql database. so first i need to create the xml file on fly and then i need to integrate this xml file with the xsl style sheet. Please corret if i am wrong anywhere yes that is correct...u can set up a system that creates xml files on the fly and then assigns an associated xsl(t) file for it. Basically, we are using php to create xml files to send to clients and xslt to transform that data. Think of it in these terms xml (raw data) and xslt (presentation logic). However, do not forget that xml (xslt, xsd, xpath, etc) are their own technologies so they require knowledge of them. With xml you can start working on creating your own web services that are php driven. That should get u started. -- BigDog -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Display HTML/PHP code on a web page
I've googled for it, but nothing came up. How do I display code on a page without it being executed? If you want to show php source then you can use show_source function or highlight_file function. -- BigDog -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Interesting question re HTTP Ranges and PHP
Dan Goodes [EMAIL PROTECTED] wrote: Hi folks, I currently have an interesting dilemma - any help is appreciated (if possible, CC directly to [EMAIL PROTECTED] as well as the list). What Ive got is a PHP wrapper script that performs authetication, and uses readfile() to return the requested file. So a user requests /path/to/file, PHP interveins and performs authentication, then does a realfile on /REAL/path/to/file to return the file. What I want is for the PHP script to read ALL the headers for the request (in particular, RANGE headers), and then return the relevant portion of the file. Can this be done fairly simply? Obviously there has to be additional headers returned to the client by the script when it's returning a RANGE response. Also is there a way for PHP to tell apache which response code to send? i.e. in my testing even tho I send a resume code with wget, apache's response is 200 OK, not 206 Partial Content... Any help/advice is appreciated... Now, first thing, I've tried this a while back with older versions of apache and php and couldn't get success :( it should be a rather simple task as long as the proper request and response headers are sent back. very first thing you want to send if the request if sufficient enough to be a range request: header('HTTP/1.0 206 Partial Content'); See RFC2616 10.2.7 for the response headers needed. HTH, Curt -- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Problem with Apache Web Server config file and PHP (please give advice on what problem may be me)
It prompts you for downloading the file because Apache doesn't recognize it as a PHP-file but sends it directly to the browser. The browser then doesn't find any known extension (.txt, .htm, .html) and prompts for download. As Marek allready explained, you need to configure Apache to recognize .php files. Marek sent you the lines you need already. I may add that maybe these lines need to be different with your Apache version (2), check the install.txt in your PHP directory for that. You may also need to replace the directoryname in de config lines for where your PHP is. Good luck! -- [Win2000 | Apache/1.3.23] [PHP/4.2.3 | MySQL/3.23.53] Ivo Fokkema PHP MySQL programmer Leiden University Medical Centre Netherlands Karen Santmyer [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] HI: Can anyone refer me to someone that can help with the problem below. I installed Apache Web Server on my laptop which has Windows XP. I then installed PHP. I followed the directions in the book I had on installing apache and php and what to add to the apache configuration file. Here is what is happening: After installing everything, I tested my Apache web server installation first and saw the apache web server page like the book said. Then it said to do a little php program - which had phpinfo() in it. But when I retyped the url I got a message that asked me did I want to download a file, which was the php program file. The PHP is 4.3.2 and the apache web server is 2.0. What am I doing wrong? Should I use apache 1.3.2? Please help. I understand everything, just don't know why it is prompting me to download a file. Thanks. Karen - Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] XML
Ray Hunter [EMAIL PROTECTED] wrote: 1. How efficient is to use XML+XSLT solution? Does it add processing overhead to the system? The efficientcy is relative to many factors, however I can stress this. The style sheets can be cached client side and then only xml data can be sent to the user. This reduces bandwidth and allows the transformation to be done on the client side instead of server side. Also not that xml + xslt transformations can be done server side. I usually do browser checks to determine if the browser is capable of handling xml+xslt transformations: if so then i send the files. Now if the browser is old or has issues (i.e. Internet explorer 5.5) then i can do the transformation server side and send html. Also note that you can set up a caching system at this point. I opened the page with Opera I was doing in XML+XSLT and my page disappeard :( Back to browscap days... i thought we were done with that. If the transformation is done server side then yes you have that over head. However, if you are only serving up xml files and xslt files (part of the time on xslt) then u are reducing server load. What I'm afraid of is that xslt will have the same problem that html had with the browser wars. excpecially since all layout and rendering is done based on what the client's software thinks. Curt -- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: really no way to get byte size of variable?
Baroiller Pierre-Emmanuel [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi, did you try count($value) and strlen($value) ? count($value) will give size of an array, and strlen($value) size of a string ... Actually, count($value) returns the amount of values within the array, not the size of it all. If strlen($value) would be enough for you to determine the amount of bytes, you could use this for an array (note that keys are stored as well and thus take memory): foreach ($array as $key = $val) { $total_size += strlen($key) + strlen($val); } But I'm really not sure how PHP stores arrays, so I don't know if $total_size is even close to the amount of bytes used for an array. -- [Win2000 | Apache/1.3.23] [PHP/4.2.3 | MySQL/3.23.53] Ivo Fokkema PHP MySQL programmer Leiden University Medical Centre Netherlands -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] How unsafe is register_globals?
On Thu, Jul 17, 2003 at 01:56:57PM +0800, Jason Wong wrote: gets the error php_flag not allowed here. I see from the comments at http://www.php.net/register_globals that I need AllowOverride Options to make that function ... but is it possible to have fine-grained enough an AllowOverride statement that only register_globals can be changed? I wouldn't want a user to use his .htaccess file to turn off safe_mode or open_basedir. Take control of the setting yourself by setting it httpd.conf, inside the container of the virtual host in question. Not so easy with mod_vhost_alias, given that I want it to apply only to certain users, and possibly only for directories for those users. The .htaccess solution is the right one unless AllowOverride Options allowed the user to turn off safe_mode and open_basedir. I don't have a non-production machine to test it on at the moment. Any idea how I give the user local register_globals control without also letting them alter the other php.ini options? -- Paul Chvostek [EMAIL PROTECTED] Operations / Abuse / Whatever it.canada, hosting and development http://www.it.ca/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Need Help: Please click on Test Link
Well, worked nicely for me... Can you tell me where you can fetch this kind of information? -- [Win2000 | Apache/1.3.23] [PHP/4.2.3 | MySQL/3.23.53] Ivo Fokkema PHP MySQL programmer Leiden University Medical Centre Netherlands Suhas Pharkute [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi I need your help. Can you please visit a site http://sspsoft.com/test/ip2ll.php (in case if you cannot get it, please click on http://ns1.webhostdns.us and then click on the website link.) which should identify your Country, State, City. Please click on one of the buttons to provide feedback. I am trying to get hits from different parts of the world to make sure that it works. Planning to develop a webservice from this. Thanks in advance, Suhas _ Encrypt your PHP code for FREE at http://encphp.sspsoft.com _ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: include statement giving me hives! - help
On Thursday 17 July 2003 06:25, DougD wrote: when you call your script, is $point defined somewhere ? if $point is empty, you'll get an empty string for $links_include and include $links_include will not work. yes, I should have mentioned: $point is defined in the URL string http://something.com/index.html?point=12 That's not the point (pun intended). Is $point empty (YES/NO)? Or does it contain what you expect it to contain? -- Jason Wong - Gremlins Associates - www.gremlins.biz Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * -- Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general -- /* But you shall not escape my iambics. -- Gaius Valerius Catullus */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Recomposed per instructions??? jpeg photo file upload problem
On Thursday 17 July 2003 14:40, John T. Beresford wrote: I have a system that allows a person to upload photos to the server via an admin web form. I have been using the code for about a year with no problem. I designed it specifically for a client of mine that has just started cruising on a sailboat for a few years. They tryed uploading a photo from a public library via the web form and they got the error message that it was not a jpeg file. The relevent PHP code from my system for the checking is: if ($type != image/jpeg) { Did you try echo($type) to see what type is being returned? -- Jason Wong - Gremlins Associates - www.gremlins.biz Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * -- Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general -- /* To add insult to injury. -- Phaedrus */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] really no way to get byte size of variable?
Petre Agenbag [EMAIL PROTECTED] wrote: Hi List Just want to make sure: Is there no way for me to easily determine the byte size occupied by a variable (regardless of type)? It might be trivial, or I'm missing the point (as per usual)... I think I'm missing the point. I'm not sure exaclty how or why you want to know the actual size in bytes the paticular variable is. I would like to find the actual byte size that is transmitted when say a $_POST variable is sent, or how much memory a particular variable is taking up. Just want to make sure. Some of the post received so far suggest that one character = one byte etc, but I would love to work with something more precise if possible, also, is a variable contains a multi-dimensional array, would that one character = one byte formula still return a fair representation? yes Curt -- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Recomposed per instructions??? jpeg photo file upload problem
John T. Beresford [EMAIL PROTECTED] wrote: Hi All, Hi [...] The relevent PHP code from my system for the checking is: if ($type != image/jpeg) { $ReturnSaying = !! The file is not a JPEG picture. Please try again; include(photo_error.php); exit; where is the variable $type comming from? Curt. -- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] session objects crossing applications
I need help. I've got two copies of my application.foobar and foobar_dev When I go to http://foo.com/foobar/ a session is created and a database connection class is established and placed into this session. Then if within the same browser (using internet explorer) I go to http://foo.com/foobar_dev/ it will see not create a new database connection b/c it finds the one from http://foo.com/foobar. foobar and foobar_dev are suppose to point to different databases, but other than that all is identical. If I open a new internet explorer window via the windows Start menu all is fine. I thought if the url base is different then the session would be different? This is how it is with JSP. Am I miss-understanding something? Thanks for any assistance with this. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP code beautifier?
Hi List Does anybody know any good PHP code beautifiers/formaters? Preferably one which is configurable so I can specify the exact format I want. Cheers, Jacob Vennervald -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] retrieving form checkbox values
I have a form which I want to post multiple values from one function to another using checkboxes. Having one value is simple- the form submits the value $File and is then retrieved in the target function via $_Request['File'] So far so good. Now I want to have multiple values for $File, because $File is a value assigned to a dynamically generated list of files in a folder (which will change from folder to folder). If I have multiple input type=checkbox name=File value=$File then only the last value is posted to the next function and retrieved by $_Request['File'] How can I post and retrieve all values of $File or am I going about this the wrong way? Thanks
Re: [PHP] retrieving form checkbox values
On Thursday 17 July 2003 16:45, caspar kennerdale wrote: I have a form which I want to post multiple values from one function to another using checkboxes. Having one value is simple- the form submits the value $File and is then retrieved in the target function via $_Request['File'] So far so good. Now I want to have multiple values for $File, because $File is a value assigned to a dynamically generated list of files in a folder (which will change from folder to folder). If I have multiple input type=checkbox name=File value=$File then only the last value is posted to the next function and retrieved by $_Request['File'] How can I post and retrieve all values of $File or am I going about this the wrong way? manual PHP and HTML Or search the archives and/or ask google. -- Jason Wong - Gremlins Associates - www.gremlins.biz Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * -- Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general -- /* My doctor told me to stop having intimate dinners for four. Unless there are three other people. -- Orson Welles */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] How unsafe is register_globals?
On Thursday 17 July 2003 15:07, Paul Chvostek wrote: Take control of the setting yourself by setting it httpd.conf, inside the container of the virtual host in question. Not so easy with mod_vhost_alias, given that I want it to apply only to certain users, and possibly only for directories for those users. OK, try adding the settings into directory containers for those special cases -- I've never tried this scenario before so there's no certainty that it'll work. The .htaccess solution is the right one unless AllowOverride Options allowed the user to turn off safe_mode and open_basedir. I don't have a non-production machine to test it on at the moment. Any idea how I give the user local register_globals control without also letting them alter the other php.ini options? No idea. AFAIK the restrictions that you can place on what .htaccess can control are internal to apache. -- Jason Wong - Gremlins Associates - www.gremlins.biz Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * -- Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general -- /* An evil mind is a great comfort. */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP POS program
What about this, i looked on google and found this - http://www.google.com/search?q=point-of-sale%20program%20+%20phpsourceid=mozilla-searchstart=0start=0ie=utf-8oe=utf-8 http://www.google.com/search?q=point-of-sale%20program%20+%20phpsourceid=mozilla-searchstart=0start=0ie=utf-8oe=utf-8 And it also came up with : http://sourceforge.net/projects/phppointofsale/ And there are probably many more, or you could develope you own Best regards, Davy Obdam Angelo Zanetti wrote: Anyone know where I can download a demo point-of-sale program from? preferably written in php and preferably a point-of-sale designed for restaurants? any links etc will be great TIA Angelo -- --- Davy Obdam Web application developer Networking4all email: [EMAIL PROTECTED] email: [EMAIL PROTECTED] internet: http://www.networking4all.com --- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Recomposed per instructions??? jpeg photo file uploadproblem
At 8:13 AM + on 7/17/03, Curt Zirzow wrote: The relevent PHP code from my system for the checking is: if ($type != image/jpeg) { $ReturnSaying = !! The file is not a JPEG picture. Please try again; include(photo_error.php); exit; where is the variable $type comming from? Hi Curt, It's coming from the following: $type = $_FILES['FormPhotoName']['type']; $tmp_name = $_FILES['FormPhotoName']['tmp_name']; $error = $_FILES['FormPhotoName']['error']; Essentially, this system works, it just doesn't work at a particular location. I am thinking that the location has a proxy set up that's messing with the http upload. Thanks for any help, John -- === John T. Beresford, Owner Digital Studio Design Edmond, OK http://www.digitalstudiodesign.com/ 405.760.0794 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] retrieving form checkbox values
I think you have to do input type=checkbox name=File[] Then $File becomes an array. If you want to retrieve the value for each checkbox you can use a for loop and do value=$File[$i] -Original Message- From: Jason Wong [mailto:[EMAIL PROTECTED] Sent: 17. júlí 2003 08:58 To: [EMAIL PROTECTED] Subject: Re: [PHP] retrieving form checkbox values On Thursday 17 July 2003 16:45, caspar kennerdale wrote: I have a form which I want to post multiple values from one function to another using checkboxes. Having one value is simple- the form submits the value $File and is then retrieved in the target function via $_Request['File'] So far so good. Now I want to have multiple values for $File, because $File is a value assigned to a dynamically generated list of files in a folder (which will change from folder to folder). If I have multiple input type=checkbox name=File value=$File then only the last value is posted to the next function and retrieved by $_Request['File'] How can I post and retrieve all values of $File or am I going about this the wrong way? manual PHP and HTML Or search the archives and/or ask google. -- Jason Wong - Gremlins Associates - www.gremlins.biz Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * -- Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general -- /* My doctor told me to stop having intimate dinners for four. Unless there are three other people. -- Orson Welles */ -- 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] include statement giving me hives! - help
DougD wrote: I am new to all this, but here is the basic code: $link_titles = file('links/master.txt'); $links_include = $link_titles[$point]; // path to directory include $links_include; If I echo the value of $links_include just prior to the include() function it contains what I would expect it to contain Except it contains newline at the end. Get rid of the newline and it should work. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] retrieving form checkbox values
Here's my register globals off version: Make sure that your form send a post with the highest index value [howmany]. $howmany=$_POST['howmany']; for ($index = 1; $index $howmany; $index++){ $checkbox = 'checkbox'.$index; $checkbox= $_POST[$checkbox]; ... Repeat for your other row-level form inputs ... Do something with the data... } Hope this helps George in Oxford -Original Message- From: Sævar Öfjörð [mailto:[EMAIL PROTECTED] Sent: 17 July 2003 10:35 am To: [EMAIL PROTECTED] Subject: RE: [PHP] retrieving form checkbox values I think you have to do input type=checkbox name=File[] Then $File becomes an array. If you want to retrieve the value for each checkbox you can use a for loop and do value=$File[$i] -Original Message- From: Jason Wong [mailto:[EMAIL PROTECTED] Sent: 17. júlí 2003 08:58 To: [EMAIL PROTECTED] Subject: Re: [PHP] retrieving form checkbox values On Thursday 17 July 2003 16:45, caspar kennerdale wrote: I have a form which I want to post multiple values from one function to another using checkboxes. Having one value is simple- the form submits the value $File and is then retrieved in the target function via $_Request['File'] So far so good. Now I want to have multiple values for $File, because $File is a value assigned to a dynamically generated list of files in a folder (which will change from folder to folder). If I have multiple input type=checkbox name=File value=$File then only the last value is posted to the next function and retrieved by $_Request['File'] How can I post and retrieve all values of $File or am I going about this the wrong way? manual PHP and HTML Or search the archives and/or ask google. -- Jason Wong - Gremlins Associates - www.gremlins.biz Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * -- Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general -- /* My doctor told me to stop having intimate dinners for four. Unless there are three other people. -- Orson Welles */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] session objects crossing applications
Set up cookie parameters before calling session_start(): void session_set_cookie_params ( int lifetime [, string path [, string domain [, bool secure]]]) Jason wrote: I need help. I've got two copies of my application.foobar and foobar_dev When I go to http://foo.com/foobar/ a session is created and a database connection class is established and placed into this session. Then if within the same browser (using internet explorer) I go to http://foo.com/foobar_dev/ it will see not create a new database connection b/c it finds the one from http://foo.com/foobar. foobar and foobar_dev are suppose to point to different databases, but other than that all is identical. If I open a new internet explorer window via the windows Start menu all is fine. I thought if the url base is different then the session would be different? This is how it is with JSP. Am I miss-understanding something? Thanks for any assistance with this. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] zend optimizer for 4.3.2
Does anyone know when Zend Optimizer will support up to PHP version 4.3.2? Currently it only supports up to 4.3.0. Sincerely, Michael Rubin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] retrieving form checkbox values
This is not necessary, you can do foreach($_POST['File'] as $file) { // ... } George Pitcher wrote: Here's my register globals off version: Make sure that your form send a post with the highest index value [howmany]. $howmany=$_POST['howmany']; for ($index = 1; $index $howmany; $index++){ $checkbox = 'checkbox'.$index; $checkbox= $_POST[$checkbox]; ... Repeat for your other row-level form inputs ... Do something with the data... } Hope this helps George in Oxford -Original Message- From: Sævar Öfjörð [mailto:[EMAIL PROTECTED] Sent: 17 July 2003 10:35 am To: [EMAIL PROTECTED] Subject: RE: [PHP] retrieving form checkbox values I think you have to do input type=checkbox name=File[] Then $File becomes an array. If you want to retrieve the value for each checkbox you can use a for loop and do value=$File[$i] -Original Message- From: Jason Wong [mailto:[EMAIL PROTECTED] Sent: 17. júlí 2003 08:58 To: [EMAIL PROTECTED] Subject: Re: [PHP] retrieving form checkbox values On Thursday 17 July 2003 16:45, caspar kennerdale wrote: I have a form which I want to post multiple values from one function to another using checkboxes. Having one value is simple- the form submits the value $File and is then retrieved in the target function via $_Request['File'] So far so good. Now I want to have multiple values for $File, because $File is a value assigned to a dynamically generated list of files in a folder (which will change from folder to folder). If I have multiple input type=checkbox name=File value=$File then only the last value is posted to the next function and retrieved by $_Request['File'] How can I post and retrieve all values of $File or am I going about this the wrong way? manual PHP and HTML Or search the archives and/or ask google. -- Jason Wong - Gremlins Associates - www.gremlins.biz Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * -- Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general -- /* My doctor told me to stop having intimate dinners for four. Unless there are three other people. -- Orson Welles */ -- 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] Oracle CMS
Are there any open source CMSs that work with Oracle? Thanks, Chris _ STOP MORE SPAM with the new MSN 8 and get 2 months FREE* http://join.msn.com/?page=features/junkmail -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Need Help: Please click on Test Link
Suhas Pharkute wrote: http://sspsoft.com/test/ip2ll.php (in case if you cannot get it, please click on http://ns1.webhostdns.us and then click on the website link.) which should identify your Country, State, City. Please click on one of the buttons to provide feedback. I'm in London, England and got the following result: United Kingdom, England, Southend-on-Sea So providing feedback with your options is a little tricky. England is a country not a state. It'll cause confusion if you regard it as such. Southend-on-Sea is not where I'm located. Close but no cigar :) Peter -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] zend optimizer for 4.3.2
I might be wrong (it's been known in the past!) but I think that theirs supports 4.3.x Best regards Adrian sourceguardian.com -Original Message- From: Michael Rubin [mailto:[EMAIL PROTECTED] Sent: 17 July 2003 10:30 To: [EMAIL PROTECTED] Subject: [PHP] zend optimizer for 4.3.2 Does anyone know when Zend Optimizer will support up to PHP version 4.3.2? Currently it only supports up to 4.3.0. Sincerely, Michael Rubin -- 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] Recomposed per instructions??? jpeg photo file upload problem
I don't understand how it has been working till now! My IE6.0 and IE5.0 sends image/pjpeg for jpg files. John T. Beresford wrote: At 8:13 AM + on 7/17/03, Curt Zirzow wrote: The relevent PHP code from my system for the checking is: if ($type != image/jpeg) { $ReturnSaying = !! The file is not a JPEG picture. Please try again; include(photo_error.php); exit; where is the variable $type comming from? Hi Curt, It's coming from the following: $type = $_FILES['FormPhotoName']['type']; $tmp_name = $_FILES['FormPhotoName']['tmp_name']; $error = $_FILES['FormPhotoName']['error']; Essentially, this system works, it just doesn't work at a particular location. I am thinking that the location has a proxy set up that's messing with the http upload. Thanks for any help, John -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Re: Need Help: Please click on Test Link
All I got was Error -Original Message- From: Peter Clarke [mailto:[EMAIL PROTECTED] Sent: Thursday, July 17, 2003 7:14 AM To: [EMAIL PROTECTED] Subject: [PHP] Re: Need Help: Please click on Test Link Suhas Pharkute wrote: http://sspsoft.com/test/ip2ll.php (in case if you cannot get it, please click on http://ns1.webhostdns.us and then click on the website link.) which should identify your Country, State, City. Please click on one of the buttons to provide feedback. I'm in London, England and got the following result: United Kingdom, England, Southend-on-Sea So providing feedback with your options is a little tricky. England is a country not a state. It'll cause confusion if you regard it as such. Southend-on-Sea is not where I'm located. Close but no cigar :) Peter -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] bcc on php
On Thu, 17 Jul 2003 05:55:27 +, Curt Zirzow wrote: Example 4. Sending complex email http://www.php.net/manual/en/function.mail.php um.. don't use that example, it is the incorrect way to send a bcc. for one it wont work and two the people will see the bcc, defeating the purpose of a bcc. Have you tried it? I wrote a php script just last night that used this format and it works like a champ! If you do a search for bcc on that page you will see that bcc is NOT handled by the MTA but by PHP. I have it bcc'ing to 3 or 4 people using a single header Bcc: email, email, email, email and it bcc's to all with NO copy of the bcc'ed folk in the header. Now for the caveat this is php 3.0.? For some reason the ISP I'm using doesn't have php 4 set to run from the command line. Why would I care if it runs from the command line? Because I have my little script set up as a cron job, so it has to be command line. :) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] zend optimizer for 4.3.2
on 7/17/03 7:20 AM, Adrian Teasdale at [EMAIL PROTECTED] wrote: I might be wrong (it's been known in the past!) but I think that theirs supports 4.3.x The OS X version came out yesterday and it DOES require 4.3.2 Not sure about the other platforms. ++ Mike Yrabedra (President) 323 Incorporated Home of MacDock, MacAgent and MacSurfshop ++ W: http://www.323inc.com/ P: 770.382.1195 F: 734.448.5164 E: [EMAIL PROTECTED] I: ichatmacdock ++ Whatever you do, work at it with all your heart, as working for the Lord, not for men. ~Colossians 3:23 {{{ ++ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] 4.3.2 fopen() problem/limit?
I just upgraded to 4.3.2 and one of my scripts will not work now. The script basically used fopen to get a file, then it would write it to a static page (cutting down on DB access). The script has worked fine for months under 4.3.0, but not under 4.3.2 It looks as if it only opens and writes half of the source page. Almost like it gets to 20k then stops the stream. Anyone know if this is a bug or if there is a way to fix the problem? TIA ++ Mike Yrabedra (President) 323 Incorporated Home of MacDock, MacAgent and MacSurfshop ++ W: http://www.323inc.com/ P: 770.382.1195 F: 734.448.5164 E: [EMAIL PROTECTED] I: ichatmacdock ++ Whatever you do, work at it with all your heart, as working for the Lord, not for men. ~Colossians 3:23 {{{ ++ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] 4.3.2 fopen() problem/limit?
check if allow_url_fopen is on in /etc/php.ini or C:\Windows\php.ini Un saludo, Danny -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] bcc on php
be aware that BCC header some times don't works properly on Windows platforms and the recipient can see the BCC header from the source of mail! :o regards Abdolhamid Joukar ] - Original Message - From: Ralph Guzman [EMAIL PROTECTED] To: 'Louie Miranda' [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Thursday, July 17, 2003 5:27 AM Subject: RE: [PHP] bcc on php Just include Bcc in the extra headers. Take a look at Example 4. Sending complex email http://www.php.net/manual/en/function.mail.php -Original Message- From: Louie Miranda [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 16, 2003 5:47 PM To: [EMAIL PROTECTED] Subject: [PHP] bcc on php hello, how do you make a bcc on php on a form 2 email settings.. -- Thank you, Louie Miranda ([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 General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Display HTML/PHP code on a web page
i'm not sure but i think a tag in html is available which name code and /code you should put your codes between this couple ... regards Abdolhamid Joukar - Original Message - From: Jason Paschal [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, July 17, 2003 9:29 AM Subject: [PHP] Display HTML/PHP code on a web page I've googled for it, but nothing came up. How do I display code on a page without it being executed? i want the page to display HTML code as it would look if you typed it into an editor (not encoded), and the code I want to display is being spit out by PHP. Which functions should i look at? i can get it to display with urlencode, but, of course, it's encoded. Thank you, Jason P.S. a bit more info: I'm pulling a file from my site like this: $file = file(http:///file.php;); it works fine, but i want to be able to print out lines that meet a certain criteria, and that includes any of the html source that comes along with it. however, the the search script tries to execute the lines instead of displaying them. i don't want to write this to a file and then display as this is for admin purposes and i want to be able to do quick scans from a browser, and i want the matches to display underneath the search form, which I can do, but I make a note of it because the page still has to react as an html page (form submission). this make any sense? _ The new MSN 8: advanced junk mail protection and 2 months FREE* http://join.msn.com/?page=features/junkmail -- 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] NON-PHP question (I-frames)
Do we have any I-frame experts for IE. I am trying to use multiple I-frames in Internet Explorer. When two of them are applied they both lose their positon attributes. Any clues? html head style type=text/css #floatframe {position:absolute; left: 40px; top: 40px; width: 30px; height: 225px; z-index: 100; } /style /head div id=floatframe2 iframe text=#ff width=250 height=200 name=floatframe2 src=ticket_phone.php align=left frameborder=0 vspace=0 hspace=0 /iframe /body /html -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Display HTML/PHP code on a web page
[snip] i'm not sure but i think a tag in html is available which name code and /code [/snip] You can also put your code between pre/pre tags (pre-formatted text) I do this to display pre formatted text in text area boxes h3 class=nomargin?php print($rowart-title); // article title ?/h3 By: ?php print($rowart-name); //article author ?br Published: ?php print($rowart-publish); //article date ?br ?php $thebody = $rowart-body; // results of the article query from the DB $thebody = ereg_replace(chr(10).chr(13), /p\np, $thebody); // paragraph seperations // replace pre tages with textarea tags $thebody = ereg_replace(pre, textarea cols=\80\ rows=\10\ wrap=\off\, $thebody); $thebody = ereg_replace(/pre, /textarea, $thebody); // print the article out with formatting in place. print(p\n . $thebody . \n/p\n); ? HTH! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Linux Installation
hi, first of all i don't know anything about linux . wehad a administratorfor all our linux requirements, now that the company has fired him (without hiring anyone for the job) i am left on my own . i want to use vpopmail extension. but the problem is it is not installed on the linux server. i want to know what is the command (exact command) that i use to install configure vpopmail . without disturbing the existing system here what i get from phpinfo() './configure' '--prefix=/usr/local/psa/apache' '--with-apxs=/usr/local/psa/apache/bin/apxs' '--with-regex=php' '--with-config-file-path=/usr/local/psa/apache/conf' '--enable-sockets' '--enable-track-vars' '--with-mysql=/usr/local/psa/mysql' '--with-gettext' '--with-zlib' '--with-xml' '--disable-debug' '--enable-pear' '--with-imap=/home/soft/psa_compiled/imap-2002b' '--enable-ftp' '--with-zend' '--with-mssql' will be thankful Haseeb IncrediMail - Email has finally evolved - Click Here
Re: [PHP] 4.3.2 fopen() problem/limit?
on 7/17/03 7:55 AM, [EMAIL PROTECTED] at [EMAIL PROTECTED] wrote: check if allow_url_fopen is on in /etc/php.ini or C:\Windows\php.ini It is, and fopen IS working. The problem is that it is only pulling half of the page down? Like it is reaching a limit to the amount of data it will pull??? ++ Mike Yrabedra (President) 323 Incorporated Home of MacDock, MacAgent and MacSurfshop ++ W: http://www.323inc.com/ P: 770.382.1195 F: 734.448.5164 E: [EMAIL PROTECTED] I: ichatmacdock ++ Whatever you do, work at it with all your heart, as working for the Lord, not for men. ~Colossians 3:23 {{{ ++ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] 4.3.2 fopen() problem/limit?
ohh, excuse me, i read bad your message. What is the size of the file ?? check in php.ini the postmax_size param. Is very strange Un saludo, Danny -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] deleting one cookie is deleting both..why? (tiny scripts)
Hi again, I am setting 2 cookies like so:(setCookie.php) ?php setcookie(name1,1,0,,.bestwebhosters.com); setcookie(name2,1,0,,.bestwebhosters.com); echo done; ? then I am trying to delete the second cookie like so:(delCookie.php) ?php setcookie(name2,1,-3600,,.bestwebhosters.com); echo done; ? a href=http://bestwebhosters.com/testing/ReadCookieEx.phpRead/a When I check ReadCookie it shows me that both hav been deletedwhy? How can i delete just one of the two cookies? *** (for those of you intrested heres my ReadCookie file) ?php if (isset($_COOKIE ['name1'])){ echo $_COOKIE ['name1']; }else{echo wrong1;} if (isset($_COOKIE ['name2'])){ echo $_COOKIE ['name2']; }else{echo wrong2;} ? Kindly reply. Cheers, -Ryan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] :: operator problem
Hi, I have defined class 'image' with method 'getData' so can I do this ?php $class = 'image'; $id = '1234567abcdef'; $result = $class::getData($id); ? TIA -- Mirek Novak jabberID: [EMAIL PROTECTED] ICQ: 119499448 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Parsing POP3 Mailbox
Ok, this is what I want to do. I would like to parse a mailbox and forward the returned mail in it to other users. For instance, if I send an e-mail to [EMAIL PROTECTED] and [EMAIL PROTECTED] doesn't exist it is going to send the return to [EMAIL PROTECTED]. I want to parse [EMAIL PROTECTED] and send the e-mail to whoever is in the Disposition-Notification-To header of the e-mail. Anyone know where I can find a good script to parse mail boxes or maybe give me an idea of where to start? I checked hotscripts and some others but they are complete web based e-mail systems. I'd like to run this as a cron job if possible and I don't want to tear another system all apart if I don't have to. Thanks in advance! Brian -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] 4.3.2 fopen() problem/limit?
on 7/17/03 8:28 AM, [EMAIL PROTECTED] at [EMAIL PROTECTED] wrote: ohh, excuse me, i read bad your message. What is the size of the file ?? check in php.ini the postmax_size param. 8MB, that should plenty big enough. ++ Mike Yrabedra (President) 323 Incorporated Home of MacDock, MacAgent and MacSurfshop ++ W: http://www.323inc.com/ P: 770.382.1195 F: 734.448.5164 E: [EMAIL PROTECTED] I: ichatmacdock ++ Whatever you do, work at it with all your heart, as working for the Lord, not for men. ~Colossians 3:23 {{{ ++ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] SOLVED :: operator problem
Mirek Novak napsal(a): Hi, I have defined class 'image' with method 'getData' so can I do this ?php $class = 'image'; $id = '1234567abcdef'; $result = $class::getData($id); ? TIA Ha, found solution in online docs wiki, chapter http://www.php.net/manual/en/keyword.paamayim-nekudotayim.php -- Mirek Novak -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] outputting a carriage return
Hi all Can someone tell me why if i echo a line like this: echo this is a \n newline; the output is: this is a newline. But if i do this: $text=this is a \n newline; echo $text; the output is: this is a newline? Is there something i have to do to a variable in order for echo or print to treat special chars like '\n' correctly? Thanks for any answers in advance! - Want to chat instantly with your online friends? Get the FREE Yahoo!Messenger
[PHP] scoring/sorting db search results based on score
looking for code snippets or links to examples of the following; - Have a database with multiple fields that will be searched against (happens to be PostgreSQL in this instance, but we can migrate any MySQL based examples/code) - We wish to score search results - ie: a match in keywords is worth 5 points, title worth 3, and description worth 1, perhaps even so far as multiple matches producing multiples of the point value(though that can be a later consideration) - Once we get the results, we would want to display in the order of the scoring, most points first etc... Obviously there are convoluted ways to accomplish, but I am looking to maximize the database performance, limit the number of recursive searches, and use the database/PHP each handle their portion of the search/score/ranking based on their strengths and use of system resources. appreciate any feedback Dave -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] outputting a carriage return
try nl2br() http://us2.php.net/manual/en/function.nl2br.php -Original Message- From: bob pilly [mailto:[EMAIL PROTECTED] Sent: Thursday, July 17, 2003 9:12 AM To: [EMAIL PROTECTED] Subject: [PHP] outputting a carriage return Hi all Can someone tell me why if i echo a line like this: echo this is a \n newline; the output is: this is a newline. But if i do this: $text=this is a \n newline; echo $text; the output is: this is a newline? Is there something i have to do to a variable in order for echo or print to treat special chars like '\n' correctly? Thanks for any answers in advance! - Want to chat instantly with your online friends? Get the FREE Yahoo!Messenger -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: outputting a carriage return
Hi, take a look at thedoc... there is a function called nl2br() to convert \n to br for html display. regards, P.E. Baroiller Bob pilly [EMAIL PROTECTED] a écrit dans le message de news:[EMAIL PROTECTED] Hi all Can someone tell me why if i echo a line like this: echo this is a \n newline; the output is: this is a newline. But if i do this: $text=this is a \n newline; echo $text; the output is: this is a newline? Is there something i have to do to a variable in order for echo or print to treat special chars like '\n' correctly? Thanks for any answers in advance! - Want to chat instantly with your online friends? Get the FREE Yahoo!Messenger -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] bcc on php
Hello, This is a reply to an e-mail that you wrote on Thu, 17 Jul 2003 at 13:09, lines prefixed by '' were originally written by you. be aware that BCC header some times don't works properly on Windows platforms and the recipient can see the BCC header from the source of mail! I am using PHP 4.3.2 on Windows and just did some testing... I sent a mail with a Bcc header, none of the recipients could see the Bcc line in the message source. I also had my packet sniffer running at the time PHP sent the mail and what it sends to the mail server is correct so if what you are describing happens it is because of an error in the code or the SMTP server you are using has messed up. David. -- phpmachine :: The quick and easy to use service providing you with professionally developed PHP scripts :: http://www.phpmachine.com/ Professional Web Development by David Nicholson http://www.djnicholson.com/ QuizSender.com - How well do your friends actually know you? http://www.quizsender.com/ (developed entirely in PHP) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: fwrite not working in php3
does your file test.inc exists, and... have you perms to write in this directory ? [EMAIL PROTECTED] a écrit dans le message de news:[EMAIL PROTECTED] hi there i have a little problem writing files on a php3 server this code worked yesterday but isnt $handle = fopen(/www_tools/apache/htdocs/phptest/temp_real/test.inc,'a'); $buffer = test; echo fwrite($handle,$buffer,4000); fclose($handle); i get a filesize of 0 and nothing writes to it what could it be ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] How to store a file into MSSQL?
On MSSQL it would be a NTEXT column. On Wed, 2003-07-16 at 18:14, Javier wrote: [EMAIL PROTECTED] (John Manko) wrote in news:[EMAIL PROTECTED]: Does it apply also to MSSQL = Microsoft SQL Server? Look here http://www.mysql.com/doc/en/BLOB.html Actually, if you don't care if the images can be view from outside the DB, you can do what I do. I simplely put the name of the file in a varchar field, then let the browser do the work for you. This is good for files that are referenced from multiple entries (ie, individual products each referencing the same series image) but, blob can work fine. -- *** s2r - public key: (http://leeloo.mine.nu/s2r-gmx.sig) -- Adam Voigt ([EMAIL PROTECTED]) Linux/Unix Network Administrator The Cryptocomm Group -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Parsing POP3 Mailbox
Hello, This is a reply to an e-mail that you wrote on Thu, 17 Jul 2003 at 14:04, lines prefixed by '' were originally written by you. Ok, this is what I want to do. I would like to parse a mailbox and forward the returned mail in it to other users. For instance, if I send an e-mail to [EMAIL PROTECTED] and [EMAIL PROTECTED] doesn't exist it is going to send the return to [EMAIL PROTECTED]. I want to parse [EMAIL PROTECTED] and send the e-mail to whoever is in the Disposition-Notification-To header of the e-mail. Anyone know where I can find a good script to parse mail boxes or maybe give me an idea of where to start? I checked hotscripts and some others but they are complete web based e-mail systems. I'd like to run this as a cron job if possible and I don't want to tear another system all apart If you have the imap php extensions installed you could use them (they support POP too) I normally work on systems without the imap enxtensions though so I chose to make my own class to deal with POP3 related tasks. Here are some snippets that you may find useful... class POPClient { .. function Connect(){ // connect to server if(!$this-[EMAIL PROTECTED]($this-server, $this-port)){ $this-error = Could not connect to {$this-server}:{$this-port}; return FALSE; } // login to server: fputs($this-sock, USER {$this-user}\r\n); $buf = fgets($this-sock, 1024); if($buf[0] != '+'){ $this-error = Invalid username: {$this-user}; return FALSE; } fputs($this-sock, PASS {$this-pass}\r\n); $buf = fgets($this-sock, 1024); if($buf[0] != '+') { $this-error = Invalid password; return FALSE; } $this-connected = TRUE; return TRUE; } snip function MessageCount(){ if($this-connected){ fputs($this-sock, STAT\r\n); $buf = fgets($this-sock, 1024); $buf = fgets($this-sock, 1024); $statbits = split(' ', $buf, 3); if(isset($statbits[1])){ return $statbits[1]; } else { return 0; } } else { $this-error = Not connected to server; return FALSE; } } snip function RetrieveMsg($id, $headonly=FALSE){ if($this-connected){ if($headonly){ $command=TOP; $param= 0; } else { $command=RETR; $param=; } fputs($this-sock, $command $id$param\r\n); $buf = fgets($this-sock, 1024); if($buf[0] != '+') { $this-error = Mail server would not let me retrieve message $id; return FALSE; } $message=;$thisline=; while ($thisline!=.\r\n){ // .\r\n signifies the end of the message $thisline = fgets($this-sock, 1024); $this-messagesource .= $thisline; } return TRUE; } else { $this-error = Not connected to server; return FALSE; } } snip } -- phpmachine :: The quick and easy to use service providing you with professionally developed PHP scripts :: http://www.phpmachine.com/ Professional Web Development by David Nicholson http://www.djnicholson.com/ QuizSender.com - How well do your friends actually know you? http://www.quizsender.com/ (developed entirely in PHP) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: PHP code beautifier?
Jacob, http://www.tote-taste.de/X-Project/beautify/ http://www.semdesigns.com/Products/Formatters/PHPFormatter.html http://www.trita.com/features/php-beautifier.jsp http://www.bierkandt.org/beautify/ http://www.trita.com/ http://www.beautifier.org/ This should get you started. I think PHPEdit has a code beautifier feature too. Btw, I found all of these on the first two pages of a simple Google search. Might be worth trying in the future. :-) Joseph Jacob Vennervald Madsen [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi List Does anybody know any good PHP code beautifiers/formaters? Preferably one which is configurable so I can specify the exact format I want. Cheers, Jacob Vennervald -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: PHP code beautifier?
Thanks a lot. Jacob Vennervald On Thu, 2003-07-17 at 15:29, Joseph Szobody wrote: Jacob, http://www.tote-taste.de/X-Project/beautify/ http://www.semdesigns.com/Products/Formatters/PHPFormatter.html http://www.trita.com/features/php-beautifier.jsp http://www.bierkandt.org/beautify/ http://www.trita.com/ http://www.beautifier.org/ This should get you started. I think PHPEdit has a code beautifier feature too. Btw, I found all of these on the first two pages of a simple Google search. Might be worth trying in the future. :-) Joseph Jacob Vennervald Madsen [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi List Does anybody know any good PHP code beautifiers/formaters? Preferably one which is configurable so I can specify the exact format I want. Cheers, Jacob Vennervald -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Venlig hilsen / Best regards, Jacob Vennervald System Developer Proventum Solutions ApS Toldbodgade 51C 1253 Copenhagen K Denmark Phone: +45 33 45 43 61 Mobile: +45 61 68 58 51 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] scoring/sorting db search results based on score
Try SELECT , (((keywords LIKE '%$search%') * 5) + ((title LIKE '%$search%') * 3) + (description LIKE '%$search%')) score FROM . ORDER BY score DESC Dave [Hawk-Systems] wrote: looking for code snippets or links to examples of the following; - Have a database with multiple fields that will be searched against (happens to be PostgreSQL in this instance, but we can migrate any MySQL based examples/code) - We wish to score search results - ie: a match in keywords is worth 5 points, title worth 3, and description worth 1, perhaps even so far as multiple matches producing multiples of the point value(though that can be a later consideration) - Once we get the results, we would want to display in the order of the scoring, most points first etc... Obviously there are convoluted ways to accomplish, but I am looking to maximize the database performance, limit the number of recursive searches, and use the database/PHP each handle their portion of the search/score/ranking based on their strengths and use of system resources. appreciate any feedback Dave -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: PHP code beautifier?
I really think that this depends on the topic. I know that if I'm looking for an editor (esp for a language just starting in), I can search google all day, but end up with a list full of fud. In situations like this, I would prefer to go straight to the source and ask the people who have put most editors for that languange to the test, and sometimes that means I need to post to a mailing list. Now, I''m not saying that you don't have a point (All too often people ask without even trying to find the answer themselves. I sometimes find myself doing this, and it's a shame becuase there is so much information a person misses out on that he/she would not normally be exposed to.), but you have to ask yourself A beginner, or a veteran? Othertimes, I just want to be sure I didn't miss something that would be ideal. I don't know...just my .02. Joseph Szobody wrote: Btw, I found all of these on the first two pages of a simple Google search. Might be worth trying in the future. :-) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] XML
On Thu, 2003-07-17 at 01:28, Curt Zirzow wrote: Ray Hunter [EMAIL PROTECTED] wrote: 1. How efficient is to use XML+XSLT solution? Does it add processing overhead to the system? The efficientcy is relative to many factors, however I can stress this. The style sheets can be cached client side and then only xml data can be sent to the user. This reduces bandwidth and allows the transformation to be done on the client side instead of server side. Also not that xml + xslt transformations can be done server side. I usually do browser checks to determine if the browser is capable of handling xml+xslt transformations: if so then i send the files. Now if the browser is old or has issues (i.e. Internet explorer 5.5) then i can do the transformation server side and send html. Also note that you can set up a caching system at this point. I opened the page with Opera I was doing in XML+XSLT and my page disappeard :( Back to browscap days... i thought we were done with that. Not sure how opera handles xml + xslt transformation. Not sure about the xml parser that it has. If the transformation is done server side then yes you have that over head. However, if you are only serving up xml files and xslt files (part of the time on xslt) then u are reducing server load. What I'm afraid of is that xslt will have the same problem that html had with the browser wars. excpecially since all layout and rendering is done based on what the client's software thinks. To bad not ever browser supports the w3c standards. -- BigDog -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: PHP code beautifier?
Actually I did search Google first and I did get the same results you got. But what I was looking for was actually not a list of different beautifiers but comments from developers having experience with a specific beautier that they find does the job well. Jacob Vennervald On Thu, 2003-07-17 at 15:40, John Manko wrote: I really think that this depends on the topic. I know that if I'm looking for an editor (esp for a language just starting in), I can search google all day, but end up with a list full of fud. In situations like this, I would prefer to go straight to the source and ask the people who have put most editors for that languange to the test, and sometimes that means I need to post to a mailing list. Now, I''m not saying that you don't have a point (All too often people ask without even trying to find the answer themselves. I sometimes find myself doing this, and it's a shame becuase there is so much information a person misses out on that he/she would not normally be exposed to.), but you have to ask yourself A beginner, or a veteran? Othertimes, I just want to be sure I didn't miss something that would be ideal. I don't know...just my .02. Joseph Szobody wrote: Btw, I found all of these on the first two pages of a simple Google search. Might be worth trying in the future. :-) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Venlig hilsen / Best regards, Jacob Vennervald System Developer Proventum Solutions ApS Toldbodgade 51C 1253 Copenhagen K Denmark Phone: +45 33 45 43 61 Mobile: +45 61 68 58 51 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: scoring/sorting db search results based on score
Dave wrote: looking for code snippets or links to examples of the following; - Have a database with multiple fields that will be searched against (happens to be PostgreSQL in this instance, but we can migrate any MySQL based examples/code) - We wish to score search results - ie: a match in keywords is worth 5 points, title worth 3, and description worth 1, perhaps even so far as multiple matches producing multiples of the point value(though that can be a later consideration) - Once we get the results, we would want to display in the order of the scoring, most points first etc... Obviously there are convoluted ways to accomplish, but I am looking to maximize the database performance, limit the number of recursive searches, and use the database/PHP each handle their portion of the search/score/ranking based on their strengths and use of system resources. appreciate any feedback Dave There is a module for Postgres that does indexed full text searching, with ranking: http://www.sai.msu.su/~megera/oddmuse/index.cgi/Tsearch_V2_Readme -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Protecting files with PHP
Hi there! I'm developing an application to which you can upload files. Right now the destination folder of those files is at /public_html/files which makes them visible from the internet. I thought of putting that ./files/ folder outside the ./public_html/ folder and make those files be only accessible via PHP pages (if the pages doesn't display a link to that folder there's no way to download the file). But, there's any way to keep on having the ./files/ folder inside ./public_html/ and have those files protected? Right now to identify users (authenticate them) I use session variables... it should be a protection that could be used together with session variables Thanks a lot. Kisses, Maria __ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Problem adding value to session array
I have a session array that stores some values that I set. It holds all the inserted values, unless the value I want to insert has a space in it, then it only inserts the characters before the space into the array. It looks like this: // This works $sessionArray[1] = nospace; echo result: .$sessionArray[1];// result: nospace // This doesn't work $sessionArray[1] = with space; echo result: .$sessionArray[1];// result: with // should be result: with space Anyone know how to fix or avoid this from happening? Thanks, Matt -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Protecting files with PHP
Place a .htaccess in the files directory denying all access to it, and also possibly redirecting them to a login page. However since your users should never know about the files/ directory there is no real point :) Then code a PHP script to serve the files just in the same way you would if they were outside of the public_html. Since your PHP script will be reading the files from the file system they will have no problem accessing the files and serving them out. Hope that helps. Andrew - Original Message - From: Maria Garcia Suarez [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, July 17, 2003 2:58 PM Subject: [PHP] Protecting files with PHP Hi there! I'm developing an application to which you can upload files. Right now the destination folder of those files is at /public_html/files which makes them visible from the internet. I thought of putting that ./files/ folder outside the ./public_html/ folder and make those files be only accessible via PHP pages (if the pages doesn't display a link to that folder there's no way to download the file). But, there's any way to keep on having the ./files/ folder inside ./public_html/ and have those files protected? Right now to identify users (authenticate them) I use session variables... it should be a protection that could be used together with session variables Thanks a lot. Kisses, Maria -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Problem adding value to session array
On Thursday 17 July 2003 22:06, Matt Palermo wrote: I have a session array that stores some values that I set. It holds all the inserted values, unless the value I want to insert has a space in it, then it only inserts the characters before the space into the array. It looks like this: // This works $sessionArray[1] = nospace; echo result: .$sessionArray[1];// result: nospace // This doesn't work $sessionArray[1] = with space; echo result: .$sessionArray[1];// result: with // should be result: with space Anyone know how to fix or avoid this from happening? Could you post your *real* code, or post a short example which illustrates the problem. The above code works fine for me. -- Jason Wong - Gremlins Associates - www.gremlins.biz Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * -- Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general -- /* Toni's Solution to a Guilt-Free Life: If you have to lie to someone, it's their fault. */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] How unsafe is register_globals?
http://httpd.apache.org/docs-2.1/mod/core.html#allowoverride You can indicate which directives can be overrriden, and which cannot. --- Paul Chvostek [EMAIL PROTECTED] wrote: On Thu, Jul 17, 2003 at 01:56:57PM +0800, Jason Wong wrote: gets the error php_flag not allowed here. I see from the comments at http://www.php.net/register_globals that I need AllowOverride Options to make that function ... but is it possible to have fine-grained enough an AllowOverride statement that only register_globals can be changed? I wouldn't want a user to use his .htaccess file to turn off safe_mode or open_basedir. Take control of the setting yourself by setting it httpd.conf, inside the container of the virtual host in question. Not so easy with mod_vhost_alias, given that I want it to apply only to certain users, and possibly only for directories for those users. The .htaccess solution is the right one unless AllowOverride Options allowed the user to turn off safe_mode and open_basedir. I don't have a non-production machine to test it on at the moment. Any idea how I give the user local register_globals control without also letting them alter the other php.ini options? -- Paul Chvostek [EMAIL PROTECTED] Operations / Abuse / Whatever it.canada, hosting and development http://www.it.ca/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php = Mark Weinstock [EMAIL PROTECTED] *** You can't demand something as a right unless you are willing to fight to death to defend everyone else's right to the same thing. *** __ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Parsing POP3 Mailbox
Hello, This is a reply to an e-mail that you wrote on Thu, 17 Jul 2003 at 15:10, lines prefixed by '' were originally written by you. Forgive me for bothering you again with such a silly question, but say want to connect as localhost with password PASS. How could I call the function? No problem, very basic usage (with no error checking) would be as follows... $popclient = new POPClient(serveraddress,username,password); $popclient-Connect(); $messagecount = $popclient-MessageCount(); for($i=0;$i$messagecount;$i++){ $messageheaders = $popclient-RetrieveMsg($i, TRUE); // do something with the headers here } The above code assumes you have a constructor function in the class (the one I posted originally didn't include it). Add this function to the class to make it work... function POPClient($server, $user, $pass, $port=110){ $this-server = $server; $this-user = $user; $this-pass = $pass; $this-port = $port; $this-connected = FALSE; $this-messagesource = ; } HTH, David -- phpmachine :: The quick and easy to use service providing you with professionally developed PHP scripts :: http://www.phpmachine.com/ Professional Web Development by David Nicholson http://www.djnicholson.com/ QuizSender.com - How well do your friends actually know you? http://www.quizsender.com/ (developed entirely in PHP) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Linux Installation
Haseeb wrote: hi, first of all i don't know anything about linux . we had a administrator for all our linux requirements, now that the company has fired him (without hiring anyone for the job) i am left on my own . i want to use vpopmail extension. but the problem is it is not installed on the linux server. i want to know what is the command (exact command) that i use to install configure vpopmail . without disturbing the existing system here what i get from phpinfo() './configure' '--prefix=/usr/local/psa/apache' '--with-apxs=/usr/local/psa/apache/bin/apxs' '--with-regex=php' '--with-config-file-path=/usr/local/psa/apache/conf' '--enable-sockets' '--enable-track-vars' '--with-mysql=/usr/local/psa/mysql' '--with-gettext' '--with-zlib' '--with-xml' '--disable-debug' '--enable-pear' '--with-imap=/home/soft/psa_compiled/imap-2002b' '--enable-ftp' '--with-zend' '--with-mssql' will be thankful Haseeb Configuring php should be the furthest thing from your mind at the moment. You can't configure it with something that isn't there. Your first step is get vpopmail up and running, which is way off topic for this list. Check out here... http://inter7.com/vpopmail.html -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Protecting files with PHP
If you place files inside a webfolder, then they are publicly accessible, period. They might not be obvious, ie. you would have to guess that there are files in a specific folder AND know the exact name of the file, but if you do happen to guess correct, then the files are downloadable. There are ways to still have files in public folders and have a measure of extra protection, but that is up to your webserver, and not PHP. Use .htaccess to place a username/password on the folder, or better yet, you can use ftp, but then you place the files outside the webfolder. PHP has built in ftp functions that would allow you to create a pretty secure system to give access to files. On Thu, 2003-07-17 at 15:58, Maria Garcia Suarez wrote: Hi there! I'm developing an application to which you can upload files. Right now the destination folder of those files is at /public_html/files which makes them visible from the internet. I thought of putting that ./files/ folder outside the ./public_html/ folder and make those files be only accessible via PHP pages (if the pages doesn't display a link to that folder there's no way to download the file). But, there's any way to keep on having the ./files/ folder inside ./public_html/ and have those files protected? Right now to identify users (authenticate them) I use session variables... it should be a protection that could be used together with session variables Thanks a lot. Kisses, Maria __ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Linux Installation
i have vpopmail configured and running what next ?? Haseeb ---Original Message--- From: John Nichel Date: Thursday, July 17, 2003 07:21:22 PM To: Haseeb Cc: [EMAIL PROTECTED] Subject: Re: [PHP] Linux Installation Haseeb wrote: hi, first of all i don't know anything about linux . we had a administrator for all our linux requirements, now that the company has fired him (without hiring anyone for the job) i am left on my own . i want to use vpopmail extension. but the problem is it is not installed on the linux server. i want to know what is the command (exact command) that i use to install configure vpopmail . without disturbing the existing system here what i get from phpinfo() './configure' '--prefix=/usr/local/psa/apache' '--with-apxs=/usr/local/psa/apache/bin/apxs' '--with-regex=php' '--with-config-file-path=/usr/local/psa/apache/conf' '--enable-sockets' '--enable-track-vars' '--with-mysql=/usr/local/psa/mysql' '--with-gettext' '--with-zlib' '--with-xml' '--disable-debug' '--enable-pear' '--with-imap=/home/soft/psa_compiled/imap-2002b' '--enable-ftp' '--with-zend' '--with-mssql' will be thankful Haseeb Configuring php should be the furthest thing from your mind at the moment. You can't configure it with something that isn't there. Your first step is get vpopmail up and running, which is way off topic for this list. Check out here... http://inter7.com/vpopmail.html IncrediMail - Email has finally evolved - Click Here
RE: [PHP] zend optimizer for 4.3.2
Yes, Zend Optimizer definitely does support 4.3.X. Brad __ Brad Young [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] www.zend.com http://www.zend.com Zend - The PHP Company -Original Message- From: Adrian Teasdale [mailto:[EMAIL PROTECTED] Sent: Thursday, July 17, 2003 2:20 PM To: Michael Rubin; [EMAIL PROTECTED] Subject: RE: [PHP] zend optimizer for 4.3.2 I might be wrong (it's been known in the past!) but I think that theirs supports 4.3.x Best regards Adrian sourceguardian.com -Original Message- From: Michael Rubin [mailto:[EMAIL PROTECTED] Sent: 17 July 2003 10:30 To: [EMAIL PROTECTED] Subject: [PHP] zend optimizer for 4.3.2 Does anyone know when Zend Optimizer will support up to PHP version 4.3.2? Currently it only supports up to 4.3.0. Sincerely, Michael Rubin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] headers already sent and cookie problem
Hi all, hi Mike, Here's the URL: http://www.aurelis.org/store/cart.txt and the get_cartID: http://www.aurelis.org/store/includes/functions/get_cartID.txt Thanks in advance! Fred -Original Message- From: Ford, Mike [LSS] [mailto:[EMAIL PROTECTED] Sent: woensdag 16 juli 2003 12:20 To: 'frederik feys'; [EMAIL PROTECTED] Subject: RE: [PHP] headers already sent and cookie problem -Original Message- From: frederik feys [mailto:[EMAIL PROTECTED] Sent: 16 July 2003 10:21 One nasty thing to debug is that the error only shows up from time to time. So now everything seems OK. What do i have now? I start my code with session_start Then include some files. The last one is get_cartID.php (remember?) Then i use several functions to have cart functionallity. In show_cart i include my page heading and then output further body and footer content. When I put the get_cartID include file AFTER include heading.php into my show cart function, the other functions start complaining they can't access the function get_cartID. Lots of text, sorry for that. But I still don't have the clue. Maybe you like to see my code? Yes, I think so -- I can't visualize enough of what's going on from your description to make further suggestions about what you might need to look at. From the sound of it, your files are quite big, so the best thing would be if you can put them up (as .phps or .txt) on your Web server and post their URLs to the list. If you can't do that, attach them to an email as .txt files. Cheers! Mike - Mike Ford, Electronic Information Services Adviser, Learning Support Services, Learning Information Services, JG125, James Graham Building, Leeds Metropolitan University, Beckett Park, LEEDS, LS6 3QS, United Kingdom Email: [EMAIL PROTECTED] Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] scoring/sorting db search results based on score
Try SELECT , (((keywords LIKE '%$search%') * 5) + ((title LIKE '%$search%') * 3) + (description LIKE '%$search%')) score FROM . ORDER BY score DESC PostgreSQL cannot type cast the Boolean type so you have to use a case statement, also changing like to ilike will get results regardless of case. SELECT , ((CASE WHEN (keywords ILIKE '%$search%') THEN 5 ELSE 0 END) + (CASE WHEN (title ILIKE '%$search%') THEN 3 ELSE 0 END) + (CASE WHEN (description ILIKE '%$search%') THEN 1 ELSE 0 END)) AS score FROM ORDER BY score DESC Dave [Hawk-Systems] wrote: looking for code snippets or links to examples of the following; - Have a database with multiple fields that will be searched against (happens to be PostgreSQL in this instance, but we can migrate any MySQL based examples/code) - We wish to score search results - ie: a match in keywords is worth 5 points, title worth 3, and description worth 1, perhaps even so far as multiple matches producing multiples of the point value(though that can be a later consideration) - Once we get the results, we would want to display in the order of the scoring, most points first etc... Obviously there are convoluted ways to accomplish, but I am looking to maximize the database performance, limit the number of recursive searches, and use the database/PHP each handle their portion of the search/score/ranking based on their strengths and use of system resources. appreciate any feedback Dave -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Thanks, Dean E. Weimer http://www.dwiemer.org/ [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Protecting files with PHP
Petre Agenbag wrote: If you place files inside a webfolder, then they are publicly accessible, period. Not true. .htaccess turns a public directory into a private directory. Even if you know the path and filename you want, without an accepted username/password, you're not getting the file. They might not be obvious, ie. you would have to guess that there are files in a specific folder AND know the exact name of the file, but if you do happen to guess correct, then the files are downloadable. There are ways to still have files in public folders and have a measure of extra protection, but that is up to your webserver, and not PHP. Not true. You can easily write php code to secure either certain areas, or the entire web site. Use .htaccess to place a username/password on the folder, or better yet, you can use ftp, but then you place the files outside the webfolder. PHP has built in ftp functions that would allow you to create a pretty secure system to give access to files. FTP bad. Friends don't let friends use FTP. And this isn't a security measure. What's to stop me from bypassing your PHP code, and just FTP'ing directly into your site? Long of the short is, there are numerous ways to secure an area of your site. PHP, .htaccess, web server configuration, any combination of the three. However, the quickest, dirtiest, and most good enough for government way would be .htaccess On Thu, 2003-07-17 at 15:58, Maria Garcia Suarez wrote: Hi there! I'm developing an application to which you can upload files. Right now the destination folder of those files is at /public_html/files which makes them visible from the internet. I thought of putting that ./files/ folder outside the ./public_html/ folder and make those files be only accessible via PHP pages (if the pages doesn't display a link to that folder there's no way to download the file). But, there's any way to keep on having the ./files/ folder inside ./public_html/ and have those files protected? Right now to identify users (authenticate them) I use session variables... it should be a protection that could be used together with session variables Thanks a lot. Kisses, Maria __ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com -- By-Tor.com It's all about the Rush http://www.by-tor.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Linux Installation
Haseeb wrote: i have vpopmail configured and running what next ?? Haseeb Recompile php adding --with-vpopmail[=DIR] to your configuration. ---Original Message--- From: John Nichel mailto:[EMAIL PROTECTED] Date: Thursday, July 17, 2003 07:21:22 PM To: Haseeb mailto:[EMAIL PROTECTED] Cc: [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] Subject: Re: [PHP] Linux Installation Haseeb wrote: hi, first of all i don't know anything about linux . we had a administrator for all our linux requirements, now that the company has fired him (without hiring anyone for the job) i am left on my own . i want to use vpopmail extension. but the problem is it is not installed on the linux server. i want to know what is the command (exact command) that i use to install configure vpopmail . without disturbing the existing system here what i get from phpinfo() './configure' '--prefix=/usr/local/psa/apache' '--with-apxs=/usr/local/psa/apache/bin/apxs' '--with-regex=php' '--with-config-file-path=/usr/local/psa/apache/conf' '--enable-sockets' '--enable-track-vars' '--with-mysql=/usr/local/psa/mysql' '--with-gettext' '--with-zlib' '--with-xml' '--disable-debug' '--enable-pear' '--with-imap=/home/soft/psa_compiled/imap-2002b' '--enable-ftp' '--with-zend' '--with-mssql' will be thankful Haseeb Configuring php should be the furthest thing from your mind at the moment. You can't configure it with something that isn't there. Your first step is get vpopmail up and running, which is way off topic for this list. Check out here... http://inter7.com/vpopmail.html http://www.incredimail.com/redir.asp?ad_id=309lang=9 IncrediMail - Email has finally evolved - Click Here http://www.incredimail.com/redir.asp?ad_id=309lang=9 -- By-Tor.com It's all about the Rush http://www.by-tor.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Default mode -- Output buffering ??
I recently upgraded from RedHat 9 supplied 4.1.2 to from_the_net 4.3.2. I am running the command line version (#!/usr/bin/php) as a .cgi rather than directly in apache as a module (with a .php suffix). What I find is that the first line after #!/usr/bin/php needs to be: Content-type: text/html This used to be generated automatically, and still is in apache module version. The whole thing acts differently, phpinfo() generates text output and not HTML. It seems as if the /usr/bin/php has decided that it is not generating web output any more -- for some reason. Is there a build/configure option that I can set to get the original behaviour or a command line switch to specify 'html on' or something ? I have looked but cannot find anything. Thanks in advance. -- Alain Williams #include std_disclaimer.h -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP/HTML Question
I have a quick question about PHP and HTML. I have a page that is supposed to update the status of hosts by pinging each host and displaying the result. I would like to get the page to the point that I can have something (either PHP or JavaScript or the like) ping every 10 seconds or so and update the page (I have text boxes for the status) WITHOUT reloading it. Does anyone know if this is possible with PHP? Or does anyone know of another way I could do it? JavaScript (at least any of it that I've seen) doesn't have a function to run a command on the server (which makes sense, since it is mainly client-side), and I don't know about CGI. Thanks, Nick -- You can't make a difference until you are willing to be different! -- Nick Couchman SEAKR Engineering, Inc. 6221 South Racine Circle Centennial, CO 80111 Direct: (303) 784-7724 Main: (303) 790-8499 Fax: (303) 790-8720 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] PHP/HTML Question
[snip] I have a quick question about PHP and HTML. I have a page that is supposed to update the status of hosts by pinging each host and displaying the result. I would like to get the page to the point that I can have something (either PHP or JavaScript or the like) ping every 10 seconds or so and update the page (I have text boxes for the status) WITHOUT reloading it. Does anyone know if this is possible with PHP? Or does anyone know of another way I could do it? JavaScript (at least any of it that I've seen) doesn't have a function to run a command on the server (which makes sense, since it is mainly client-side), and I don't know about CGI. [/snip] Sounds like a job for sockets or curl, but there would have to be a reload. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP/HTML Question
I have a quick question about PHP and HTML. I have a page that is supposed to update the status of hosts by pinging each host and displaying the result. I would like to get the page to the point that I can have something (either PHP or JavaScript or the like) ping every 10 seconds or so and update the page (I have text boxes for the status) WITHOUT reloading it. Does anyone know if this is possible with PHP? Or does anyone know of another way I could do it? JavaScript (at least any of it that I've seen) doesn't have a function to run a command on the server (which makes sense, since it is mainly client-side), and I don't know about CGI. You will need to do a reload of the page so that you can get information from the server to the client via the web. Now you can also write a server-client application that allows the server and client to talk via connects (sockets) however, this is a very complex subject and might be a huge overkill for what u are trying to accomplish. Using javascript to reload the page every 10 minutes might be what you are looking for. -- BigDog -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP/HTML Question
Ray Hunter wrote: I have a quick question about PHP and HTML. I have a page that is supposed to update the status of hosts by pinging each host and displaying the result. I would like to get the page to the point that I can have something (either PHP or JavaScript or the like) ping every 10 seconds or so and update the page (I have text boxes for the status) WITHOUT reloading it. Does anyone know if this is possible with PHP? Or does anyone know of another way I could do it? JavaScript (at least any of it that I've seen) doesn't have a function to run a command on the server (which makes sense, since it is mainly client-side), and I don't know about CGI. You will need to do a reload of the page so that you can get information from the server to the client via the web. Now you can also write a server-client application that allows the server and client to talk via connects (sockets) however, this is a very complex subject and might be a huge overkill for what u are trying to accomplish. Using javascript to reload the page every 10 minutes might be what you are looking for. -- BigDog Thanks, that's all I needed to know. It sounds like from what Jay Blanchard said you need a reload with sockets, anyway, and yes, that would probably be overkill. Thanks, Nick -- You can't make a difference until you are willing to be different! -- Nick Couchman SEAKR Engineering, Inc. 6221 South Racine Circle Centennial, CO 80111 Direct: (303) 784-7724 Main: (303) 790-8499 Fax: (303) 790-8720 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] 4.3.2 fopen() problem/limit?
MIKE YRABEDRA [EMAIL PROTECTED] wrote: I just upgraded to 4.3.2 and one of my scripts will not work now. The script basically used fopen to get a file, then it would write it to a static page (cutting down on DB access). The script has worked fine for months under 4.3.0, but not under 4.3.2 Actually in either case db is much better to go with any sort of data management. Discussion is to long to type here :) It looks as if it only opens and writes half of the source page. Almost like it gets to 20k then stops the stream. Are you actually using fclose() on the filehandle. I'm not sure how php handles the situation on a left open filehandle (automatic cleanup stuff) but if you don't close your file then the write buffer doesn't get flushed to disk and closed properly, in most cases. Anyone know if this is a bug or if there is a way to fix the problem? try making a very simple script that would show your bug, and see if it still happens. Curt -- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] outputting a carriage return
bob pilly [EMAIL PROTECTED] wrote: Hi all Can someone tell me why if i echo a line like this: echo this is a \n newline; the output is: this is a newline. But if i do this: $text=this is a \n newline; echo $text; the output is: this is a newline? works fine for me. Is there something i have to do to a variable in order for echo or print to treat special chars like '\n' correctly? nope. as long as the \n is inside quotes then it will get treated as a new line. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP/HTML Question
Nick Couchman [EMAIL PROTECTED] wrote: I have a quick question about PHP and HTML. I have a page that is supposed to update the status of hosts by pinging each host and displaying the result. I would like to get the page to the point that I can have something (either PHP or JavaScript or the like) ping every 10 seconds or so and update the page (I have text boxes for the status) WITHOUT reloading it. Does anyone know if this is possible with PHP? Or does anyone know of another way I could do it? JavaScript (at least any of it that I've seen) doesn't have a function to run a command on the server (which makes sense, since it is mainly client-side), and I don't know about CGI. kinda need more details. but you can most likely do it with javascript to update the textbox. Curt. -- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] deleting one cookie is deleting both..why? (tiny scripts)
--- Ryan A [EMAIL PROTECTED] wrote: I am setting 2 cookies like so:(setCookie.php) ... setcookie(name1,1,0,,.bestwebhosters.com); setcookie(name2,1,0,,.bestwebhosters.com); ... then I am trying to delete the second cookie like so:(delCookie.php) ... setcookie(name2,1,-3600,,.bestwebhosters.com); ... a href=http://bestwebhosters.com/testing/ReadCookieEx.phpRead/a When I check ReadCookie it shows me that both hav been deletedwhy? Don't delete the cookie, and you'll still find that both are deleted. The truth is that neither would be deleted, but they will only be sent to domains within .bestwebhosters.com, which http://bestwebhosters.com is not. Hope that helps. Chris = Become a better Web developer with the HTTP Developer's Handbook http://httphandbook.org/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Protecting files with PHP
I need to do the same and a .htacces file would not suite the problem I need to do as yahoogroups does When you upload a file to the Files section, it send by default an e-mail to the group members with a link to the file When you click on the link, you're sent to a login page, and after login in you get the file.. how can you achieve this with PHP?? an .htaccess file would deny the access, or ask for a username/passwd at HTTP Server level, and that is not the desired effect.. thnx in advanced, Juan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP/HTML Question
Nick Couchman wrote: I have a quick question about PHP and HTML. I have a page that is supposed to update the status of hosts by pinging each host and displaying the result. I would like to get the page to the point that I can have something (either PHP or JavaScript or the like) ping every 10 seconds or so and update the page (I have text boxes for the status) WITHOUT reloading it. Does anyone know if this is possible with PHP? Or does anyone know of another way I could do it? JavaScript (at least any of it that I've seen) doesn't have a function to run a command on the server (which makes sense, since it is mainly client-side), and I don't know about CGI. Thanks, Nick Don't rely on a browser to do this...have the ping script run on a cron, and update the status in a database or flat file. You can even have the script send out an email (I have heard that some people have gotten IM to work thru php, but I don't know if that really works) if a box is down. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] How unsafe is register_globals?
But those are APACHE directives. What I'm looking for is finer-grained control over what php_flag lines will be accepted. A quick test wrapped in a Directory APPEARS not to be at risk, but I'd rather get confirmation of this before I rely on it. Can someone confirm that mod_php4 will not allow safe_mode and open_basedir to be altered by php_flag lines in .htaccess files? Thanks. On Thu, Jul 17, 2003 at 07:19:19AM -0700, Mark wrote: http://httpd.apache.org/docs-2.1/mod/core.html#allowoverride You can indicate which directives can be overrriden, and which cannot. --- Paul Chvostek [EMAIL PROTECTED] wrote: On Thu, Jul 17, 2003 at 01:56:57PM +0800, Jason Wong wrote: gets the error php_flag not allowed here. I see from the comments at http://www.php.net/register_globals that I need AllowOverride Options to make that function ... but is it possible to have fine-grained enough an AllowOverride statement that only register_globals can be changed? I wouldn't want a user to use his .htaccess file to turn off safe_mode or open_basedir. Take control of the setting yourself by setting it httpd.conf, inside the container of the virtual host in question. Not so easy with mod_vhost_alias, given that I want it to apply only to certain users, and possibly only for directories for those users. The .htaccess solution is the right one unless AllowOverride Options allowed the user to turn off safe_mode and open_basedir. I don't have a non-production machine to test it on at the moment. Any idea how I give the user local register_globals control without also letting them alter the other php.ini options? -- Paul Chvostek [EMAIL PROTECTED] Operations / Abuse / Whatever it.canada, hosting and development http://www.it.ca/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] include statement giving me hives! - SOLVED
rtrim () solved the issue. There was a newline sitting at the end of the variable and messing it up! Thanks for all your help! Marek Kilimajer [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] DougD wrote: I am new to all this, but here is the basic code: $link_titles = file('links/master.txt'); $links_include = $link_titles[$point]; // path to directory include $links_include; If I echo the value of $links_include just prior to the include() function it contains what I would expect it to contain Except it contains newline at the end. Get rid of the newline and it should work. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php