Jump to content

hisoka

Members
  • Posts

    569
  • Joined

  • Last visited

Everything posted by hisoka

  1. When I put the ./configure command in my Cygwin terminal to compile a source code program , I got this error : ERROR! Libpcap library/headers not found. TCPDUMP/LIBPCAP public repository is a good place to fetch one if libpcap library is installed, use the --with-libpcap-* options to specify pathes to include and library files locations. So , because I have windows xp as an operating system , I downloaded winpcap from this link : WinPcap · Developer Resources I extracted it to Cygwin directory which is C:\cygwin , then followed this link to configure winpcap with cygwin : help installing libpcap on cygwin - Stack Overflow In the second link , someone talked about installing some libraries : " Be sure you have installed Winpcap libraries and that they are in your path by typing: which packet.dll which wpcap.dllbecause I do not have both dll , I downloaded both of them from this link : wpcap.dll download missing file - DllDump then put them in C:\WINDOWS\system32 .Moreover , I did exactly what second link said : Copy libraries like this: WpdPack\Lib\libpacket.a to cygwin\lib\ WpdPack\Lib\libwpcap.a to cygwin\lib\ Create a folder cygwin\usr\include\pcap\ Copy all headers from WpdPack\Include to cygwin\usr\include\winpcap\ Be sure you have installed Winpcap libraries and that they are in your path by typing: which packet.dll which wpcap.dll But when I followed the rest which is : Building example using Cygwin Open a cygwin prompt to WpdPack\Examples-pcap\basic_dump\ and execute: basic_dump: and tried to execute the basic_dump, basic_dump_ex and iflist commands , I got basic_dump : command not found basic_dump_ex : command not found iflist : command not found So I added path C:\cygwin\WpdPack\Examples-pcap\basic_dump in windows environment variable but to my surprise I still got command not found when I run the command above What should I do ? or what I am missing ?
  2. This is what I did so far : I opened cmd in windows and changed to C:\Program Files\PHP\script\phpsecaudit where the audit software resides . Now that I am in the directory like this : C:\Program Files\PHP\script\phpsecaudit> I run this command : C:\Program Files\PHP\script\phpsecaudit>php run.php --src dilver.php dilver.php is the file i want the audit tool to analyse and --src is to specify the file which is dilver.php However I go this along with an error : <? /* * $Id: TokenUtils.php 28215 2005-07-28 02:53:05Z hkodungallur $ * * Copyright© 2004-2005, SpikeSource Inc. All Rights Reserved. * Licensed under the Open Software License version 2.1 * (See http://www.spikesource.com/license.html) */ ?> PHP Fatal error: Call-time pass-by-reference has been removed in C:\Program Fil es\PHP\script\phpsecaudit\xml_utils.php on line 31 PHP Stack trace: PHP 1. {main}() C:\Program Files\PHP\script\phpsecaudit\run.php:0 PHP 2. require_once() C:\Program Files\PHP\script\phpsecaudit\run.php:74 Fatal error: Call-time pass-by-reference has been removed in C:\Program Files\PH P\script\phpsecaudit\xml_utils.php on line 31 Call Stack: 0.0053 131368 1. {main}() C:\Program Files\PHP\script\phpsecaudit\run. php:0 0.0089 186312 2. require_once('C:\Program Files\PHP\script\phpsecaudit \Analyzer.php') C:\Program Files\PHP\script\phpsecaudit\run.php:74 No idea what is happening and how to correct it ???
  3. I downloaded a program called PHP security Audit Tool from this site : https://sourceforge.net/projects/phpsecaudit/ then looked to the instructions used to run it in the bottom of this page : https://sourceforge.net/p/phpsecaudit/code/HEAD/tree/ However I tried for hours but I could not make it run on my windows XP with Apache server and PHP I need help
  4. XDebug is able to detect and show the errors that happen during compile time although as I wrote in another thread , the errors shown are unclear and do not tell exactly the errors made in the code
  5. Thanks justsomeguy it was because of some remnants from an old PHP data already installed
  6. hisoka

    debugger for php

    Problem solved thanks to you justsomeguy . Xdebug is working and showing errors and it is shown in the php info . But the errors Xdebug shows do not reflect the real errors made in the code . For example I tried with this little php code : <?php ech "well" ; ?> The error xDebug shew is : ( ! ) Parse error: syntax error, unexpected '"good"' (T_CONSTANT_ENCAPSED_STRING) in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\a.php on line 3 When I see an error like that , I will never figure out that the error is in "ech" which should be "echo" . Plus the content of the error itself that XDebug gives is somehow unclear for a newbie like me which make the ability to understand the error and then correct it very difficult especially with expressions like T_CONSTANT_ENCAPSED_STRING or ${ (T_DOLLAR_OPEN_CURLY_BRACES) or {$ (T_CURLY_OPEN) ( in an other error context ) So I said may be it is good idea to implement an IDE with xdebug like DEV PHP so that , may be through an IDE , errors become more obvious to understand and avoid . What do you think justsomeguy ?
  7. "There are not specific versions of PHP for specific versions of Apache. They are separate software projects" I have Apache 2.2.15 and worked fine with PHP 5.2 . When uninstalled PHP 5.2 and substituted it with PHP 5.4 , my Apache stopped working and I could not restart it anymore . It says :" Apache could not be restarded " So if it is not a problem of version compatibility so what is it exactly ? or why does my Apache work with PHP 5.2 and not with PHP 5.4
  8. " $_SERVER["argv"][0] would be 'file1' or it could be 'copy' - like I said "never tried it". $_SERVER["argv"][1] would be 'file2' or it could be 'file1' - ditto $_SERVER["argv"][2] could be 'file2' - ditto" ARGV is an array containing or holding the values of the arguments passed . "copy" is the command line and file1 , file2 are the arguments passed to it . So argv[0] is file1 argv[1] is file2 and $argc = 2 ; With ARGV there is another called ARGC which is a variable containing or holding the number of arguments passed . So one is an array and the other is a variable . Exciting and interesting .
  9. hisoka

    debugger for php

    hello Justsomeguy . I followed the link and it asked me to submit to a form and I did so . This is what I got as a result : Tailored Installation Instructions Summary Xdebug installed: no Server API: Command Line Interface Windows: yes - Compiler: MS VC9 - Architecture: x86 Zend Server: no PHP Version: 5.2.9-2 Zend API nr: 220060519 PHP API nr: 20060613 Debug Build: no Thread Safe Build: yes Configuration File Path: C:\WINDOWS Configuration File: C:\Program Files\PHP\php.ini Extensions directory: C:\Program Files\PHP\ext PHP versions below 5.4 are not supported So , based on these information , what should I do now ??
  10. As I said I read both documentation and I could not find the answer to my question in both of them
  11. So by using the two dimensional array can I get a list of all commands line or arguments that can be used ?? and if yes how exactly ? I mean I would like to get , for example , the first , second and third command line . Is it done like this : <?php echo $_SERVER["argv"][0]; ?> // first command line echoed <?php echo $_SERVER["argv"][1]; ?> // second command line echoed <?php echo $_SERVER["argv"][2]; ?> // third command line echoed ??
  12. By me the php.ini is in the PHP folder
  13. Could you please provide me with a simple and clear explanation about what does this mean : $_SERVER["argv"][0] $_SERVER["argv"][1] I read about it here : http://php.net/manual/en/reserved.variables.server.php and here http://php.net/manual/en/reserved.variables.argv.php But I could not understand anything .
  14. I told you I have only one php.ini file and it is in my PHP folder and although all these options are uncommented and ON in it , no parsing errors are shown not even in the error log file
  15. "Depending on which php.ini file you are editing, Apache php.ini file OR the actual PHP php.ini file" Is there two php.ini files one for Apache and the other for php ?!!! to my information , there is only one php.ini file located inside the PHP folder . Besides , when I installed Apache 2.2.15 version and looked in all its folder , I did not see any php.ini file. As I said there is only a php.ini file and that is in PHP folder
  16. hisoka

    debugger for php

    "Check the error log for messages why it couldn't load the extension" display_errors = On //uncommented log_errors = On //uncommented display_startup_errors = On //uncommented error_reporting = E_ALL //uncommented There is no error in the error log concerning why the module could not be load And now ???!!
  17. hisoka

    no error is shown

    Thank you very much Justsomeguy . You the best man
  18. I understood very well what you talking about . However I would like to know how to see the errors someone made during parsing time ? If I am right , according to what you wrote to me , the error log is able to detect those errors that happen during parsing time so that when I open the error log file I see them but when I put this little code <? echo "good"; > and run that , then opened my error log file , I did not notice any error although all these options are on : display_errors = On //uncommented log_errors = On //uncommented display_startup_errors = On //uncommented error_reporting = E_ALL //uncommented This is what I meant by how to be able to see those errors ?
  19. "It's either in the Apache documentation or the PHP documentation." Honestly I read both of them but I could not find which version of Apache belongs to which version of PHP . For example I could not find in both documentations which Apache version is compatible with php 5.4 and I could not find which Apache version is compatible with php 5.3 . It is not mentioned .
  20. hisoka

    debugger for php

    I downloaded only xdebug module which is non thread safe and whose name is php_xdebug-2.1.2-5.2-vc6 . My php is vc6 version 5.2 and apache is 2.2 . I tried to configure xdebug in my php.ini file like this : zend_extension="C:\Program Files\PHP\php_xdebug-2.1.2-5.2-vc6.dll" save then restarted Apache , looked my php info but I could not see xdebug module . any help ?
  21. So according to what you wrote Justsomeguy . the two lines in bold cannot detect syntax errors . Besides the error log in apache , is there a way or a php method to detect and make a programmer sees the syntax error he is making ???
  22. Is there a method to know which Apache version is compatible with PHP version For example : Is there a method to know which apache version is compatibe with PHP version 5.4 and php 5.3 ???
  23. hisoka

    no error is shown

    when I run that I expect to get this result : script without the HTML tags "<" and ">" I read here http://php.net/manual/en/function.strip-tags.php that strip_tags strips HTML and PHP tags from a string The problem is that no error is detected and nothing is echoed . I do not know why ?
  24. <?php error_reporting( E_ALL ); ini_set( "display_errors", 1 ); echo "This string never ends; although I use both of them in bold , no error was shown . look "This string never ends; // without double quotes at the end and there is no ?> too and even so both error_reporting( E_ALL ); ini_set( "display_errors", 1 ); did not show any error ?????
×
×
  • Create New...