Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Tue 21 Oct 2014, 10:26
All times are UTC - 4
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Unsorted
xampp 1.7 as .sfs
Moderators: deshlab, Flash, GuestToo, Ian, JohnMurga, Lobster
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
Page 1 of 2 Posts_count   Goto page: 1, 2 Next
Author Message
MU


Joined: 24 Aug 2005
Posts: 13642
Location: Karlsruhe, Germany

PostPosted: Thu 26 Feb 2009, 14:39    Post_subject:  xampp 1.7 as .sfs
Sub_title: Web/Ftp server, mysql
 

I uploaded a sfs of xampp 1.7, it includes Apache, Perl, PHP, MySQL, Proftpd and helper applications like PHPmyAdmin.

Details:
http://www.apachefriends.org/en/xampp-linux.html

Download: from here:
http://puppyisos.org/isos/2009-01-to-06/Newyearspup02/addons-Micro-Mini-Midi-Maxi/


User: puppy
Password: linux

Just tested it in Newyearspup, but it should work in most Puplets.

All is in /opt/lampp, plus a symlink in /usr/local/bin/.
You can start the servers by typing:
lampp start

Then open in your webbrowser:
http://localhost

The attached screenshot shows PHPmyAdmin, the small window in front of it is a small DB utility I work on written in Java (not included as not finished yet).

It also is included in a special Puppy for Java developers:
http://www.murga-linux.com/puppy/viewtopic.php?p=283115#283115

Mark
xampp.jpg
 Description   
 Filesize   58.3 KB
 Viewed   4006 Time(s)

xampp.jpg


_________________
my recommended links

Edited_times_total
Back to top
View user's profile Send_private_message Visit_website 
MU


Joined: 24 Aug 2005
Posts: 13642
Location: Karlsruhe, Germany

PostPosted: Fri 27 Feb 2009, 20:25    Post_subject:  

I attach 2 files, a program to run, and a source folder for the Eclipse workspace.

It is a Java program, to manage a database.

The idea is:
there are usually 2 types of grafical database programs.

1.) very specialized ones, like "Amarok". It is a music database, so you cannot manage the adresses of your customers with it.
But it has many usefull options for its purpose - manage music.

2.) the generalized approach, like PHPmyAdmin.
It can manage ANY database.
But this complexity makes it difficult to use for non-experts. It has no special options like Amarok.

So I try to write a tool, that uses a "generalized" approach, so you can create a music database, or manage customers.
But it will be far less complex than PHPmyAdmin.
With this simple tool, your secretary quickly will find or modify the adress of someone, even if she has no experience with databases.

This is developed during a Java course I take.
I develop it "in the free time" between exercises.
So it is not finished, but in some cases might be usefull already.
Do not expect too much in the current state, and do NOT use it on critical data.
It is not tested intensively!

Usage:
Be sure to have a current Java runtime (jre) installed, and xampp.
You do not need a mysql addon for Java, as it is included in this jar.

Install SimpleMysqlJavaInterface.pet.
Then run it from the "office" menu.
Or better for test, type in a consolewindow:

/usr/local/SimpleMysqlJavaInterface/SimpleMysqlJavaInterface

This should open a window similar to the screenshot in my last message.

If you click on "connect", you will see an error in the console, as you have no matching database yet.
So run PHPmyAdmin in your Webbrowser.
Create a new database (I suggest to call it "testdatenbank").
Add one or more tables to it.
They must follow these rules:
the first field MUST be called "nr". It must be of type "int". It must use "auto_increment" (use the checkbox "A_I").

The other fields must be of one of these types:
int
varchar
date


varchar may have a length of 1024, but usually 255 will be sufficient.
I did not take care of long values yet.

Now again, click on "connect", after you filled in the value for user and password.
By default, this is "root", with no password.

Now you should see your new tables on the left.
If you click on one, you see their contents in a view that resembles a table in Gnumeric/Excel.
Here you can modify, add, delete, or search.
You can sort the view, if you click on the header of a column.

Sourcecode
If you are a developer, and want to look at the source:
extract DatenbankMU.tar.gz to a temporary folder like /tmp/workspace/.
In Eclipse, choose:
Import - General - Existing Project into workspace.
Select root directory (choose /tmp/workspace)
Check the checkbox "copy project into workspace".
Click on "finish".
Open and run (as Java Application) "DatenbankMU - src - default package - Datenbank.MU.java".
You also must copy:
/usr/local/SimpleMysqlJavaInterface/resource/mysql-connector-java-5.1.7-bin.jar
to:
/usr/local/5_06/jdk/jre/lib/ext/
or to wherever your Java-runtime for Eclipse is located.

