Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 321970

Summary: PHP Executable is added even if it's invalid
Product: z_Archived Reporter: Jacek Pospychala <jacek.pospychala>
Component: PDTAssignee: PHP Debug <php.debug-inbox>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: ganoro, qiangsheng.w, silviya, zhaozhongwei
Version: unspecifiedFlags: ganoro: review+
jacek.pospychala: review?
jacek.pospychala: review? (zhaozhongwei)
Target Milestone: ---   
Hardware: PC   
OS: Mac OS X - Carbon (unsup.)   
Whiteboard:
Attachments:
Description Flags
patch
none
patch v2 none

Description Jacek Pospychala CLA 2010-08-06 07:28:04 EDT
Sometimes php executable may be invalid, e.g. 

$ ./php-cgi -v
PHP Warning: PHP Startup: Unable to load dynamic library './ext/imagick.so' - libWand.so.10: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library './ext/mssql.so' - libsybdb.so.5: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library './ext/pdo_pgsql.so' - libpq.so.5: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library './ext/pgsql.so' - libpq.so.5: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning: Module 'mysql' already loaded in Unknown on line 0
PHP Warning: Module 'mysqli' already loaded in Unknown on line 0
PHP Warning: Module 'pdo_mysql' already loaded in Unknown on line 0
Segmentation fault 

Currently, this only results in an error in the log:
"!MESSAGE Can't determine version of the PHP executable"

Better it'd be to not adding such executable. After all, it's invalid
Comment 1 Jacek Pospychala CLA 2010-08-06 07:29:35 EDT
Created attachment 176021 [details]
patch

fix is to check that version was correctly recognized before adding the executable.
Comment 2 Jacek Pospychala CLA 2010-08-06 08:30:34 EDT
Created attachment 176032 [details]
patch v2

apparently, there were some formatting changes in last patch. added another patch - cleaned up.
Comment 3 Zhongwei Zhao CLA 2010-08-06 10:18:17 EDT
applied the patch in head and branch,thanks Jacek!
Comment 4 Sylvia Tancheva CLA 2010-09-03 03:56:02 EDT
Verified on 2.2.1.v20100822.
Closing