Krienas Posted January 3, 2013 Report Share Posted January 3, 2013 Everytime I visit frontend my PEAR configuration gets reset to default values. Why do you do that? The code which is executed each time frontend is accessed ([us_root]/home/us_pear/index.php): $arr['temp_dir'] = $us_pear_folder.'\temp'; $arr['bin_dir'] = $us_pear_folder; $arr['php_dir'] = $us_pear_folder.'\PEAR'; $arr['doc_dir'] = $us_pear_folder.'\PEAR\docs'; $arr['data_dir'] = $us_pear_folder.'\PEAR\data'; $arr['test_dir'] = $us_pear_folder.'\PEAR\tests'; $arr['cache_dir'] = $us_pear_folder.'\PEAR\cache'; $arr['php_bin'] = $us_pear_folder."\\"; $arr['download_dir'] = $us_pear_folder.'\temp\download'; $arr['php_ini'] = $path_array[0].'\usr\local\php'; $arr['www_dir'] = $us_pear_folder.'\www'; $arr['cfg_dir'] = $us_pear_folder.'\cfg'; And this code shows other possible problems:1) why php_dir is being set to PEAR? If I understand the purpose of this setting correctly, for UniServer it should point to the same location as php_ini.2) why php_bin do not point to UniServer's php binary? That location and name of binary is known for you as you control layout. And this screws packages installed. For example CodeSniffer's BAT file content looks like this: @echo off REM [rems skipped] "C:\UniServer\home\us_pear\" -d auto_append_file="" -d auto_prepend_file="" -d include_path="'C:\UniServer\home\us_pear\PEAR'" -f "C:\UniServer\home\us_pear\phpcs" -- %* instead of @echo off REM [rems skipped] php -d auto_append_file="" -d auto_prepend_file="" -d include_path="'C:\UniServer\home\us_pear\PEAR'" -f "C:\UniServer\home\us_pear\phpcs" -- %* or @echo off REM [rems skipped] "C:\UniServer\usr\local\php\php.exe" -d auto_append_file="" -d auto_prepend_file="" -d include_path="'C:\UniServer\home\us_pear\PEAR'" -f "C:\UniServer\home\us_pear\phpcs" -- %* And that problem with incorrect php binary value is valid for most packages. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.