Browse Groups

• Hi Edo There is a formula in Astronomical Formulae for Calculators by Jean Meeus, ch.32 It gives a good approximation (did some tests and I believe it is
Message 1 of 26 , Feb 15, 2007
View Source
Hi Edo

There is a formula in Astronomical Formulae for Calculators by Jean
Meeus, ch.32
It gives a good approximation (did some tests and I believe it is
accurate within a few minutes of time) but it will not be as accurate
as the SE. However, it might serrve as a good startingpoint if you
need to be fully exact.

You can check an online application using this formula at

I do not have pseudo but I hope some PHP snippets will be usable,
they are based on the Meeus formulae.
Essentially they calculate the time of the syzygy, not the position.
Pleae note the difference between the variables \$jdnr (you guessed
it, the Julian Day number), \$jdnr5, the JDnr at noon, and \$jdnew the
resulting jd for the time of the syzygy.

The variable \$k indicates a New Moon, the fraction 0.5 is added to
get the results for the Full Moon (is already taken care off in teh
example code).

<?php
.............

function calcK(\$jdnr, \$y,\$m,\$d) { // Meeus, Astr.Form.4Calc., ch. 32
\$jdStart = jdnr5(1, 1, \$y);
\$daysInYear = \$jdnr - \$jdStart;
\$y = \$y + \$daysInYear/365.25;
return (\$y - 1900) * 12.3685;
}

.........

\$k = calcK(\$jdnr, \$year,\$month,\$day);

\$phase = 'unknown';
if (\$k >=0) {
if ((\$k - floor(\$k)) >= 0.5) \$k = floor(\$k) + 0.5;
else \$k = floor(\$k);
} else {
if ((ceil(\$k) - \$k) >= 0.5) \$k = ceil(\$k) + 0.5;
else \$k = ceil(\$k);
}
if (\$k > - floor(\$k) == 0) \$phase="New Moon"; else \$phase="Full Moon";

\$t = \$k/1236.85;
\$m = 359.2242 + 29.10535608 * \$k - 0.0000333 * pow(\$t,2) - 0.00000347
* pow(\$t,3);
\$m1 = 306.0253 + 385.81691806 * \$k + 0.0107306 * pow(\$t,2) +
0.00001236 * pow(\$t,3);
\$f = 21.2964 + 390.67050646 * \$k - 0.0016528 * pow(\$t,2) - 0.00000239
* pow(\$t,3);
\$corr = (0.1734 - 0.000393 * \$t) * gsin(\$m);
\$corr+= 0.0021 * gsin(2*\$m);
\$corr-= 0.4068 * gsin(\$m1);
\$corr+= 0.0161 * gsin(2*\$m1);
\$corr-= 0.0004 * gsin(3*\$m1);
\$corr+= 0.0104 * gsin(2*\$f);
\$corr-= 0.0051 * gsin(\$m + \$m1);
\$corr-= 0.0074 * gsin(\$m - \$m1);
\$corr+= 0.0004 * gsin(2*\$f + \$m);
\$corr-= 0.0004 * gsin(2*\$f - \$m);
\$corr-= 0.0006 * gsin(2*\$f + \$m1);
\$corr+= 0.001 * gsin(2*\$f - \$m1);
\$corr+= 0.0005 * gsin(\$m + 2*\$m1);

\$newJD = 2415020.75933 + 29.53058868 * \$k + 0.0001178 * pow(\$t,2) -
0.000000155 * pow(\$t,3);
\$newJD+= 0.00033 * gsin(166.56 + 132.87 * \$t - 0.009173 * pow(\$t,2));
\$newJD+= \$corr;

The last value of \$newJD gives the time of the syzygy

I hope this heklps,

Peter Jan Vaessen

At 11:52 15-2-2007, you wrote:

>Hi there,
>
>Can anyone help me calculating syzygy (ie the previous new or full
>moon) of a natal chart using swisseph?
>
>Basically, I need to know the date of the previous Moon and Sun
>conjunction or opposition (which ever happened before the birth date).
>I tried to compute Moon & Sun longitude and speed, but it failed.
>
>Is there an easy way of doing it with swisseph?
>Any piece of pseudo code would be greatly appreciated!
>
>Edo
>
>

[Non-text portions of this message have been removed]
• If you know Visual Basic, you can go to my website and download the source code for SE_Aspectarian and modify it to get what you want. After all, you are just
Message 1 of 26 , Feb 15, 2007
View Source
If you know Visual Basic, you can go to my website and download the
source code for SE_Aspectarian and modify it to get what you want.

After all, you are just looking for a conjunction or opposition of the
Sun and Moon - a small aspectarian in reality - with only two planets
and two aspects.

-----
Allen

Free astrology software at:
http://www.astrowin.org

edomondo999 wrote:
> Hi there,
>
> Can anyone help me calculating syzygy (ie the previous new or full
> moon) of a natal chart using swisseph?
>
> Basically, I need to know the date of the previous Moon and Sun
> conjunction or opposition (which ever happened before the birth date).
> I tried to compute Moon & Sun longitude and speed, but it failed.
>
> Is there an easy way of doing it with swisseph?
> Any piece of pseudo code would be greatly appreciated!
>
> Edo
>
>
>
>
>
>
>
>
>
• Thank you Allen! I ll have a close look at your source code. Thanks Peter, my project is actually coded in PHP (How stupid of me, I didn t even open my copy of
Message 1 of 26 , Feb 16, 2007
View Source
Thank you Allen! I'll have a close look at your source code. Thanks
Peter, my project is actually coded in PHP (How stupid of me, I didn't
even open my copy of "Calculs astronomiques" by Meeus before posting ^^;).

I thought about another way using swisseph only. Consider this equation:
Moon Long. - (Moon Speed * Days) = Sun Long. - (Sun Speed * Days)
Hence:
Days = (Moon Long. - Sun Long.) / (Moon Speed - Sun Speed)

Days is an approximate number of days since the last new moon (for
full moon, add 180 to Moon Long. - Sun Long.).
I just have to do one or two iterations with each new date & time
(initial date - Days) to get an approximation of the time & date of
the previous syzygy.

However, sometimes, Days is > 0 (ie it's pointing the *next* syzygy,
not the previous one). So I might need to add a condition such as:
Days <= 0
But I'm not sure how to do it.
Can anyone help me with this?

Edo

--- In swisseph@yahoogroups.com, "P.J. Vaessen" <info1@...> wrote:
>
> Hi Edo
>
> There is a formula in Astronomical Formulae for Calculators by Jean
> Meeus, ch.32
> It gives a good approximation (did some tests and I believe it is
> accurate within a few minutes of time) but it will not be as accurate
> as the SE. However, it might serrve as a good startingpoint if you
> need to be fully exact.
>
> You can check an online application using this formula at
>
> I do not have pseudo but I hope some PHP snippets will be usable,
> they are based on the Meeus formulae.
> Essentially they calculate the time of the syzygy, not the position.
> Pleae note the difference between the variables \$jdnr (you guessed
> it, the Julian Day number), \$jdnr5, the JDnr at noon, and \$jdnew the
> resulting jd for the time of the syzygy.
>
> The variable \$k indicates a New Moon, the fraction 0.5 is added to
> get the results for the Full Moon (is already taken care off in teh
> example code).
>
>
>
>
> <?php
> .............
>
> function calcK(\$jdnr, \$y,\$m,\$d) { // Meeus, Astr.Form.4Calc., ch. 32
> \$jdStart = jdnr5(1, 1, \$y);
> \$daysInYear = \$jdnr - \$jdStart;
> \$y = \$y + \$daysInYear/365.25;
> return (\$y - 1900) * 12.3685;
> }
>
> .........
>
> \$k = calcK(\$jdnr, \$year,\$month,\$day);
>
> \$phase = 'unknown';
> if (\$k >=0) {
> if ((\$k - floor(\$k)) >= 0.5) \$k = floor(\$k) + 0.5;
> else \$k = floor(\$k);
> } else {
> if ((ceil(\$k) - \$k) >= 0.5) \$k = ceil(\$k) + 0.5;
> else \$k = ceil(\$k);
> }
> if (\$k > - floor(\$k) == 0) \$phase="New Moon"; else \$phase="Full Moon";
>
>
> \$t = \$k/1236.85;
> \$m = 359.2242 + 29.10535608 * \$k - 0.0000333 * pow(\$t,2) - 0.00000347
> * pow(\$t,3);
> \$m1 = 306.0253 + 385.81691806 * \$k + 0.0107306 * pow(\$t,2) +
> 0.00001236 * pow(\$t,3);
> \$f = 21.2964 + 390.67050646 * \$k - 0.0016528 * pow(\$t,2) - 0.00000239
> * pow(\$t,3);
> \$corr = (0.1734 - 0.000393 * \$t) * gsin(\$m);
> \$corr+= 0.0021 * gsin(2*\$m);
> \$corr-= 0.4068 * gsin(\$m1);
> \$corr+= 0.0161 * gsin(2*\$m1);
> \$corr-= 0.0004 * gsin(3*\$m1);
> \$corr+= 0.0104 * gsin(2*\$f);
> \$corr-= 0.0051 * gsin(\$m + \$m1);
> \$corr-= 0.0074 * gsin(\$m - \$m1);
> \$corr+= 0.0004 * gsin(2*\$f + \$m);
> \$corr-= 0.0004 * gsin(2*\$f - \$m);
> \$corr-= 0.0006 * gsin(2*\$f + \$m1);
> \$corr+= 0.001 * gsin(2*\$f - \$m1);
> \$corr+= 0.0005 * gsin(\$m + 2*\$m1);
>
> \$newJD = 2415020.75933 + 29.53058868 * \$k + 0.0001178 * pow(\$t,2) -
> 0.000000155 * pow(\$t,3);
> \$newJD+= 0.00033 * gsin(166.56 + 132.87 * \$t - 0.009173 * pow(\$t,2));
> \$newJD+= \$corr;
>
>
>
> The last value of \$newJD gives the time of the syzygy
>
>
> I hope this heklps,
>
>
> Peter Jan Vaessen
>
>
>
>
> At 11:52 15-2-2007, you wrote:
>
> >Hi there,
> >
> >Can anyone help me calculating syzygy (ie the previous new or full
> >moon) of a natal chart using swisseph?
> >
> >Basically, I need to know the date of the previous Moon and Sun
> >conjunction or opposition (which ever happened before the birth date).
> >I tried to compute Moon & Sun longitude and speed, but it failed.
> >
> >Is there an easy way of doing it with swisseph?
> >Any piece of pseudo code would be greatly appreciated!
> >
> >Edo
> >
> >
>
>
> [Non-text portions of this message have been removed]
>
• Study the source code in SE_Aspectarian and learn how the Secant method can help you. If you go forward only about 11 days from the last syzygy or back about
Message 1 of 26 , Feb 16, 2007
View Source
Study the source code in SE_Aspectarian and learn how the Secant
last syzygy or back about 17 days, then look forward, you will always
find the next one - if you use the Secant method.

Allen

--- In swisseph@yahoogroups.com, "edomondo999" <edo999@...> wrote:
>
> Thank you Allen! I'll have a close look at your source code. Thanks
> Peter, my project is actually coded in PHP (How stupid of me, I
didn't
> even open my copy of "Calculs astronomiques" by Meeus before
posting ^^;).
>
> I thought about another way using swisseph only. Consider this
equation:
> Moon Long. - (Moon Speed * Days) = Sun Long. - (Sun Speed * Days)
> Hence:
> Days = (Moon Long. - Sun Long.) / (Moon Speed - Sun Speed)
>
> Days is an approximate number of days since the last new moon (for
> full moon, add 180 to Moon Long. - Sun Long.).
> I just have to do one or two iterations with each new date & time
> (initial date - Days) to get an approximation of the time & date of
> the previous syzygy.
>
> However, sometimes, Days is > 0 (ie it's pointing the *next* syzygy,
> not the previous one). So I might need to add a condition such as:
> Days <= 0
> But I'm not sure how to do it.
> Can anyone help me with this?
>
> Edo
• Hello, I would be most grateful for a little help. I have the UNIX source code files for the Swiss ephemeris, but I have no C compiler. In the past I have
Message 1 of 26 , Mar 26, 2007
View Source
Hello,

I would be most grateful for a little help.

I have the UNIX source code files for the Swiss ephemeris, but I have no
C compiler.

In the past I have always used Visual Basic and the swedll32.dll file in
order to access the functions therein and pull out the calculations needed.

I have used swetest on my UNIX server to do various calculations, but I
do not think swetest has the full complement of functions that
swedll32.dll has, for instance the ability to calculate a Julian date.

So what do I need for on a UNIX server besides swetest in order to have
the full functionality of swedll32.dll?

Is there some sort of UNIX compiled version of swedll32.dll that gives

Thank you.

Otis
• ... There is no problem with a compiler on Unix. You would just use the gcc, which is available for no cost on any Unix system. ... You are wrong ;-) The
Message 1 of 26 , Mar 26, 2007
View Source
>Hello,
>
>I would be most grateful for a little help.
>
>I have the UNIX source code files for the Swiss ephemeris, but I have no
>C compiler.
>
There is no problem with a compiler on Unix. You would just use the gcc,
which is available for no cost on any Unix system.

>In the past I have always used Visual Basic and the swedll32.dll file in
>order to access the functions therein and pull out the calculations needed.
>
>I have used swetest on my UNIX server to do various calculations, but I
>do not think swetest has the full complement of functions that
>swedll32.dll has, for instance the ability to calculate a Julian date.
>
You are wrong ;-)
The Visual <somethings> are derivatives of the original Unix source, not
vice versa.