Datenbank.MU.java is released under the GPL v3 or later (not included yet), for info about the Sun files please visit this page: http://dev.mysql.com/downloads/connector/j/5.1.html

Mark
DatenbankMU.tar.gz
Description  source project for eclipse
gz

 Download 
Filename  DatenbankMU.tar.gz 
Filesize  12.18 KB 
Downloaded  475 Time(s) 
SimpleMysqlJavaInterface.pet
Description 
pet

 Download 
Filename  SimpleMysqlJavaInterface.pet 
Filesize  674.39 KB 
Downloaded  507 Time(s) 

_________________
my recommended links

Edited_time_total
Back to top
View user's profile Send_private_message Visit_website 
MU


Joined: 24 Aug 2005
Posts: 13642
Location: Karlsruhe, Germany

PostPosted: Mon 02 Mar 2009, 12:56    Post_subject:  

hm, the jar does NOT include the mysql driver, the files in it are not sufficient Confused
It is a bit more complicated to add it.
The jar must be built using a special "build.xml", an ant-script.
Then the mysql jar can be delivered together with it in the same folder.
This avoids that you have to copy it to the lib/ext/ folder of your java installation.
I will create a installation package tomorrow, and write a short instruction about how to create "runnable" packages (using a small launcher written in C for windows, or a shellscript) (setup.exe or setup-linux).

I did some research today to find out how this can be achieved, and modified a C program I once created for wxBasic (a windows starter.exe for interpreter based scripts).

Mark

_________________
my recommended links
Back to top
View user's profile Send_private_message Visit_website 
Leon

Joined: 22 Jun 2005
Posts: 236
Location: Slovenia

PostPosted: Mon 02 Mar 2009, 20:19    Post_subject:  

I tried xampp-linux-1.7_411.sfs in Barry's newest Slack Puppy 0.1.1.

This is output from rxvt:

Code:
# lampp start
Starting XAMPP for Linux 1.7...
XAMPP: Starting Apache with SSL (and PHP5)...
XAMPP: Starting MySQL...
XAMPP: Starting ProFTPD...
XAMPP for Linux started

This is output form Seamonkey:

http://localhost
-
Warning: file_get_contents(lang.tmp) [function.file-get-contents]: failed to open stream: Permission denied in /opt/lampp/htdocs/xampp/index.php on line 2

Warning: Cannot modify header information - headers already sent by (output started at /opt/lampp/htdocs/xampp/index.php:2) in /opt/lampp/htdocs/xampp/index.php on line 4
-

How can I solve this problem?
Back to top
View user's profile Send_private_message 
MU


Joined: 24 Aug 2005
Posts: 13642
Location: Karlsruhe, Germany

PostPosted: Tue 03 Mar 2009, 12:41    Post_subject:  

Sorry Leon, I have no idea at moment Embarassed

----------------
I updated the Java program in my second message.
It is a PET now for easier installation.
The mysql-driver is included.

Here are Notes I made on how to create "redistributable" java packages (will be updated with more details this week):

This document describes how to turn a java program into a distributable package.

I assume, that you have created a project "Myproject" in Eclipse.

Choose "export - Java - Runnable JAR file".

As "Export destination" choose C:\java\Myproject\resource\main.jar".

In Linux, use e.g.
"/root/java/Myproject/resource/main.jar"
Use that path correspondingly whenever I mention the Windows Path in the next instructions.



If you want to include additional JARs like a database driver:
Check the checkbox "Save as ANT script"

ANT Script location:
C:\java\Myproject\resource\build.xml


To add a jar like mysql-connector-java-5.1.7-bin.jar:
Copy it also to C:\java\Myproject\resource\

Now move the "C:\java\Myproject\resource\build.xml" to your Eclipse project with a filemanager, to
workspace\Myproject\build.xml


In Eclipse, press "F5" to update your project, it now should display this new build.xml.
Doubleclick it, to open it in the eclipse editor.

It has this line:
<attribute name="Class-Path" value="."/>
Add here your additional jar, like this:
<attribute name="Class-Path" value="mysql-connector-java-5.1.7-bin.jar ."/>

Now export your project again as runnable jar, but this time by clicking the "run" button while build.xml is the active document in the editor.

-----------------------

After the creation of the JAR, test it:
Open a consolewindow in C:\java\Myproject\resource\ , and type:
java -jar main.jar


LINUX:
Now create a startscript for Linux:
"/root/java/Myproject/Myproject"

