Re: PHP debugger

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx>:

On Mon, Apr 28, 2008 at 7:00 AM, J. Manuel Velasco - UBILIBET
<tech@xxxxxxxxxxxx> 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@xxxxxxxxxx





-- 
<Manucastellano.jpg>

--

Jason Pruim
Raoset Inc.
Technology Manager
MQC Specialist
3251 132nd ave
Holland, MI, 49424-9337
www.raoset.com
japruim@xxxxxxxxxx




-- 
<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@xxxxxxxxxx





--

[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux