|
Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com |
php-general-digest-help
lists.php.net
Date: Tue Apr 29 2008 - 12:38:43 CDT
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
php-general Digest 29 Apr 2008 17:38:43 -0000 Issue 5431
Topics (messages 273683 through 273705):
newbie with another HTML/navigation question
273683 by: Rod Clay
273690 by: Peter Ford
273691 by: Peter Ford
Re: web based chat app
273684 by: Nathan Nobbe
273685 by: paragasu
273686 by: Nathan Nobbe
273687 by: paragasu
273703 by: Nathan Nobbe
Re: SMS Cellular Text Messaging
273688 by: Per Jessen
273689 by: paragasu
Re: PHP debugger
273692 by: J. Manuel Velasco - UBILIBET
273697 by: Jason Pruim
273699 by: J. Manuel Velasco - UBILIBET
273702 by: Edward Kay
PHP Errors to screen
273693 by: Adam Gerson
273694 by: Shawn McKenzie
273695 by: Jay Blanchard
273696 by: Shawn McKenzie
273704 by: Jim Lucas
273705 by: Nathan Nobbe
Inherited and unimplemented method of a class
273698 by: Aspra Flavius Adrian
273700 by: Stut
273701 by: Aspra Flavius Adrian
Administrivia:
To subscribe to the digest, e-mail:
php-general-digest-subscribe
lists.php.net
To unsubscribe from the digest, e-mail:
php-general-digest-unsubscribe
lists.php.net
To post to the list, e-mail:
php-general
lists.php.net
----------------------------------------------------------------------
attached mail follows:
I have a php script that is invoked on 2 different occasions:
1) the first to create a page with a form the user will use to input
information for a new table row - this form has method=POST
2) the script is run a second time to accept the input from the
completed form, add the new row to the table on the database, then
create a simple form with an "OK" button the user will click on to go to
another page to view the result of the database maintenance - this form
has method=GET
Everything is working great EXCEPT THAT the url parameter I attempt to
pass on the second form to the php script that displays the database
maintenance never gets there! It's on the second form (<form
method="get" action="bloglist.php?thread=yet%20another%20new%20thread">)
but the bloglist.php script doesn't receive it. The query string is
empty when bloglist.php starts.
Also, another very curious, and perhaps revealing, thing - when I
attempt to view the page source of the second form I mention above, the
one with method=GET, I get the odd, and absolutely nonsensical, message
"The page you are trying to view contains POSTDATA that has expired from
the cache." But this makes no sense, since this second page (with
method=GET) has (or should have) no POSTDATA!?!
Can anyone make any sense of any of this for me? I'm making pretty good
progress in general, but, once again, I seem to have hit a snag here I'm
don't seem to be able to get past.
Thanks for any help you can give me.
Rod
clay.1
osu.edu
attached mail follows:
Rod Clay wrote:
> I have a php script that is invoked on 2 different occasions:
>
> 1) the first to create a page with a form the user will use to input
> information for a new table row - this form has method=POST
>
> 2) the script is run a second time to accept the input from the
> completed form, add the new row to the table on the database, then
> create a simple form with an "OK" button the user will click on to go to
> another page to view the result of the database maintenance - this form
> has method=GET
>
> Everything is working great EXCEPT THAT the url parameter I attempt to
> pass on the second form to the php script that displays the database
> maintenance never gets there! It's on the second form (<form
> method="get" action="bloglist.php?thread=yet%20another%20new%20thread">)
> but the bloglist.php script doesn't receive it. The query string is
> empty when bloglist.php starts.
>
> Also, another very curious, and perhaps revealing, thing - when I
> attempt to view the page source of the second form I mention above, the
> one with method=GET, I get the odd, and absolutely nonsensical, message
> "The page you are trying to view contains POSTDATA that has expired from
> the cache." But this makes no sense, since this second page (with
> method=GET) has (or should have) no POSTDATA!?!
>
> Can anyone make any sense of any of this for me? I'm making pretty good
> progress in general, but, once again, I seem to have hit a snag here I'm
> don't seem to be able to get past.
>
> Thanks for any help you can give me.
>
> Rod
> clay.1
osu.edu
Firstly, if you have a form and you are sending it using GET, then why don't you
use a <input type='hidden' name='thread' value='yet another new thread' />
element to send the parameter - that's what input tags are for. I have a feeling
that the "?foo=bar" bit is stripped off a GET request URL if there are other
form elements, although it's not always stripped off a POST... maybe it's
browser-dependent.
Secondly, when you refresh the second form, you are making a POST request -
that's what generated the form in the first place, so you would expect the
message about POSTDATA - and (in Firefox at least), to view the source the
browser repeats the page request, effectively the same as refreshing the page.
If you want to see the source without repeating the POST request, you need to
use something like the WebDeveloper tool bar - it has a View Generated Source
function which extracts the source from the DOM model the browser used to render
the page.
--
Peter Ford phone: 01580 893333
Developer fax: 01580 893399
Justcroft International Ltd., Staplehurst, Kent
attached mail follows:
Rod Clay wrote:
> I have a php script that is invoked on 2 different occasions:
>
> 1) the first to create a page with a form the user will use to input
> information for a new table row - this form has method=POST
>
> 2) the script is run a second time to accept the input from the
> completed form, add the new row to the table on the database, then
> create a simple form with an "OK" button the user will click on to go to
> another page to view the result of the database maintenance - this form
> has method=GET
>
> Everything is working great EXCEPT THAT the url parameter I attempt to
> pass on the second form to the php script that displays the database
> maintenance never gets there! It's on the second form (<form
> method="get" action="bloglist.php?thread=yet%20another%20new%20thread">)
> but the bloglist.php script doesn't receive it. The query string is
> empty when bloglist.php starts.
>
> Also, another very curious, and perhaps revealing, thing - when I
> attempt to view the page source of the second form I mention above, the
> one with method=GET, I get the odd, and absolutely nonsensical, message
> "The page you are trying to view contains POSTDATA that has expired from
> the cache." But this makes no sense, since this second page (with
> method=GET) has (or should have) no POSTDATA!?!
>
> Can anyone make any sense of any of this for me? I'm making pretty good
> progress in general, but, once again, I seem to have hit a snag here I'm
> don't seem to be able to get past.
>
> Thanks for any help you can give me.
>
> Rod
> clay.1
osu.edu
Firstly, if you have a form and you are sending it using GET, then why don't you
use a <input type='hidden' name='thread' value='yet another new thread' />
element to send the parameter - that's what input tags are for. I have a feeling
that the "?foo=bar" bit is stripped off a GET request URL if there are other
form elements, although it's not always stripped off a POST... maybe it's
browser-dependent.
Secondly, when you refresh the second form, you are making a POST request -
that's what generated the form in the first place, so you would expect the
message about POSTDATA - and (in Firefox at least), to view the source the
browser repeats the page request, effectively the same as refreshing the page.
If you want to see the source without repeating the POST request, you need to
use something like the WebDeveloper tool bar - it has a View Generated Source
function which extracts the source from the DOM model the browser used to render
the page.
--
Peter Ford phone: 01580 893333
Developer fax: 01580 893399
Justcroft International Ltd., Staplehurst, Kent
attached mail follows:
On Tue, Apr 29, 2008 at 12:48 AM, paragasu <paragasu
gmail.com> wrote:
> i am planning to integrate chat application on my website.
> the idea is to make online user on my website to chat to each other.
> it is using PHP5+jQuery, i want it to be as light as possible. I am not
> sure
> about the database to use, but i have 3 options.. file based, sqlite3 or
> mysql5.
im thinking you probly dont need a database unless you want to preserve chat
history.
i am thinking to use sqlite3 because it is fast but afraid it cannot handle
> many user
> request (i remember reading it is not so good for multiple user). It is
> also
> possible to use
> memory based storage /dev/shm (in debian based, i read somewhere - never
> tried yet)
it can actually handle a decent bit of concurrent traffic. but obviously
not nearly as much as an all-out server. and it doesnt have clustering
capabilities or anything like that.. but honestly, id really think about
what youll be using the database for here..
another issue is how to make it light.The chat script should refresh
> every 200ms to get the best result or even 1 second still bring quite a
> load to the web server.
hmm; well you need to make the client side smart.. like dont actually fire
off an http request as often if the last 3 queries all resulted in no new
message.
anyone ever run a web based application?
>
no this is only the php-general list; we typically write mainframe apps here
;)
or any chat based api i can use out there to save server resource?
im sure there are a number of tools you could just tie in w/o much hassle.
heres the top result from 'open source web chat' on google,
https://blueimp.net/ajax/
-nathan
attached mail follows:
> im thinking you probly dont need a database unless you want to preserve
chat history.
i don't think chat history is necessary. but i need to keep some of the user
chat session
right?
> but honestly, id really think about what youll be using the database for
here..
well, i am still thinking :) .. if it is possible not to use database at all
it is better.
>hmm; well you need to make the client side smart.. like dont actually fire
off an http request >as often if the last 3 queries all resulted in no new
message.
i did ask google. one way is to use a counter. if no new message, then
increase the counter.
On the other hand, reset the counter to zero. the counter multiple with the
request time will
make the request slower.
anyone ever make use of /dev/shm on any php project?
attached mail follows:
On Tue, Apr 29, 2008 at 1:56 AM, paragasu <paragasu
gmail.com> wrote:
>
> > im thinking you probly dont need a database unless you want to preserve
> chat history.
> i don't think chat history is necessary. but i need to keep some of the
> user chat session
> right?
well it should be better performing; however, if a session goes down then
the conversation is pretty much toast; or at least half toast. id probly
stick it in memory or on a local filesystem.. hmm. im starting to see
where sqlite could come in handy.
>hmm; well you need to make the client side smart.. like dont actually fire
> off an http request >as often if the last 3 queries all resulted in no new
> message.
> i did ask google. one way is to use a counter. if no new message, then
> increase the counter.
> On the other hand, reset the counter to zero. the counter multiple with the
> request time will
> make the request slower.
>
i dunno; id probly just use something like i linked on the last post. the
backend is php, so if nothing else you could look at the source.
anyone ever make use of /dev/shm on any php project?
>
i believe the sysv-ipc functions in php can give you access to that as well
(dont quote me tho; im to lazy to look it up atm :))
-nathan
attached mail follows:
> i believe the sysv-ipc functions in php can give you access to that as
well (dont quote me tho; > im to lazy to look it up atm :))
well, thanks.. i just aware of semaphore function in php. i never see anyone
use this function
yet. and i don't know how to use it .but i have something to find out then.,
attached mail follows:
On Tue, Apr 29, 2008 at 2:35 AM, paragasu <paragasu
gmail.com> wrote:
> > i believe the sysv-ipc functions in php can give you access to that as
> well (dont quote me tho; > im to lazy to look it up atm :))
> well, thanks.. i just aware of semaphore function in php. i never see
> anyone use this function
> yet. and i don't know how to use it .but i have something to find out
> then.,
>
ive used the semaphores; theyre not too bad (but there are some gotchas) and
theyre way faster than file locking. but anyway, regarding the shared
memory stuff, youd probly better spend your time working with an opcode
caches 'user cache'. i know apc and eaccelerator both provide these
mechanisms which is likely very similar to the sysv shared mem. one thing i
discovered, playing around w/ the sysv shared mem is the interface kinda
sucks... everything must be accessed by a unique integer, whereas (at least
in apc [and likely eaccelerator]) you can supply strings as the cache keys.
-nathan
attached mail follows:
paragasu wrote:
> i guess, even we have our own gateway. we have to make deal with local
> ISP anyway and it cost money. if anyone out there know how. i am
> really interested to know...
Forget your own gateway, it's way overkill unless you plan to be
sendings thousands of SMS'es. Just use smsclient.
/Per Jessen, Zürich
attached mail follows:
On Tue, Apr 29, 2008 at 3:23 PM, Per Jessen <per
computer.org> wrote:
> paragasu wrote:
>
> > i guess, even we have our own gateway. we have to make deal with local
> > ISP anyway and it cost money. if anyone out there know how. i am
> > really interested to know...
>
> Forget your own gateway, it's way overkill unless you plan to be
> sendings thousands of SMS'es. Just use smsclient.
>
>
> /Per Jessen, Zürich
i agree with you. it take huge amount of money to build and maintain this
type of
business.
attached mail follows:
Hi,
Thanks for the replay, at least the debugger runs and it's easy to
install :)
I am new here, this is a small company and I am the only computing man,
so the person who implemented theses scripts are far away to ask for
something.
Since I deduced there are different whoises scripts because the way to
make the petition is different depending on the domain (es) the query is
to an organization, ESNIC, (eu) query is to another organization, EURID
and for the rest it is executed just the *NIX whois command.
So since the connection, and the data exchange structure are different,
we need diferent scripts.
I attach now the files I metioned in my last email. If anybody can check
why the whois_es script doesn't run... you will be my idol !
Note: I hae change the name os the scripts since they are located in
specific place.
Thanks in advance.
Jason Pruim escribió:
>
> On Apr 28, 2008, at 10:58 AM, J. Manuel Velasco - UBILIBET wrote:
>
>> Ok, so I am going to try this one, Jason Pruim, let's check how it
>> works ... :p
>>
>> PROBLEM DESCRIPTION:
>> In my whois web-app, when a EU doamin is queried, whois.pl perl
>> script is lunched and I got the right result to my PHP script I the
>> result is shown at the web.
>> If I do the query to a ES domain, other whois.pl script is lunched,
>> but passthru doesn't execute it.
>> Both scripts are almost the same, they are in the same file
>> structure, same machine, same permissions...
>
> Have you tried to use a program to compare the files? Make sure that
> only the necessary lines are different?
>>
>>
>> The most strange is that I logged the command petition and If I copy
>> and paste exaclty the same that is passed to passthru, the command
>> for the whois to ESNIC is executed in the command line and shows the
>> result.
>>
>> Collegues told me to check the ENV, permissions, and so on, I did
>> with no results, also, the other perl script that is almost the same
>> is executed, so I feel very very lost.
>>
>> Three files attached:
>> whois_es.pl -> perl script to query whois in ESNIC
>> whois_eu.pl -> perl script to query whois in EURID
>> container.php -> intermediate page where the commands are build
>> and passthru is executed.
>
> Is there any particular reason you are using different perl scripts
> instead of a simple whois script for all of them?
>
> Also... the only attachment was your logo :)
>
>
>>
>>
>> Thank you very much for any hint. I feel lost almost one week with
>> this BUG.
>>
>> Jason Pruim escribió:
>>>
>>> On Apr 28, 2008, at 10:32 AM, Thijs Lensselink wrote:
>>>
>>>> Quoting Daniel Brown <parasane
gmail.com>:
>>>>
>>>>> On Mon, Apr 28, 2008 at 7:00 AM, J. Manuel Velasco - UBILIBET
>>>>> <tech
ubilibet.com> wrote:
>>>>>>
>>>>>> Hello,
>>>>>>
>>>>>> Anybody knows a good debugger for PHP and basic usage?
>>>>>
>>>>> There's a pretty good one known as Jason Pruim. ;-P
>>>>
>>>> ROFL!
>>>
>>>
>>> Yall have too much time on your hands! :P
>>>
>>>
>>>>
>>>>
>>>>>
>>>>> --
>>>>> </Daniel P. Brown>
>>>>> Dedicated Servers - Intel 2.4GHz w/2TB bandwidth/mo. starting at just
>>>>> $59.99/mo. with no contract!
>>>>> Dedicated servers, VPS, and hosting from $2.50/mo.
>>>>>
>>>>> --
>>>>> 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
>>>>
>>>>
>>>
>>> --
>>>
>>> Jason Pruim
>>> Raoset Inc.
>>> Technology Manager
>>> MQC Specialist
>>> 3251 132nd ave
>>> Holland, MI, 49424-9337
>>> www.raoset.com
>>> japruim
raoset.com
>>>
>>>
>>>
>>>
>>
>> --
>> <Manucastellano.jpg>
>
> --
>
> Jason Pruim
> Raoset Inc.
> Technology Manager
> MQC Specialist
> 3251 132nd ave
> Holland, MI, 49424-9337
> www.raoset.com <http://www.raoset.com>
> japruim
raoset.com <mailto:japruim
raoset.com>
>
>
>
--
attached mail follows:
Morning,
So looking at those scripts I realized that perl is nothing like php ;)
Is there other info that the different places need? or is it just a
different URL?
I'm wondering why you could do something like:
<?PHP
switch(strtolower($ext)) {
case 'es';
case 'com.es';
case 'org.es';
case 'edu.es';
case 'gob.es';
$cmd = HTTP://www.myCool.es/?query="$nom.$ext";
break;
case 'eu';
$cmd = HTTP://www.myCool.eu/?query="$nom.ext";
break;
default;
$cmd = HTTP://www.whois.com/?query="$nom.ext";
break;
}
?>
instead of calling out to a different script?
Also, I noticed that in your script where you have "default:" in your
switch, you have a : instead of a ;
May be causing some grief :)
On Apr 29, 2008, at 4:54 AM, J. Manuel Velasco - UBILIBET wrote:
> Hi,
>
> Thanks for the replay, at least the debugger runs and it's easy to
> install :)
>
> I am new here, this is a small company and I am the only computing
> man, so the person who implemented theses scripts are far away to
> ask for something.
>
> Since I deduced there are different whoises scripts because the way
> to make the petition is different depending on the domain (es) the
> query is to an organization, ESNIC, (eu) query is to another
> organization, EURID and for the rest it is executed just the *NIX
> whois command.
>
> So since the connection, and the data exchange structure are
> different, we need diferent scripts.
>
> I attach now the files I metioned in my last email. If anybody can
> check why the whois_es script doesn't run... you will be my idol !
>
> Note: I hae change the name os the scripts since they are located in
> specific place.
>
> Thanks in advance.
>
> Jason Pruim escribió:
>>
>>
>> On Apr 28, 2008, at 10:58 AM, J. Manuel Velasco - UBILIBET wrote:
>>
>>> Ok, so I am going to try this one, Jason Pruim, let's check how it
>>> works ... :p
>>>
>>> PROBLEM DESCRIPTION:
>>> In my whois web-app, when a EU doamin is queried, whois.pl perl
>>> script is lunched and I got the right result to my PHP script I
>>> the result is shown at the web.
>>> If I do the query to a ES domain, other whois.pl script is
>>> lunched, but passthru doesn't execute it.
>>> Both scripts are almost the same, they are in the same file
>>> structure, same machine, same permissions...
>>
>> Have you tried to use a program to compare the files? Make sure
>> that only the necessary lines are different?
>>>
>>>
>>> The most strange is that I logged the command petition and If I
>>> copy and paste exaclty the same that is passed to passthru, the
>>> command for the whois to ESNIC is executed in the command line and
>>> shows the result.
>>>
>>> Collegues told me to check the ENV, permissions, and so on, I did
>>> with no results, also, the other perl script that is almost the
>>> same is executed, so I feel very very lost.
>>>
>>> Three files attached:
>>> whois_es.pl -> perl script to query whois in ESNIC
>>> whois_eu.pl -> perl script to query whois in EURID
>>> container.php -> intermediate page where the commands are
>>> build and passthru is executed.
>>
>> Is there any particular reason you are using different perl scripts
>> instead of a simple whois script for all of them?
>>
>> Also... the only attachment was your logo :)
>>
>>
>>>
>>>
>>> Thank you very much for any hint. I feel lost almost one week with
>>> this BUG.
>>>
>>> Jason Pruim escribió:
>>>>
>>>>
>>>> On Apr 28, 2008, at 10:32 AM, Thijs Lensselink wrote:
>>>>
>>>>> Quoting Daniel Brown <parasane
gmail.com>:
>>>>>
>>>>>> On Mon, Apr 28, 2008 at 7:00 AM, J. Manuel Velasco - UBILIBET
>>>>>> <tech
ubilibet.com> wrote:
>>>>>>>
>>>>>>> Hello,
>>>>>>>
>>>>>>> Anybody knows a good debugger for PHP and basic usage?
>>>>>>
>>>>>> There's a pretty good one known as Jason Pruim. ;-P
>>>>>
>>>>> ROFL!
>>>>
>>>>
>>>> Yall have too much time on your hands! :P
>>>>
>>>>
>>>>>
>>>>>
>>>>>>
>>>>>> --
>>>>>> </Daniel P. Brown>
>>>>>> Dedicated Servers - Intel 2.4GHz w/2TB bandwidth/mo. starting
>>>>>> at just
>>>>>> $59.99/mo. with no contract!
>>>>>> Dedicated servers, VPS, and hosting from $2.50/mo.
>>>>>>
>>>>>> --
>>>>>> 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
>>>>>
>>>>>
>>>>
>>>> --
>>>>
>>>> Jason Pruim
>>>> Raoset Inc.
>>>> Technology Manager
>>>> MQC Specialist
>>>> 3251 132nd ave
>>>> Holland, MI, 49424-9337
>>>> www.raoset.com
>>>> japruim
raoset.com
>>>>
>>>>
>>>>
>>>>
>>>
>>> --
>>> <Manucastellano.jpg>
>>
>> --
>>
>> Jason Pruim
>> Raoset Inc.
>> Technology Manager
>> MQC Specialist
>> 3251 132nd ave
>> Holland, MI, 49424-9337
>> www.raoset.com
>> japruim
raoset.com
>>
>>
>>
>
> --
> <Manucastellano.jpg>
> <whois_es.pl><whois_eu.pl><container.php>
--
Jason Pruim
Raoset Inc.
Technology Manager
MQC Specialist
3251 132nd ave
Holland, MI, 49424-9337
www.raoset.com
japruim
raoset.com
attached mail follows:
Iep,
First of all, thank you verfy much to take a moment to check the
scripts, I really appreciate.
About your idea to have only one script that call to the appropiate
command using a switch, I agree, but since I am new here and I am the
only computing guy, I don't have time to restructure the code. I saw
also other code in the Intranet where I'd have done in a different way
easier to maintain, I think, but I have to make this to work and
apparently I don't think reestructuring the code will solve the
problem, at least in a way that i can understand why the script doesn't
want to run now. Also, the process to build the query and connect to the
registar are different in each case, so maybe it is the reason why who
who implemented this whois webapp has done like this.
If you want to check the site I am trying to fix and have a whole idea
it is at http://whois.ubilibet.com, if you check the tool, the ES
domains has no result at the site. I write to the log the command
construction, copy and paste at the command line at it works.
By other hand your note about the default option I ddin't realise, I am
going to check, but I feel very confused why the command I pass in the
script to the passthru function, is executed from command line with no
error and giving the right result. That's why I focused the problem in
the PHP script.
Thank you very much human debugger :)
Jason Pruim escribió:
> Morning,
>
> So looking at those scripts I realized that perl is nothing like php ;)
>
> Is there other info that the different places need? or is it just a
> different URL?
>
> I'm wondering why you could do something like:
>
> <?PHP
>
> switch(strtolower($ext)) {
> case 'es';
> case 'com.es';
> case 'org.es';
> case 'edu.es';
> case 'gob.es';
> $cmd = HTTP://www.myCool.es/?query="$nom.$ext";
> break;
> case 'eu';
> $cmd = HTTP://www.myCool.eu/?query="$nom.ext";
> break;
> default;
> $cmd = HTTP://www.whois.com/?query="$nom.ext";
> break;
> }
> ?>
>
> instead of calling out to a different script?
>
> Also, I noticed that in your script where you have "default:" in your
> switch, you have a : instead of a ;
>
> May be causing some grief :)
>
>
> On Apr 29, 2008, at 4:54 AM, J. Manuel Velasco - UBILIBET wrote:
>
>> Hi,
>>
>> Thanks for the replay, at least the debugger runs and it's easy to
>> install :)
>>
>> I am new here, this is a small company and I am the only computing
>> man, so the person who implemented theses scripts are far away to ask
>> for something.
>>
>> Since I deduced there are different whoises scripts because the way
>> to make the petition is different depending on the domain (es) the
>> query is to an organization, ESNIC, (eu) query is to another
>> organization, EURID and for the rest it is executed just the *NIX
>> whois command.
>>
>> So since the connection, and the data exchange structure are
>> different, we need diferent scripts.
>>
>> I attach now the files I metioned in my last email. If anybody can
>> check why the whois_es script doesn't run... you will be my idol !
>>
>> Note: I hae change the name os the scripts since they are located in
>> specific place.
>>
>> Thanks in advance.
>>
>> Jason Pruim escribió:
>>>
>>>
>>> On Apr 28, 2008, at 10:58 AM, J. Manuel Velasco - UBILIBET wrote:
>>>
>>>> Ok, so I am going to try this one, Jason Pruim, let's check how it
>>>> works ... :p
>>>>
>>>> PROBLEM DESCRIPTION:
>>>> In my whois web-app, when a EU doamin is queried, whois.pl perl
>>>> script is lunched and I got the right result to my PHP script I the
>>>> result is shown at the web.
>>>> If I do the query to a ES domain, other whois.pl script is lunched,
>>>> but passthru doesn't execute it.
>>>> Both scripts are almost the same, they are in the same file
>>>> structure, same machine, same permissions...
>>>
>>> Have you tried to use a program to compare the files? Make sure that
>>> only the necessary lines are different?
>>>>
>>>>
>>>> The most strange is that I logged the command petition and If I
>>>> copy and paste exaclty the same that is passed to passthru, the
>>>> command for the whois to ESNIC is executed in the command line and
>>>> shows the result.
>>>>
>>>> Collegues told me to check the ENV, permissions, and so on, I did
>>>> with no results, also, the other perl script that is almost the
>>>> same is executed, so I feel very very lost.
>>>>
>>>> Three files attached:
>>>> whois_es.pl -> perl script to query whois in ESNIC
>>>> whois_eu.pl -> perl script to query whois in EURID
>>>> container.php -> intermediate page where the commands are
>>>> build and passthru is executed.
>>>
>>> Is there any particular reason you are using different perl scripts
>>> instead of a simple whois script for all of them?
>>>
>>> Also... the only attachment was your logo :)
>>>
>>>
>>>>
>>>>
>>>> Thank you very much for any hint. I feel lost almost one week with
>>>> this BUG.
>>>>
>>>> Jason Pruim escribió:
>>>>>
>>>>>
>>>>> On Apr 28, 2008, at 10:32 AM, Thijs Lensselink wrote:
>>>>>
>>>>>> Quoting Daniel Brown <parasane
gmail.com>:
>>>>>>
>>>>>>> On Mon, Apr 28, 2008 at 7:00 AM, J. Manuel Velasco - UBILIBET
>>>>>>> <tech
ubilibet.com> wrote:
>>>>>>>>
>>>>>>>> Hello,
>>>>>>>>
>>>>>>>> Anybody knows a good debugger for PHP and basic usage?
>>>>>>>
>>>>>>> There's a pretty good one known as Jason Pruim. ;-P
>>>>>>
>>>>>> ROFL!
>>>>>
>>>>>
>>>>> Yall have too much time on your hands! :P
>>>>>
>>>>>
>>>>>>
>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> </Daniel P. Brown>
>>>>>>> Dedicated Servers - Intel 2.4GHz w/2TB bandwidth/mo. starting at
>>>>>>> just
>>>>>>> $59.99/mo. with no contract!
>>>>>>> Dedicated servers, VPS, and hosting from $2.50/mo.
>>>>>>>
>>>>>>> --
>>>>>>> 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
>>>>>>
>>>>>>
>>>>>
>>>>> --
>>>>>
>>>>> Jason Pruim
>>>>> Raoset Inc.
>>>>> Technology Manager
>>>>> MQC Specialist
>>>>> 3251 132nd ave
>>>>> Holland, MI, 49424-9337
>>>>> www.raoset.com
>>>>> japruim
raoset.com
>>>>>
>>>>>
>>>>>
>>>>>
>>>>
>>>> --
>>>> <Manucastellano.jpg>
>>>
>>> --
>>>
>>> Jason Pruim
>>> Raoset Inc.
>>> Technology Manager
>>> MQC Specialist
>>> 3251 132nd ave
>>> Holland, MI, 49424-9337
>>> www.raoset.com
>>> japruim
raoset.com
>>>
>>>
>>>
>>
>> --
>> <Manucastellano.jpg>
>> <whois_es.pl><whois_eu.pl><container.php>
>
> --
>
> Jason Pruim
> Raoset Inc.
> Technology Manager
> MQC Specialist
> 3251 132nd ave
> Holland, MI, 49424-9337
> www.raoset.com
> japruim
raoset.com
>
>
>
>
--
attached mail follows:
> -----Original Message-----
> From: Jason Pruim [mailto:japruim
raoset.com]
> Morning,
>
> So looking at those scripts I realized that perl is nothing like php ;)
>
> Is there other info that the different places need? or is it just a
> different URL?
>
> I'm wondering why you could do something like:
>
> <?PHP
>
> switch(strtolower($ext)) {
> case 'es';
> case 'com.es';
> case 'org.es';
> case 'edu.es';
> case 'gob.es';
> $cmd = HTTP://www.myCool.es/?query="$nom.$ext";
> break;
> case 'eu';
> $cmd = HTTP://www.myCool.eu/?query="$nom.ext";
> break;
> default;
> $cmd = HTTP://www.whois.com/?query="$nom.ext";
> break;
> }
> ?>
>
> instead of calling out to a different script?
>
> Also, I noticed that in your script where you have "default:" in your
> switch, you have a : instead of a ;
>
Actually, the colon is correct: http://uk.php.net/switch
You also need to enclose your string declarations correctly and add the $
before ext, e.g.
$cmd = "http://www.whois.com/?query=$nom.$ext";
or
$cmd = 'http://www.whois.com/?query='.$nom.'.'.$ext;
Edward
attached mail follows:
Where do I change the setting to print PHP errors to the screen when
running in a web browser?
Thanks,
Adam
--
Adam Gerson
Assistant Director of Technology
Apple Certified System Administrator (ACSA)
Columbia Grammar and Prep School
phone. 212-749-6200 ex. 321
fax. 212-428-6806
agerson
cgps.org
http://www.cgps.org
Public key - subkeys.pgp.net
attached mail follows:
Adam Gerson wrote:
> Where do I change the setting to print PHP errors to the screen when
> running in a web browser?
>
> Thanks,
> Adam
>
>
php.ini, display_errors
-shawn
attached mail follows:
[snip]
Where do I change the setting to print PHP errors to the screen when
running in a web browser?
[/snip]
http://us2.php.net/manual/en/function.error-reporting.php
attached mail follows:
Adam Gerson wrote:
> Where do I change the setting to print PHP errors to the screen when
> running in a web browser?
>
> Thanks,
> Adam
>
>
Or in your script use ini_set()
-shawn
attached mail follows:
Adam Gerson wrote:
> Where do I change the setting to print PHP errors to the screen when
> running in a web browser?
>
> Thanks,
> Adam
>
>
At the top of your script put these lines
<?php
error_reporting(E_ALL);
ini_set('display_errors', 1);
--
Jim Lucas
"Some men are born to greatness, some achieve greatness,
and some have greatness thrust upon them."
Twelfth Night, Act II, Scene V
by William Shakespeare
attached mail follows:
On Tue, Apr 29, 2008 at 6:38 AM, Shawn McKenzie <nospam
mckenzies.net>
wrote:
> Adam Gerson wrote:
>
>> Where do I change the setting to print PHP errors to the screen when
>> running in a web browser?
>>
>> Thanks,
>> Adam
>>
>>
>> php.ini, display_errors
you should also take a look at log_errors and error_log as well.
-nathan
attached mail follows:
Hello folks.
An inherited and unimplemented method of a class in PHP-5.2.5 gets called twice:
class Foo {
public function foo() {
echo get_class($this);//or __CLASS__;
}
}
class Bar extends Foo {
}
$f = new Bar;
$f->foo();
Shouldn't it be only once? If I'm doing something wrong, how would I
do it right? If it's a bug, did it get fixed as of 5.2.6RC5 ?
Thanks.
attached mail follows:
On 29 Apr 2008, at 15:19, Aspra Flavius Adrian wrote:
> Hello folks.
>
> An inherited and unimplemented method of a class in PHP-5.2.5 gets
> called twice:
>
> class Foo {
> public function foo() {
> echo get_class($this);//or __CLASS__;
> }
> }
> class Bar extends Foo {
> }
> $f = new Bar;
> $f->foo();
>
> Shouldn't it be only once? If I'm doing something wrong, how would I
> do it right? If it's a bug, did it get fixed as of 5.2.6RC5 ?
PHP supports two types of constructor. One is __construct(), the other
is a function with the same name as the class.
In your example new Bar; will call foo as the constructor for the Foo
class, and then you call foo again explicitly.
-Stut
--
http://stut.net/
attached mail follows:
On Tue, Apr 29, 2008 at 4:29 PM, Stut <stuttle
gmail.com> wrote:
>
>
> On 29 Apr 2008, at 15:19, Aspra Flavius Adrian wrote:
>
>
> > Hello folks.
> >
> > An inherited and unimplemented method of a class in PHP-5.2.5 gets called
> twice:
> >
> > class Foo {
> > public function foo() {
> > echo get_class($this);//or __CLASS__;
> > }
> > }
> > class Bar extends Foo {
> > }
> > $f = new Bar;
> > $f->foo();
> >
> > Shouldn't it be only once? If I'm doing something wrong, how would I
> > do it right? If it's a bug, did it get fixed as of 5.2.6RC5 ?
> >
>
> PHP supports two types of constructor. One is __construct(), the other is a
> function with the same name as the class.
Oh, yeah, I've got so used with php 5 that I've completly forgot about
php 4 compatibility
>
> In your example new Bar; will call foo as the constructor for the Foo
> class, and then you call foo again explicitly.
>
Thanks.
> -Stut
>
> --
> http://stut.net/
>
- application/x-perl attachment: whois_es.pl
- application/x-perl attachment: whois_eu.pl
- application/x-php attachment: container.php
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]