Code:
#!/bin/sh
cd /root/java/Myproject/resource
java -jar main.jar


Make it executable by typing in a console:
chmod 755 /root/java/Myproject/Myproject

To be able to see it in the menu, create a Myproject.desktop in /usr/share/applications/, use one of the existing ones as template.


WINDOWS:

Extract runjar.zip in "C:\java\Myproject".
Rename runjar.exe to Myproject.exe

Now you can create a setup.exe or a setup-linux from "C:\java\Myproject" with
http://www.installjammer.com/

It create a setup.exe, that is around 1.5 MB in size (+ size required for your project files).
runjar.exe can be selected as file that shall have a desktop link.

(more detailed instruction later)

Here is the sourcecode for runjar.exe.
I compiled it with the "lcc" compiler.

Code:
//-- runjar.c
//-- changes the working directory to the one of runjar.exe \resource
//-- starts java -jar resource/main.jar , passes arguments
//-- returns the exit-code (0 or 1, java runs in background)

// compile it in lcc with
// lcc runjar.c
// lcclnk runjar.obj -subsystem windows

// or in MingW-Studio as win32-application

#include <windows.h>
#include <stdio.h>
#include <string.h>

char *dirname(char *entry);
char *mystrrepl(char *Str, size_t BufSiz, char *OldStr, char *NewStr);

char thedir[32000];

int main(int argc,char *argv[])
{

   DWORD ergebnis;

   char pfad[32000];
      char *neupfad;
   char befehl[32000];   
   int count=0;


//required for resourcehacker
printf("");
   
   strcpy(pfad,argv[0]); // path & filename of myself   

   size_t l = strlen(pfad);

   mystrrepl(pfad,l,"\\","/");

   neupfad=dirname(thedir);
   //printf("--%s\n" , neupfad);
 
   // neupfad now is the path of myself
   strcat(neupfad , "resource");
   SetCurrentDirectory(neupfad);
   
   // the program to run
   strcpy(befehl,"java -jar main.jar ");   

   for (count=1;count < argc;count++) {

        strcat(befehl, argv[count]);
        strcat(befehl, " ");       
   }

    STARTUPINFO si;
    PROCESS_INFORMATION pi;

    ZeroMemory( &si, sizeof(si) );
    si.cb = sizeof(si);
    ZeroMemory( &pi, sizeof(pi) );
    si.dwFlags = STARTF_USESHOWWINDOW|STARTF_USESTDHANDLES;
   si.wShowWindow = SW_SHOW;



    // Start the main.exe.

   //        0x08000000,                // No creation flags.

    ergebnis = CreateProcess( NULL,   // No module name (use command line).
        befehl, // Command line.
        NULL,             // Process handle not inheritable.
        NULL,             // Thread handle not inheritable.
        FALSE,            // Set handle inheritance to FALSE.
        0x08000000,                // No creation flags.
        NULL,             // Use parent's environment block.
        NULL,             // Use parent's starting directory.
        &si,              // Pointer to STARTUPINFO structure.
        &pi );             // Pointer to PROCESS_INFORMATION strcture.
     
    CloseHandle( pi.hProcess );
    CloseHandle( pi.hThread );


 exit(ergebnis);
 return 0;
}

char *mystrrepl(char *Str, size_t BufSiz, char *OldStr, char *NewStr)
{
      int OldLen, NewLen;
      char *p, *q;

      if(NULL == (p = strstr(Str, OldStr)))
            return Str;
      OldLen = strlen(OldStr);
      NewLen = strlen(NewStr);
      if ((strlen(Str) + NewLen - OldLen + 1) > BufSiz)
            return NULL;
      memmove(q = p+NewLen, p+OldLen, strlen(p+OldLen)+1);
      memcpy(p, NewStr, NewLen);
      return q;
}

// char thedir[32000];
char *dirname(char *entry){

  int laenge;
  int laenge2;
  laenge = strlen( entry );

 
  strcpy( thedir , "" );
  char *rest;

  rest = strrchr( entry , '/' );
  laenge2 =  strlen( rest );

  if( laenge2 > 1 ){
    strncat ( thedir , entry , laenge - laenge2+1 );
  }else{
    strncat ( thedir , entry , laenge );
  }
    //printf("---%s\n" , thedir);
    //printf("laenge: %d\n" , laenge);
    //printf("laenge2: %d\n" , laenge2);
    //printf("dirname3: %s\n" , entry);
  return thedir;
}
runjar.zip
Description 
zip

 Download 
