[PHP] Re: Where to start?
www.php.net is a beauty for function reference Your best place to start is here: http://www.devshed.com/Server_Side/PHP/PHP101/PHP101_1/page1.html 5 tutorials on the basics, plus devshed has 100s of tutorials on everything. "Simon Thurtle" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hi all, > I am looking into learning PHP, I have a good understanding of HTML, JS and > I know a little Perl. Firstly I know PHP is all server side and so a damn > sight different from the above, but will they help me at all? > Secondly where do I start? Are there any good on-line resources and or books > that anyone knows? I am plannig to develop an E-comm solution us Oscommerce, > does anyone know if this is any good or is naff? > Any hints, tips or pointers would be greatly appreciated. > > Thanks, > > Simon > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
php-general Digest 5 Jun 2003 14:03:34 -0000 Issue 2099
php-general Digest 5 Jun 2003 14:03:34 - Issue 2099 Topics (messages 150291 through 150353): Re: selecting first character from a MySQL table 150291 by: David Robley Re: How to optimize this MySQL command? 150292 by: Jomi Garrucho Does PHP have vb's 'mid' function (or similar)? 150293 by: Liam 150294 by: Tom Rogers how to record the referal of the referal? 150295 by: lexter.swissinfo.org 150328 by: Marek Kilimajer Count on Multiple Tables 150296 by: Ralph Re: header function problem 150297 by: Jason Wong Re: Calling HTML pages 150298 by: Ian Mantripp TIMESTAMP -> Y-m-d 150299 by: nabil 150301 by: Justin French 150314 by: Justin French 150320 by: Marek Kilimajer File upload problem 150300 by: Sami Kollanus 150319 by: Mi5ha 150333 by: Sami Kollanus Re: Using register_globals 150302 by: SLanger.spirit21.de 150306 by: Lars Torben Wilson 150336 by: Jay Blanchard Compare dates 150303 by: Shaun 150305 by: sven PHP Class for IP CIDR notation 150304 by: Rob Lacey Newman's Problem with Images. 150307 by: Philip J. Newman Re: Submited (004756-3463) 150308 by: chregu.php.net Re: Morph an object 150309 by: Lars Torben Wilson Advice on script length please! 150310 by: Bix 150321 by: Justin French 150340 by: Jay Blanchard 150342 by: Bix 150345 by: Jay Blanchard 150349 by: Ford, Mike [LSS] 150350 by: Jay Blanchard Re: SQL Select on a DATE field 150311 by: sven strange thing about "recode" 150312 by: Ilia Chipitsine Get the date&time from server 150313 by: poetbox 150317 by: CPT John W. Holmes Calendar showing availability of apartments/hotels 150315 by: Dillon, John 150316 by: Dillon, John Replace ultimate affiliate with a PHP offering 150318 by: Adrian Teasdale Re: move_uploaded_file > 1MB 150322 by: Maurício Valente Ascii to Decimal Converter 150323 by: Chinmoy Barua 150338 by: David Robley Re: insert loop logic 150324 by: Ford, Mike [LSS] Re: Registered sessions. 150325 by: Ford, Mike [LSS] Re: setlocale() changes? 150326 by: Ford, Mike [LSS] pattern matching for the dot-sign 150327 by: Wim Paulussen 150332 by: CPT John W. Holmes Re: Is "gd" present? 150329 by: Ford, Mike [LSS] 150331 by: Ford, Mike [LSS] 150334 by: Svein Larsen 150337 by: CPT John W. Holmes Re: function re-defined | WorkAround? [and some more Q's] 150330 by: Ford, Mike [LSS] Re: My Sincere Greetings 150335 by: David Robley Displaying links only when page is loaded on local site? 150339 by: Murray Wells 150341 by: CPT John W. Holmes Where to start? 150343 by: Simon Thurtle 150347 by: Jay Blanchard 150353 by: Bix Determine memory used from script 150344 by: Shawn McKenzie 150352 by: Chris Edwards recursive displaying tree structure 150346 by: Mike Klemin test 150348 by: Mike Klemin Re: New word proposition (was: Re: [PHP] HTML and PHP) 150351 by: Shawn McKenzie Administrivia: To subscribe to the digest, e-mail: [EMAIL PROTECTED] To unsubscribe from the digest, e-mail: [EMAIL PROTECTED] To post to the list, e-mail: [EMAIL PROTECTED] -- --- Begin Message --- In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] says... > Hi, > > First, let me say many thanks to those who responded to my cron tab > question - it's working well now. And now for my next trick ;) > > I'm looking for more of an opinion here. I'm doing an alphabetical listing > of members for this site, I've done a general query of my MySQL table to > select all the members, but I was wondering if PHP could select only the > first character and display only those members who's name begins with an > 'A', 'B', 'C', etc? > > I know I can do a selective query in MySQL using the LEFT command - but > that would mean doing a query for each letter of the alphabet - is there a > better way, or shall I start querying away? I guess it would be possible to do this with 'DISTINCT' - something like SELECT DISTINCT LEFT(1,1,field) FROM . Yes I know the syntax is probably wrong but I can't be hanged checking the docs :-) Cheers -- Quod subigo farinam $email =~ s/oz$/au/o; --- End Message --- --- Begin Message --- try this if it works SELECT nick FROM bt_member LEFT JOIN bt_message ON bt_member.id=bt_message.mid WHERE bt_message.ch ='$ch' - Original Message - From: "Sunil Samuel" <[EMAIL PROTECTED]> To: "Erick" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> S
[PHP] PHP 4.3.2 Compiling error in native GD
I'm compiling with: ./configure --with-apxs --with-mysql=/usr --with-mcrypt=/usr/local/lib/ --wi th-imap=/home/redhat/SOURCES/imap-2001a/ --with-imap-ssl=/usr/local/ssl --wi th-dba --with-gd --with-jpeg-dir=/usr/local/lib --with-zlib-dir=/usr/local/l ib --enable-gd-native-ttf --with-png-dir=/usr/local/lib This worked fine with 4.3.1 and in 4.3.2 it configures fine, but under make... ext/gd/gd.lo: In function `zm_deactivate_gd': /home/src/php-4.3.2/ext/gd/gd.c:382: undefined reference to `gdFreeFontCache' ext/gd/gd.lo: In function `zif_imagecolorat': /home/src/php-4.3.2/ext/gd/gd.c:1855: undefined reference to `gdImageBoundsSafe' /home/src/php-4.3.2/ext/gd/gd.c:1863: undefined reference to `gdImageBoundsSafe' collect2: ld returned 1 exit status make: *** [sapi/cli/php] Error 1 Any ideas? TIA. ;o) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Php 4.3.2 "stream does not support seeking" in includes
Hi there ! I just upgraded to php 4.3.2 on several servers, and some of them uses incldes of remote files (via include("http:...") functions. I get : Warning: main(): stream does not support seeking in ... on line .. All the time, on all machines. My "standard" configure line is : ./configure --with-apxs=/usr/local/apache/bin/apxs --with-mysql=/usr --with- xml --enable-ftp --with-zlib --with-png --with-png-dir=/usr --with-jpeg --en able-exif --with-jpeg-dir=/usr --with-gd --with-ttf --with-freetype-dir=/usr --with-tiff --enable-track-vars --enable-trans-sid --disable-debug I just tried somthing, I disabled the Zend optimizer and it stoped doing that... Any hints ? Nicolas -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] How stable is CVS releases?
Hi all, I am having a problem with compiling PHP 4.3.2 on Solaris 8. The compile runs ok but blows up when I try a make install. Before submitting this a bug I downloaded the latest CVS release to see if it has been fixed. It has! Unfortunatly, I do not know how stable the CVS version is for production use? At present 4.3.1 has some serious bugs (i.e persistent connections not working) but we hve implemented workarounds. What I would like to know is, is it worth waiting for PHP 4.3.3 or just use the CVS version? Thanks, Timothy -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: MySQL Problem
What's up Supposing that the filename of the you code is create_table.php. Try tipping in the URL: create_table.php?nueva_base=prueba EF. --- Que tal Suponiendo que el archivo del codigo se llama create_table.php. Prueba poniendo el la URL: create_table.php?nueva_base=prueba EF. "Felipe R." <[EMAIL PROTECTED]> escribió en el mensaje news:[EMAIL PROTECTED] > Hi everyone, > > first, sorry to all if my english is so poor. > second, i have the follow question: when i create a existing MySQL DBase, > what happend?? > > how can i avoid this problem?? > > i attached my create_table code. Thanks for all > > > > Creación de una Base de Datos > > > Creando Base de Datos > > $connection = mysql_connect("localhost","ferios","ferios") or die ("No se > puede conectar a MySQL"); > if (!$connection) { > die ("No se puede conectar a MySQL"); > } > > if (mysql_create_db("$nueva_base")) { > print (" Base de Datos size=\"5\">$nueva_base Creada Satisfactoriamente!!"); > $db_list = mysql_list_dbs($connection); > $indice=0; > > while($row = mysql_fetch_array($db_list)){ > $bases[$indice]=$row[0]; > $indice++; > } > > mysql_close($connection); > > echo " Las Bases de Datos Disponibles son: > "; > for($aux = 0; $aux < $indice; $aux++) { > echo " $bases[$aux]"; > } > }else{ > print ("Ërror Creando la Base de Datos: ". mysql_error()); > } > ?> > > Volver a href="http://localhost/administrador.htm";>Administrador de Bases de > Datos > Volver a http://localhost/nueva_base.htm";>Crear > un Base de Datos > > > > > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] header function problem
It works now. Are their any examples out there that will show how to pass back the information that was entered and pass the error message back to the form.htm ? Or a function that i need to read up on. -Dan - Original Message - From: "Jason Wong" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, June 05, 2003 1:01 AM Subject: Re: [PHP] header function problem > On Thursday 05 June 2003 07:01, Daniel J. Rychlik wrote: > > Well, it works if I use the full path instead of relative So obviously > > its an apache permissions issue. > > It has nothing to do with apache. The specs require that the location is > absolute. > > -- > 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 > -- > /* > It is undignified for a woman to play servant to a man who is not hers. > -- Spock, "Amok Time", stardate 3372.7 > */ > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP CLI question
Hi, A couple of questions: 1) Is there a way to make the CLI version of PHP ignore certain settings in the php.ini file? For instance, I don't want the ioncube accelerator invoked when using PHP from the command line. My current work around is to use two separate init files, php.ini and php-cli.ini ... and this brings me to my second question: 2) Is there a way to specify a different name for the php.ini file, apart from hacking php_ini.c ? It seems I can only change the _path_ to the file, but not the filename itself. TIA Monte -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] How do I display new lines in a textearea?
Hi I want to have a textarea that contains details read from a mysql table, but I want to echo each row so that it is on a new line. What is the "new-line" character for a textarea? ( in effect the reverse of nl2br() ) Thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP CLI question
http://www.php.net/manual/en/function.ini-set.php * Cal Evans * http://www.christianperformer.com * Stay plugged into your audience * The measure of a programmer is not the number of lines of code he writes but the number of lines he does not have to write. * - Original Message - From: "Monte Ohrt" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Thursday, June 05, 2003 9:22 AM Subject: [PHP] PHP CLI question > Hi, > > A couple of questions: > > 1) Is there a way to make the CLI version of PHP ignore certain settings > in the php.ini file? For instance, I don't want the ioncube accelerator > invoked when using PHP from the command line. My current work around is > to use two separate init files, php.ini and php-cli.ini ... and this > brings me to my second question: > > 2) Is there a way to specify a different name for the php.ini file, > apart from hacking php_ini.c ? It seems I can only change the _path_ to > the file, but not the filename itself. > > TIA > Monte > > > > -- > 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 do I display new lines in a textearea?
> I want to have a textarea that contains details read from a mysql table, > but I want to echo each row so that it is on a new line. What is the > "new-line" character for a textarea? ( in effect the reverse of nl2br() A newline is \n $text = "word\nword\nword\n"; echo "$word"; will have each "word" on a different line. ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP CLI question
Hi Cal, I may be missing something, but I don't see how this page answers either of my questions. ini_set() is for setting configuration options. Monte On Thu, 2003-06-05 at 09:23, Cal Evans wrote: > http://www.php.net/manual/en/function.ini-set.php > > * Cal Evans > * http://www.christianperformer.com > * Stay plugged into your audience > * The measure of a programmer is not the number of lines of code he writes > but the number of lines he does not have to write. > * > > - Original Message - > From: "Monte Ohrt" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Cc: <[EMAIL PROTECTED]> > Sent: Thursday, June 05, 2003 9:22 AM > Subject: [PHP] PHP CLI question > > > > Hi, > > > > A couple of questions: > > > > 1) Is there a way to make the CLI version of PHP ignore certain settings > > in the php.ini file? For instance, I don't want the ioncube accelerator > > invoked when using PHP from the command line. My current work around is > > to use two separate init files, php.ini and php-cli.ini ... and this > > brings me to my second question: > > > > 2) Is there a way to specify a different name for the php.ini file, > > apart from hacking php_ini.c ? It seems I can only change the _path_ to > > the file, but not the filename itself. > > > > TIA > > Monte > > > > > > > > -- > > 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] libphp4.so
ok, when i compile php i dont get libphp4.so. i'm not a linux Newb or anything but i'm not an extremely advanced user either so any help would be useful... i cant exactly run apache w/ php w/out this module. thanks for any help any of you can give me. Redhat 8/apache2 (ugh @ both) -Ryan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: How do I display new lines in a textearea?
this is discussed in the posted comments under the function section of nl2br on php.net. But from what I remember there is no br2nl() (unfortunately). just goto php.net/nl2br and search the posted comments for br2nl Bobby "Petre Agenbag" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hi > > I want to have a textarea that contains details read from a mysql table, > but I want to echo each row so that it is on a new line. What is the > "new-line" character for a textarea? ( in effect the reverse of nl2br() > ) > > Thanks > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP CLI question
>From a ./php -h: -c | Look for php.ini file in this directory The "|" means "OR", so logic would dictate you can point directly to the file with the -c option. On Thu, 2003-06-05 at 10:35, Monte Ohrt wrote: > Hi Cal, > > I may be missing something, but I don't see how this page answers either > of my questions. ini_set() is for setting configuration options. > > Monte > > On Thu, 2003-06-05 at 09:23, Cal Evans wrote: > > http://www.php.net/manual/en/function.ini-set.php > > > > * Cal Evans > > * http://www.christianperformer.com > > * Stay plugged into your audience > > * The measure of a programmer is not the number of lines of code he writes > > but the number of lines he does not have to write. > > * > > > > - Original Message - > > From: "Monte Ohrt" <[EMAIL PROTECTED]> > > To: <[EMAIL PROTECTED]> > > Cc: <[EMAIL PROTECTED]> > > Sent: Thursday, June 05, 2003 9:22 AM > > Subject: [PHP] PHP CLI question > > > > > > > Hi, > > > > > > A couple of questions: > > > > > > 1) Is there a way to make the CLI version of PHP ignore certain settings > > > in the php.ini file? For instance, I don't want the ioncube accelerator > > > invoked when using PHP from the command line. My current work around is > > > to use two separate init files, php.ini and php-cli.ini ... and this > > > brings me to my second question: > > > > > > 2) Is there a way to specify a different name for the php.ini file, > > > apart from hacking php_ini.c ? It seems I can only change the _path_ to > > > the file, but not the filename itself. > > > > > > TIA > > > Monte > > > > > > > > > > > > -- > > > PHP General Mailing List (http://www.php.net/) > > > To unsubscribe, visit: http://www.php.net/unsub.php > > > > > > -- 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] Advice on script length please!
On Thu, 5 Jun 2003 10:25:01 +0100, Bix wrote: >My file is currently 1200 lines long and consist of 450 lines of case >statements and then the rest are functions. Obviously there are ways to optimize the code for speed. However, as with many optimizations, there are trade offs... One way to do away with the 450 lines of case would be to use a BUNCH of include modules. For instance: What this means is that you would need a "Function" file for each option in your directory with only the code for that function. It would be included when the "Opt" function matched. Of course, you would need to either see if the file exists or catch the error if it doesn't but you just compressed 450 lines of case into 2 lines. You also probably compressed 2200 lines down to about 120 or so lines (3 lines for the driver, 80 for the standard includes and another 20-40 for the main function). The down side to this is that you have to have 100+ php files that you will have to maintain separately. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] recursive displaying tree structure
Hi, May this can help you: $value) { $tmp[$key] = $value; } $tmp['indent'] = $indent; $ret_tree[] = $tmp; tree($tmp['id'], $indent+1); } } else { return 0; } } // This is your tree structure. It should be sorted by titles // $g_tree = array(); $g_tree[] = array( 'id' => 1, 'id_parent' => 0, 'title' => 'Astronomy' ); $g_tree[] = array( 'id' => 2, 'id_parent' => 1, 'title' => 'Radio-Astronomy' ); $g_tree[] = array( 'id' => 3, 'id_parent' => 2, 'title' => 'Radio-Observatories' ); $g_tree[] = array( 'id' => 4, 'id_parent' => 0, 'title' => 'Physics' ); $g_tree[] = array( 'id' => 5, 'id_parent' => 4, 'title' => 'Lasers' ); $g_tree[] = array( 'id' => 6, 'id_parent' => 4, 'title' => 'Photonics' ); // This the the return array with indents // $ret_tree = array(); tree(0,0); //Print the tree structure with indents // foreach($ret_tree as $cat) { $indent = ''; for($i=0;$i<$cat['indent'];$i++) $indent .= '___'; echo $indent.$cat['title'].''; } ?> It sould even work to print a subtree eg. tree(1,0) atur ___ "Mike Klemin" <[EMAIL PROTECTED]> wrote > Hello, > > If anyone have expamples of displaying tree structure. > > Say I have array $result[x][y] with folloowing data > > XY["ID"]Y["OWNER"] > 01 0 > 12 1 > 23 2 > 34 2 > 45 3 > 56 2 > 67 2 > > > So, I want it displayed like > > ID1 > ID2 > ID3 > ID5 > ID4 > ID6 > ID7 > > > > Please, help I tryed to do it with recursing but failed. > > There is a test function which shows that php doesnt support recursing > well:- > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Browser detection script (css)
Maybe this could do the job as well. Thanks "Emo" <[EMAIL PROTECTED]> skrev i meddelandet news:[EMAIL PROTECTED] > I don't know if you mean this ... > I use for detect browser and send css for it this script: > > // set default css file (MSIE) > $css='main.css'; > // if browser is opera ... > if (substr_count($_SERVER["HTTP_USER_AGENT"], 'Opera')) > { > // ... set opera css > $css='main.opera.css'; > } > // if browser is gecko-based (mozilla, etc...) > elseif (substr_count($_SERVER["HTTP_USER_AGENT"], 'Gecko')) > { > // ... set gecko css > $css='main.gecko.css'; > } > ?> > > > Some title > > > > > . > . > . > "ØYstein HåLand" <[EMAIL PROTECTED]> pí¹e v diskusním pøíspìvku > news:[EMAIL PROTECTED] > > Till now I've bin using the BrowserDetect.class.php by Harry Fuecks. Since > I > > migrated to register_globals=off this produses a lot of error messages. > Has > > anyone a modification that work or another script doing the same? > > > > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP Class for IP CIDR notation
Here's a quick function of the top of my head. I'm not sure if x.x.0.x or x.0.x.x are valid IP addresses. Adjust as necessary. 255) { echo "First octet of IP address cannot exceed 255"; return false; } $ip_list[]=implode(".",$octet); } return $ip_list; } $arr=cidr("192.168.1.0",23); echo ""; print_r($arr); echo ""; ?> --- Rob Lacey <[EMAIL PROTECTED]> wrote: > does anyone know of a class that is able to extrapolate a list of > IPs given an > address in cidr notation. I have used the Net::Netmask module in > perl, so I > was just wondering if there was a PHP equivalent. > > Thanks > > Rob > > -- > 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!? Yahoo! Calendar - Free online calendar with sync to Outlook(TM). http://calendar.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PDF
Hy! I have an existing pdf formular, which I have to fill up with data from a mysql database. Now, I know, that there are these pdf funktions which could do all the work. But to use these functions I needed the PDFlib. Only the 'lite PDFlib' is an open source product, and the full version espezially PDFlib+PDI or PDFlib Personalization Server (PPS) costs an amazing mount of money. So my questions, is it possible, to fill in data using the 'lite PDFlib' in an existing pdf form? And if not, are there any other possibillities than to buy 'PDFlib+PDI' or 'PDFlib Personalization Server (PPS)' to do so? I'm thankful for every post! greetings to all of you! lukas -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP Mailing list software..
Can anyone make a recommendation for me? I'm looking to tie mailing lists in to my existing site, which is coded in php/mysql. I would be looking for a script that has browseable archives, ability to restrict access to them to subscribers only, and the ability to send mail to the list a web form, which would require a u/p stored in mysql, preferably in md5 format. I know I'll have to do a lot of customization to get it to integrate into my site, but I'm looking for a solid script that I need to tweak the least. Any suggestions? Thanks, Chad Day -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP Mailing list software..
Probably not what you want, but you might be able to adapt the phpBB forum software. Very sweet program in general. http://www.phpbb.com/ On Thu, 2003-06-05 at 12:13, Chad Day wrote: > Can anyone make a recommendation for me? I'm looking to tie mailing lists > in to my existing site, which is coded in php/mysql. I would be looking for > a script that has browseable archives, ability to restrict access to them to > subscribers only, and the ability to send mail to the list a web form, which > would require a u/p stored in mysql, preferably in md5 format. I know I'll > have to do a lot of customization to get it to integrate into my site, but > I'm looking for a solid script that I need to tweak the least. Any > suggestions? > > Thanks, > Chad Day -- 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
[PHP] Re: php4isapi.dll and header("Location: ...")
Eric Tonicello wrote: Hi ! Have somebody successed with the function < header("Location: http://...";) using the php4isapi.dll ??? My code works well with PHP using the CGI php.exe, but impossible to make it work with the ISAPI module !!! Configuration: -Windows 2000 server - PHP 4.3.2 "php.ini" : - output_buffering = on Have you tried: ob_end_clean(); header("Location: http://...";); to throw away the contents of the output buffer before sending the Location header, then its nice and clean. Peter - zlib.output_compression = on Any idea ?? Other bugs with ISAPI module ??? Thanks for help ! Eric Tonicello -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Passing values back to form
Im new to PHP coming from a background in perl devlopement. I have a form that a user can fill out. On submit the values are iterated over a foreach to check for empty(). If the an emtyp $key is found then it passes an error string to my error function. I have 2 php files, one that is the Form called profile.php and one that processes the values from the form, called profileprocess.php. There are multiple functions in profileprocess.php. When the header function is called in the profileprocess.php it takes you back to the profile.php with empty values in the fields. I was wandering if their is a way, (which Im sure their is) to pass back all the data that was correctly entered back to the form, and then a nice little message that displays the error of the data that needs to be checked by the user. I could do this a number of ways, but the key is not writing code that you dont have to. Its just smarter programming. Any ideas, or functions I could read on in the rtFM manual is greatly appreciated. I appreciate you looking at this problem... Thanks in advance, Daniel
Re: [PHP] PDF
Odds are you don't need PDFlib at all. The docs at php.net/pdf link to the following faq: How can I generate PDF files without using the non-free and commercial libraries ClibPDF and PDFLib? I'd like something that's free and doesn't require external PDF libraries. http://us2.php.net/manual/en/faq.using.php#faq.using.freepdf Consider using one of these alternatives. Regards, Philip On Thu, 5 Jun 2003, Lukas Gerhold wrote: > Hy! > > I have an existing pdf formular, which I have to fill up with data from a > mysql database. > Now, I know, that there are these pdf funktions which could do all the work. > But to use these functions I needed the PDFlib. > Only the 'lite PDFlib' is an open source product, and the full version > espezially PDFlib+PDI or PDFlib Personalization Server (PPS) costs an > amazing mount of money. > > So my questions, is it possible, to fill in data using the 'lite PDFlib' in > an existing pdf form? > And if not, are there any other possibillities than to buy 'PDFlib+PDI' or > 'PDFlib Personalization Server (PPS)' to do so? > > I'm thankful for every post! > greetings to all of you! > lukas > > > > -- > 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] Initialized PHP Module frequently
Hello, On Sun Solaris with Iplanet 4.1 et PHP 4.2.3, I have theses messages on the error log of the Web server : [04/Jun/2003:16:04:54] info ( 7643): php4_init reports: Initialized PHP Module [04/Jun/2003:16:09:57] info ( 7679): php4_init reports: Initialized PHP Module [04/Jun/2003:16:11:12] info ( 7690): php4_init reports: Initialized PHP Module [04/Jun/2003:16:17:17] info ( 7742): php4_init reports: Initialized PHP Module [04/Jun/2003:16:17:25] info ( 7745): php4_init reports: Initialized PHP Module [04/Jun/2003:16:19:26] info ( 7761): php4_init reports: Initialized PHP Module [04/Jun/2003:16:37:52] info ( 7906): php4_init reports: Initialized PHP Module [04/Jun/2003:16:47:24] info ( 7985): php4_init reports: Initialized PHP Module [04/Jun/2003:16:48:40] info ( 7992): php4_init reports: Initialized PHP Module [04/Jun/2003:16:50:04] info ( 8002): php4_init reports: Initialized PHP Module [04/Jun/2003:16:54:13] info ( 8032): php4_init reports: Initialized PHP Module And at the same time, I have theses other messages on the console : Jun 4 16:04:53 server1 uxwdog[23185]: server terminated (signal 10): watchdog is restarting it Jun 4 16:09:56 server1 uxwdog[23185]: server terminated (signal 11): watchdog is restarting it Jun 4 16:11:12 server1 uxwdog[23185]: server terminated (signal 10): watchdog is restarting it Jun 4 16:17:24 server1 last message repeated 2 times Jun 4 16:19:25 server1 uxwdog[23185]: server terminated (signal 11): watchdog is restarting it Jun 4 16:37:51 server1 uxwdog[23185]: server terminated (signal 10): watchdog is restarting it Jun 4 16:47:23 server1 uxwdog[23185]: server terminated (signal 11): watchdog is restarting it Jun 4 16:48:40 server1 uxwdog[23185]: server terminated (signal 10): watchdog is restarting it Jun 4 16:50:03 server1 uxwdog[23185]: server terminated (signal 11): watchdog is restarting it Jun 4 16:54:12 server1 last message repeated 1 time Why the process ns-httpd is restarting ? Is-it due to PHP ? How can I debug this ? AL -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Passing values back to form
Hi Daniel, My advice is to use php sessions. You can register both the filled and empty values in the session after processing them. Then you can header() redirect normally with no fuss and extract the values from the session file on the form page. And here's a tip. Set up some CSS in a switch() statement to highlight the form fields that are left blank. This makes for a nice user interface, esspecially on larger forms. Read up on sessions.. http://www.php.net/manual/en/ref.session.php HTH, Kevin Stone - Original Message - From: "Daniel J. Rychlik" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, June 05, 2003 10:31 AM Subject: [PHP] Passing values back to form Im new to PHP coming from a background in perl devlopement. I have a form that a user can fill out. On submit the values are iterated over a foreach to check for empty(). If the an emtyp $key is found then it passes an error string to my error function. I have 2 php files, one that is the Form called profile.php and one that processes the values from the form, called profileprocess.php. There are multiple functions in profileprocess.php. When the header function is called in the profileprocess.php it takes you back to the profile.php with empty values in the fields. I was wandering if their is a way, (which Im sure their is) to pass back all the data that was correctly entered back to the form, and then a nice little message that displays the error of the data that needs to be checked by the user. I could do this a number of ways, but the key is not writing code that you dont have to. Its just smarter programming. Any ideas, or functions I could read on in the rtFM manual is greatly appreciated. I appreciate you looking at this problem... Thanks in advance, Daniel -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP CLI question
Hi Adam, I know it can be altered with a command-line switch, but it is the default that I want to change. I don't want to have to remember to set the -c flag everytime, or go back and change all my existing scripts. Monte On Thu, 2003-06-05 at 09:53, Adam Voigt wrote: > >From a ./php -h: > > -c | Look for php.ini file in this directory > > The "|" means "OR", so logic would dictate you can point > directly to the file with the -c option. > > > On Thu, 2003-06-05 at 10:35, Monte Ohrt wrote: > > Hi Cal, > > > > I may be missing something, but I don't see how this page answers either > > of my questions. ini_set() is for setting configuration options. > > > > Monte > > > > On Thu, 2003-06-05 at 09:23, Cal Evans wrote: > > > http://www.php.net/manual/en/function.ini-set.php > > > > > > * Cal Evans > > > * http://www.christianperformer.com > > > * Stay plugged into your audience > > > * The measure of a programmer is not the number of lines of code he writes > > > but the number of lines he does not have to write. > > > * > > > > > > - Original Message - > > > From: "Monte Ohrt" <[EMAIL PROTECTED]> > > > To: <[EMAIL PROTECTED]> > > > Cc: <[EMAIL PROTECTED]> > > > Sent: Thursday, June 05, 2003 9:22 AM > > > Subject: [PHP] PHP CLI question > > > > > > > > > > Hi, > > > > > > > > A couple of questions: > > > > > > > > 1) Is there a way to make the CLI version of PHP ignore certain settings > > > > in the php.ini file? For instance, I don't want the ioncube accelerator > > > > invoked when using PHP from the command line. My current work around is > > > > to use two separate init files, php.ini and php-cli.ini ... and this > > > > brings me to my second question: > > > > > > > > 2) Is there a way to specify a different name for the php.ini file, > > > > apart from hacking php_ini.c ? It seems I can only change the _path_ to > > > > the file, but not the filename itself. > > > > > > > > TIA > > > > Monte > > > > > > > > > > > > > > > > -- > > > > PHP General Mailing List (http://www.php.net/) > > > > To unsubscribe, visit: http://www.php.net/unsub.php > > > > > > > > -- Monte Ohrt <[EMAIL PROTECTED]> -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Passing values back to form
Thanks so much for your time. These are great tips, thanks again. - Original Message - From: "Kevin Stone" <[EMAIL PROTECTED]> To: "Daniel J. Rychlik" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Thursday, June 05, 2003 12:37 PM Subject: Re: [PHP] Passing values back to form > Hi Daniel, > > My advice is to use php sessions. You can register both the filled and > empty values in the session after processing them. Then you can header() > redirect normally with no fuss and extract the values from the session file > on the form page. > > And here's a tip. Set up some CSS in a switch() statement to highlight the > form fields that are left blank. This makes for a nice user interface, > esspecially on larger forms. > > Read up on sessions.. > http://www.php.net/manual/en/ref.session.php > > HTH, > Kevin Stone > > > - Original Message - > From: "Daniel J. Rychlik" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Thursday, June 05, 2003 10:31 AM > Subject: [PHP] Passing values back to form > > > Im new to PHP coming from a background in perl devlopement. I have a form > that a user can fill out. > > On submit the values are iterated over a foreach to check for empty(). If > the an emtyp $key is found then it passes an error string to my error > function. > > I have 2 php files, one that is the Form called profile.php and one that > processes the values from the form, called profileprocess.php. There are > multiple functions in profileprocess.php. When the header function is > called in the profileprocess.php it takes you back to the profile.php with > empty values in the fields. I was wandering if their is a way, (which Im > sure their is) to pass back all the data that was correctly entered back to > the form, and then a nice little message that displays the error of the data > that needs to be checked by the user. I could do this a number of ways, but > the key is not writing code that you dont have to. Its just smarter > programming. > > Any ideas, or functions I could read on in the rtFM manual is greatly > appreciated. > > I appreciate you looking at this problem... > Thanks in advance, > Daniel > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] scheduled tasks
Does anyone know if there is any other way to have a php script run automatically (everyday, or week, or month, etc...) besides a cron job or scheduled task? Thanks. Matt
RE: [PHP] scheduled tasks
[snip] Does anyone know if there is any other way to have a php script run automatically (everyday, or week, or month, etc...) besides a cron job or scheduled task? Thanks. [/snip] I suppose that you could run a script with a sleep statement for x time, the re-direct to itself restarting the sleep statement. Hmmm? Jay -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Regex for Browser Versions
Im trying to pull the Mozilla version and *possibly* the MSIE x.xx string out $_SERVER['HTTP_USER_AGENT'] If I did this correctly, (MSIE\s\d\.\d{1,2})? should mean that if its there pull it out, else move on, since its not there. When viewing this script via a windows browser, it doesn't match the MSIE section. If I take out the trailing ?, it will match successfully. But when viewing it with a mozilla browser, the regex fails as there is not MSIE string in there. Any help with this would be appreciated. Thanks var_dump($_SERVER['HTTP_USER_AGENT']); echo ''; preg_match('/^(Mozilla\/\d\.\d{1,2}|Opera\/\d\.\d{1,2})\s\(.*?(MSIE\s\d\.\d{1,2})?.*?\)(\sOpera)?/', $_SERVER['HTTP_USER_AGENT'], $foo); var_dump($foo); ?> -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP CLI question
On Friday 06 June 2003 01:43, Monte Ohrt wrote: > I know it can be altered with a command-line switch, but it is the > default that I want to change. I don't want to have to remember to set > the -c flag everytime, or go back and change all my existing scripts. You can run separate ./configure commands for the apache (or whatever) module and for the CLI version, specifying a different "--with-config-file-path". -- 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 -- /* Cold, adj.: When the politicians walk around with their hands in their own pockets. */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP/Javascript Help
Hello, I'm trying to use a calendare script to select a date in another form. I got the calendar working and I've got it all working except one bit of error. I'm repeating a table field to get all these items into a table. Each row of the table has it's own text field where the user can type in when they want the item to be delivered. That's where the calendar comes in. It opens a new window, displays the calendar, and that's that. The problem I'm having is when the user click the date, they get an error, one of those "Expected ] on line whatever." I can see what the problem is. Since I repeat the form field, I made the field's name delivery[item_id] and item_id is replaced with the item's id currently being displayed. I need to keep this array so, how can I fix this error? I tried doing the \[ trick since that works with apostrpohes but it didn't seem to work. Any help would be great! Here's my javascript link code for each day of the month in the calendar script: print "$d"; $HTTP_GET_VARS['name'] holds the text field name, ie delivery[3322ffds]. If I replace the name either order in the text field and as the variable I pass in the URL it works fine. I'm not yours, so why should I be sincere about it, Stephen Craton Senior Executive Web Developer Mophus.com, Inc.
[PHP] Re: Regex for Browser Versions
Maybe it might be easier to just use the get_browser() function: http://www.php.net/manual/en/function.get-browser.php Monty > From: [EMAIL PROTECTED] (Gerard Samuel) > Newsgroups: php.general > Date: Thu, 05 Jun 2003 14:00:23 -0400 > To: [EMAIL PROTECTED] > Subject: Regex for Browser Versions > > Im trying to pull the Mozilla version and *possibly* the MSIE x.xx > string out $_SERVER['HTTP_USER_AGENT'] > If I did this correctly, (MSIE\s\d\.\d{1,2})? should mean that if its > there pull it out, else move on, since its not there. > When viewing this script via a windows browser, it doesn't match the > MSIE section. If I take out the trailing ?, it will match successfully. > But when viewing it with a mozilla browser, the regex fails as there is > not MSIE string in there. > Any help with this would be appreciated. > Thanks > > > var_dump($_SERVER['HTTP_USER_AGENT']); > echo ''; > preg_match('/^(Mozilla\/\d\.\d{1,2}|Opera\/\d\.\d{1,2})\s\(.*?(MSIE\s\d\.\d{1, > 2})?.*?\)(\sOpera)?/', > $_SERVER['HTTP_USER_AGENT'], $foo); > > var_dump($foo); > > ?> > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Where to start?
Knowing any kind of programming language will help in learning PHP. If you understand variables, arrays, if/else structures, etc., it allows you to skim over some of the basics quickly. I had very little programming experience, but, learned a lot from the book "PHP and MySQL Web Development" by Luke Wellington and Laura Thomson. This was a about 2 years ago, though, and if they haven't come out with an update, then it's probably a little too outdated by now. Also, I learned LOTS from a number of guys on this newsgroup who generously offer their advice and wisdom. The sites that a few others mentioned are also helpful. Once you start programming, ALWAYS check out the online PHP help on php.net. It's really excellent and is chock full of input from users who offer sample scripts and solutions for all kinds of things. It's the best resource anywhere. I also get PHP Architect (phparch.com), a PDF publication that has some good and helpful stuff in it. As you can see, there are lots of online resources for PHP and MySQL. Monty > From: [EMAIL PROTECTED] (Simon Thurtle) > Organization: Mainlink > Reply-To: "Simon Thurtle" <[EMAIL PROTECTED]> > Newsgroups: php.general > Date: Thu, 5 Jun 2003 13:36:14 +0100 > To: [EMAIL PROTECTED] > Subject: Where to start? > > Hi all, > I am looking into learning PHP, I have a good understanding of HTML, JS and > I know a little Perl. Firstly I know PHP is all server side and so a damn > sight different from the above, but will they help me at all? > Secondly where do I start? Are there any good on-line resources and or books > that anyone knows? I am plannig to develop an E-comm solution us Oscommerce, > does anyone know if this is any good or is naff? > Any hints, tips or pointers would be greatly appreciated. > > Thanks, > > Simon > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Needing Just a Little Advice!
Thanks very much!!! :-D I had no idea it was an old topic!!! -Original Message- From: Evan Nemerson [mailto:[EMAIL PROTECTED] Sent: June 4, 2003 1:25 PM To: sevenfiftyflat; [EMAIL PROTECTED] Subject: Re: [PHP] Needing Just a Little Advice! Try not hijacking threads. Other than that, this has been discussed several times in the past. Methinks a thorough scouring of the archives would be fruitful. On Wednesday 04 June 2003 01:18 pm, sevenfiftyflat wrote: > Hi! > > From any of you out there that managed to get a PHP script to > automatically upload your Auction to Ebay, I need some general advice > and help. I've hit a brick wall, and would gladly work with something, > letting you know what I know in exchange for what you know. > > I post and repost the EXACT same, and NEARLY the exact same item, and > I just want to make my life much easier!! I spend about 3 hours posting, > when I KNOW I can get PHP to do it for me with the push of a button. > >So... Anyone Have any help? Anyone intested? Thanks! -- 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] Using the .htaccess file to extend the php.ini include path entry
I want to add some directories to the "include path" entry in the php.ini file. I have to do this via the .htaccess file because I do not have access to the php.ini file on the server. Will the additional directories in the .htaccess file replace the directories in the php.ini file or will the ones in the .htaccess file be added to the directories in the php.ini file? -- Jan [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Morph an object
Torben, Thanks for your help. I got it to work by creating a constructor that took the content as an argument then set the property $this->content = SetContent($content); Then in my script I instantiated the object with the login form as the content. I created a switch case for the result of the login routine and within each case I re-invoked the constructor with a different argument to change the content. Then when I called the Display() function again, it changed the screen on the browser... I really appreciate all your help! /T on 6/5/03 4:12, Lars Torben Wilson at [EMAIL PROTECTED] wrote: > On Wed, 2003-06-04 at 17:18, [EMAIL PROTECTED] wrote: >> You have the problem right. What do you mean by a "server push"? Sounds >> interesting... >> >> Anyway I have to display something. Since its a login, the user needs their >> interface. I think I'll have to introduce another page... I'd love to >> avoid that though... >> >> /T > > Search for "server push" (use quotes) on google...essentially, it means > that the server can update information in the browser. Unfortunately, it > is extremely limited and usually not worth the hassle. > > My suggestion would be to do something like this: have a page which > shows a login form. The form posts back to itself (the same page). When > there is no input, the script displays a blank login form. If there is > input, the script attempts to validate the login data. If the data > validates, the script somehow calls the next page (sends a redirect > header, or include()s the code, or instantiates that page's class, > etc...). If not, it redisplays the form, perhaps with some added > information about what went wrong. It's important to note that nothing > is ever sent to the browser until all needed information is > known...that way, you always have the option to alter the output, or > send a redirect header, or whatever. > > > Torben -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Approved
Please see the attached file. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Regex for Browser Versions
True, but since the code is being run by 3rd parties, I don't have a guarantee that the browsecap.ini file is available on the server. Monty wrote: Maybe it might be easier to just use the get_browser() function: http://www.php.net/manual/en/function.get-browser.php Monty -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Basic counter & users online..
Glory! I'm working on a Counter thing. with a basic Hit Meter and a Users Online Meter. The problem I face is.. the index page of my site is HTML .. no frameset.. and I need to display these vars on that page. The solution I use is that I place a Flash Clip (.swf) and I'm calling the PHP Variables in it, from a PHP page.. But now the issues comes in.. how does the Database increment the counter? If I place the counter increment script on a PHP page.. it's ok. But here I have a HTML page with Flash in it.. when this HTML page loads.. the Counter needs to be incremented by one, and this adding to the Hits. Same way the Users Online script needs to work.. but how do I do this? Does anybody have any other solution how to make this work? PHPSpooky __ "If God had wanted me otherwise, He would have created me otherwise." - Johann Wolfgang von Goethe
[PHP] Allowing punctuation marks in regular expressions
I found the following function to test a string for alphanumeric characters function is_alphanumeric($string) { return (preg_match("/^[a-z0-9]+$/i", $string)); } How can I modify it so that it also allows punctuation marks? thanks, Luis R. Lebron
RE: [PHP] Allowing punctuation marks in regular expressions
Hi, > return (preg_match("/^[a-z0-9]+$/i", $string)); That a-z0-9 is where you can do it. Just add ! or . or ? to the end: a-z0-9!?. Also, if you want upper case letters, make sure you add A-Z: A-Za-z0-9!?. -Dan Joseph -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP Install help with gettext
Hi, We are attempting to install PHP 4.3.2 on to windows XP using Apache as our web server. When we try to start apache, the Warning message appears: "Unkown(): Unable to load dynamic library 'c:\PHP\extensions\php_gettext.dll' - The specified module could not be found." We have not been able to locate the php_gettext.dll file, and it was suggested to try the libintl.dll file, but we have not had any success with it. Can you please help us? Thanks, Andrew [EMAIL PROTECTED]
Re: [PHP] Validating user input
Try this: if (is_numeric($txt1) && (float)$txt1<24 && (strlen($txt1)-strpos($txt1,"."))<=3) { echo "True"; } else { echo "False"; }; Misha PHP Genie "Electroteque" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > is_numeric and strlen ? > > -Original Message- > From: Shaun [mailto:[EMAIL PROTECTED] > Sent: Tuesday, June 03, 2003 7:21 PM > To: [EMAIL PROTECTED] > Subject: [PHP] Validating user input > > > Hi, > > I am creating a timesheet application, how can I make sure that a user has > entered a number, and that the number is a whole number or a decimal up to 2 > places, and that the number is less than 24? > > Thanks for your help > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Allowing punctuation marks in regular expressions
I tried adding a period to the end but a string will a period still returns false function is_alphanumeric($string) { return (preg_match("/^[A-Za-z0-9.]+$/i", $string)); } -Original Message- From: Dan Joseph [mailto:[EMAIL PROTECTED] Sent: Thursday, June 05, 2003 2:42 PM To: Php-General (E-mail) Subject: RE: [PHP] Allowing punctuation marks in regular expressions Hi, > return (preg_match("/^[a-z0-9]+$/i", $string)); That a-z0-9 is where you can do it. Just add ! or . or ? to the end: a-z0-9!?. Also, if you want upper case letters, make sure you add A-Z: A-Za-z0-9!?. -Dan Joseph -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP CLI question
Wrap it in a shell script or batch file. Something like: REM ---Start cli.bat--- ./cli/php.exe -c <> %1 %2 %3 %4 %5 %6 %7 %8 %9 @exit REM ---End cli.bat--- --- Monte Ohrt <[EMAIL PROTECTED]> wrote: > Hi Adam, > > I know it can be altered with a command-line switch, but it is the > default that I want to change. I don't want to have to remember to > set > the -c flag everytime, or go back and change all my existing > scripts. > > Monte > > On Thu, 2003-06-05 at 09:53, Adam Voigt wrote: > > >From a ./php -h: > > > > -c | Look for php.ini file in this directory > > > > The "|" means "OR", so logic would dictate you can point > > directly to the file with the -c option. > > > > > > On Thu, 2003-06-05 at 10:35, Monte Ohrt wrote: > > > Hi Cal, > > > > > > I may be missing something, but I don't see how this page > answers either > > > of my questions. ini_set() is for setting configuration > options. > > > > > > Monte > > > > > > On Thu, 2003-06-05 at 09:23, Cal Evans wrote: > > > > http://www.php.net/manual/en/function.ini-set.php > > > > > > > > * Cal Evans > > > > * http://www.christianperformer.com > > > > * Stay plugged into your audience > > > > * The measure of a programmer is not the number of lines of > code he writes > > > > but the number of lines he does not have to write. > > > > * > > > > > > > > - Original Message - > > > > From: "Monte Ohrt" <[EMAIL PROTECTED]> > > > > To: <[EMAIL PROTECTED]> > > > > Cc: <[EMAIL PROTECTED]> > > > > Sent: Thursday, June 05, 2003 9:22 AM > > > > Subject: [PHP] PHP CLI question > > > > > > > > > > > > > Hi, > > > > > > > > > > A couple of questions: > > > > > > > > > > 1) Is there a way to make the CLI version of PHP ignore > certain settings > > > > > in the php.ini file? For instance, I don't want the ioncube > accelerator > > > > > invoked when using PHP from the command line. My current > work around is > > > > > to use two separate init files, php.ini and php-cli.ini ... > and this > > > > > brings me to my second question: > > > > > > > > > > 2) Is there a way to specify a different name for the > php.ini file, > > > > > apart from hacking php_ini.c ? It seems I can only change > the _path_ to > > > > > the file, but not the filename itself. > > > > > > > > > > TIA > > > > > Monte > > > > > > > > > > > > > > > > > > > > -- > > > > > PHP General Mailing List (http://www.php.net/) > > > > > To unsubscribe, visit: http://www.php.net/unsub.php > > > > > > > > > > > -- > Monte Ohrt <[EMAIL PROTECTED]> > > > -- > 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!? Yahoo! Calendar - Free online calendar with sync to Outlook(TM). http://calendar.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] scheduled tasks
If the issue is running a cron job on the server, you could run the cron job or scheduled task on a client with lynx. The client would just need to be on and have access to the server at the time it fires up the task. --- Matt Palermo <[EMAIL PROTECTED]> wrote: > Does anyone know if there is any other way to have a php script run > automatically (everyday, or week, or month, etc...) besides a cron > job or scheduled task? Thanks. > > Matt > = 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!? Yahoo! Calendar - Free online calendar with sync to Outlook(TM). http://calendar.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] ob_get_contents returns FALSE?
I can't get ob_get_contents() to return false, or I don't know how to test for it. Help appreciated. The following never echos STARTING!!! ob_end_flush(); if(ob_get_contents() === FALSE) { echo "STARTING!!!"; ob_start(); } also tried: if(ob_get_contents() == FALSE) and: if(!ob_get_contents()) and: if(ob_get_contents() == "") But I do get the following notice at the ob_end_flush(); line which tells me that output buffering is not on: Notice: ob_end_flush() [ref.outcontrol]: failed to delete buffer default output handler. Thanks! Shawn -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Allowing punctuation marks in regular expressions
It's using the case-insensitive switch. Dan Joseph wrote: Also, if you want upper case letters, make sure you add A-Z: -- The above message is encrypted with double rot13 encoding. Any unauthorized attempt to decrypt it will be prosecuted to the full extent of the law. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Using register_globals
On Thu, 2003-06-05 at 05:28, Jay Blanchard wrote: > [snip] > Another issue I haven't read so far is that making your script work when > register_globals is off makes it to be more compatible since scripts > using GET and POST array should still work on systems that have > register_globals turned on. > [/snip] > > So what you're asking for is a variable handler that will take care of > things whether or not register_globals is turned on or off and you want > the variables considered across a range of PHP versions? If so there > have been many of those ideas posted, check the archives. > > HTH! > > Jay I think he was just saying the using $_GET and $_POST is a better way to make sure that your script is compatible across as many installations and version than using register_globals = on, since it will always work. :) Torben -- Torben Wilson <[EMAIL PROTECTED]>+1.604.709.0506 http://www.thebuttlesschaps.com http://www.inflatableeye.com http://www.hybrid17.com http://www.themainonmain.com - Boycott Starbucks! http://www.haidabuckscafe.com - -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP CLI question
ok, so there are plenty of ways to work around it ;-) I guess my original question should be answered as such? "No, you cannot specify a different configuration file name other than php.ini, you must either hack the C code or supply a workaround at runtime." Monte On Thu, 2003-06-05 at 15:07, Mark wrote: > Wrap it in a shell script or batch file. > > Something like: > > REM ---Start cli.bat--- > ./cli/php.exe -c <> %1 %2 %3 %4 %5 %6 %7 %8 %9 > @exit > REM ---End cli.bat--- > > > --- Monte Ohrt <[EMAIL PROTECTED]> wrote: > > Hi Adam, > > > > I know it can be altered with a command-line switch, but it is the > > default that I want to change. I don't want to have to remember to > > set > > the -c flag everytime, or go back and change all my existing > > scripts. > > > > Monte > > > > On Thu, 2003-06-05 at 09:53, Adam Voigt wrote: > > > >From a ./php -h: > > > > > > -c | Look for php.ini file in this directory > > > > > > The "|" means "OR", so logic would dictate you can point > > > directly to the file with the -c option. > > > > > > > > > On Thu, 2003-06-05 at 10:35, Monte Ohrt wrote: > > > > Hi Cal, > > > > > > > > I may be missing something, but I don't see how this page > > answers either > > > > of my questions. ini_set() is for setting configuration > > options. > > > > > > > > Monte > > > > > > > > On Thu, 2003-06-05 at 09:23, Cal Evans wrote: > > > > > http://www.php.net/manual/en/function.ini-set.php > > > > > > > > > > * Cal Evans > > > > > * http://www.christianperformer.com > > > > > * Stay plugged into your audience > > > > > * The measure of a programmer is not the number of lines of > > code he writes > > > > > but the number of lines he does not have to write. > > > > > * > > > > > > > > > > - Original Message - > > > > > From: "Monte Ohrt" <[EMAIL PROTECTED]> > > > > > To: <[EMAIL PROTECTED]> > > > > > Cc: <[EMAIL PROTECTED]> > > > > > Sent: Thursday, June 05, 2003 9:22 AM > > > > > Subject: [PHP] PHP CLI question > > > > > > > > > > > > > > > > Hi, > > > > > > > > > > > > A couple of questions: > > > > > > > > > > > > 1) Is there a way to make the CLI version of PHP ignore > > certain settings > > > > > > in the php.ini file? For instance, I don't want the ioncube > > accelerator > > > > > > invoked when using PHP from the command line. My current > > work around is > > > > > > to use two separate init files, php.ini and php-cli.ini ... > > and this > > > > > > brings me to my second question: > > > > > > > > > > > > 2) Is there a way to specify a different name for the > > php.ini file, > > > > > > apart from hacking php_ini.c ? It seems I can only change > > the _path_ to > > > > > > the file, but not the filename itself. > > > > > > > > > > > > TIA > > > > > > Monte > > > > > > > > > > > > > > > > > > > > > > > > -- > > > > > > PHP General Mailing List (http://www.php.net/) > > > > > > To unsubscribe, visit: http://www.php.net/unsub.php > > > > > > > > > > > > > > -- > > Monte Ohrt <[EMAIL PROTECTED]> > > > > > > -- > > 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!? > Yahoo! Calendar - Free online calendar with sync to Outlook(TM). > http://calendar.yahoo.com -- Monte Ohrt <[EMAIL PROTECTED]> -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Automatic Headers and Footers
Ok guys, I think I have a challenge for you (actually, I don't think this can be done, but I've been proven wrong every time I've made that assumption with php in the past, so I'll ask anyway). Here's the question: Is there a way to have php insert headers and/or footers into all of the html files in a given directory on the fly (not actually modifying the files)? And by this I mean take an existing valid HTML file and add headers and footers and end up with a valid HTML file. Now, before some of you get trigger happy and tell me to read the manual and point me to things like .htaccess, auto_prepend_file, google and the like, think about what I'm really asking It needs to insert the header after the -body- tag and put the footer in before the -/body- tag. It needs to do this without modifications to the HTML file. And yes, I understand that by default HTML files aren't going to be effected by the auto_prepend_file (since they aren't php files) - so it will require adding HTML to the list of php parsed file types. For instance, the goal would be to take the following code: -HTML- -Head- -Title-This is a test-Title- -body- Well, did it work? -/body- -/html- and convert it to this: -HTML- -Head- -Title-This is a test-Title- -body- -h1-This is a page header-/h1- Well, did it work? -h3-This is the footer-/h3- -/body- -/html- Can it be done? I don't think so, but I leave it up to your wiles to suggest a solution Thanks!!! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Approved
No file attached.. <[EMAIL PROTECTED]> escribió en el mensaje news:[EMAIL PROTECTED] > Please see the attached file. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Automatic Headers and Footers
I would have to say yes it can be done. The way *I* would do it is like this: First, I would drop a .htaccess file that allows the HTML files to run through the PHP parser. Like this AddType application/x-httpd-php .php .html The in all of the HTML docs it would look like this: -HTML- -Head- -Title-This is a test-Title- -body- -h1--/h1- Well, did it work? -h3--/h3- -/body- -/html- The next question that comes to mind is, are all the headers and footers static? Or will they rotate? You will have to have that php code in your HTML docs, otherwise they won't know how to add the header and footer. Wendell Brown wrote: Ok guys, I think I have a challenge for you (actually, I don't think this can be done, but I've been proven wrong every time I've made that assumption with php in the past, so I'll ask anyway). Here's the question: Is there a way to have php insert headers and/or footers into all of the html files in a given directory on the fly (not actually modifying the files)? And by this I mean take an existing valid HTML file and add headers and footers and end up with a valid HTML file. Now, before some of you get trigger happy and tell me to read the manual and point me to things like .htaccess, auto_prepend_file, google and the like, think about what I'm really asking It needs to insert the header after the -body- tag and put the footer in before the -/body- tag. It needs to do this without modifications to the HTML file. And yes, I understand that by default HTML files aren't going to be effected by the auto_prepend_file (since they aren't php files) - so it will require adding HTML to the list of php parsed file types. For instance, the goal would be to take the following code: -HTML- -Head- -Title-This is a test-Title- -body- Well, did it work? -/body- -/html- and convert it to this: -HTML- -Head- -Title-This is a test-Title- -body- -h1-This is a page header-/h1- Well, did it work? -h3-This is the footer-/h3- -/body- -/html- Can it be done? I don't think so, but I leave it up to your wiles to suggest a solution Thanks!!! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Automatic Headers and Footers
Well, my understanding of mod_rewrite is nonexistent (heck, I'm not even sure that's the correct name), but I believe you do the following. Write a php script to parse the file and output it with the added lines you want where you want them. Then setup apache/php to accept something like http://www.yourserver.com/directory/phpscript/yourfile.html where is the path to where the files are located, is the php script (located (in )that parses the html files, and is... one of your HTML files. It's not ideal, but it will let you wrap something around existing HTML files without modifying them or their location. --- Wendell Brown <[EMAIL PROTECTED]> wrote: > Ok guys, I think I have a challenge for you (actually, I don't > think > this can be done, but I've been proven wrong every time I've made > that > assumption with php in the past, so I'll ask anyway). Here's the > question: > > Is there a way to have php insert headers and/or footers into all > of > the html files in a given directory on the fly (not actually > modifying > the files)? And by this I mean take an existing valid HTML file > and > add headers and footers and end up with a valid HTML file. > > Now, before some of you get trigger happy and tell me to read the > manual and point me to things like .htaccess, auto_prepend_file, > google > and the like, think about what I'm really asking It needs to > insert the header after the -body- tag and put the footer in before > the > -/body- tag. It needs to do this without modifications to the HTML > file. > > And yes, I understand that by default HTML files aren't going to be > effected by the auto_prepend_file (since they aren't php files) - > so it > will require adding HTML to the list of php parsed file types. > > For instance, the goal would be to take the following code: > > -HTML- > -Head- > -Title-This is a test-Title- > -body- > > Well, did it work? > > -/body- > -/html- > > and convert it to this: > > -HTML- > -Head- > -Title-This is a test-Title- > -body- > -h1-This is a page header-/h1- > > Well, did it work? > > -h3-This is the footer-/h3- > -/body- > -/html- > > Can it be done? I don't think so, but I leave it up to your wiles > to > suggest a solution > > Thanks!!! > > > -- > 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!? Yahoo! Calendar - Free online calendar with sync to Outlook(TM). http://calendar.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Gracefully dealing with Cookies OFF
> both the cookie and URL based session passed over without SSL is insecure. > i'd love to know who told you otherwise. I can't remember the exact sites now, but, the issue was about how much easier it is to spoof Sessions when IDs are passed via the URL as opposed to being stored in a cookie. > perhaps now is the time to re-think all this stuff, decide if you are going > to support everyone (which i would for any paying client with a wide target > market), or skip over those who don't meet your definition of a web visitor. After your indepth response, I've re-thought my re-thinking and have gone back to wanting to support all users whether or not they have cookies turned on. And, miraculously, I've already got it working, so, thanks for your detailed reply. But going back to the first point, if I'm passing Session IDs via the URL, shouldn't I be doing something more to make the site a little more secure? I don't store sensitive data in sessions vars, but, if it allows a non-paying member to hijack a paying member's session, then this is going to be a problem. But I'm not sure what more I can do to make the session a little more secure and less likely that someone will hijack it. SSL is a little overkill for this, as this isn't a bank or financial institution, it's just a little community website. The log-in for the site is fairly simple: After verifying the username and password against what's stored in the DB, it sets up a few session vars with that member's access level and a few other preferences. This is so I don't have to continually query the DB for this info on every page. Is there anything more I can do to make it harder to spoof sessions? > just to throw another spanner into it all, what happens if I have JS off? > will I still be able to access the content of the pop-ups? i bet not :) Well, I have to draw the line somewhere. Javascript is used throughout this site for simple things like resizable popups. I'm not willing to dumb it down that much. Thanks! Monty -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: move_uploaded_file > 1MB
I couldn't find the option max_body_request somebody knows where it is? Thanks! Maurício Valente "Mauricio Agp5" <[EMAIL PROTECTED]> escreveu na mensagem news:[EMAIL PROTECTED] > > - Original Message - > From: "Yves Daemen" <[EMAIL PROTECTED]> > Newsgroups: php.general > To: <[EMAIL PROTECTED]> > Sent: Tuesday, June 03, 2003 7:27 PM > Subject: Re: [PHP] Re: move_uploaded_file > 1MB > > > > No it's not possible, you have to see the error to actually believe it ;-) > > It goes like this: > > > > You have a form with a file input field, you select a file on your HD, and > > almost the "exact" moment you press the "submit"-button, you get a "Page > not > > found 404". > > > > It's very weird when you see it actually, because it's about the last kind > > of output you would expect ;-) > > > > "Electroteque" <[EMAIL PROTECTED]> schreef in bericht > > news:[EMAIL PROTECTED] > > > move_uploaded_file is copying the temp file to a permanent directory > right > > ? > > > thats on the server , check if the temp file is there with > > > $_POST['tmp_name'] or its size value > > > > > > -Original Message- > > > From: Yves Daemen [mailto:[EMAIL PROTECTED] > > > Sent: Wednesday, June 04, 2003 7:44 AM > > > To: [EMAIL PROTECTED] > > > Subject: [PHP] Re: move_uploaded_file > 1MB > > > > > > > > > I got the same error some time ago, and I almost went nuts trying to > find > > > the cause of this seemingly "insoluble" problem. But it has actually > > nothing > > > at all to do with your script or the max_file_size in PHP or the one you > > > give with the HTML form. Those are offcourse 2 limits which are > important, > > > but there's another limit that counts here, and it's around 1Mb for > > > standard... > > > > > > I can't recall how it was exactly done, but it's some default > > > max_body_request or something in Linux or Apache (thought it was Linux > > > though, I encountered the problem on a Redhat distribution, but someone > > else > > > fixed it for me).. Try looking in Linux's or Apache's settings... > > > > > > > > > > > > "MauríCio Valente" <[EMAIL PROTECTED]> schreef in bericht > > > news:[EMAIL PROTECTED] > > > > Hello everybody! > > > > > > > > I'm trying to upload a file using the move_uploaded_file function, > > > everyting > > > > works fine when the files have less than 1MB but when I upload one > more > > > than > > > > this, IE returns the error The page cannot be displayed and in it's > > title > > > > shows Cannot find server. I alreary edit php.ini setting > > > UPLOAD_MAX_FILESIZE > > > > to 8388608 (8M), post_max_size = 8388608 and file_uploads = On > > > (memory_limit > > > > is 8388608 too). > > > > > > > > Someone could help me? > > > > > > > > Thanks in advance! > > > > > > > > Maurício Valente > > > > > > > > > > > > > > > > > > > > > > > > -- > > > 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] Gracefully dealing with Cookies OFF
I don't have a study in front of me, but I'm fairly sure that cookies are much more likely to be enabled than javascript. I reccomend opening a normal popup using a link with a target, and opening a sized popup and returning false with javascript in an onclick property. Something like: Open popup Monty wrote: Well, I have to draw the line somewhere. Javascript is used throughout this site for simple things like resizable popups. I'm not willing to dumb it down that much. -- The above message is encrypted with double rot13 encoding. Any unauthorized attempt to decrypt it will be prosecuted to the full extent of the law. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Basic counter & users online..
Make database increment on the flash movie Look on flash documentation for the loadVars object "Phpspooky" <[EMAIL PROTECTED]> escribió en el mensaje news:[EMAIL PROTECTED] > Glory! > > I'm working on a Counter thing. with a basic Hit Meter and a Users > Online Meter. > The problem I face is.. the index page of my site is HTML .. no > frameset.. and I need to display these vars on that page. The solution I > use is that I place a Flash Clip (.swf) and I'm calling the PHP > Variables in it, from a PHP page.. > > But now the issues comes in.. how does the Database increment the > counter? If I place the counter increment script on a PHP page.. it's > ok. But here I have a HTML page with Flash in it.. when this HTML page > loads.. the Counter needs to be incremented by one, and this adding to > the Hits. Same way the Users Online script needs to work.. but how do I > do this? > > Does anybody have any other solution how to make this work? > > PHPSpooky > > __ > "If God had wanted me otherwise, He would have created me otherwise." > - Johann Wolfgang von Goethe > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Approved
I'm glad that no file is attached ... this message is from mail-worm :o) "Esteban Fernandez" <[EMAIL PROTECTED]> pí¹e v diskusním pøíspìvku news:[EMAIL PROTECTED] > No file attached.. > > <[EMAIL PROTECTED]> escribió en el mensaje > news:[EMAIL PROTECTED] > > Please see the attached file. > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] session_start questions.
Questions, Questions, Questions. Where do I start in understanding how this function works. Ive read the document multiple times, and I am having a bit of trouble figuring out how this function works. I know that you can take session data and hold it somewhere for a user and use that data throughout php web pages. I am wandering, where is this data held and how to do you reference it ? Is their a more detailed explanantion of session's ? If their is not, once I get this, I will write one for people like me. You know, "Sessions for Dummies" ;o) Never the less, how do you set a session name for a specific user and hold that data for processing? Is this magic from somewhere or do you specifically name a session for every user ? What about security implications ? I will be running all my forms through secured protocol so hopefully their wont be any hijacking going on... Sorry for being a pain.
Re: [PHP] Automatic Headers and Footers
On Thu, 05 Jun 2003 16:41:01 -0400, Tom Ray [Lists] wrote: >First, I would drop a .htaccess file that allows the HTML files to run >through the PHP parser. Like this AddType application/x-httpd-php .php .html > >-h1--/h1- Yeah, that would work but my goal was to not have to modify the html files at all. Actually, I figured it out (or at least have it working). I guess I knew it was possible, but I was hoping for a miracle cure like "add_html_header". :) Anyway, here is what I ended up doing... .htaccess AddType application/x-httpd-php .htm .html php_value auto_prepend_file "header.php" php_value auto_append_file "footer.php" header.php footer.php This is a page header"; $footer = "This is the footer\n"; $content = preg_replace( "/(]*>)/i", "$1$header", $content ); $content = preg_replace( "/(<\/body[^>]*>)/i", "$footer$1", $content ); echo $content; ?> Any other ideas or simpler ways to do it would be appreciated. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] $PHP_SELF
Hi all, I'm trying to get the path and filename of the script I am running. $PHP_SELF doesn't seem to work. I'm running PHP4 on a Windows 2000 system. Thanks in advance. Johnny -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] $PHP_SELF
Try $HTTP_SERVER_VARS['PHP_SELF'] I'm not yours, so why should I be sincere about it, Stephen Craton Senior Executive Web Developer Mophus.com, Inc. - Original Message - From: "Johnny Martinez" <[EMAIL PROTECTED]> To: "php list" <[EMAIL PROTECTED]> Sent: Thursday, June 05, 2003 4:36 PM Subject: [PHP] $PHP_SELF Hi all, I'm trying to get the path and filename of the script I am running. $PHP_SELF doesn't seem to work. I'm running PHP4 on a Windows 2000 system. Thanks in advance. Johnny -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: [otro] Re: [PHP] $PHP_SELF
you should also try with dirname(__FILE__) for getting the real path j0rd1 On Thursday 05 June 2003 16:51, Stephen wrote: > Try $HTTP_SERVER_VARS['PHP_SELF'] > > I'm not yours, so why should I be sincere about it, > Stephen Craton > Senior Executive Web Developer > Mophus.com, Inc. > > > - Original Message - > From: "Johnny Martinez" <[EMAIL PROTECTED]> > To: "php list" <[EMAIL PROTECTED]> > Sent: Thursday, June 05, 2003 4:36 PM > Subject: [PHP] $PHP_SELF > > > Hi all, > I'm trying to get the path and filename of the script I am running. > $PHP_SELF doesn't seem to work. I'm running PHP4 on a Windows 2000 system. > Thanks in advance. > > Johnny > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP Webmail Solutions?
I'm taking a survey of Webmail Solutions at: http://l-i-e.com/compare/ It's a crude grid of "Solution" and "Feature" with user-voted ratings. If you love a particular solution and care to vote, have at it. If you think I've missed some crucial feature, add it. If you think I've missed some wonderful solution, add it. There's nothing to stop you other than you honor if you want to vote a zillion times for anything. I did get rid of some idiot's JavaScript kiddie hack. Sigh. Do something nice and free for people, and what do you get? I have a vested interest in finding the features I've pre-populated, but it's an Open Resource for all to use to add features and solutions to the grid and let the buyer decide which features are important to them. Thus, there is no "final score" nor "average score" across feature-comparisons -- which would be meaningless unless you thought all features everybody liked were equally important. Nor do I "stop" taking the survey at any particular point in time -- As with the other surveys (see bottom of page), you can add/vote at any time. Perhaps some day I'll provide visitor-flexibility to rank features and compute a weighted score. Not today. Maybe I'll even make it look pretty. Not this year. Stricly form follows function for now, baby. Please feel free to forward this to fans/developers of various webmail solutions. The more the merrier. -- Like Music? http://l-i-e.com/artists.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Trouble with fopen() || Win2k Machine
Hey all. Quick question here that's driving me up the wall: Using fopen(), I'm easily able to open files for reading; however, when I attempt to open files for writing using fopen($file_path, "W+"), an error occurs. I'm able to use fopen($file_path, "a+"), but I need to be able to overwrite files; not write to the end of the file. Again, I'm testing on windows here.. Any suggestions greatly appreciated, --Noah -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Heredoc question
Can one use within the heredoc syntax or is there another way?? I'm trying to dynamically generate email from generic text but with obvious additions, like this: $message = <Lot get_id(); ?> has been approved. Here is the link to the lot: my_message; Robin E. Kopetzky Black Mesa Computers/Internet Services www.blackmesa-isp.net
RE: [PHP] Heredoc question
> Can one use within the heredoc syntax or is there > another way?? I'm trying to dynamically generate email from > generic text but with obvious additions, like this: http://us4.php.net/types.string says that heredoc acts just like double quoted, which would mean it expands variables, so I would try just throwing them in there like this... $message = <get_id()} has been approved. Here is the link to the lot: my_message; There's an example of almost exactly like this on that page. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Automatic Headers and Footers
Yes it can be done, using the auto-prepend feature call a script that turns output buffering on. Then in the auto-appended script read the buffer a manipulate ith with the automatic header and footer. Thus you modify the content only and achieve what you want without modifying the actual HTML file. Cheers, Rob. -- .-. | Worlds of Carnage - http://www.wocmud.org | :-: | Come visit a world of myth and legend where | | fantastical creatures come to life and the | | stuff of nightmares grasp for your soul.| `-' Wendell Brown wrote: > > Ok guys, I think I have a challenge for you (actually, I don't think > this can be done, but I've been proven wrong every time I've made that > assumption with php in the past, so I'll ask anyway). Here's the > question: > > Is there a way to have php insert headers and/or footers into all of > the html files in a given directory on the fly (not actually modifying > the files)? And by this I mean take an existing valid HTML file and > add headers and footers and end up with a valid HTML file. > > Now, before some of you get trigger happy and tell me to read the > manual and point me to things like .htaccess, auto_prepend_file, google > and the like, think about what I'm really asking It needs to > insert the header after the -body- tag and put the footer in before the > -/body- tag. It needs to do this without modifications to the HTML > file. > > And yes, I understand that by default HTML files aren't going to be > effected by the auto_prepend_file (since they aren't php files) - so it > will require adding HTML to the list of php parsed file types. > > For instance, the goal would be to take the following code: > > -HTML- > -Head- > -Title-This is a test-Title- > -body- > > Well, did it work? > > -/body- > -/html- > > and convert it to this: > > -HTML- > -Head- > -Title-This is a test-Title- > -body- > -h1-This is a page header-/h1- > > Well, did it work? > > -h3-This is the footer-/h3- > -/body- > -/html- > > Can it be done? I don't think so, but I leave it up to your wiles to > suggest a solution > > Thanks!!! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Heredoc question
That's fine for that but I have several places that use if's and else's... Sparky - Original Message - From: "Jennifer Goodie" <[EMAIL PROTECTED]> To: "Sparky Kopetzky" <[EMAIL PROTECTED]>; "PHP General" <[EMAIL PROTECTED]> Sent: Thursday, June 05, 2003 16:47 Subject: RE: [PHP] Heredoc question > > Can one use within the heredoc syntax or is there > > another way?? I'm trying to dynamically generate email from > > generic text but with obvious additions, like this: > > http://us4.php.net/types.string says that heredoc acts just like double > quoted, which would mean it expands variables, so I would try just throwing > them in there like this... > > > $message = << Name: {$lot->get_name()} > > Lot {$lot->get_id()} has been approved. Here is the > link to the lot: > my_message; > > > There's an example of almost exactly like this on that page. > > > > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Heredoc question
> That's fine for that but I have several places that use if's and else's... > > Sparky > > http://us4.php.net/types.string says that heredoc acts just like double > > quoted, which would mean it expands variables, so I would try just Than I would suggest reading the manual page (the link I gave) to see if you can do that. Would you put an if or an else inside a double quoted string and expect it to work? I wouldn't. Maybe I'm wrong though. Read the manual. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: SQL Select on a DATE field
Sven wrote: > just some thoughts to your script: Dear Sven, Thank you for your comments. Sounds like I really have to study preg_match and regexp!!! -- Lorenzo. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Do not display page errors...
Not sure if there is an html tag or php that will tell a page not to display any errors on the page, but does anyone know how to do that? I want to hide any error that might be displayed, JavaScript or otherwise. Thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Do not display page errors...
> Not sure if there is an html tag or php that will tell a page not to > display > any errors on the page, but does anyone know how to do that? I want to > hide > any error that might be displayed, JavaScript or otherwise. error_reporting(0); This will have no effect on JavaScript errors, though, because PHP is server side of course... ---John W. Holmes... Amazon Wishlist: http://www.amazon.com/o/registry/3BEXC84AB3A5E PHP Architect - A monthly magazine for PHP Professionals. Get your copy today. http://www.phparch.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: session_start questions.
Sessions seem like voodoo at first, but, once you understand what's really going on, it's actually not that complicated. Here are some links to check out: http://www.zend.com/zend/spotlight/sessionauth7may.php http://www.free2code.net/tutorials/programming/php/4/sessions.php http://www.devshed.com/Server_Side/PHP/Sessions http://www.phpbuilder.com/columns/index.php3?cat=6&subcat=36 Sessions are tracked by your server in little text files with names like sess-ac765JB84Ept932KCc9w0L9374. Each user to your site has a custom session set up for them when you issue a session_start() in PHP. The name of this session file is either stored in a Cookie (if the user has cookies enabled) or is passed from page to page on the URL (which makes the URLS long and ugly). Using PHP's built in session functions, you can store data in those server session files just by setting variables within the $_SESSION[] array, like this: session_start(); $_SESSION['username'] = 'Bob'; $_SESSION['accesslevel'] = 2; Because the session file follows the user around from page to page, you can access the above data within your PHP scripts at any time... session_start(); echo "Hi there ".$_SESSION['username'].", welcome back!"; That's a very brief overview. The above links provide better explanations. Monty > From: [EMAIL PROTECTED] (Daniel J. Rychlik) > Newsgroups: php.general > Date: Thu, 5 Jun 2003 16:19:04 -0500 > To: <[EMAIL PROTECTED]> > Subject: session_start questions. > > Questions, Questions, Questions. > > Where do I start in understanding how this function works. Ive read the > document multiple times, and I am having a bit of trouble figuring out how > this function works. I know that you can take session data and hold it > somewhere for a user and use that data throughout php web pages. I am > wandering, where is this data held and how to do you reference it ? Is their > a more detailed explanantion of session's ? If their is not, once I get this, > I will write one for people like me. You know, "Sessions for Dummies" > ;o) > > Never the less, how do you set a session name for a specific user and hold > that data for processing? Is this magic from somewhere or do you specifically > name a session for every user ? What about security implications ? I will be > running all my forms through secured protocol so hopefully their wont be any > hijacking going on... > > Sorry for being a pain. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: Re: [PHP] Get the date&time from server
CPT John W. Holmes,您好! Thank you very much,you're right!I've got it just now:-)Perhaps I tested it on localhost yesterday.This function is very good. === 2003-06-05 07:07:00 您在来信中写道:=== >> Can anyone teach me how to get the date >> and time from the web-server,it's not >> changed with the time of local machine. >> I found the date() cannot do this. > >That's exactly what date() does... the date and time from the server. Maybe >you're using it wrong. > >---John Holmes... > > >-- >PHP General Mailing List (http://www.php.net/) >To unsubscribe, visit: http://www.php.net/unsub.php = = = = = = = = = = = = = = = = = = = = 致 礼! poetbox [EMAIL PROTECTED] 2003-06-19 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] imagearc() and imageline()
Hello, My question concerns the php function 'imageline' and 'imagearc'. I am = using them to create tables with rounded borders. I thouroughly = examined the specs for these methods and have come to the conclusion = that it is not possible to draw lines or arcs with a pixel width greater = than 1. Could you please tell me if there are other functions that = would allow me to draw arcs and lines and greater width. Thanks. Dan
RE: [PHP] Allowing punctuation marks in regular expressions
> I tried adding a period to the end but a string will a period still > returns > false > > function is_alphanumeric($string) > { > return (preg_match("/^[A-Za-z0-9.]+$/i", $string)); > } No it doesn't. It's not allowing spaces, though... Is that the problem? ---John W. Holmes... Amazon Wishlist: http://www.amazon.com/o/registry/3BEXC84AB3A5E PHP Architect - A monthly magazine for PHP Professionals. Get your copy today. http://www.phparch.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Gracefully dealing with Cookies OFF
> > both the cookie and URL based session passed over without SSL is > insecure. > > i'd love to know who told you otherwise. > > I can't remember the exact sites now, but, the issue was about how much > easier it is to spoof Sessions when IDs are passed via the URL as opposed > to > being stored in a cookie. It's easier because you can just type it in rather than "crafting" a cookie, but it's all pretty much the same. They are both equal, security wise. Well, actually, the other problem with session IDs in the URL is that user's could mistakenly post a URL somewhere with their session ID. If someone clicked on this link while the session was active, it could be hijacked. > But going back to the first point, if I'm passing Session IDs via the URL, > shouldn't I be doing something more to make the site a little more secure? > I > don't store sensitive data in sessions vars, but, if it allows a non- > paying > member to hijack a paying member's session, then this is going to be a > problem. But I'm not sure what more I can do to make the session a little > more secure and less likely that someone will hijack it. SSL is a little > overkill for this, as this isn't a bank or financial institution, it's > just > a little community website. You kind of contradict your self. It'll be a problem, but it's just a little "community website". So is it a problem or not? Honestly, if I somehow hijacked Joe Blow's session, what could I do? If it is a problem, then use SSL, plain and simple. That'll protect you from session IDs being sniffed from a network. ---John W. Holmes... Amazon Wishlist: http://www.amazon.com/o/registry/3BEXC84AB3A5E PHP Architect - A monthly magazine for PHP Professionals. Get your copy today. http://www.phparch.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Do not display page errors...
You need to set it from a .htaccess file or php.ini to hide parse errors. John W. Holmes wrote: error_reporting(0); -- The above message is encrypted with double rot13 encoding. Any unauthorized attempt to decrypt it will be prosecuted to the full extent of the law. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Is Session a Cookie?
Hello, Im quite confused on how things work here. Is session a cookie also? Cookie stores data On your harddrive, does session stores also? -- Thanks, Louie -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Is Session a Cookie?
Hey, I got it. 2 types of cookies 1) session cookies - expire at the end of the session 2) persistent cookies - do not expire at the end of the session Thanks, Louie -Original Message- From: Miranda, Joel Louie M Sent: Friday, June 06, 2003 8:39 AM To: [EMAIL PROTECTED] Subject: [PHP] Is Session a Cookie? Hello, Im quite confused on how things work here. Is session a cookie also? Cookie stores data On your harddrive, does session stores also? -- Thanks, Louie -- 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] imagearc() and imageline()
Hi, Friday, June 6, 2003, 9:21:23 AM, you wrote: DH> Hello, DH> My question concerns the php function 'imageline' and 'imagearc'. I am = DH> using them to create tables with rounded borders. I thouroughly = DH> examined the specs for these methods and have come to the conclusion = DH> that it is not possible to draw lines or arcs with a pixel width greater = DH> than 1. Could you please tell me if there are other functions that = DH> would allow me to draw arcs and lines and greater width. DH> Thanks. DH> Dan maybe this does what you need. imagesetthickness() -- regards, Tom -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Php handling apache's error directive?
Can I use php to be apache's error directive? I mean, im trying to change apache's error directive But at the same time I can only change the page and couldn't see what error it was, I can send it only to a page with an error saying 404, etc but I can't add what file did he type in the url. Any suggestions? Or docs will be good. Thanks, Louie -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Php handling apache's error directive?
$_SERVER['REQUEST_URI'] Miranda, Joel Louie M wrote: Can I use php to be apache's error directive? I mean, im trying to change apache's error directive But at the same time I can only change the page and couldn't see what error it was, I can send it only to a page with an error saying 404, etc but I can't add what file did he type in the url. Any suggestions? Or docs will be good. Thanks, Louie -- The above message is encrypted with double rot13 encoding. Any unauthorized attempt to decrypt it will be prosecuted to the full extent of the law. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: using a for loop but it is not working how come
> I am having a problem with this script It pulls a list of numbers from > one field in the database (the numbers are in this format > (275,277,278,276) It needs to pull each number and run it through the > function dofunction and then move on to the next one in tell there are > no more to process. What am I doing wrong or is there a better way to > do this. > > sql="Select Numbers from dom where name = '$name'"; > $results=safe_query($sql); > $DBRow = mysql_fetch_array($results); > $numbers = $DBRow["Numbers"]; > $numbers = array($numbers); > for($i = 0; $i < count($numbers); $i++) { > $number = $numbers[$i]; > dofunction($number); > } You have a few problems in your code. This hasn't been tested, but, is a start... sql="Select Numbers from dom where name = '$name'"; $results=safe_query($sql); $DBRow = mysql_fetch_array($results); $number_array = explode(",", $DBRow["Numbers"]); // above splits number list into array using comma as delimiter foreach($number_array as $digit) { dofunction($digit); } Above foreach() construct loops through the array and assigns the value of each element to $digit, and continues doing this until it reaches the end of the array. http://www.php.net/manual/en/control-structures.foreach.php http://www.php.net/manual/en/function.explode.php Monty -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] How do I display new lines in a textearea?
Hi Thanks, I DID use \n, BUT, I made a stupid mistake, I did: And the literal ' did not "parse" the \n, replacing with " works fine... On Thu, 2003-06-05 at 16:32, CPT John W. Holmes wrote: > > I want to have a textarea that contains details read from a mysql table, > > but I want to echo each row so that it is on a new line. What is the > > "new-line" character for a textarea? ( in effect the reverse of nl2br() > > A newline is \n > > $text = "word\nword\nword\n"; > > echo "$word"; > > will have each "word" on a different line. > > ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] PHP - File Edit
Maybe this can help : A simple configuration file editor to ease you life in setting up php applications. Reads variables from a given file automatically and displays current value. New value will be written to file after submit. http://examples.weberdev.com/get_example.php3?count=1741 or EditPHP - PHP HTML online file editor with encrypted password authentication http://examples.weberdev.com/get_example.php3?count=1496 Sincerely berber Visit http://www.weberdev.com/ Today!!! To see where PHP might take you tomorrow. -Original Message- From: Matt Zur [mailto:[EMAIL PROTECTED] Sent: Friday, June 06, 2003 8:17 AM To: [EMAIL PROTECTED] Subject: [PHP] PHP - File Edit Does anyone know of a simple program that will let me specify a file within a certain directory to load into a textarea field, let me make changes, then export/replace that file with the changed contents? I tried writing one myself in PHP, but I ran into a problem with quotes. If I had tags in in the text area e.g. it would mess up the quotes by adding back slashes etc. TIA, -Matt -- Matt Zur [EMAIL PROTECTED] http://www.zurnet.com Need a Web Site??? - Visit... www.zurnet.com 1997 - 2003 - 6th Anniversary!!! -- 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] how is this done: shirtcity.com
how do they create the different fonts as a png-file ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Administration packages
I think you meant http://phpclasses.org and not http://phpclasses.com Sincerely berber Visit http://www.weberdev.com/ Today!!! To see where PHP might take you tomorrow. -Original Message- From: Justin French [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 04, 2003 4:36 AM To: christian calloway; [EMAIL PROTECTED] Subject: Re: [PHP] Administration packages I've built my own framework over time, and would highly recommend it, because you get exactly what you want. but here's a few things that might help: - some sort of form building/validating class (10's or 100's even at phpclasses.com) - read up on some of the large app frameworks... fusebox comes to mind here, but i'm sure there are others. also look at some large opensource products built in php (postnuke?, phpbb?, etc). i'm not saying you will borrow or use what they have at all, but their logic and ideas may rub off on you Without knowing EXACTLY what you want to automate, I can't really say much more. Justin on 04/06/03 1:13 PM, christian calloway ([EMAIL PROTECTED]) wrote: > Hey everyone, > > I find myself building alot of admin control areas, or in otherwords, > a group of forms that lets an end user control data and appearances of > his/her site. What I am looking for is a package of classes/functions > that will help me automate and modularize this process a little more. > I am not looking for a "complete system", just a framework from which > I can build. Thanks alot, > > Christian > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP + MySQL Free Shopping Cart
Hello, Im trying to find a free php+mysql shopping cart, I have tried oscommerce but coudlnt edit some of the scripts. Does anyone know an php script that is very customizable and has a lot features too? And ofcourse its free. Thanks, Louie -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP CLI question
Or as Jason noted at compile time. Monte Ohrt wrote: ok, so there are plenty of ways to work around it ;-) I guess my original question should be answered as such? "No, you cannot specify a different configuration file name other than php.ini, you must either hack the C code or supply a workaround at runtime." Monte On Thu, 2003-06-05 at 15:07, Mark wrote: Wrap it in a shell script or batch file. Something like: REM ---Start cli.bat--- ./cli/php.exe -c <> %1 %2 %3 %4 %5 %6 %7 %8 %9 @exit REM ---End cli.bat--- --- Monte Ohrt <[EMAIL PROTECTED]> wrote: Hi Adam, I know it can be altered with a command-line switch, but it is the default that I want to change. I don't want to have to remember to set the -c flag everytime, or go back and change all my existing scripts. Monte On Thu, 2003-06-05 at 09:53, Adam Voigt wrote: From a ./php -h: -c | Look for php.ini file in this directory The "|" means "OR", so logic would dictate you can point directly to the file with the -c option. On Thu, 2003-06-05 at 10:35, Monte Ohrt wrote: Hi Cal, I may be missing something, but I don't see how this page answers either of my questions. ini_set() is for setting configuration options. Monte On Thu, 2003-06-05 at 09:23, Cal Evans wrote: http://www.php.net/manual/en/function.ini-set.php * Cal Evans * http://www.christianperformer.com * Stay plugged into your audience * The measure of a programmer is not the number of lines of code he writes but the number of lines he does not have to write. * - Original Message - From: "Monte Ohrt" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Thursday, June 05, 2003 9:22 AM Subject: [PHP] PHP CLI question Hi, A couple of questions: 1) Is there a way to make the CLI version of PHP ignore certain settings in the php.ini file? For instance, I don't want the ioncube accelerator invoked when using PHP from the command line. My current work around is to use two separate init files, php.ini and php-cli.ini ... and this brings me to my second question: 2) Is there a way to specify a different name for the php.ini file, apart from hacking php_ini.c ? It seems I can only change the _path_ to the file, but not the filename itself. TIA Monte -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Monte Ohrt <[EMAIL PROTECTED]> -- 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!? Yahoo! Calendar - Free online calendar with sync to Outlook(TM). http://calendar.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: php4isapi.dll and header("Location: ...")
> Have you tried: > ob_end_clean(); > header("Location: http://...";); > to throw away the contents of the output buffer before sending the > Location header, then its nice and clean. Yes I tried ... Other idea ??? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Creating alphabetical index links
How i do create alphabetical index links with data in a table? for example i have table like this: category - apple bread cornflakes doughnut egg with the above records i want to create alphabetical links like click on the letter to check its listing [A] - [B] - [C] - [D] - [E] so if someone clicks on [B] the link should take them to bread section. Many thanks awlad ___ Sheridan Phoenix Company The Business Centre Kimpton Road Luton Bedfordshire LU2 0LB Email: [EMAIL PROTECTED] Phone: 01582 522 330 Fax:01582 522 328 ___ This electronic transmission is strictly confidential and intended solely for the addressee. If you are not the intended addressee, you must not disclose, copy or take any action in reliance of this transmission. If you have received this transmission in error it would be helpful if you could notify The Sheridan Phoenix Company Ltd as soon as possible. Any views expressed in this message are those of the individual sender, except where the sender specifically states them to be the views of The Sheridan Phoenix Company Ltd.
[PHP] [FYI] phpbooks.com
Hi guys, we set up a new resource for organizing all books on PHP in a quick-to-scan, Google-like center. Hope you enjoy it. http://www.phpbooks.com Mark -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] [FYI] phpbooks.com
weldone, Very neat desgin - Original Message - From: "Mark Owen" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, June 06, 2003 10:07 AM Subject: [PHP] [FYI] phpbooks.com > Hi guys, > > we set up a new resource for organizing all books on PHP in a quick-to-scan, > Google-like center. Hope you enjoy it. > > http://www.phpbooks.com > > Mark > > > -- > 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] Using the .htaccess file to extend the php.ini include path entry
> -Original Message- > From: Saint Urho [mailto:[EMAIL PROTECTED] > Sent: 05 June 2003 20:14 > > I want to add some directories to the "include path" entry in the > php.ini file. I have to do this via the .htaccess file > because I do not > have access to the php.ini file on the server. > > Will the additional directories in the .htaccess file replace the > directories in the php.ini file or will the ones in the > .htaccess file > be added to the directories in the php.ini file? Replace. 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