Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 321970 - PHP Executable is added even if it's invalid
Summary: PHP Executable is added even if it's invalid
Status: CLOSED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: PDT (show other bugs)
Version: unspecified   Edit
Hardware: PC Mac OS X - Carbon (unsup.)
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: PHP Debug CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-08-06 07:28 EDT by Jacek Pospychala CLA
Modified: 2020-05-14 11:24 EDT (History)
4 users (show)

See Also:
ganoro: review+
jacek.pospychala: review?
jacek.pospychala: review? (zhaozhongwei)


Attachments
patch (2.20 KB, patch)
2010-08-06 07:29 EDT, Jacek Pospychala CLA
no flags Details | Diff
patch v2 (987 bytes, patch)
2010-08-06 08:30 EDT, Jacek Pospychala CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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