>So what do I need for on a UNIX server besides swetest in order to have
>the full functionality of swedll32.dll?
>
Swetest is just a small test program to test the functionality of the
library. You don't need it.

>Is there some sort of UNIX compiled version of swedll32.dll that gives
>
Maybe you are looking for the libswe.a library... Just say 'make', and
everything will be done. Maybe you have to install gcc and make or
something like these, but very often they are preinstalled already.

Thomas Mack
• ... Its hardly possible to be on a unix/Linux system without a C compiler.
Message 1 of 26 , Mar 26, 2007
View Source
Allen wrote:

> I have the UNIX source code files for the Swiss ephemeris, but I have no
> C compiler.

Its hardly possible to be on a unix/Linux system without a C compiler.
• ... which is available for no cost on any Unix system. I run Windows on my desktop here at home. I run a website on a UNIX server (hosted by a 3rd party).
Message 1 of 26 , Mar 26, 2007
View Source
>> There is no problem with a compiler on Unix. You would just use the gcc,
which is available for no cost on any Unix system.

I run Windows on my desktop here at home. I run a website on a UNIX server (hosted by a 3rd party). Therefore, I don't think gcc does me any good. Isn't there a way to just get the .lib file or whatever else I need plus a simple example of how to fetch a Julian Day using the .lib or whatever using PHP on a web page? That is what I really need.

