1

(15 replies, posted in Installation)

@apmuthu: All the files had null characters in them. I think it must have something with the setup that I have. I used archlinux so the packages tend to be ahead of most distributions. I'm using php 5.5.5, apache 2.2.25, and curl 7.32.0.

I added the following line to the function extract_files in archive.inc, right after file is set using fields from temp

$file['name'] = str_replace("\0", "", $file['name']);

I figured out how to use the extension after it was installed. I think I was just getting tired after debugging, and didn't activate it for the company.

Thanks for everyone's help.

2

(15 replies, posted in Installation)

I got the extension to install, I just had to strip the null characters from the file names as they were being extracted. For some reason there was a good amount of padding of null characters on both sides of the file name.

The problem is now that it is installed, says it is installed, I can't seem to use it. Nothing appears in the banking and general ledger page and it isn't listed on the access setup page. I'm using just the admin account right now. Any ideas how to debug this?

3

(15 replies, posted in Installation)

I'm not running in safe mode (don't think I can since I'm using php 5.5.5), and I'm within the document root of the server which is included in the open_basedir list.

4

(15 replies, posted in Installation)

You were thinking along the lines that I am.

The current directory using getcwd is /srv/http/frontaccounting/modules/_cache/import_multijournalentries-2.3.0-4. Which seems right to me.

I also checked the encoding of the string and is is ASCII according to mb_detect_encoding. I checked this because of the results on this website (http://www.opencore.eesc.usp.br/patricia/phpsource/php-5.5.3/ext/standard/tests/file/is_dir_variation4.phpt) which shows the same errors I'm getting when testing binary safe strings.

I also set the import_multijournalentries-2.3.0-4 permissions to 777, just in case there was a permissions problems.

5

(15 replies, posted in Installation)

Thanks for your help and suggestions.

I don't think it is permissions. My server runs as user "http". The modules folder has 777 permissions, as does the _cache directory. import_multijournalentries-2.3.0-4.pkg has 644 permissions and is owned by http. The created folder import_multijournalentries-2.3.0-4 is owned by http and has write permissions.

I've increased the debugging output so you can see the parameters being passed to is_dir.

is_dir() expects parameter 1 to be a valid path, string given in file: /srv/http/frontaccounting/includes/archive.inc at line 381
/srv/http/frontaccounting/includes/archive.inc:381:     is_dir('_init')
/srv/http/frontaccounting/includes/packages.inc:54:     (tar_file Object)->extract_files()
/srv/http/frontaccounting/includes/packages.inc:654:     (package Object)->install()
/srv/http/frontaccounting/admin/inst_module.php:238:     install_extension('import_multijournalentries')
mkdir() expects parameter 1 to be a valid path, string given in file: /srv/http/frontaccounting/includes/archive.inc at line 382
/srv/http/frontaccounting/includes/archive.inc:382:     mkdir('_init','16877')
/srv/http/frontaccounting/includes/packages.inc:54:     (tar_file Object)->extract_files()
/srv/http/frontaccounting/includes/packages.inc:654:     (package Object)->install()
/srv/http/frontaccounting/admin/inst_module.php:238:     install_extension('import_multijournalentries')
gzopen(../modules/_cache/import_multijournalentries-2.3.0-4/_init/config): failed to open stream: No such file or directory in file: /srv/http/frontaccounting/includes/packages.inc at line 165
/srv/http/frontaccounting/includes/packages.inc:165:     gzopen('../modules/_cache/import_multijournalentries-2.3.0-4/_init/config','rb')
/srv/http/frontaccounting/includes/packages.inc:56:     get_control_file('../modules/_cache/import_multijournalentries-2.3.0-4/_init/config')
/srv/http/frontaccounting/includes/packages.inc:654:     (package Object)->install()
/srv/http/frontaccounting/admin/inst_module.php:238:     install_extension('import_multijournalentries')
Could not open
/srv/http/frontaccounting/includes/ui/ui_msgs.inc:14:     trigger_error('Could not open _init/files for writing.
This script does not support extracting this type of tar file.
Could not open file ../modules/_cache/import_multijournalentries-2.3.0-4/_data','256')
/srv/http/frontaccounting/includes/packages.inc:695:     display_error('Could not open _init/files for writing.
This script does not support extracting this type of tar file.
Could not open file ../modules/_cache/import_multijournalentries-2.3.0-4/_data')
/srv/http/frontaccounting/admin/inst_module.php:238:     install_extension('import_multijournalentries')

So it is passing "_init" to is_dir, which should be fine (I see that folder in the pkg archive when I extract it by hand) except the folder never gets extracted to the import_multijournalentries-2.3.0-4 in _cache.

I've been looking at the extract_files function in archive.inc but I don't know much php and can't quite make sense of it yet.

6

(15 replies, posted in Installation)

I've been trying to track down the problem and think I've made some progress but haven't figured it out completely. The import_multijournalentries-2.3.0-4.pkg file (that is the extension that I'm trying to install) is downloaded in the tmp folder but the files aren't being properly extracted. A import_multijournalentries-2.3.0-4 folder is created in modules/_cache directory but it is empty. All the errors are coming from that because it expects the files to be there.

7

(15 replies, posted in Installation)

I'm trying to install the "Import Multiple Journal Entries" extension. I get the error "Could not Open" after a short period of loading. I have looked at the other forum post https://frontaccounting.com/punbb/viewtopic.php?id=4431 since they are asking about the same problem there, but nothing on that post resolves the problem.

I believe that curl is setup properly for php. Here is a section from my phpinfo

cURL support     enabled
cURL Information     7.33.0
Age     3
Features
AsynchDNS     Yes
CharConv     No
Debug     No
GSS-Negotiate     No
IDN     No
IPv6     Yes
krb4     No
Largefile     Yes
libz     Yes
NTLM     Yes
NTLMWB     Yes
SPNEGO     No
SSL     Yes
SSPI     No
TLS-SRP     Yes
Protocols     dict, file, ftp, ftps, gopher, http, https, imap, imaps, pop3, pop3s, rtsp, scp, sftp, smtp, smtps, telnet, tftp
Host     x86_64-unknown-linux-gnu
SSL Version     OpenSSL/1.0.1e
ZLib Version     1.2.8
libSSH Version     libssh2/1.4.3

I tried renaming .htaccess to x.htaccess in the root folder of the install

I turned on debugging and got the following output:

    
mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in file: /srv/http/frontaccounting/includes/db/connect_db.inc at line 27
is_dir() expects parameter 1 to be a valid path, string given in file: /srv/http/frontaccounting/includes/archive.inc at line 381
mkdir() expects parameter 1 to be a valid path, string given in file: /srv/http/frontaccounting/includes/archive.inc at line 382
gzopen(../modules/_cache/import_multijournalentries-2.3.0-4/_init/config): failed to open stream: No such file or directory in file: /srv/http/frontaccounting/includes/packages.inc at line 165
Could not open 

Any thoughts. Let me know if you need more information.