Filename  runjar.zip 
Filesize  26.17 KB 
Downloaded  483 Time(s) 

_________________
my recommended links

Edited_time_total
Back to top
View user's profile Send_private_message Visit_website 
Partack

Joined: 04 Mar 2009
Posts: 5

PostPosted: Wed 04 Mar 2009, 11:12    Post_subject:  @ Leons problem  

@ Leon: I was getting that error too. I don't know why it happens but it doesn't mean xampp is broken.

Just rename all the folders in /opt/lampp/htdocs to something else (or just delete them if you're brave xD) and then make a new (empty) xampp folder, put a test index.php (or whatever) file inside it and presto, it should work. it did for me at least.

As a side note to MU, Thanks for uploading the sfs file, I'd like to note though that when I clicked on the link to download the sfs file it gave me a 403 (permission denied) error and I had to go to http://www.puppyisos.org/ directly and follow the file tree to get what i was after.. a small inconvenience, but whatever.

Oh, and lastly, just wanted to say, xampp worked on my olllld intel celeron with 255 mb ram running puppy linux 4.1.2. xD amazing.

Cheers again. =)
~PtK
Back to top
View user's profile Send_private_message 
MU


Joined: 24 Aug 2005
Posts: 13642
Location: Karlsruhe, Germany

PostPosted: Wed 04 Mar 2009, 13:22    Post_subject:  

Partack,

thanks for your tips!
Looks like a permission error setting up the layered filesystem, very strange, I did not encounter this in newyearspup.

I'm glad you found a workaround Smile

I also changed the first message to avoid the download error, thanks too for that.

--------------------
Today I started to rewrite my java Mysql tool.
It shall use "SWT" instead of "swing".
So it will look like a native Gtk2 application, not like a typical Java program.

Unfortunately swt has a completely different syntax.
It is developed by IBM, while Swing is from Sun.
So I cannot tell you, when it will be finished.
I already have replaced the borderlayout with a gridlayout using special options to resize elements.
And added some buttons and the list.

Now I must add the callbacks, that are different, too, and the most complicated widget, the table.
Once this is done, it will be easy to use the old database routines.

Mark

_________________
my recommended links
Back to top
View user's profile Send_private_message Visit_website 
Leon

Joined: 22 Jun 2005
Posts: 236
Location: Slovenia

PostPosted: Wed 04 Mar 2009, 17:44    Post_subject: Re: @ Leons problem  

Partack wrote:
@ Leon: I was getting that error too. I don't know why it happens but it doesn't mean xampp is broken.

