Re: [PHP] Include fails when ./ is in front of file name
I appreciate the help guys. I don't understand what's going on. Here's what I've tried since posting: Copied over the PHP binaries and php.ini from my old server to my new one. No luck. Copied over the phpMyAdmin from my old server to my new one. No luck. I've double-checked all permissions. Seriously, what else could there be?! I repeat: on old server, include('./file.inc.php') works FINE on new server, include('./file.inc.php') BREAKS I'm about to do a replace of ./ with but I know that's giving up! Daniel Brown [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] On Mon, Apr 7, 2008 at 1:05 PM, Lester Caine [EMAIL PROTECTED] wrote: People seem to be missing the point here. These are PUBLIC applications that are failing to work for Noah. He should not need to re-write PHPMyAdmin in order to get it to work? Next people will be saying that we should re-write PHP if it does not work for us. Oh, did I say that? Must not have been paying attention as I typed in words to that effect. Sorry. I'm giving steps to debug and recreate the issue, not to rewrite anyone else's code. You may have noticed where I mentioned cross-platform portability. -- /Daniel P. Brown Ask me about: Dedicated servers starting @ $59.99/mo., VPS starting @ $19.99/mo., and shared hosting starting @ $2.50/mo. Unmanaged, managed, and fully-managed! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Include fails when ./ is in front of file name
Here's the error I get: *Warning*: include(.\file.inc.php) [function.includehttp://www.emsplannertest.com/function.include]: failed to open stream: No such file or directory in * C:\Inetpub\httpdocs\test.php* on line *3* *Warning*: include() [function.includehttp://www.emsplannertest.com/function.include]: Failed opening '.\file.inc.php' for inclusion (include_path='.;.\includes;.\pear') in *C:\Inetpub\httpdocs\test.php* on line *3* This works fine on my old server which is running PHP 4.3.9. I honestly feel like I'm overlooking some stupid tiny thing. Are my permissions correct? Is it possible to debug this and look at the full path of file.inc.php that PHP is trying to load? Thanks! On Mon, Apr 7, 2008 at 7:36 AM, Daniel Brown [EMAIL PROTECTED] wrote: On Sun, Apr 6, 2008 at 5:17 PM, Noah Spitzer-Williams [EMAIL PROTECTED] wrote: This works: include(file.inc.php); This doesn't: include(./file.inc.php); That's pretty vague, Noah. Is it unable to locate the file? What's the error message you're receiving? Also, what happens if you create two simple files in the same directory like so: ?php // file1.php echo Okay.\n; ? ?php // file2.php include(dirname(__FILE__).'/file1.php'); ? -- /Daniel P. Brown Ask me about: Dedicated servers starting @ $59.99/mo., VPS starting @ $19.99/mo., and shared hosting starting @ $2.50/mo. Unmanaged, managed, and fully-managed!
[PHP] Include fails when ./ is in front of file name
This works: include(file.inc.php); This doesn't: include(./file.inc.php); I can't figure it out! PHPMyAdmin uses ./ so it's obviously not working. Here's my environment: Win2003 Server w/ IIS 6 PHP 5.2.5 setup as ISAPI All PHP and httpdoc directories have read, write, and execute permissions given to IIS_WPG, IIS_USER, and NETWORK SERVICE PHP.ini's include path is: include_path = .;.\includes;.\pear (I've also tried include_path = .;./includes;./pear) phpinfo() works fine. Anyone have any ideas? Thanks! Noah -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Include fails when ./ is in front of file name
Casey -- nope. the include statement is being issues from the parent page. both files are in the same directory. Nitsan -- the problem is apps like phpMyAdmin are littered with include(./file.inc.php); i'd have to replace all those to use full paths. it's not a good idea from a servicability statement anyways. thanks! On Sun, Apr 6, 2008 at 4:21 PM, Casey [EMAIL PROTECTED] wrote: On Sun, Apr 6, 2008 at 2:17 PM, Noah Spitzer-Williams [EMAIL PROTECTED] wrote: This works: include(file.inc.php); This doesn't: include(./file.inc.php); I can't figure it out! PHPMyAdmin uses ./ so it's obviously not working. Here's my environment: Win2003 Server w/ IIS 6 PHP 5.2.5 setup as ISAPI All PHP and httpdoc directories have read, write, and execute permissions given to IIS_WPG, IIS_USER, and NETWORK SERVICE PHP.ini's include path is: include_path = .;.\includes;.\pear (I've also tried include_path = .;./includes;./pear) phpinfo() works fine. Anyone have any ideas? Thanks! Noah Is that include() statement being issued within an included PHP page? a.php ?php include('directory/b.php'); ? directory/b.php ?php include('./c.php'); // Does this refer to c.php or directory/c.php ? -- -Casey
[PHP] How to prevent failure email from being sent?
Hey guys, My service sends out emails every few days to members who wish to have stats sent to them. The problem is once an email becomes inactive, I the webmaster gets a failure email sent to me. This is starting to add up and I can get upwards of 20 of these a day. It just seems likea waste of space and bandwidth... is there anyway I can prevent this? If i delete the webmaster email key in php.ini will my emails not have a reply address? Thanks! - Noah [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Warning: Could not execute mail delivery program
So do you think it has to be a server issue and not a code issue? My site's traffic load has increased significantly in the last week or so and that's kind of when it started happening. Could there be a resource problem? Is there any way to find out more on why it's not running? - Noah Noah Spitzer-Williams [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... PHP Warning: Could not execute mail delivery program in /htdocs/... Any suggestions on how to fix this? - Noah -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Warning: Could not execute mail delivery program
Here are my safemode parameters: ; Safe Mode safe_mode = Off safe_mode_exec_dir = safe_mode_allowed_env_vars = PHP_ ; Setting certain environment variables ; may be a potential security breach. ; This directive contains a comma-delimited ; list of prefixes. In Safe Mode, the ; user may only alter environment ; variables whose names begin with the ; prefixes supplied here. ; By default, users will only be able ; to set environment variables that begin ; with PHP_ (e.g. PHP_FOO=BAR). ; Note: If this directive is empty, PHP ; will let the user modify ANY environment ; variable! safe_mode_protected_env_vars = LD_LIBRARY_PATH - Noah ¡Û [EMAIL PROTECTED] wrote in message 42EOfJ$[EMAIL PROTECTED]">news:42EOfJ$[EMAIL PROTECTED]... == [EMAIL PROTECTED] (Noah Spitzer-Williams) ªº¤å³¹¤¤´£¨ì: PHP Warning: Could not execute mail delivery program in /htdocs/... Any suggestions on how to fix this? - Noah check your php.ini file. if should be safe_mode = Off -- [m[1;32m* Origin: LastLoveSongBBS (lls.twbbs.org) From: localhost.localdomai [m -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Warning: Could not execute mail delivery program
PHP Warning: Could not execute mail delivery program in /htdocs/... Any suggestions on how to fix this? - Noah -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Restart process from code?
Is there a way to restart a process (actually the process to handle ASP pages) from code? - Noah -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Restart process from code?
But I would like to restart the process as in it's currently running and I want to end it and then start it again... - Noah - Original Message - From: John Holmes [EMAIL PROTECTED] To: 'Noah Spitzer-Williams' [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Wednesday, July 17, 2002 2:18 PM Subject: RE: [PHP] Restart process from code? You can use exec(), as long as the user PHP is running as has permission to execute the program... ---John Holmes... -Original Message- From: Noah Spitzer-Williams [mailto:[EMAIL PROTECTED]] Sent: Wednesday, July 17, 2002 1:20 PM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: [PHP] Restart process from code? Is there a way to restart a process (actually the process to handle ASP pages) from code? - Noah -- 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] Restart process from code?
How do I end the process using exec? Is there an equivalent to NET STOP? - Noah - Original Message - From: John Holmes [EMAIL PROTECTED] To: 'Noah Spitzer-Williams' [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Wednesday, July 17, 2002 2:28 PM Subject: RE: [PHP] Restart process from code? So? Use exec(). Use it twice if you have to. If you can run a command on the command line, then you can run it through exec. Only difference is if the user PHP is running as can run the command. ---John Holmes... -Original Message- From: Noah Spitzer-Williams [mailto:[EMAIL PROTECTED]] Sent: Wednesday, July 17, 2002 2:10 PM To: [EMAIL PROTECTED]; [EMAIL PROTECTED]; php- [EMAIL PROTECTED] Subject: Re: [PHP] Restart process from code? But I would like to restart the process as in it's currently running and I want to end it and then start it again... - Noah - Original Message - From: John Holmes [EMAIL PROTECTED] To: 'Noah Spitzer-Williams' [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Wednesday, July 17, 2002 2:18 PM Subject: RE: [PHP] Restart process from code? You can use exec(), as long as the user PHP is running as has permission to execute the program... ---John Holmes... -Original Message- From: Noah Spitzer-Williams [mailto:[EMAIL PROTECTED]] Sent: Wednesday, July 17, 2002 1:20 PM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: [PHP] Restart process from code? Is there a way to restart a process (actually the process to handle ASP pages) from code? - Noah -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] how to hide dbconnect file if its in published directory?
Hey guys, I come for advice once again. Say i have a file dbconnect.inc which connects to my database. Now if this file is located in a directory accessible for to the web is there anyway that if someone types in that file i can detect it being accessed, instead of included, and redirect them elsewhere? Thanks guys! - Noah -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] how to flip an image using GD?
how would i flip an image horizontally using the GD library in PHP? Noah -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Php Files on Browser
are you using http://localhost? - Noah Ted Shaw [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... G'day - Sorry for this stupid question but I'm a newby trying to install php on my win98 computer and find that neither netscape nor IE 5.5 won't open php files that are located on my c: drive but will access php files on the net. There must be a simple explanation. Any help greatly appreciated... Ted Shaw -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] gd library on win2k?
how can i install the gd library for php on win2k using iis5? - Noah -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Edit A HREF links on the fly - see what i mean - important!
hey guys, i'm working on an exit page popup but i dont want the popup to load whenever i change pages in the site, only when the user exits the site totally. now i dont think there is some sort of javascript for thsi but i have figured out a way around. for every link do this: a href=blah onclick=nopop=1blah/a the problem is how can i put this onclick statement into every link on the fly without editing all my php? is there a way? is there a javascript way? thanks! - Noah -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Are constants more efficient than variables that never change?
I may have a variable that changes page to page, but once it loads up, it never needs to be changed on that page. So my question is should i just do: define(myvar, 3); OR: $myvar = 3; does defining it make that much of a difference (if i have several of these variables that could be defined instead). - Noah -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Are constants more efficient than variables that never change?
Ok, I'm only wondering this because I'm tryin to decrease the load time significantly because each page has to go through a lot of stuff before they're loaded and with the volume of hits it gets, i need anything to help out - Noah CC Zona [EMAIL PROTECTED] wrote in message 9dsm85$kgl$[EMAIL PROTECTED]">news:9dsm85$kgl$[EMAIL PROTECTED]... In article 9dsknt$fb1$[EMAIL PROTECTED], [EMAIL PROTECTED] (Noah Spitzer-Williams) wrote: So my question is should i just do: define(myvar, 3); OR: $myvar = 3; does defining it make that much of a difference (if i have several of these variables that could be defined instead). I'm not sure whether there's a significant difference in memory usage, but IMO the difference in scoping rules is a significant consideration. Constants carry over into functions local scope, while variables must be explicitely passed or declared as global in order to become available in a function's local scope. Which one you consider to be the convenience and which you consider the nuisance is in the eye of the beholder g, but IMO either way it's a very handy/exploitable distinction which you can use to speed up development/debugging time. -- CC -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] What's more effecient: var on every page or simple function?
Which of the two is more efficient: # start of file.php $myvar = 3; # end file.php #start of file.php function myvar() { return 3; } #end file.php the difference between the two is the first example would set the variable on every page regardless of whether it was used whereas with the function obviously it would be used only if it were called. what's better? (myvar is a constant #) - Noah -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Starting PHP script with crontab
is there a service on the web that can do this for you? i once found a site that would accept a url and an interval and would retrieve that url (therefore running any code you had in there) on your interval - Noah Anuradha Ratnaweera [EMAIL PROTECTED] wrote in message Pine.LNX.4.21.0105021110320.342-10@presario">news:Pine.LNX.4.21.0105021110320.342-10@presario... If you are not careful, anyone will be able to run the script! Anuradha On Thu, 19 Apr 2001, Bertjan Schrader wrote: I need tot start a PHP script at night with the crontab. I tried to do it with lynx (lynx http://www.domain.nl/test.php) as a commandline within the crontab. Lynx is starting but the PHP script is not working. Anyone an idea how to do it? OS: Redhat Linux 5.2 Apache PHP as a apache module thanks! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] how to scale down image using ImageMagick?
Is there a way to install the GD library on windows nt systems? i can't get this thing to not scale it if its smaller than a certain width ""Steve Werby"" [EMAIL PROTECTED] wrote in message 00ae01c0c848$8a802bb0$6501a8c0@workstation7">news:00ae01c0c848$8a802bb0$6501a8c0@workstation7... "Noah Spitzer-Williams" [EMAIL PROTECTED] wrote: I have a bunch of pictures all in ranging filesizes and dimensions. I want to resize the ones that over 175 pixels wide to a 175 pixel wide picture however i want the height to scale down (ie. i dont want a really thin picture, i just want it to be what it would be if it were resized). i have this but i cant figure out how to just scale down the width: c:\progra~1\imagem~1\mogrify.exe -geometry 175x30! picture.jpeg the '!' forces those sizes to be used but obvoiusly i dont want the height to be 30. i want it to be whatever it should be so the picture doesnt look flattened. I believe imagemagick has an option where you can specify a single dimension (x or y) and it will set that dimension accordingly and automatically scale the other dimension. This should be covered in the manual pages or --help output of the program. -- -- Steve Werby President, Befriend Internet Services LLC http://www.befriend.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] how to scale down image using ImageMagick?
right my goal was to actually alter the file size for quicker downloads and less bandwidth. the solution was a combination of morgan's and joe's posts. thansk guys! - Noah "Morgan Curley" [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... This is a neat bit of code to fill in image height and width info but it does not affect the actual file size like resizing the image would morgan At 02:43 PM 4/19/2001, FredrikAT wrote: Hi! This is what I do: if (!empty($picture)) { $size = GetImageSize ("pics/$picture"); if ($size[0] = '175') { $width = '175'; $height = $size[1] * ($width / $size[0]); } else { $width = $size[0]; $height = $size[1]; } } echo "img src=\"pics\$picture\" height=\"$height\" width=\"$width\""; Fredrik A. Takle Bergen, Norway ""Joe Sheble (Wizaerd)"" [EMAIL PROTECTED] skrev i melding [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... I use ImageMagik all the time for thumbnail creations... this doesn't resize the image, it creates a new image, a thumbnail... but the principle is the same $cWidth = 175; $picture_src = "fullSize/somepic.jpg"; $thumb_dest = "fthumbNail/somepic.jpg"; $aImageInfo = getimagesize( $picture_src ); if( $aImageInfo[0] $cWidth ) { exec("convert -geometry $cWidth -colors 256 -colorspace yuv $picture_src $thumb_dest" ); } At 08:59 AM 4/19/01 -0400, Noah Spitzer-Williams wrote: Is there a way to install the GD library on windows nt systems? i can't get this thing to not scale it if its smaller than a certain width ""Steve Werby"" [EMAIL PROTECTED] wrote in message 00ae01c0c848$8a802bb0$6501a8c0@workstation7">news:00ae01c0c848$8a802bb0$6501a8c0@workstation7... "Noah Spitzer-Williams" [EMAIL PROTECTED] wrote: I have a bunch of pictures all in ranging filesizes and dimensions. I want to resize the ones that over 175 pixels wide to a 175 pixel wide picture however i want the height to scale down (ie. i dont want a really thin picture, i just want it to be what it would be if it were resized). i have this but i cant figure out how to just scale down the width: c:\progra~1\imagem~1\mogrify.exe -geometry 175x30! picture.jpeg the '!' forces those sizes to be used but obvoiusly i dont want the height to be 30. i want it to be whatever it should be so the picture doesnt look flattened. I believe imagemagick has an option where you can specify a single dimension (x or y) and it will set that dimension accordingly and automatically scale the other dimension. This should be covered in the manual pages or --help output of the program. -- -- Steve Werby President, Befriend Internet Services LLC http://www.befriend.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] how to scale down image using ImageMagick?
I have a bunch of pictures all in ranging filesizes and dimensions. I want to resize the ones that over 175 pixels wide to a 175 pixel wide picture however i want the height to scale down (ie. i dont want a really thin picture, i just want it to be what it would be if it were resized). i have this but i cant figure out how to just scale down the width: c:\progra~1\imagem~1\mogrify.exe -geometry 175x30! picture.jpeg the '!' forces those sizes to be used but obvoiusly i dont want the height to be 30. i want it to be whatever it should be so the picture doesnt look flattened. Thanks! - Noah -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] is it safe to stripslashes() on all form variables?
would there be any problems caused if i used the stripslashes() function on all posted variables from a form to eliminate sql query errors? - Noah -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] is it safe to stripslashes() on all form variables?
Jesus that's pretty scary! So how should i go about doing this? ""Yasuo Ohgaki"" [EMAIL PROTECTED] wrote in message 9bflce$9p5$[EMAIL PROTECTED]">news:9bflce$9p5$[EMAIL PROTECTED]... If you strip slashes, it will make a security hole. For example, SELECT * FROM tablename WHERE name = '$name'; what if $name is \'garbage\';DROP TABLE tablename;SELECT \'something After stripslashes($name) SELECT * FROM table WHERE name = 'garbage';DROP TABLE tablename;SELECT 'something'; Regards, -- Yasuo Ohgaki ""Noah Spitzer-Williams"" [EMAIL PROTECTED] wrote in message 9bf7ec$m1m$[EMAIL PROTECTED]">news:9bf7ec$m1m$[EMAIL PROTECTED]... would there be any problems caused if i used the stripslashes() function on all posted variables from a form to eliminate sql query errors? - Noah -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Hello $variable, whats your name?
theres even $GLOBALS() ""Data Driven Design"" [EMAIL PROTECTED] wrote in message 001301c0b347$d96ca5c0$[EMAIL PROTECTED]">news:001301c0b347$d96ca5c0$[EMAIL PROTECTED]... You can cycle through the $HTTP_POST_VARS or $HTTP_GET_VARS arrays depending on whether you use 'post' or 'get' for the methos in you form while(list($key,$val)=each($HTTP_POST_VARS)) { print "$key:$valbr\n"; } - Original Message - From: JCampbell [EMAIL PROTECTED] To: Main PHP List [EMAIL PROTECTED] Sent: Tuesday, December 12, 2000 4:05 PM Subject: [PHP] Hello $variable, whats your name? I would like to know if there is a way to determine the name of a variable. Example: I have the variable $firstname, with a value of Jon I want to be able to echo name_of_variable : value_of_variable; So the user would see firstname : Jon I want to be able to do this without knowing what variables will be passed to the PHP script in advance. Any help is appreciated in advance. Jon === And shepards we shall be For thee, my lord, for thee For thou hath descended forth from thy hands That our feats may swiftly carry out thy command We will flow a river forth unto thee And teaming with souls shall it ever be... === http://jcampbell.blacklightning.net -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] get content type from fopening url?
is there a way so that if someone submits a web url (hopefully its a picture), i can check to make sure its a valid picture? i think its something like fopen(), but i dont know far i could get thanks! - Noah -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] when using die(), how can i get the line number that errored?
here's my code: $res = mysql_query($badsqlstatement) or die(errtrapper()); inside errtrapper(), is there a way to find out what line this error occurred? thanks!! - Noah -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] cookie paths are really confusing me...please help!
ok here's what i get from php.net: SetCookie()'s behavior is dependant on where it is called within the web document tree. For example, setting a cookie from a php script in a directory makes that cookie available only to other scripts in that directory and its subdirectories. However, setting a cookie of the same name from a script in the directory's parent directory will override all cookies of that name in the parent directory's subdirectories. scenario: im browsing a file in lets call directory 'test'. this file is including a file in the parent directory. this included file is setting a cookie. the problem is when i goto directory 'test2' and use this same included file in the parent directory, it cant find the cookie. how should be setting this cookie?? - Noah -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] get last directory of a full path? (parent directory)
whats the easiest way to go from "/dir1/dir2/dir3/hello.php" to "dir3/" ? dirname will cut off hello.php but i want to cut dir1 and dir2 as well Thanks! - Noah -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] does chdir() change include_path on the fly? HELP
my problem is i have an include file in a parent directory which includes other files. i want these other files to be in the same directory as this parent directory file..(hope your gettin me here...). the prob is the parent directory file looks for its include files in the current directory. example: current path is: www.blah.com/blahdir a file in blahdir called blah1.php includes blah2.php which is located in www.blah.com blah2.php includes blah3.php and blah4.php which are also located in www.blah.com the problem is blah2.php looks for blah3.php and blah4.php in www.blah.com/blahdir will chdir() fix this? or is there another way? Thanks!! - Noah -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Question about phpinfo() and XML
phpinfo reports that XML is 'active' but i thought xml was a client side language? what does it have to do with the server? thanks! - Noah -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]