[PHP] problem loading phpinfo
Please, Could you tell me if this problem has been resolved: I am using php-5.2X and has this problem, I also had this problem when I was using php-5.1.X. My Apache is httpd-2.2.3. Here is the post from someone who is having the same problem. I config PHP4.0.6 for Apache 1.3.12 for Win32 : in apache configuation file: ScriptAlias /php/ "C:/PHP/" AddType application/x-httpd-php .php Action application/x-httpd-php "/php/php.exe" then I test with phpinfo.php file in htdocs directory. : phpinfo.php : when I type: http://localhost/phpinfo.php, Browser should show me some information table but It show me the original code. [16 Nov 2001 5:17am UTC] [EMAIL PROTECTED] Please ask support questions on the php-general@lists.php.net mailinglist. Not a bug > closing ### Any help would be highly appriciated. Thank You, IT Consultant (UNIX, Oracle, Sybase, MSSQL,MYSQL,MCSA) Chris Ok'Onkwo [EMAIL PROTECTED] Tel: 0041-79-656-0889 Check Out the new free AIM(R) Mail -- 2 GB of storage and industry-leading spam and email virus protection.
Re: [PHP] How php works?
# [EMAIL PROTECTED] / 2006-12-16 09:52:18 -0500: > On Sat, 2006-12-16 at 15:59 +, Roman Neuhauser wrote: > > # [EMAIL PROTECTED] / 2006-12-16 07:24:49 -0500: > > > On Sat, 2006-12-16 at 19:58 +0800, Kai Xiang wrote: > > > > On 12/16/06, Richard Lynch <[EMAIL PROTECTED]> wrote: > > > > > (*) > > > > > Actually, if somebody wants to embed the ZE inside of something other > > > > > than PHP, then I think Zend expects to get paid for that. > > > > > > I don't think so... the PHP and Zend licenses are quite liberal with > > > very few restrictions. Namely that you don't call your software php or > > > use php in the name (something many packages seem to ignore (either that > > > or they got permission)). The Zend license is practically a clone of the > > > PHP license with a search and replace for PHP to Zend :) There's nothing > > > that says you have to pay to embed it in your own software. That said, > > > if you make a product that uses either the PHP or Zend engine and makes > > > oodles of money, I think you should feel somewhat morally obliged to > > > give back in some way. > > > > Sorry if I take this OT, but when I publish my work under the MIT license, > > I mean it. Anything else would be hypocrisy. OSS is not beggarware. > > I'm not sure I understand the point you are making :/ That the license states everything he needs to feel obliged to. -- How many Vietnam vets does it take to screw in a light bulb? You don't know, man. You don't KNOW. Cause you weren't THERE. http://bash.org/?255991 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] How php works?
On Sun, 2006-12-17 at 14:41 +, Roman Neuhauser wrote: > # [EMAIL PROTECTED] / 2006-12-16 09:52:18 -0500: > > On Sat, 2006-12-16 at 15:59 +, Roman Neuhauser wrote: > > > # [EMAIL PROTECTED] / 2006-12-16 07:24:49 -0500: > > > > On Sat, 2006-12-16 at 19:58 +0800, Kai Xiang wrote: > > > > > On 12/16/06, Richard Lynch <[EMAIL PROTECTED]> wrote: > > > > > > (*) > > > > > > Actually, if somebody wants to embed the ZE inside of something > > > > > > other > > > > > > than PHP, then I think Zend expects to get paid for that. > > > > > > > > I don't think so... the PHP and Zend licenses are quite liberal with > > > > very few restrictions. Namely that you don't call your software php or > > > > use php in the name (something many packages seem to ignore (either that > > > > or they got permission)). The Zend license is practically a clone of the > > > > PHP license with a search and replace for PHP to Zend :) There's nothing > > > > that says you have to pay to embed it in your own software. That said, > > > > if you make a product that uses either the PHP or Zend engine and makes > > > > oodles of money, I think you should feel somewhat morally obliged to > > > > give back in some way. > > > > > > Sorry if I take this OT, but when I publish my work under the MIT license, > > > I mean it. Anything else would be hypocrisy. OSS is not beggarware. > > > > I'm not sure I understand the point you are making :/ > > That the license states everything he needs to feel obliged to. Ah well, I was stating my opinion denoted by "I think". Sorry to have wrinkled your panties. Cheers, Rob. -- .. | InterJinn Application Framework - http://www.interjinn.com | :: | An application and templating framework for PHP. Boasting | | a powerful, scalable system for accessing system services | | such as forms, properties, sessions, and caches. InterJinn | | also provides an extremely flexible architecture for | | creating re-usable components quickly and easily. | `' -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP problem with array keys / pointers
Hi all, I've a problem thats been bothering me for a week now I have an array $animals keys and values like this 1 => cat 2 => dog 3 => mouse 4 => horse I want to be able to access them using either a key or a pointer, however the key/pointer will be a variable without variables, if I want dog, I can either use $animals[1] or $animals['2'] but with a variable , eg. $x = 2 $animals[$x] will always give me 'mouse' what syntax do I need to use for $animals[$x] to give me 'dog' when $x=2 ? I've tried all manner of apostrophes and escaped apostrophes, but no luck. Can anyone help me Thanks for your time! jules -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP problem with array keys / pointers
1 => cat 2 => dog 3 => mouse 4 => horse iwfm with array(1=>'cat',2=>'dog',3=>'mouse',4=>'horse'): output: Array ( [1] => cat [2] => dog [3] => mouse [4] => horse ) dog source: 'cat',2=>'dog',3=>'mouse',4=>'horse'); print_r($animals); $x=2; echo $animals[$x]."\n"; ?> t -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP problem with array keys / pointers
- Original Message - From: "julian haffegee" <[EMAIL PROTECTED]> To: Sent: Sunday, December 17, 2006 7:31 PM Subject: [PHP] PHP problem with array keys / pointers Hi all, I've a problem thats been bothering me for a week now I have an array $animals keys and values like this 1 => cat 2 => dog 3 => mouse 4 => horse I want to be able to access them using either a key or a pointer, however the key/pointer will be a variable without variables, if I want dog, I can either use $animals[1] or $animals['2'] but with a variable , eg. $x = 2 $animals[$x] will always give me 'mouse' what syntax do I need to use for $animals[$x] to give me 'dog' when $x=2 ? I would think that you have string keys instead of integer ones. Perhaps there is some whitespace in the variable using to set the key? For example: $array = array(' 2' => 'dog'); // there is a whitespace before the number 2 will set the element of ordinal number 0 and key ' 2' to 'dog'. To get that value you would either ask for $array[0] or $array[' 2']. Doing a print_r() or var_dump() on the array will let you know what the actual contents of both the keys and values are. Satyam -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP problem with array keys / pointers
don't hijack an existing thread. (i.e. don't reply to someone elses' post/reply if your asking a new question. you need to learn to use var_dump(), and if you look at the line of code below you should have everything you need to know about numeric array keys: $a = array(2 => "foo"); $b = array("2" => "foo"); var_dump($a, $b, ($a === $b)); julian haffegee wrote: > Hi all, > > I've a problem thats been bothering me for a week now > > I have an array $animals > > keys and values like this > > 1 => cat > 2 => dog > 3 => mouse > 4 => horse > > I want to be able to access them using either a key or a pointer, > however the key/pointer will be a variable > > without variables, if I want dog, I can either use $animals[1] or > $animals['2'] > > but with a variable , eg. $x = 2 > $animals[$x] will always give me 'mouse' > > what syntax do I need to use for $animals[$x] to give me 'dog' when $x=2 ? > > I've tried all manner of apostrophes and escaped apostrophes, but no > luck. Can anyone help me > Thanks for your time! > jules > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] problem loading phpinfo
You probably didn't install PHP correctly. On 12/16/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: Please, Could you tell me if this problem has been resolved: I am using php-5.2X and has this problem, I also had this problem when I was using php-5.1.X. My Apache is httpd-2.2.3. Here is the post from someone who is having the same problem. I config PHP4.0.6 for Apache 1.3.12 for Win32 : in apache configuation file: ScriptAlias /php/ "C:/PHP/" AddType application/x-httpd-php .php Action application/x-httpd-php "/php/php.exe" then I test with phpinfo.php file in htdocs directory. : phpinfo.php : when I type: http://localhost/phpinfo.php, Browser should show me some information table but It show me the original code. [16 Nov 2001 5:17am UTC] [EMAIL PROTECTED] Please ask support questions on the php-general@lists.php.net mailinglist. Not a bug > closing ### Any help would be highly appriciated. Thank You, IT Consultant (UNIX, Oracle, Sybase, MSSQL,MYSQL,MCSA) Chris Ok'Onkwo [EMAIL PROTECTED] Tel: 0041-79-656-0889 Check Out the new free AIM(R) Mail -- 2 GB of storage and industry-leading spam and email virus protection. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Clearing POST variable on page refresh
Hi, I have a page with a form on it which posts to itself. The problem is when someone refreshes the page it enters the data into the DB again. How do I clear these variables so that doesn't happen. I tried the unset function, but no luck. I really don't want to use sessions or cookies as this is just a simple little page, but still, it has to work right. Thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Clearing POST variable on page refresh
Beauford wrote: I have a page with a form on it which posts to itself. The problem is when someone refreshes the page it enters the data into the DB again. How do I clear these variables so that doesn't happen. I tried the unset function, but no luck. I really don't want to use sessions or cookies as this is just a simple little page, but still, it has to work right. Use the header function (http://php.net/header) to redirect to the same page. The POST vars are coming from the client, so you can't get rid of them by unsetting them. By redirecting you are giving the browser a new page which is then what will be retrieved if the user refreshes it, rather than refreshing the POSTed request. -Stut -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP problem with array keys / pointers
will set the element of ordinal number 0 and key ' 2' to 'dog'. To get that value you would either ask for $array[0] or $array[' 2']. thanks for all the comments so far, i'm not sure you are understanding what I am asking for. My problem is NOT knowing what is in the arrays, but how to access them. My ordial number/key is a variable, and I need to sometimes use it as a key, and sometimes as an ordial so I need 2 ways of writing $array[$x], one being equivalent to $array[0] - $x is treated as an integer and one being equivalentt to $array['0'] - $x is treated as a string so far I can only get it to work as an ordial number not a string. Any attempt at apostrophes around $x brings up an error Any ideas? Jules -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP problem with array keys / pointers
On Sun, 2006-12-17 at 23:19 +, julian haffegee wrote: > > will set the element of ordinal number 0 and key ' 2' to 'dog'. To get > > that value you would either ask for $array[0] or $array[' 2']. > > > thanks for all the comments so far, i'm not sure you are understanding what > I am asking for. > My problem is NOT knowing what is in the arrays, but how to access them. > > My ordial number/key is a variable, and I need to sometimes use it as a key, > and sometimes as an ordial > > so I need 2 ways of writing $array[$x], > > one being equivalent to $array[0] - $x is treated as an integer > and one being equivalentt to $array['0'] - $x is treated as a string $array['0'] and $array[0] are identical in PHP. The string '0' will be automatically juggled to an integer when used as an index. You CANNOT differentiate even if you want. Cheers, Rob. -- .. | InterJinn Application Framework - http://www.interjinn.com | :: | An application and templating framework for PHP. Boasting | | a powerful, scalable system for accessing system services | | such as forms, properties, sessions, and caches. InterJinn | | also provides an extremely flexible architecture for | | creating re-usable components quickly and easily. | `' -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] simplest way in php to get our content on another site / included javascript question
I'm working on a project where we'd want partner sites to get our content on the other web sites. A key priority is that they won't have much technical sophistication (probably no db experience or php experience). Also, these would be third party sites so there would also be an issue of requirements (differnet xsl processors, no allow_url_fopen, etc...) I tried looking at sites that get their content on other sites to see how they do it: the possible solutions seem to be: 1. rss / xml - this is "well known" but would have a pretty high technical hurdles on the other sites. We could create every walk through and code sample but I still think it would be too involved. Only way out is either a xsl transformation (not going to happen), custom parsing library in php (maybe) or writing to db with associated libraries (too complex) 2. serialized php with custom library - this seems more feasible than #1 in terms of requirements 3. php proxy and ajax call / json - i think this would be too complex and would require too much manipulation of apache to handle subdomains, etc. 4. included javascript - kinda how digg handles syndication (see http://www.digg.com/add-digg for example). This would seem to be the lowest barrier to entry. The main concern is preventing unauthorized bots from crawling. It would seem our only option would be using the referer property but this could be forged relatively easily. 5. SOAP - no way 6. REST - if meant to just mean xml, i see this as an extension of #1. any thoughts or opinions would be appreciated. -jt -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] problem with imagecreate on new webserver
[EMAIL PROTECTED] wrote: i am moving my webserver from a windows box to a linux box with php ver 5.2.0 and noticed i am having a problem with a php file(code below). i thought it was a module i was missing but looking at the php config file all the same modules are loaded. allow_url_fopen is enabled. what would i be missing in the php install that would make this code not work correctly from one machine to the other. You need to narrow the problem down a little bit.. Anything show up in the webserver error logs? Turn up error reporting: error_reporting(E_ALL); and display errors: ini_set('display_errors', true); Place both of those at the start of the script and tell us what happens then. -- Postgresql & php tutorials http://www.designmagick.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] simplest way in php to get our content on another site / included javascript question
If this is about search engine optimization, I'd suggest using Javascript. Something like : http://www.yoursite.com/include.php?article=1536f";>http://www.yoursite.com"; id="yoursite">Provided by YourSite And inside the script, Ajax to fetch and display the content, and also add if (var link = document.getElementById('yoursite') && link.href=='http://www.yoursite.com'); else window.location.replace("http://www.yoursite.com/youremovedthelinkyouwillpay.php";); On 12/17/06, jonathan <[EMAIL PROTECTED]> wrote: I'm working on a project where we'd want partner sites to get our content on the other web sites. A key priority is that they won't have much technical sophistication (probably no db experience or php experience). Also, these would be third party sites so there would also be an issue of requirements (differnet xsl processors, no allow_url_fopen, etc...) I tried looking at sites that get their content on other sites to see how they do it: the possible solutions seem to be: 1. rss / xml - this is "well known" but would have a pretty high technical hurdles on the other sites. We could create every walk through and code sample but I still think it would be too involved. Only way out is either a xsl transformation (not going to happen), custom parsing library in php (maybe) or writing to db with associated libraries (too complex) 2. serialized php with custom library - this seems more feasible than #1 in terms of requirements 3. php proxy and ajax call / json - i think this would be too complex and would require too much manipulation of apache to handle subdomains, etc. 4. included javascript - kinda how digg handles syndication (see http://www.digg.com/add-digg for example). This would seem to be the lowest barrier to entry. The main concern is preventing unauthorized bots from crawling. It would seem our only option would be using the referer property but this could be forged relatively easily. 5. SOAP - no way 6. REST - if meant to just mean xml, i see this as an extension of #1. any thoughts or opinions would be appreciated. -jt -- 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] PDO statement/resultset
David Duong wrote: Hi everyone, Let me know if there is a better place to post this. I am playing with the idea of creating a true (KISS) abstraction layer that makes full use of PHP5's OOP support. So logically it would make sense to make use PDO wherever possible, however, one of PDO's design decisions was to make a prepared statement object also a result set (another question: ... why?) a script can not make use of the a statement more than once without completely fetching all the data it needs from the first query, before executing the next. A likely scenario is that the prepared statement is executed and then before the script is done with processing the result, the same statement (with different binds) will need to be executed again, also using the result set from that statement. Does PDO provide a method to deal with this problem? From what I understand the only solution would be to prepare a new statement for each query, even for queries with the same structure which defeats the purpose of a prepared statement(?) Is there a solution that is a bit better? I don't think anyone understands exactly what you're trying to achieve. Can you prepare 1 statement then use 2 different sets or parameters to call it? Of course - but as you have noticed, the 1st result set has to be used before you can use the 2nd. Why do you want to be able to do it another way? Are you trying to run queries in parallel (forking, whatever)? Are you trying to do things in a loop? Explain what you're trying to do and you might get a better response. -- Postgresql & php tutorials http://www.designmagick.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Cookies & page refresh
Richard Lynch wrote: > A cookie is sent BACK to the server after the server sends > it to the browser. Period. > > It's kind of like when you go to a movie, and you buy your > ticket from one person, and then you hand it to another, > and they hand it back, and then you have to be prepared to > show it to prove you aren't sitting through a second movie. > > Walking back out front to the ticket sales window, you don't > show them your ticket again... > > Maybe that's not such a good analogy... You could "fix" it by explaining that no one should check to see whether you have a ticket before you've had a chance to buy one. The timing just doesn't make sense. Developers sometimes make the mistake of checking $_COOKIE (a convenient representation of the Cookie header from the previous request) before a Set-Cookie header has been sent to the browser. The browser can't return something it has never received. Chris -- Chris Shiflett http://shiflett.org/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php redirection..
Tim wrote: > Considering bruce wants to be able to display the data and then > change location after a given time, and as stut said you can't > do this with a header() as it redirects before output Sure you can. Just use a Refresh header instead of Location. Chris -- Chris Shiflett http://shiflett.org/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php redirection..
Richard Lynch wrote: > The "old school" HTTP-EQUIV of a refresh with a time and URL > would probably be suitable for this. > > YMMV > > And it's still not PHP. :-) It is if you use header(). :-) Chris -- Chris Shiflett http://shiflett.org/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php