For instance, in VB, to get the planet positions I call:

ret_flag = swe_calc(tjd_et, y%, iflag, x(0), serr\$)

What would this same call look like in PHP and from where does it fetch this same function?

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

> >In the past I have always used Visual Basic and the swedll32.dll file in
> >order to access the functions therein and pull out the calculations needed.
> >
> >I have used swetest on my UNIX server to do various calculations, but I
> >do not think swetest has the full complement of functions that
> >swedll32.dll has, for instance the ability to calculate a Julian date.
> >
>
You are wrong.
The Visual <somethings> are derivatives of the original Unix source, not
vice versa.

But I do not understand what I need in order to call the various functions located - I don't know where - in the UNIX set up.

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

> >So what do I need for on a UNIX server besides swetest in order to have
> >the full functionality of swedll32.dll?
> >
>
Swetest is just a small test program to test the functionality of the
library. You don't need it.

Okay, so what DO I need instead?

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

> >Is there some sort of UNIX compiled version of swedll32.dll that gives
> >
>
Maybe you are looking for the libswe.a library... Just say 'make', and
everything will be done. Maybe you have to install gcc and make or
something like these, but very often they are preinstalled already.

I'm sorry, please forgive me. Say 'make' where?
Can't someone just send me the libswe.a file or whatever it is I need in order to be able to call the various functions on the web server using PHP (and a simple PHP example)?