Just rename all the folders in /opt/lampp/htdocs to something else (or just delete them if you're brave xD) and then make a new (empty) xampp folder, put a test index.php (or whatever) file inside it and presto, it should work. it did for me at least.

Partack,

Thank you for your help.

I tried as you suggested but it didn't work for me.

I'll try to find some other way to do it.

I'll report here if I succeeded.
Back to top
View user's profile Send_private_message 
MU


Joined: 24 Aug 2005
Posts: 13642
Location: Karlsruhe, Germany

PostPosted: Fri 06 Mar 2009, 12:05    Post_subject:  

I made a new version of the Java Mysql interface.

It now uses "swt" instead of swing.
The attached screenshot shows the difference:
the above program is Swing, the one below SWT.
You can see, that SWT looks like the native program on the right side.

Just the table itself still is based on swing.
SWT has a table, too, but things like sorting colums or editing a cell must be added "by hand".
I will try to make this application my project work in the end of my course, where I then would implement a SWT based table.

I uploaded a PET and a Windows-Zip.
They include the SWT and Mysql jars, so you just need a standard Java runtime and xampp to run it.

To use the Windows-program, extract it somewhere, then click on "SimpleMysqlJavaInterfaceSWT.exe".
Note: if you want to run it from a CMD shell (Dos console), you must run it with full path, like c:\tests\SimpleMysqlJavaInterfaceSWT\SimpleMysqlJavaInterfaceSWT.exe.
I already had created a full setup.exe, but then found a bug at home, and I don't have Windows here. So I just zipped it.

The PET has a menu entry.
I also uploaded the sourcefolder for Eclipse.

Download:
http://dotpups.de/files/SimpleMysqlJavaInterfaceSWT/02/

Mark
SimpleMysqlJavaInterfaceSWT.jpg
 Description   
 Filesize   37.68 KB
 Viewed   3874 Time(s)

SimpleMysqlJavaInterfaceSWT.jpg


_________________
my recommended links
Back to top
View user's profile Send_private_message Visit_website 
MU


Joined: 24 Aug 2005
Posts: 13642
Location: Karlsruhe, Germany

PostPosted: Mon 09 Mar 2009, 12:54    Post_subject:  

I updated runjar.zip (runjar.exe for windows) above.

It was was not compatible with wine.
I fixed it now.
You also no longer need to use the full pathname in a console.
And you can add/replace an icon with resourcehacker, I already included a Java icongroup.
Updated the sourcecode, too.

I also updated the Windows zip of my database program, and in addition uploaded a setup.exe created with installjammer.
http://dotpups.de/files/SimpleMysqlJavaInterfaceSWT/02/

I currently prepare a special version of newyearspup.
It will include Eclipse, xampp, wine, JRE for Windows, Firefox for Windows, and an updated Muppyfiler.

This will allow you to run Javaprograms in ONE environment in Linux and "Windows" for quick tests.

The screenshot shows my database running in Wine (connected to the Linux MySQL running in NYP).
Below you see the Linuxversion.

The database program will become my project work, so I have a full week in end of march to enhance it Very Happy

Mark
java-wine-nyp.jpg
 Description   
 Filesize   43.97 KB
 Viewed   3764 Time(s)

java-wine-nyp.jpg


_________________
my recommended links
Back to top
View user's profile Send_private_message Visit_website 
droope


Joined: 31 Jul 2008
Posts: 814
Location: Uruguay, Mercedes

PostPosted: Wed 11 Mar 2009, 17:27    Post_subject:  

MU, you should create a separate thread for it, it will never be found here later on Wink
(Lobster was looking for something like this, i think). It's looking great.

On a slightly different note, i have installed xamp, but can't create a file. That means:
When i write some code, like this:
Code:

$ourFileName = "testFile.txt";
$ourFileHandle = fopen($ourFileName, 'w') or die("can't open file");
fclose($ourFileHandle);


I get:

Warning: fopen(4.txt) [function.fopen]: failed to open stream: Permission denied in /opt/lampp/htdocs/xampp/phpprocess.php on line 11
can't open file


Need to solve this :(edit: I have changed the file permissions. When i make an LS in console they appear green... Don't know what's happening.
Back to top
View user's profile Send_private_message 
MU


Joined: 24 Aug 2005
Posts: 13642
Location: Karlsruhe, Germany

PostPosted: Wed 11 Mar 2009, 17:44    Post_subject:  

droope, this was solved above, by Partack.

Quote:
Just rename all the folders in /opt/lampp/htdocs to something else (or just delete them if you're brave xD) and then make a new (empty) xampp folder, put a test index.php (or whatever) file inside it and presto, it should work. it did for me at least.


Mark

_________________
my recommended links
Back to top
View user's profile Send_private_message Visit_website 
droope


Joined: 31 Jul 2008
Posts: 814
Location: Uruguay, Mercedes

PostPosted: Wed 11 Mar 2009, 18:20    Post_subject:  

Hi, i solved it giving the whole folder the write permission.

Smile

Cheers,
Back to top
View user's profile Send_private_message 
caguy1000

Joined: 17 Mar 2009
Posts: 3

PostPosted: Tue 17 Mar 2009, 19:27    Post_subject: mysql not starting
Sub_title: mysql not starting
 

I just built a brand new puppy 4.12 inside of a vmware server... hoping to build a lamp server with a prebuilt cms in it, etc.

I installed the xampp_411.sfs file, and rebooted
then started /usr/local/bin/lampp
but mysql doesn't start
typing /opt/lampp/bin/mysql tells me that it can't connect.

what am I doing wrong.... haven't been playing long with puppy, but I am experienced at linux.

first post... please be kind.
Back to top
View user's profile Send_private_message 
MU


Joined: 24 Aug 2005
Posts: 13642
Location: Karlsruhe, Germany

PostPosted: Tue 17 Mar 2009, 19:47    Post_subject:  

type in a consolewindow:

tail -f /var/log/messages

There you might see a hint of what goes wrong, when you type commands.
It runs in a loop, so the messages are updated when errors occur.

Also look at the logs in:
/opt/lampp/logs/

Mark

_________________
my recommended links
Back to top
View user's profile Send_private_message Visit_website 
Display_posts:   Sort by:   
Page 1 of 2 Posts_count   Goto page: 1, 2 Next
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Unsorted
Jump to:  

Rules_post_cannot
Rules_reply_cannot
Rules_edit_cannot
Rules_delete_cannot
Rules_vote_cannot
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.1266s ][ Queries: 12 (0.0041s) ][ GZIP on ]