Errors when installing and removing a package
March 09, 2014, 12:46:54 pm
I get lots of errors in the log when I install and uninstall a package I'm working on. Since it's my first package hopefully it's my problem. Can someone point me to a package that sets hooks, installs files and does a code edit that is known good? Then I can see if it's my package (and how to fix it) or the install system. Example Uninstall Errors: Type of error: Undefined 8: Undefined variable: integration_call index.php?action=admin;area=packages;sa=uninstall2;package=mypackage.tgz;pid=20 File: elkarte/sources/Subs.php Line: 3931 Type of error: Undefined 8: Undefined variable: integration_call elkarte/index.php?action=admin;area=packages;sa=uninstall2;package=mypackage.tgz;pid=20 File: elkarte/sources/Subs.php Line: 3923 Type of error: Undefined index.php?action=admin;area=packages;sa=uninstall2;package=mypackage.tgz;pid=20 File: elkarte/sources/Subs.php Line: 3912 And these errors on install and uninstall Type of error: General 2: is_dir() expects parameter 1 to be a valid path, string given elkarte/index.php?action=admin;area=packages;sa=uninstall2;package=mypackage.tgz;pid=20 File: elkarte/sources/subs/Package.subs.php Line: 1792 Type of error: General 2: file_exists() expects parameter 1 to be a valid path, string given /elkarte/index.php?action=admin;area=packages;sa=uninstall2;package=mypackage.tgz;pid=20 File: elkarte/sources/subs/Package.subs.php Line: 216
Re: Errors when installing and removing a package
Reply #2 – March 12, 2014, 02:03:53 am
I grabbed your hideusernames package just a few minutes ago (it was updated today) and installed it. No errors on install but errors on uninstall. One is what your github link fixes. Here's the other. Type of error: Undefined 8: Undefined variable: integration_call .../index.php?action=admin;area=packages;sa=uninstall2;package=spuds_-elk_hideusernames-3bbba4f9bd00.zip;pid=39 File: /var/www/elkarte/sources/Subs.php Line: 3923
Re: Errors when installing and removing a package
Reply #3 – March 12, 2014, 03:12:23 am
Ok, I found the difference between my package and yours in terms of install errors. I am using gzipped tar files (.tgz extension) and you are using zip files. I zipped mine instead and it installed without all the errors. Not sure why gzipped tar files throw so many errors.
Re: Errors when installing and removing a package
Reply #6 – March 12, 2014, 10:23:06 pm
Here is your hideusernames package unzipped and then tar gzipped (hope you don't mind it as the example). When I install it using the package manager in .tgz format I get four errors. Two each of Type of error: General 2: is_dir() expects parameter 1 to be a valid path, string given .../elkarte/index.php?action=admin;area=packages;sa=install2;package=spuds_-elk_hideusernames-3bbba4f9bd00.tgz;pid=0 File: .../elkarte/sources/subs/Package.subs.php Line: 1792 Type of error: General 2: file_exists() expects parameter 1 to be a valid path, string given .../elkarte/index.php?action=admin;area=packages;sa=install2;package=spuds_-elk_hideusernames-3bbba4f9bd00.tgz;pid=0 .../elkarte/sources/subs/Package.subs.php Line: 216 Note: Renamed to tar.gz as the forum wouldn't let me attach a file in .tgz format. I've not tried installing it as tar.gz.
Re: Errors when installing and removing a package
Reply #7 – March 13, 2014, 10:05:53 am
renamed it back to tgz and it installed w/o errors on my system. Since is_dir is throwing an E_WARNING i would think its a permissions issue, but I'm not sure why you are only seeing that with a tgz but not a zip? Are you having to use FTP to install the file or does the system think it has permissions?
Re: Errors when installing and removing a package
Reply #8 – March 13, 2014, 11:04:36 am
The system thinks it has permissions.
Re: Errors when installing and removing a package
Reply #9 – March 13, 2014, 11:11:54 am
Than ATM, I'm stumped ! Maybe someone else has some ideas on this one.
Re: Errors when installing and removing a package
Reply #10 – March 13, 2014, 11:12:46 am
Just confirmed that not owning the .tgz file itself wasn't the problem. Actually you don't even have to install the package to make it happen. Just clicking on install and seeing the test page generates the errors even if you cancel after the tests without actually installing the mod. Not sure what's different on my box. Probably the same thing that gives me a failure on install (themes point to localhost instead of the https url of the forum and I get the host "" errors all the time in the web error log.
Re: Errors when installing and removing a package
Reply #11 – March 13, 2014, 11:24:23 am
Line 1792 debug output, printing $strPath .tar.gz file .../elkarte/packages/temp .../elkarte/packages .../elkarte/packages/temp/sources// .../elkarte/packages/temp/sources .../elkarte/packages/temp .../elkarte/packages/temp/sources .../elkarte/sources/subs .zip file .../elkarte/packages/temp .../elkarte/packages .../elkarte/packages/temp/spuds_-elk_hideusernames-3bbba4f9bd00/ .../elkarte/packages/temp .../elkarte/packages/temp/spuds_-elk_hideusernames-3bbba4f9bd00 .../elkarte/packages/temp/spuds_-elk_hideusernames-3bbba4f9bd00 .../elkarte/packages/temp/spuds_-elk_hideusernames-3bbba4f9bd00 .../elkarte/packages/temp/spuds_-elk_hideusernames-3bbba4f9bd00 .../elkarte/packages/temp/spuds_-elk_hideusernames-3bbba4f9bd00 .../elkarte/packages/temp/spuds_-elk_hideusernames-3bbba4f9bd00 .../elkarte/packages/temp/spuds_-elk_hideusernames-3bbba4f9bd00 .../elkarte/packages/temp/spuds_-elk_hideusernames-3bbba4f9bd00/sources/ .../elkarte/packages/temp/spuds_-elk_hideusernames-3bbba4f9bd00 .../elkarte/packages/temp/spuds_-elk_hideusernames-3bbba4f9bd00/sources .../elkarte/packages/temp/spuds_-elk_hideusernames-3bbba4f9bd00 .../elkarte/sources/subs The ... expand to the same correct path to the forum root on my host. This is using the hide... I attached and the .zip downloaded from your site.
Re: Errors when installing and removing a package
Reply #13 – March 13, 2014, 11:31:05 am
And at line 216, no output at all in the zip version and in the .tar.gz I get $destination = ...elkarte/packages/temp $current['filename'] = sources// And possible unrelated bug, when I went to the post screen the it warned me you had posted while I was posting the subject line go deleted as it complained when I went to post.