set include path internal server error 500 - include-path

I've been trying to get this code to work, it's suposed to include the file path of my other directories. I'm running it on a Xampp server, however every time I try to open the www/index.php I'm getting an HTTP 500 error (internal server error) after reading the error log from Xampp (php_error_log) this is what was returned:
PHP Fatal error: require_once(): Failed opening required 'core/Core.php' (include_path='.;\xampp-portable\php\PEAR.') in C:\xampp-portable\htdocs\www\index.php on line 21
The referring code is:
<?php
/**
* bootstrap: instantiates Core
* all requests are routed through this file
*/
error_reporting(E_ALL);
ini_set('url_rewriter.tags', '');
ini_set('display_errors', 'off');
ini_set('memory_limit', '128M');
set_include_path(get_include_path() .':'. realpath(dirname(__FILE__) . '/../bumblebee' . ':'));
define('PAYMENT_TEST', false);
define('C2C_BETA', false);
define('USE_SSL', true);
session_start();
require_once('.;/core/Core.php');
new Core();
?>
Below is my directory setup:
Xampp Root
htdocs
www
index.php
core
Core.php
bumblebee
4 more dirs not having anything to do with this piece of code (as far as I know)
I'm running in the dark right now, mainly because I did not write this code myself. Also sorry if this all is a little vague if you want to know something feel free to ask I shall do my best to clearify the situation.
P.S. It has been written on a mac and I'm now editing it to work on windows too.

Related

Remote-SSH Vscode - problem - "tput: No value for $TERM and no -T specified"

Situation:
I'm unable to connect to remote machnie via vscode + remote-SSH.
I CAN though connect to that machine using SSH from any shell.
Before the problem when I shut down my machine there was mandatory Windows update...
First error I get in terminal just after "You are connected to: [company-servername]" is:
After this there is never-ending error log whit most errors are similar to:
What I have already tried:
reinstalling Remote-ssh
killing vscode remote-server
making additional space on remote
running without any extensions except remote-ssh
reinstalling vscode
deleting all vscode config files and reinstalling
deleting vscode config files on remote in my home
I'm a bit stuck here, and our foreign 'Support' isn't very supportive...
maybe anyone had similar problem or has any idea?
FYI I managed to fix the problem which was really trivial...
Some facts:
Problem was with REMOTE SERVER not VSCODE
As "tput: no value for $TERM" suggested something 'with terminal'
So what I did was clean my .bashrc to some generic sample. And it worked.
After investigation I figured that in my .bashrc I have
source /somepath/myAliases
which causes the problem. So what in that file was wrong?
In 'myAliases' there was broken alias where I used invalid quotation:
alias name='some commands' #OK
alias name="some commands" #OK
alias name=`some commands` # <-- this caused error shown above.
I hope this explanation may be of some use to any of you.
BR

iOS build on PC paired to Mac - app.dSYM.zip fails, 'Show IPA File on Build Server' missing, errSecInternalComponent, 'IPA is not a valid zipfile'

I have a Xamarin iOS application in VisualStudio 2019 on a Windows 10 PC. I build it on the PC, and when possible then right click the project and choose Show IPA File on Build Server, then on my Mac I upload the file to the app store using Transporter. I am encountering these issues:
Whenever I build, the build says it failed with message "There was an error unzipping the file bin\Ad-Hoc\MyApp.app.dSYM.zip: Could not find a part of the path 'C:\MyDirectory\MyApp.iOS\bin\Ad-Hoc\MyAppiOS.app.dSYM'." This has not historically caused any issues - we have still been able to upload the IPA to the app store and deploy our app - but I include it in case it's relevant to the other issues.
Sometimes, my build fails saying it "has been disconnected while waiting a post repsonse to topic xvs/Build/.../execute-task/MyApp.iOS/...Codesign" or "Unable to connect to Mac Server with Address='192.111.111.111' and User='My Username'. The build can't continue without a connection". I'm assuming a wifi issue must cause this, though the machines are all right next to one another and next to my router so seems odd. Occasionally when I try to pair to the Mac, I also get the message "Error, Couldn't connect to com. Please try again. An attempt was made to access a socket in a way forbidden by its access permissions." In any case, makes me wonder if there's any way for me to 1) hardwire the Mac to the PC or 2) build directly on the Mac instead of through VS on the PC, even though I write the code on the PC?
During the build, I periodically get an error "/Users/myUser/Library/Caches/Xamarin/mtbs/builds/MyApp.iOS//bin/Ad-Hoc/MyAppiOS.app: errSecInternalComponent MyApp.iOS C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\MSBuild\Xamarin\iOS\Xamarin.iOS.Common.targets 2003". If I lock all keychains on the Mac this goes away on the next build, but then it reappears a few builds later.
Once the build finishes with just the .dSym.zip error, most of the time, the "Show IPA File on Build Server" option still does NOT show up (not greyed out - it is not present in the menu at all) when I right click the iOS project. To get around this, I have been copying the file over to the Mac via S3. I'm wondering why the option doesn't show up, and if there's a way to just find the built file on the Mac rather than copying it over from Windows?
I then use Transporter on the Mac to upload the IPA file to the Apple Store. It always is able to read the version information and says the file is Delivered. However, often I then get an email from Apple saying the build failed because "ITMS-90688: This IPA is invalid - While unzipping the IPA we received the error message [ End-of-central-directory signature not found. Either this file is not a zipfile, or it constitutes one disk of a multi-part archive. In the latter case the central directory and zipfile comment will be found on the last disk(s) of this archive. unzip: cannot find zipfile directory in one of MyAppiOS.ipa or MyAppiOS.ipa.zip, and cannot find MyAppiOS.ipa.ZIP, period. ] Verify that the IPA can be unzipped before reattempting your upload.".
In response to that error, I've tried to unzip the IPA file and I find that on the PC it is always unzippable if I change the extension to .zip, and on my Mac, I can always unzip it to see the Payload directory, and the MyAppiOS item inside it can never be opened - I get a popup "You can't open the application 'MyAppiOS' because it is not supported on this type of Mac." - in any case, the files Apple likes and the ones it doesn't look the same to me when I try unzipping.
My only ideas are to try to figure out how to open and build the app on my Mac, to call my router company, and to keep trying and trying, over and over again, until finally one of the builds works... which sometimes literally takes hours.
Many thanks for any help you are able to offer!

