Re: [PHP-WIN] Sending arguments to a SP in PHP
Is the echo you show after the string being generated or within the funcion ? Try it (if you haven't already) immediately after the generation. Maybe there is something wrong with the other strings envolved, or with the syntax itself (you don't show the entire command). If it is not, don't bother with the function... Another thing : > My call is as follows > $oldquery="select var1,var2,var3,var4. from table order by var1"; > $query="exec limitselect '". $oldquery ."',". $limit .",". $offset; > i try to print the sql command > echo "".$query; > It prints out a trimmed string > exec limitselect 'select origin What you say is echoed does not (apparently) correspond to the generation. Were does the word "origin" come from ? The string $oldquery does not contain it, as far as you show. Luis - Original Message - From: "Svensson, B.A.T. (HKG)" <[EMAIL PROTECTED]> To: "'Harpreet K. Singh '" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Friday, March 05, 2004 8:48 AM Subject: RE: [PHP-WIN] Sending arguments to a SP in PHP > Very is your problem located? > > Is the string not properly built by php? > or is an error genereated when you try to execute the query? > > > -Original Message- > From: Harpreet K. Singh > To: [EMAIL PROTECTED]; [EMAIL PROTECTED] > Sent: 2004-03-04 21:55 > Subject: [PHP-WIN] Sending arguments to a SP in PHP > > I am using PHP and sql server 2000. > > I have a stored procedure which takes 3 arguments. The first argument is > a > string and the rest 2 are integers. > > For some reasons the call to the stored procedure is being trimmed. > > My call is as follows > $oldquery="select var1,var2,var3,var4. from table order by var1"; > > $query="exec limitselect '". $oldquery ."',". $limit .",". $offset; > > i try to print the sql command > echo "".$query; > > It prints out a trimmed string > > exec limitselect 'select origin > > is theri a limit to what one can send to a sp call > > Please help i am totally confused. > > Thanks > > -- > PHP Windows Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- > PHP Windows Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-WIN] Problems with CONSTANTS that does not get defined
Running this code: [...] // META DATA DEFINES define("META_DATA", -1); define("NUM_LINES", 0); [...] define("JOB_CMD", 5); define("FIVE",5); // DEBUG [...] function ...() { $atlist = at_job_list(); $UserJobNr = 0; $UserJobList[META_DATA][NUM_LINES] = 0; $numJobs = $atlist[META_DATA][NUM_LINES]; for ($i=1; $i<= $numJobs; $i++) { // DEBUG START $test_5= $atlist[$i][5]; $test_FIVE = $atlist[$i][FIVE]; $test_JOB_CMD = $atlist[$i][JOB_CMD]; print "USER JOB LIST GET/JOB_CMD: /" . $atlist[$i][JOB_CMD] . "/$test_5/$test_FIVE/$test_JOB_CMD\n"; // DEBUG END if (user_own_this_job($User, $atlist[$i][JOB_CMD]) ) { print "Has job $i\n"; // DEBUG $UserJobNr++; $UserJobList[$UserJobNr] = $atlist[$i]; $UserJobList[$UserJobNr][JOB_UID] = $UserJobNr; } } [...] } gives this out put: Warning: constant(): Couldn't find constant FIVE in [file] on line 238 FIVE: FIVE/ Warning: constant(): Couldn't find constant JOB_CMD in [file] on line 239 JOB_CMD: JOB_CMD/ USER JOB LIST GET/JOB_CMD: //job1 user1// USER JOB LIST GET/JOB_CMD: //job2 user1// USER JOB LIST GET/JOB_CMD: //job1 user2// To say the less, I am a bit confused. Any hints or tips would be appreciated. -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-WIN] Problems with CONSTANTS that does not get defined
Beats me. Ignatius _ - Original Message - From: "Svensson, B.A.T. (HKG)" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, March 05, 2004 13:17 Subject: [PHP-WIN] Problems with CONSTANTS that does not get defined > Running this code: > > > [...] > // META DATA DEFINES > define("META_DATA", -1); > define("NUM_LINES", 0); > [...] > define("JOB_CMD", 5); > define("FIVE",5); // DEBUG > [...] > > function ...() > { > > $atlist = at_job_list(); > > $UserJobNr = 0; > $UserJobList[META_DATA][NUM_LINES] = 0; > > $numJobs = $atlist[META_DATA][NUM_LINES]; > > for ($i=1; $i<= $numJobs; $i++) { > > // DEBUG START > $test_5= $atlist[$i][5]; > $test_FIVE = $atlist[$i][FIVE]; > $test_JOB_CMD = $atlist[$i][JOB_CMD]; > > print "USER JOB LIST GET/JOB_CMD: /" . $atlist[$i][JOB_CMD] . > "/$test_5/$test_FIVE/$test_JOB_CMD\n"; > // DEBUG END > > if (user_own_this_job($User, $atlist[$i][JOB_CMD]) ) { > print "Has job $i\n"; // DEBUG > $UserJobNr++; > $UserJobList[$UserJobNr] = $atlist[$i]; > $UserJobList[$UserJobNr][JOB_UID] = $UserJobNr; > } > } > > [...] > > > } > > gives this out put: > > > > Warning: constant(): Couldn't find constant FIVE in [file] on line 238 > > FIVE: FIVE/ > > Warning: constant(): Couldn't find constant JOB_CMD in [file] on line 239 > > JOB_CMD: JOB_CMD/ > > > USER JOB LIST GET/JOB_CMD: //job1 user1// > > USER JOB LIST GET/JOB_CMD: //job2 user1// > > USER JOB LIST GET/JOB_CMD: //job1 user2// > > > To say the less, I am a bit confused. Any hints or tips would be appreciated. > > -- > PHP Windows Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: AW: [PHP-WIN] Problems with CONSTANTS that does not get defined
On Fri, 2004-03-05 at 13:34, Sven Schnitzke wrote: > Hi Anders, > > my first guess is that it might be an unfinished string ' problem starting > _before_ and hiding the defines for JOB_CMD and FIVE. Good guess (and you was almost right, right about the part of hiding code). I am using GNU Emacs 21.2.1 on redhat-linux which has syntax highlights, and I can not spot any syntax problem. Secondly, the PHP interpreter does not go wild about syntax errors. But you made me think in other ways about my code. This is how it looks in the start: http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-WIN] Problems with CONSTANTS that does not get defined - SOLVED
Me too, until Sven induced me think in the right way about the problem. I had a validation if-else construction before the execution of the defines. I knew it had to be a stupid mistake made by me /somewhere/ - since CONSTANT /should/ work. But I were unable to track the devil down (been looking for incorrect spelled variables names, incorrect constant name, incorrect program logic etc, but got zero...) The point was that I first wrote the program with hard coded values in the array indexes - and I generally don't like to do that - but then found out that PHP support CONSTANTS and started to introduce them. The code worked fine, until it suddenly added some new high level construction. Of course I did first check the latest added code, but found nothing, and became quite surprised while I were nesting down in the call stack trying to locate the fault - because this was low level function that had been tested and confirmed to be correct. What I knew at that point was that some constant had not been defined, while other was, and I could not for my life understand why this was the case. Hence I dumped a question to the PHP list once I confirmed this was the case. And as in 99,99% of all cases this it turned out to be a silly mistake overseen by me... So the reaming mystery for me is now why some constant actually did work (as I wanted them to) while other did not? //Anders - which only been /programing/ php for 2 weeks On Fri, 2004-03-05 at 13:42, Ignatius Reilly wrote: > Beats me. > > Ignatius > _ > - Original Message - > From: "Svensson, B.A.T. (HKG)" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Friday, March 05, 2004 13:17 > Subject: [PHP-WIN] Problems with CONSTANTS that does not get defined > > > > Running this code: > > > > > > [...] > > // META DATA DEFINES > > define("META_DATA", -1); > > define("NUM_LINES", 0); > > [...] > > define("JOB_CMD", 5); > > define("FIVE",5); // DEBUG > > [...] > > > > function ...() > > { > > > > $atlist = at_job_list(); > > > > $UserJobNr = 0; > > $UserJobList[META_DATA][NUM_LINES] = 0; > > > > $numJobs = $atlist[META_DATA][NUM_LINES]; > > > > for ($i=1; $i<= $numJobs; $i++) { > > > > // DEBUG START > > $test_5= $atlist[$i][5]; > > $test_FIVE = $atlist[$i][FIVE]; > > $test_JOB_CMD = $atlist[$i][JOB_CMD]; > > > > print "USER JOB LIST GET/JOB_CMD: /" . $atlist[$i][JOB_CMD] . > > "/$test_5/$test_FIVE/$test_JOB_CMD\n"; > > // DEBUG END > > > > if (user_own_this_job($User, $atlist[$i][JOB_CMD]) ) { > > print "Has job $i\n"; // DEBUG > > $UserJobNr++; > > $UserJobList[$UserJobNr] = $atlist[$i]; > > $UserJobList[$UserJobNr][JOB_UID] = $UserJobNr; > > } > > } > > > > [...] > > > > > > } > > > > gives this out put: > > > > > > > > Warning: constant(): Couldn't find constant FIVE in [file] on line 238 > > > > FIVE: FIVE/ > > > > Warning: constant(): Couldn't find constant JOB_CMD in [file] on line 239 > > > > JOB_CMD: JOB_CMD/ > > > > > > USER JOB LIST GET/JOB_CMD: //job1 user1// > > > > USER JOB LIST GET/JOB_CMD: //job2 user1// > > > > USER JOB LIST GET/JOB_CMD: //job1 user2// > > > > > > To say the less, I am a bit confused. Any hints or tips would be > appreciated. > > > > -- > > PHP Windows Mailing List (http://www.php.net/) > > To unsubscribe, visit: http://www.php.net/unsub.php > > > > -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-WIN] PHP compiler
Try: http://www.ioncube.com/ HTH, Piotr --- William CANDILLON <[EMAIL PROTECTED]> wrote: > Heya ^^ > I wanna know if there are a way to "compile" our own > php script ? > Regards. > StorM > > -- > PHP Windows Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > __ Do you Yahoo!? Yahoo! Search - Find what youre looking for faster http://search.yahoo.com -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-WIN] PHP compiler
Thks a lot, it's work perfectly. -Message d'origine- De : Piotr Pluciennik [mailto:[EMAIL PROTECTED] Envoyé : vendredi 5 mars 2004 14:32 À : [EMAIL PROTECTED] Objet : Re: [PHP-WIN] PHP compiler Try: http://www.ioncube.com/ HTH, Piotr --- William CANDILLON <[EMAIL PROTECTED]> wrote: > Heya ^^ > I wanna know if there are a way to "compile" our own > php script ? > Regards. > StorM > > -- > PHP Windows Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > __ Do you Yahoo!? Yahoo! Search - Find what youre looking for faster http://search.yahoo.com -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-WIN] extensieadons_dir= not being read and yes it is uncommented
Hello List. I uam using: apache 1.3.29, php 4.3.4, MySql 1.3 on WIN2K-Pro My php install (and extensions dir) is under c:\php. However, in php.ini (located under WINNT\php.ini) I point the extensions directory to c:\php\extensions, the php_info() lists extensions_dir=c:\php4 (does not read or accepts the change). If I leave it as default which is: extensions_dir="./" this shows up under php_info() listing. I have tried: / and \ (slashes) c:php or c:\php\extensions With our without quotes Result it doe snot accept. If I leave it at default, than the gd module that is bundled with php does not get loaded (whihc I need), errors as : module not found-I made sure that I uncommented that part. Any suggestions? TIA, RAfi This e-mail, including attachments, may include confidential and/or proprietary information, and may be used only by the person or entity to which it is addressed. If the reader of this e-mail is not the intended recipient or his or her authorized agent, the reader is hereby notified that any dissemination, distribution or copying of this e-mail is prohibited. If you have received this e-mail in error, please notify the sender by replying to this message and delete this e-mail immediately. -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
php-windows Digest 5 Mar 2004 21:14:04 -0000 Issue 2151
php-windows Digest 5 Mar 2004 21:14:04 - Issue 2151 Topics (messages 23065 through 23074): File Length 23065 by: dwight ian Re: Sending arguments to a SP in PHP 23066 by: Svensson, B.A.T. (HKG) 23067 by: Luis Moreira Problems with CONSTANTS that does not get defined 23068 by: Svensson, B.A.T. (HKG) 23069 by: Ignatius Reilly 23070 by: Svensson, B.A.T. (HKG) Re: Problems with CONSTANTS that does not get defined - SOLVED 23071 by: Svensson, B.A.T. (HKG) Re: PHP compiler 23072 by: Piotr Pluciennik 23073 by: William CANDILLON extensieadons_dir= not being read and yes it is uncommented 23074 by: Rafi Sheikh 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 --- Hi People...:) Im a newbie so please be aptient and help me. I have a script that will create a csv file and it works fine. The only problem is, hen the csv file size gets over 230kb it will omit the last part of the file... Where in php can be set to allow a bigger file size? My csv is also dowloadadble. Capital One Classic Mastercard 60 second response online. http://mocda.com/1/c/681064/117934/307081/307081 AOL users go here http://mocda.com/1/c/681064/117934/307081/307081 --- End Message --- --- Begin Message --- Very is your problem located? Is the string not properly built by php? or is an error genereated when you try to execute the query? -Original Message- From: Harpreet K. Singh To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: 2004-03-04 21:55 Subject: [PHP-WIN] Sending arguments to a SP in PHP I am using PHP and sql server 2000. I have a stored procedure which takes 3 arguments. The first argument is a string and the rest 2 are integers. For some reasons the call to the stored procedure is being trimmed. My call is as follows $oldquery="select var1,var2,var3,var4. from table order by var1"; $query="exec limitselect '". $oldquery ."',". $limit .",". $offset; i try to print the sql command echo "".$query; It prints out a trimmed string exec limitselect 'select origin is theri a limit to what one can send to a sp call Please help i am totally confused. Thanks -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php --- End Message --- --- Begin Message --- Is the echo you show after the string being generated or within the funcion ? Try it (if you haven't already) immediately after the generation. Maybe there is something wrong with the other strings envolved, or with the syntax itself (you don't show the entire command). If it is not, don't bother with the function... Another thing : > My call is as follows > $oldquery="select var1,var2,var3,var4. from table order by var1"; > $query="exec limitselect '". $oldquery ."',". $limit .",". $offset; > i try to print the sql command > echo "".$query; > It prints out a trimmed string > exec limitselect 'select origin What you say is echoed does not (apparently) correspond to the generation. Were does the word "origin" come from ? The string $oldquery does not contain it, as far as you show. Luis - Original Message - From: "Svensson, B.A.T. (HKG)" <[EMAIL PROTECTED]> To: "'Harpreet K. Singh '" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Friday, March 05, 2004 8:48 AM Subject: RE: [PHP-WIN] Sending arguments to a SP in PHP > Very is your problem located? > > Is the string not properly built by php? > or is an error genereated when you try to execute the query? > > > -Original Message- > From: Harpreet K. Singh > To: [EMAIL PROTECTED]; [EMAIL PROTECTED] > Sent: 2004-03-04 21:55 > Subject: [PHP-WIN] Sending arguments to a SP in PHP > > I am using PHP and sql server 2000. > > I have a stored procedure which takes 3 arguments. The first argument is > a > string and the rest 2 are integers. > > For some reasons the call to the stored procedure is being trimmed. > > My call is as follows > $oldquery="select var1,var2,var3,var4. from table order by var1"; > > $query="exec limitselect '". $oldquery ."',". $limit .",". $offset; > > i try to print the sql command > echo "".$query; > > It prints out a trimmed string > > exec limitselect 'select origin > > is theri a limit to what one can send to a sp call > > Please help i am totally confused. > > Thanks > > -- > PHP Windows Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- > PHP Windows Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > --- End Message --- --- Begin Message --- Running this code: [...] // META DATA DEFINES define("META_DATA", -1); define("NUM_LINES", 0); [...] define("JOB_CMD", 5); define
[PHP-WIN] mcrypt problem
Hi, Hope somebody can help me with this problem. I've got IIS and PHP on WIN2K. I did the following : 1) downloaded php_mcrypt.dll and libmcrypt.dll. 2) Copied php_mcrypt.dll to d:\php\extensions and libmcrypt.dll to c:\windows\system32. (The extension_dir is pointin to d:\php\extensions) 3) uncommented extensions=php_mcrypt.dll in php.ini The problem : 1) When I run my php program, it hangs. 2) but when I commented out the php_mcrypt.dll in php.ini - the script runs. What's wrong ? Really hope that somebody can help me. thanks desmond -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-WIN] Sending arguments to a SP in PHP
Very is your problem located? Is the string not properly built by php? or is an error genereated when you try to execute the query? -Original Message- From: Harpreet K. Singh To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: 2004-03-04 21:55 Subject: [PHP-WIN] Sending arguments to a SP in PHP I am using PHP and sql server 2000. I have a stored procedure which takes 3 arguments. The first argument is a string and the rest 2 are integers. For some reasons the call to the stored procedure is being trimmed. My call is as follows $oldquery="select var1,var2,var3,var4. from table order by var1"; $query="exec limitselect '". $oldquery ."',". $limit .",". $offset; i try to print the sql command echo "".$query; It prints out a trimmed string exec limitselect 'select origin is theri a limit to what one can send to a sp call Please help i am totally confused. Thanks -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php