Thank you.

Otis

mack@...-bs.de wrote:
>> Hello,
>>
>> I would be most grateful for a little help.
>>
>> I have the UNIX source code files for the Swiss ephemeris, but I have no
>> C compiler.
>>
>>
> There is no problem with a compiler on Unix. You would just use the gcc,
> which is available for no cost on any Unix system.
>
>
>> In the past I have always used Visual Basic and the swedll32.dll file in
>> order to access the functions therein and pull out the calculations needed.
>>
>> I have used swetest on my UNIX server to do various calculations, but I
>> do not think swetest has the full complement of functions that
>> swedll32.dll has, for instance the ability to calculate a Julian date.
>>
>>
> You are wrong ;-)
> The Visual <somethings> are derivatives of the original Unix source, not
> vice versa.
>
>
>> So what do I need for on a UNIX server besides swetest in order to have
>> the full functionality of swedll32.dll?
>>
>>
> Swetest is just a small test program to test the functionality of the
> library. You don't need it.
>
>
>> Is there some sort of UNIX compiled version of swedll32.dll that gives
>>
>>
> Maybe you are looking for the libswe.a library... Just say 'make', and
> everything will be done. Maybe you have to install gcc and make or
> something like these, but very often they are preinstalled already.
>
> Thomas Mack
>
>
• ... are pretty available, especially gcc. Once you find a C compiler, you build libswe.a using the appropriate makefile in the src directory of the sweph
Message 1 of 26 , Mar 26, 2007
View Source
>> You haven't said which variant of UNIX you're using, but C compilers
are pretty available, especially gcc. Once you find a C compiler, you
build libswe.a using the appropriate makefile in the src directory of
the sweph distribution (may be a bit more complicated than that, but
not much). As far as I know, that library has the same capabilities as
sweph32.dll on Windows.

Okay, thank you for that information. The web server says "Linux' for the operating system running Apache vesion 1.3.37 (Unix) with PHP v4.4.4.

But may I ask someone who probably already has that to send it to me?

Then I have to figure out how to make a call to any of its functions using PHP.

Sorry I am so inexperienced in this particular area of application.

Otis

Ed Falis wrote:
> Otis,
>
> You haven't said which variant of UNIX you're using, but C compilers
> are pretty available, especially gcc. Once you find a C compiler, you
> build libswe.a using the appropriate makefile in the src directory of
> the sweph distribution (may be a bit more complicated than that, but
> not much). As far as I know, that library has the same capabilities as
> sweph32.dll on Windows.
>
> - Ed
>
>
>
>
>
>
>
>
• Otis, You haven t said which variant of UNIX you re using, but C compilers are pretty available, especially gcc. Once you find a C compiler, you build
Message 1 of 26 , Mar 26, 2007
View Source
Otis,

You haven't said which variant of UNIX you're using, but C compilers
are pretty available, especially gcc. Once you find a C compiler, you
build libswe.a using the appropriate makefile in the src directory of
the sweph distribution (may be a bit more complicated than that, but
not much). As far as I know, that library has the same capabilities as
sweph32.dll on Windows.

- Ed
• ... v4.4.4. ... It s probably going to be easier for you to get it yourself, believe it or not. First, type: which gcc in a command shell to see if it s
Message 1 of 26 , Mar 26, 2007
View Source
> Okay, thank you for that information. The web server says "Linux' for
> the operating system running Apache vesion 1.3.37 (Unix) with PHP
v4.4.4.
>
> But may I ask someone who probably already has that to send it to me?

It's probably going to be easier for you to get it yourself, believe it
or not.

First, type:

which gcc

in a command shell to see if it's already installed, which it probably
is. Also type:

which make

to see whether make is installed, again which it probably is.

If those come back with paths to files instead of nothing, cd to the
directory containing the sweph source and type:

make -f GNUmakefile

(check the case of the filename since I don't have it handy).

That should build libswe.a, which you can then install somewhere for
access by programs you write. All of this is in the programmers'
manual, by the way.

If any of the above fail, type

uname -a

to figure out what distribution you have, and how to get gcc and make.

>
> Then I have to figure out how to make a call to any of its functions
> using PHP.

Sorry, that's out of my area.
• ... I believe there have been posts in this group regarding php and swisseph. Anyway, your php documentation will contain information about how to interface
Message 1 of 26 , Mar 26, 2007
View Source
Allen wrote:
>>> There is no problem with a compiler on Unix. You would just use the gcc,
> which is available for no cost on any Unix system.
>
> I run Windows on my desktop here at home. I run a website on a UNIX server (hosted by a 3rd party). Therefore, I don't think gcc does me any good. Isn't there a way to just get the .lib file or whatever else I need plus a simple example of how to fetch a Julian Day using the .lib or whatever using PHP on a web page? That is what I really need.
>
> For instance, in VB, to get the planet positions I call:
>
> ret_flag = swe_calc(tjd_et, y%, iflag, x(0), serr\$)
>
> What would this same call look like in PHP and from where does it fetch this same function?
>

I believe there have been posts in this group regarding php and swisseph.

interface with user-supplied functions written in C.

As Ed falis, told you, you will have to find a C development environment
on your server. If your provider prevents you from access (for security
reasons) talk to him, or install Linux on your home PC to make the
necessary application development.
• ... environment on your server. If your provider prevents you from access (for security reasons) talk to him, or install Linux on your home PC to make the
Message 1 of 26 , Mar 26, 2007
View Source
>> As Ed falis, told you, you will have to find a C development
(for security reasons) talk to him, or install Linux on your home PC to
make the necessary application development.

I admit that I am experienced in Windows and VB and not in UNIX and C.
But I really don't understand how hard it can be to just send a library
file that would do what I need. Hasn't anyone out there already done
this and can help me out? I would appreciate it greatly.

Otis

Alois Treindl wrote:
> Allen wrote:
>
>>>> There is no problem with a compiler on Unix. You would just use the gcc,
>>>>
>> which is available for no cost on any Unix system.
>>
>> I run Windows on my desktop here at home. I run a website on a UNIX server (hosted by a 3rd party). Therefore, I don't think gcc does me any good. Isn't there a way to just get the .lib file or whatever else I need plus a simple example of how to fetch a Julian Day using the .lib or whatever using PHP on a web page? That is what I really need.
>>
>> For instance, in VB, to get the planet positions I call:
>>
>> ret_flag = swe_calc(tjd_et, y%, iflag, x(0), serr\$)
>>
>> What would this same call look like in PHP and from where does it fetch this same function?
>>
>>
>
> I believe there have been posts in this group regarding php and swisseph.
>
> interface with user-supplied functions written in C.
>
> As Ed falis, told you, you will have to find a C development environment
> on your server. If your provider prevents you from access (for security
> reasons) talk to him, or install Linux on your home PC to make the
> necessary application development.
>
>
• ... Yes, no problem, but as it was asked before: What do you need? I can offer you versions for SuSE Linux 9.0 or similar on 32Bit PC, and for Solaris on Sun
Message 1 of 26 , Mar 26, 2007
View Source
> >> As Ed falis, told you, you will have to find a C development
>(for security reasons) talk to him, or install Linux on your home PC to
>make the necessary application development.
>
>I admit that I am experienced in Windows and VB and not in UNIX and C.
>But I really don't understand how hard it can be to just send a library
>file that would do what I need. Hasn't anyone out there already done
>this and can help me out? I would appreciate it greatly.
>
Yes, no problem, but as it was asked before: What do you need? I can
offer you versions for SuSE Linux 9.0 or similar on 32Bit PC, and for
Solaris on Sun Sparc.

Thomas Mack
• The server that hosts my website runs Linux (kernel version = 2.6.19-1_3.BHsmp) with PHP 4.4.4. Thank you. ... Allen Free astrology software at:
Message 1 of 26 , Mar 27, 2007
View Source
The server that hosts my website runs Linux (kernel version =
2.6.19-1_3.BHsmp) with PHP 4.4.4.

Thank you.

-----
Allen

Free astrology software at:
http://www.astrowin.org

mack@...-bs.de wrote:
>>>> As Ed falis, told you, you will have to find a C development
>>>>
>> environment on your server. If your provider prevents you from access
>> (for security reasons) talk to him, or install Linux on your home PC to
>> make the necessary application development.
>>
>> I admit that I am experienced in Windows and VB and not in UNIX and C.
>> But I really don't understand how hard it can be to just send a library
>> file that would do what I need. Hasn't anyone out there already done
>> this and can help me out? I would appreciate it greatly.
>>
>>
> Yes, no problem, but as it was asked before: What do you need? I can
> offer you versions for SuSE Linux 9.0 or similar on 32Bit PC, and for
> Solaris on Sun Sparc.
>
> Thomas Mack
>
>
>
>
>
>
>
>
Message 1 of 26 , Mar 27, 2007
View Source
I had the same problem. Try this example:

http://artofwebdesign.net/astrology/opensource.php

2.- Upload to your server, extract in a subdirectory and give execution
permission (755) to the file swetest with your FTP client or with the
control panel of the server.

3.- If 2nd step don't work try to compile swetest in the server with the
script "compilesweph.php". Maybe you must put write and execution to the
"sweph" directory to compile.

I tried it in an old Centos server at my home, and in 2 external services,
and it works.

My problem is exactly the contrary. I can not compile this example for and
Apache server in Windows. "swemmoon.c" give some errors with "gcc" and with
"make" in my XP. I use "gcc-2.95.2" for Windows.

Greetings from Spain, Arturo Gonzalez-Mata
• ... I appended libswe.a compiled on a 2.6.8 kernel system. I could run the version compiled under a 2.4 kernel without problem on that 2.6.8 kernel, but I
Message 1 of 26 , Mar 27, 2007
View Source
Am Dienstag, 27. MÃ¤rz 2007 09:39 schrieb Allen:
> The server that hosts my website runs Linux (kernel version =
> 2.6.19-1_3.BHsmp) with PHP 4.4.4.
>
I appended libswe.a compiled on a 2.6.8 kernel system. I could run the
version compiled under a 2.4 kernel without problem on that 2.6.8 kernel,
but I thought, it might be better to have the newer base version, even
though for some reason it is bigger in size (739kB vs. 647 kB on 2.4).

Thomas

[Non-text portions of this message have been removed]
• Thank you for your help. I did all the below and get nothing but Abort trap data for all planets. I do not know what that means or what it signifies or how
Message 1 of 26 , Mar 27, 2007
View Source

I did all the below and get nothing but "Abort trap" data for all planets.
I do not know what that means or what it signifies or how to fix it.

Otis

Arturo Gonzalez-Mata wrote:
> I had the same problem. Try this example:
>
> http://artofwebdesign.net/astrology/opensource.php
>
> 2.- Upload to your server, extract in a subdirectory and give execution
> permission (755) to the file swetest with your FTP client or with the
> control panel of the server.
>
> 3.- If 2nd step don't work try to compile swetest in the server with the
> script "compilesweph.php". Maybe you must put write and execution to the
> "sweph" directory to compile.
>
> I tried it in an old Centos server at my home, and in 2 external services,
> and it works.
>
> My problem is exactly the contrary. I can not compile this example for and
> Apache server in Windows. "swemmoon.c" give some errors with "gcc" and with
> "make" in my XP. I use "gcc-2.95.2" for Windows.
>
> Greetings from Spain, Arturo Gonzalez-Mata
>
>
>
>
>
>
>
>
>
• When I try to run compilesweph.php, I get: gcc -c -g -O9 -Wall -pedantic swetest.c In file included from sweodef.h:141, from swephexp.h:65, from
Message 1 of 26 , Mar 27, 2007
View Source
When I try to run compilesweph.php, I get:

gcc -c -g -O9 -Wall -pedantic swetest.c In file included from
sweodef.h:141, from swephexp.h:65, from swetest.c:365:
/usr/include/stdlib.h:111: warning: ANSI C does not support `long long'
/usr/include/stdlib.h:117: warning: ANSI C does not support `long long'
Assembler messages: FATAL: can't create swetest.o: Permission denied ***
Error code 1 Stop in /home/aicoachc/public_html/sweph/src.

I really don't know what I am doing.

Otis

Arturo Gonzalez-Mata wrote:
> I had the same problem. Try this example:
>
> http://artofwebdesign.net/astrology/opensource.php
>
> 2.- Upload to your server, extract in a subdirectory and give execution
> permission (755) to the file swetest with your FTP client or with the
> control panel of the server.
>
> 3.- If 2nd step don't work try to compile swetest in the server with the
> script "compilesweph.php". Maybe you must put write and execution to the
> "sweph" directory to compile.
>
> I tried it in an old Centos server at my home, and in 2 external services,
> and it works.
>
> My problem is exactly the contrary. I can not compile this example for and
> Apache server in Windows. "swemmoon.c" give some errors with "gcc" and with
> "make" in my XP. I use "gcc-2.95.2" for Windows.
>
> Greetings from Spain, Arturo Gonzalez-Mata
>
>
>
>
>
>
>
>
>
• It appears his code (http://artofwebdesign.net/astrology/opensource.php) does not use libswe.a so it doesn t do me much good. I can already use swetest, but it
Message 1 of 26 , Mar 27, 2007
View Source
It appears his code (http://artofwebdesign.net/astrology/opensource.php)
does not use libswe.a so it doesn't do me much good.
I can already use swetest, but it does not have all the functions I want
and need.

Otis

Arturo Gonzalez-Mata wrote:
> I had the same problem. Try this example:
>
> http://artofwebdesign.net/astrology/opensource.php
>
> 2.- Upload to your server, extract in a subdirectory and give execution
> permission (755) to the file swetest with your FTP client or with the
> control panel of the server.
>
> 3.- If 2nd step don't work try to compile swetest in the server with the
> script "compilesweph.php". Maybe you must put write and execution to the
> "sweph" directory to compile.
>
> I tried it in an old Centos server at my home, and in 2 external services,
> and it works.
>
> My problem is exactly the contrary. I can not compile this example for and
> Apache server in Windows. "swemmoon.c" give some errors with "gcc" and with
> "make" in my XP. I use "gcc-2.95.2" for Windows.
>
> Greetings from Spain, Arturo Gonzalez-Mata
>
>
• It appears his code (http://artofwebdesign.net/astrology/opensource.php) does not use libswe.a so it doesn t do me much good. I can already use swetest, but it
Message 1 of 26 , Mar 27, 2007
View Source
It appears his code (http://artofwebdesign.net/astrology/opensource.php)
does not use libswe.a so it doesn't do me much good.
I can already use swetest, but it does not have all the functions I want
and need.

Otis

Arturo Gonzalez-Mata wrote:
> I had the same problem. Try this example:
>
> http://artofwebdesign.net/astrology/opensource.php
>
> 2.- Upload to your server, extract in a subdirectory and give execution
> permission (755) to the file swetest with your FTP client or with the
> control panel of the server.
>
> 3.- If 2nd step don't work try to compile swetest in the server with the
> script "compilesweph.php". Maybe you must put write and execution to the
> "sweph" directory to compile.
>
> I tried it in an old Centos server at my home, and in 2 external services,
> and it works.
>
> My problem is exactly the contrary. I can not compile this example for and
> Apache server in Windows. "swemmoon.c" give some errors with "gcc" and with
> "make" in my XP. I use "gcc-2.95.2" for Windows.
>
> Greetings from Spain, Arturo Gonzalez-Mata
>
>
• ... This probably means, you don t have write permission (for swetest.o?). Either you have another file named swetest.o in your directory, which is write
Message 1 of 26 , Mar 27, 2007
View Source
>When I try to run compilesweph.php, I get:
>
>gcc -c -g -O9 -Wall -pedantic swetest.c In file included from
>sweodef.h:141, from swephexp.h:65, from swetest.c:365:
>/usr/include/stdlib.h:111: warning: ANSI C does not support `long long'
>/usr/include/stdlib.h:117: warning: ANSI C does not support `long long'
>Assembler messages: FATAL: can't create swetest.o: Permission denied ***

This probably means, you don't have write permission (for swetest.o?).
Either you have another file named swetest.o in your directory, which
is write protected, or you do not have write permission in the directory
itself...

Thomas
• I agree. 1.- Delete all object (*.o) files. So makefile knows that a complete compilation must be done. 2.- Give write permission for src directory to
Message 1 of 26 , Mar 28, 2007
View Source
I agree.
1.- Delete all object (*.o) files. So makefile knows that a complete
compilation must be done.
2.- Give write permission for "src" directory to everybody, and compile.
3.- If compilation works unchange permissions for security reasons.

I have tried this at home with an educational Ubuntu (Madrid Linux version)
and in another server. Both them giv simmilar errors until permission are
changed. After giving write permission they give a lot of warnings, but the
program works.

If you want to see it working, this is the url of my home server:

http://arquetypo.darktech.org/swisseph/

Please, be careful and crack anything. It has almost no security at this
moment.
Arturo

----- Original Message -----
From: <mack@...-bs.de>
To: <swisseph@yahoogroups.com>
Sent: Wednesday, March 28, 2007 8:24 AM
Subject: Re: [SWISSEPH] UNIX and Swiss ephemeris

> >When I try to run compilesweph.php, I get:
>>
>>gcc -c -g -O9 -Wall -pedantic swetest.c In file included from
>>sweodef.h:141, from swephexp.h:65, from swetest.c:365:
>>/usr/include/stdlib.h:111: warning: ANSI C does not support `long long'
>>/usr/include/stdlib.h:117: warning: ANSI C does not support `long long'
>>Assembler messages: FATAL: can't create swetest.o: Permission denied ***
>
> This probably means, you don't have write permission (for swetest.o?).
> Either you have another file named swetest.o in your directory, which
> is write protected, or you do not have write permission in the directory
> itself...
>
> Thomas
>
>
>
>
>
>
>
• I think that aowd sample is a working first version easy to understand. Of course it can be made smarter, but my C is some years older than linux, and I am
Message 1 of 26 , Mar 28, 2007
View Source
I think that "aowd sample" is a working first version easy to understand. Of
course it can be made smarter, but my C is some years older than linux, and
I am learning PHP only from a week. So aowd is enough for a Linux beginner
like me, and I am very pleased.

There is a "libswe.a" in the directory. Is it the Unix equivalent of the
Windows swedll32.dll? I don't know if the aowd uses the library. In the
GNUmakefile of "aowd" there are some lines for creating the library:

# create an archive and a dynamic link libary fro SwissEph
# a user of this library will inlcude swephexp.h and link
with -lswe

libswe.a: \$(SWEOBJ)
ar r libswe.a \$(SWEOBJ)

libswe.sl: \$(SWEOBJ)
ld -b -o libswe.sl \$(SWEOBJ
Arturo----- Original Message -----
From: "Allen" <ae_yahoo@...>
To: <swisseph@yahoogroups.com>
Sent: Wednesday, March 28, 2007 2:49 AM
Subject: Re: [SWISSEPH] UNIX and Swiss ephemeris

> It appears his code (http://artofwebdesign.net/astrology/opensource.php)
> does not use libswe.a so it doesn't do me much good.
> I can already use swetest, but it does not have all the functions I want
> and need.
>
>
>
> Otis
• Even if I am able to recompile things in the src directory, I do not see that this helps me any as none of the PHP files in the /aowd directory use or call
Message 1 of 26 , Mar 28, 2007
View Source
Even if I am able to recompile things in the src directory, I do not see
that this helps me any as none of the PHP files in the /aowd directory
use or call functions in libswe.a - they only use swetest. I already
know how to use swetest. What I would like to learn is how to access the
full functionality of the Swiss ephemeris by using libswe.a

Otis

Arturo Gonzalez-Mata wrote:
> I agree.
> 1.- Delete all object (*.o) files. So makefile knows that a complete
> compilation must be done.
> 2.- Give write permission for "src" directory to everybody, and compile.
> 3.- If compilation works unchange permissions for security reasons.
>
> I have tried this at home with an educational Ubuntu (Madrid Linux version)
> and in another server. Both them giv simmilar errors until permission are
> changed. After giving write permission they give a lot of warnings, but the
> program works.
>
> If you want to see it working, this is the url of my home server:
>
> http://arquetypo.darktech.org/swisseph/
>
> Please, be careful and crack anything. It has almost no security at this
> moment.
> Arturo
>
> ----- Original Message -----
> From: <mack@...-bs.de>
> To: <swisseph@yahoogroups.com>
> Sent: Wednesday, March 28, 2007 8:24 AM
> Subject: Re: [SWISSEPH] UNIX and Swiss ephemeris
>
>
>
>>> When I try to run compilesweph.php, I get:
>>>
>>> gcc -c -g -O9 -Wall -pedantic swetest.c In file included from
>>> sweodef.h:141, from swephexp.h:65, from swetest.c:365:
>>> /usr/include/stdlib.h:111: warning: ANSI C does not support `long long'
>>> /usr/include/stdlib.h:117: warning: ANSI C does not support `long long'
>>> Assembler messages: FATAL: can't create swetest.o: Permission denied ***
>>>
>> This probably means, you don't have write permission (for swetest.o?).
>> Either you have another file named swetest.o in your directory, which
>> is write protected, or you do not have write permission in the directory
>> itself...
>>
>> Thomas
>>
>>

>
Your message has been successfully submitted and would be delivered to recipients shortly.
• Changes have not been saved
Press OK to abandon changes or Cancel to continue editing
• Your browser is not supported
Kindly note that Groups does not support 7.0 or earlier versions of Internet Explorer. We recommend upgrading to the latest Internet Explorer, Google Chrome, or Firefox. If you are using IE 9 or later, make sure you turn off Compatibility View.