How to config apache for C++ CGI scripts?

I've found a lot of stuff for Perl, but nothing for C++. I'm running Ubuntu right now but I'm fairly inexperienced with it, so simple instructions would be awesome. I've just written a small C++ program made to work as a CGI, and I need to test it out. Thanks!
You shouldn't need to do anything special; just compile it to an executable file named *.cgi (or whatnot), and make sure you have
AddHandler cgi-script .cgi
(or whatnot) in your server config or .htaccess or whatnot.
(Disclaimer: It's been many years since I've done that, so I may be forgetting something. But I think that should be all you need.)
There is nothing special for C++ programs. CGI programs are executed by the Web Server. So the prerequisites are the same as for the Perl Scripts/programs, too.
Here are some hints getting a C++ CGI program up and running.
Put a simple executable in the cgi-bin directory and make it executable by the web server. Prepare a simple program returning a valid CGI response, e.g.
#include <iostream>
using namespace std;
int main()
{
cout << "Content-Type: text/html" << endl << endl;
cout << "Hello to Apache and Firefox!" << endl;
return 0;
}
Execute the program on the command line and check that the output starts with the following lines. Ensure the empty line after the Content-Type.
$ ./hello_world
Content-Type: text/html
Hello to Apache and Firefox!
Increase the LogLevel to debug and look into the web server error logs. Search the access log, the error log and the suexec.log. Look in the log from the virtual host you are using and in the main error.log, too. On my Ubuntu system the files are located in /var/log/apache2 and named access.log, error.log and suexec.log. One of my last problems was "directory is writable by others: ..."
When using DLLs ensure that the libraries are still available on the web server. Set the RPATH to point to a custom directory with the libraries. In this context ldd and objdump -x <executable> | grep RPATH are your friends.
(This tip from Apache documentation has not worked for me: Watch the input and output using the ScriptLog Directive from the mod_cgi module of Apache. ScriptLog should only be used on an Development Server. Further details are available from the mod_cgi page.)
More hints are shown in the article Debugging Apache Web Server Problems.

Coldfusion errors that are suddenly fixed after recompiling the component

We have a coldfusion project on a live server, and the same project on a local development server. Both projects are nearly identical but a few components under development on the dev server. Both servers have the same coldfusion version (cf9).
Suddenly I get a "variable is undefined" error in a component on the live project. This component is exactly the same on the dev project. However the dev project does not throw this error when the exact same code is executed as on the live project.
private void function updateRecordById(required struct properties) {
_updateRecord(arguments.properties, aliasFrom(this.name & "_id")&" = "&
arguments.properties.id);
}
public string function aliasFrom(required string column) {
var matchingKey = structFindValue(variables.aliases,arguments.column,"ONE");
return (arraylen(matchingKey)) ? matchingKey[1].key : arguments.column;
}
The error was "Variable aliasFrom is undefined" (line nr was second line in code sample above). After simply recompiling the component on the live server (by adding writeDump("test");) and restarting the application, the error was fixed.
It looks like the live server compiled updateRecordById(), but didn't compile aliasFrom().
What could have caused this error?
How can I prevent this from happening again?
Why the heck don't I have this error on the dev server in exactly the same code?
more info:
This project uses coldspring to load the components once at applicationStart. The live server has 'cache template in request', 'component cache' and 'save class files' enabled. Simply restarting the application doesn't solve the problem. The component has te be recompiled.
It is possible that ColdFusion was serving a cached version of the cfc that wasn't identical. Do you have save compiled componenets enabled on the server?

Connect to MS SQL Server through ODBC

I have a Qt 4 application that is trying to connect to an MS SQL Server 2008 database using the Qt ODBC driver. The application runs fine when it is running in Windows; however, the target OS for the application is to have it run in GNU/Linux. When the application runs in GNU/Linux I get the following error:
QSqlError(0, "QODBC3: Unable to connect", " [unixODBC][Driver Manager]Data source name not found, and no default driver specified")
Is there something I need to configure on the SQL server or application side to get the connection to work?
I don't really know much about unixODBC, but have a look here:
unixodbc.org/doc/
For connecting to MSSQL, the following might be useful:
http://www.unixodbc.org/doc/FreeTDS.html
or .../FreeTDS2.html
Try to copy the odbc.ini file in ~/.odbc.ini . If not working again, try to copy the same file into /etc/odbc.ini. If this is not working, as these directories are different for different Unix systems, find all files: *odbc*\.ini and see if some of them are empty. If so, replace them with the correct .ini file.
I had the same problem and this solved it. But it's a really stupid solution, so I'm looking for a better one. Hope that helped (: