Help Please!

Problems with the Solaris version of XAMPP, questions, comments, and anything related.

Help Please!

Postby luisascoobydoo » 30. December 2015 18:16

Hi there

I am new on Solaris, And I need to run a cgi with Xampp, I am using the Xampp version 1.7.7 on OpenIndiana.
I am getting the error 500 that said this:

Server error!

The server encountered an internal error and was unable to complete your request.

Error message:
Premature end of script headers: MxRemotePreview.cgi

If you think this is a server error, please contact the webmaster.
Error 500
localhost
30 de diciembre de 2015 12:11:25 COT
Apache/2.2.21 (Unix) DAV/2 mod_ssl/2.2.21 OpenSSL/1.0.0d PHP/5.3.8 mod_perl/2.0.5 Perl/v5.12.3

This is the Error log

[Wed Dec 30 12:11:11 2015] [notice] suEXEC mechanism enabled (wrapper: /opt/xampp/bin/suexec)
[Wed Dec 30 12:11:11 2015] [warn] Init: Session Cache is not configured [hint: SSLSessionCache]
[Wed Dec 30 12:11:12 2015] [notice] Apache/2.2.21 (Unix) DAV/2 mod_ssl/2.2.21 OpenSSL/1.0.0d PHP/5.3.8 mod_perl/2.0.5 Perl/v5.12.3 configured -- resuming no$
[Wed Dec 30 12:11:25 2015] [error] [client 127.0.0.1] Premature end of script headers: MxRemotePreview.cgi
[Wed Dec 30 12:11:26 2015] [error] [client 127.0.0.1] File does not exist: /videopool/data/favicon.ico

This is my Vhost File

<VirtualHost *:80>
ServerAdmin webmaster@localhost

DocumentRoot /videopool/data
<Directory />
Options FollowSymLinks +ExecCGI
AllowOverride None
</Directory>
<Directory "/videopool/data/">
Options +ExecCGI
<FilesMatch [MEAPC][0-9]+\.jpg$>
SetHandler mxremotepreview
</FilesMatch>
AuthType Basic
AuthName "Restricted Files"
AuthUserFile /videopool/data/.mxinf
Require user mxcc
</Directory>
ScriptAlias /cgi-bin/ /opt/xampp/cgi-bin/
Action mxremotepreview /cgi-bin/MxRemotePreview.cgi
<Directory "/opt/xampp/cgi-bin">
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>
ErrorLog /opt/xampp/logs/error_log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn

CustomLog /opt/xampp/logs/access_log combined

Alias /doc/ "/usr/share/doc/"
<Directory "/usr/share/doc/">
Options Indexes MultiViews FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
Allow from 127.0.0.0/255.0.0.0 ::1/128
</Directory>

</VirtualHost>

I have in my Httpd conf all about cgi enabled!

Please help
luisascoobydoo
 
Posts: 3
Joined: 30. December 2015 18:11
Operating System: Solaris

Re: Help Please!

Postby Nobbie » 31. December 2015 09:31

Do not enable CGI twice, you set Options ExecCgi for cgi-bin folder (that is number one) and you also set ScriptAlias to cgi-bin (twice). That causes your error.

Remove the ScriptAlias, instead move the ExecCgi Option to your DocumentRoot folder (see corresponding <Directory ....> clause) and move the cgi-bin folder under the htdocs folder (not beneath). Or remove the ExecCgi Option and leave only the ScriptAlias. If prefer the first solution, because you can execute CGI from everywhere, not only from cgi-bin.
Nobbie
 
Posts: 13165
Joined: 09. March 2008 13:04

Re: Help Please!

Postby luisascoobydoo » 31. December 2015 17:52

Hi Nobbie!

Thanks for you answer, I did that you said and i am getting this message

Server error!

The server encountered an internal error and was unable to complete your request.

Error message:
Unrecognized character \x7F; marked by <-- HERE after eview.cgi <-- HERE near column 198 at /opt/xampp/cgi-bin/MxRemotePreview.cgi line 1. ,

If you think this is a server error, please contact the webmaster.
Error 500
localhost
31 de diciembre de 2015 08:41:19 COT
Apache/2.2.21 (Unix) DAV/2 mod_ssl/2.2.21 OpenSSL/1.0.0d PHP/5.3.8 mod_perl/2.0.5 Perl/v5.12.3

Now, the point is the CGI file is not mine, so Couldnt open to try to edit that :(

I guess the problem is the CGI, what do you think?

Thank you
luisascoobydoo
 
Posts: 3
Joined: 30. December 2015 18:11
Operating System: Solaris

Re: Help Please!

Postby Nobbie » 01. January 2016 13:28

luisascoobydoo wrote:The server encountered an internal error and was unable to complete your request.

Error message:
Unrecognized character \x7F; marked by <-- HERE after eview.cgi <-- HERE near column 198 at /opt/xampp/cgi-bin/MxRemotePreview.cgi line 1. ,

If you think this is a server error, please contact the webmaster.
Error 500
localhost
31 de diciembre de 2015 08:41:19 COT
Apache/2.2.21 (Unix) DAV/2 mod_ssl/2.2.21 OpenSSL/1.0.0d PHP/5.3.8 mod_perl/2.0.5 Perl/v5.12.3

Now, the point is the CGI file is not mine, so Couldnt open to try to edit that :(


I think, that your CGI is configured wrongly, your Apache seems to run binary CGI files as Perl or PHP scripts. Obviously, you changed massively the Xampp default configuration, because CGI usually runs out of the box. The "SetHandler mxremotepreview" clause is NOT from Xampp default configuration, same for the "Action mxremotepreview..." clause. I am missing the standard CGI clause and the AddHandler for .cgi - your httpd.conf is far from the Xampp Default Installation.

Or (other option): the file mxRemotePreview.cgi is NOT a valid binary for Solaris, where did you get that file from?

P,S.: Meanwhile i googled around for MxRemotePreview.cgi and found out, that there is only a Windows(!) Executable available. Did you copy that file onto your Solaris machine? That would explain the error, as Windows Binarys of course cannot be executed on Solaris. There is no workaround for that, either find a Solaris Version (i could not find any) or move your project to a Windows PC, you cannot run it under Solaris.
Nobbie
 
Posts: 13165
Joined: 09. March 2008 13:04

Re: Help Please!

Postby luisascoobydoo » 08. January 2016 16:27

Thank you Nobbie!

Exactly I have the MxRemotePreview.cgi but for Linux, Ubuntu to be exact, I guess that is the problem and the answer the I cant open the file to see and configure to solaris.

Thank you again!
luisascoobydoo
 
Posts: 3
Joined: 30. December 2015 18:11
Operating System: Solaris


Return to XAMPP for Solaris

Who is online

Users browsing this forum: No registered users and 28 guests