[PHP] problem using extension.
Hello, I have some problem using an extension written by myself. Here are the details: OS. RedHat 7.2 Apache: 1.3.20-16 (out of the box version ) PHP 4.3.0 compiled with: -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Text File open and display
Greetings learned PHP(eople), There have been a number of postings recently on opening and reading files, and whilst I have read `em all I fail to make sense of it all. Basicaly...I have a text file with entries in it...I wish to display the contents of this file line by line in an HTML table : At present all I get is a table with 1 row and all the text in it in a large messy blob. = '."\n"; echo ' File Entries'."\n"; echo ' '."\n"."\n"; // //For each line in the file // while (fpassthru($handle)); //{ //Print them out to Table- echo ''."\n"; echo ' '; echo fpassthru($handle); echo ''. "\n"; //} echo ''; //fclose($handle); ?> = I have commented out those lines which fail and am stuck as to what the correct syntax should be. I have read up on nl2br,fgets and other posts on php.net, but ..harump Thanks -- Chris Blake Office : (011) 782-0840 Cell : 083 985 0379 It is reported that somewhere in the world, every 15 seconds, a woman gives birth to a child. She must be found and stopped. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] fread problem
At 05:46 03.03.2003, Paul Cohen said: [snip] >Here is the code in my file and was taken directly from the manual: > >$filename = "test.php"; >$handle = fopen ($filename, "r"); >$contents = fread ($handle, filesize ($filename)); >fclose ($handle); >echo $contents; [snip] You need to eval your code (not "exec"): eval($contents); Note that $contents need to be valid PHP for eval(). It must not start with "Some HTMLBlah you should eval("?>$contentsO Ernest E. Vogelsinger (\)ICQ #13394035 ^ http://www.vogelsinger.at/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] problem using extension.
At 09:49 03.03.2003, Joe Wong said: [snip] >Hello, > > I have some problem using an extension written by myself. Here are the >details: > >OS. RedHat 7.2 >Apache: 1.3.20-16 (out of the box version ) >PHP 4.3.0 compiled with: [snip] Uh yes - we have problems too, sometimes. Care to tell us about _your_ problem? -- >O Ernest E. Vogelsinger (\)ICQ #13394035 ^ http://www.vogelsinger.at/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Text File open and display
You get a file to an array of lines with file(). Example: "row 1"; // [1] => "row 2"; // [2] => "row 3"; // . for ($i = 0; $i < count($myFile); $i++) { print "Row ".($i+1).": ".$myFile[$i]; }; ?> Niklas -Original Message- From: Chris Blake [mailto:[EMAIL PROTECTED] Sent: 3. maaliskuuta 2003 10:58 To: [EMAIL PROTECTED] Subject: [PHP] Text File open and display Greetings learned PHP(eople), There have been a number of postings recently on opening and reading files, and whilst I have read `em all I fail to make sense of it all. Basicaly...I have a text file with entries in it...I wish to display the contents of this file line by line in an HTML table : At present all I get is a table with 1 row and all the text in it in a large messy blob. = '."\n"; echo ' File Entries'."\n"; echo ' '."\n"."\n"; // //For each line in the file // while (fpassthru($handle)); //{ //Print them out to Table- echo ''."\n"; echo ' '; echo fpassthru($handle); echo ''. "\n"; //} echo ''; //fclose($handle); ?> = I have commented out those lines which fail and am stuck as to what the correct syntax should be. I have read up on nl2br,fgets and other posts on php.net, but ..harump Thanks -- Chris Blake Office : (011) 782-0840 Cell : 083 985 0379 It is reported that somewhere in the world, every 15 seconds, a woman gives birth to a child. She must be found and stopped. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php ### This message has been scanned by F-Secure Anti-Virus for Internet Mail. For more information, connect to http://www.F-Secure.com/ ### This message has been scanned by F-Secure Anti-Virus for Internet Mail. For more information, connect to http://www.F-Secure.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Text File open and display
Muchos grassy arse...works perfectly On Mon, 2003-03-03 at 11:06, Niklas Lampén wrote: > You get a file to an array of lines with file(). > > Example: > $myFile = file("text_file.txt"); > // Now $myFile is an array looking like > // [0] => "row 1"; > // [1] => "row 2"; > // [2] => "row 3"; > // . > > for ($i = 0; $i < count($myFile); $i++) > { > print "Row ".($i+1).": ".$myFile[$i]; > }; > ?> > > > Niklas > > -Original Message- > From: Chris Blake [mailto:[EMAIL PROTECTED] > Sent: 3. maaliskuuta 2003 10:58 > To: [EMAIL PROTECTED] > Subject: [PHP] Text File open and display > > > Greetings learned PHP(eople), > > There have been a number of postings recently on opening and reading files, > and whilst I have read `em all I fail to make sense of it all. > > Basicaly...I have a text file with entries in it...I wish to display the > contents of this file line by line in an HTML table : At present all I get > is a table with 1 row and all the text in it in a large messy blob. > = > > > > $handle = fopen("fopen.txt","r"); > >echo 'echo ' '."\n"; >echo ' File Entries'."\n"; >echo ' '."\n"."\n"; >// >//For each line in the file >// while (fpassthru($handle)); >//{ >//Print them out to Table- >echo ''."\n"; >echo ' '; >echo fpassthru($handle); >echo ''. "\n"; >//} >echo ''; >//fclose($handle); > > ?> > > > > = > I have commented out those lines which fail and am stuck as to what the > correct syntax should be. I have read up on nl2br,fgets and other posts on > php.net, but ..harump > > Thanks > > > -- > Chris Blake > Office : (011) 782-0840 > Cell : 083 985 0379 > It is reported that somewhere in the world, every 15 seconds, a woman gives > birth to a child. She must be found and stopped. > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > ### > This message has been scanned by F-Secure Anti-Virus for Internet Mail. For > more information, connect to http://www.F-Secure.com/ > > ### > This message has been scanned by F-Secure Anti-Virus for Internet Mail. > For more information, connect to http://www.F-Secure.com/ > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > -- Chris Blake Office : (011) 782-0840 Cell : 083 985 0379 It is reported that somewhere in the world, every 15 seconds, a woman gives birth to a child. She must be found and stopped. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] php as php3 perhaps with htaccess
Hello, I have a website and all my files are *.php3 I would like to change the extensions of all files to *.php My problem is for the search engine and links to my site. Because the site is well referenced in the search engine with files liek *.php3 So if I rename all files in .php, the links in the search engine will be broken So I would like to know if there is a way perhaps with a .htaccess file to say that the file .php3 must be redirect to the same file but in *.php So when I try to access this page : http://www.my-site.com/page.php3?param=value I will access this page : http://www.my-site.com/page.php?param=value Thanks a lot -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Zend Encoder
At 18:51 25/02/2003, Thomas Johnsson wrote: >1. Zend does not have a way to decode a php file that was encoded >using Zend Encoder. > (For those of you paying attention to details, note the word "decode", > not "decrypt". Zend Encoder does not encrypt. US gov't lawyers, please take note :) Are you not allowed, according to US laws, to encrypt files using something like the Zend Encoder, if that was a feature? No, it was more of a joke :) The reason the Zend Encoder does not use encryption is that it would be quite useless, as the file would have to be decrypted when it's loaded. It would then be relatively easy for a malicious hacker to take a look at the decrypted data. Instead, the contents of encoded files is simply not very meaningful to anything but the Zend Engine and Optimizer, so even if you get a hold of the data, you would still be far away from the source code. >2. Even the inherent knowledge that Zend has about our own product >would not enable us to access encoded software. At most, we >theoretically could develop code that could access some of the string >elements in a script, but definitely not any actual code. (As a comparison, >it would be like looking at a .EXE file in Windows, but even more convoluted.) >Needless to say, even this minor capability has never and will never be >developed or utilized by Zend. So, an encoded script does not decode to plain text and then execute? It certainly does not. There are products in the market in which the data does get restored to the original plain text in runtime, but they are inherently insecure. With Zend encoded files, the original plain text is gone for good. >3. Zend Encoder is the most secure way to deliver php code. That said, no protection scheme is absolutely 100% protected. What is the acual difference between Zend Encoder and say ioncube (http://www.ioncube.com), security-wise? I'm not familiar with the internals of the ioncube products, so I can't really answer that. I do know Zend pretty well, and nobody knows the engine as well as the ones who wrote it, so I stand behind Brad's statement :) Zeev -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] 2 questions !
Justin French wrote: I'm sure there's a way to check the owner of a file, but not (from what i know) a way to check who apache is running as. On linux "ps aux | grep httpd" will list as the first item the user the apache processes are running as. Ignore the one with root. On other unices the parameters to ps may vary. Regards Chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php as php3 perhaps with htaccess
At 10:21 03.03.2003, Cranky said: [snip] >I have a website and all my files are *.php3 >I would like to change the extensions of all files to *.php > >So I would like to know if there is a way perhaps with a .htaccess file to >say that the file .php3 must be redirect to the same file but in *.php > >So when I try to access this page : >http://www.my-site.com/page.php3?param=value > >I will access this page : >http://www.my-site.com/page.php?param=value [snip] If you have the ability to use mod-rewrite, you can do RewriteEngine On RewriteCond %{REQUEST_URI} ^.*\.php3.*$ [NC] RewriteRule ^(.*)\.php3(.*)$ $1.php$2 [L] This can be done either in the general configuration, within , or within . I am using exactly this stuff to allow legacy links to a site that has been developed in Python (*.py) to access the same URLs as PHP files. -- >O Ernest E. Vogelsinger (\)ICQ #13394035 ^ http://www.vogelsinger.at/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] problem using extension.
At 10:35 03.03.2003, Joe Wong said: [snip] > My last posting was interrupted. The details are here: > >I have created an extension on top of a C++ library >If I put the module name into php.ini extension=XYZ, apache failed to load >If I try to use 'dl' to load the libary in a PHP page, I got 'child exist >segementation fault' in /var/log/httpd/error_log > >I am sure the C++ library is running ok as I have a test program that make >use of it. I just don't know how I can make it work with PHP.. [snip] Sounds as if there was some problem in the extensions initialization code. I'd try to put some debugging in there (write to a file, flush and close it) so you can see how far your extension executes until the segfault. -- >O Ernest E. Vogelsinger (\)ICQ #13394035 ^ http://www.vogelsinger.at/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php as php3 perhaps with htaccess
Thanks for this reply. But I can not use the mod-rewrite because my site is on a shared hosting. Another idea ? Thanks "Ernest E Vogelsinger" <[EMAIL PROTECTED]> a écrit dans le message de news: [EMAIL PROTECTED] > At 10:21 03.03.2003, Cranky said: > [snip] > >I have a website and all my files are *.php3 > >I would like to change the extensions of all files to *.php > > > >So I would like to know if there is a way perhaps with a .htaccess file to > >say that the file .php3 must be redirect to the same file but in *.php > > > >So when I try to access this page : > >http://www.my-site.com/page.php3?param=value > > > >I will access this page : > >http://www.my-site.com/page.php?param=value > [snip] > > If you have the ability to use mod-rewrite, you can do > > RewriteEngine On > RewriteCond %{REQUEST_URI} ^.*\.php3.*$ [NC] > RewriteRule ^(.*)\.php3(.*)$ $1.php$2 [L] > > This can be done either in the general configuration, within , > or within . > > I am using exactly this stuff to allow legacy links to a site that has been > developed in Python (*.py) to access the same URLs as PHP files. > > > -- >>O Ernest E. Vogelsinger >(\)ICQ #13394035 > ^ http://www.vogelsinger.at/ > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php as php3 perhaps with htaccess
At 11:29 03.03.2003, Cranky said: [snip] >Thanks for this reply. >But I can not use the mod-rewrite because my site is on a shared hosting. > >Another idea ? [snip] Ask your sysadmin to install the mod-rewrite for your site to the configuration. They should do this without asking too much ... -- >O Ernest E. Vogelsinger (\)ICQ #13394035 ^ http://www.vogelsinger.at/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] IP Addesses on local network
Greetings, Th command echo gethostbyaddr("ip.number.inserted.here"); returns the name of the server when it`s an internet address. Is there a similar command that will return host names on a local network I tried using the above command putting in a LAN address, but it just returned the IP address. -- Chris Blake Office : (011) 782-0840 Cell : 083 985 0379 It is reported that somewhere in the world, every 15 seconds, a woman gives birth to a child. She must be found and stopped. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] IP Addesses on local network
> echo gethostbyaddr("ip.number.inserted.here"); > > returns the name of the server when it`s an internet address. > Is there a similar command that will return host names on a local > network > > I tried using the above command putting in a LAN address, but it just > returned the IP address. This isn't a PHP issue, this is a DNS issue. "gethostbyaddr" uses DNS resolution to convert the IP address into its named equivelant... if no name is found, it will return the IP address again. The only way to get the reverse DNS for a private (LAN) IP address is to use a DNS server which has those IPs registered. In short, you have to run your own domain name server and apply the entries in there. There are other, OS independant, ways of adding these lookups (eg: /etc/hosts on Unix %SYSTEMROOT%\system32\hosts.pam (I think) on Windows 2000+) but you will have to investigate those yourself. -- Dan Hardiker [EMAIL PROTECTED] ADAM Software & Systems Engineer First Creative -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Where to publish extension?
> Not sure how you define an extension, but you could take a look at my > web site www.phpscriptsearch.com and see if it applies to listing it > there. But like I said, it depends what you mean by extension. Extension like in binary that is either an integral part of PHP or a loadable module. > As far as getting it into the next distro, not sure, I have put in a lot > of effort trying to contact various people within the PHP group without > any success at all. Oh well... I am sure that they don't know what they are missing. Regarding my extension, I just make a page for it under my domain and post the URL in newsgroups... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] formtext
HI EVERYBODY, i was trying to put a text field in a form in my php script but it's giving me the following error: Parse error: parse error in /var/www/html/bdoi_change/f1.php on line 10 the code is as follows: Business Directory Of India Please enter other login id: echo ""; echo "Name $yname \n"; echo "Company name $cname \n"; echo "Category $cat \n"; echo "Primary business $pbus \n"; echo "Business email $bemail \n"; echo "Business address $badd1 \n"; echo "Business area $area \n"; echo "Business city $city \n"; echo ""; ?> regards, diksha. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] formtext
HI EVERYBODY, i was trying to put a text field in a form in my php script but it's giving me the following error: Parse error: parse error in /var/www/html/bdoi_change/f1.php on line 10 the code is as follows: Business Directory Of India Please enter other login id: echo ""; echo "Name $yname \n"; echo "Company name $cname \n"; echo "Category $cat \n"; echo "Primary business $pbus \n"; echo "Business email $bemail \n"; echo "Business address $badd1 \n"; echo "Business area $area \n"; echo "Business city $city \n"; echo ""; ?> regards, diksha. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: IP Addesses on local network
Do you have a DNS server on you network? Without it, it will not work. "Chris Blake" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Greetings, > > Th command > > echo gethostbyaddr("ip.number.inserted.here"); > > returns the name of the server when it`s an internet address. > Is there a similar command that will return host names on a local > network > > I tried using the above command putting in a LAN address, but it just > returned the IP address. > > -- > Chris Blake > Office : (011) 782-0840 > Cell : 083 985 0379 > It is reported that somewhere in the world, every 15 seconds, a woman > gives birth to a child. She must be found and stopped. > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] formtext
Hi Diksha, > Parse error: parse error in /var/www/html/bdoi_change/f1.php on > line 10 > > > > > > > > Business Directory Of India > > You can't use HTML directly when you're inside a PHP block - het rid of the ""; // etc Cheers Jon -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Free email service Plus get Paid while using it!!!!
Steve -- ...and then steve adamian said... % % I thought you would enjoy this new web site ... Actually, I have no interest in it unless it so happens that it is written in PHP and we can discuss the source code. % ... % If you will decide to join please use my User ID rudeboy311 ... Well, you got that part right, anyway :-) Please keep this stuff off the PHP mailing lists. HAND :-D -- David T-G * There is too much animal courage in (play) [EMAIL PROTECTED] * society and not sufficient moral courage. (work) [EMAIL PROTECTED] -- Mary Baker Eddy, "Science and Health" http://justpickone.org/davidtg/ Shpx gur Pbzzhavpngvbaf Qrprapl Npg! pgp0.pgp Description: PGP signature
[PHP] info required reg. PHP
Hello ! I have got 2 doubts/questions for clarification. 1) Can we display an alert box using PHP. The objective is to fire back the user for his incorrect submission with an alert message. 2) I would like to know the max. number of records or max. space a database (mentioned below) can provide. Oracle, MS.Access, MySQL, SQL Server,... with thanks L. Yogendra -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] info required reg. PHP
Hello ! I have got 2 doubts/questions for clarification. 1) Can we display an alert box using PHP. The objective is to fire back the user for his incorrect submission with an alert message. 2) I would like to know the max. number of records or max. space a database (mentioned below) can provide. Oracle, MS.Access, MySQL, SQL Server,... with thanks L. Yogendra -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] info required reg. PHP
1) No you can't. Use javascript for that. 2) This information is easy to find from web. Read datasheets or use google. Niklas -Original Message- From: yogendra lingsugur [mailto:[EMAIL PROTECTED] Sent: 3. maaliskuuta 2003 14:32 To: [EMAIL PROTECTED] Subject: [PHP] info required reg. PHP Hello ! I have got 2 doubts/questions for clarification. 1) Can we display an alert box using PHP. The objective is to fire back the user for his incorrect submission with an alert message. 2) I would like to know the max. number of records or max. space a database (mentioned below) can provide. Oracle, MS.Access, MySQL, SQL Server,... with thanks L. Yogendra -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php ### This message has been scanned by F-Secure Anti-Virus for Internet Mail. For more information, connect to http://www.F-Secure.com/ ### This message has been scanned by F-Secure Anti-Virus for Internet Mail. For more information, connect to http://www.F-Secure.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: RE: [PHP] formtext
Hi Diksha, > Parse error: parse error, expecting `','' or `';'' in > /var/www/html/bdoi_change/f1.php on line 11 > > the code is: > > echo" > Please enter other login id: > "; You need to escape the quotes inside the string, or use single quotes to define it. Either this: echo "Please enter other login id:"; ^^^^ ^^ ^^ note escaped quotes here Or this: echo 'Please enter other login id:'; ^^^ ^^^ note single quotes here... ...and here Here's a great article that should clear all this up for you: http://www.zend.com/zend/tut/using-strings.php Cheers Jon -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] info required reg. PHP
Hi, > 1) Can we display an alert box using PHP. No, you need to use Javascript's alert() function. PHP is server-side only. > 2) I would like to know the max. number of records or max. space > a database (mentioned below) can provide. Oracle, MySQL and SQL Server are limited only by the space available on the server. Access has a defined limit, but it's quite large (2 gigs, I think), and it chokes when you have more than 5 connections open. I would *strongly* advise you not to use Access for a website - give MySQL or Postgres a go, they both beat it hands down. Access is a desktop database, not a server - it's great for holding your CD collection, but that's about it :-) Cheers Jon -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: RE: [PHP] formtext
Hi Diksha, Please excuse the line wrapping in my last post - you may have to copy 'n' paste into a text editor to see it as it should be :-) Cheers Jon -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] info required reg. PHP
Answer to number 1: I'm sure you could, but why would you want to when Javascript is more suited for this type of processing. If you don't know javascript google for some tutorials or for alert boxes, and I'm sure you will find plenty of examples. for #2: For Mysql check this: http://www.mysql.com/doc/en/Table_size.html And for the others, look around, that information should not be too hard to find. > Hello ! > >I have got 2 doubts/questions for clarification. > > 1) Can we display an alert box using PHP. The objective is to > fire back the user for his incorrect submission with an > alert message. > > 2) I would like to know the max. number of records or max. space > a database (mentioned below) can provide. > Oracle, > MS.Access, > MySQL, > SQL Server,... > > with thanks > L. Yogendra > > > > > -- > 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] eval help
Hi guys, My current task involves passing a string into a function that is able to reference variables defined within that function for the final output. The idea is that a function iterates through objects and eval's the string so that the objects data (name etc) is substituted in the string. Currently I have something like this: $someVar = "testing for node - wootah, \$evalTestArr[TAG_PAGENAME]" then in some other function that gets passed this string ... $evalTestArr[TAG_PAGENAME] = "hello anna marie gooberfish!"; $str = $someVar; eval("\$str=\"$str\";"); if I echo it out, the substitution is not done. any thoughts? I'm reading through http://www.php.net/manual/en/function.eval.php but yet to be inspired. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] eval help
At 14:47 03.03.2003, neko said: [snip] >$someVar = "testing for node - wootah, \$evalTestArr[TAG_PAGENAME]" > > >then in some other function that gets passed this string >... > >$evalTestArr[TAG_PAGENAME] = "hello anna marie gooberfish!"; >$str = $someVar; >eval("\$str=\"$str\";"); > >if I echo it out, the substitution is not done. [snip] try $someVar = "testing for node - wootah, \{\$evalTestArr[TAG_PAGENAME]\}" Array derefs within quoted strings must be enclosed in curly quotes. -- >O Ernest E. Vogelsinger (\)ICQ #13394035 ^ http://www.vogelsinger.at/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: eval help
note that the following php: Hello, $name"; $str2 = "Hello, $arr[0]"; $str3 = "Hello, $arr2['name']"; eval ("\$evaldString = \"$str\";"); echo $evaldString; eval ("\$evaldString = \"$str2\";"); echo $evaldString; eval ("\$evaldString = \"$str3\";"); echo $evaldString; ?> produces: Broness!Hello, ScottHello, DudeHello, -- note that the last cannot be seen - I'm sure I'm almost there, but I have to be able to reference an associative array. Scott -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: eval help
Hi, > $arr2["name"] = "Broness!"; .. > $str3 = "Hello, $arr2['name']"; .. > eval ("\$evaldString = \"$str3\";"); > echo $evaldString; Your almost there... just remember one very simple rule - if in doubt, break out. Meaning, if you're having variable resolution issues, then just break out of the string. Apply the following change to have happy dreams: From: > $str3 = "Hello, $arr2['name']"; To: > $str3 = "Hello, ".$arr2['name']; -- Dan Hardiker [EMAIL PROTECTED] ADAM Software & Systems Engineer First Creative -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Reports with PHP Mysql
Hi there, Any class or libraries for generating, formatting reports with PHP Mysql? Manoj --- Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.459 / Virus Database: 258 - Release Date: 25/02/2003 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: eval help
Thanks Dan - I just worked this out before reading your solution! :) $str4 = "Hello, ".$arr2['name']; cheers and thanks to all - lets see how that goes within my framework now :) neko -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] MySQL, Apache and UPDATE, INSERT and DELETE
Hello friends, Thanks for the help with the file upload, that has been solved by simply setting the write permissions on the corresponding directories. Another thing: I have developed my PHP application on a Windows machine with a MySQL server database. However, it was meant for a Linux server running Apache. Now it turns out that the results of SQL statements including UPDATE, DELETE or INSERT are not shown on the PHP page. To say it in another way: I have a form which after submitting performs an UPDATE, INSERT or DELETE, and I don't see their effects on the database on the results page. I have already checked that the mentioned database operations are carried out, but it is as if the pages are cashed in someway or that the server does not allow database updates to be shown on the browser. What phenomenon is this? I know that Apache has some peculiarities which has to do with setting security. I am not an expert in Apache, not to say I am a complete nitwit in Apache. Also, my script works perfectly on my Windows machine. Can somebody help me out please? Thank you, FRANS BAKKER -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP & Oracle
Hi, i have one big Oracle database, 20GB. Is it better to comunicate directly to Oracle with PHP, or to export data to MySQL. How secure is PHP & Oracle, can they communicate well? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: eval help
Actually, I just realised that what I want to accomplish is different from my example - the main issue is with scope: we're in the pipe, 5-5-5."); $str = "Hello, \$name"; $str2 = "Hello, \$arr[0]"; $str3 = "Hello, \$arr2['name']"; echo doEvalWithVarsInScope($str); echo doEvalWithVarsInScope($str2); echo doEvalWithVarsInScope($str3); } function doEvalWithVarsInScope($str) { echo("trying to eval for str=$str"); $name = "Scott"; $arr[] = "Dude"; $arr2["name"] = "Broness!"; eval ("\$evaldString = \"$str\";"); return $evaldString; } ?> -- will produce: we're in the pipe, 5-5-5. trying to eval for str= Hello, $name Hello, Scott trying to eval for str= Hello, $arr[0] Hello, Dude trying to eval for str= Hello, $arr2['name'] Hello, -- any (more) help is greatly appreciated. cheers, neko -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: eval help
we're in the pipe, 5-5-5."); $str = "Hello, \$name"; $str2 = "Hello, \$arr[0]"; $str3 = "Hello, \$arr2[".NAME_TAG."]"; echo doEvalWithVarsInScope($str); echo doEvalWithVarsInScope($str2); echo doEvalWithVarsInScope($str3); } function doEvalWithVarsInScope($str) { echo("trying to eval for str=$str and NAME_TAG:".NAME_TAG); $name = "Scott"; $arr[] = "Dude"; $arr2[NAME_TAG] = "Broness!"; eval ("\$evaldString = \"$str\";"); return $evaldString; } ?> -- produces: we're in the pipe, 5-5-5. trying to eval for str= Hello, $name and NAME_TAG:name Hello, Scott trying to eval for str= Hello, $arr[0] and NAME_TAG:name Hello, Dude trying to eval for str= Hello, $arr2[name] and NAME_TAG:name Hello, Broness! -- done, but it's uglier than I was hoping :( -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP & Oracle
On Monday 03 March 2003 09:29 am, Simon wrote: > Hi, > > i have one big Oracle database, 20GB. Is it better to comunicate > directly to Oracle with PHP, or to export data to MySQL. How secure is > PHP & Oracle, can they communicate well? I don't see why you would want to export data to MySQL first. PHP has a built in support for Oracle and OCI8, and it works really well. I've been doing a lot of developement using PHP + Oracle. You lose some SQL capability that are native to Oracle if you export from Oracle to Mysql. RDB -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Thank you! [GD Libraries]
Thank you to all that came to my aid while I was muddleing through my attempts to install GD Libraries. Since I had various versions of PHP from textbook CD's - I downloaded PHP Triad which happened to be PHP version 4.1.1 I changed two lines in the php.ini file and ran the phpinfo() function call and GD showed up without the page hanging up. In that version, there is no php_gd2.dll - just php_gd.dll. Again...my sincerest thanks to all. Tony Ritter -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] MySQL
This is OT, I'm considering buying the MySQL, Second Edition Paul DuBois book. I'm using MySQL 3.23. Should I be buying the first edition DuBois book instead or does BuBois cover both 3 and 4 in the second edition? Is there a huge difference between 3 and 4? Here's a URL for the second edition: http://www.kitebird.com/mysql-book/ It discusses what's new in this edition. Paul DuBois is also very active on the MySQL mailing lists so your question would probably get a more detailed answer there. Also, in all likelihood, the first edition may not even be available anymore. Larry -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Automatic Table Creation
I have a mysql table containing about 100 record, alphabetically ordered. How would i display them in browser in a 3 columns, doesn't matter how long the rows is as the number of records will grow in the database table. the records should be in alphabetically order, for example: aaa bbbaccca aab cccb aac bbbc aad bbbdcccd any idea anyone? 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] Using sapi/embed
Does anyone have a simple example of using the sapi/embed option from an external c or c++ program, including compiling/linking? TIA Mark -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] File array mailing list pharse error
Hello again I worked on it so long now I have to come back to you it gives me an Parse error: Parse error: parse error, expecting `'('' in members_read_send.php on line 5 Iam so sorry to bug u so much but can u help me finish here please? \r\n"; $headers .= "To: ".$contactname." <".$contactemail.">\r\n"; $headers .= "Reply-To: ".$myname." <$myreplyemail>\r\n"; $headers .= "X-Priority: 1\r\n"; $headers .= "X-MSMail-Priority: High\r\n"; $headers .= "X-Mailer: browseabit"; mail($contactemail, $subject, $message, $headers); echo "Memmber $Realf $RealL from $City $State $Country is been notified... "; } ?> -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: eval help
ok - my latest in the eval saga is this: I want to be able to eval a function call anywhere in the string supplied, and the function call is not in scope when the string is defined. So -- somewhere in my code I wanted something like this: $string = "testing nodename: \$node->getName() pagename:\$nodePageTags[".TAG_PAGENAME."]"; -- where the code is evaled eventually, there is a $node object defined, so the function call should work. Of course, that currently does not work :) cheers, neko -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP on IIS session problems
I get these errors from a simple "session_start();" script. Warning: session_start() [function.session-start]: open(/tmp\sess_f4aa3ef3c537bb6327d5e7b991e91be7, O_RDWR) failed: No such file or directory (2) in c:\inetpub\wwwroot\picoblog\admin.php on line 2 Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at c:\inetpub\wwwroot\picoblog\admin.php:2) in c:\inetpub\wwwroot\picoblog\admin.php on line 2 Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at c:\inetpub\wwwroot\picoblog\admin.php:2) in c:\inetpub\wwwroot\picoblog\admin.php on line 2 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] PHP on IIS session problems
Hi Victor, > Warning: session_start() [function.session-start]: > open(/tmp\sess_f4aa3ef3c537bb6327d5e7b991e91be7, O_RDWR) failed: No such > file or directory (2) in c:\inetpub\wwwroot\picoblog\admin.php on line 2 Pay attention to the error messages. This one explains exactly what you're doing wrong, if only you'd read it. You're trying to save your session files into your /tmp directory, which only exists on unix-based systems. You can fix this by editing your php.ini (specifically the session.save_path directive), but it's probably a good idea to RTFM as well. Cheers Jon -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] XML Question
what does "harvest" mean? what would the function "harvest" do? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] PHP on IIS session problems
> I get these errors from a simple "session_start();" script. > > Warning: session_start() [function.session-start]: > open(/tmp\sess_f4aa3ef3c537bb6327d5e7b991e91be7, O_RDWR) failed: No such > file or directory (2) in c:\inetpub\wwwroot\picoblog\admin.php on line 2 > > Warning: session_start() [function.session-start]: Cannot send session > cookie - headers already sent by (output started at > c:\inetpub\wwwroot\picoblog\admin.php:2) in > c:\inetpub\wwwroot\picoblog\admin.php on line 2 > > Warning: session_start() [function.session-start]: Cannot send > session cache > limiter - headers already sent (output started at > c:\inetpub\wwwroot\picoblog\admin.php:2) in > c:\inetpub\wwwroot\picoblog\admin.php on line 2 > Your php.ini still has the default /tmp session save path which is OK on Unix but squawks on Win32. So you will need to reset the directive session.save_path to c:\temp or any other valid scratch directory on your windows machine you will probably also need to bounce IIS as well to pick up the new settings if your running as an ISAPI module The second and third errors are a knock-on effect of the 1st problem so fix the bad session temp directory and they will probably disappear. HTH Rich -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Automatic Table Creation
Awlad, I would guess you are trying to create an HTML table to display the records. $Row = The results returned from. mysql_fetch_array(). $Total = count($Row); $TotalInEachRow = round(($Total/3)); if (($TotalInEachRow * 3) < $Total) { $TotalInEachRow ++; // Planning for the Remainder items. } $HTML = ""; // HTML string that holds the table $ColumnCount = 0; // For knowing the Number of Columns. for ($C=0; $C<$Total; $C++) { if ($ColumnCount == 0) { $HTML .= ""; } $HTML .= "".$Row[$C]["DatabaseFeildName"]."": $ColumnCount ++; if ($ColumnCount == 3) { $HTML .""; $ColumnCount = 0; } } if ($ColumnCount > 0) { for ($C=$ColumnCount; $C<=3; $C++) { $HTML .= " "; } $HTML .= ""; } $HTML .= "": That should do it for you. I typed this code directly into the email so be forwarned about copy and pasting it. Hope this helped. Jonathan Pitcher On Monday, March 3, 2003, at 08:58 AM, Awlad Hussain wrote: I have a mysql table containing about 100 record, alphabetically ordered. How would i display them in browser in a 3 columns, doesn't matter how long the rows is as the number of records will grow in the database table. the records should be in alphabetically order, for example: aaa bbbaccca aab cccb aac bbbc aad bbbdcccd any idea anyone? 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 General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP on IIS session problems
> I get these errors from a simple "session_start();" script. > > Warning: session_start() [function.session-start]: > open(/tmp\sess_f4aa3ef3c537bb6327d5e7b991e91be7, O_RDWR) failed: No such > file or directory (2) in c:\inetpub\wwwroot\picoblog\admin.php on line 2 Do you have a /tmp folder on your computer? Probably not, so that's why PHP is throwing a warning, because it can't write to a directory that doesn't exist. > Warning: session_start() [function.session-start]: Cannot send session > cookie - headers already sent by (output started at > c:\inetpub\wwwroot\picoblog\admin.php:2) in > c:\inetpub\wwwroot\picoblog\admin.php on line 2 > > Warning: session_start() [function.session-start]: Cannot send session cache > limiter - headers already sent (output started at > c:\inetpub\wwwroot\picoblog\admin.php:2) in > c:\inetpub\wwwroot\picoblog\admin.php on line 2 These are just by-products of the first error. Set your session.save_path setting in php.ini to a folder that IIS can write to. ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Restate: using php to rotate ad banners
> > The other problem is that if I open two browser > > windows to your site, one after the other, and see > > two banners, and then click on the first one, am > > I going to go to the site for the second one? > > Yes, that is one of the main problems. Would using > sessions help end this? No, since sessions is usually just a cookie that points to somewhere with more data... The easiest thing would be to use PHP to dynamically re-write the page so both the image and link reference the same "thing". You can use an iframe to do this pretty easily... good luck. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] File array mailing list pharse error
> I worked on it so long now I have to come back to you > it gives me an Parse error: > Parse error: parse error, expecting `'('' in members_read_send.php on line > 5 > > Iam so sorry to bug u so much but can u help me finish here please? > > $lines = file(data/default2.users); > for each ($lines as $line) foreach() is all one word... > { > list ($User, $UserN, $Pass, $Date, $Realf, $RealL, $Email, $Street, > $City, $State, $Postal, $Country, $Phone, $Webaddress, $ex1, $ex2, $ex3, > $ex4, $ex53, $ex7 ) = explode("|", $buffer); > > $myname = "browseabit"; > $myemail = "[EMAIL PROTECTED]"; > $myreplyemail = "[EMAIL PROTECTED]"; > $contactname = "$Realf"; > $contactemail = "$Email"; > > $message = " message here "; > $subject = "Subject here"; > $headers .= "MIME-Version: 1.0\r\n"; and change this to $headers = "MIME-Version: 1.0\r\n"; > $headers .= "Content-type: text/html; charset=iso-8859-1\r\n"; > $headers .= "From: ".$myname." <".$myemail.">\r\n"; > $headers .= "To: ".$contactname." <".$contactemail.">\r\n"; > $headers .= "Reply-To: ".$myname." <$myreplyemail>\r\n"; > $headers .= "X-Priority: 1\r\n"; > $headers .= "X-MSMail-Priority: High\r\n"; > $headers .= "X-Mailer: browseabit"; > > mail($contactemail, $subject, $message, $headers); > > echo "Memmber $Realf > $RealL from $City $State $Country is been notified... "; > } > > ?> ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] MySQL, Apache, SELECT, UPDATE etc. 2
Hello, In addition to my previous message the following: I have developed a PHP application on a Windows machine with a MySQL server database. However, it was meant for a Linux server running Apache, where it runs now. After checking with the server administrator it turns out that pages with SELECT statements are executed normally, while UPDATE, DELETE and INSERT statements are ignored. Contrarily to my previous message on this problem, it is not a cache problem or anything like that: the server simply doesn't accept UPDATE, DELETE and INSERT statements, though the server administrator assures me to have given the right permissions on the database. Is there anybody who can tell me what is wrong here? Kind regards, FRANS BAKKER -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] XML Question
Sorry, but I am unaware of this function. It is not a native function to php, maybe it is a custom function that is part of a library that you are using. You would have to contact them for documentation on thier functions. - Original Message - From: "Diana Castillo" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, March 03, 2003 10:06 AM Subject: [PHP] XML Question > > what does "harvest" mean? what would the function "harvest" do? > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Automatic Table Creation
The easiest way would be nested tables. Your three "columns" would each have a nested table within them where you loop through 1/3 of the results. Some simple math functions and the result of mysql_num_results() should tell you how many to loop through in each table. aaab bbba ccca cccb ---John Holmes... - Original Message - From: "Awlad Hussain" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, March 03, 2003 9:58 AM Subject: [PHP] Automatic Table Creation I have a mysql table containing about 100 record, alphabetically ordered. How would i display them in browser in a 3 columns, doesn't matter how long the rows is as the number of records will grow in the database table. the records should be in alphabetically order, for example: aaa bbbaccca aab cccb aac bbbc aad bbbdcccd any idea anyone? 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 General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Automatic Table Creation
Thanks Jonathan, I'll have a go with your codes. Thanks very much awlad - Original Message - From: "Jonathan Pitcher" <[EMAIL PROTECTED]> To: "Awlad Hussain" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Monday, March 03, 2003 4:17 PM Subject: Re: [PHP] Automatic Table Creation > Awlad, > > I would guess you are trying to create an HTML table to display the > records. > > $Row = The results returned from. mysql_fetch_array(). > > $Total = count($Row); > > $TotalInEachRow = round(($Total/3)); > > if (($TotalInEachRow * 3) < $Total) { > $TotalInEachRow ++; // Planning for the Remainder items. > } > > $HTML = ""; // HTML string that holds the table > > $ColumnCount = 0; // For knowing the Number of Columns. > > for ($C=0; $C<$Total; $C++) { > if ($ColumnCount == 0) { > $HTML .= ""; > } > $HTML .= "".$Row[$C]["DatabaseFeildName"]."": > $ColumnCount ++; > if ($ColumnCount == 3) { > $HTML .""; > $ColumnCount = 0; > } > } > > if ($ColumnCount > 0) { > for ($C=$ColumnCount; $C<=3; $C++) { > $HTML .= " "; > } > $HTML .= ""; > } > > $HTML .= "": > > That should do it for you. I typed this code directly into the email so > be forwarned about copy and pasting it. > > Hope this helped. > > Jonathan Pitcher > > > On Monday, March 3, 2003, at 08:58 AM, Awlad Hussain wrote: > > > I have a mysql table containing about 100 record, alphabetically > > ordered. > > > > How would i display them in browser in a 3 columns, doesn't matter how > > long the rows is as the number of records will grow in the database > > table. > > > > the records should be in alphabetically order, for example: > > > > aaa bbbaccca > > aab cccb > > aac bbbc > > aad bbbdcccd > > > > any idea anyone? > > > > 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 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] Session variable under PHP 4.0.6
Hi All, I'm having a problem with session variables under PHP 4.0.6 on a secure server. I ran phpinfo and have attached the resulting page after the main body of this message. My test code looks like this Filename: index.php Page Start -- click here to go to the next page Page End -- Next file Filename: index2.php Page Start -- Page End -- Suffice to say it doesn't work. The first page displays "click here to go to the next page" as expected. However clicking on the link takes you to index2.php and the following is displayed: "Array ( ) --><--" Namely that the session variable called "variable" is not set in the session. I have run the exact same code on a machine running PHP 4.2.3 (non secure servers) and it works perfectly! And outputs: "Array ( [variable] => the variables value ) -->the variables value<--" Exactly as required!! I hope that you can help, since I am getting frustrated after 4 days trying to fix this problem. Henry -- Sorry about the formating but this is what I got from phpinfo from the machine PHP Version 4.0.6 Build Date Oct 7 2001 Configure Command './configure' '--with-mysql' '--with-apxs=/usr/sbin/apxs' '--enable-track-vars' '--with-config-file-path=/etc' '--enable-magic-quotes' '--enable-apc=shared' '--with-xml' '--enable-trans-sid' '--with-pgsql' '--with-zlib' Server API Apache Virtual Directory Support disabled Configuration File (php.ini) Path /etc/php.ini ZEND_DEBUG disabled Thread Safety disabled This program makes use of the Zend scripting language engine: Zend Engine v1.0.6, Copyright (c) 1998-2001 Zend Technologies with Zend Optimizer v1.1.0, Copyright (c) 1998-2000, by Zend Technologies PHP 4.0 Credits Configuration PHP Core Directive Local Value Master Value allow_call_time_pass_reference On On allow_url_fopen 1 1 arg_separator.input & & arg_separator.output & & asp_tags Off Off auto_append_file no value no value auto_prepend_file no value no value browscap no value no value default_charset no value no value default_mimetype text/html text/html define_syslog_variables Off Off disable_functions no value no value display_errors On On display_startup_errors Off Off doc_root no value no value enable_dl On On error_append_string no value no value error_log no value no value error_prepend_string no value no value error_reporting 2039 2039 expose_php On On extension_dir ./ ./ file_uploads 1 1 gpc_order GPC GPC highlight.bg #FF #FF highlight.comment #FF9900 #FF9900 highlight.default #CC #CC highlight.html #00 #00 highlight.keyword #006600 #006600 highlight.string #CC #CC html_errors On On ignore_user_abort Off Off implicit_flush Off Off include_path .:/usr/local/lib/php .:/usr/local/lib/php log_errors Off Off magic_quotes_gpc On On magic_quotes_runtime Off Off magic_quotes_sybase Off Off max_execution_time 30 30 open_basedir no value no value output_buffering Off Off output_handler no value no value post_max_size 8M 8M precision 14 14 register_argc_argv On On register_globals On On safe_mode Off Off safe_mode_exec_dir no value no value sendmail_from [EMAIL PROTECTED] [EMAIL PROTECTED] sendmail_path /usr/sbin/sendmail -t -i /usr/sbin/sendmail -t -i short_open_tag On On SMTP localhost localhost sql.safe_mode Off Off track_errors Off Off upload_max_filesize 2M 2M upload_tmp_dir no value no value user_dir no value no value variables_order EGPCS EGPCS y2k_compliance Off Off xml XML Support active standard Regex Library Bundled library enabled Dynamic Library Support enabled Path to sendmail /usr/sbin/sendmail -t -i Directive Local Value Master Value assert.active 1 1 assert.bail 0 0 assert.callback no value no value assert.quiet_eval 0 0 assert.warning 1 1 safe_mode_allowed_env_vars PHP_ PHP_ safe_mode_protected_env_vars LD_LIBRARY_PATH LD_LIBRARY_PATH session.use_trans_sid 1 1 url_rewriter.tags a=href,area=href,frame=src,input=src,form=fakeentry a=href,area=href,frame=src,input=src,form=fakeentry session Session Support enabled Directive Local Value Master Value session.auto_start Off Off session.cache_expire 180 180 session.cache_limiter nocache nocache session.cookie_domain no value no value session.cookie_lifetime 0 0 session.cookie_path / / session.cookie_secure Off Off session.entropy_file no value no value session.entropy_length 0 0 session.gc_maxlifetime 1440 1440 session.gc_probability 1 1 session.name PHPSESSID PHPSESSID session.referer_check no value no value session.save_handler files files session.save_path /tmp /tmp session.serialize_handler php php session.use_cookies On On posix Revision $Revision: 1
RE: [PHP] Session variable under PHP 4.0.6
In the first file, replace this line: $HTTP_SESSION_VARS['variable']="the variables value"; with these two lines: $variable = "the variables value"; session_register('variable'); This is because 'register_globals' is enabled in the php.ini file. Kirk > -Original Message- > From: Henry Grech-Cini [mailto:[EMAIL PROTECTED] > Sent: Monday, March 03, 2003 9:34 AM > To: [EMAIL PROTECTED] > Subject: [PHP] Session variable under PHP 4.0.6 > > > Hi All, > > I'm having a problem with session variables under PHP 4.0.6 > on a secure > server. I ran phpinfo and have attached the resulting page > after the main > body of this message. > > My test code looks like this > > Filename: index.php > > Page Start -- > > session_start(); > > $HTTP_SESSION_VARS['variable']="the variables value"; > > ?> > click here to go to the next page > > Page End -- > > > Next file > Filename: index2.php > > Page Start -- > > session_start(); > > print_r($HTTP_SESSION_VARS); > > echo "-->".$HTTP_SESSION_VARS['variable']."<--"; > ?> > > Page End -- > > > Suffice to say it doesn't work. The first page displays > > "click here to go to the next page" > > > as expected. However clicking on the link takes you to > index2.php and the > following is displayed: > > > "Array ( ) --><--" > > > Namely that the session variable called "variable" is not set in the > session. > > > I have run the exact same code on a machine running PHP 4.2.3 > (non secure > servers) and it works perfectly! And outputs: > > "Array ( [variable] => the variables value ) -->the variables > value<--" -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] [ANN] TemplateTamer 1.0.3 released
Hello, After several months of beta, TemplateTamer 1.0 has been released, and it can be downloaded from the TemplateTamer web site: http://www.templatetamer.com/ rush -- http://www.templatetamer.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP & Oracle
> i have one big Oracle database, 20GB. Is it better to comunicate > directly to Oracle with PHP, or to export data to MySQL. How secure is > PHP & Oracle, can they communicate well? Why would you send it to MySQL? Just get PHP and Oracle talking and go with that. ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] PHP on IIS session problems
Ok, thanks guys for your help, I sort of figured that's the problem, but I didn't want to touch the ini settings without being sure, and getting some advice from people that know. Thanks again, great help. I made the changes, now how do I restart php? So the changes are used? - Vic -Original Message- From: 1LT John W. Holmes [mailto:[EMAIL PROTECTED] Sent: Monday, March 03, 2003 10:23 AM To: Victor Stan; [EMAIL PROTECTED] Subject: Re: [PHP] PHP on IIS session problems > I get these errors from a simple "session_start();" script. > > Warning: session_start() [function.session-start]: > open(/tmp\sess_f4aa3ef3c537bb6327d5e7b991e91be7, O_RDWR) failed: No such > file or directory (2) in c:\inetpub\wwwroot\picoblog\admin.php on line 2 Do you have a /tmp folder on your computer? Probably not, so that's why PHP is throwing a warning, because it can't write to a directory that doesn't exist. > Warning: session_start() [function.session-start]: Cannot send session > cookie - headers already sent by (output started at > c:\inetpub\wwwroot\picoblog\admin.php:2) in > c:\inetpub\wwwroot\picoblog\admin.php on line 2 > > Warning: session_start() [function.session-start]: Cannot send session cache > limiter - headers already sent (output started at > c:\inetpub\wwwroot\picoblog\admin.php:2) in > c:\inetpub\wwwroot\picoblog\admin.php on line 2 These are just by-products of the first error. Set your session.save_path setting in php.ini to a folder that IIS can write to. ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Phpadsnew?
Has anyone else had problems with this app opening tons of processes and never closing them? -- Mike Yrabedra President 323, Inc. Home of The MacDock and The MacSurfshop [http://macdock.com] : [http://macsurfshop.com] VOICE: 770.382.1195 iChat/AIM: ichatmacdock ___ "Whatever you do, work at it with all your heart, as working for the Lord, not for men." ~Colossians 3:23 <{{{>< -- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP on IIS session problems
You need to restart IIS. c:\> net stop iisadmin c:\> net start w3svc or use the control panel. ---John Holmes... - Original Message - From: "Victor Stan" <[EMAIL PROTECTED]> To: "1LT John W. Holmes" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Monday, March 03, 2003 12:54 PM Subject: RE: [PHP] PHP on IIS session problems > Ok, thanks guys for your help, I sort of figured that's the problem, but I > didn't want to touch the ini settings without being sure, and getting some > advice from people that know. Thanks again, great help. > > I made the changes, now how do I restart php? So the changes are used? > > - Vic > > -Original Message- > From: 1LT John W. Holmes [mailto:[EMAIL PROTECTED] > Sent: Monday, March 03, 2003 10:23 AM > To: Victor Stan; [EMAIL PROTECTED] > Subject: Re: [PHP] PHP on IIS session problems > > > I get these errors from a simple "session_start();" script. > > > > Warning: session_start() [function.session-start]: > > open(/tmp\sess_f4aa3ef3c537bb6327d5e7b991e91be7, O_RDWR) failed: No such > > file or directory (2) in c:\inetpub\wwwroot\picoblog\admin.php on line 2 > > Do you have a /tmp folder on your computer? Probably not, so that's why PHP > is throwing a warning, because it can't write to a directory that doesn't > exist. > > > Warning: session_start() [function.session-start]: Cannot send session > > cookie - headers already sent by (output started at > > c:\inetpub\wwwroot\picoblog\admin.php:2) in > > c:\inetpub\wwwroot\picoblog\admin.php on line 2 > > > > Warning: session_start() [function.session-start]: Cannot send session > cache > > limiter - headers already sent (output started at > > c:\inetpub\wwwroot\picoblog\admin.php:2) in > > c:\inetpub\wwwroot\picoblog\admin.php on line 2 > > These are just by-products of the first error. > > Set your session.save_path setting in php.ini to a folder that IIS can write > to. > > ---John Holmes... > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] changing colors on buttons
is there a way you can change the text color on buttons as well as the background color for a button? i have a button that looks like: so is there a way to change text color and background color for that? or is it better to use and do it that way... my client wants light blue buttons with dark blue text on them but we need "real buttons" if you really want to call them that..not images that act like buttons... tnx --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.458 / Virus Database: 257 - Release Date: 2/24/2003 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] where do you recommend I put useful code for people to use?
Hi All, I've written some javascript that serializes javascript variables so that they can be sent to PHP and unserialized there. Is this silly thing to have done? i.e. is it already done or superfluous for some reason? Or, if it is not, where would I put the code to share it with others. Thing is that although its meant for use with PHP it is javascript so I'm not sure where to post it. Henry -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] changing colors on buttons
Use CSS: input { color: Navy; background: LightBlue; } (I'm writing from memory, but the essence is that.) ((HTH)) -- Un gran saludo/Big regards... Arturo Barajas, IT/Systems PPG MX (SJDR) (427) 271-9918, x448 > -Original Message- > From: Sunfire [mailto:[EMAIL PROTECTED] > Sent: Lunes, 03 de Marzo de 2003 11:13 a.m. > To: [EMAIL PROTECTED] > Subject: [PHP] changing colors on buttons > > > is there a way you can change the text color on buttons as well as the > background color for a button? i have a button that looks like: > onclick="window.location='edit.php';" > onkeypress="window.location='edit.php'"> > so is there a way to change text color and background color > for that? or is > it better to use and do it that way... > my client wants light blue buttons with dark blue text on > them but we need > "real buttons" if you really want to call them that..not > images that act > like buttons... > > tnx > > > > --- > Outgoing mail is certified Virus Free. > Checked by AVG anti-virus system (http://www.grisoft.com). > Version: 6.0.458 / Virus Database: 257 - Release Date: 2/24/2003 > > > -- > 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] changing colors on buttons
At 18:13 3-3-03, you wrote: is there a way you can change the text color on buttons as well as the background color for a button? you do that by making a css style for the button, plenty of examples on the net, if you can figure it out from a german site try http://www.webmatze.de/webdesign/css/buttontricks.htm, (nice examples) if not do you own search. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] changing colors on buttons
> is there a way you can change the text color on buttons as well as the > background color for a button? i have a button that looks like: > onclick="window.location='edit.php';" > onkeypress="window.location='edit.php'"> > so is there a way to change text color and background color for that? or is > it better to use and do it that way... > my client wants light blue buttons with dark blue text on them but we need > "real buttons" if you really want to call them that..not images that act > like buttons... Yes, it's possible. Search google for CSS, this has nothing to do with PHP. ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] post xml
Dear Sirs, I am trying to post xml file to http address but no result. I saw your script at the below but I can not understand How can send file? Can you help Best Regards "Mincu Alexandru" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > yes you can connect to the server from your PHP script and send a post > request .. here is a function that would help: > > --- PHP -- > > function http_post($server, $port, $url, $vars) { > // example: > // http_post( > // "www.fat.com", > // 80, > // "/weightloss.pl", > // array("name" => "obese bob", "age" => "20") > // ); > > $urlencoded = ""; > while (list($key,$value) = each($vars)) > $urlencoded.= urlencode($key) . "=" . urlencode($value) . "&"; > $urlencoded = substr($urlencoded,0,-1); > $content_length = strlen($urlencoded); > $headers = "POST $url HTTP/1.1 > Accept: text/plain, text/html, text/xml, image/gif, image/jpeg, > image/png, image/bmp > Accept-Charset: UTF-8 > Accept-Language: en > Content-Length: $content_length > Cache-Control: no-cache > Content-Type: application/x-www-form-urlencoded > Host: $server > User-Agent: Panasonic-GAD67/1.0 UP.Browser/5.0.3.5 (GUI) > Connection: Keep-Alive > > "; > $fp = fsockopen($server, $port, $errno, $errstr); > if (!$fp) { > return false; > } > fputs($fp, $headers); > fputs($fp, $urlencoded); > > $ret = ""; > while (!feof($fp)) > $ret.= fgets($fp, 1024); > fclose($fp); > return $ret; > } > > --- /PHP --- > > You can change the headers if you like ... > > Hope it helps. > -- > Mincu Alexandru intelinet.ro > Tel:+4 0745 369719 +4 021 3140021 > www.intelinet.ro [EMAIL PROTECTED] > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Still no luck running a PHPCLI script from CRON
Ok, by looking at my cron logs it looks like cron is trying to run my PHP CLI script. However, it is not running it. I only have one line of code that isn't commented out and the line simply sends me an email using the PHP mail() function. Tom suggested that maybe the script is running, but cron may simply not be able to send email VIA the PHP function. I am not sure whether or not this may be true, all I know is that I can't run any PHP script from cron. The only reason I am trying to have cron send me an email is to check to see if cron was running my PHP script. My script is for batch order processing and it hasn't been processing my orders. After immediately realizing this I added the mail() function to see if the script was running. I got no email. I then eliminated the script down to just the mail() function be commenting out my batch order processing code. It still didn't run. Here is my cron log: Mar 3 09:05:00 prod /usr/sbin/cron[3124]: (user) CMD (/path/to/cron_script.file) Mar 3 09:06:00 prod /usr/sbin/cron[3134]: (user) CMD (/path/to/cron_script.file) Mar 3 09:07:00 prod /usr/sbin/cron[3141]: (user) CMD (/path/to/cron_script.file) Mar 3 09:08:00 prod /usr/sbin/cron[3148]: (user) CMD (/path/to/cron_script.file) I have tried running this as "user" and as "root". I get the same results with both. Again, my PHP script runs fine if I run it by hand from the command line via ./cron_script.file Anymore help on this issue would be greatly appreciated. Thanks again XXX Hi, Monday, March 3, 2003, 2:54:47 PM, you wrote: JMC> Tom, JMC> Did you run the script from cron? If so, what operating system are you JMC> using? Putting PHP info in my script won't do me any good since cron JMC> won't run it. The trouble is that cron does nothing. When I run the JMC> email script I get no mail. If I run the script from the command line JMC> by hand ./script_name etc it works fine. JMC> Any other ideas would be great. JMC> Thanks JMC> JMC> X JMC> Hi, JMC> Monday, March 3, 2003, 6:33:46 AM, you wrote: JMC>> Does anyone have a PHP CLI script running from cron? JMC>> If so I would greatly appreciate any assistance. Below is JMC> everything JMC>> from this on going problem. It seems none has an answer so far. JMC>> Please help. JMC>> JMC> XXX JMC>> I tried to run the script directly from cron like: JMC>> * * * * * /usr/local/bin/php -q /path/to/cron/script/file_name JMC>> I also tried to run cron in the bash environment by writing a bash JMC>> script that calls my PHP script. I set cron you call the bash JMC> script JMC>> every minute. The bash script contained the following information: JMC>> START SCRIPT JMC>> = JMC>> #!/usr/local/bin/bash JMC>> /path/to/PHP/script/file_name JMC>> = END SCRIPT JMC>> == JMC>> If I run the bash script from the command line it definitely runs JMC> my PHP JMC>> script. I know this because my PHP script sends me an email. JMC>> Also, if I run my PHP script from the command line it also runs JMC> fine and JMC>> I receive an email. However, anytime I try to run PHP script or JMC> the JMC>> bash script from cron nothing happens. I get no emails. I also JMC> know JMC>> cron is working properly because a regular bash script as I listed JMC> in my JMC>> earlier posting works fine. JMC>> This is using the new CLI that come with PHP 4.3 I have in past JMC> versions JMC>> of used the CGI from cron with no problems at all. As a matter of JMC> fact JMC>> I have another server that does all its maintenance via PHP scripts JMC> that JMC>> get ran by cron JMC>> Here is the PHP CLI cron script I am testing to see if cron will JMC> run my JMC>> PHP JMC>> START SCRIPT JMC>> = JMC>> #!/usr/local/bin/php -q JMC>> > mail("[EMAIL PROTECTED]","Message From cron",date("F j, Y @ h:i JMC> a")); ?>>> JMC>> = END SCRIPT JMC>> == JMC>> Any more suggestions would be greatly appreciated. JMC>> Justin JMC>> -Original Message- JMC>> From: CodersNightMare [mailto:[EMAIL PROTECTED] JMC>> Sent: Friday, February 28, 2003 10:32 AM JMC>> To: [EMAIL PROTECTED] JMC>> Subject: RE: [PHP] Can't run PHP cli script from Cron JMC>> I am sure you have tried this, but, JMC>> Do you call the full path to php for cron. JMC>> something like: JMC>> 40 * * * * /usr/local/bin/php -q /home/user/phpcliscript JMC>> Hope this helps. JMC>> At 10:10 AM 2/28/2003 -0800, you wrote: >>>The path is >>> >>>#!/usr/local/bin/php -q >>> >>>But like I said, that can't be the problem because when I run it from >>>the command line, it run
[PHP] Problems posting
When I post something here, it first appears several hours later. How can it be so? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Problems posting
Did you send this post at 17:17 and did it arrive at 17:22? "Niels Andersen" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > When I post something here, it first appears several hours later. How can it > be so? > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] PHP on IIS session problems
K, thanks, I tried stopping just the web sites from the control panel, but I guess I had to stop the whole thing and restart. - Vic -Original Message- From: 1LT John W. Holmes [mailto:[EMAIL PROTECTED] Sent: Monday, March 03, 2003 11:07 AM To: Victor Stan; [EMAIL PROTECTED] Subject: Re: [PHP] PHP on IIS session problems You need to restart IIS. c:\> net stop iisadmin c:\> net start w3svc or use the control panel. ---John Holmes... - Original Message - From: "Victor Stan" <[EMAIL PROTECTED]> To: "1LT John W. Holmes" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Monday, March 03, 2003 12:54 PM Subject: RE: [PHP] PHP on IIS session problems > Ok, thanks guys for your help, I sort of figured that's the problem, but I > didn't want to touch the ini settings without being sure, and getting some > advice from people that know. Thanks again, great help. > > I made the changes, now how do I restart php? So the changes are used? > > - Vic > > -Original Message- > From: 1LT John W. Holmes [mailto:[EMAIL PROTECTED] > Sent: Monday, March 03, 2003 10:23 AM > To: Victor Stan; [EMAIL PROTECTED] > Subject: Re: [PHP] PHP on IIS session problems > > > I get these errors from a simple "session_start();" script. > > > > Warning: session_start() [function.session-start]: > > open(/tmp\sess_f4aa3ef3c537bb6327d5e7b991e91be7, O_RDWR) failed: No such > > file or directory (2) in c:\inetpub\wwwroot\picoblog\admin.php on line 2 > > Do you have a /tmp folder on your computer? Probably not, so that's why PHP > is throwing a warning, because it can't write to a directory that doesn't > exist. > > > Warning: session_start() [function.session-start]: Cannot send session > > cookie - headers already sent by (output started at > > c:\inetpub\wwwroot\picoblog\admin.php:2) in > > c:\inetpub\wwwroot\picoblog\admin.php on line 2 > > > > Warning: session_start() [function.session-start]: Cannot send session > cache > > limiter - headers already sent (output started at > > c:\inetpub\wwwroot\picoblog\admin.php:2) in > > c:\inetpub\wwwroot\picoblog\admin.php on line 2 > > These are just by-products of the first error. > > Set your session.save_path setting in php.ini to a folder that IIS can write > to. > > ---John Holmes... > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php __ Post your free ad now! http://personals.yahoo.ca -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] MySQL
Thanks Larry, What are some of the more active MySQL lists? Do you have a URL or two? Thanks, Dan -Original Message- From: Larry E. Ullman [mailto:[EMAIL PROTECTED] Sent: Monday, March 03, 2003 9:52 AM To: Dan Sabo Cc: [EMAIL PROTECTED] Subject: Re: [PHP] MySQL > This is OT, I'm considering buying the MySQL, Second Edition Paul > DuBois > book. I'm using MySQL 3.23. Should I be buying the first edition > DuBois > book instead or does BuBois cover both 3 and 4 in the second edition? > Is > there a huge difference between 3 and 4? Here's a URL for the second edition: http://www.kitebird.com/mysql-book/ It discusses what's new in this edition. Paul DuBois is also very active on the MySQL mailing lists so your question would probably get a more detailed answer there. Also, in all likelihood, the first edition may not even be available anymore. Larry -- 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] Still no luck running a PHPCLI script from CRON
> Ok, by looking at my cron logs it looks like cron is trying to run my > PHP CLI script. However, it is not running it. I only have one line of > code that isn't commented out and the line simply sends me an email > using the PHP mail() function. One thing to keep in mind when working with crontab is environmental variables. As in, Cron has none. You have to set any you want in your crontab, or your called scripts. For example, use full paths. You shouldnt have to call a shell before calling the php cli. Here is an example script for you to test. My php binary is in /usr/local/bin/php, my script is /usr/local/crontab-scripts/wibble.php and the file I am writing to is in /tmp/wibble.output This is what wibble looks like [chmoded to 755, owned by the user of the crontab]: #!/usr/local/bin/php -q and the crontab line I have is: * * * * /usr/local/contab-scripts/wibble.php and you can see the output of it running every minute: tail -f /tmp/wibble.output Works fine for me ... try it -- Dan Hardiker [EMAIL PROTECTED] ADAM Software & Systems Engineer First Creative -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Session variable under PHP 4.0.6
Thanks that works in my testing example. But why? The manual says: Caution If you are using $_SESSION (or $HTTP_SESSION_VARS), do not use session_register(), session_is_registered() and session_unregister(). But in index2.php I am using $HTTP_SESSION_VARS and it works?! Need a bit of clarification since my actual app still doesn't work! Henry "Kirk Johnson" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > In the first file, replace this line: > > $HTTP_SESSION_VARS['variable']="the variables value"; > > with these two lines: > > $variable = "the variables value"; > session_register('variable'); > > This is because 'register_globals' is enabled in the php.ini file. > > Kirk > > > -Original Message- > > From: Henry Grech-Cini [mailto:[EMAIL PROTECTED] > > Sent: Monday, March 03, 2003 9:34 AM > > To: [EMAIL PROTECTED] > > Subject: [PHP] Session variable under PHP 4.0.6 > > > > > > Hi All, > > > > I'm having a problem with session variables under PHP 4.0.6 > > on a secure > > server. I ran phpinfo and have attached the resulting page > > after the main > > body of this message. > > > > My test code looks like this > > > > Filename: index.php > > > > Page Start -- > > > > > session_start(); > > > > $HTTP_SESSION_VARS['variable']="the variables value"; > > > > ?> > > click here to go to the next page > > > > Page End -- > > > > > > Next file > > Filename: index2.php > > > > Page Start -- > > > > > session_start(); > > > > print_r($HTTP_SESSION_VARS); > > > > echo "-->".$HTTP_SESSION_VARS['variable']."<--"; > > ?> > > > > Page End -- > > > > > > Suffice to say it doesn't work. The first page displays > > > > "click here to go to the next page" > > > > > > as expected. However clicking on the link takes you to > > index2.php and the > > following is displayed: > > > > > > "Array ( ) --><--" > > > > > > Namely that the session variable called "variable" is not set in the > > session. > > > > > > I have run the exact same code on a machine running PHP 4.2.3 > > (non secure > > servers) and it works perfectly! And outputs: > > > > "Array ( [variable] => the variables value ) -->the variables > > value<--" -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] MySQL
What are some of the more active MySQL lists? Do you have a URL or two? http://www.mysql.com/documentation/lists.html -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] xml file posting
Dear Sirs, I am trying to post xml file to http address but I mixed up all. Any source to read this item. I can not realize that shoul I write the file on the server before or I can send without writing. Best Regards -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] post xml file
Dear Sirs, I am trying to post a xml file to following http. But I can not. where can I find some source to read. https://xxx.xxx.xxx.xx/servlet/com.oks.buing.xml.detdrd Any help welcome -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP shopping carts
Hi, What I'm looking for is either an open source or commercial solution which is supported by either commercial or OS add on modules. I've looked at OS commerce and X cart so far, wanted to look at a few more. I'm hoping to find one which has a hotel booking or reservation system either as a standard or as an add on mod, and am doing some comparisons. Thanks, Dan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] News Content
Anyone know of any pre-built modules or whatnot that provide some news content and/or links and captions via PHP/MySQL that can be integrated with minimal disruption to a site? (A prerequisite being that it acts legally in terms of gathering the info. ;) Thank you, Jason _ Add photos to your messages with MSN 8. Get 2 months FREE*. http://join.msn.com/?page=features/featuredemail -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Session variable under PHP 4.0.6
That Caution message is not the full story, read some more on "register_globals". If register_globals is "On" in php.ini, then do the following: - use session_register() to create your session variables; - use the global variable to access the variable, not the $HTTP_SESSION_VARS array. Example: $myVar = 'test'; session_register('myVar'); $myVar = 'some new value'; print $myVar; Note: the value of $myVar is what is stored to the session at the end of the script. And, since it is stored after the script ends, its value is not available via $HTTP_SESSION_VARS[] until the next page. If register_globals is "Off" in php.ini, then do the following: - do not use session_register(), etc. - use $HTTP_SESSION_VARS for all accesses. Example: $HTTP_SESSION_VARS['myVar'] = 'test'; $HTTP_SESSION_VARS['myVar'] = 'some new value'; print $HTTP_SESSION_VARS['myVar']; Kirk > -Original Message- > From: Henry Grech-Cini [mailto:[EMAIL PROTECTED] > Sent: Monday, March 03, 2003 10:29 AM > To: [EMAIL PROTECTED] > Subject: Re: [PHP] Session variable under PHP 4.0.6 > > > Thanks that works in my testing example. But why? The manual says: > > Caution > If you are using $_SESSION (or $HTTP_SESSION_VARS), do not use > session_register(), session_is_registered() and session_unregister(). > > But in index2.php I am using $HTTP_SESSION_VARS and it works?! > > Need a bit of clarification since my actual app still doesn't work! > > Henry > > "Kirk Johnson" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > > In the first file, replace this line: > > > > $HTTP_SESSION_VARS['variable']="the variables value"; > > > > with these two lines: > > > > $variable = "the variables value"; > > session_register('variable'); > > > > This is because 'register_globals' is enabled in the php.ini file. > > > > Kirk > > > > > -Original Message- > > > From: Henry Grech-Cini [mailto:[EMAIL PROTECTED] > > > Sent: Monday, March 03, 2003 9:34 AM > > > To: [EMAIL PROTECTED] > > > Subject: [PHP] Session variable under PHP 4.0.6 > > > > > > > > > Hi All, > > > > > > I'm having a problem with session variables under PHP 4.0.6 > > > on a secure > > > server. I ran phpinfo and have attached the resulting page > > > after the main > > > body of this message. > > > > > > My test code looks like this > > > > > > Filename: index.php > > > > > > Page Start -- > > > > > > > > session_start(); > > > > > > $HTTP_SESSION_VARS['variable']="the variables value"; > > > > > > ?> > > > click here to go to the next page > > > > > > Page End -- > > > > > > > > > Next file > > > Filename: index2.php > > > > > > Page Start -- > > > > > > > > session_start(); > > > > > > print_r($HTTP_SESSION_VARS); > > > > > > echo "-->".$HTTP_SESSION_VARS['variable']."<--"; > > > ?> > > > > > > Page End -- > > > > > > > > > Suffice to say it doesn't work. The first page displays > > > > > > "click here to go to the next page" > > > > > > > > > as expected. However clicking on the link takes you to > > > index2.php and the > > > following is displayed: > > > > > > > > > "Array ( ) --><--" > > > > > > > > > Namely that the session variable called "variable" is not > set in the > > > session. > > > > > > > > > I have run the exact same code on a machine running PHP 4.2.3 > > > (non secure > > > servers) and it works perfectly! And outputs: > > > > > > "Array ( [variable] => the variables value ) -->the variables > > > value<--" > > > > -- > 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] Keeping existing data in textarea's
Hi, I have a developed a simple Helpdesk for our small company. When users log calls they get an alert message warning them that they must fill in all the fields if they have missed a field. At the moment if they happen to forget a field, they receive the alert message, but then have to start all over again. How do I keep the existing data in the textareas from dissapearing after the alert message? Mirco -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Keeping existing data in textarea's
Mirco, What I do is (in a JavaScript function): window.location = "?"; and then populate the fields this way: or HTH -- Un gran saludo/Big regards... Arturo Barajas, IT/Systems PPG MX (SJDR) (427) 271-9918, x448 > -Original Message- > From: Mirco Ellis [mailto:[EMAIL PROTECTED] > Sent: Lunes, 03 de Marzo de 2003 12:30 p.m. > To: Php-General (E-mail) > Subject: [PHP] Keeping existing data in textarea's > > > Hi, I have a developed a simple Helpdesk for our small > company. When users > log calls they get an alert message warning them that they > must fill in all > the fields if they have missed a field. At the moment if they > happen to > forget a field, they receive the alert message, but then have > to start all > over again. How do I keep the existing data in the textareas from > dissapearing after the alert message? > > Mirco > > > > > > -- > 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] Keeping existing data in textarea's
On Mon, 3 Mar 2003, Mirco Ellis wrote: >Hi, I have a developed a simple Helpdesk for our small company. When users >log calls they get an alert message warning them that they must fill in all >the fields if they have missed a field. At the moment if they happen to >forget a field, they receive the alert message, but then have to start all >over again. How do I keep the existing data in the textareas from >dissapearing after the alert message? $fill = isset($_GET['textareafield']) ? $_GET['textareafield'] : ""; $html = <<$fill EOF; -- Greg Donald http://destiney.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Keeping existing data in textarea's
It is really easy to stop Javascript from going to the next page. To pop open the alert box I am assuming you call a javascript function. Usually you would do onclick="VerifyForm(this.form)" but by changing it to: onclick="return VerifyForm(this.form)" You tell javascript to go to the page only if you return true. function VerifyForm(form) { if (Values == true) { return true; } else { alert(); return false; } } With any browser 5.0 or older this will work. Now, with PHP you need to pass the information back to the form either through a URL or in session variables. I hope this helps some, Jonathan Pitcher On Monday, March 3, 2003, at 12:43 PM, Mirco Ellis wrote: Hi, I am doing my error checking with php. I use a javascript alert box to warn the user. It is all very simple. -Original Message- From: Jonathan Pitcher [mailto:[EMAIL PROTECTED] Sent: Monday, March 03, 2003 20:34 To: [EMAIL PROTECTED] Subject: Re: [PHP] Keeping existing data in textarea's Micro, Are you doing your error checking with Javascript or PHP. Makes a big difference. Jonathan Pitcher On Monday, March 3, 2003, at 12:30 PM, Mirco Ellis wrote: Hi, I have a developed a simple Helpdesk for our small company. When users log calls they get an alert message warning them that they must fill in all the fields if they have missed a field. At the moment if they happen to forget a field, they receive the alert message, but then have to start all over again. How do I keep the existing data in the textareas from dissapearing after the alert message? Mirco -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Keeping existing data in textarea's
> Hi, I have a developed a simple Helpdesk for our small company. When users > log calls they get an alert message warning them that they must fill in all > the fields if they have missed a field. At the moment if they happen to > forget a field, they receive the alert message, but then have to start all > over again. How do I keep the existing data in the textareas from > dissapearing after the alert message? Well, when they submit the form, whatever they typed is going to be in $_POST['name_of_textarea'], right? (or $_GET...) To put that value back into a textarea, do something like this: I'll assume you use the same form for entering if there is an error. the first time this form is displayed, $_POST['whatever'] will not be set, so the will be blank. After it's submitted, then the value will be filled back in. ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] processing pop3 inbox
Hi All, I need to process the inbox. Any pointers, I don't use Perl and would like to use PHP. Also I do not have PHP compiled for a comand line so I'll probably use a crontab and unix text based web browser to invoke the PHP page to process the inbox. TIA Any help much appreciated. Henry -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] ICQ # validation
Maybe I'm off my rocker, but I don't see how this can't work. I'm trying to validate an ICQ number, and assuming a valid one is between 7 and 9 numbers. My line of code is this: if(ereg("^[0-9]{7,9}$", $_REQUEST["icqnumber"])) { print("a-okay!"); } else { print("error msg"); } I've submitted the ICQ # 2264532680, but it validates. Any ideas?
[PHP] Re: PHP shopping carts
Hi, Please let me know if you find one thats any good? Henry "Dan Sabo" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hi, > > What I'm looking for is either an open source or commercial solution which > is supported by either commercial or OS add on modules. I've looked at OS > commerce and X cart so far, wanted to look at a few more. > > I'm hoping to find one which has a hotel booking or reservation system > either as a standard or as an add on mod, and am doing some comparisons. > > Thanks, > > Dan > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] max_execution_time and set_time_limit() problem.
I'm uploading a large file through my web page and after 30 seconds, the fails with an error. I bumbed the max_execution_time parameter in /etc/php.ini to 600 seconds and restarted apache. Still errors at 30 seconds. I added set_time_limit(600); to various place in my file upload handling script... still errors at 30 seconds. Is this just a good 'ol bug in my Redhat 7.3 version of PHP?: $ rpm -q php php-4.1.2-7.3.6 Thanks, -eric wood -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] ICQ # validation
Use single quotes around your pattern. if(ereg('^[0-9]{7,9}$',... With the double quotes, PHP is probably seeing the $ and looking for a variable, even though it's at the end of the string. ---John Holmes... - Original Message - From: "Liam Gibbs" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, March 03, 2003 2:00 PM Subject: [PHP] ICQ # validation Maybe I'm off my rocker, but I don't see how this can't work. I'm trying to validate an ICQ number, and assuming a valid one is between 7 and 9 numbers. My line of code is this: if(ereg("^[0-9]{7,9}$", $_REQUEST["icqnumber"])) { print("a-okay!"); } else { print("error msg"); } I've submitted the ICQ # 2264532680, but it validates. Any ideas? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] ICQ # validation
On Mon, 3 Mar 2003 14:00:43 -0500, you wrote: >Maybe I'm off my rocker, but I don't see how this can't work. I'm trying to validate >an ICQ number, and assuming a valid one is between 7 and 9 numbers. My line of code >is this: > >if(ereg("^[0-9]{7,9}$", $_REQUEST["icqnumber"])) { >print("a-okay!"); >} else { >print("error msg"); >} > >I've submitted the ICQ # 2264532680, but it validates. Any ideas? if (ereg ("^[0-9]{7,9}$", "2264532680")) { print ("a-okay!"); } else { print ("error msg"); } fails. I suspect you're not grabbing the variable from the environment correctly. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] News Content
On Mon, 03 Mar 2003 13:09:39 -0500, you wrote: >Anyone know of any pre-built modules or whatnot that provide some news >content and/or links and captions via PHP/MySQL that can be integrated with >minimal disruption to a site? (A prerequisite being that it acts legally in >terms of gathering the info. ;) What kind of news? Paid or unpaid? You could try searching for RSS feeds... other than that I suggest you start searching here http://directory.google.com/Top/Computers/Software/Internet/Site_Management/Content_Management/Content_Providers/ Integration is pretty simple - a cron job that grabs the feed every n minutes and updates a database table. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Bitwise operator question
Hi, I'm reading the description of Bitwise Operators on page 81 of "Professional PHP 4", the Wrox book. In the highlighted example on that page, the line of code... $user_permissions = CREATE_RECORDS | ALTER_RECORDS; the description in the book says that this line is building a set of user permissions out of the previously created constants with the OR operator (I understand what OR means). The value of $user_permissions is set to either 1 or 4, which is in fact 5 (0101). But how is this single line doing that? The explanation was cryptic (to me). -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Bitwise operator question
Here's how I think about it... CREATE_RECORDS = 1 in decimal and 0001 in binary. ALTER_RECORDS = 4 in decimal and 0101 in binary. that line returns a binary string where *any* of the bits are 1, so line them up: 0001 | 0101 = 0101 which is 5. On Mon, 3 Mar 2003, Dan Sabo wrote: > Hi, > > I'm reading the description of Bitwise Operators on page 81 of "Professional > PHP 4", the Wrox book. In the highlighted example on that page, the line of > code... > > $user_permissions = CREATE_RECORDS | ALTER_RECORDS; > > the description in the book says that this line is building a set of user > permissions out of the previously created constants with the OR operator (I > understand what OR means). The value of $user_permissions is set to either > 1 or 4, which is in fact 5 (0101). But how is this single line doing that? > The explanation was cryptic (to me). > > > > -- > 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: Bitwise operator question
Hi Phillip, Don't U mean 0001 | 0100 = 0101 ? Dan -Original Message- From: Philip Hallstrom [mailto:[EMAIL PROTECTED] Sent: Monday, March 03, 2003 2:33 PM To: Dan Sabo Cc: [EMAIL PROTECTED] Subject: Re: Bitwise operator question Here's how I think about it... CREATE_RECORDS = 1 in decimal and 0001 in binary. ALTER_RECORDS = 4 in decimal and 0101 in binary. that line returns a binary string where *any* of the bits are 1, so line them up: 0001 | 0101 = 0101 which is 5. On Mon, 3 Mar 2003, Dan Sabo wrote: > Hi, > > I'm reading the description of Bitwise Operators on page 81 of "Professional > PHP 4", the Wrox book. In the highlighted example on that page, the line of > code... > > $user_permissions = CREATE_RECORDS | ALTER_RECORDS; > > the description in the book says that this line is building a set of user > permissions out of the previously created constants with the OR operator (I > understand what OR means). The value of $user_permissions is set to either > 1 or 4, which is in fact 5 (0101). But how is this single line doing that? > The explanation was cryptic (to me). > > > > -- > 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] All Code Executing Even After header() Redirect
At the top of every page in my site I have a snippet of code that authenticates the user by checking for valid SESSION vars and their contents. If they don't, they are redirected with a header() statement to a log-in page like this: include_once("function_library.php"); session_start(); if (!LoggedIn()) { // If not logged in, take to Login page. header("Location: /login.php"); } LogAccess($_SESSION['user']); // This function logs user's access. I noticed that the LogAccess() function I have after the header() redirect is executing, even if the user is not logged in and is redirected to the Log-In page. I did confirm that the LoggedIn() custom function is working properly and returning the right value. I thought the code below the header() redirect would not actually be executed unless the user was logged in and allowed to proceed. Is this how PHP is supposed to work? Is there any way to prevent the script from executing below a certain point if the user is not logged in? Thanks, Monty -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Help with SQL statement
I have a database that holds a start date and an end date and I have a form with a start date and an end date. The report would be to get everything in the database's date ranges that overlap the form's date range. I am having trouble figuring out how to get this to work, any help is appreciated. Sarah -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php